Search code examples
actionscript-3flash-cs5embedded-fonts

Use exotic font-styles in AS3 styleSheet with CS5 new font embedding


I have some dynamic swf that used to retrieve its dynamic text values from an external .xml & style values from an external .css.

Since FlashCS5 and its new font embedding technique, i can't find how to use exotic style anymore. Like for the font-family "HelveticaNeue LT Std", I want to use the style "45 Light" or "65 Medium", "85 Heavy"...

But in my css, it seems i only have "font-family" support. And font-weight is either normal/bold & font-style is normal/italic.

Is there a way to name my fonts like "HelveticaNeue45Light" & use this in my external css ?


Solution

  • You have to embed each font style as an individual font. You can then choose the font via CSS:

    font-family: HelveticaNeue LT Std 45 Light;
    

    Use the screen name of your embedded font - you can find out the exact name by opening the properties window for the font symbol in your library.