[]
Loads all Fonts from a specified stream containing single font or a font collection.
public static int CollectionFromStream(Stream stream, List<Font> fonts, int bytesToRead = -1, bool initCodeMap = false)
Public Shared Function CollectionFromStream(stream As Stream, fonts As List(Of Font), Optional bytesToRead As Integer = -1, Optional initCodeMap As Boolean = False) As Integer
| Type | Name | Description |
|---|---|---|
| Stream | stream | The stream containing the font data. |
| List<Font> | fonts | The destination list of fonts. It must be initialized beforehand. |
| 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 loaded fonts to the fallback font collection. |
| Type | Description |
|---|---|
| int | The number of loaded fonts. |