| Package | ch.capi.display.text |
| Class | public class FontsManager |
| Inheritance | FontsManager Object |
Font. Within this class, the Font registration
is very easy : Just create your font symbol in the library, set it a linkage (the base class must
be or extends ch.capi.display.text.AbstractFont) and then simply do the following :
//register the font
var ab:AbstractFont = FontsManager.register("myFontClass", "linkageName");
//retrieves the font
var ft:AbstractFont = FontsManager.getFont("linkageName");
Font class. If you use this class,
you shouldn't use the Font class methods.
See also
| Method | Defined By | ||
|---|---|---|---|
enumerateLinkages():Array [static]
Retrieves the linkage names available. | FontsManager | ||
getFont(linkageName:String):AbstractFont [static]
Retrieves the AbstractFont registered under the
specified linkageName. | FontsManager | ||
isFontAvailable(fontName:String):String [static]
Retrieves the type of a font. | FontsManager | ||
isRegistered(linkageName:String):Boolean [static]
Defines if the specified linkage name is already linked. | FontsManager | ||
register(classPath:String, linkageName:String):AbstractFont [static]
Register a class as a Font. | FontsManager | ||
| Constant | Defined By | ||
|---|---|---|---|
| DEVICE_FONT : String = deviceFont [static]
Defines a font as a device font. | FontsManager | ||
| FONT_EMBEDDED : String = embeddedFont [static]
Defines a font as an embedded font. | FontsManager | ||
| FONT_NOT_AVAILABLE : String = fontNotAvailable [static]
Defines a font that is not available. | FontsManager | ||
| enumerateLinkages | () | method |
public static function enumerateLinkages():ArrayRetrieves the linkage names available.
ReturnsArray — An Array containing all the available linkage names.
|
| getFont | () | method |
public static function getFont(linkageName:String):AbstractFont
Retrieves the AbstractFont registered under the
specified linkageName.
Parameters
linkageName:String — the linkage name.
|
AbstractFont — The corresponding AbstractFont.
|
| isFontAvailable | () | method |
public static function isFontAvailable(fontName:String):StringRetrieves the type of a font.
Parameters
fontName:String — The name of the font.
|
String — The type of the font issued from the constants.
|
See also
| isRegistered | () | method |
public static function isRegistered(linkageName:String):BooleanDefines if the specified linkage name is already linked.
Parameters
linkageName:String — The linkage name.
|
Boolean — true if the linkage is already linked.
|
| register | () | method |
public static function register(classPath:String, linkageName:String):AbstractFont
Register a class as a Font. As the retrieving of the AbstractFont
object is based on the check of the classPath it is important that each of the
registered font class extends the AbstractFont class.
Parameters
classPath:String — The full class name that will be registered. This class
must extend the AbstractFont class !
| |
linkageName:String — The linkage name.
|
AbstractFont — The AbstractFont created.
|
ch.capi.errors:NameAlreadyExistsError If — the linkage name is already used.
|
| DEVICE_FONT | Constant |
public static const DEVICE_FONT:String = deviceFontDefines a font as a device font.
See also
| FONT_EMBEDDED | Constant |
public static const FONT_EMBEDDED:String = embeddedFontDefines a font as an embedded font.
See also
| FONT_NOT_AVAILABLE | Constant |
public static const FONT_NOT_AVAILABLE:String = fontNotAvailableDefines a font that is not available.
See also