From 94c888ebda6f0123dbf89b27f109298d0818d757 Mon Sep 17 00:00:00 2001 From: ocornut Date: Mon, 7 Jul 2025 15:27:47 +0200 Subject: [PATCH] Docs: update 1.92.0 changelogs to cover more internal fields. (#8764) --- docs/CHANGELOG.txt | 6 ++++++ imgui.cpp | 2 ++ 2 files changed, 8 insertions(+) diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index cdb7da4e6..d53af355d 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -196,6 +196,7 @@ Breaking changes: While in theory a vast majority of users shouldn't be affected, some use cases or extensions might be. Among other things: - ImDrawCmd::TextureId has been changed to ImDrawCmd::TexRef. + - ImFontAtlas::TexID has been changed to ImFontAtlas::TexRef. - ImFontAtlas::ConfigData[] has been renamed to ImFontAtlas::Sources[]. - ImFont::ConfigData[], ConfigDataCount has been renamed to Sources[], SourceCount. - Each ImFont has a number of ImFontBaked instances corresponding to actively used @@ -213,6 +214,11 @@ Breaking changes: g.Font == ImGui::GetFont() g.FontSize == ImGui::GetFontSize() g.FontBaked == ImGui::GetFontBaked() == ImGui::GetFont()->GetFontBaked(ImGui::GetFontSize()) + - Fields moved from ImFontAtlas to ImTextureData + - ImFontAtlas->TexWidth -> ImFontAtlas->TexData->Width + - ImFontAtlas->TexHeight -> ImFontAtlas->TexData->Height + - ImFontAtlas->TexPixelsAlpha8 -> ImFontAtlas->TexData->GetPixels() (when ImFontAtlas::TexDesiredFormat == ImTextureFormat_Alpha8) + - ImFontAtlas->TexPixelsRGBA32 -> ImFontAtlas->TexData->GetPixels() (when ImFontAtlas::TexDesiredFormat == ImTextureFormat_RGBA32) Please report if you are affected! - Fonts: (users of imgui_freetype) - renamed ImFontAtlas::FontBuilderFlags to ImFontAtlas::FontLoaderFlags. diff --git a/imgui.cpp b/imgui.cpp index f34ad7969..0a8582686 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -445,10 +445,12 @@ IMPLEMENTING SUPPORT for ImGuiBackendFlags_RendererHasTextures: - Fonts: obsoleted ImFont::Scale which is not useful anymore. - Fonts: generally reworked Internals of ImFontAtlas and ImFont. While in theory a vast majority of users shouldn't be affected, some use cases or extensions might be. Among other things: - ImDrawCmd::TextureId has been changed to ImDrawCmd::TexRef. + - ImFontAtlas::TexID has been changed to ImFontAtlas::TexRef. - ImFontAtlas::ConfigData[] has been renamed to ImFontAtlas::Sources[] - ImFont::ConfigData[], ConfigDataCount has been renamed to Sources[], SourceCount. - Each ImFont has a number of ImFontBaked instances corresponding to actively used sizes. ImFont::GetFontBaked(size) retrieves the one for a given size. - Fields moved from ImFont to ImFontBaked: IndexAdvanceX[], Glyphs[], Ascent, Descent, FindGlyph(), FindGlyphNoFallback(), GetCharAdvance(). + - Fields moved from ImFontAtlas to ImFontAtlas->Tex: ImFontAtlas::TexWidth => TexData->Width, ImFontAtlas::TexHeight => TexData->Height, ImFontAtlas::TexPixelsAlpha8/TexPixelsRGBA32 => TexData->GetPixels(). - Widget code may use ImGui::GetFontBaked() instead of ImGui::GetFont() to access font data for current font at current font size (and you may use font->GetFontBaked(size) to access it for any other size.) - Fonts: (users of imgui_freetype): renamed ImFontAtlas::FontBuilderFlags to ImFontAtlas::FontLoaderFlags. Renamed ImFontConfig::FontBuilderFlags to ImFontConfig::FontLoaderFlags. Renamed ImGuiFreeTypeBuilderFlags to ImGuiFreeTypeLoaderFlags. If you used runtime imgui_freetype selection rather than the default IMGUI_ENABLE_FREETYPE compile-time option: Renamed/reworked ImFontBuilderIO into ImFontLoader. Renamed ImGuiFreeType::GetBuilderForFreeType() to ImGuiFreeType::GetFontLoader().