Demo: Add a "Fonts" section for visibility.

This commit is contained in:
ocornut
2025-03-05 17:05:24 +01:00
parent 161e222322
commit 0b71339122
2 changed files with 11 additions and 9 deletions

View File

@@ -1745,6 +1745,7 @@ static void DemoWindowWidgetsFonts()
{
ImFontAtlas* atlas = ImGui::GetIO().Fonts;
ImGui::ShowFontAtlas(atlas);
// FIXME-NEWATLAS: Provide a demo to add/create a procedural font?
ImGui::TreePop();
}
}
@@ -8171,9 +8172,6 @@ void ImGui::ShowAboutWindow(bool* p_open)
// - ShowStyleEditor()
//-----------------------------------------------------------------------------
// Forward declare ShowFontAtlas() which isn't worth putting in public API yet
namespace ImGui { IMGUI_API void ShowFontAtlas(ImFontAtlas* atlas); }
// Demo helper function to select among loaded fonts.
// Here we use the regular BeginCombo()/EndCombo() api which is the more flexible one.
void ImGui::ShowFontSelector(const char* label)