Search code examples
actionscript-3flashfontsflash-builderswc

How to use a font embedded in a SWC


I exported a SWC from Flash CS3 with a font embedded.

Now I want use it in some TextFields, but I don't know how to use the font.


Solution

  • Done! Here's my solution:

    [Embed(source="res/guardanapo.otf", fontName="guardanapo", fontFamily="guardanapo", unicodeRange="U+0020-U+002F,U+0030-U+0039,U+003A-U+0040,U+0041-U+005A,U+005B-U+0060,U+0061-U+007A,U+007B-U+007E", advancedAntiAliasing="false", embedAsCFF="false")]
    public static const fonte:Class;
    

    I wanted to embed the font from SWC, but now it isn't necessary anymore. But answer if you know how to do that, maybe someone is serching for it now.