FontConfigs
FontConfigs class
Specifies font settings
class FontConfigs;
Constructors
Name | Description |
---|---|
constructor() | Default Constructor. |
Methods
Method | Description |
---|---|
isNull() | Checks whether the implementation object is null. |
static getDefaultFontName() | Gets or sets the default font name. |
static setDefaultFontName(string) | Gets or sets the default font name. |
static getPreferSystemFontSubstitutes() | Indicate whether to use system font substitutes first or not when a font is not presented and the substitute of this font is not set. e.g. On Ubuntu, “Arial” font is generally substituted by “Liberation Sans”. Default value is false. |
static setPreferSystemFontSubstitutes(boolean) | Indicate whether to use system font substitutes first or not when a font is not presented and the substitute of this font is not set. e.g. On Ubuntu, “Arial” font is generally substituted by “Liberation Sans”. Default value is false. |
static isFontAvailable(string) | Indicate whether the font is available. |
static setFontSubstitutes(string, string[]) | Font substitute names for given original font name. |
static getFontSubstitutes(string) | Returns array containing font substitute names to be used if original font is not presented. |
static setFontFolder(string, boolean) | Sets the fonts folder |
static setFontFolders(string[], boolean) | Sets the fonts folders |
static setFontSources(FontSourceBase[]) | Sets the fonts sources. |
static getFontSources() | Gets a copy of the array that contains the list of sources |
constructor()
Default Constructor.
constructor();
isNull()
Checks whether the implementation object is null.
isNull() : boolean;
getDefaultFontName()
Gets or sets the default font name.
static getDefaultFontName() : string;
setDefaultFontName(string)
Gets or sets the default font name.
static setDefaultFontName(value: string) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | string | The value to set. |
getPreferSystemFontSubstitutes()
Indicate whether to use system font substitutes first or not when a font is not presented and the substitute of this font is not set. e.g. On Ubuntu, “Arial” font is generally substituted by “Liberation Sans”. Default value is false.
static getPreferSystemFontSubstitutes() : boolean;
setPreferSystemFontSubstitutes(boolean)
Indicate whether to use system font substitutes first or not when a font is not presented and the substitute of this font is not set. e.g. On Ubuntu, “Arial” font is generally substituted by “Liberation Sans”. Default value is false.
static setPreferSystemFontSubstitutes(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
isFontAvailable(string)
Indicate whether the font is available.
static isFontAvailable(fontName: string) : boolean;
Parameters:
Parameter | Type | Description |
---|---|---|
fontName | string | font name |
Returns
true if font is available, otherwise false.
setFontSubstitutes(string, string[])
Font substitute names for given original font name.
static setFontSubstitutes(originalFontName: string, substituteFontNames: string[]) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
originalFontName | string | Original font name. |
substituteFontNames | string[] | List of font substitute names to be used if original font is not presented. |
getFontSubstitutes(string)
Returns array containing font substitute names to be used if original font is not presented.
static getFontSubstitutes(originalFontName: string) : string[];
Parameters:
Parameter | Type | Description |
---|---|---|
originalFontName | string | originalFontName |
Returns
An array containing font substitute names to be used if original font is not presented.
setFontFolder(string, boolean)
Sets the fonts folder
static setFontFolder(fontFolder: string, recursive: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
fontFolder | string | The folder that contains TrueType fonts. |
recursive | boolean | Determines whether or not to scan subfolders. |
setFontFolders(string[], boolean)
Sets the fonts folders
static setFontFolders(fontFolders: string[], recursive: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
fontFolders | string[] | The folders that contains TrueType fonts. |
recursive | boolean | Determines whether or not to scan subfolders. |
setFontSources(FontSourceBase[])
Sets the fonts sources.
static setFontSources(sources: FontSourceBase[]) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
sources | FontSourceBase[] | An array of sources that contain TrueType fonts. |
getFontSources()
Gets a copy of the array that contains the list of sources
static getFontSources() : FontSourceBase[];
Returns