[]
        
(Showing Draft Content)

GrapeCity.Documents.Text.FontCollection.LoadFonts

LoadFonts Method

LoadFonts(byte[], bool)

Loads all fonts from a specified byte array into the collection.

Use the RegisterFont(string, bool) method if there is a font file.

Declaration
public int LoadFonts(byte[] fontData, bool addToFallbacks = false)
Public Function LoadFonts(fontData As Byte(), Optional addToFallbacks As Boolean = False) As Integer
Parameters
Type Name Description
byte[] fontData

The byte array with the font data.

bool addToFallbacks

Specifies if all the registered fonts should be added to the fallback font collection.

Returns
Type Description
int

The number of loaded fonts.

LoadFonts(Stream, int, bool)

Loads all fonts from the specified stream into the collection.

Use the RegisterFont(string, bool) method if there is a font file.

Declaration
public int LoadFonts(Stream stream, int bytesToRead = -1, bool addToFallbacks = false)
Public Function LoadFonts(stream As Stream, Optional bytesToRead As Integer = -1, Optional addToFallbacks As Boolean = False) As Integer
Parameters
Type Name Description
Stream stream

The stream containing the font data.

int bytesToRead

The number of bytes to read from the stream; -1 causes reading till the end of stream.

bool addToFallbacks

Specifies if all the registered fonts should be added to the fallback font collection.

Returns
Type Description
int

The number of loaded fonts.