package { import flash.display.Sprite; import flash.text.Font; public class MyFont extends Sprite { /** * Point the "source" parameter to your font. Paste in the Unicode Range into the "unicodeRange" parameter. * If you are using the Adobe TLF (TextLayout Framework) you will need to add a parameter called "cff" and * set it's value to true. If you are using a TLF Build newer than Rev. 455 the "cff" parameter has changed * to "embedAsCFF" which will need to be set to "true". CFF stands for Compact Font Format. The TLF uses * this format (don't have a good explanation right now...maybe later) and it is much more strict with * font transcoding than standard font embedding - there are more chances of a font transcoding error if * your font isn't 100% CFF Compatible. Yes, there is such a thing, at least that's what I found out on the * interwebs. All of Adobe's fonts should work flawlessly. Most TTF fonts should work as well as TTC * (TrueType Font Collection). * * If you have any questinos (yes, questinos) I'll be glad to help you find answers. * kevin@jevinkones.com * */ public function name() : void { if(doTrace) DebugUtils.log("name called >> " + classPath); } [Embed(source="/Library/Fonts/ArialUni.ttf", fontName="_fontDefault", fontStyle="Regular", advancedAntiAliasing="true", unicodeRange="insert Unicode Range Here", mimeType="application/x-font")] public static var _fontDefault:Class; Font.registerFont(_fontDefault); } }