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

A font library that resolves fonts from a folder containing TrueType files. More...

Inheritance diagram for VectSharp.FolderFontLibrary:

Public Member Functions

 FolderFontLibrary (string folderPath)
 Creates a new FolderFontLibrary using fonts from the specified path, and using the FontFamily.DefaultFontLibrary to resolve the standard font families. More...
 
 FolderFontLibrary (string folderPath, IFontLibrary standardFontLibrary)
 Creates a new FolderFontLibrary using fonts from the specified path, and using the specified IFontLibrary to resolve the standard font families. More...
 
override 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...
 
override 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...
 
- Public Member Functions inherited from VectSharp.FontLibrary
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

A font library that resolves fonts from a folder containing TrueType files.

Definition at line 555 of file FontLibrary.cs.

Constructor & Destructor Documentation

◆ FolderFontLibrary() [1/2]

VectSharp.FolderFontLibrary.FolderFontLibrary ( string  folderPath)

Creates a new FolderFontLibrary using fonts from the specified path, and using the FontFamily.DefaultFontLibrary to resolve the standard font families.

Parameters
folderPathThe path to the folder containing the TrueType files.

Definition at line 565 of file FontLibrary.cs.

◆ FolderFontLibrary() [2/2]

VectSharp.FolderFontLibrary.FolderFontLibrary ( string  folderPath,
IFontLibrary  standardFontLibrary 
)

Creates a new FolderFontLibrary using fonts from the specified path, and using the specified IFontLibrary to resolve the standard font families.

Parameters
folderPathThe path to the folder containing the TrueType files.
standardFontLibraryThe IFontLibrary to use when resolving standard font families.

Definition at line 572 of file FontLibrary.cs.

Member Function Documentation

◆ ResolveFontFamily() [1/2]

override FontFamily VectSharp.FolderFontLibrary.ResolveFontFamily ( FontFamily.StandardFontFamilies  standardFontFamily)
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.FontLibrary.

Definition at line 636 of file FontLibrary.cs.

◆ ResolveFontFamily() [2/2]

override FontFamily VectSharp.FolderFontLibrary.ResolveFontFamily ( string  fontFamily)
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.FontLibrary.

Definition at line 604 of file FontLibrary.cs.


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