Pascal Thomet
18dca11dd0
Backends: GLFW, SDL2: ImplXXX_GetContentScaleXXX() helpers return 1.0f on emscripten / apple / android ( #8742 , #8733 )
...
We can divide platforms into two cases based on how they report screen geometry:
- Case 1: Platforms which report screen size in "physical pixels": Windows (for "Dpi aware" apps), Linux (with Wayland)
- Case 2: Platforms which report screen size in "density-independent pixels": macOS, iOS, Android, emscripten
As a consequence, there are two important things we need to know:
- FramebufferScale: The scaling factor FrameBufferSize / ScreenSize
- In case 1, the framebuffer size is equal to the screen size and DisplayFramebufferScale=1.
- In case 2, the framebuffer size is equal to the screen size multiplied by a factor, for example DisplayFramebufferScale=2.
- ContentScale The scaling factor for the content that we will display
- In case 1, the content scale will often need to be > 1 (e.g., 2), because we will need to display bigger elements so that they show with a correct physical size on the screen.
- In case 2, the content scale is equal to 1
This commit fixes ContentScale for platforms in case 2.
2025-07-08 15:53:42 +02:00
ocornut
495d6f1e39
Undef 'Status' in main header file. ( #8751 , #8765 )
2025-07-07 14:56:50 +02:00
Matthew Pohlmann
0448428322
Fonts: Change ImFontConfig::FontNo back to int from S8 ( #8775 )
...
When used with FreeType this value is passed as `face_index` which needs to be 32-bits.
# Conflicts:
# docs/CHANGELOG.txt
2025-07-05 19:25:45 +02:00
ocornut
b7e5d76c79
Fonts: added ImFontAtlas::SetFontLoader() to dynamically change font loader at runtime without using internal API. ( #8752 , #8465 )
2025-06-30 20:01:02 +02:00
ocornut
bc051dcf91
Textures: Fixed support for #define ImTextureID_Invalid
to non-zero value.
2025-06-27 17:03:13 +02:00
ocornut
47570d045d
Docs: update Backends with direction for implementing RenderDrawData function and supporting ImGuiBackendFlags_RendererHasTextures. ( #8735 , #8465 )
2025-06-27 15:03:10 +02:00
ocornut
f18aea5246
Version 1.92.1 WIP
2025-06-27 13:30:45 +02:00
Aidan Sun
4f4bc7cc8f
Replace IMGUI_API with inline for PushTextureID() and PopTextureID() ( #8729 )
2025-06-26 09:46:54 +02:00
ocornut
673eb7de96
Version 1.92.0
2025-06-25 18:19:56 +02:00
ocornut
6f21bed66d
Fonts: removing assert from legacy PushFont() to mirror new PushFont(). for consistency.
2025-06-25 16:23:06 +02:00
ocornut
d8c6953710
Fonts: comments.
2025-06-25 12:10:13 +02:00
ocornut
89b5a2c3d5
(Breaking) Fonts: removed ImFontFlags_DefaultToLegacySize.
2025-06-24 19:10:10 +02:00
ocornut
97e0d59619
(Breaking) Fonts: removed PushFontSize(), PopFontSize().
2025-06-24 19:09:51 +02:00
ocornut
ca72eb0596
(Breaking) Fonts: obsolete PushFont() default parameter.
2025-06-24 19:09:28 +02:00
ocornut
0218ddd575
Fonts: moved GetFont(), GetFontSize(), GetFontBaked() to higher section.
2025-06-24 15:00:42 +02:00
ocornut
a49ddaac89
Fonts: add comments and examples for GlyphExcludeRanges[].
2025-06-24 11:06:41 +02:00
ocornut
2f9c518ca8
Textures: ImTextureData::GetPixels() returns void* for clarity.
2025-06-20 15:17:13 +02:00
ocornut
3a964d18e0
Comments on ImGuiMod_XXXX and ImGuiKey_GamepadXXXX values.
2025-06-20 10:11:07 +02:00
ocornut
b2c73596ae
InputText: fixed a buffer overrun that could happen when using dynamically resizing buffers. ( #8689 )
2025-06-17 20:11:22 +02:00
ocornut
08bb348142
Misc: removed static linkage from operators to facilitate using in C++ modules. ( #8682 , #8358 )
2025-06-17 17:09:26 +02:00
ocornut
041abe8522
Revert "Misc: removed static linkage from operators to facilitate using in C++ modules. ( #8682 , #8358 ) [@radjkarl]"
...
This reverts commit 39a90ac4d6
.
2025-06-17 14:57:39 +02:00
ocornut
39a90ac4d6
Misc: removed static linkage from operators to facilitate using in C++ modules. ( #8682 , #8358 ) [@radjkarl]
2025-06-17 14:52:34 +02:00
ocornut
96be957315
Docs: update Changelog, FAQ, Fonts docs.
2025-06-11 17:40:10 +02:00
ocornut
cc3d4cab21
(Breaking) renamed ImFontConfig::FontBuilderFlags -> FontLoaderFlags. ImFontAtlas::FontBuilderFlags -> FontLoaderFlags. ImGuiFreeTypeBuilderFlags -> ImGuiFreeTypeLoaderFlags.
2025-06-11 16:42:31 +02:00
ocornut
29fbf3c1ec
Fonts: demote ImFont::GetFontBaked() as slighty internal.
2025-06-11 16:25:17 +02:00
ocornut
02f58b3207
Fonts: AddFont() functions now allow size_pixels==0.0f (only required when using certain functions)
...
Fonts: AddFont() funcitons allow size_pixels==0 for merged fonts.
2025-06-11 16:24:48 +02:00
ocornut
2d2b1cee6b
Fonts: internals: renamed g.FontSizeBeforeScaling to g.FontSizeBase for consistency.
...
# Conflicts:
# imgui_internal.h
2025-06-11 16:10:45 +02:00
ocornut
3c27c643a9
Fonts: internals: renamed g.FontScale to g.FontBakedScale for clarity. Comments.
2025-06-11 16:10:18 +02:00
ocornut
d85e22d205
Added style.FontScaleDpi which is the field overwritten by ImGuiConfigFlags_DpiEnableScaleFonts.
...
# Conflicts:
# imgui.cpp
# imgui.h
# imgui_demo.cpp
2025-06-11 16:09:56 +02:00
ocornut
8766efcba6
(Breaking) Renamed io.FontGlobalScale to style.FontScaleMain.
...
# Conflicts:
# imgui.cpp
2025-06-11 16:07:21 +02:00
ocornut
80c08f2286
(Breaking) Fonts: obsoleting SetWindowFontScale().
...
+ Comments
# Conflicts:
# imgui.cpp
2025-06-11 16:07:05 +02:00
ocornut
59a11363a5
Fonts: ground work for allowing SizePixels to be optional.
2025-06-11 16:06:24 +02:00
ocornut
1e118ab891
Fonts: added ImGuiStyle::FontSizeBase. Ensuring PushFontSize() works before main loop and across NewFrame().
...
# Conflicts:
# imgui.cpp
2025-06-11 16:06:21 +02:00
ocornut
033cdc4133
Fonts: comments and slight packing of ImFontConfig fields.
2025-06-11 16:06:00 +02:00
ocornut
69547bd4bd
Fonts: ImFont::DefaultSize -> ImFont::LegacySize. ImFontFlags_UseDefaultSize -> ImFontFlags_DefaultToLegacySize.
2025-06-11 16:06:00 +02:00
ocornut
e3860aa6ac
(Breaking) Fonts: removing obsolete ImFont::Scale.
2025-06-11 16:05:54 +02:00
ocornut
25f9c318e3
Fonts: added "Input Glyphs Overlap Detection Tool". Added "Clear bakes", "Clear unused" buttons. Move code.
2025-06-11 16:05:54 +02:00
ocornut
83aad81279
Fonts: comments + made IMGUI_DEBUG_LOG_FONT() work without an ImGui context.
2025-06-11 16:02:10 +02:00
ocornut
f3780c7354
Fonts: adding GetFontBaked() in public API.
2025-06-11 16:02:10 +02:00
ocornut
5ee9845559
Fonts: automatically set current rasterizer density to viewport density. Effectively should fix most things on macOS.
...
# Conflicts:
# imgui.cpp
# imgui.h
2025-06-11 16:02:09 +02:00
ocornut
ea756ede16
Fonts: reorder ImFontFlags according likelihood of being useful.
2025-06-11 15:59:20 +02:00
ocornut
1b51a88bba
Fonts: moved compare operators to internal. Removed commented out ones aimed legacy backends: not needed anymore since we didn't rename ImTextureID.
2025-06-11 15:59:20 +02:00
ocornut
39f6c793b3
Fonts: proof of concept support for user textures.
...
# Conflicts:
# imgui.h
# imgui_internal.h
2025-06-11 15:59:19 +02:00
ocornut
91ed6e67b4
Fonts: fixed support for multiple atlases.
...
Moved FontAtlasOwnedByContext to OwnerContext
# Conflicts:
# imgui.cpp
# imgui_internal.h
2025-06-11 15:58:29 +02:00
ocornut
fad5280d4c
Fonts: fixed broken support for legacy backend due to a mismatch with initial pre-build baked id.
2025-06-11 15:57:44 +02:00
ocornut
f6735c223c
Fonts: remove ImFontHooks in favor of a AddRemapChar() implementation.
2025-06-11 15:57:35 +02:00
ocornut
89e880dfd1
Fonts: adding ImFontHooks for codepoint remapping.
2025-06-11 15:57:35 +02:00
ocornut
b32ef3c05d
Fonts: make RasterizerDensity a dynamic field. (temporarily exposed as SetFontRasterizerDensity()).
...
# Conflicts:
# imgui.cpp
# imgui.h
2025-06-11 15:57:35 +02:00
ocornut
8140a9d8a6
Fonts: comments on ImTextureData fields.
2025-06-11 15:57:35 +02:00
ocornut
2b0d49a905
Fonts: make ImFont::Sources a vector.
...
Later it should become a ImSpan<>
2025-06-11 15:57:23 +02:00