开发者

Font embedding does not work or?

So - I have this weird problem.

I have a major project, no details needed except that it is split to many SWFs, and so - I would like to use a Shared Library to embed the fonts. Done - sl_fonts.swf loaded, fonts - checked and working, the rest of the SWFs are loaded AFTER (checked by a preloader).

Now - again, I traced the result of the request to the font, it is all like

DEBUG: REQUEST ArialBlack RETURN [class EMArialBlack] (main.swf)
DEBUG: GOT [class EMArialBlack] (loaded.swf)

The loaded SWF file requested for ArialBlack and it seems that it got an answer - EMArialBlack, which is the embedded font's class.

The weird thing is that when I put this return to a TextFormat's .font, it does not really work. I even traced the TextFormat.font after setting it to the return. It actually traced [class EMArialBlack]. BUT when I set this TextFormat to a TextField it does not work? If embedFonts is off, it has no result (it keeps the old _sans placeholder font). If it is on, no text is shown at al开发者_运维问答l.

Any ideas why this is happening?


.font = string value (font name)

var format1:TextFormat = new TextFormat();
format1.font="Arial";
format1.size=12;
var result:TextField = new TextField();
result.embedFonts=true;
result.antiAliasType=AntiAliasType.ADVANCED;
result.text="This text uses a gridFitType of " + tl;
result.setTextFormat(fm);

Font embedding does not work or?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜