[]
        
(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)
Public Shared Function FromStream(stream As Stream, Optional bytesToRead As Integer = -1, Optional initCodeMap As Boolean = False) As Font
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)
Public Shared Function FromStream(stream As Stream, fullFontName As String, Optional bytesToRead As Integer = -1) As Font
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.