mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 12:08:47 +02:00
ImFont: comments, minor bits
This commit is contained in:
32
imgui.h
32
imgui.h
@ -1175,27 +1175,27 @@ struct ImFontAtlas
|
||||
struct ImFont
|
||||
{
|
||||
// Members: Settings
|
||||
float FontSize; // <user set> // Height of characters, set during loading (don't change after loading)
|
||||
float Scale; // = 1.0f // Base font scale, multiplied by the per-window font scale which you can adjust with SetFontScale()
|
||||
ImVec2 DisplayOffset; // = (0.0f,0.0f) // Offset font rendering by xx pixels
|
||||
ImWchar FallbackChar; // = '?' // Replacement glyph if one isn't found. Only set via SetFallbackChar()
|
||||
float FontSize; // <user set> // Height of characters, set during loading (don't change after loading)
|
||||
float Scale; // = 1.0f // Base font scale, multiplied by the per-window font scale which you can adjust with SetFontScale()
|
||||
ImVec2 DisplayOffset; // = (0.0f,0.0f) // Offset font rendering by xx pixels
|
||||
ImWchar FallbackChar; // = '?' // Replacement glyph if one isn't found. Only set via SetFallbackChar()
|
||||
|
||||
// Members: Runtime data
|
||||
struct Glyph
|
||||
{
|
||||
ImWchar Codepoint;
|
||||
float XAdvance;
|
||||
float X0, Y0, X1, Y1;
|
||||
float U0, V0, U1, V1; // Texture coordinates
|
||||
ImWchar Codepoint;
|
||||
float XAdvance;
|
||||
float X0, Y0, X1, Y1;
|
||||
float U0, V0, U1, V1; // Texture coordinates
|
||||
};
|
||||
float Ascent; // Distance from top to bottom of e.g. 'A' [0..FontSize]
|
||||
float Descent; //
|
||||
ImFontAtlas* ContainerAtlas; // What we has been loaded into
|
||||
ImVector<Glyph> Glyphs;
|
||||
const Glyph* FallbackGlyph; // == FindGlyph(FontFallbackChar)
|
||||
float FallbackXAdvance; //
|
||||
ImVector<float> IndexXAdvance; // Glyphs->XAdvance directly indexable (for CalcTextSize functions which are often bottleneck in large UI)
|
||||
ImVector<int> IndexLookup; // Index glyphs by Unicode code-point
|
||||
float Ascent; // Distance from top to bottom of e.g. 'A' [0..FontSize]
|
||||
float Descent; //
|
||||
ImFontAtlas* ContainerAtlas; // What we has been loaded into
|
||||
ImVector<Glyph> Glyphs;
|
||||
const Glyph* FallbackGlyph; // == FindGlyph(FontFallbackChar)
|
||||
float FallbackXAdvance; //
|
||||
ImVector<float> IndexXAdvance; // Sparse. Glyphs->XAdvance directly indexable (for CalcTextSize functions which are often bottleneck in large UI)
|
||||
ImVector<int> IndexLookup; // Sparse. Index glyphs by Unicode code-point
|
||||
|
||||
// Methods
|
||||
IMGUI_API ImFont();
|
||||
|
Reference in New Issue
Block a user