Class KerningTable
Inherited Members
Namespace: TMPro
Assembly: Unity.TextMeshPro.dll
Syntax
[Serializable]
public class KerningTable
Constructors
KerningTable()
Declaration
public KerningTable()
Fields
kerningPairs
Declaration
public List<KerningPair> kerningPairs
Field Value
| Type | Description |
|---|---|
| List<KerningPair> |
Methods
AddGlyphPairAdjustmentRecord(uint, GlyphValueRecord_Legacy, uint, GlyphValueRecord_Legacy)
Add Glyph pair adjustment record
Declaration
public int AddGlyphPairAdjustmentRecord(uint first, GlyphValueRecord_Legacy firstAdjustments, uint second, GlyphValueRecord_Legacy secondAdjustments)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | first | The first glyph index. |
| GlyphValueRecord_Legacy | firstAdjustments | Adjustment record for the first glyph. |
| uint | second | The second glyph index. |
| GlyphValueRecord_Legacy | secondAdjustments | Adjustment record for the second glyph. |
Returns
| Type | Description |
|---|---|
| int | The index of the added or existing glyph pair adjustment record. |
AddKerningPair()
Declaration
public void AddKerningPair()
AddKerningPair(uint, uint, float)
Add Kerning Pair
Declaration
public int AddKerningPair(uint first, uint second, float offset)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | first | First glyph |
| uint | second | Second glyph |
| float | offset | xAdvance value |
Returns
| Type | Description |
|---|---|
| int | The index of the added or existing kerning pair. |
RemoveKerningPair(int)
Declaration
public void RemoveKerningPair(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index |
RemoveKerningPair(int, int)
Declaration
public void RemoveKerningPair(int left, int right)
Parameters
| Type | Name | Description |
|---|---|---|
| int | left | |
| int | right |
SortKerningPairs()
Declaration
public void SortKerningPairs()