You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: imgui.h
+10-10
Original file line number
Diff line number
Diff line change
@@ -1914,8 +1914,8 @@ struct ImFontConfig
1914
1914
bool FontDataOwnedByAtlas; // true // TTF/OTF data ownership taken by the container ImFontAtlas (will delete memory itself).
1915
1915
int FontNo; // 0 // Index of font within TTF/OTF file
1916
1916
float SizePixels; // // Size in pixels for rasterizer (more or less maps to the resulting font height).
1917
-
int OversampleH; // 3 // Rasterize at higher quality for sub-pixel positioning. We don't use sub-pixel positions on the Y axis.
1918
-
int OversampleV; // 1 // Rasterize at higher quality for sub-pixel positioning. We don't use sub-pixel positions on the Y axis.
1917
+
int OversampleH; // 3 // Rasterize at higher quality for sub-pixel positioning. Read https://github.com/nothings/stb/blob/master/tests/oversample/README.md for details.
1918
+
int OversampleV; // 1 // Rasterize at higher quality for sub-pixel positioning. We don't use sub-pixel positions on the Y axis.
1919
1919
bool PixelSnapH; // false // Align every glyph to pixel boundary. Useful e.g. if you are merging a non-pixel aligned font with the default font. If enabled, you can set OversampleH/V to 1.
1920
1920
ImVec2 GlyphExtraSpacing; // 0, 0 // Extra spacing (in pixels) between glyphs. Only X axis is supported for now.
1921
1921
ImVec2 GlyphOffset; // 0, 0 // Offset all glyphs from this font input.
@@ -2080,7 +2080,7 @@ struct ImFontAtlas
2080
2080
structImFont
2081
2081
{
2082
2082
// Members: Hot ~24/32 bytes (for CalcTextSize)
2083
-
ImVector<float> IndexAdvanceX; // 12/16 // out // // Sparse. Glyphs->AdvanceX in a directly indexable way (more cache-friendly, for CalcTextSize functions which are often bottleneck in large UI).
2083
+
ImVector<float> IndexAdvanceX; // 12/16 // out // // Sparse. Glyphs->AdvanceX in a directly indexable way (cache-friendly for CalcTextSize functions which only this this info, and are often bottleneck in large UI).
2084
2084
float FontSize; // 4 // in // <user set> // Height of characters, set during loading (don't change after loading)
2085
2085
float FallbackAdvanceX; // 4 // out // = FallbackGlyph->AdvanceX
2086
2086
ImWchar FallbackChar; // 2 // in // = '?' // Replacement glyph if one isn't found. Only set via SetFallbackChar()
@@ -2093,21 +2093,18 @@ struct ImFont
2093
2093
2094
2094
// Members: Cold ~28/40 bytes
2095
2095
ImFontAtlas* ContainerAtlas; // 4-8 // out // // What we has been loaded into
2096
-
ImFontConfig* ConfigData; // 4-8 // in // // Pointer within ContainerAtlas->ConfigData
2096
+
constImFontConfig* ConfigData; // 4-8 // in // // Pointer within ContainerAtlas->ConfigData
2097
2097
short ConfigDataCount; // 2 // in // ~ 1 // Number of ImFontConfig involved in creating this font. Bigger than 1 when merging multiple font sources into one ImFont.
2098
2098
bool DirtyLookupTables; // 1 // out //
2099
2099
float Scale; // 4 // in // = 1.f // Base font scale, multiplied by the per-window font scale which you can adjust with SetWindowFontScale()
2100
-
float Ascent, Descent; // 8 // out // Ascent: distance from top to bottom of e.g. 'A' [0..FontSize]
2101
-
int MetricsTotalSurface;// 4 // out // Total surface in pixels to get an idea of the font rasterization/texture cost (not exact, we approximate the cost of padding between glyphs)
2100
+
float Ascent, Descent; // 8 // out // // Ascent: distance from top to bottom of e.g. 'A' [0..FontSize]
2101
+
int MetricsTotalSurface;// 4 // out // // Total surface in pixels to get an idea of the font rasterization/texture cost (not exact, we approximate the cost of padding between glyphs)
2102
2102
2103
2103
// Methods
2104
2104
IMGUI_API ImFont();
2105
2105
IMGUI_API ~ImFont();
2106
-
IMGUI_API voidClearOutputData();
2107
-
IMGUI_API voidBuildLookupTable();
2108
2106
IMGUI_API const ImFontGlyph*FindGlyph(ImWchar c) const;
2109
2107
IMGUI_API const ImFontGlyph*FindGlyphNoFallback(ImWchar c) const;
IMGUI_API voidAddRemapChar(ImWchar dst, ImWchar src, bool overwrite_dst = true); // Makes 'dst' character/glyph points to 'src' character/glyph. Currently needs to be called AFTER fonts have been built.
0 commit comments