# Xui.Runtime.Software.Font

Assembly: **Xui.Runtime.Software** · [C# declarations](index.cs) · [Assembly overview](../index.md)

## Types

- [`class CMapTable`](#api-7499f01b4257efd4)
- [`readonly record struct CMapTable.GlyphMapping`](#api-32bc95ab08ce0258)
- [`class Catalog`](#api-bc5d7341b8b0b25d)
- [`readonly struct FontFace`](#api-e38bb7473b7439f8)
- [`class FontUsage`](#api-eac93ff10f4a2f75)
- [`readonly record struct FontUsage.RunePair`](#api-31149dacaf80e852)
- [`class GPosTable`](#api-a129188e24b3ace3)
- [`class GPosTable.ClassDefTable`](#api-28c161eb312c4962)
- [`class GPosTable.ClassDefTable.Format1`](#api-f872a9ae37740f35)
- [`class GPosTable.ClassDefTable.Format2`](#api-af156830e53d8e99)
- [`class GPosTable.CoverageTable`](#api-a02d09bd502e9295)
- [`class GPosTable.CoverageTable.Format1`](#api-5bbb69b24425931a)
- [`class GPosTable.CoverageTable.Format2`](#api-6ef9ea4c37929fce)
- [`class GPosTable.ExtensionPositioningSubtable`](#api-2777d40036954bba)
- [`class GPosTable.FeatureListTable`](#api-655e923eee8271b1)
- [`class GPosTable.FeatureTable`](#api-f064682b789b0d6f)
- [`class GPosTable.LangSysTable`](#api-2c105285e67e2cac)
- [`class GPosTable.LookupListTable`](#api-425ddbe8f63b1962)
- [`class GPosTable.LookupTable`](#api-301a5b8cf4294ca8)
- [`enum GPosTable.LookupTable.GPosLookupType`](#api-99fa601d449cec38)
- [`class GPosTable.PairAdjustmentSubtable`](#api-10c8b4795888f202)
- [`class GPosTable.PairAdjustmentSubtable.Format1`](#api-3908eb90e0147a25)
- [`record class GPosTable.PairAdjustmentSubtable.Format1.PairSet`](#api-ce81cc4ead28d105)
- [`record class GPosTable.PairAdjustmentSubtable.Format1.PairValueRecord`](#api-a70fbbec4f586f4d)
- [`class GPosTable.PairAdjustmentSubtable.Format2`](#api-359b68fa24baad8e)
- [`record class GPosTable.PairAdjustmentSubtable.Format2.PairValueRecord`](#api-11992f24276da1e4)
- [`class GPosTable.ScriptListTable`](#api-7a500a60a6e897cf)
- [`class GPosTable.ScriptTable`](#api-31ea8d19c8a3a9ff)
- [`class GlyfTable`](#api-96558790fd88f24e)
- [`readonly record struct GlyfTable.Subset`](#api-6f0f35a9e41a89dc)
- [`readonly record struct GlyphPosition`](#api-d7fca7cbb084d170)
- [`ref struct GlyphShape`](#api-f63efb2182d1666f)
- [`struct GlyphShape.GlyphBound`](#api-7b2426688a46462c)
- [`class HeaderTable`](#api-f311aee089f7c09b)
- [`class HorizontalHeaderTable`](#api-6284e6732b57733d)
- [`class HorizontalMetricsTable`](#api-71aefecfcd68db52)
- [`record struct HorizontalMetricsTable.HorizontalMetric`](#api-4151db920fde8f3c)
- [`class KernTable`](#api-43273dfe32de332a)
- [`readonly record struct KernTable.Pair`](#api-8b3689a982e7e5ea)
- [`class LocaTable`](#api-716a9fad08169f30)
- [`class MaxProfileTable`](#api-fdbe486fa370b04d)
- [`class NameTable`](#api-80c6652bb529eb5b)
- [`record struct NameTable.NameRecord`](#api-62b2d4f91c839a92)
- [`class OS2Table`](#api-013cea2decf8d302)
- [`class PostTable`](#api-99fbb06080b8552d)
- [`readonly record struct TableRecord`](#api-27a1601c9dae9c60)
- [`class TextLayout`](#api-d447fc3473cebf3d)
- [`readonly record struct TextLayout.GlyphPosition`](#api-69012e93bebd66c3)
- [`class TrueTypeFont`](#api-51696e9bb48cbf23)
- [`readonly struct TrueTypeFont.KerningQuery`](#api-5974714c4d423963)
- [`readonly record struct TrueTypeFont.TableRecord`](#api-59a2cd211b985173)
- [`record struct TrueTypeFont.ValueRecord`](#api-3d73c799c0444ba4)
- [`record struct TrueTypeFont.ValueRecordTuple`](#api-bef92f806b7f707e)
- [`class TrueTypeFontSubset`](#api-d51c131690d62566)

<a id="api-7499f01b4257efd4"></a>

## `class CMapTable`



```csharp
public class CMapTable
{
    public CMapTable(ReadOnlySpan<byte> data);
    public int? GetGlyphIndex(int unicode);
    public int? GetGlyphIndex(Rune rune);
    public static byte[] CreateSubset(IReadOnlyList<GlyphMapping> mappings);
    public readonly record struct GlyphMapping(Rune Character, ushort GlyphId);
}
```

<a id="api-74b1fe3896ccb13f"></a>

### [`CMapTable.CMapTable(ReadOnlySpan<byte> data)`](#api-74b1fe3896ccb13f)


```csharp
public CMapTable(ReadOnlySpan<byte> data);
```



<a id="api-2d5ac0825e96ccf9"></a>

### [`byte[] CMapTable.CreateSubset(IReadOnlyList<GlyphMapping> mappings)`](#api-2d5ac0825e96ccf9)


```csharp
public static byte[] CreateSubset(IReadOnlyList<GlyphMapping> mappings);
```

Creates a Windows Unicode cmap for the retained Unicode scalar values.

<a id="api-beb6eb83917ed7df"></a>

### [`int? CMapTable.GetGlyphIndex(int unicode)`](#api-beb6eb83917ed7df)


```csharp
public int? GetGlyphIndex(int unicode);
```



<a id="api-c431222e974ac838"></a>

### [`int? CMapTable.GetGlyphIndex(Rune rune)`](#api-c431222e974ac838)


```csharp
public int? GetGlyphIndex(Rune rune);
```




<a id="api-32bc95ab08ce0258"></a>

## `readonly record struct CMapTable.GlyphMapping`



```csharp
public readonly record struct GlyphMapping(Rune Character, ushort GlyphId);
```

<a id="api-09a3ab2ddfa1d777"></a>

### [`GlyphMapping.GlyphMapping(Rune Character, ushort GlyphId)`](#api-09a3ab2ddfa1d777)


```csharp
public GlyphMapping(Rune Character, ushort GlyphId);
```



<a id="api-b4ed224987c565f4"></a>

### [`Rune GlyphMapping.Character`](#api-b4ed224987c565f4)


```csharp
public Rune Character { get; init; }
```



<a id="api-3938283b4eb22fe1"></a>

### [`ushort GlyphMapping.GlyphId`](#api-3938283b4eb22fe1)


```csharp
public ushort GlyphId { get; init; }
```




<a id="api-bc5d7341b8b0b25d"></a>

## `class Catalog`



```csharp
public class Catalog
{
    public Catalog(params IEnumerable<Uri>[] sources);
    public Catalog(IFontSource fontSource);
    public virtual IEnumerable<Uri> Fonts();
    public virtual ReadOnlyMemory<byte> LoadFromUri(Uri uri);
    public static ReadOnlyMemory<byte> LoadEmbedded(Uri uri);
    public IEnumerable<Uri> AStar(FontFace font);
    public TextMetrics MeasureText(in Core.Canvas.Font font, string text, TextAlign textAlign = TextAlign.Left, TextBaseline textBaseline = TextBaseline.Alphabetic);
    public TrueTypeFont? FontForFace(in FontFace face);
}
```

<a id="api-604bc1662489f404"></a>

### [`Catalog.Catalog(params IEnumerable<Uri>[] sources)`](#api-604bc1662489f404)


```csharp
public Catalog(params IEnumerable<Uri>[] sources);
```



<a id="api-4a932ce59fee7e18"></a>

### [`Catalog.Catalog(IFontSource fontSource)`](#api-4a932ce59fee7e18)


```csharp
public Catalog(IFontSource fontSource);
```

Creates a catalog backed by descriptor-first, lazily loaded font resources.

<a id="api-556281ca16691382"></a>

### [`IEnumerable<Uri> Catalog.AStar(FontFace font)`](#api-556281ca16691382)


```csharp
public IEnumerable<Uri> AStar(FontFace font);
```



<a id="api-dbf07120a259d962"></a>

### [`TrueTypeFont? Catalog.FontForFace(in FontFace face)`](#api-dbf07120a259d962)


```csharp
public TrueTypeFont? FontForFace(in FontFace face);
```



<a id="api-d25fd59d440e8a05"></a>

### [`IEnumerable<Uri> Catalog.Fonts()`](#api-d25fd59d440e8a05)


```csharp
public virtual IEnumerable<Uri> Fonts();
```



<a id="api-ea57ff3b4e54f694"></a>

### [`ReadOnlyMemory<byte> Catalog.LoadEmbedded(Uri uri)`](#api-ea57ff3b4e54f694)


```csharp
public static ReadOnlyMemory<byte> LoadEmbedded(Uri uri);
```

Loads embedded font data from a URI in the format: embedded://Assembly.Name/Folder/File.ttf

- **`uri`** — The embedded URI, e.g. embedded://Xui.Core.Fonts/Inter/Inter-Bold.ttf

**Returns:** A byte array containing the font file contents.

**Throws** `Thrown when the resource or assembly cannot be found.`: Thrown when the resource or assembly cannot be found.

<a id="api-b045ac0479427659"></a>

### [`ReadOnlyMemory<byte> Catalog.LoadFromUri(Uri uri)`](#api-b045ac0479427659)


```csharp
public virtual ReadOnlyMemory<byte> LoadFromUri(Uri uri);
```



<a id="api-8c8f2e965e2fb503"></a>

### [`TextMetrics Catalog.MeasureText(in Font font, string text, TextAlign textAlign = TextAlign.Left, TextBaseline textBaseline = TextBaseline.Alphabetic)`](#api-8c8f2e965e2fb503)


```csharp
public TextMetrics MeasureText(in Core.Canvas.Font font, string text, TextAlign textAlign = TextAlign.Left, TextBaseline textBaseline = TextBaseline.Alphabetic);
```




<a id="api-e38bb7473b7439f8"></a>

## `readonly struct FontFace`



```csharp
public readonly struct FontFace
{
    public static readonly IEqualityComparer<FontFace> Comparer;
    public string Family { get; }
    public FontWeight Weight { get; }
    public FontStyle Style { get; }
    public FontStretch Stretch { get; }

    public FontFace(string family, FontWeight weight, FontStyle style, FontStretch stretch);
}
```

<a id="api-bf4435316384dc3f"></a>

### [`FontFace.FontFace(string family, FontWeight weight, FontStyle style, FontStretch stretch)`](#api-bf4435316384dc3f)


```csharp
public FontFace(string family, FontWeight weight, FontStyle style, FontStretch stretch);
```



<a id="api-4e3a48bdfff06e2f"></a>

### [`IEqualityComparer<FontFace> FontFace.Comparer`](#api-4e3a48bdfff06e2f)


```csharp
public static readonly IEqualityComparer<FontFace> Comparer;
```

A struct comparer for [`Xui.Runtime.Software.Font.FontFace`](../xui-runtime-software-font/index.md#api-e38bb7473b7439f8) that avoids boxing and uses case-insensitive family comparison.

<a id="api-4be53265f7ad4c28"></a>

### [`string FontFace.Family`](#api-4be53265f7ad4c28)


```csharp
public string Family { get; }
```



<a id="api-f2059806d303ff4e"></a>

### [`FontStretch FontFace.Stretch`](#api-f2059806d303ff4e)


```csharp
public FontStretch Stretch { get; }
```



<a id="api-02804442f0e67d20"></a>

### [`FontStyle FontFace.Style`](#api-02804442f0e67d20)


```csharp
public FontStyle Style { get; }
```



<a id="api-392fe05e19f18de9"></a>

### [`FontWeight FontFace.Weight`](#api-392fe05e19f18de9)


```csharp
public FontWeight Weight { get; }
```




<a id="api-eac93ff10f4a2f75"></a>

## `class FontUsage`

The characters and adjacent character pairs rendered with one font face.

This deliberately records source characters rather than only glyph IDs. A compact font needs a cmap for the SVG text, while pairs allow the subsetter to retain the kerning actually used. Complex OpenType shaping is outside the first subset format and will add richer usage records.

```csharp
public sealed class FontUsage
{
    public IReadOnlySet<Rune> Characters { get; }
    public IReadOnlySet<RunePair> Pairs { get; }

    public void Add(string text);
    public readonly record struct RunePair(Rune Left, Rune Right);
}
```

<a id="api-3e109ed31c010c74"></a>

### [`void FontUsage.Add(string text)`](#api-3e109ed31c010c74)


```csharp
public void Add(string text);
```



<a id="api-71232c999b5ca7a0"></a>

### [`IReadOnlySet<Rune> FontUsage.Characters`](#api-71232c999b5ca7a0)


```csharp
public IReadOnlySet<Rune> Characters { get; }
```



<a id="api-9a0e286497335d89"></a>

### [`IReadOnlySet<RunePair> FontUsage.Pairs`](#api-9a0e286497335d89)


```csharp
public IReadOnlySet<RunePair> Pairs { get; }
```




<a id="api-31149dacaf80e852"></a>

## `readonly record struct FontUsage.RunePair`



```csharp
public readonly record struct RunePair(Rune Left, Rune Right);
```

<a id="api-7db4c297e55e77fe"></a>

### [`RunePair.RunePair(Rune Left, Rune Right)`](#api-7db4c297e55e77fe)


```csharp
public RunePair(Rune Left, Rune Right);
```



<a id="api-d8f4ea368d3629f9"></a>

### [`Rune RunePair.Left`](#api-d8f4ea368d3629f9)


```csharp
public Rune Left { get; init; }
```



<a id="api-27f4e1e6d81cdee5"></a>

### [`Rune RunePair.Right`](#api-27f4e1e6d81cdee5)


```csharp
public Rune Right { get; init; }
```




<a id="api-a129188e24b3ace3"></a>

## `class GPosTable`

Parses the &#39;GPOS&#39; (Glyph Positioning) table from an OpenType font. This table handles kerning, mark positioning, and other glyph adjustments.

```csharp
public sealed partial class GPosTable
{
    public abstract partial class ClassDefTable
    {
        public sealed class Format1 : ClassDefTable
        {
            public Format1(ReadOnlySpan<byte> span);
            public override ushort this[ushort glyphId] { get; }
        }
    }
}
public sealed partial class GPosTable
{
    public abstract partial class ClassDefTable
    {
        public sealed class Format2 : ClassDefTable
        {
            public Format2(ReadOnlySpan<byte> span);
            public override ushort this[ushort glyphId] { get; }
        }
    }
}
public sealed partial class GPosTable
{
    public abstract partial class ClassDefTable
    {
        public static ClassDefTable Parse(ReadOnlySpan<byte> span);
        public abstract ushort this[ushort glyphId] { get; }
    }
}
public sealed partial class GPosTable
{
    public abstract partial class CoverageTable : IReadOnlyDictionary<ushort, int>
    {
        public sealed class Format1 : CoverageTable
        {
            public Format1(ReadOnlySpan<byte> span);
            public override int Count { get; }
            public override IEnumerable<ushort> Keys { get; }
            public override IEnumerable<int> Values { get; }

            public override bool ContainsKey(ushort key);
            public override bool TryGetValue(ushort key, out int value);
            public override int this[ushort key] { get; }

            public override IEnumerator<KeyValuePair<ushort, int>> GetEnumerator();
        }
    }
}
public sealed partial class GPosTable
{
    public abstract partial class CoverageTable : IReadOnlyDictionary<ushort, int>
    {
        public sealed class Format2 : CoverageTable
        {
            public Format2(ReadOnlySpan<byte> span);
            public override int Count { get; }
            public override IEnumerable<ushort> Keys { get; }
            public override IEnumerable<int> Values { get; }

            public override bool ContainsKey(ushort key);
            public override bool TryGetValue(ushort key, out int value);
            public override int this[ushort key] { get; }

            public override IEnumerator<KeyValuePair<ushort, int>> GetEnumerator();
        }
    }
}
public sealed partial class GPosTable
{
    public abstract partial class CoverageTable : IReadOnlyDictionary<ushort, int>
    {
        public static CoverageTable Parse(ReadOnlySpan<byte> span);
        public abstract int Count { get; }
        public abstract IEnumerable<ushort> Keys { get; }
        public abstract IEnumerable<int> Values { get; }

        public abstract bool ContainsKey(ushort key);
        public abstract bool TryGetValue(ushort key, out int value);
        public abstract int this[ushort key] { get; }

        public abstract IEnumerator<KeyValuePair<ushort, int>> GetEnumerator();
    }
}
public sealed partial class GPosTable
{
    public sealed class ExtensionPositioningSubtable
    {
        public GPosLookupType ExtensionLookupType { get; }
        public PairAdjustmentSubtable? WrappedPairSubtable { get; }

        public ExtensionPositioningSubtable(ReadOnlySpan<byte> span);
        public TrueTypeFont.ValueRecordTuple this[ushort leftGlyph, ushort rightGlyph] { get; }
    }
}
public sealed partial class GPosTable
{
    public sealed class FeatureListTable : IReadOnlyDictionary<string, FeatureTable>
    {
        public FeatureListTable(ReadOnlySpan<byte> span);
        public FeatureTable this[string key] { get; }

        public IEnumerable<string> Keys { get; }
        public IEnumerable<FeatureTable> Values { get; }
        public int Count { get; }

        public bool ContainsKey(string key);
        public bool TryGetValue(string key, out FeatureTable value);
        public IEnumerator<KeyValuePair<string, FeatureTable>> GetEnumerator();
    }

    public sealed class FeatureTable
    {
        public List<ushort> LookupIndices { get; }

        public FeatureTable(ReadOnlySpan<byte> span);
    }
}
public sealed partial class GPosTable
{
    public sealed class LookupListTable : IReadOnlyList<LookupTable>
    {
        public LookupListTable(ReadOnlySpan<byte> span);
        public LookupTable this[int index] { get; }

        public int Count { get; }

        public IEnumerator<LookupTable> GetEnumerator();
    }

    public sealed class LookupTable
    {
        public GPosLookupType LookupType { get; }
        public ushort LookupFlag { get; }
        public List<ushort> SubTableOffsets { get; }
        public List<PairAdjustmentSubtable>? PairAdjustmentSubtables { get; }
        public List<ExtensionPositioningSubtable>? ExtensionPositioningSubtables { get; }

        public LookupTable(ReadOnlySpan<byte> span);
        public TrueTypeFont.ValueRecordTuple this[ushort leftGlyph, ushort rightGlyph] { get; }

        public enum GPosLookupType : ushort
        {
            SingleAdjustment = 1,
            PairAdjustment = 2,
            CursiveAttachment = 3,
            MarkToBase = 4,
            MarkToLigature = 5,
            MarkToMark = 6,
            ContextPositioning = 7,
            ChainedContextPositioning = 8,
            ExtensionPositioning = 9
        }
    }
}
public sealed partial class GPosTable
{
    public abstract partial class PairAdjustmentSubtable
    {
        public class Format1 : PairAdjustmentSubtable
        {
            public ushort ValueFormat1 { get; }
            public ushort ValueFormat2 { get; }
            public List<PairSet> PairSets { get; }
            public CoverageTable Coverage { get; }

            public Format1(ReadOnlySpan<byte> span);
            public sealed record PairSet(List<PairValueRecord> Pairs);
            public sealed record PairValueRecord(ushort SecondGlyphID, TrueTypeFont.ValueRecord Value1, TrueTypeFont.ValueRecord Value2);
            public override TrueTypeFont.ValueRecordTuple this[ushort leftGlyph, ushort rightGlyph] { get; }
        }
    }
}
public sealed partial class GPosTable
{
    public abstract partial class PairAdjustmentSubtable
    {
        public sealed class Format2 : PairAdjustmentSubtable
        {
            public ushort ValueFormat1 { get; }
            public ushort ValueFormat2 { get; }
            public ClassDefTable ClassDef1 { get; }
            public ClassDefTable ClassDef2 { get; }
            public PairValueRecord[, ] Matrix { get; }
            public CoverageTable Coverage { get; }
            public ushort Class1Count { get; }
            public ushort Class2Count { get; }

            public Format2(ReadOnlySpan<byte> span);
            public sealed record PairValueRecord(TrueTypeFont.ValueRecord Value1, TrueTypeFont.ValueRecord Value2);
            public override TrueTypeFont.ValueRecordTuple this[ushort leftGlyph, ushort rightGlyph] { get; }
        }
    }
}
public sealed partial class GPosTable
{
    public abstract partial class PairAdjustmentSubtable
    {
        public static PairAdjustmentSubtable Parse(ReadOnlySpan<byte> span);
        public abstract TrueTypeFont.ValueRecordTuple this[ushort leftGlyph, ushort rightGlyph] { get; }
    }
}
public sealed partial class GPosTable
{
    public sealed class ScriptListTable : IReadOnlyDictionary<string, ScriptTable>
    {
        public ScriptListTable(ReadOnlySpan<byte> span);
        public ScriptTable this[string key] { get; }

        public IEnumerable<string> Keys { get; }
        public IEnumerable<ScriptTable> Values { get; }
        public int Count { get; }

        public bool ContainsKey(string key);
        public bool TryGetValue(string key, out ScriptTable value);
        public IEnumerator<KeyValuePair<string, ScriptTable>> GetEnumerator();
    }

    public sealed class ScriptTable : IReadOnlyDictionary<string, LangSysTable>
    {
        public ScriptTable(ReadOnlySpan<byte> span);
        public LangSysTable this[string key] { get; }

        public IEnumerable<string> Keys { get; }
        public IEnumerable<LangSysTable> Values { get; }
        public int Count { get; }

        public bool ContainsKey(string key);
        public bool TryGetValue(string key, out LangSysTable value);
        public IEnumerator<KeyValuePair<string, LangSysTable>> GetEnumerator();
    }

    public sealed class LangSysTable
    {
        public ushort RequiredFeatureIndex { get; }
        public List<ushort> FeatureIndices { get; }

        public LangSysTable(ReadOnlySpan<byte> span);
    }
}
public sealed partial class GPosTable
{
    public ushort MajorVersion { get; }
    public ushort MinorVersion { get; }
    public ushort ScriptListOffset { get; }
    public ushort FeatureListOffset { get; }
    public ushort LookupListOffset { get; }
    public uint? FeatureVariationsOffset { get; }
    public ScriptListTable? ScriptList { get; }
    public FeatureListTable? FeatureList { get; }
    public LookupListTable? LookupList { get; }
    public CMapTable CMap { get; }

    public GPosTable(ReadOnlySpan<byte> span, CMapTable cMap);
    public TrueTypeFont.ValueRecord this[Rune left, Rune right] { get; }
}
```

<a id="api-eaf4001b95d45673"></a>

### [`GPosTable.GPosTable(ReadOnlySpan<byte> span, CMapTable cMap)`](#api-eaf4001b95d45673)


```csharp
public GPosTable(ReadOnlySpan<byte> span, CMapTable cMap);
```



<a id="api-f531d0e2d43bd3d9"></a>

### [`CMapTable GPosTable.CMap`](#api-f531d0e2d43bd3d9)


```csharp
public CMapTable CMap { get; }
```



<a id="api-6dd6a7576895cfac"></a>

### [`FeatureListTable? GPosTable.FeatureList`](#api-6dd6a7576895cfac)


```csharp
public FeatureListTable? FeatureList { get; }
```



<a id="api-bf241ca6a567fe72"></a>

### [`ushort GPosTable.FeatureListOffset`](#api-bf241ca6a567fe72)


```csharp
public ushort FeatureListOffset { get; }
```



<a id="api-5262e70e803deeed"></a>

### [`uint? GPosTable.FeatureVariationsOffset`](#api-5262e70e803deeed)


```csharp
public uint? FeatureVariationsOffset { get; }
```



<a id="api-706c6ba292899637"></a>

### [`ValueRecord GPosTable.this[Rune left, Rune right]`](#api-706c6ba292899637)


```csharp
public TrueTypeFont.ValueRecord this[Rune left, Rune right] { get; }
```

Gets the kerning adjustment between two characters using GPOS LookupType 2 or ExtensionPositioning. Returns a default ValueRecord if no adjustment is defined.

<a id="api-97492684d18858b0"></a>

### [`LookupListTable? GPosTable.LookupList`](#api-97492684d18858b0)


```csharp
public LookupListTable? LookupList { get; }
```



<a id="api-282c020678930042"></a>

### [`ushort GPosTable.LookupListOffset`](#api-282c020678930042)


```csharp
public ushort LookupListOffset { get; }
```



<a id="api-67642467f6443ae7"></a>

### [`ushort GPosTable.MajorVersion`](#api-67642467f6443ae7)


```csharp
public ushort MajorVersion { get; }
```



<a id="api-3c61a628e3de9cb7"></a>

### [`ushort GPosTable.MinorVersion`](#api-3c61a628e3de9cb7)


```csharp
public ushort MinorVersion { get; }
```



<a id="api-f41ea618db415828"></a>

### [`ScriptListTable? GPosTable.ScriptList`](#api-f41ea618db415828)


```csharp
public ScriptListTable? ScriptList { get; }
```



<a id="api-646aa18384c5f615"></a>

### [`ushort GPosTable.ScriptListOffset`](#api-646aa18384c5f615)


```csharp
public ushort ScriptListOffset { get; }
```




<a id="api-28c161eb312c4962"></a>

## `class GPosTable.ClassDefTable`



```csharp
public abstract partial class ClassDefTable
{
    public sealed class Format1 : ClassDefTable
    {
        public Format1(ReadOnlySpan<byte> span);
        public override ushort this[ushort glyphId] { get; }
    }
}
public abstract partial class ClassDefTable
{
    public sealed class Format2 : ClassDefTable
    {
        public Format2(ReadOnlySpan<byte> span);
        public override ushort this[ushort glyphId] { get; }
    }
}
public abstract partial class ClassDefTable
{
    public static ClassDefTable Parse(ReadOnlySpan<byte> span);
    public abstract ushort this[ushort glyphId] { get; }
}
```

<a id="api-db17c8aaeb8726cf"></a>

### [`ushort ClassDefTable.this[ushort glyphId]`](#api-db17c8aaeb8726cf)


```csharp
public abstract ushort this[ushort glyphId] { get; }
```



<a id="api-33783b908a3a11c9"></a>

### [`ClassDefTable ClassDefTable.Parse(ReadOnlySpan<byte> span)`](#api-33783b908a3a11c9)


```csharp
public static ClassDefTable Parse(ReadOnlySpan<byte> span);
```

Parses a ClassDefTable (Format 1 or 2).


<a id="api-f872a9ae37740f35"></a>

## `class GPosTable.ClassDefTable.Format1`



```csharp
public sealed class Format1 : ClassDefTable
{
    public Format1(ReadOnlySpan<byte> span);
    public override ushort this[ushort glyphId] { get; }
}
```

<a id="api-95384888cb24629f"></a>

### [`Format1.Format1(ReadOnlySpan<byte> span)`](#api-95384888cb24629f)


```csharp
public Format1(ReadOnlySpan<byte> span);
```



<a id="api-83c93ce25c06b067"></a>

### [`ushort Format1.this[ushort glyphId]`](#api-83c93ce25c06b067)


```csharp
public override ushort this[ushort glyphId] { get; }
```

Returns the class ID for the given glyph ID. If the glyph is not in the defined range, returns 0 (default class).


<a id="api-af156830e53d8e99"></a>

## `class GPosTable.ClassDefTable.Format2`



```csharp
public sealed class Format2 : ClassDefTable
{
    public Format2(ReadOnlySpan<byte> span);
    public override ushort this[ushort glyphId] { get; }
}
```

<a id="api-d7af3d4781c8c6b5"></a>

### [`Format2.Format2(ReadOnlySpan<byte> span)`](#api-d7af3d4781c8c6b5)


```csharp
public Format2(ReadOnlySpan<byte> span);
```



<a id="api-d910ce1d95d7d796"></a>

### [`ushort Format2.this[ushort glyphId]`](#api-d910ce1d95d7d796)


```csharp
public override ushort this[ushort glyphId] { get; }
```




<a id="api-a02d09bd502e9295"></a>

## `class GPosTable.CoverageTable`

Represents a GPOS Coverage Table used in subtables to identify glyphs affected.

Represents a GPOS Coverage Table used in subtables to identify glyphs affected.

```csharp
public abstract partial class CoverageTable : IReadOnlyDictionary<ushort, int>
{
    public sealed class Format1 : CoverageTable
    {
        public Format1(ReadOnlySpan<byte> span);
        public override int Count { get; }
        public override IEnumerable<ushort> Keys { get; }
        public override IEnumerable<int> Values { get; }

        public override bool ContainsKey(ushort key);
        public override bool TryGetValue(ushort key, out int value);
        public override int this[ushort key] { get; }

        public override IEnumerator<KeyValuePair<ushort, int>> GetEnumerator();
    }
}
public abstract partial class CoverageTable : IReadOnlyDictionary<ushort, int>
{
    public sealed class Format2 : CoverageTable
    {
        public Format2(ReadOnlySpan<byte> span);
        public override int Count { get; }
        public override IEnumerable<ushort> Keys { get; }
        public override IEnumerable<int> Values { get; }

        public override bool ContainsKey(ushort key);
        public override bool TryGetValue(ushort key, out int value);
        public override int this[ushort key] { get; }

        public override IEnumerator<KeyValuePair<ushort, int>> GetEnumerator();
    }
}
public abstract partial class CoverageTable : IReadOnlyDictionary<ushort, int>
{
    public static CoverageTable Parse(ReadOnlySpan<byte> span);
    public abstract int Count { get; }
    public abstract IEnumerable<ushort> Keys { get; }
    public abstract IEnumerable<int> Values { get; }

    public abstract bool ContainsKey(ushort key);
    public abstract bool TryGetValue(ushort key, out int value);
    public abstract int this[ushort key] { get; }

    public abstract IEnumerator<KeyValuePair<ushort, int>> GetEnumerator();
}
```

<a id="api-dc987d10e2d14b76"></a>

### [`bool CoverageTable.ContainsKey(ushort key)`](#api-dc987d10e2d14b76)


```csharp
public abstract bool ContainsKey(ushort key);
```



<a id="api-7624bdc1b32446ad"></a>

### [`int CoverageTable.Count`](#api-7624bdc1b32446ad)


```csharp
public abstract int Count { get; }
```



<a id="api-960ba34164ef775c"></a>

### [`IEnumerator<KeyValuePair<ushort, int>> CoverageTable.GetEnumerator()`](#api-960ba34164ef775c)


```csharp
public abstract IEnumerator<KeyValuePair<ushort, int>> GetEnumerator();
```



<a id="api-e8b32220b7e54c04"></a>

### [`int CoverageTable.this[ushort key]`](#api-e8b32220b7e54c04)


```csharp
public abstract int this[ushort key] { get; }
```



<a id="api-9cca9579b9ffa5e7"></a>

### [`IEnumerable<ushort> CoverageTable.Keys`](#api-9cca9579b9ffa5e7)


```csharp
public abstract IEnumerable<ushort> Keys { get; }
```



<a id="api-74023034937bee2e"></a>

### [`CoverageTable CoverageTable.Parse(ReadOnlySpan<byte> span)`](#api-74023034937bee2e)


```csharp
public static CoverageTable Parse(ReadOnlySpan<byte> span);
```



<a id="api-f2bfbec769dfa168"></a>

### [`bool CoverageTable.TryGetValue(ushort key, out int value)`](#api-f2bfbec769dfa168)


```csharp
public abstract bool TryGetValue(ushort key, out int value);
```



<a id="api-2de5a2c7fd19e6a8"></a>

### [`IEnumerable<int> CoverageTable.Values`](#api-2de5a2c7fd19e6a8)


```csharp
public abstract IEnumerable<int> Values { get; }
```




<a id="api-5bbb69b24425931a"></a>

## `class GPosTable.CoverageTable.Format1`



```csharp
public sealed class Format1 : CoverageTable
{
    public Format1(ReadOnlySpan<byte> span);
    public override int Count { get; }
    public override IEnumerable<ushort> Keys { get; }
    public override IEnumerable<int> Values { get; }

    public override bool ContainsKey(ushort key);
    public override bool TryGetValue(ushort key, out int value);
    public override int this[ushort key] { get; }

    public override IEnumerator<KeyValuePair<ushort, int>> GetEnumerator();
}
```

<a id="api-91b3d2548396aea3"></a>

### [`Format1.Format1(ReadOnlySpan<byte> span)`](#api-91b3d2548396aea3)


```csharp
public Format1(ReadOnlySpan<byte> span);
```



<a id="api-fa7ae5c3d8265218"></a>

### [`bool Format1.ContainsKey(ushort key)`](#api-fa7ae5c3d8265218)


```csharp
public override bool ContainsKey(ushort key);
```



<a id="api-52511dc42de8b424"></a>

### [`int Format1.Count`](#api-52511dc42de8b424)


```csharp
public override int Count { get; }
```



<a id="api-e6dee9f68b1071fe"></a>

### [`IEnumerator<KeyValuePair<ushort, int>> Format1.GetEnumerator()`](#api-e6dee9f68b1071fe)


```csharp
public override IEnumerator<KeyValuePair<ushort, int>> GetEnumerator();
```



<a id="api-89912407edd56f24"></a>

### [`int Format1.this[ushort key]`](#api-89912407edd56f24)


```csharp
public override int this[ushort key] { get; }
```



<a id="api-1c5c728e0dcdac81"></a>

### [`IEnumerable<ushort> Format1.Keys`](#api-1c5c728e0dcdac81)


```csharp
public override IEnumerable<ushort> Keys { get; }
```



<a id="api-e7f3fef8c1c6d077"></a>

### [`bool Format1.TryGetValue(ushort key, out int value)`](#api-e7f3fef8c1c6d077)


```csharp
public override bool TryGetValue(ushort key, out int value);
```



<a id="api-fe2b48fb487327e9"></a>

### [`IEnumerable<int> Format1.Values`](#api-fe2b48fb487327e9)


```csharp
public override IEnumerable<int> Values { get; }
```




<a id="api-6ef9ea4c37929fce"></a>

## `class GPosTable.CoverageTable.Format2`



```csharp
public sealed class Format2 : CoverageTable
{
    public Format2(ReadOnlySpan<byte> span);
    public override int Count { get; }
    public override IEnumerable<ushort> Keys { get; }
    public override IEnumerable<int> Values { get; }

    public override bool ContainsKey(ushort key);
    public override bool TryGetValue(ushort key, out int value);
    public override int this[ushort key] { get; }

    public override IEnumerator<KeyValuePair<ushort, int>> GetEnumerator();
}
```

<a id="api-0c3beeda367f8d7b"></a>

### [`Format2.Format2(ReadOnlySpan<byte> span)`](#api-0c3beeda367f8d7b)


```csharp
public Format2(ReadOnlySpan<byte> span);
```



<a id="api-a0a7993b05bb8f21"></a>

### [`bool Format2.ContainsKey(ushort key)`](#api-a0a7993b05bb8f21)


```csharp
public override bool ContainsKey(ushort key);
```



<a id="api-bc1f1b98e6985c83"></a>

### [`int Format2.Count`](#api-bc1f1b98e6985c83)


```csharp
public override int Count { get; }
```



<a id="api-0a6ec138668a3867"></a>

### [`IEnumerator<KeyValuePair<ushort, int>> Format2.GetEnumerator()`](#api-0a6ec138668a3867)


```csharp
public override IEnumerator<KeyValuePair<ushort, int>> GetEnumerator();
```



<a id="api-1c021d68d743618a"></a>

### [`int Format2.this[ushort key]`](#api-1c021d68d743618a)


```csharp
public override int this[ushort key] { get; }
```



<a id="api-aa33940df0c88792"></a>

### [`IEnumerable<ushort> Format2.Keys`](#api-aa33940df0c88792)


```csharp
public override IEnumerable<ushort> Keys { get; }
```



<a id="api-1d04ff9fd6938740"></a>

### [`bool Format2.TryGetValue(ushort key, out int value)`](#api-1d04ff9fd6938740)


```csharp
public override bool TryGetValue(ushort key, out int value);
```



<a id="api-e30a215df1126c85"></a>

### [`IEnumerable<int> Format2.Values`](#api-e30a215df1126c85)


```csharp
public override IEnumerable<int> Values { get; }
```




<a id="api-2777d40036954bba"></a>

## `class GPosTable.ExtensionPositioningSubtable`



```csharp
public sealed class ExtensionPositioningSubtable
{
    public GPosLookupType ExtensionLookupType { get; }
    public PairAdjustmentSubtable? WrappedPairSubtable { get; }

    public ExtensionPositioningSubtable(ReadOnlySpan<byte> span);
    public TrueTypeFont.ValueRecordTuple this[ushort leftGlyph, ushort rightGlyph] { get; }
}
```

<a id="api-d5b11b17e9b0b32c"></a>

### [`ExtensionPositioningSubtable.ExtensionPositioningSubtable(ReadOnlySpan<byte> span)`](#api-d5b11b17e9b0b32c)


```csharp
public ExtensionPositioningSubtable(ReadOnlySpan<byte> span);
```



<a id="api-c169a104dc3f7ec1"></a>

### [`GPosLookupType ExtensionPositioningSubtable.ExtensionLookupType`](#api-c169a104dc3f7ec1)


```csharp
public GPosLookupType ExtensionLookupType { get; }
```



<a id="api-d1a96e6886ff1d05"></a>

### [`ValueRecordTuple ExtensionPositioningSubtable.this[ushort leftGlyph, ushort rightGlyph]`](#api-d1a96e6886ff1d05)


```csharp
public TrueTypeFont.ValueRecordTuple this[ushort leftGlyph, ushort rightGlyph] { get; }
```



<a id="api-f0e983b8dd2a382a"></a>

### [`PairAdjustmentSubtable? ExtensionPositioningSubtable.WrappedPairSubtable`](#api-f0e983b8dd2a382a)


```csharp
public PairAdjustmentSubtable? WrappedPairSubtable { get; }
```




<a id="api-655e923eee8271b1"></a>

## `class GPosTable.FeatureListTable`



```csharp
public sealed class FeatureListTable : IReadOnlyDictionary<string, FeatureTable>
{
    public FeatureListTable(ReadOnlySpan<byte> span);
    public FeatureTable this[string key] { get; }

    public IEnumerable<string> Keys { get; }
    public IEnumerable<FeatureTable> Values { get; }
    public int Count { get; }

    public bool ContainsKey(string key);
    public bool TryGetValue(string key, out FeatureTable value);
    public IEnumerator<KeyValuePair<string, FeatureTable>> GetEnumerator();
}
```

<a id="api-2573606e550bfc1b"></a>

### [`FeatureListTable.FeatureListTable(ReadOnlySpan<byte> span)`](#api-2573606e550bfc1b)


```csharp
public FeatureListTable(ReadOnlySpan<byte> span);
```



<a id="api-15ed21c3d010773d"></a>

### [`bool FeatureListTable.ContainsKey(string key)`](#api-15ed21c3d010773d)


```csharp
public bool ContainsKey(string key);
```



<a id="api-8279cd30b629e9fc"></a>

### [`int FeatureListTable.Count`](#api-8279cd30b629e9fc)


```csharp
public int Count { get; }
```



<a id="api-525330803faa2e64"></a>

### [`IEnumerator<KeyValuePair<string, FeatureTable>> FeatureListTable.GetEnumerator()`](#api-525330803faa2e64)


```csharp
public IEnumerator<KeyValuePair<string, FeatureTable>> GetEnumerator();
```



<a id="api-63968a4d5c2ea93d"></a>

### [`FeatureTable FeatureListTable.this[string key]`](#api-63968a4d5c2ea93d)


```csharp
public FeatureTable this[string key] { get; }
```



<a id="api-c719345e9c75cb80"></a>

### [`IEnumerable<string> FeatureListTable.Keys`](#api-c719345e9c75cb80)


```csharp
public IEnumerable<string> Keys { get; }
```



<a id="api-822c541e95e81545"></a>

### [`bool FeatureListTable.TryGetValue(string key, out FeatureTable value)`](#api-822c541e95e81545)


```csharp
public bool TryGetValue(string key, out FeatureTable value);
```



<a id="api-845d2f1e4d13eb5b"></a>

### [`IEnumerable<FeatureTable> FeatureListTable.Values`](#api-845d2f1e4d13eb5b)


```csharp
public IEnumerable<FeatureTable> Values { get; }
```




<a id="api-f064682b789b0d6f"></a>

## `class GPosTable.FeatureTable`



```csharp
public sealed class FeatureTable
{
    public List<ushort> LookupIndices { get; }

    public FeatureTable(ReadOnlySpan<byte> span);
}
```

<a id="api-af85532400e0f2f1"></a>

### [`FeatureTable.FeatureTable(ReadOnlySpan<byte> span)`](#api-af85532400e0f2f1)


```csharp
public FeatureTable(ReadOnlySpan<byte> span);
```



<a id="api-b04d3f841813440c"></a>

### [`List<ushort> FeatureTable.LookupIndices`](#api-b04d3f841813440c)


```csharp
public List<ushort> LookupIndices { get; }
```




<a id="api-2c105285e67e2cac"></a>

## `class GPosTable.LangSysTable`



```csharp
public sealed class LangSysTable
{
    public ushort RequiredFeatureIndex { get; }
    public List<ushort> FeatureIndices { get; }

    public LangSysTable(ReadOnlySpan<byte> span);
}
```

<a id="api-531b9c96ea8772c7"></a>

### [`LangSysTable.LangSysTable(ReadOnlySpan<byte> span)`](#api-531b9c96ea8772c7)


```csharp
public LangSysTable(ReadOnlySpan<byte> span);
```



<a id="api-3de0f493bf85a649"></a>

### [`List<ushort> LangSysTable.FeatureIndices`](#api-3de0f493bf85a649)


```csharp
public List<ushort> FeatureIndices { get; }
```



<a id="api-07b47023fb0fe41a"></a>

### [`ushort LangSysTable.RequiredFeatureIndex`](#api-07b47023fb0fe41a)


```csharp
public ushort RequiredFeatureIndex { get; }
```




<a id="api-425ddbe8f63b1962"></a>

## `class GPosTable.LookupListTable`



```csharp
public sealed class LookupListTable : IReadOnlyList<LookupTable>
{
    public LookupListTable(ReadOnlySpan<byte> span);
    public LookupTable this[int index] { get; }

    public int Count { get; }

    public IEnumerator<LookupTable> GetEnumerator();
}
```

<a id="api-b10a6920f7fd3170"></a>

### [`LookupListTable.LookupListTable(ReadOnlySpan<byte> span)`](#api-b10a6920f7fd3170)


```csharp
public LookupListTable(ReadOnlySpan<byte> span);
```



<a id="api-48c8755c8afa4915"></a>

### [`int LookupListTable.Count`](#api-48c8755c8afa4915)


```csharp
public int Count { get; }
```



<a id="api-95ea0a76b964049b"></a>

### [`IEnumerator<LookupTable> LookupListTable.GetEnumerator()`](#api-95ea0a76b964049b)


```csharp
public IEnumerator<LookupTable> GetEnumerator();
```



<a id="api-69d827369d7ee60a"></a>

### [`LookupTable LookupListTable.this[int index]`](#api-69d827369d7ee60a)


```csharp
public LookupTable this[int index] { get; }
```




<a id="api-301a5b8cf4294ca8"></a>

## `class GPosTable.LookupTable`



```csharp
public sealed class LookupTable
{
    public GPosLookupType LookupType { get; }
    public ushort LookupFlag { get; }
    public List<ushort> SubTableOffsets { get; }
    public List<PairAdjustmentSubtable>? PairAdjustmentSubtables { get; }
    public List<ExtensionPositioningSubtable>? ExtensionPositioningSubtables { get; }

    public LookupTable(ReadOnlySpan<byte> span);
    public TrueTypeFont.ValueRecordTuple this[ushort leftGlyph, ushort rightGlyph] { get; }

    public enum GPosLookupType : ushort
    {
        SingleAdjustment = 1,
        PairAdjustment = 2,
        CursiveAttachment = 3,
        MarkToBase = 4,
        MarkToLigature = 5,
        MarkToMark = 6,
        ContextPositioning = 7,
        ChainedContextPositioning = 8,
        ExtensionPositioning = 9
    }
}
```

<a id="api-4813f88d00dbb06b"></a>

### [`LookupTable.LookupTable(ReadOnlySpan<byte> span)`](#api-4813f88d00dbb06b)


```csharp
public LookupTable(ReadOnlySpan<byte> span);
```



<a id="api-f493d87bf9fbca33"></a>

### [`List<ExtensionPositioningSubtable>? LookupTable.ExtensionPositioningSubtables`](#api-f493d87bf9fbca33)


```csharp
public List<ExtensionPositioningSubtable>? ExtensionPositioningSubtables { get; }
```



<a id="api-c8a42fda5a0b8fc5"></a>

### [`ValueRecordTuple LookupTable.this[ushort leftGlyph, ushort rightGlyph]`](#api-c8a42fda5a0b8fc5)


```csharp
public TrueTypeFont.ValueRecordTuple this[ushort leftGlyph, ushort rightGlyph] { get; }
```



<a id="api-c7733c4f5007110d"></a>

### [`ushort LookupTable.LookupFlag`](#api-c7733c4f5007110d)


```csharp
public ushort LookupFlag { get; }
```



<a id="api-647fbf54bed32d6e"></a>

### [`GPosLookupType LookupTable.LookupType`](#api-647fbf54bed32d6e)


```csharp
public GPosLookupType LookupType { get; }
```



<a id="api-3709b0e6cc4d8dde"></a>

### [`List<PairAdjustmentSubtable>? LookupTable.PairAdjustmentSubtables`](#api-3709b0e6cc4d8dde)


```csharp
public List<PairAdjustmentSubtable>? PairAdjustmentSubtables { get; }
```



<a id="api-49eb692f98daaa09"></a>

### [`List<ushort> LookupTable.SubTableOffsets`](#api-49eb692f98daaa09)


```csharp
public List<ushort> SubTableOffsets { get; }
```




<a id="api-99fa601d449cec38"></a>

## `enum GPosTable.LookupTable.GPosLookupType`



```csharp
public enum GPosLookupType : ushort
{
    SingleAdjustment = 1,
    PairAdjustment = 2,
    CursiveAttachment = 3,
    MarkToBase = 4,
    MarkToLigature = 5,
    MarkToMark = 6,
    ContextPositioning = 7,
    ChainedContextPositioning = 8,
    ExtensionPositioning = 9
}
```

<a id="api-0bcc58c86c715525"></a>

### [`GPosLookupType.ChainedContextPositioning`](#api-0bcc58c86c715525)


```csharp
ChainedContextPositioning = 8
```



<a id="api-62a6280ba4dcbd76"></a>

### [`GPosLookupType.ContextPositioning`](#api-62a6280ba4dcbd76)


```csharp
ContextPositioning = 7
```



<a id="api-f4ec43d2133dcdc5"></a>

### [`GPosLookupType.CursiveAttachment`](#api-f4ec43d2133dcdc5)


```csharp
CursiveAttachment = 3
```



<a id="api-e030166d3ceb3cef"></a>

### [`GPosLookupType.ExtensionPositioning`](#api-e030166d3ceb3cef)


```csharp
ExtensionPositioning = 9
```



<a id="api-c8b635f9abaf60f5"></a>

### [`GPosLookupType.MarkToBase`](#api-c8b635f9abaf60f5)


```csharp
MarkToBase = 4
```



<a id="api-c75a972d51766dc8"></a>

### [`GPosLookupType.MarkToLigature`](#api-c75a972d51766dc8)


```csharp
MarkToLigature = 5
```



<a id="api-4fc1e7079415a9d4"></a>

### [`GPosLookupType.MarkToMark`](#api-4fc1e7079415a9d4)


```csharp
MarkToMark = 6
```



<a id="api-7351a3f53cefc483"></a>

### [`GPosLookupType.PairAdjustment`](#api-7351a3f53cefc483)


```csharp
PairAdjustment = 2
```



<a id="api-49b0eda51052e1d5"></a>

### [`GPosLookupType.SingleAdjustment`](#api-49b0eda51052e1d5)


```csharp
SingleAdjustment = 1
```




<a id="api-10c8b4795888f202"></a>

## `class GPosTable.PairAdjustmentSubtable`



```csharp
public abstract partial class PairAdjustmentSubtable
{
    public class Format1 : PairAdjustmentSubtable
    {
        public ushort ValueFormat1 { get; }
        public ushort ValueFormat2 { get; }
        public List<PairSet> PairSets { get; }
        public CoverageTable Coverage { get; }

        public Format1(ReadOnlySpan<byte> span);
        public sealed record PairSet(List<PairValueRecord> Pairs);
        public sealed record PairValueRecord(ushort SecondGlyphID, TrueTypeFont.ValueRecord Value1, TrueTypeFont.ValueRecord Value2);
        public override TrueTypeFont.ValueRecordTuple this[ushort leftGlyph, ushort rightGlyph] { get; }
    }
}
public abstract partial class PairAdjustmentSubtable
{
    public sealed class Format2 : PairAdjustmentSubtable
    {
        public ushort ValueFormat1 { get; }
        public ushort ValueFormat2 { get; }
        public ClassDefTable ClassDef1 { get; }
        public ClassDefTable ClassDef2 { get; }
        public PairValueRecord[, ] Matrix { get; }
        public CoverageTable Coverage { get; }
        public ushort Class1Count { get; }
        public ushort Class2Count { get; }

        public Format2(ReadOnlySpan<byte> span);
        public sealed record PairValueRecord(TrueTypeFont.ValueRecord Value1, TrueTypeFont.ValueRecord Value2);
        public override TrueTypeFont.ValueRecordTuple this[ushort leftGlyph, ushort rightGlyph] { get; }
    }
}
public abstract partial class PairAdjustmentSubtable
{
    public static PairAdjustmentSubtable Parse(ReadOnlySpan<byte> span);
    public abstract TrueTypeFont.ValueRecordTuple this[ushort leftGlyph, ushort rightGlyph] { get; }
}
```

<a id="api-1b734433342ec0c6"></a>

### [`ValueRecordTuple PairAdjustmentSubtable.this[ushort leftGlyph, ushort rightGlyph]`](#api-1b734433342ec0c6)


```csharp
public abstract TrueTypeFont.ValueRecordTuple this[ushort leftGlyph, ushort rightGlyph] { get; }
```



<a id="api-bc48e354512a8c21"></a>

### [`PairAdjustmentSubtable PairAdjustmentSubtable.Parse(ReadOnlySpan<byte> span)`](#api-bc48e354512a8c21)


```csharp
public static PairAdjustmentSubtable Parse(ReadOnlySpan<byte> span);
```




<a id="api-3908eb90e0147a25"></a>

## `class GPosTable.PairAdjustmentSubtable.Format1`



```csharp
public class Format1 : PairAdjustmentSubtable
{
    public ushort ValueFormat1 { get; }
    public ushort ValueFormat2 { get; }
    public List<PairSet> PairSets { get; }
    public CoverageTable Coverage { get; }

    public Format1(ReadOnlySpan<byte> span);
    public sealed record PairSet(List<PairValueRecord> Pairs);
    public sealed record PairValueRecord(ushort SecondGlyphID, TrueTypeFont.ValueRecord Value1, TrueTypeFont.ValueRecord Value2);
    public override TrueTypeFont.ValueRecordTuple this[ushort leftGlyph, ushort rightGlyph] { get; }
}
```

<a id="api-5cf7a2b4d62c96f3"></a>

### [`Format1.Format1(ReadOnlySpan<byte> span)`](#api-5cf7a2b4d62c96f3)


```csharp
public Format1(ReadOnlySpan<byte> span);
```



<a id="api-7df01b859ee3be6a"></a>

### [`CoverageTable Format1.Coverage`](#api-7df01b859ee3be6a)


```csharp
public CoverageTable Coverage { get; }
```



<a id="api-adb5d9175058a7a0"></a>

### [`ValueRecordTuple Format1.this[ushort leftGlyph, ushort rightGlyph]`](#api-adb5d9175058a7a0)


```csharp
public override TrueTypeFont.ValueRecordTuple this[ushort leftGlyph, ushort rightGlyph] { get; }
```



<a id="api-8120c4d66de6ff3d"></a>

### [`List<PairSet> Format1.PairSets`](#api-8120c4d66de6ff3d)


```csharp
public List<PairSet> PairSets { get; }
```



<a id="api-4005a007b378d4e7"></a>

### [`ushort Format1.ValueFormat1`](#api-4005a007b378d4e7)


```csharp
public ushort ValueFormat1 { get; }
```



<a id="api-ed93021fa02c705f"></a>

### [`ushort Format1.ValueFormat2`](#api-ed93021fa02c705f)


```csharp
public ushort ValueFormat2 { get; }
```




<a id="api-ce81cc4ead28d105"></a>

## `record class GPosTable.PairAdjustmentSubtable.Format1.PairSet`



```csharp
public sealed record PairSet(List<PairValueRecord> Pairs);
```

<a id="api-0dfdc9a9601275e9"></a>

### [`PairSet.PairSet(List<PairValueRecord> Pairs)`](#api-0dfdc9a9601275e9)


```csharp
public PairSet(List<PairValueRecord> Pairs);
```



<a id="api-8f7359622c4d8634"></a>

### [`List<PairValueRecord> PairSet.Pairs`](#api-8f7359622c4d8634)


```csharp
public List<PairValueRecord> Pairs { get; init; }
```




<a id="api-a70fbbec4f586f4d"></a>

## `record class GPosTable.PairAdjustmentSubtable.Format1.PairValueRecord`



```csharp
public sealed record PairValueRecord(ushort SecondGlyphID, TrueTypeFont.ValueRecord Value1, TrueTypeFont.ValueRecord Value2);
```

<a id="api-db21a005f90f603e"></a>

### [`PairValueRecord.PairValueRecord(ushort SecondGlyphID, ValueRecord Value1, ValueRecord Value2)`](#api-db21a005f90f603e)


```csharp
public PairValueRecord(ushort SecondGlyphID, TrueTypeFont.ValueRecord Value1, TrueTypeFont.ValueRecord Value2);
```



<a id="api-8e68e196fead4522"></a>

### [`ushort PairValueRecord.SecondGlyphID`](#api-8e68e196fead4522)


```csharp
public ushort SecondGlyphID { get; init; }
```



<a id="api-9f4768637014bb54"></a>

### [`ValueRecord PairValueRecord.Value1`](#api-9f4768637014bb54)


```csharp
public TrueTypeFont.ValueRecord Value1 { get; init; }
```



<a id="api-f19d2641c34d8b4a"></a>

### [`ValueRecord PairValueRecord.Value2`](#api-f19d2641c34d8b4a)


```csharp
public TrueTypeFont.ValueRecord Value2 { get; init; }
```




<a id="api-359b68fa24baad8e"></a>

## `class GPosTable.PairAdjustmentSubtable.Format2`

Represents a GPOS LookupType 2 subtable: Pair Adjustment Format 2 (class-based kerning).

```csharp
public sealed class Format2 : PairAdjustmentSubtable
{
    public ushort ValueFormat1 { get; }
    public ushort ValueFormat2 { get; }
    public ClassDefTable ClassDef1 { get; }
    public ClassDefTable ClassDef2 { get; }
    public PairValueRecord[, ] Matrix { get; }
    public CoverageTable Coverage { get; }
    public ushort Class1Count { get; }
    public ushort Class2Count { get; }

    public Format2(ReadOnlySpan<byte> span);
    public sealed record PairValueRecord(TrueTypeFont.ValueRecord Value1, TrueTypeFont.ValueRecord Value2);
    public override TrueTypeFont.ValueRecordTuple this[ushort leftGlyph, ushort rightGlyph] { get; }
}
```

<a id="api-e504d6749d18a4e9"></a>

### [`Format2.Format2(ReadOnlySpan<byte> span)`](#api-e504d6749d18a4e9)


```csharp
public Format2(ReadOnlySpan<byte> span);
```



<a id="api-3a5070434a980ad9"></a>

### [`ushort Format2.Class1Count`](#api-3a5070434a980ad9)


```csharp
public ushort Class1Count { get; }
```



<a id="api-4c382ba29dad6710"></a>

### [`ushort Format2.Class2Count`](#api-4c382ba29dad6710)


```csharp
public ushort Class2Count { get; }
```



<a id="api-8f85ff99219f42e5"></a>

### [`ClassDefTable Format2.ClassDef1`](#api-8f85ff99219f42e5)


```csharp
public ClassDefTable ClassDef1 { get; }
```



<a id="api-7f2ffd9331b79680"></a>

### [`ClassDefTable Format2.ClassDef2`](#api-7f2ffd9331b79680)


```csharp
public ClassDefTable ClassDef2 { get; }
```



<a id="api-edaee9b87588ed27"></a>

### [`CoverageTable Format2.Coverage`](#api-edaee9b87588ed27)


```csharp
public CoverageTable Coverage { get; }
```



<a id="api-7dd3e1200a3fa74c"></a>

### [`ValueRecordTuple Format2.this[ushort leftGlyph, ushort rightGlyph]`](#api-7dd3e1200a3fa74c)


```csharp
public override TrueTypeFont.ValueRecordTuple this[ushort leftGlyph, ushort rightGlyph] { get; }
```



<a id="api-3e177dd56dfb5895"></a>

### [`PairValueRecord[,] Format2.Matrix`](#api-3e177dd56dfb5895)


```csharp
public PairValueRecord[, ] Matrix { get; }
```



<a id="api-c459c9bcd33f67e9"></a>

### [`ushort Format2.ValueFormat1`](#api-c459c9bcd33f67e9)


```csharp
public ushort ValueFormat1 { get; }
```



<a id="api-1ff8c15fe18bfdcf"></a>

### [`ushort Format2.ValueFormat2`](#api-1ff8c15fe18bfdcf)


```csharp
public ushort ValueFormat2 { get; }
```




<a id="api-11992f24276da1e4"></a>

## `record class GPosTable.PairAdjustmentSubtable.Format2.PairValueRecord`



```csharp
public sealed record PairValueRecord(TrueTypeFont.ValueRecord Value1, TrueTypeFont.ValueRecord Value2);
```

<a id="api-fdfcd7997fcb143e"></a>

### [`PairValueRecord.PairValueRecord(ValueRecord Value1, ValueRecord Value2)`](#api-fdfcd7997fcb143e)


```csharp
public PairValueRecord(TrueTypeFont.ValueRecord Value1, TrueTypeFont.ValueRecord Value2);
```



<a id="api-79bc9a54ceea87f7"></a>

### [`ValueRecord PairValueRecord.Value1`](#api-79bc9a54ceea87f7)


```csharp
public TrueTypeFont.ValueRecord Value1 { get; init; }
```



<a id="api-2bf926952241b2a9"></a>

### [`ValueRecord PairValueRecord.Value2`](#api-2bf926952241b2a9)


```csharp
public TrueTypeFont.ValueRecord Value2 { get; init; }
```




<a id="api-7a500a60a6e897cf"></a>

## `class GPosTable.ScriptListTable`



```csharp
public sealed class ScriptListTable : IReadOnlyDictionary<string, ScriptTable>
{
    public ScriptListTable(ReadOnlySpan<byte> span);
    public ScriptTable this[string key] { get; }

    public IEnumerable<string> Keys { get; }
    public IEnumerable<ScriptTable> Values { get; }
    public int Count { get; }

    public bool ContainsKey(string key);
    public bool TryGetValue(string key, out ScriptTable value);
    public IEnumerator<KeyValuePair<string, ScriptTable>> GetEnumerator();
}
```

<a id="api-d9af7221c20ed84d"></a>

### [`ScriptListTable.ScriptListTable(ReadOnlySpan<byte> span)`](#api-d9af7221c20ed84d)


```csharp
public ScriptListTable(ReadOnlySpan<byte> span);
```



<a id="api-96ee017b5d660740"></a>

### [`bool ScriptListTable.ContainsKey(string key)`](#api-96ee017b5d660740)


```csharp
public bool ContainsKey(string key);
```



<a id="api-d872862111bb45ca"></a>

### [`int ScriptListTable.Count`](#api-d872862111bb45ca)


```csharp
public int Count { get; }
```



<a id="api-23d9928d72e0e20e"></a>

### [`IEnumerator<KeyValuePair<string, ScriptTable>> ScriptListTable.GetEnumerator()`](#api-23d9928d72e0e20e)


```csharp
public IEnumerator<KeyValuePair<string, ScriptTable>> GetEnumerator();
```



<a id="api-6a256524431b54a1"></a>

### [`ScriptTable ScriptListTable.this[string key]`](#api-6a256524431b54a1)


```csharp
public ScriptTable this[string key] { get; }
```



<a id="api-24777598e6fbf830"></a>

### [`IEnumerable<string> ScriptListTable.Keys`](#api-24777598e6fbf830)


```csharp
public IEnumerable<string> Keys { get; }
```



<a id="api-d0e7e6bb2604e789"></a>

### [`bool ScriptListTable.TryGetValue(string key, out ScriptTable value)`](#api-d0e7e6bb2604e789)


```csharp
public bool TryGetValue(string key, out ScriptTable value);
```



<a id="api-b68759601f68e98e"></a>

### [`IEnumerable<ScriptTable> ScriptListTable.Values`](#api-b68759601f68e98e)


```csharp
public IEnumerable<ScriptTable> Values { get; }
```




<a id="api-31ea8d19c8a3a9ff"></a>

## `class GPosTable.ScriptTable`



```csharp
public sealed class ScriptTable : IReadOnlyDictionary<string, LangSysTable>
{
    public ScriptTable(ReadOnlySpan<byte> span);
    public LangSysTable this[string key] { get; }

    public IEnumerable<string> Keys { get; }
    public IEnumerable<LangSysTable> Values { get; }
    public int Count { get; }

    public bool ContainsKey(string key);
    public bool TryGetValue(string key, out LangSysTable value);
    public IEnumerator<KeyValuePair<string, LangSysTable>> GetEnumerator();
}
```

<a id="api-28c9582fa233bada"></a>

### [`ScriptTable.ScriptTable(ReadOnlySpan<byte> span)`](#api-28c9582fa233bada)


```csharp
public ScriptTable(ReadOnlySpan<byte> span);
```



<a id="api-e0cabc070dacd52f"></a>

### [`bool ScriptTable.ContainsKey(string key)`](#api-e0cabc070dacd52f)


```csharp
public bool ContainsKey(string key);
```



<a id="api-f27f0ffa6d8cdee1"></a>

### [`int ScriptTable.Count`](#api-f27f0ffa6d8cdee1)


```csharp
public int Count { get; }
```



<a id="api-71488bfb9d24f345"></a>

### [`IEnumerator<KeyValuePair<string, LangSysTable>> ScriptTable.GetEnumerator()`](#api-71488bfb9d24f345)


```csharp
public IEnumerator<KeyValuePair<string, LangSysTable>> GetEnumerator();
```



<a id="api-f78605969faced88"></a>

### [`LangSysTable ScriptTable.this[string key]`](#api-f78605969faced88)


```csharp
public LangSysTable this[string key] { get; }
```



<a id="api-632f7c9a1f9488f2"></a>

### [`IEnumerable<string> ScriptTable.Keys`](#api-632f7c9a1f9488f2)


```csharp
public IEnumerable<string> Keys { get; }
```



<a id="api-7989afea580b85f6"></a>

### [`bool ScriptTable.TryGetValue(string key, out LangSysTable value)`](#api-7989afea580b85f6)


```csharp
public bool TryGetValue(string key, out LangSysTable value);
```



<a id="api-911146db37cd167e"></a>

### [`IEnumerable<LangSysTable> ScriptTable.Values`](#api-911146db37cd167e)


```csharp
public IEnumerable<LangSysTable> Values { get; }
```




<a id="api-96558790fd88f24e"></a>

## `class GlyfTable`



```csharp
public class GlyfTable
{
    public GlyfTable(ReadOnlyMemory<byte> data, LocaTable loca);
    public bool TryGetGlyph(int glyphIndex, out GlyphShape shape);
    public void ExpandCompositeDependencies(SortedSet<int> glyphs);
    public Subset CreateSubset(IReadOnlyList<int> glyphs, IReadOnlyDictionary<int, ushort> glyphMap);
    public readonly record struct Subset(byte[] Glyf, byte[] Loca);
}
```

<a id="api-15f0ab3ad860f7cd"></a>

### [`GlyfTable.GlyfTable(ReadOnlyMemory<byte> data, LocaTable loca)`](#api-15f0ab3ad860f7cd)


```csharp
public GlyfTable(ReadOnlyMemory<byte> data, LocaTable loca);
```



<a id="api-2619ceda5cedc12e"></a>

### [`Subset GlyfTable.CreateSubset(IReadOnlyList<int> glyphs, IReadOnlyDictionary<int, ushort> glyphMap)`](#api-2619ceda5cedc12e)


```csharp
public Subset CreateSubset(IReadOnlyList<int> glyphs, IReadOnlyDictionary<int, ushort> glyphMap);
```

Creates compact glyf and long-format loca tables for retained glyphs.

<a id="api-df1385d758ecb977"></a>

### [`void GlyfTable.ExpandCompositeDependencies(SortedSet<int> glyphs)`](#api-df1385d758ecb977)


```csharp
public void ExpandCompositeDependencies(SortedSet<int> glyphs);
```

Adds every component needed by retained composite glyphs.

<a id="api-7d8108e58f8f1eaf"></a>

### [`bool GlyfTable.TryGetGlyph(int glyphIndex, out GlyphShape shape)`](#api-7d8108e58f8f1eaf)


```csharp
public bool TryGetGlyph(int glyphIndex, out GlyphShape shape);
```

Returns a glyph shape by slicing the raw memory using loca table offsets.


<a id="api-6f0f35a9e41a89dc"></a>

## `readonly record struct GlyfTable.Subset`



```csharp
public readonly record struct Subset(byte[] Glyf, byte[] Loca);
```

<a id="api-c65fab3c7046e03a"></a>

### [`Subset.Subset(byte[] Glyf, byte[] Loca)`](#api-c65fab3c7046e03a)


```csharp
public Subset(byte[] Glyf, byte[] Loca);
```



<a id="api-04996ba7b3c9f4ff"></a>

### [`byte[] Subset.Glyf`](#api-04996ba7b3c9f4ff)


```csharp
public byte[] Glyf { get; init; }
```



<a id="api-70f9a26c8f25e384"></a>

### [`byte[] Subset.Loca`](#api-70f9a26c8f25e384)


```csharp
public byte[] Loca { get; init; }
```




<a id="api-d7fca7cbb084d170"></a>

## `readonly record struct GlyphPosition`



```csharp
public readonly record struct GlyphPosition(int GlyphId, float X, float Y);
```

<a id="api-7a896bfb190af0fd"></a>

### [`GlyphPosition.GlyphPosition(int GlyphId, float X, float Y)`](#api-7a896bfb190af0fd)


```csharp
public GlyphPosition(int GlyphId, float X, float Y);
```



<a id="api-8d28b6cafb0553c4"></a>

### [`int GlyphPosition.GlyphId`](#api-8d28b6cafb0553c4)


```csharp
public int GlyphId { get; init; }
```



<a id="api-458e111b496207a3"></a>

### [`float GlyphPosition.X`](#api-458e111b496207a3)


```csharp
public float X { get; init; }
```



<a id="api-b8ef2abd2075ff24"></a>

### [`float GlyphPosition.Y`](#api-b8ef2abd2075ff24)


```csharp
public float Y { get; init; }
```




<a id="api-f63efb2182d1666f"></a>

## `ref struct GlyphShape`

A parsed TrueType glyph. This is a lightweight, stack-only view into raw glyph data.

```csharp
public ref struct GlyphShape
{
    public GlyphBound Bounds { get; }

    public GlyphShape(ReadOnlySpan<byte> data);
    public void Visit(IGlyphPathBuilder builder);
    public struct GlyphBound
    {
        public short XMin;
        public short YMin;
        public short XMax;
        public short YMax;
        public GlyphBound(short xMin, short yMin, short xMax, short yMax);
    }
}
```

<a id="api-d9335cda5364096f"></a>

### [`GlyphShape.GlyphShape(ReadOnlySpan<byte> data)`](#api-d9335cda5364096f)


```csharp
public GlyphShape(ReadOnlySpan<byte> data);
```



<a id="api-2bc5bba34a8af620"></a>

### [`GlyphBound GlyphShape.Bounds`](#api-2bc5bba34a8af620)


```csharp
public GlyphBound Bounds { get; }
```

Gets the unscaled bounding box of the glyph in font units.

<a id="api-f39399dcbf86fed6"></a>

### [`void GlyphShape.Visit(IGlyphPathBuilder builder)`](#api-f39399dcbf86fed6)


```csharp
public void Visit(IGlyphPathBuilder builder);
```




<a id="api-7b2426688a46462c"></a>

## `struct GlyphShape.GlyphBound`



```csharp
public struct GlyphBound
{
    public short XMin;
    public short YMin;
    public short XMax;
    public short YMax;
    public GlyphBound(short xMin, short yMin, short xMax, short yMax);
}
```

<a id="api-9febf691753c6fdb"></a>

### [`GlyphBound.GlyphBound(short xMin, short yMin, short xMax, short yMax)`](#api-9febf691753c6fdb)


```csharp
public GlyphBound(short xMin, short yMin, short xMax, short yMax);
```



<a id="api-e4d40885d0b33b2e"></a>

### [`short GlyphBound.XMax`](#api-e4d40885d0b33b2e)


```csharp
public short XMax;
```



<a id="api-0d0fde8e561332f3"></a>

### [`short GlyphBound.XMin`](#api-0d0fde8e561332f3)


```csharp
public short XMin;
```



<a id="api-a889eb40923eafea"></a>

### [`short GlyphBound.YMax`](#api-a889eb40923eafea)


```csharp
public short YMax;
```



<a id="api-942fede42e7dab3c"></a>

### [`short GlyphBound.YMin`](#api-942fede42e7dab3c)


```csharp
public short YMin;
```




<a id="api-f311aee089f7c09b"></a>

## `class HeaderTable`



```csharp
public class HeaderTable
{
    public ushort FontRevisionMajor { get; }
    public ushort FontRevisionMinor { get; }
    public ushort UnitsPerEm { get; }
    public DateTime Created { get; }
    public DateTime Modified { get; }
    public short XMin { get; }
    public short YMin { get; }
    public short XMax { get; }
    public short YMax { get; }
    public ushort MacStyle { get; }
    public ushort LowestRecPPEM { get; }
    public ushort IndexToLocFormat { get; }
    public bool IsBold { get; }
    public bool IsItalic { get; }
    public bool IsUnderline { get; }
    public bool IsOutline { get; }
    public bool IsShadow { get; }
    public bool IsCondensed { get; }
    public bool IsExtended { get; }

    public HeaderTable(ReadOnlySpan<byte> data);
    public static byte[] CreateSubset(ReadOnlySpan<byte> source);
}
```

<a id="api-352d7f4b61653830"></a>

### [`HeaderTable.HeaderTable(ReadOnlySpan<byte> data)`](#api-352d7f4b61653830)


```csharp
public HeaderTable(ReadOnlySpan<byte> data);
```



<a id="api-0468713d035502bf"></a>

### [`byte[] HeaderTable.CreateSubset(ReadOnlySpan<byte> source)`](#api-0468713d035502bf)


```csharp
public static byte[] CreateSubset(ReadOnlySpan<byte> source);
```

Copies a head table configured for long loca offsets and a new checksum.

<a id="api-ce9b62477e9d9255"></a>

### [`DateTime HeaderTable.Created`](#api-ce9b62477e9d9255)


```csharp
public DateTime Created { get; }
```



<a id="api-c655dc258492ceea"></a>

### [`ushort HeaderTable.FontRevisionMajor`](#api-c655dc258492ceea)


```csharp
public ushort FontRevisionMajor { get; }
```



<a id="api-0bc86b53908bfbfd"></a>

### [`ushort HeaderTable.FontRevisionMinor`](#api-0bc86b53908bfbfd)


```csharp
public ushort FontRevisionMinor { get; }
```



<a id="api-1c97b312d205d865"></a>

### [`ushort HeaderTable.IndexToLocFormat`](#api-1c97b312d205d865)


```csharp
public ushort IndexToLocFormat { get; }
```



<a id="api-340a078c77f7bef1"></a>

### [`bool HeaderTable.IsBold`](#api-340a078c77f7bef1)


```csharp
public bool IsBold { get; }
```



<a id="api-71b65644a23c5aae"></a>

### [`bool HeaderTable.IsCondensed`](#api-71b65644a23c5aae)


```csharp
public bool IsCondensed { get; }
```



<a id="api-48375a1da92b1ac1"></a>

### [`bool HeaderTable.IsExtended`](#api-48375a1da92b1ac1)


```csharp
public bool IsExtended { get; }
```



<a id="api-5ff80c3b94aea3c4"></a>

### [`bool HeaderTable.IsItalic`](#api-5ff80c3b94aea3c4)


```csharp
public bool IsItalic { get; }
```



<a id="api-17cd6c090f92c57f"></a>

### [`bool HeaderTable.IsOutline`](#api-17cd6c090f92c57f)


```csharp
public bool IsOutline { get; }
```



<a id="api-c3acfd98883913ec"></a>

### [`bool HeaderTable.IsShadow`](#api-c3acfd98883913ec)


```csharp
public bool IsShadow { get; }
```



<a id="api-3a6787cec43374d7"></a>

### [`bool HeaderTable.IsUnderline`](#api-3a6787cec43374d7)


```csharp
public bool IsUnderline { get; }
```



<a id="api-634b190318b9b091"></a>

### [`ushort HeaderTable.LowestRecPPEM`](#api-634b190318b9b091)


```csharp
public ushort LowestRecPPEM { get; }
```



<a id="api-b876407ee48e5c15"></a>

### [`ushort HeaderTable.MacStyle`](#api-b876407ee48e5c15)


```csharp
public ushort MacStyle { get; }
```



<a id="api-86fc8f53c9ef4d77"></a>

### [`DateTime HeaderTable.Modified`](#api-86fc8f53c9ef4d77)


```csharp
public DateTime Modified { get; }
```



<a id="api-5da56fdbc935951b"></a>

### [`ushort HeaderTable.UnitsPerEm`](#api-5da56fdbc935951b)


```csharp
public ushort UnitsPerEm { get; }
```



<a id="api-e34f32bec0bcd776"></a>

### [`short HeaderTable.XMax`](#api-e34f32bec0bcd776)


```csharp
public short XMax { get; }
```



<a id="api-5769769f0edddf7a"></a>

### [`short HeaderTable.XMin`](#api-5769769f0edddf7a)


```csharp
public short XMin { get; }
```



<a id="api-fc39a60e2ca19702"></a>

### [`short HeaderTable.YMax`](#api-fc39a60e2ca19702)


```csharp
public short YMax { get; }
```



<a id="api-dd80067ae7cb813b"></a>

### [`short HeaderTable.YMin`](#api-dd80067ae7cb813b)


```csharp
public short YMin { get; }
```




<a id="api-6284e6732b57733d"></a>

## `class HorizontalHeaderTable`



```csharp
public class HorizontalHeaderTable
{
    public short Ascender { get; }
    public short Descender { get; }
    public short LineGap { get; }
    public ushort AdvanceWidthMax { get; }
    public short MinLeftSideBearing { get; }
    public short MinRightSideBearing { get; }
    public short XMaxExtent { get; }
    public short CaretSlopeRise { get; }
    public short CaretSlopeRun { get; }
    public short CaretOffset { get; }
    public short MetricDataFormat { get; }
    public ushort NumberOfHMetrics { get; }

    public HorizontalHeaderTable(ReadOnlySpan<byte> data);
    public static byte[] CreateSubset(ReadOnlySpan<byte> source, ushort numberOfHMetrics);
}
```

<a id="api-172f54ab19ea5bc6"></a>

### [`HorizontalHeaderTable.HorizontalHeaderTable(ReadOnlySpan<byte> data)`](#api-172f54ab19ea5bc6)


```csharp
public HorizontalHeaderTable(ReadOnlySpan<byte> data);
```



<a id="api-592176d5ece2e683"></a>

### [`ushort HorizontalHeaderTable.AdvanceWidthMax`](#api-592176d5ece2e683)


```csharp
public ushort AdvanceWidthMax { get; }
```



<a id="api-532a1b6889dbda61"></a>

### [`short HorizontalHeaderTable.Ascender`](#api-532a1b6889dbda61)


```csharp
public short Ascender { get; }
```



<a id="api-043e4de8f98e306e"></a>

### [`short HorizontalHeaderTable.CaretOffset`](#api-043e4de8f98e306e)


```csharp
public short CaretOffset { get; }
```



<a id="api-7a0533fbd8539444"></a>

### [`short HorizontalHeaderTable.CaretSlopeRise`](#api-7a0533fbd8539444)


```csharp
public short CaretSlopeRise { get; }
```



<a id="api-61ffbb6c2f1161f7"></a>

### [`short HorizontalHeaderTable.CaretSlopeRun`](#api-61ffbb6c2f1161f7)


```csharp
public short CaretSlopeRun { get; }
```



<a id="api-1f6fa4338ee627b0"></a>

### [`byte[] HorizontalHeaderTable.CreateSubset(ReadOnlySpan<byte> source, ushort numberOfHMetrics)`](#api-1f6fa4338ee627b0)


```csharp
public static byte[] CreateSubset(ReadOnlySpan<byte> source, ushort numberOfHMetrics);
```

Copies an hhea table for a compact hmtx table with one metric per glyph.

<a id="api-5001e3a1ddf69856"></a>

### [`short HorizontalHeaderTable.Descender`](#api-5001e3a1ddf69856)


```csharp
public short Descender { get; }
```



<a id="api-760444db70309892"></a>

### [`short HorizontalHeaderTable.LineGap`](#api-760444db70309892)


```csharp
public short LineGap { get; }
```



<a id="api-c3e97cc17c5ea538"></a>

### [`short HorizontalHeaderTable.MetricDataFormat`](#api-c3e97cc17c5ea538)


```csharp
public short MetricDataFormat { get; }
```



<a id="api-57d300a7ffb7c08c"></a>

### [`short HorizontalHeaderTable.MinLeftSideBearing`](#api-57d300a7ffb7c08c)


```csharp
public short MinLeftSideBearing { get; }
```



<a id="api-5aa05ab04aef9da3"></a>

### [`short HorizontalHeaderTable.MinRightSideBearing`](#api-5aa05ab04aef9da3)


```csharp
public short MinRightSideBearing { get; }
```



<a id="api-cffe41aaebe856eb"></a>

### [`ushort HorizontalHeaderTable.NumberOfHMetrics`](#api-cffe41aaebe856eb)


```csharp
public ushort NumberOfHMetrics { get; }
```



<a id="api-f2d97b10a4964d1d"></a>

### [`short HorizontalHeaderTable.XMaxExtent`](#api-f2d97b10a4964d1d)


```csharp
public short XMaxExtent { get; }
```




<a id="api-71aefecfcd68db52"></a>

## `class HorizontalMetricsTable`



```csharp
public class HorizontalMetricsTable
{
    public HorizontalMetricsTable(ReadOnlySpan<byte> data, ushort numberOfHMetrics);
    public HorizontalMetric GetMetric(int glyphIndex);
    public byte[] CreateSubset(IEnumerable<int> glyphIndices);
    public record struct HorizontalMetric(ushort AdvanceWidth, short LeftSideBearing);
}
```

<a id="api-15926f5bff57494d"></a>

### [`HorizontalMetricsTable.HorizontalMetricsTable(ReadOnlySpan<byte> data, ushort numberOfHMetrics)`](#api-15926f5bff57494d)


```csharp
public HorizontalMetricsTable(ReadOnlySpan<byte> data, ushort numberOfHMetrics);
```



<a id="api-c1c81a3e6c9a425e"></a>

### [`byte[] HorizontalMetricsTable.CreateSubset(IEnumerable<int> glyphIndices)`](#api-c1c81a3e6c9a425e)


```csharp
public byte[] CreateSubset(IEnumerable<int> glyphIndices);
```

Creates a compact hmtx table with one full metric per retained glyph.

<a id="api-359c930fe03eb2af"></a>

### [`HorizontalMetric HorizontalMetricsTable.GetMetric(int glyphIndex)`](#api-359c930fe03eb2af)


```csharp
public HorizontalMetric GetMetric(int glyphIndex);
```




<a id="api-4151db920fde8f3c"></a>

## `record struct HorizontalMetricsTable.HorizontalMetric`



```csharp
public record struct HorizontalMetric(ushort AdvanceWidth, short LeftSideBearing);
```

<a id="api-aea5717da116698b"></a>

### [`HorizontalMetric.HorizontalMetric(ushort AdvanceWidth, short LeftSideBearing)`](#api-aea5717da116698b)


```csharp
public HorizontalMetric(ushort AdvanceWidth, short LeftSideBearing);
```



<a id="api-35f8677d98217d33"></a>

### [`ushort HorizontalMetric.AdvanceWidth`](#api-35f8677d98217d33)


```csharp
public ushort AdvanceWidth { get; set; }
```



<a id="api-4f049fc5d3cb2296"></a>

### [`short HorizontalMetric.LeftSideBearing`](#api-4f049fc5d3cb2296)


```csharp
public short LeftSideBearing { get; set; }
```




<a id="api-43273dfe32de332a"></a>

## `class KernTable`



```csharp
public sealed class KernTable
{
    public readonly Dictionary<(ushort Left, ushort Right), short> Pairs;
    public CMapTable CMap { get; }

    public KernTable(ReadOnlySpan<byte> data, CMapTable cmap);
    public short GetKerningAdjustment(ushort left, ushort right);
    public TrueTypeFont.ValueRecord this[Rune left, Rune right] { get; }

    public static byte[] CreateSubset(IEnumerable<Pair> pairs);
    public readonly record struct Pair(ushort Left, ushort Right, short Value);
}
```

<a id="api-eef31951aa579980"></a>

### [`KernTable.KernTable(ReadOnlySpan<byte> data, CMapTable cmap)`](#api-eef31951aa579980)


```csharp
public KernTable(ReadOnlySpan<byte> data, CMapTable cmap);
```



<a id="api-46a30df5d2e79f04"></a>

### [`CMapTable KernTable.CMap`](#api-46a30df5d2e79f04)


```csharp
public CMapTable CMap { get; }
```



<a id="api-572a3ed8fc7e1da8"></a>

### [`byte[] KernTable.CreateSubset(IEnumerable<Pair> pairs)`](#api-572a3ed8fc7e1da8)


```csharp
public static byte[] CreateSubset(IEnumerable<Pair> pairs);
```

Creates a horizontal format-0 kern table from the retained pairs.

<a id="api-d1d107dfe9c150b5"></a>

### [`short KernTable.GetKerningAdjustment(ushort left, ushort right)`](#api-d1d107dfe9c150b5)


```csharp
public short GetKerningAdjustment(ushort left, ushort right);
```



<a id="api-2e0f9f9e231efb48"></a>

### [`ValueRecord KernTable.this[Rune left, Rune right]`](#api-2e0f9f9e231efb48)


```csharp
public TrueTypeFont.ValueRecord this[Rune left, Rune right] { get; }
```



<a id="api-89b5da34a2017499"></a>

### [`Dictionary<(ushort Left, ushort Right), short> KernTable.Pairs`](#api-89b5da34a2017499)


```csharp
public readonly Dictionary<(ushort Left, ushort Right), short> Pairs;
```




<a id="api-8b3689a982e7e5ea"></a>

## `readonly record struct KernTable.Pair`



```csharp
public readonly record struct Pair(ushort Left, ushort Right, short Value);
```

<a id="api-4a00aa482dcc9364"></a>

### [`Pair.Pair(ushort Left, ushort Right, short Value)`](#api-4a00aa482dcc9364)


```csharp
public Pair(ushort Left, ushort Right, short Value);
```



<a id="api-dcc1cbd3cfef14d8"></a>

### [`ushort Pair.Left`](#api-dcc1cbd3cfef14d8)


```csharp
public ushort Left { get; init; }
```



<a id="api-c375a9760d8b06c3"></a>

### [`ushort Pair.Right`](#api-c375a9760d8b06c3)


```csharp
public ushort Right { get; init; }
```



<a id="api-87c613d140ca8792"></a>

### [`short Pair.Value`](#api-87c613d140ca8792)


```csharp
public short Value { get; init; }
```




<a id="api-716a9fad08169f30"></a>

## `class LocaTable`



```csharp
public class LocaTable
{
    public LocaTable(ReadOnlySpan<byte> data, int numGlyphs, ushort indexToLocFormat);
    public (int Offset, int Length) GetGlyphBounds(int glyphIndex);
    public static byte[] CreateLong(IReadOnlyList<int> offsets);
}
```

<a id="api-be6fcbdeccde75a0"></a>

### [`LocaTable.LocaTable(ReadOnlySpan<byte> data, int numGlyphs, ushort indexToLocFormat)`](#api-be6fcbdeccde75a0)


```csharp
public LocaTable(ReadOnlySpan<byte> data, int numGlyphs, ushort indexToLocFormat);
```



<a id="api-e9cedee9aa86f92d"></a>

### [`byte[] LocaTable.CreateLong(IReadOnlyList<int> offsets)`](#api-e9cedee9aa86f92d)


```csharp
public static byte[] CreateLong(IReadOnlyList<int> offsets);
```

Creates a long-format loca table from glyph offsets.

<a id="api-9de1516b5d42bf5b"></a>

### [`(int Offset, int Length) LocaTable.GetGlyphBounds(int glyphIndex)`](#api-9de1516b5d42bf5b)


```csharp
public (int Offset, int Length) GetGlyphBounds(int glyphIndex);
```




<a id="api-fdbe486fa370b04d"></a>

## `class MaxProfileTable`



```csharp
public class MaxProfileTable
{
    public ushort NumGlyphs { get; }

    public MaxProfileTable(ReadOnlySpan<byte> data);
    public static byte[] CreateSubset(ReadOnlySpan<byte> source, ushort numGlyphs);
}
```

<a id="api-36af4ef827124ef8"></a>

### [`MaxProfileTable.MaxProfileTable(ReadOnlySpan<byte> data)`](#api-36af4ef827124ef8)


```csharp
public MaxProfileTable(ReadOnlySpan<byte> data);
```



<a id="api-a736f17b24c11ffa"></a>

### [`byte[] MaxProfileTable.CreateSubset(ReadOnlySpan<byte> source, ushort numGlyphs)`](#api-a736f17b24c11ffa)


```csharp
public static byte[] CreateSubset(ReadOnlySpan<byte> source, ushort numGlyphs);
```

Copies a maxp table with the compact glyph count.

<a id="api-abcbbbb5416cdec8"></a>

### [`ushort MaxProfileTable.NumGlyphs`](#api-abcbbbb5416cdec8)


```csharp
public ushort NumGlyphs { get; }
```




<a id="api-80c6652bb529eb5b"></a>

## `class NameTable`



```csharp
public partial class NameTable
{
    public string? Copyright { get; }
    public string? FamilyName { get; }
    public string? SubfamilyName { get; }
    public string? UniqueIdentifier { get; }
    public string? FullName { get; }
    public string? Version { get; }
    public string? PostScriptName { get; }
    public string? Trademark { get; }
    public string? Manufacturer { get; }
    public string? Designer { get; }
    public string? Description { get; }
    public string? VendorURL { get; }
    public string? DesignerURL { get; }
    public string? License { get; }
    public string? LicenseURL { get; }
    public string? PreferredFamily { get; }
    public string? PreferredSubfamily { get; }
    public IReadOnlyList<NameRecord> Names { get; }

    public NameTable(ReadOnlySpan<byte> data);
    public string? GetNameById(int id);
    public record struct NameRecord(ushort NameID, string Value);
}
```

<a id="api-fedc53f6e5dff095"></a>

### [`NameTable.NameTable(ReadOnlySpan<byte> data)`](#api-fedc53f6e5dff095)


```csharp
public NameTable(ReadOnlySpan<byte> data);
```



<a id="api-69c8d1d362f94e3e"></a>

### [`string? NameTable.Copyright`](#api-69c8d1d362f94e3e)


```csharp
public string? Copyright { get; }
```

Copyright notice (Name ID 0)

<a id="api-c7d316d09f969a57"></a>

### [`string? NameTable.Description`](#api-c7d316d09f969a57)


```csharp
public string? Description { get; }
```

Description of the font (Name ID 10)

<a id="api-f86020373a7fe99f"></a>

### [`string? NameTable.Designer`](#api-f86020373a7fe99f)


```csharp
public string? Designer { get; }
```

Designer name (Name ID 9)

<a id="api-803719ab843e4d38"></a>

### [`string? NameTable.DesignerURL`](#api-803719ab843e4d38)


```csharp
public string? DesignerURL { get; }
```

URL of the designer (Name ID 12)

<a id="api-a928a3ea6e08973d"></a>

### [`string? NameTable.FamilyName`](#api-a928a3ea6e08973d)


```csharp
public string? FamilyName { get; }
```

Font family name (Name ID 1)

<a id="api-0ff919ca687b7058"></a>

### [`string? NameTable.FullName`](#api-0ff919ca687b7058)


```csharp
public string? FullName { get; }
```

Full font name (Name ID 4)

<a id="api-420992d62f8c76ed"></a>

### [`string? NameTable.GetNameById(int id)`](#api-420992d62f8c76ed)


```csharp
public string? GetNameById(int id);
```



<a id="api-0eaacffbc7ed8ef1"></a>

### [`string? NameTable.License`](#api-0eaacffbc7ed8ef1)


```csharp
public string? License { get; }
```

License description (Name ID 13)

<a id="api-5fe5f9701061e540"></a>

### [`string? NameTable.LicenseURL`](#api-5fe5f9701061e540)


```csharp
public string? LicenseURL { get; }
```

License info URL (Name ID 14)

<a id="api-e5adadc136fe2c25"></a>

### [`string? NameTable.Manufacturer`](#api-e5adadc136fe2c25)


```csharp
public string? Manufacturer { get; }
```

Manufacturer name (Name ID 8)

<a id="api-47d0492bc46a7e47"></a>

### [`IReadOnlyList<NameRecord> NameTable.Names`](#api-47d0492bc46a7e47)


```csharp
public IReadOnlyList<NameRecord> Names { get; }
```



<a id="api-e2a2ccdd2cb2c856"></a>

### [`string? NameTable.PostScriptName`](#api-e2a2ccdd2cb2c856)


```csharp
public string? PostScriptName { get; }
```

PostScript name (Name ID 6)

<a id="api-62b7e89b51f3fa42"></a>

### [`string? NameTable.PreferredFamily`](#api-62b7e89b51f3fa42)


```csharp
public string? PreferredFamily { get; }
```

Preferred family (Name ID 16) — used for name linking and fallback grouping

<a id="api-ead068dca121b75f"></a>

### [`string? NameTable.PreferredSubfamily`](#api-ead068dca121b75f)


```csharp
public string? PreferredSubfamily { get; }
```

Preferred subfamily (Name ID 17) — used with PreferredFamily

<a id="api-a7748c27fd1525d9"></a>

### [`string? NameTable.SubfamilyName`](#api-a7748c27fd1525d9)


```csharp
public string? SubfamilyName { get; }
```

Font subfamily name (e.g. Regular, Bold) (Name ID 2)

<a id="api-e62d8ee75c1efe54"></a>

### [`string? NameTable.Trademark`](#api-e62d8ee75c1efe54)


```csharp
public string? Trademark { get; }
```

Trademark notice (Name ID 7)

<a id="api-c891d0d37ce09de9"></a>

### [`string? NameTable.UniqueIdentifier`](#api-c891d0d37ce09de9)


```csharp
public string? UniqueIdentifier { get; }
```

Unique font identifier (Name ID 3)

<a id="api-e53e491a5b6037ea"></a>

### [`string? NameTable.VendorURL`](#api-e53e491a5b6037ea)


```csharp
public string? VendorURL { get; }
```

URL of the vendor (Name ID 11)

<a id="api-f69016ab8f6a0d0f"></a>

### [`string? NameTable.Version`](#api-f69016ab8f6a0d0f)


```csharp
public string? Version { get; }
```

Version string (Name ID 5)


<a id="api-62b2d4f91c839a92"></a>

## `record struct NameTable.NameRecord`



```csharp
public record struct NameRecord(ushort NameID, string Value);
```

<a id="api-4b2781bff9aa69b4"></a>

### [`NameRecord.NameRecord(ushort NameID, string Value)`](#api-4b2781bff9aa69b4)


```csharp
public NameRecord(ushort NameID, string Value);
```



<a id="api-2c3bd72fba39186c"></a>

### [`ushort NameRecord.NameID`](#api-2c3bd72fba39186c)


```csharp
public ushort NameID { get; set; }
```



<a id="api-ac0c0e8c88df6654"></a>

### [`string NameRecord.Value`](#api-ac0c0e8c88df6654)


```csharp
public string Value { get; set; }
```




<a id="api-013cea2decf8d302"></a>

## `class OS2Table`



```csharp
public class OS2Table
{
    public ushort WeightClass { get; }
    public ushort WidthClass { get; }
    public short TypoAscender { get; }
    public short TypoDescender { get; }
    public short TypoLineGap { get; }

    public OS2Table(ReadOnlySpan<byte> data);
}
```

<a id="api-50ec5f20891b2f2b"></a>

### [`OS2Table.OS2Table(ReadOnlySpan<byte> data)`](#api-50ec5f20891b2f2b)


```csharp
public OS2Table(ReadOnlySpan<byte> data);
```



<a id="api-e3aff6fcecbd7f94"></a>

### [`short OS2Table.TypoAscender`](#api-e3aff6fcecbd7f94)


```csharp
public short TypoAscender { get; }
```



<a id="api-aacbc41c65f640a6"></a>

### [`short OS2Table.TypoDescender`](#api-aacbc41c65f640a6)


```csharp
public short TypoDescender { get; }
```



<a id="api-5443ce8fcbdca6cf"></a>

### [`short OS2Table.TypoLineGap`](#api-5443ce8fcbdca6cf)


```csharp
public short TypoLineGap { get; }
```



<a id="api-b929460e33832987"></a>

### [`ushort OS2Table.WeightClass`](#api-b929460e33832987)


```csharp
public ushort WeightClass { get; }
```



<a id="api-52f0e00af7a49ffb"></a>

### [`ushort OS2Table.WidthClass`](#api-52f0e00af7a49ffb)


```csharp
public ushort WidthClass { get; }
```




<a id="api-99fbb06080b8552d"></a>

## `class PostTable`



```csharp
public class PostTable
{
    public PostTable(ReadOnlySpan<byte> data);
    public string? GetGlyphName(int glyphIndex);
    public static byte[] CreateSubset(ReadOnlySpan<byte> source);
}
```

<a id="api-0efae7b1004256ed"></a>

### [`PostTable.PostTable(ReadOnlySpan<byte> data)`](#api-0efae7b1004256ed)


```csharp
public PostTable(ReadOnlySpan<byte> data);
```



<a id="api-6c6425f0b5708da2"></a>

### [`byte[] PostTable.CreateSubset(ReadOnlySpan<byte> source)`](#api-6c6425f0b5708da2)


```csharp
public static byte[] CreateSubset(ReadOnlySpan<byte> source);
```

Creates a post format-3 table, retaining metrics but dropping glyph names.

<a id="api-2d5a78079246b50a"></a>

### [`string? PostTable.GetGlyphName(int glyphIndex)`](#api-2d5a78079246b50a)


```csharp
public string? GetGlyphName(int glyphIndex);
```




<a id="api-27a1601c9dae9c60"></a>

## `readonly record struct TableRecord`



```csharp
public readonly record struct TableRecord(string Tag, uint Offset, uint Length, uint Checksum);
```

<a id="api-159ea1cc0007d95a"></a>

### [`TableRecord.TableRecord(string Tag, uint Offset, uint Length, uint Checksum)`](#api-159ea1cc0007d95a)


```csharp
public TableRecord(string Tag, uint Offset, uint Length, uint Checksum);
```



<a id="api-f69d87944fd5ff71"></a>

### [`uint TableRecord.Checksum`](#api-f69d87944fd5ff71)


```csharp
public uint Checksum { get; init; }
```



<a id="api-e8bb8085b55b3f34"></a>

### [`uint TableRecord.Length`](#api-e8bb8085b55b3f34)


```csharp
public uint Length { get; init; }
```



<a id="api-26b071e1b2c20a77"></a>

### [`uint TableRecord.Offset`](#api-26b071e1b2c20a77)


```csharp
public uint Offset { get; init; }
```



<a id="api-68eea46c19ea1be2"></a>

### [`string TableRecord.Tag`](#api-68eea46c19ea1be2)


```csharp
public string Tag { get; init; }
```




<a id="api-d447fc3473cebf3d"></a>

## `class TextLayout`

Lays out a string of text using a TrueType font. Produces positioned glyphs and bounding metrics for rendering and measurement.

```csharp
public class TextLayout
{
    public IReadOnlyList<GlyphPosition> Glyphs { get; }

    public readonly LineMetrics LineMetrics;
    public TextLayout(TrueTypeFont font, string text);
    public TextLayout(TrueTypeFont font, string text, nfloat fontSize, TextAlign textAlign = TextAlign.Left, TextBaseline textBaseline = TextBaseline.Alphabetic);
    public void Visit(IGlyphPathBuilder builder);
    public readonly record struct GlyphPosition(int GlyphId, NFloat X, NFloat Y);
}
```

<a id="api-b0163a97a6cc5787"></a>

### [`TextLayout.TextLayout(TrueTypeFont font, string text)`](#api-b0163a97a6cc5787)


```csharp
public TextLayout(TrueTypeFont font, string text);
```



<a id="api-538762d4a29d9ce1"></a>

### [`TextLayout.TextLayout(TrueTypeFont font, string text, NFloat fontSize, TextAlign textAlign = TextAlign.Left, TextBaseline textBaseline = TextBaseline.Alphabetic)`](#api-538762d4a29d9ce1)


```csharp
public TextLayout(TrueTypeFont font, string text, nfloat fontSize, TextAlign textAlign = TextAlign.Left, TextBaseline textBaseline = TextBaseline.Alphabetic);
```



<a id="api-97f5b048a736590b"></a>

### [`IReadOnlyList<GlyphPosition> TextLayout.Glyphs`](#api-97f5b048a736590b)


```csharp
public IReadOnlyList<GlyphPosition> Glyphs { get; }
```



<a id="api-c4b13796e9c6b237"></a>

### [`LineMetrics TextLayout.LineMetrics`](#api-c4b13796e9c6b237)


```csharp
public readonly LineMetrics LineMetrics;
```

The horizontal and vertical bounding metrics of the laid-out text.

<a id="api-f7cd344e5b0fe279"></a>

### [`void TextLayout.Visit(IGlyphPathBuilder builder)`](#api-f7cd344e5b0fe279)


```csharp
public void Visit(IGlyphPathBuilder builder);
```

Visits each glyph path, offset and scaled to its layout position.


<a id="api-69012e93bebd66c3"></a>

## `readonly record struct TextLayout.GlyphPosition`



```csharp
public readonly record struct GlyphPosition(int GlyphId, NFloat X, NFloat Y);
```

<a id="api-a4a0581b27d44c18"></a>

### [`GlyphPosition.GlyphPosition(int GlyphId, NFloat X, NFloat Y)`](#api-a4a0581b27d44c18)


```csharp
public GlyphPosition(int GlyphId, NFloat X, NFloat Y);
```



<a id="api-903ef2818da95a90"></a>

### [`int GlyphPosition.GlyphId`](#api-903ef2818da95a90)


```csharp
public int GlyphId { get; init; }
```



<a id="api-a054f418b1411464"></a>

### [`NFloat GlyphPosition.X`](#api-a054f418b1411464)


```csharp
public NFloat X { get; init; }
```



<a id="api-56d03e0a72b02ed2"></a>

### [`NFloat GlyphPosition.Y`](#api-56d03e0a72b02ed2)


```csharp
public NFloat Y { get; init; }
```




<a id="api-51696e9bb48cbf23"></a>

## `class TrueTypeFont`



```csharp
public partial class TrueTypeFont
{
    public record struct ValueRecord(short? XPlacement, short? YPlacement, short? XAdvance, short? YAdvance)
    {
        public static ValueRecord Parse(ReadOnlySpan<byte> span, ushort format, out int size);
    }
}
public partial class TrueTypeFont
{
    public record struct ValueRecordTuple(ValueRecord Left, ValueRecord Right);
}
public partial class TrueTypeFont
{
    public readonly ReadOnlyMemory<byte> Blob;
    public readonly Uri? SourceUri;
    public IReadOnlyDictionary<string, TableRecord> Tables { get; }
    public HeaderTable? Head { get; }
    public MaxProfileTable? Maxp { get; }
    public CMapTable? Cmap { get; }
    public PostTable? Post { get; }
    public LocaTable? Loca { get; }
    public GlyfTable? Glyf { get; }
    public OS2Table? OS2 { get; }
    public NameTable? Name { get; }
    public HorizontalHeaderTable? Hhea { get; }
    public HorizontalMetricsTable? Hmtx { get; }
    public KernTable? Kern { get; }
    public GPosTable? GPos { get; }
    public FontFace Face { get; }
    public KerningQuery Kerning { get; }

    public TrueTypeFont(ReadOnlyMemory<byte> blob, Uri? SourceUri = null);
    public TextMetrics MeasureText(string text, Xui.Core.Canvas.Font font, TextAlign textAlign = TextAlign.Left, TextBaseline textBaseline = TextBaseline.Alphabetic);
    public LineMetrics MeasureLine(string text, Xui.Core.Canvas.Font font, TextAlign textAlign = TextAlign.Left, TextBaseline textBaseline = TextBaseline.Alphabetic);
    public FontMetrics Metrics(Xui.Core.Canvas.Font font);
    public bool TryGetGlyph(int glyphId, out GlyphShape shape);
    public int? GetGlyphIndex(Rune rune);
    public string? GetGlyphName(int glyphId);
    public readonly record struct TableRecord(string Tag, uint Offset, uint Length, uint Checksum);
    public readonly struct KerningQuery
    {
        public KerningQuery(TrueTypeFont font);
        public ValueRecord this[Rune left, Rune right] { get; }
    }

    public static FontFace FontFace(HeaderTable? head, NameTable? name, OS2Table? os2);
    public static FontFace FontFace(ReadOnlySpan<byte> fontData);
}
```

<a id="api-e005669e987664a8"></a>

### [`TrueTypeFont.TrueTypeFont(ReadOnlyMemory<byte> blob, Uri? SourceUri = null)`](#api-e005669e987664a8)


```csharp
public TrueTypeFont(ReadOnlyMemory<byte> blob, Uri? SourceUri = null);
```



<a id="api-7ef0ec25a505058a"></a>

### [`ReadOnlyMemory<byte> TrueTypeFont.Blob`](#api-7ef0ec25a505058a)


```csharp
public readonly ReadOnlyMemory<byte> Blob;
```



<a id="api-cbc46ddec13c7f73"></a>

### [`CMapTable? TrueTypeFont.Cmap`](#api-cbc46ddec13c7f73)


```csharp
public CMapTable? Cmap { get; }
```



<a id="api-dace9b0a118a0061"></a>

### [`FontFace TrueTypeFont.Face`](#api-dace9b0a118a0061)


```csharp
public FontFace Face { get; }
```



<a id="api-0c2b57465f587794"></a>

### [`FontFace TrueTypeFont.FontFace(ReadOnlySpan<byte> fontData)`](#api-0c2b57465f587794)


```csharp
public static FontFace FontFace(ReadOnlySpan<byte> fontData);
```



<a id="api-8770d709b4606e21"></a>

### [`FontFace TrueTypeFont.FontFace(HeaderTable? head, NameTable? name, OS2Table? os2)`](#api-8770d709b4606e21)


```csharp
public static FontFace FontFace(HeaderTable? head, NameTable? name, OS2Table? os2);
```

Extracts a [`Xui.Runtime.Software.Font.TrueTypeFont.FontFace(Xui.Runtime.Software.Font.HeaderTable,Xui.Runtime.Software.Font.NameTable,Xui.Runtime.Software.Font.OS2Table)`](../xui-runtime-software-font/index.md#api-8770d709b4606e21) from minimal parsed font tables.

- **`name`** — The [`Xui.Runtime.Software.Font.NameTable`](../xui-runtime-software-font/index.md#api-80c6652bb529eb5b) containing font naming information.

- **`os2`** — The [`Xui.Runtime.Software.Font.OS2Table`](../xui-runtime-software-font/index.md#api-013cea2decf8d302) containing weight and width data.

- **`head`** — The [`Xui.Runtime.Software.Font.HeaderTable`](../xui-runtime-software-font/index.md#api-f311aee089f7c09b) used to determine italic style (via macStyle flags).

**Returns:** A constructed [`Xui.Runtime.Software.Font.TrueTypeFont.FontFace(Xui.Runtime.Software.Font.HeaderTable,Xui.Runtime.Software.Font.NameTable,Xui.Runtime.Software.Font.OS2Table)`](../xui-runtime-software-font/index.md#api-8770d709b4606e21).

<a id="api-8bde11db9fef53e1"></a>

### [`GPosTable? TrueTypeFont.GPos`](#api-8bde11db9fef53e1)


```csharp
public GPosTable? GPos { get; }
```



<a id="api-e042995d85220c38"></a>

### [`int? TrueTypeFont.GetGlyphIndex(Rune rune)`](#api-e042995d85220c38)


```csharp
public int? GetGlyphIndex(Rune rune);
```



<a id="api-94be188a314ab825"></a>

### [`string? TrueTypeFont.GetGlyphName(int glyphId)`](#api-94be188a314ab825)


```csharp
public string? GetGlyphName(int glyphId);
```



<a id="api-1cfd45958708c30f"></a>

### [`GlyfTable? TrueTypeFont.Glyf`](#api-1cfd45958708c30f)


```csharp
public GlyfTable? Glyf { get; }
```



<a id="api-1e62b8b10caf227d"></a>

### [`HeaderTable? TrueTypeFont.Head`](#api-1e62b8b10caf227d)


```csharp
public HeaderTable? Head { get; }
```



<a id="api-1d3278d295a45692"></a>

### [`HorizontalHeaderTable? TrueTypeFont.Hhea`](#api-1d3278d295a45692)


```csharp
public HorizontalHeaderTable? Hhea { get; }
```



<a id="api-9f52d57f84311e36"></a>

### [`HorizontalMetricsTable? TrueTypeFont.Hmtx`](#api-9f52d57f84311e36)


```csharp
public HorizontalMetricsTable? Hmtx { get; }
```



<a id="api-40e1956e039c4642"></a>

### [`KernTable? TrueTypeFont.Kern`](#api-40e1956e039c4642)


```csharp
public KernTable? Kern { get; }
```



<a id="api-5459cfbe9b09ea0a"></a>

### [`KerningQuery TrueTypeFont.Kerning`](#api-5459cfbe9b09ea0a)


```csharp
public KerningQuery Kerning { get; }
```



<a id="api-72f689e89494cdb5"></a>

### [`LocaTable? TrueTypeFont.Loca`](#api-72f689e89494cdb5)


```csharp
public LocaTable? Loca { get; }
```



<a id="api-a5d511a0251dd005"></a>

### [`MaxProfileTable? TrueTypeFont.Maxp`](#api-a5d511a0251dd005)


```csharp
public MaxProfileTable? Maxp { get; }
```



<a id="api-bd73e8d983f8880d"></a>

### [`LineMetrics TrueTypeFont.MeasureLine(string text, Font font, TextAlign textAlign = TextAlign.Left, TextBaseline textBaseline = TextBaseline.Alphabetic)`](#api-bd73e8d983f8880d)


```csharp
public LineMetrics MeasureLine(string text, Xui.Core.Canvas.Font font, TextAlign textAlign = TextAlign.Left, TextBaseline textBaseline = TextBaseline.Alphabetic);
```

Measures metrics which depend on the text&#39;s glyphs and shaping.

<a id="api-3296a93287b1a546"></a>

### [`TextMetrics TrueTypeFont.MeasureText(string text, Font font, TextAlign textAlign = TextAlign.Left, TextBaseline textBaseline = TextBaseline.Alphabetic)`](#api-3296a93287b1a546)


```csharp
public TextMetrics MeasureText(string text, Xui.Core.Canvas.Font font, TextAlign textAlign = TextAlign.Left, TextBaseline textBaseline = TextBaseline.Alphabetic);
```



<a id="api-15828efc972b979d"></a>

### [`FontMetrics TrueTypeFont.Metrics(Font font)`](#api-15828efc972b979d)


```csharp
public FontMetrics Metrics(Xui.Core.Canvas.Font font);
```



<a id="api-bf62ad8f8085ce40"></a>

### [`NameTable? TrueTypeFont.Name`](#api-bf62ad8f8085ce40)


```csharp
public NameTable? Name { get; }
```



<a id="api-61f904e5c08af0d3"></a>

### [`OS2Table? TrueTypeFont.OS2`](#api-61f904e5c08af0d3)


```csharp
public OS2Table? OS2 { get; }
```



<a id="api-93a0106532657951"></a>

### [`PostTable? TrueTypeFont.Post`](#api-93a0106532657951)


```csharp
public PostTable? Post { get; }
```



<a id="api-4f75b0da34eaa1be"></a>

### [`Uri? TrueTypeFont.SourceUri`](#api-4f75b0da34eaa1be)


```csharp
public readonly Uri? SourceUri;
```



<a id="api-710d4ef93297e072"></a>

### [`IReadOnlyDictionary<string, TableRecord> TrueTypeFont.Tables`](#api-710d4ef93297e072)


```csharp
public IReadOnlyDictionary<string, TableRecord> Tables { get; }
```



<a id="api-8e0c852b7adc03d9"></a>

### [`bool TrueTypeFont.TryGetGlyph(int glyphId, out GlyphShape shape)`](#api-8e0c852b7adc03d9)


```csharp
public bool TryGetGlyph(int glyphId, out GlyphShape shape);
```




<a id="api-5974714c4d423963"></a>

## `readonly struct TrueTypeFont.KerningQuery`



```csharp
public readonly struct KerningQuery
{
    public KerningQuery(TrueTypeFont font);
    public ValueRecord this[Rune left, Rune right] { get; }
}
```

<a id="api-448716af2c50ce35"></a>

### [`KerningQuery.KerningQuery(TrueTypeFont font)`](#api-448716af2c50ce35)


```csharp
public KerningQuery(TrueTypeFont font);
```



<a id="api-395d0f554cc88643"></a>

### [`ValueRecord KerningQuery.this[Rune left, Rune right]`](#api-395d0f554cc88643)


```csharp
public ValueRecord this[Rune left, Rune right] { get; }
```




<a id="api-59a2cd211b985173"></a>

## `readonly record struct TrueTypeFont.TableRecord`



```csharp
public readonly record struct TableRecord(string Tag, uint Offset, uint Length, uint Checksum);
```

<a id="api-d94b34a8ffbff8d6"></a>

### [`TableRecord.TableRecord(string Tag, uint Offset, uint Length, uint Checksum)`](#api-d94b34a8ffbff8d6)


```csharp
public TableRecord(string Tag, uint Offset, uint Length, uint Checksum);
```



<a id="api-8876d5ae86075c22"></a>

### [`uint TableRecord.Checksum`](#api-8876d5ae86075c22)


```csharp
public uint Checksum { get; init; }
```



<a id="api-dbc250767463c8a3"></a>

### [`uint TableRecord.Length`](#api-dbc250767463c8a3)


```csharp
public uint Length { get; init; }
```



<a id="api-8cf2bc51b30f1fd1"></a>

### [`uint TableRecord.Offset`](#api-8cf2bc51b30f1fd1)


```csharp
public uint Offset { get; init; }
```



<a id="api-03b37bf2864df93e"></a>

### [`string TableRecord.Tag`](#api-03b37bf2864df93e)


```csharp
public string Tag { get; init; }
```




<a id="api-3d73c799c0444ba4"></a>

## `record struct TrueTypeFont.ValueRecord`



```csharp
public record struct ValueRecord(short? XPlacement, short? YPlacement, short? XAdvance, short? YAdvance)
{
    public static ValueRecord Parse(ReadOnlySpan<byte> span, ushort format, out int size);
}
```

<a id="api-43d5a5a428c3dd00"></a>

### [`ValueRecord.ValueRecord(short? XPlacement, short? YPlacement, short? XAdvance, short? YAdvance)`](#api-43d5a5a428c3dd00)


```csharp
public ValueRecord(short? XPlacement, short? YPlacement, short? XAdvance, short? YAdvance);
```



<a id="api-a2f4097046f7f053"></a>

### [`ValueRecord ValueRecord.Parse(ReadOnlySpan<byte> span, ushort format, out int size)`](#api-a2f4097046f7f053)


```csharp
public static ValueRecord Parse(ReadOnlySpan<byte> span, ushort format, out int size);
```



<a id="api-05008909879fce17"></a>

### [`short? ValueRecord.XAdvance`](#api-05008909879fce17)


```csharp
public short? XAdvance { get; set; }
```



<a id="api-38e93bc11b359b57"></a>

### [`short? ValueRecord.XPlacement`](#api-38e93bc11b359b57)


```csharp
public short? XPlacement { get; set; }
```



<a id="api-43eaf466e391f02c"></a>

### [`short? ValueRecord.YAdvance`](#api-43eaf466e391f02c)


```csharp
public short? YAdvance { get; set; }
```



<a id="api-ccedcad8bcae837e"></a>

### [`short? ValueRecord.YPlacement`](#api-ccedcad8bcae837e)


```csharp
public short? YPlacement { get; set; }
```




<a id="api-bef92f806b7f707e"></a>

## `record struct TrueTypeFont.ValueRecordTuple`



```csharp
public record struct ValueRecordTuple(ValueRecord Left, ValueRecord Right);
```

<a id="api-58d2c36d0dd76c0e"></a>

### [`ValueRecordTuple.ValueRecordTuple(ValueRecord Left, ValueRecord Right)`](#api-58d2c36d0dd76c0e)


```csharp
public ValueRecordTuple(ValueRecord Left, ValueRecord Right);
```



<a id="api-ae2d90b3f024297c"></a>

### [`ValueRecord ValueRecordTuple.Left`](#api-ae2d90b3f024297c)


```csharp
public ValueRecord Left { get; set; }
```



<a id="api-0c75c8017f077ab8"></a>

### [`ValueRecord ValueRecordTuple.Right`](#api-0c75c8017f077ab8)


```csharp
public ValueRecord Right { get; set; }
```




<a id="api-d51c131690d62566"></a>

## `class TrueTypeFontSubset`

Builds a compact TrueType sfnt containing the rendered simple glyphs and kerning pairs.

```csharp
public static class TrueTypeFontSubset
{
    public static ReadOnlyMemory<byte> Create(TrueTypeFont font, FontUsage usage);
}
```

<a id="api-56e504c4241d7018"></a>

### [`ReadOnlyMemory<byte> TrueTypeFontSubset.Create(TrueTypeFont font, FontUsage usage)`](#api-56e504c4241d7018)


```csharp
public static ReadOnlyMemory<byte> Create(TrueTypeFont font, FontUsage usage);
```

Creates a deterministic TrueType subset. The initial format supports BMP characters and simple and composite glyf outlines; its callers must retain the original font for unsupported scripts.

