VectSharp 2.5.0
A light library for C# vector graphics
Loading...
Searching...
No Matches
VectSharp.FontLibrary Class Referenceabstract

Abstract class with a default implementation of font family fallbacks. More...

Inheritance diagram for VectSharp.FontLibrary:

Public Member Functions

abstract FontFamily ResolveFontFamily (string fontFamily)
 Create a new font family from the specified family name or true type file. If the family name or the true type file are not valid, an exception might be raised.
Parameters
fontFamilyThe name of the font family to create, or the path to a TTF file.
Returns
If the font family name or the true type file is valid, a FontFamily object corresponding to the specified font family.
More...
 
abstract FontFamily ResolveFontFamily (FontFamily.StandardFontFamilies standardFontFamily)
 Create a new font family from the specified standard font family name.
Parameters
standardFontFamilyThe standard name of the font family.
Returns
A FontFamily object corresponding to the specified font family.
More...
 
virtual FontFamily ResolveFontFamily (string fontFamily, params string[] fallback)
 Create a new font family from the specified family name or true type file. If the family name or the true type file are not valid, try to instantiate the font family using the fallback . If none of the fallback family names or true type files are valid, an exception might be raised.
Parameters
fontFamilyThe name of the font family to create, or the path to a TTF file.
fallbackNames of additional font families or TTF files, which will be tried if the first fontFamily is not valid.
Returns
A FontFamily object corresponding to the first of the specified font families that is valid.
More...
 
virtual FontFamily ResolveFontFamily (string fontFamily, FontFamily.StandardFontFamilies finalFallback, params string[] fallback)
 Create a new font family from the specified family name or true type file. If the family name or the true type file are not valid, try to instantiate the font family using the fallback . If none of the fallback family names or true type files are valid, instantiate a standard font family using the finalFallback .
Parameters
fontFamilyThe name of the font family to create, or the path to a TTF file.
fallbackNames of additional font families or TTF files, which will be tried if the first fontFamily is not valid.
finalFallbackThe standard name of the font family that will be used if none of the fallback families are valid.
Returns
A FontFamily object corresponding to the first of the specified font families that is valid.
More...
 
FontFamily ResolveFontFamily (string fontFamily)
 Create a new font family from the specified family name or true type file. If the family name or the true type file are not valid, an exception might be raised. More...
 
FontFamily ResolveFontFamily (string fontFamily, params string[] fallback)
 Create a new font family from the specified family name or true type file. If the family name or the true type file are not valid, try to instantiate the font family using the fallback . If none of the fallback family names or true type files are valid, an exception might be raised. More...
 
FontFamily ResolveFontFamily (FontFamily.StandardFontFamilies standardFontFamily)
 Create a new font family from the specified standard font family name. More...
 
FontFamily ResolveFontFamily (string fontFamily, FontFamily.StandardFontFamilies finalFallback, params string[] fallback)
 Create a new font family from the specified family name or true type file. If the family name or the true type file are not valid, try to instantiate the font family using the fallback . If none of the fallback family names or true type files are valid, instantiate a standard font family using the finalFallback . More...
 

Detailed Description

Abstract class with a default implementation of font family fallbacks.

Definition at line 67 of file FontLibrary.cs.

Member Function Documentation

◆ ResolveFontFamily() [1/4]

abstract FontFamily VectSharp.FontLibrary.ResolveFontFamily ( FontFamily.StandardFontFamilies  standardFontFamily)
pure virtual

Create a new font family from the specified standard font family name.

Parameters
standardFontFamilyThe standard name of the font family.
Returns
A FontFamily object corresponding to the specified font family.

Implements VectSharp.IFontLibrary.

Implemented in VectSharp.SimpleFontLibrary, VectSharp.DefaultFontLibrary, VectSharp.FolderFontLibrary, and VectSharp.MultiFontLibrary.

◆ ResolveFontFamily() [2/4]

abstract FontFamily VectSharp.FontLibrary.ResolveFontFamily ( string  fontFamily)
pure virtual

Create a new font family from the specified family name or true type file. If the family name or the true type file are not valid, an exception might be raised.

Parameters
fontFamilyThe name of the font family to create, or the path to a TTF file.
Returns
If the font family name or the true type file is valid, a FontFamily object corresponding to the specified font family.

Implements VectSharp.IFontLibrary.

Implemented in VectSharp.SimpleFontLibrary, VectSharp.DefaultFontLibrary, VectSharp.FolderFontLibrary, and VectSharp.MultiFontLibrary.

◆ ResolveFontFamily() [3/4]

virtual FontFamily VectSharp.FontLibrary.ResolveFontFamily ( string  fontFamily,
FontFamily.StandardFontFamilies  finalFallback,
params string[]  fallback 
)
virtual

Create a new font family from the specified family name or true type file. If the family name or the true type file are not valid, try to instantiate the font family using the fallback . If none of the fallback family names or true type files are valid, instantiate a standard font family using the finalFallback .

Parameters
fontFamilyThe name of the font family to create, or the path to a TTF file.
fallbackNames of additional font families or TTF files, which will be tried if the first fontFamily is not valid.
finalFallbackThe standard name of the font family that will be used if none of the fallback families are valid.
Returns
A FontFamily object corresponding to the first of the specified font families that is valid.

Implements VectSharp.IFontLibrary.

Definition at line 129 of file FontLibrary.cs.

◆ ResolveFontFamily() [4/4]

virtual FontFamily VectSharp.FontLibrary.ResolveFontFamily ( string  fontFamily,
params string[]  fallback 
)
virtual

Create a new font family from the specified family name or true type file. If the family name or the true type file are not valid, try to instantiate the font family using the fallback . If none of the fallback family names or true type files are valid, an exception might be raised.

Parameters
fontFamilyThe name of the font family to create, or the path to a TTF file.
fallbackNames of additional font families or TTF files, which will be tried if the first fontFamily is not valid.
Returns
A FontFamily object corresponding to the first of the specified font families that is valid.

Implements VectSharp.IFontLibrary.

Definition at line 76 of file FontLibrary.cs.


The documentation for this class was generated from the following file: