Gumbo defines 3 new text primitives that take advantage of the new text functionality of the Flash Player 10 Text Engine: TextBox, TextGraphic and TextView. More information about them can be found in the following Gumbo features specification document: Text Primitives (TextBox, TextGraphic, and TextView).
To use embedded fonts with these text primitives, the fonts must be embedded in the Compact Font Format (CFF). This is achieved by setting the new property "cff" for font embedding to "true". Here are two examples on setting this property:
Using CSS
- @font-face {
- src: url("MyFontFile.ttf");
- fontFamily: myFontFamily;
- cff: true;
- }
Using ActionScript
- [Embed(source="MyFontFile.ttf",
- fontFamily="myFontFamily",
- cff="true"]
The text primitives also support the new style property "fontLookup", which sets the source where to lookup for fonts. This property can have two values:
- device : uses the fonts installed on the system that is running the SWF file
- embeddedCFF : uses font outlines embedded in the SWF
As you can guess, this property must be set to "embeddedCFF" :
Directly in the MXML tag
- <TextGraphic text="My Text" fontFamily="myFontFamily" fontLookup="embeddedCFF" />
Using CSS
- <TextGraphic text="My Text" styleName="myTextStyle" />
- .myTextStyle {
- fontFamily: myFontFamily;
- fontLookup: "embeddedCFF";
- }







http://www.robmccardle.com/wp/?p=59
Demo & source there - hope this is useful to someone,
Cheers,
Rob
www.robmccardle.com