mirror of
https://github.com/ocornut/imgui.git
synced 2025-12-28 00:54:34 +00:00
Fonts: fixed merging a font and specifying a font target in DstFont that's not the last added font (regression in 1.92). (#8912)
This commit is contained in:
@@ -3026,7 +3026,7 @@ ImFont* ImFontAtlas::AddFont(const ImFontConfig* font_cfg_in)
|
||||
else
|
||||
{
|
||||
IM_ASSERT(Fonts.Size > 0 && "Cannot use MergeMode for the first font"); // When using MergeMode make sure that a font has already been added before. You can use ImGui::GetIO().Fonts->AddFontDefault() to add the default imgui font.
|
||||
font = Fonts.back();
|
||||
font = font_cfg_in->DstFont ? font_cfg_in->DstFont : Fonts.back();
|
||||
}
|
||||
|
||||
// Add to list
|
||||
|
||||
Reference in New Issue
Block a user