0

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 ?

Olivier
  • 3,431
  • 5
  • 39
  • 56

2 Answers2

1

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.

weltraumpirat
  • 22,544
  • 5
  • 40
  • 54
  • In fact in my case it is "HelveticaNeueLT Std Lt". The key is to get exact font name from property window. Thanks ! – Olivier Jan 06 '11 at 15:52
1

I have found the above method to not always work. To wit, I am embedding 'Helvetica Neue LT Std 55 Roman' in CS5 on a Windows 7 machine. In the font viewing dialog, the following is shown:

Font Name: Helvetica Neue LT Std 55 Roman
Vendor ID: ADBE
Copyright © 1988, 1990, 1993, 2002 Adobe Systems Incorporated.  All Rights Reserved.
http://www.adobe.com/type/legal.html

Using that Font Name in the css failed. To get the Flash values of the font, I used the following:

var fonts:Array = Font.enumerateFonts();
for (var i:int = 0; i < fonts.length; i++) 
{
    var font:Font = (fonts[i] as Font)
    trace(font.fontName, ",", font.fontStyle, ",", font.fontType)
}

font.fontName is what will be the font-family in your css, and font.fontStyle will be either the font-weight or font-style depending.

For the curious, the shown values for me were: "HelveticaNeueLT Std, regular, embedded"

aaronLile
  • 5,917
  • 1
  • 14
  • 3