Skip to main content

Struct GameFontStyle

Describes a font based on game resource file.

Assembly: Dalamud.dll
View Source
Declaration
public struct GameFontStyle

Properties

SizePt

Gets or sets the size of the font in points unit.

View Source
Declaration
public float SizePt { readonly get; set; }

BaseSkewStrength

Gets or sets the base skew strength.

View Source
Declaration
public float BaseSkewStrength { readonly get; set; }

Family

Gets the font family.

View Source
Declaration
public readonly GameFontFamily Family { get; }

FamilyWithMinimumSize

Gets the corresponding GameFontFamilyAndSize but with minimum possible font sizes.

View Source
Declaration
public readonly GameFontFamilyAndSize FamilyWithMinimumSize { get; }

BaseSizePt

Gets the base font size in point unit.

View Source
Declaration
public readonly float BaseSizePt { get; }

BaseSizePx

Gets the base font size in pixel unit.

View Source
Declaration
public readonly float BaseSizePx { get; }

Bold

Gets or sets a value indicating whether this font is bold.

View Source
Declaration
public bool Bold { readonly get; set; }

Italic

Gets or sets a value indicating whether this font is italic.

View Source
Declaration
public bool Italic { readonly get; set; }

Fields

FamilyAndSize

Font family of the font.

View Source
Declaration
public GameFontFamilyAndSize FamilyAndSize

SizePx

Size of the font in pixels unit.

View Source
Declaration
public float SizePx

Weight

Weight of the font.

0 is unaltered. Any value greater than 0 will make it bolder.

View Source
Declaration
public float Weight

SkewStrength

Skewedness of the font.

0 is unaltered. Greater than 1 will make upper part go rightwards. Less than 1 will make lower part go rightwards.

View Source
Declaration
public float SkewStrength

Methods

GetRecommendedFamilyAndSize(GameFontFamily, float)

Gets the recommend GameFontFamilyAndSize given family and size.

View Source
Declaration
public static GameFontFamilyAndSize GetRecommendedFamilyAndSize(GameFontFamily family, float size)
Returns

Dalamud.Interface.GameFonts.GameFontFamilyAndSize: Recommended GameFontFamilyAndSize.

Parameters
TypeNameDescription
Dalamud.Interface.GameFonts.GameFontFamilyfamilyFont family.
System.SinglesizeFont size in points.

Scale(float)

Creates a new scaled instance of Dalamud.Interface.GameFonts.GameFontStyle struct.

View Source
Declaration
public readonly GameFontStyle Scale(float scale)
Returns

Dalamud.Interface.GameFonts.GameFontStyle: The scaled instance.

Parameters
TypeNameDescription
System.SinglescaleThe scale.

CalculateBaseWidthAdjustment(in FontTableHeader, in FontTableEntry)

Calculates the adjustment to width resulting fron Weight and SkewStrength.

View Source
Declaration
public readonly int CalculateBaseWidthAdjustment(in FdtReader.FontTableHeader header, in FdtReader.FontTableEntry glyph)
Returns

System.Int32: Width adjustment in pixel unit.

Parameters
TypeNameDescription
Dalamud.Interface.GameFonts.FdtReader.FontTableHeaderheaderFont header.
Dalamud.Interface.GameFonts.FdtReader.FontTableEntryglyphGlyph.

CalculateBaseWidthAdjustment(FdtReader, FontTableEntry)

Calculates the adjustment to width resulting fron Weight and SkewStrength.

View Source
Declaration
public readonly int CalculateBaseWidthAdjustment(FdtReader reader, FdtReader.FontTableEntry glyph)
Returns

System.Int32: Width adjustment in pixel unit.

Parameters
TypeNameDescription
Dalamud.Interface.GameFonts.FdtReaderreaderFont information.
Dalamud.Interface.GameFonts.FdtReader.FontTableEntryglyphGlyph.

ToString()

Returns the fully qualified type name of this instance.

View Source
Declaration
public override readonly string ToString()
Returns

System.String: The fully qualified type name.