The Font class is used to manage embedded fonts in SWF files. Embedded fonts are represented as a subclass of the Font class. The Font class is currently useful only to find out information about embedded fonts; you cannot alter a font by using this class. You cannot use the Font class to load external fonts, or to create an instance of a Font object by itself. Use the Font class as an abstract base class.

Constructor

new (?name:String)

Variables

read onlywrite onlyfontName:String

The name of an embedded font.

fontStyle:FontStyle

The style of the font. This value can be any of the values defined in the FontStyle class.

fontType:FontType

The type of the font. This value can be any of the constants defined in the FontType class.

Static methods

staticenumerateFonts (enumerateDeviceFonts:Bool = false):Array<Font>

Specifies whether to provide a list of the currently available embedded fonts.

Parameters:

enumerateDeviceFonts

Indicates whether you want to limit the list to only the currently available embedded fonts. If this is set to true then a list of all fonts, both device fonts and embedded fonts, is returned. If this is set to false then only a list of embedded fonts is returned.

Returns:

A list of available fonts as an array of Font objects.

staticfromBytes (bytes:ByteArray):Font

staticfromFile (path:String):Font

staticregisterFont (font:Class<Dynamic>):Void

Registers a font class in the global font list.

Inherited Variables

Defined by Font

read onlyascender:Int

read onlydescender:Int

read onlyheight:Int

read onlyname:String

read onlynumGlyphs:Int

read onlyunitsPerEM:Int

Inherited Methods

Defined by Font

getGlyph (character:String):Glyph

getGlyphs (characters:String = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^`'\"/\\&*()[]{}<>|):Array<Glyph>

renderGlyph (glyph:Glyph, fontSize:Int):Image

renderGlyphs (glyphs:Array<Glyph>, fontSize:Int):Map<Glyph, Image>