1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-01-11 00:04:24 +00:00

Fonts: fixed broken support for legacy backend due to a mismatch with initial pre-build baked id.

This commit is contained in:
ocornut 2025-05-11 23:51:45 +02:00 committed by ocornut
parent 65e6039979
commit fad5280d4c
3 changed files with 3 additions and 2 deletions

View file

@ -8657,7 +8657,7 @@ void ImGui::UpdateCurrentFontSize()
// - We may support it better later and remove this rounding.
final_size = GetRoundedFontSize(final_size);
final_size = ImMax(1.0f, final_size);
if (g.Font != NULL)
if (g.Font != NULL && (g.IO.BackendFlags & ImGuiBackendFlags_RendererHasTextures))
g.Font->CurrentRasterizerDensity = g.FontRasterizerDensity;
g.FontBaked = (g.Font != NULL) ? g.Font->GetFontBaked(final_size) : NULL;
g.FontSize = final_size;