[]
        
(Showing Draft Content)

GrapeCity.Documents.Text.Font.FromStream

FromStream Method

FromStream(Stream, int, bool)

Loads a Font from the specified stream.

Declaration
public static Font FromStream(Stream stream, int bytesToRead = -1, bool initCodeMap = false)
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 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 stream did not contain any fonts.

FromStream(Stream, string, int)

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

Declaration
public static Font FromStream(Stream stream, string fullFontName, int bytesToRead = -1)
Parameters
Type Name Description
Stream stream

The stream containing the font data.

string fullFontName

The full font name to be loaded.

int bytesToRead

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

Returns
Type Description
Font

The newly created font.