• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

Class TtfGdefTable

Parsed OpenType "GDEF" table — Glyph Definition table. Exposes per-glyph classification (Base, Ligature, Mark, Component) via GetClass(ushort).

Inheritance
object
TtfTableBase
TtfGdefTable
Inherited Members
TtfTableBase.Tag
TtfTableBase.RawBytes
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: DRIT.Drawing.Font.Ttf.Tables
Assembly: DRIT.Drawing.dll
Syntax
public sealed class TtfGdefTable : TtfTableBase
Remarks

Supports GDEF versions 1.0, 1.2, and 1.3. Only the GlyphClassDef sub-table is parsed; AttachList, LigCaretList, MarkAttachClassDef, MarkGlyphSets and ItemVarStore are skipped.

ClassDef format 1 (contiguous range): stored as a flat array. ClassDef format 2 (range records): stored as a sorted array and binary-searched.

Ref: https://learn.microsoft.com/en-us/typography/opentype/spec/gdef

Fields

TableTag

The table tag for the GDEF table.

Declaration
public const string TableTag = "GDEF"
Field Value
Type Description
string
Remarks

Supports GDEF versions 1.0, 1.2, and 1.3. Only the GlyphClassDef sub-table is parsed; AttachList, LigCaretList, MarkAttachClassDef, MarkGlyphSets and ItemVarStore are skipped.

ClassDef format 1 (contiguous range): stored as a flat array. ClassDef format 2 (range records): stored as a sorted array and binary-searched.

Ref: https://learn.microsoft.com/en-us/typography/opentype/spec/gdef

Methods

GetClass(ushort)

Returns the GlyphClass of glyphId. Returns Unclassified when the glyph is not listed.

Declaration
public GlyphClass GetClass(ushort glyphId)
Parameters
Type Name Description
ushort glyphId
Returns
Type Description
GlyphClass
Remarks

Supports GDEF versions 1.0, 1.2, and 1.3. Only the GlyphClassDef sub-table is parsed; AttachList, LigCaretList, MarkAttachClassDef, MarkGlyphSets and ItemVarStore are skipped.

ClassDef format 1 (contiguous range): stored as a flat array. ClassDef format 2 (range records): stored as a sorted array and binary-searched.

Ref: https://learn.microsoft.com/en-us/typography/opentype/spec/gdef

Parse(byte[])

Parses the "GDEF" table from its raw bytes.

Declaration
public static TtfGdefTable Parse(byte[] rawBytes)
Parameters
Type Name Description
byte[] rawBytes
Returns
Type Description
TtfGdefTable
Remarks

Supports GDEF versions 1.0, 1.2, and 1.3. Only the GlyphClassDef sub-table is parsed; AttachList, LigCaretList, MarkAttachClassDef, MarkGlyphSets and ItemVarStore are skipped.

ClassDef format 1 (contiguous range): stored as a flat array. ClassDef format 2 (range records): stored as a sorted array and binary-searched.

Ref: https://learn.microsoft.com/en-us/typography/opentype/spec/gdef

Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX