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

Class TtfCMapTable

Parsed OpenType "cmap" table (character-to-glyph-index mapping). Reads all encoding records from the table directory and parses the unique subtables; exposes FindUnicodeTable() to select the best subtable for Unicode text shaping. Ref: OpenType spec §5.6.

Inheritance
object
TtfTableBase
TtfCMapTable
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 TtfCMapTable : TtfTableBase

Fields

TableTag

The table tag for the cmap table.

Declaration
public const string TableTag = "cmap"
Field Value
Type Description
string

Properties

Subtables

All parsed CMap subtables.

Declaration
public IReadOnlyList<TtfCMapFormatBaseTable> Subtables { get; }
Property Value
Type Description
IReadOnlyList<TtfCMapFormatBaseTable>

Methods

FindUnicodeTable()

Finds the best Unicode-capable subtable. Priority order:

  1. Format 12, platform 0 or 3 (full Unicode coverage)
  2. Format 12, any platform
  3. Format 4, platform 3 (Windows BMP)
  4. Format 4, platform 0 (Unicode BMP)
  5. Format 4, any platform

Returns null if no usable Unicode subtable is found.

Declaration
public TtfCMapFormatBaseTable? FindUnicodeTable()
Returns
Type Description
TtfCMapFormatBaseTable

Parse(byte[])

Parses the "cmap" table from its raw bytes.

Declaration
public static TtfCMapTable Parse(byte[] rawBytes)
Parameters
Type Name Description
byte[] rawBytes
Returns
Type Description
TtfCMapTable
Back to top

DR-IT Software documentation

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

Generated by DocFX