mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 12:08:47 +02:00
@ -1461,15 +1461,9 @@ ImFont* ImFontAtlas::AddFont(const ImFontConfig* font_cfg)
|
||||
|
||||
// Create new font
|
||||
if (!font_cfg->MergeMode)
|
||||
{
|
||||
ImFont* font = (ImFont*)ImGui::MemAlloc(sizeof(ImFont));
|
||||
IM_PLACEMENT_NEW(font) ImFont();
|
||||
Fonts.push_back(font);
|
||||
}
|
||||
Fonts.push_back(IM_NEW(ImFont));
|
||||
else
|
||||
{
|
||||
IM_ASSERT(!Fonts.empty()); // 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.
|
||||
}
|
||||
|
||||
ConfigData.push_back(*font_cfg);
|
||||
ImFontConfig& new_font_cfg = ConfigData.back();
|
||||
|
Reference in New Issue
Block a user