1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-01-09 23:54:20 +00:00

Fonts: adding GetFontBaked() in public API.

This commit is contained in:
ocornut 2025-05-19 18:14:12 +02:00
parent 92ff153763
commit f3780c7354
3 changed files with 11 additions and 5 deletions

View file

@ -2136,9 +2136,9 @@ struct ImGuiContext
ImGuiPlatformIO PlatformIO;
ImGuiStyle Style;
ImVector<ImFontAtlas*> FontAtlases; // List of font atlases used by the context (generally only contains g.IO.Fonts aka the main font atlas)
ImFont* Font; // == FontStack.back().Font
ImFontBaked* FontBaked; // == Font->GetFontBaked(FontSize)
float FontSize; // == FontSizeBeforeScaling * io.FontGlobalScale * font->Scale * g.CurrentWindow->FontWindowScale. Current text height.
ImFont* Font; // Currently bound font. (== FontStack.back().Font)
ImFontBaked* FontBaked; // Currently bound font at currently bound size. (== Font->GetFontBaked(FontSize))
float FontSize; // Currently bound font size == line height (== FontSizeBeforeScaling * io.FontGlobalScale * font->Scale * g.CurrentWindow->FontWindowScale).
float FontSizeBeforeScaling; // == value passed to PushFontSize()
float FontScale; // == FontBaked->Size / Font->FontSize. Scale factor over baked size.
float FontRasterizerDensity; // Current font density. Used by all calls to GetFontBaked().