1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-01-08 23:44:19 +00:00

Fonts: ImFontAtlasFontRebuildOutput() helper.

This commit is contained in:
ocornut 2025-12-22 19:57:21 +01:00
parent d365417e8b
commit d1de937c31
2 changed files with 7 additions and 0 deletions

View file

@ -3607,6 +3607,12 @@ void ImFontAtlasFontDestroyOutput(ImFontAtlas* atlas, ImFont* font)
}
}
void ImFontAtlasFontRebuildOutput(ImFontAtlas* atlas, ImFont* font)
{
ImFontAtlasFontDestroyOutput(atlas, font);
ImFontAtlasFontInitOutput(atlas, font);
}
//-----------------------------------------------------------------------------------------------------------------------------
bool ImFontAtlasFontSourceInit(ImFontAtlas* atlas, ImFontConfig* src)

View file

@ -3903,6 +3903,7 @@ IMGUI_API void ImFontAtlasFontSourceAddToFont(ImFontAtlas* atlas, I
IMGUI_API void ImFontAtlasFontDestroySourceData(ImFontAtlas* atlas, ImFontConfig* src);
IMGUI_API bool ImFontAtlasFontInitOutput(ImFontAtlas* atlas, ImFont* font); // Using FontDestroyOutput/FontInitOutput sequence useful notably if font loader params have changed
IMGUI_API void ImFontAtlasFontDestroyOutput(ImFontAtlas* atlas, ImFont* font);
IMGUI_API void ImFontAtlasFontRebuildOutput(ImFontAtlas* atlas, ImFont* font);
IMGUI_API void ImFontAtlasFontDiscardBakes(ImFontAtlas* atlas, ImFont* font, int unused_frames);
IMGUI_API ImGuiID ImFontAtlasBakedGetId(ImGuiID font_id, float baked_size, float rasterizer_density);