Class DalamudDefaultFontAndFamilyId
Represents the default Dalamud font.
Assembly: Dalamud.dll
public sealed class DalamudDefaultFontAndFamilyId : IFontId, IFontFamilyId, IObjectWithLocalizableName
Implements:
Dalamud.Interface.FontIdentifier.IFontId, Dalamud.Interface.FontIdentifier.IFontFamilyId, Dalamud.Interface.FontIdentifier.IObjectWithLocalizableName
Properties
EnglishName
Gets the name, preferrably in English.
[JsonIgnore]
public string EnglishName { get; }
LocaleNames
Gets the names per locales.
[JsonIgnore]
public IReadOnlyDictionary<string, string>? LocaleNames { get; }
Family
Gets the associated font family.
[JsonIgnore]
public IFontFamilyId Family { get; }
Weight
Gets the font weight, ranging from 1 to 999.
[JsonIgnore]
public int Weight { get; }
Stretch
Gets the font stretch, ranging from 1 to 9.
[JsonIgnore]
public int Stretch { get; }
Style
Gets the font style. Treat as an opaque value.
[JsonIgnore]
public int Style { get; }
Fonts
Gets the list of fonts under this family.
[JsonIgnore]
public IReadOnlyList<IFontId> Fonts { get; }
Fields
Instance
The shared instance of Dalamud.Interface.FontIdentifier.DalamudDefaultFontAndFamilyId.
public static readonly DalamudDefaultFontAndFamilyId Instance
Methods
Equals(object?)
public override bool Equals(object? obj)
Returns
System.Boolean
Parameters
| Type | Name |
|---|---|
System.Object | obj |
GetHashCode()
public override int GetHashCode()
Returns
System.Int32
ToString()
public override string ToString()
Returns
System.String
AddToBuildToolkit(IFontAtlasBuildToolkitPreBuild, in SafeFontConfig)
public ImFontPtr AddToBuildToolkit(IFontAtlasBuildToolkitPreBuild tk, in SafeFontConfig config)
Returns
Dalamud.Bindings.ImGui.ImFontPtr
Parameters
| Type | Name |
|---|---|
| Dalamud.Interface.ManagedFontAtlas.IFontAtlasBuildToolkitPreBuild | tk |
| Dalamud.Interface.ManagedFontAtlas.SafeFontConfig | config |
FindBestMatch(int, int, int)
Finds the index of the font inside Dalamud.Interface.FontIdentifier.IFontFamilyId.Fonts that best matches the given parameters.
public int FindBestMatch(int weight, int stretch, int style)
Returns
System.Int32: The index of the font. Guaranteed to be a valid index.
Parameters
| Type | Name | Description |
|---|---|---|
System.Int32 | weight | The weight of the font. |
System.Int32 | stretch | The stretch of the font. |
System.Int32 | style | The style of the font. |