[]
        
(Showing Draft Content)

GrapeCity.Documents.Text.Font.FromFile

FromFile Method

FromFile(string, bool)

Loads the first Font from a specified file.

Declaration
public static Font FromFile(string path, bool initCodeMap = false)
Public Shared Function FromFile(path As String, Optional initCodeMap As Boolean = False) As Font
Parameters
Type Name Description
string path

The path to the file containing the font data.

bool initCodeMap

Set this parameter to True if you're planning to add the font to the fallback font collection.

Returns
Type Description
Font

The newly created font, or null if the file did not contain any fonts.

FromFile(string, string)

Loads a Font with given full font name from a specified file.

Declaration
public static Font FromFile(string path, string fullFontName)
Public Shared Function FromFile(path As String, fullFontName As String) As Font
Parameters
Type Name Description
string path

The path to the file containing the font data.

string fullFontName

The full font name to be loaded.

Returns
Type Description
Font

The newly created font.