0
votes

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 all.

Any ideas why this is happening?

1

1 Answers

0
votes

.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);

alt text