Fonts: if IMGUI_ENABLE_FREETYPE, use library by default for font rasterization

Also renamed IMGUI_DISABLE_STB_TRUETYPE to IMGUI_ENABLE_STB_TRUETYPE
This commit is contained in:
Louis Schnellbach
2021-01-12 09:24:51 +01:00
committed by ocornut
parent 6b32d0ebc7
commit 9417acc20f
5 changed files with 46 additions and 26 deletions

View File

@ -2634,6 +2634,7 @@ struct ImFontAtlas
ImTextureID TexID; // User data to refer to the texture once it has been uploaded to user's graphic systems. It is passed back to you during rendering via the ImDrawCmd structure.
int TexDesiredWidth; // Texture width desired by user before Build(). Must be a power-of-two. If have many glyphs your graphics API have texture size restrictions you may want to increase texture width to decrease height.
int TexGlyphPadding; // Padding between glyphs within texture in pixels. Defaults to 1. If your rendering method doesn't rely on bilinear filtering you may set this to 0.
const char* Builder; // Select font builder/rasterizer. Default to "stb_truetype". Set to "freetype" to enable Freetype (default if IMGUI_ENABLE_FREETYPE is defined).
// [Internal]
// NB: Access texture data via GetTexData*() calls! Which will setup a default font for you.