Skip to main content

Interface IFontSpec

Represents a user's choice of font(s).

Not intended for plugins to implement.

Assembly: Dalamud.dll
View Source
Declaration
public interface IFontSpec

Properties

SizePx

Gets the font size in pixels.

View Source
Declaration
float SizePx { get; }

SizePt

Gets the font size in points.

View Source
Declaration
float SizePt { get; }

LineHeightPx

Gets the line height in pixels.

View Source
Declaration
float LineHeightPx { get; }

Methods

CreateFontHandle(IFontAtlas, FontAtlasBuildStepDelegate?)

Creates a font handle corresponding to this font specification.

View Source
Declaration
IFontHandle CreateFontHandle(IFontAtlas atlas, FontAtlasBuildStepDelegate? callback = null)
Returns

Dalamud.Interface.ManagedFontAtlas.IFontHandle: The new font handle.

Parameters
TypeNameDescription
Dalamud.Interface.ManagedFontAtlas.IFontAtlasatlasThe atlas to bind this font handle to.
Dalamud.Interface.ManagedFontAtlas.FontAtlasBuildStepDelegatecallbackOptional callback to be called after creating the font handle.

AddToBuildToolkit(IFontAtlasBuildToolkitPreBuild, ImFontPtr)

Adds this font to the given font build toolkit.

View Source
Declaration
ImFontPtr AddToBuildToolkit(IFontAtlasBuildToolkitPreBuild tk, ImFontPtr mergeFont = default)
Returns

ImGuiNET.ImFontPtr: The added font.

Parameters
TypeNameDescription
Dalamud.Interface.ManagedFontAtlas.IFontAtlasBuildToolkitPreBuildtkThe font build toolkit.
ImGuiNET.ImFontPtrmergeFontThe font to merge to.

ToLocalizedString(string)

Represents this font specification, preferrably in the requested locale.

View Source
Declaration
string ToLocalizedString(string localeCode)
Returns

System.String: The value.

Parameters
TypeNameDescription
System.StringlocaleCodeThe locale code. Must be in lowercase(invariant).