s-celles 0aed89e880 FreeType: bake color glyphs (COLR/COLRv1/sbix) as BGRA instead of an empty bitmap
When ImGuiFreeTypeLoaderFlags_LoadColor is set, add FT_LOAD_RENDER to the
FreeType LoadFlags so color glyphs (COLR/COLRv1/sbix/CBDT) produce a BGRA
bitmap immediately during FT_Load_Glyph. In FontBakedLoadGlyph, skip the
subsequent FT_Render_Glyph(slot, FT_RENDER_MODE_NORMAL) when the glyph is
already a bitmap (slot->format == FT_GLYPH_FORMAT_BITMAP), because
re-rendering with FT_RENDER_MODE_NORMAL discards the color layers and, for
pure-COLR glyphs (no traditional outline), yields an empty bitmap -- so
color emoji never bakes and AddText renders nothing.

Monochrome fonts are unaffected: they have no color layers, so
FT_LOAD_COLOR is a no-op for them and the existing FT_RENDER_MODE_NORMAL
path runs as before (slot->format stays FT_GLYPH_FORMAT_OUTLINE until the
explicit FT_Render_Glyph call).
2026-08-17 14:46:57 +02:00
..
2026-02-12 20:06:33 +01:00

misc/cpp/
  InputText() wrappers for C++ standard library (STL) type: std::string.
  This is also an example of how you may wrap your own similar types.

misc/debuggers/
  Helper files for popular debuggers (Visual Studio, GDB, LLDB).
  e.g. With the .natvis file, types like ImVector<> will be displayed nicely in Visual Studio debugger.

misc/fonts/
  Fonts loading/merging instructions (e.g. How to handle glyph ranges, how to merge icons fonts).
  Command line tool "binary_to_compressed_c" to create compressed arrays to embed data in source code.
  Suggested fonts and links.

misc/freetype/
  Font atlas builder/rasterizer using FreeType instead of stb_truetype.
  Benefit from better FreeType rasterization, in particular for small fonts.

misc/single_file/
  Single-file header stub.
  We use this to validate compiling all *.cpp files in a same compilation unit.
  Users of that technique (also called "Unity builds") can generally provide this themselves,
  so we don't really recommend you use this in your projects.