Skip to main content

Class FdtReader

Parses a game font file.

Assembly: Dalamud.dll
View Source
Declaration
public class FdtReader

Properties

FileHeader

Gets the header of this file.

View Source
Declaration
public FdtReader.FdtHeader FileHeader { get; init; }

FontHeader

Gets the font header of this file.

View Source
Declaration
public FdtReader.FontTableHeader FontHeader { get; init; }

KerningHeader

Gets the kerning table header of this file.

View Source
Declaration
public FdtReader.KerningTableHeader KerningHeader { get; init; }

Glyphs

Gets all the glyphs defined in this file.

View Source
Declaration
public List<FdtReader.FontTableEntry> Glyphs { get; init; }

Distances

Gets all the kerning entries defined in this file.

View Source
Declaration
public List<FdtReader.KerningTableEntry> Distances { get; init; }

Methods

FindGlyphIndex(int)

Finds the glyph index for the corresponding codepoint.

View Source
Declaration
public int FindGlyphIndex(int codepoint)
Returns

System.Int32: Corresponding index, or a negative number according to System.Collections.Generic.List%601.BinarySearch(System.Int32%2cSystem.Int32%2c%600%2cSystem.Collections.Generic.IComparer%7b%600%7d).

Parameters
TypeNameDescription
System.Int32codepointUnicode codepoint (UTF-32 value).

FindGlyph(int)

Finds glyph definition for corresponding codepoint.

View Source
Declaration
public FdtReader.FontTableEntry? FindGlyph(int codepoint)
Returns

System.Nullable<Dalamud.Interface.GameFonts.FdtReader.FontTableEntry>: Corresponding FontTableEntry, or null if not found.

Parameters
TypeNameDescription
System.Int32codepointUnicode codepoint (UTF-32 value).

GetGlyph(int)

Returns glyph definition for corresponding codepoint.

View Source
Declaration
public FdtReader.FontTableEntry GetGlyph(int codepoint)
Returns

Dalamud.Interface.GameFonts.FdtReader.FontTableEntry: Corresponding FontTableEntry, or that of a fallback character.

Parameters
TypeNameDescription
System.Int32codepointUnicode codepoint (UTF-32 value).

GetDistance(int, int)

Returns distance adjustment between two adjacent characters.

View Source
Declaration
public int GetDistance(int codepoint1, int codepoint2)
Returns

System.Int32: Supposed distance adjustment between given characters.

Parameters
TypeNameDescription
System.Int32codepoint1Left character.
System.Int32codepoint2Right character.