Packagecom.yworks.support
Classpublic final class FontManager
InheritanceFontManager Inheritance Object

Class which provides convenience methods for font handling.



Public Properties
 PropertyDefined By
  defaultFont : String
The font which will be used by default.
FontManager
Public Methods
 MethodDefined By
  
FontManager
  
getDefaultTextFormat():UITextFormat
Factory method which returns an instance of UITextFormat with default values.
FontManager
  
inverseLookupFont(fontName:String):String
Returns the name of the font that was mapped to the given font name of null, it no mapping exists.
FontManager
  
isEmbedded(textFormat:TextFormat):Boolean
Tests whether the font in the provided TextFormat is an embedded font or a system font.
FontManager
  
lookupFont(fontName:String):String
Returns the font mapped to the given font name or null, if no mapping exists.
FontManager
  
mapFont(fontName:String, mappedName:String):void
Map one font name to another font name.
FontManager
Public Constants
 ConstantDefined By
  INSTANCE : FontManager
[static]
FontManager
Property Detail
defaultFontproperty
defaultFont:String

The font which will be used by default.


Implementation
    public function get defaultFont():String
    public function set defaultFont(value:String):void
Constructor Detail
FontManager()Constructor
public function FontManager()



Method Detail
getDefaultTextFormat()method
public function getDefaultTextFormat():UITextFormat

Factory method which returns an instance of UITextFormat with default values.

Returns
UITextFormat — Default instance of UITextFormat
inverseLookupFont()method 
public function inverseLookupFont(fontName:String):String

Returns the name of the font that was mapped to the given font name of null, it no mapping exists.

Parameters

fontName:String

Returns
String
isEmbedded()method 
public function isEmbedded(textFormat:TextFormat):Boolean

Tests whether the font in the provided TextFormat is an embedded font or a system font.

Parameters

textFormat:TextFormat — The text format to test.

Returns
Booleantrue if the font is embedded.
lookupFont()method 
public function lookupFont(fontName:String):String

Returns the font mapped to the given font name or null, if no mapping exists.

Parameters

fontName:String

Returns
String
mapFont()method 
public function mapFont(fontName:String, mappedName:String):void

Map one font name to another font name. The font name mapping is queried by the graphml parser when node and edge labels are parsed. The mapped font names will be used for the corresponding node and edge styles.

Parameters

fontName:String — The font name to be mapped
 
mappedName:String — The font name to be mapped to

See also

Constant Detail
INSTANCEConstant
public static const INSTANCE:FontManager