Fontitem.embedvariantglyphs – Adobe Extending Flash Professional CS5 User Manual
Page 303
281
EXTENDING FLASH PROFESSIONAL
fontItem object
Last updated 5/2/2011
Usage
fontItem.embedRanges
Description
Property; a string value that specifies a series of delimited integers that correspond to items that can be selected in the
Font Embedding dialog box.
This property can also be read, allowing you to find out what characters were specified with the Font Embedding dialog
box for a given Font item.
Note: The range numbers correspond to the FontEmbedding/UnicodeTables.xml file found in the configuration folder.
Example
Assuming that the first item in the Library is a Font item, the following code embeds the ranges identified by the
integers 1, 3, and 7.
fl.getDocumentDOM().library.items[0].embedRanges = "1|3|7";
Assuming that the first item in the Library is a Font item, the following code resets the ranges to embed.
fl.getDocumentDOM().library.items[0].embedRanges = "";
fontItem.embedVariantGlyphs
Availability
Flash CS4 Professional.
Usage
fontItem.embedVariantGlyphs
Description
Note: While this property is available in Flash CS5 Professional, it has no effect when applied to Text Layout Framework
(TLF) text. Beginning in Flash Professional CS5, variant glyphs are always embedded in fonts used with TLF text. The
flash.text.engine (FTE) referenced below is only available in Flash Professional CS4.
Property; a Boolean value that specifies whether variant glyphs should be output in the font when publishing a SWF
file (
true
) or not (
false
). Setting this value to
true
increases the size of your SWF file. The default value is
false
.
Some languages dynamically substitute characters glyphs as you are typing (for example, Thai, Arabic, Hebrew, and
Greek). If you are laying out or inputting text in these types of languages, set this property to
true
.
Examples
Font symbols that are compatible with flash.text APIs appear in the Library and the user can manage them directly.
However, font symbols that are compatible with the flash.text.engine (FTE) APIs do not appear in the Library, so you
must manage them manually. The following function adds a new font to the Library that can be used with the FTE
APIs.