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
@@ -2327,6 +2328,7 @@ struct ImVector_ImFontPtr_t { int Size; int Capacity; ImFont** Data; }; // Inst
2327
2328
structImVector_ImFontAtlasCustomRect_t { intSize; intCapacity; ImFontAtlasCustomRect*Data; }; // Instantiation of ImVector<ImFontAtlasCustomRect>
2328
2329
structImVector_ImFontConfig_t { intSize; intCapacity; ImFontConfig*Data; }; // Instantiation of ImVector<ImFontConfig>
2329
2330
structImVector_float_t { intSize; intCapacity; float*Data; }; // Instantiation of ImVector<float>
2331
+
structImVector_ImU16_t { intSize; intCapacity; ImU16*Data; }; // Instantiation of ImVector<ImU16>
2330
2332
structImVector_ImFontGlyph_t { intSize; intCapacity; ImFontGlyph*Data; }; // Instantiation of ImVector<ImFontGlyph>
2331
2333
structImVector_ImGuiPlatformMonitor_t { intSize; intCapacity; ImGuiPlatformMonitor*Data; }; // Instantiation of ImVector<ImGuiPlatformMonitor>
2332
2334
structImVector_ImGuiViewportPtr_t { intSize; intCapacity; ImGuiViewport**Data; }; // Instantiation of ImVector<ImGuiViewport*>
@@ -3400,8 +3402,8 @@ struct ImFontConfig_t
3400
3402
boolMergeMode; // false // Merge into previous ImFont, so you can combine multiple inputs font into one ImFont (e.g. ASCII font + icons + Japanese glyphs). You may want to use GlyphOffset.y when merge font of different heights.
3401
3403
boolPixelSnapH; // false // Align every glyph AdvanceX to pixel boundaries. 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.
3402
3404
intFontNo; // 0 // Index of font within TTF/OTF file
3403
-
intOversampleH; // 2// Rasterize at higher quality for sub-pixel positioning. Note the difference between 2 and 3 is minimal. You can reduce this to 1 for large glyphs save memory. Read https://github.com/nothings/stb/blob/master/tests/oversample/README.md for details.
3404
-
intOversampleV; // 1// Rasterize at higher quality for sub-pixel positioning. This is not really useful as we don't use sub-pixel positions on the Y axis.
3405
+
intOversampleH; // 0 (2) // Rasterize at higher quality for sub-pixel positioning. 0 == auto == 1 or 2 depending on size. Note the difference between 2 and 3 is minimal. You can reduce this to 1 for large glyphs save memory. Read https://github.com/nothings/stb/blob/master/tests/oversample/README.md for details.
3406
+
intOversampleV; // 0 (1) // Rasterize at higher quality for sub-pixel positioning. 0 == auto == 1. This is not really useful as we don't use sub-pixel positions on the Y axis.
3405
3407
floatSizePixels; // // Size in pixels for rasterizer (more or less maps to the resulting font height).
3406
3408
ImVec2GlyphExtraSpacing; // 0, 0 // Extra spacing (in pixels) between glyphs when rendered: essentially add to glyph->AdvanceX. Only X axis is supported for now.
3407
3409
ImVec2GlyphOffset; // 0, 0 // Offset all glyphs from this font input.
CIMGUI_APIImFont*ImFontAtlas_AddFontFromMemoryCompressedTTF(ImFontAtlas*self, constvoid*compressed_font_data, intcompressed_font_data_size, floatsize_pixels, constImFontConfig*font_cfg/* = NULL */, constImWchar*glyph_ranges/* = NULL */); // 'compressed_font_data' still owned by caller. Compress with binary_to_compressed_c.cpp.
3541
3543
CIMGUI_APIImFont*ImFontAtlas_AddFontFromMemoryCompressedBase85TTF(ImFontAtlas*self, constchar*compressed_font_data_base85, floatsize_pixels, constImFontConfig*font_cfg/* = NULL */, constImWchar*glyph_ranges/* = NULL */); // 'compressed_font_data_base85' still owned by caller. Compress with binary_to_compressed_c.cpp with -base85 parameter.
3542
3544
CIMGUI_APIvoidImFontAtlas_ClearInputData(ImFontAtlas*self); // Clear input data (all ImFontConfig structures including sizes, TTF data, glyph ranges, etc.) = all the data used to build the texture and fonts.
3545
+
CIMGUI_APIvoidImFontAtlas_ClearFonts(ImFontAtlas*self); // Clear input+output font data (same as ClearInputData() + glyphs storage, UV coordinates).
3543
3546
CIMGUI_APIvoidImFontAtlas_ClearTexData(ImFontAtlas*self); // Clear output texture data (CPU side). Saves RAM once the texture has been copied to graphics memory.
3544
-
CIMGUI_APIvoidImFontAtlas_ClearFonts(ImFontAtlas*self); // Clear output font data (glyphs storage, UV coordinates).
3545
3547
CIMGUI_APIvoidImFontAtlas_Clear(ImFontAtlas*self); // Clear all input and output.
3546
3548
// Build atlas, retrieve pixel data.
3547
3549
// User is in charge of copying the pixels into graphics memory (e.g. create a texture with your engine). Then store your texture handle with SetTexID().
// [Internal] Members: Hot ~20/24 bytes (for CalcTextSize)
3588
-
ImVector_floatIndexAdvanceX; // 12-16 // out // // Sparse. Glyphs->AdvanceX in a directly indexable way (cache-friendly for CalcTextSize functions which only this info, and are often bottleneck in large UI).
3590
+
ImVector_floatIndexAdvanceX; // 12-16 // out // Sparse. Glyphs->AdvanceX in a directly indexable way (cache-friendly for CalcTextSize functions which only this info, and are often bottleneck in large UI).
3589
3591
floatFallbackAdvanceX; // 4 // out // = FallbackGlyph->AdvanceX
3590
-
floatFontSize; // 4 // in // // Height of characters/line, set during loading (don't change after loading)
3592
+
floatFontSize; // 4 // in // Height of characters/line, set during loading (don't change after loading)
3591
3593
3592
3594
// [Internal] Members: Hot ~28/40 bytes (for RenderText loop)
3593
-
ImVector_ImWcharIndexLookup; // 12-16 // out // // Sparse. Index glyphs by Unicode code-point.
3594
-
ImVector_ImFontGlyphGlyphs; // 12-16 // out // // All glyphs.
3595
+
ImVector_ImU16IndexLookup; // 12-16 // out // Sparse. Index glyphs by Unicode code-point.
3596
+
ImVector_ImFontGlyphGlyphs; // 12-16 // out // All glyphs.
3595
3597
constImFontGlyph*FallbackGlyph; // 4-8 // out // = FindGlyph(FontFallbackChar)
3596
3598
3597
3599
// [Internal] Members: Cold ~32/40 bytes
3598
3600
// Conceptually ConfigData[] is the list of font sources merged to create this font.
3599
-
ImFontAtlas*ContainerAtlas; // 4-8 // out // // What we has been loaded into
3600
-
constImFontConfig*ConfigData; // 4-8 // in // // Pointer within ContainerAtlas->ConfigData to ConfigDataCount instances
3601
-
shortConfigDataCount; // 2 // in // ~ 1 // Number of ImFontConfig involved in creating this font. Bigger than 1 when merging multiple font sources into one ImFont.
3601
+
ImFontAtlas*ContainerAtlas; // 4-8 // out // What we has been loaded into
3602
+
constImFontConfig*ConfigData; // 4-8 // in // Pointer within ContainerAtlas->ConfigData to ConfigDataCount instances
3603
+
shortConfigDataCount; // 2 // in // Number of ImFontConfig involved in creating this font. Usually 1, or >1 when merging multiple font sources into one ImFont.
3602
3604
shortEllipsisCharCount; // 1 // out // 1 or 3
3603
-
ImWcharEllipsisChar; // 2-4 // out // = '...'/'.'// Character used for ellipsis rendering.
3604
-
ImWcharFallbackChar; // 2-4 // out // = FFFD/'?' // Character used if a glyph isn't found.
3605
-
floatEllipsisWidth; // 4 // out // Width
3606
-
floatEllipsisCharStep; // 4 // out // Step between characters when EllipsisCount > 0
3607
-
floatScale; // 4 // in // = 1.f // Base font scale, multiplied by the per-window font scale which you can adjust with SetWindowFontScale()
3608
-
floatAscent, Descent; // 4+4 // out // // Ascent: distance from top to bottom of e.g. 'A' [0..FontSize] (unscaled)
3609
-
intMetricsTotalSurface; // 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)
3605
+
ImWcharEllipsisChar; // 2-4 // out // Character used for ellipsis rendering ('...').
3606
+
ImWcharFallbackChar; // 2-4 // out // Character used if a glyph isn't found (U+FFFD, '?')
3607
+
floatEllipsisWidth; // 4 // out // Total ellipsis Width
3608
+
floatEllipsisCharStep; // 4 // out // Step between characters when EllipsisCount > 0
3609
+
floatScale; // 4 // in // Base font scale (1.0f), multiplied by the per-window font scale which you can adjust with SetWindowFontScale()
3610
+
floatAscent, Descent; // 4+4 // out // Ascent: distance from top to bottom of e.g. 'A' [0..FontSize] (unscaled)
3611
+
intMetricsTotalSurface; // 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)
3610
3612
boolDirtyLookupTables; // 1 // out //
3611
3613
ImU8Used8kPagesMap[(IM_UNICODE_CODEPOINT_MAX+1)/8192/8]; // 1 bytes if ImWchar=ImWchar16, 16 bytes if ImWchar==ImWchar32. Store 1-bit for each block of 4K codepoints that has one active glyph. This is mainly used to facilitate iterations across all used codepoints.
0 commit comments