[]
Loads a Font from the specified stream.
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
| 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. |
| Type | Description |
|---|---|
| Font | The newly created font, or null if the stream did not contain any fonts. |
Loads a Font with given full font name from a specified stream.
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
| 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. |
| Type | Description |
|---|---|
| Font | The newly created font. |