/ Published in: ActionScript 3
Font embedding
Font embedding and prevention of anti aliasing which is good for bitmap fonts:
Expand |
Embed | Plain Text
//Embedding the font: [Embed(source="FONT.ttf", fontName = "myFont", mimeType = "application/x-font-truetype", advancedAntiAliasing="true", embedAsCFF="false")] private var myEmbeddedFont:Class; //Creating the textformat: var defaultTextFormat : TextFormat = new TextFormat('myFont'); //Applying the font to a textfield: myTextField.defaultTextFormat = Config.defaultTextFormat; myTextField.embedFonts = true; //These two next lines prevent anti aliasing - good for bitmap fonts: myTextField.antiAliasType = AntiAliasType.ADVANCED; myTextField.sharpness = 400;
You need to login to post a comment.
