Class TtfTableBase
Abstract base for all parsed OpenType/TrueType table objects. Holds the raw table bytes so individual parsers can be re-run on demand.
Inheritance
TtfTableBase
Inherited Members
Namespace: DRIT.Drawing.Font.Ttf.Tables
Assembly: DRIT.Drawing.dll
Syntax
public abstract class TtfTableBase
Constructors
TtfTableBase(string, byte[])
Initializes a new TtfTableBase with the specified tag and raw bytes.
Declaration
protected TtfTableBase(string tag, byte[] rawBytes)
Parameters
| Type | Name | Description |
|---|---|---|
| string | tag | The four-character ASCII table tag. |
| byte[] | rawBytes | The raw bytes of the table. |
Properties
RawBytes
Raw bytes of this table as extracted from the font file. The slice corresponds exactly to the byte range described by the OpenTypeTableRecord entry in the table directory.
Declaration
public byte[] RawBytes { get; }
Property Value
| Type | Description |
|---|---|
| byte[] |
Tag
Four-character ASCII table tag (e.g. "head", "cmap").
Declaration
public string Tag { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
CreateReader()
Creates a new FontBinaryReader positioned at byte 0 of RawBytes. The caller owns the returned reader and must dispose it (which also disposes the underlying MemoryStream).
Declaration
protected FontBinaryReader CreateReader()
Returns
| Type | Description |
|---|---|
| FontBinaryReader |