Class TtfFontWriter
Serialises a TtfFont back to a binary sfnt stream. Uses the raw table bytes already stored in each parsed table, so no per-table re-serialisation is required.
Inherited Members
Namespace: DRIT.Drawing.Font.Ttf
Assembly: DRIT.Drawing.dll
Syntax
public static class TtfFontWriter
Methods
Write(TtfFont, Stream)
Serialises font and writes the resulting sfnt bytes to
stream.
Declaration
public static void Write(TtfFont font, Stream stream)
Parameters
| Type | Name | Description |
|---|---|---|
| TtfFont | font | |
| Stream | stream |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Either argument is null. |
WriteToBytes(TtfFont)
Serialises font and returns the resulting sfnt bytes.
Declaration
public static byte[] WriteToBytes(TtfFont font)
Parameters
| Type | Name | Description |
|---|---|---|
| TtfFont | font |
Returns
| Type | Description |
|---|---|
| byte[] |