Class SingleFontSpec
Represents a user's choice of a single font.
Assembly: Dalamud.dll
View Source
public record SingleFontSpec : IFontSpec, IEquatable<SingleFontSpec>
Implements:
Dalamud.Interface.FontIdentifier.IFontSpec, System.IEquatable<Dalamud.Interface.FontIdentifier.SingleFontSpec>
Properties
FontId
Gets the font id.
View Source
[JsonProperty]
public required IFontId FontId { get; init; }
SizePx
Gets the font size in pixels.
View Source
[JsonProperty]
public float SizePx { get; init; }
SizePt
Gets the font size in points.
View Source
[JsonIgnore]
public float SizePt { get; init; }
LineHeightPx
Gets the line height in pixels.
View Source
[JsonIgnore]
public float LineHeightPx { get; }
LineHeight
Gets the line height ratio to the font size.
View Source
[JsonProperty]
public float LineHeight { get; init; }
GlyphOffset
Gets the glyph offset in pixels.
View Source
[JsonProperty]
public Vector2 GlyphOffset { get; init; }
LetterSpacing
Gets the letter spacing in pixels.
View Source
[JsonProperty]
public float LetterSpacing { get; init; }
GlyphRanges
Gets the glyph ranges.
View Source
[JsonProperty]
public ushort[]? GlyphRanges { get; init; }
Methods
ToLocalizedString(string)
Represents this font specification, preferrably in the requested locale.
View Source
public string ToLocalizedString(string localeCode)
Returns
System.String
: The value.
Parameters
Type | Name | Description |
---|---|---|
System.String | localeCode | The locale code. Must be in lowercase(invariant). |
ToString()
Returns a string that represents the current object.
View Source
public override string ToString()
Returns
System.String
: A string that represents the current object.### CreateFontHandle(IFontAtlas, FontAtlasBuildStepDelegate?)
Creates a font handle corresponding to this font specification.
View Source
public IFontHandle CreateFontHandle(IFontAtlas atlas, FontAtlasBuildStepDelegate? callback = null)
Returns
Dalamud.Interface.ManagedFontAtlas.IFontHandle: The new font handle.
Parameters
Type | Name | Description |
---|---|---|
Dalamud.Interface.ManagedFontAtlas.IFontAtlas | atlas | The atlas to bind this font handle to. |
Dalamud.Interface.ManagedFontAtlas.FontAtlasBuildStepDelegate | callback | Optional callback to be called after creating the font handle. |
AddToBuildToolkit(IFontAtlasBuildToolkitPreBuild, ImFontPtr)
Adds this font to the given font build toolkit.
View Source
public ImFontPtr AddToBuildToolkit(IFontAtlasBuildToolkitPreBuild tk, ImFontPtr mergeFont = default)
Returns
ImGuiNET.ImFontPtr: The added font.
Parameters
Type | Name | Description |
---|---|---|
Dalamud.Interface.ManagedFontAtlas.IFontAtlasBuildToolkitPreBuild | tk | The font build toolkit. |
ImGuiNET.ImFontPtr | mergeFont | The font to merge to. |
Implements
- Dalamud.Interface.FontIdentifier.IFontSpec
System.IEquatable<Dalamud.Interface.FontIdentifier.SingleFontSpec>