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

Fonts: Baked system, fix subsequent sources overriding shared font metrics.

This commit is contained in:
ocornut 2025-02-06 13:06:05 +01:00
parent dc1320df64
commit 92993e68c8
2 changed files with 7 additions and 3 deletions

View file

@ -479,8 +479,11 @@ void ImGui_ImplFreeType_FontBakedInit(ImFontAtlas* atlas, ImFontBaked* baked)
bd_baked_data->MaxAdvanceWidth = (float)FT_CEIL(metrics.max_advance) * bd_font_data->InvRasterizationDensity;
// Output
baked->Ascent = bd_baked_data->Ascender;
baked->Descent = bd_baked_data->Descender;
if (src_n == 0)
{
baked->Ascent = bd_baked_data->Ascender;
baked->Descent = bd_baked_data->Descender;
}
}
}