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

A font library that can be used to cache and resolve font family names. More...

Inheritance diagram for VectSharp.SimpleFontLibrary:

Public Member Functions

 SimpleFontLibrary (IFontLibrary standardFontLibrary)
 Create a new SimpleFontLibrary instance. More...
 
 SimpleFontLibrary ()
 Create a new SimpleFontLibrary instance, using the default font library to resolve the standard font families. More...
 
 SimpleFontLibrary (FontFamily timesRoman, FontFamily timesBold, FontFamily timesItalic, FontFamily timesBoldItalic, FontFamily helvetica, FontFamily helveticaBold, FontFamily helveticaOblique, FontFamily helveticaBoldOblique, FontFamily courier, FontFamily courierBold, FontFamily courierOblique, FontFamily courierBoldOblique, FontFamily symbol, FontFamily zapfdingbats)
 Create a new SimpleFontLibrary instance, with the specified replacements for the standard font families. More...
 
 SimpleFontLibrary (string timesRoman, string timesBold, string timesItalic, string timesBoldItalic, string helvetica, string helveticaBold, string helveticaOblique, string helveticaBoldOblique, string courier, string courierBold, string courierOblique, string courierBoldOblique, string symbol, string zapfdingbats)
 Create a new SimpleFontLibrary instance, with the specified replacements for the standard font families. More...
 
void Add (string fontFamilyName, FontFamily fontFamily)
 Add the specified font family to the library with the specified name. More...
 
void Add (FontFamily fontFamily)
 Add the specified font family to the library. More...
 
void Add (string fileName)
 Add the font family contained in the specified True Type Font file to the library. More...
 
void Add (string fontFamily, string fileName)
 Add the font family contained in the specified True Type Font file to the library, with the specified name. The font family is not loaded until it is requested for the first time. 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...
 
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...
 
- 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 can be used to cache and resolve font family names.

Definition at line 185 of file FontLibrary.cs.

Constructor & Destructor Documentation

◆ SimpleFontLibrary() [1/4]

VectSharp.SimpleFontLibrary.SimpleFontLibrary ( IFontLibrary  standardFontLibrary)

Create a new SimpleFontLibrary instance.

Parameters
standardFontLibraryAn existing font library that will be used to resolve the standard font families.

Definition at line 197 of file FontLibrary.cs.

◆ SimpleFontLibrary() [2/4]

VectSharp.SimpleFontLibrary.SimpleFontLibrary ( )

Create a new SimpleFontLibrary instance, using the default font library to resolve the standard font families.

Definition at line 217 of file FontLibrary.cs.

◆ SimpleFontLibrary() [3/4]

VectSharp.SimpleFontLibrary.SimpleFontLibrary ( FontFamily  timesRoman,
FontFamily  timesBold,
FontFamily  timesItalic,
FontFamily  timesBoldItalic,
FontFamily  helvetica,
FontFamily  helveticaBold,
FontFamily  helveticaOblique,
FontFamily  helveticaBoldOblique,
FontFamily  courier,
FontFamily  courierBold,
FontFamily  courierOblique,
FontFamily  courierBoldOblique,
FontFamily  symbol,
FontFamily  zapfdingbats 
)

Create a new SimpleFontLibrary instance, with the specified replacements for the standard font families.

Parameters
timesRomanThe font family to use for the Times-Roman standard font.
timesBoldThe font family to use for the Times-Bold standard font.
timesItalicThe font family to use for the Times-Italic standard font.
timesBoldItalicThe font family to use for the Times-BoldItalic standard font.
helveticaThe font family to use for the Helvetica standard font.
helveticaBoldThe font family to use for the Helvetica-Bold standard font.
helveticaObliqueThe font family to use for the Helvetica-Oblique standard font.
helveticaBoldObliqueThe font family to use for the Helvetica-BoldOblique standard font.
courierThe font family to use for the Courier standard font.
courierBoldThe font family to use for the Courier-Bold standard font.
courierObliqueThe font family to use for the Courier-Oblique standard font.
courierBoldObliqueThe font family to use for the Courier-BoldOblique standard font.
symbolThe font family to use for the Symbol standard font.
zapfdingbatsThe font family to use for the Zapfdingbats standard font.

Definition at line 239 of file FontLibrary.cs.

◆ SimpleFontLibrary() [4/4]

VectSharp.SimpleFontLibrary.SimpleFontLibrary ( string  timesRoman,
string  timesBold,
string  timesItalic,
string  timesBoldItalic,
string  helvetica,
string  helveticaBold,
string  helveticaOblique,
string  helveticaBoldOblique,
string  courier,
string  courierBold,
string  courierOblique,
string  courierBoldOblique,
string  symbol,
string  zapfdingbats 
)

Create a new SimpleFontLibrary instance, with the specified replacements for the standard font families.

Parameters
timesRomanThe font family to use for the Times-Roman standard font.
timesBoldThe font family to use for the Times-Bold standard font.
timesItalicThe font family to use for the Times-Italic standard font.
timesBoldItalicThe font family to use for the Times-BoldItalic standard font.
helveticaThe font family to use for the Helvetica standard font.
helveticaBoldThe font family to use for the Helvetica-Bold standard font.
helveticaObliqueThe font family to use for the Helvetica-Oblique standard font.
helveticaBoldObliqueThe font family to use for the Helvetica-BoldOblique standard font.
courierThe font family to use for the Courier standard font.
courierBoldThe font family to use for the Courier-Bold standard font.
courierObliqueThe font family to use for the Courier-Oblique standard font.
courierBoldObliqueThe font family to use for the Courier-BoldOblique standard font.
symbolThe font family to use for the Symbol standard font.
zapfdingbatsThe font family to use for the Zapfdingbats standard font.

Definition at line 297 of file FontLibrary.cs.

Member Function Documentation

◆ Add() [1/4]

void VectSharp.SimpleFontLibrary.Add ( FontFamily  fontFamily)

Add the specified font family to the library.

Parameters
fontFamilyThe font family to add.

Definition at line 360 of file FontLibrary.cs.

◆ Add() [2/4]

void VectSharp.SimpleFontLibrary.Add ( string  fileName)

Add the font family contained in the specified True Type Font file to the library.

Parameters
fileNameThe path to the TTF file containing the font family.

Definition at line 372 of file FontLibrary.cs.

◆ Add() [3/4]

void VectSharp.SimpleFontLibrary.Add ( string  fontFamily,
string  fileName 
)

Add the font family contained in the specified True Type Font file to the library, with the specified name. The font family is not loaded until it is requested for the first time.

Parameters
fontFamilyThe name of the font family.
fileNameThe path to the TTF file containing the font family.

Definition at line 387 of file FontLibrary.cs.

◆ Add() [4/4]

void VectSharp.SimpleFontLibrary.Add ( string  fontFamilyName,
FontFamily  fontFamily 
)

Add the specified font family to the library with the specified name.

Parameters
fontFamilyNameThe name of the font family.
fontFamilyThe font family to add.

Definition at line 343 of file FontLibrary.cs.

◆ ResolveFontFamily() [1/2]

override FontFamily VectSharp.SimpleFontLibrary.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 394 of file FontLibrary.cs.

◆ ResolveFontFamily() [2/2]

override FontFamily VectSharp.SimpleFontLibrary.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 400 of file FontLibrary.cs.


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