Packageflash.text
Classpublic class Font
InheritanceFont Inheritance Object

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



Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties
 PropertyDefined by
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
  fontName : String
[read-only] The name of this font.
Font
  fontStyle : String
[read-only] The style of this font.
Font
  fontType : String
[read-only] The type of this font.
Font
 Inheritedprototype : Object
[static] A reference to the prototype object of a class or function object.
Object
Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods
 FunctionDefined by
  
enumerateFonts(enumerateDeviceFonts:Boolean = false):Array
[static] Return a list of available embedded fonts, as an array of Font objects.
Font
  
Returns true if the specified string can be fully displayed using this font.
Font
 Inherited
Indicates whether an object has a specified property defined.
Object
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
  
[static] Register a font class in the global font list.
Font
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
 Inherited
Returns the string representation of the specified object.
Object
 Inherited
Returns the primitive value of the specified object.
Object
Property detail
fontName property
fontName:String  [read-only]

The name of this font.

Implementation
    public function get fontName():String
fontStyle property
fontStyle:String  [read-only]

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

Implementation
    public function get fontStyle():String

See also
flash.text.FontStyle
fontType property
fontType:String  [read-only]

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

Implementation
    public function get fontType():String

See also
flash.text.FontType
Method detail
enumerateFonts method

public static function enumerateFonts(enumerateDeviceFonts:Boolean = false):Array

Return a list of available embedded fonts, as an array of Font objects.

Parameters
enumerateDeviceFonts:Boolean (default = false)

Returns
Array
hasGlyphs method

public function hasGlyphs(str:String):Boolean

Returns true if the specified string can be fully displayed using this font.

Parameters
str:String

Returns
Boolean
registerFont method

public static function registerFont(font:Class):void

Register a font class in the global font list.

Parameters
font:Class




 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/labs/flashauthoringpreview/flash/text/Font.html