Fonts: added ImFontAtlas::RemoveFont(), fixed various leaks.

This commit is contained in:
ocornut
2025-06-11 15:43:07 +02:00
parent df8450d928
commit cec3e945f0
4 changed files with 84 additions and 6 deletions
+6
View File
@@ -16484,6 +16484,12 @@ void ImGui::DebugNodeFont(ImFont* font)
}
if (SmallButton("Set as default"))
GetIO().FontDefault = font;
if (font->ContainerAtlas->Fonts.Size > 1 && !font->ContainerAtlas->Locked)
{
SameLine();
if (SmallButton("Remove"))
font->ContainerAtlas->RemoveFont(font);
}
// Display details
SetNextItemWidth(GetFontSize() * 8);