From bee2720faac5f33401fcda7fa9eb51113d13e8d6 Mon Sep 17 00:00:00 2001 From: ocornut Date: Wed, 8 Oct 2025 18:44:07 +0200 Subject: [PATCH] Docs: clarify meaning/purpose of IMGUI_ENABLE_FREETYPE. (#8993) --- imconfig.h | 1 + misc/freetype/README.md | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/imconfig.h b/imconfig.h index 4dab1b604..0e7cf6182 100644 --- a/imconfig.h +++ b/imconfig.h @@ -83,6 +83,7 @@ //---- Use FreeType to build and rasterize the font atlas (instead of stb_truetype which is embedded by default in Dear ImGui) // Requires FreeType headers to be available in the include path. Requires program to be compiled with 'misc/freetype/imgui_freetype.cpp' (in this repository) + the FreeType library (not provided). +// Note that imgui_freetype.cpp may be used _without_ this define, if you manually call ImFontAtlas::SetFontLoader(). The define is simply a convenience. // On Windows you may use vcpkg with 'vcpkg install freetype --triplet=x64-windows' + 'vcpkg integrate install'. //#define IMGUI_ENABLE_FREETYPE diff --git a/misc/freetype/README.md b/misc/freetype/README.md index e1bd0198b..6ea6ad1ae 100644 --- a/misc/freetype/README.md +++ b/misc/freetype/README.md @@ -7,7 +7,7 @@ Build font atlases using FreeType instead of stb_truetype (which is the default 1. Get latest FreeType binaries or build yourself (under Windows you may use vcpkg with `vcpkg install freetype --triplet=x64-windows`, `vcpkg integrate install`). 2. Add imgui_freetype.h/cpp alongside your project files. -3. Add `#define IMGUI_ENABLE_FREETYPE` in your [imconfig.h](https://github.com/ocornut/imgui/blob/master/imconfig.h) file +3. Add `#define IMGUI_ENABLE_FREETYPE` in your [imconfig.h](https://github.com/ocornut/imgui/blob/master/imconfig.h) file to make Dear ImGui automatically use the imgui_freetype loader. If your copy Dear ImGui is precompiled, you can always enable imgui_freetype by calling ImFontAtlas::SetFontLoader(). ### About Gamma Correct Blending