README.md (1790B)
1 # imgui_freetype 2 3 Build font atlases using FreeType instead of stb_truetype (which is the default font rasterizer). 4 <br>by @vuhdo, @mikesart, @ocornut. 5 6 ### Usage 7 8 1. Get latest FreeType binaries or build yourself (under Windows you may use vcpkg with `vcpkg install freetype`, `vcpkg integrate install`). 9 2. Add imgui_freetype.h/cpp alongside your project files. 10 3. Add `#define IMGUI_ENABLE_FREETYPE` in your [imconfig.h](https://github.com/ocornut/imgui/blob/master/imconfig.h) file 11 12 ### About Gamma Correct Blending 13 14 FreeType assumes blending in linear space rather than gamma space. 15 See FreeType note for [FT_Render_Glyph](https://www.freetype.org/freetype2/docs/reference/ft2-base_interface.html#FT_Render_Glyph). 16 For correct results you need to be using sRGB and convert to linear space in the pixel shader output. 17 The default Dear ImGui styles will be impacted by this change (alpha values will need tweaking). 18 19 ### Testbed for toying with settings (for developers) 20 21 See https://gist.github.com/ocornut/b3a9ecf13502fd818799a452969649ad 22 23 ### Known issues 24 25 - Oversampling settins are ignored but also not so much necessary with the higher quality rendering. 26 27 ### Comparaison 28 29 Small, thin anti-aliased fonts are typically benefiting a lots from Freetype's hinting: 30  31 32 ### Colorful glyphs/emojis 33 34 You can use the `ImGuiFreeTypeBuilderFlags_LoadColor` flag to load certain colorful glyphs. See 35 ["Using Colorful Glyphs/Emojis"](https://github.com/ocornut/imgui/edit/master/docs/FONTS.md#using-colorful-glyphsemojis) section of FONTS.md. 36 37 