Adds a font from a file to this font store.

 

   

Syntax
 

[C#]
XFont AddFont(string path, bool autoDeleteFile)
XFont AddFont(XFont font)

 

   

Params
 
Name Description
path The path to the font file.
autoDeleteFile Whether to delete the file when the font is no longer referenced.
font The font to add.
return The added font.

 

   

Notes
 

Adds a font from a file to this font store.remarks:.

Most font files (.ttf, .otf, .pfm, etc.) contain a single font face, so a returned array will contain exactly one element.

However, font collection files (.ttc - TrueType Collection) can bundle multiple fonts into a single file. For such files, the returned XFont will be the first in the collection.

Similarly an XFont may be part of a collection. If that is the case then all fonts in that collection are added.

For collections you may wish to use AddStore which returns a set of fonts rather than just the first one.

 

   

Example
 
None.