imgui_freetype: Add support for colored glyphs. Font: add support for untinted glyphs (#3369)

Amend 9499afd with missing static inline.
This commit is contained in:
ocornut
2021-01-28 17:26:41 +01:00
parent 24aa6654df
commit 24be26e00e
6 changed files with 44 additions and 30 deletions

View File

@ -2504,8 +2504,9 @@ struct ImFontConfig
// (Note: some language parsers may fail to convert the 31+1 bitfield members, in this case maybe drop store a single u32 or we can rework this)
struct ImFontGlyph
{
unsigned int Codepoint : 31; // 0x0000..0xFFFF
unsigned int Visible : 1; // Flag to allow early out when rendering
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
float AdvanceX; // Distance to next character (= data from font + ImFontConfig::GlyphExtraSpacing.x baked in)
float X0, Y0, X1, Y1; // Glyph corners
float U0, V0, U1, V1; // Texture coordinates