Fonts: Baked system, v12: support GlyphOffset / GlyphMinAdvanceX / GlyphMaxAdvanceX by scaling from ref value.

Overwriting cfg->PixelSnapH = true; in imgui_freetype is weird.
This commit is contained in:
ocornut
2025-02-03 17:46:59 +01:00
parent df694c89b0
commit 99f6b305c1
4 changed files with 27 additions and 10 deletions

View File

@@ -8602,7 +8602,7 @@ void ImGui::SetCurrentFont(ImFont* font, float font_size)
{
ImGuiContext& g = *GImGui;
g.Font = font;
//g.FontBaseSize = ImMax(1.0f, g.IO.FontGlobalScale * g.FontBaked->FontSize * g.Font->Scale);
//g.FontBaseSize = ImMax(1.0f, g.IO.FontGlobalScale * g.FontBaked->Size * g.Font->Scale);
g.FontSize = font_size;// g.CurrentWindow ? g.CurrentWindow->CalcFontSize() : 0.0f;
if (font != NULL)
{