Struct GameFontStyle
Describes a font based on game resource file.
Assembly: Dalamud.dll
View Source
public struct GameFontStyle
Properties
SizePt
Gets or sets the size of the font in points unit.
View Source
public float SizePt { readonly get; set; }
BaseSkewStrength
Gets or sets the base skew strength.
View Source
public float BaseSkewStrength { readonly get; set; }
Family
Gets the font family.
View Source
public readonly GameFontFamily Family { get; }
FamilyWithMinimumSize
Gets the corresponding GameFontFamilyAndSize but with minimum possible font sizes.
View Source
public readonly GameFontFamilyAndSize FamilyWithMinimumSize { get; }
BaseSizePt
Gets the base font size in point unit.
View Source
public readonly float BaseSizePt { get; }
BaseSizePx
Gets the base font size in pixel unit.
View Source
public readonly float BaseSizePx { get; }
Bold
Gets or sets a value indicating whether this font is bold.
View Source
public bool Bold { readonly get; set; }
Italic
Gets or sets a value indicating whether this font is italic.
View Source
public bool Italic { readonly get; set; }
Fields
FamilyAndSize
Font family of the font.
View Source
public GameFontFamilyAndSize FamilyAndSize
SizePx
Size of the font in pixels unit.
View Source
public float SizePx
Weight
Weight of the font.
0 is unaltered. Any value greater than 0 will make it bolder.
View Source
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
public float SkewStrength
Methods
GetRecommendedFamilyAndSize(GameFontFamily, float)
Gets the recommend GameFontFamilyAndSize given family and size.
View Source
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.
View Source
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.
View Source
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.
View Source
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()
Returns the fully qualified type name of this instance.
View Source
public override readonly string ToString()
Returns
System.String
: The fully qualified type name.