Skip to main content
Version: 15.x (API 15) [Current]

Struct GameFontStyle

Describes a font based on game resource file.

Assembly: Dalamud.dll​
Declaration
public struct GameFontStyle

Properties​

SizePt​

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

Declaration
public float SizePt { readonly get; set; }

BaseSkewStrength​

Gets or sets the base skew strength.

Declaration
public float BaseSkewStrength { readonly get; set; }

Family​

Gets the font family.

Declaration
public readonly GameFontFamily Family { get; }

FamilyWithMinimumSize​

Gets the corresponding GameFontFamilyAndSize but with minimum possible font sizes.

Declaration
public readonly GameFontFamilyAndSize FamilyWithMinimumSize { get; }

BaseSizePt​

Gets the base font size in point unit.

Declaration
public readonly float BaseSizePt { get; }

BaseSizePx​

Gets the base font size in pixel unit.

Declaration
public readonly float BaseSizePx { get; }

Bold​

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

Declaration
public bool Bold { readonly get; set; }

Italic​

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

Declaration
public bool Italic { readonly get; set; }

Fields​

FamilyAndSize​

Font family of the font.

Declaration
public GameFontFamilyAndSize FamilyAndSize

SizePx​

Size of the font in pixels unit.

Declaration
public float SizePx

Weight​

Weight of the font.

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

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.

Declaration
public float SkewStrength

Methods​

GetRecommendedFamilyAndSize(GameFontFamily, float)​

Gets the recommend GameFontFamilyAndSize given family and size.

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.

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.

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.

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()​

Declaration
public override readonly string ToString()
Returns​

System.String