Build font atlases using FreeType instead of stb_truetype (which is the default font rasterizer).
by @vuhdo, @mikesart, @ocornut.
vcpkg install freetype
, vcpkg integrate install
).#define IMGUI_ENABLE_FREETYPE
in your imconfig.h fileFreeType assumes blending in linear space rather than gamma space. See FreeType note for FT_Render_Glyph. For correct results you need to be using sRGB and convert to linear space in the pixel shader output. The default Dear ImGui styles will be impacted by this change (alpha values will need tweaking).
See https://gist.github.com/ocornut/b3a9ecf13502fd818799a452969649ad
Small, thin anti-aliased fonts are typically benefiting a lots from Freetype's hinting: