mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-07 22:03:19 +00:00
(Breaking) Fonts: remove ImFontConfig::PixelSnapV. Post-rescale GlyphOffset is always rounded.
Amend99f6b305c,99bca397d8.
This commit is contained in:
@@ -394,13 +394,13 @@ IMPLEMENTING SUPPORT for ImGuiBackendFlags_RendererHasTextures:
|
||||
When you are not sure about an old symbol or function name, try using the Search/Find function of your IDE to look for comments or references in all imgui files.
|
||||
You can read releases logs https://github.com/ocornut/imgui/releases for more details.
|
||||
|
||||
- 2025/12/23 (1.92.6) - Fonts: removed ImFontConfig::PixelSnapV added in 1.92 which turns out is unnecessary (and misdocumented). Post-rescale GlyphOffset is always rounded.
|
||||
- 2025/12/17 (1.92.6) - Renamed helper macro IM_ARRAYSIZE() -> IM_COUNTOF(). Kept redirection/legacy name for now.
|
||||
- 2025/12/11 (1.92.6) - Hashing: handling of "###" operator to reset to seed within a string identifier doesn't include the "###" characters in the output hash anymore.
|
||||
- Before: GetID("Hello###World") == GetID("###World") != GetID("World");
|
||||
- Now: GetID("Hello###World") == GetID("###World") == GetID("World");
|
||||
- This has the property of facilitating concatenating and manipulating identifiers using "###", and will allow fixing other dangling issues.
|
||||
- This will invalidate hashes (stored in .ini data) for Tables and Windows!
|
||||
that are using the "###" operators. (#713, #1698)
|
||||
- This will invalidate hashes (stored in .ini data) for Tables and Windows that are using the "###" operators. (#713, #1698)
|
||||
- 2025/11/24 (1.92.6) - Fonts: Fixed handling of `ImFontConfig::FontDataOwnedByAtlas = false` which did erroneously make a copy of the font data, essentially defeating the purpose of this flag and wasting memory.
|
||||
(trivia: undetected since July 2015, this is perhaps the oldest bug in Dear ImGui history, albeit for a rarely used feature, see #9086)
|
||||
HOWEVER, fixing this bug is likely to surface bugs in user code using `FontDataOwnedByAtlas = false`.
|
||||
@@ -1265,7 +1265,7 @@ IMPLEMENTING SUPPORT for ImGuiBackendFlags_RendererHasTextures:
|
||||
#define IMGUI_DEBUG_NAV_RECTS 0 // Display the reference navigation rectangle for each window
|
||||
|
||||
// Default font size if unspecified in both style.FontSizeBase and AddFontXXX() calls.
|
||||
static const float FONT_DEFAULT_SIZE = 20.0f;
|
||||
static const float FONT_DEFAULT_SIZE_BASE = 20.0f;
|
||||
|
||||
// When using Ctrl+Tab (or Gamepad Square+L/R) we delay the visual a little in order to reduce visual noise doing a fast switch.
|
||||
static const float NAV_WINDOWING_HIGHLIGHT_DELAY = 0.20f; // Time before the highlight and screen dimming starts fading in
|
||||
@@ -8903,7 +8903,7 @@ void ImGui::UpdateFontsNewFrame()
|
||||
// Apply default font size the first time
|
||||
ImFont* font = ImGui::GetDefaultFont();
|
||||
if (g.Style.FontSizeBase <= 0.0f)
|
||||
g.Style.FontSizeBase = (font->LegacySize > 0.0f ? font->LegacySize : FONT_DEFAULT_SIZE);
|
||||
g.Style.FontSizeBase = (font->LegacySize > 0.0f ? font->LegacySize : FONT_DEFAULT_SIZE_BASE);
|
||||
|
||||
// Set initial font
|
||||
g.Font = font;
|
||||
|
||||
Reference in New Issue
Block a user