Struct GameFontStyle
Describes a font based on game resource file.
Assembly: Dalamud.dll
public struct GameFontStyle
Properties
SizePt
Gets or sets the size of the font in points unit.
public float SizePt { readonly get; set; }
BaseSkewStrength
Gets or sets the base skew strength.
public float BaseSkewStrength { readonly get; set; }
Family
Gets the font family.
public readonly GameFontFamily Family { get; }
FamilyWithMinimumSize
Gets the corresponding GameFontFamilyAndSize but with minimum possible font sizes.
public readonly GameFontFamilyAndSize FamilyWithMinimumSize { get; }
BaseSizePt
Gets the base font size in point unit.
public readonly float BaseSizePt { get; }
BaseSizePx
Gets the base font size in pixel unit.
public readonly float BaseSizePx { get; }
Bold
Gets or sets a value indicating whether this font is bold.
public bool Bold { readonly get; set; }
Italic
Gets or sets a value indicating whether this font is italic.
public bool Italic { readonly get; set; }
Fields
FamilyAndSize
Font family of the font.
public GameFontFamilyAndSize FamilyAndSize
SizePx
Size of the font in pixels unit.
public float SizePx
Weight
Weight of the font.
0 is unaltered. Any value greater than 0 will make it bolder.
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.
public float SkewStrength
Methods
GetRecommendedFamilyAndSize(GameFontFamily, float)
Gets the recommend GameFontFamilyAndSize given family and size.
public static GameFontFamilyAndSize GetRecommendedFamilyAndSize(GameFontFamily family, float size)
Returns
Dalamud.Interface.GameFonts.GameFontFamilyAndSize: Recommended GameFontFamilyAndSize.
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.Interface.GameFonts.GameFontFamily | family | Font family. |
System.Single | size | Font size in points. |
Scale(float)
Creates a new scaled instance of Dalamud.Interface.GameFonts.GameFontStyle struct.
public readonly GameFontStyle Scale(float scale)
Returns
Dalamud.Interface.GameFonts.GameFontStyle: The scaled instance.
Parameters
| Type | Name | Description |
|---|---|---|
System.Single | scale | The scale. |
CalculateBaseWidthAdjustment(in FontTableHeader, in FontTableEntry)
Calculates the adjustment to width resulting fron Weight and SkewStrength.
public readonly int CalculateBaseWidthAdjustment(in FdtReader.FontTableHeader header, in FdtReader.FontTableEntry glyph)
Returns
System.Int32: Width adjustment in pixel unit.
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.Interface.GameFonts.FdtReader.FontTableHeader | header | Font header. |
| Dalamud.Interface.GameFonts.FdtReader.FontTableEntry | glyph | Glyph. |
CalculateBaseWidthAdjustment(FdtReader, FontTableEntry)
Calculates the adjustment to width resulting fron Weight and SkewStrength.
public readonly int CalculateBaseWidthAdjustment(FdtReader reader, FdtReader.FontTableEntry glyph)
Returns
System.Int32: Width adjustment in pixel unit.
Parameters
| Type | Name | Description |
|---|---|---|
| Dalamud.Interface.GameFonts.FdtReader | reader | Font information. |
| Dalamud.Interface.GameFonts.FdtReader.FontTableEntry | glyph | Glyph. |
ToString()
public override readonly string ToString()
Returns
System.String