Fonts: add ImFontGlyph::SourceIdx. Extract code out of DebugNodeFont() into DebugNodeFontGlyphesForSrcMask().

(src_mask unused in this commit)
This commit is contained in:
ocornut
2025-06-11 15:57:23 +02:00
parent bcd1a94b89
commit c4fa9bb61f
4 changed files with 62 additions and 48 deletions
+2 -1
View File
@@ -3484,7 +3484,8 @@ struct ImFontGlyph
{
unsigned int Colored : 1; // Flag to indicate glyph is colored and should generally ignore tinting (make it usable with no shift on little-endian as this is used in loops)
unsigned int Visible : 1; // Flag to indicate glyph has no visible pixels (e.g. space). Allow early out when rendering.
unsigned int Codepoint : 30; // 0x0000..0x10FFFF
unsigned int SourceIdx : 4; // Index of source in parent font
unsigned int Codepoint : 26; // 0x0000..0x10FFFF
float AdvanceX; // Horizontal distance to advance cursor/layout position.
float X0, Y0, X1, Y1; // Glyph corners. Offsets from current cursor/layout position.
float U0, V0, U1, V1; // Texture coordinates for the current value of ImFontAtlas->TexRef. Cached equivalent of calling GetCustomRect() with PackId.