|
|
|
@ -9706,6 +9706,12 @@ void ImFontAtlas::ClearInputData()
|
|
|
|
|
ImGui::MemFree(ConfigData[i].FontData);
|
|
|
|
|
ConfigData[i].FontData = NULL;
|
|
|
|
|
}
|
|
|
|
|
for (int i = 0; i < Fonts.Size; i++)
|
|
|
|
|
if (Fonts[i]->ConfigData >= ConfigData.Data && Fonts[i]->ConfigData < ConfigData.Data + ConfigData.Size)
|
|
|
|
|
{
|
|
|
|
|
Fonts[i]->ConfigData = NULL;
|
|
|
|
|
Fonts[i]->ConfigDataCount = 0;
|
|
|
|
|
}
|
|
|
|
|
ConfigData.clear();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -11260,7 +11266,7 @@ void ImGui::ShowTestWindow(bool* opened)
|
|
|
|
|
for (int i = 0; i < atlas->Fonts.Size; i++)
|
|
|
|
|
{
|
|
|
|
|
ImFont* font = atlas->Fonts[i];
|
|
|
|
|
ImGui::BulletText("Font %d: \'%s\', %.2f px, %d glyphs", i, font->ConfigData[0].Name, font->FontSize, font->Glyphs.Size);
|
|
|
|
|
ImGui::BulletText("Font %d: \'%s\', %.2f px, %d glyphs", i, font->ConfigData ? font->ConfigData[0].Name : "", font->FontSize, font->Glyphs.Size);
|
|
|
|
|
ImGui::TreePush((void*)i);
|
|
|
|
|
if (i > 0) { ImGui::SameLine(); if (ImGui::SmallButton("Set as default")) { atlas->Fonts[i] = atlas->Fonts[0]; atlas->Fonts[0] = font; } }
|
|
|
|
|
ImGui::PushFont(font);
|
|
|
|
|