Class TtfFontReader
Reads a TrueType or OpenType/TT font from a stream and returns a fully parsed TtfFont.
Inherited Members
Namespace: DRIT.Drawing.Font.Ttf
Assembly: DRIT.Drawing.dll
Syntax
public static class TtfFontReader
Remarks
The stream is read sequentially from its current position; it must be seekable because individual table bytes are read by absolute offset. The stream is not disposed by this reader.
Methods
Read(Stream)
Parses the sfnt data from stream and returns a
TtfFont.
Declaration
public static TtfFont Read(Stream stream)
Parameters
| Type | Name | Description |
|---|---|---|
| Stream | stream |
Returns
| Type | Description |
|---|---|
| TtfFont |
Remarks
The stream is read sequentially from its current position; it must be seekable because individual table bytes are read by absolute offset. The stream is not disposed by this reader.
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | stream is null. |
| InvalidOperationException | The stream does not start with a recognised sfnt magic value, or a required table is missing. |