ocornut
ef6beaeff6
Fonts: removed LockSingleSrcConfigIdx which isn't needed anymore since we don't load glyphs in ImFontAtlasBuildAddFont().
2025-06-11 15:47:49 +02:00
ocornut
d8a612f73b
Fonts: Fallback glyph is now lazily loaded on demand (yay!). Moving ImFontBaked:: functions outside of class.
2025-06-11 15:47:49 +02:00
ocornut
c06a7585a3
Fonts: A font source can specify its own loader/backend.
2025-06-11 15:47:41 +02:00
ocornut
1cfc0de31d
Fonts: Core allocates per-baked-per-src backend buffers, to allow having custom backend per font source. Backend BakedInit/Destroy/AddGlyph process a single source.
2025-06-11 15:47:41 +02:00
ocornut
d59f10d7f5
Fonts: reinstated ImFontAtlasBuildSetupFontCreateEllipsisFromDot() compatible with baked system, lazily baked.
2025-06-11 15:47:41 +02:00
ocornut
dc1320df64
Fonts: ImFontFlags: ImFontFlags_NoLoadGlyphs + add ImFontFlags_LockBakedSizes
2025-06-11 15:47:41 +02:00
ocornut
8a8d8a7b38
Fonts: Exposed CompactCache(). Hide ClearCache().
2025-06-11 15:47:35 +02:00
ocornut
eb79e3ab3d
Fonts: Restore a functional AddCustomRectFontGlyph().
2025-06-11 15:47:35 +02:00
ocornut
815553c4b4
Fonts: ImFontConfig: added GlyphExcludeRanges[].
2025-06-11 15:47:35 +02:00
ocornut
842c313db2
Fonts: Reordered ImFont fields.
2025-06-11 15:47:25 +02:00
ocornut
99f6b305c1
Fonts: Baked system, v12: support GlyphOffset / GlyphMinAdvanceX / GlyphMaxAdvanceX by scaling from ref value.
...
Overwriting cfg->PixelSnapH = true; in imgui_freetype is weird.
2025-06-11 15:47:21 +02:00
ocornut
57d345ff80
Textures: Comments around ImTextureID type.
2025-06-11 15:47:00 +02:00
ocornut
daaf0e4ef3
Fonts: Added PushFontSize(), PopFontSize() api. Added font_size param to PushFont() as well.
...
Fonts: Fixed PopFont() recovery.
(To squash into "Added PushFontSize(), PopFontSize() api."
2025-06-11 15:46:28 +02:00
ocornut
80404fae30
Fonts: clarify ClearTexData() as not supported with dynamic atlases.
2025-06-11 15:46:28 +02:00
ocornut
093d01269a
Fonts: Baked system, with auto-bind, v10.
...
# Conflicts:
# imgui_internal.h
2025-06-11 15:46:27 +02:00
ocornut
bd19bc5085
Fonts: Removed BuildClearGlyphs(), conflated with ClearOutputData()
2025-06-11 15:45:14 +02:00
ocornut
2bf6552f2f
Fonts: Fixed/improved support for legacy backend. SetTexID() writes into our ImTextureData to keep the indirection, clear TexIsBuilt.
...
The idea is that a legacy backend can somehow add a if (!atlas->IsBuilt()) ImGui_ImplXXXXX_CreateFontsTexture() call _after_ Render() and some features are supported.
2025-06-11 15:45:14 +02:00
ocornut
ba62becb7d
(Breaking) Fonts: remove ImFontAtlasCustomRect which is now the same as ImTextureRect
2025-06-11 15:45:08 +02:00
ocornut
a509790a1c
Fonts: Added back support for AddCustomRectFontGlyph()
...
Legacy path naturally works.
2025-06-11 15:45:08 +02:00
ocornut
288055180e
Fonts: Comments, remove ImFontAtlas facing BuildGrowTexture(), BuildCompactTexture(). Make IsBuilt() obsolete.
2025-06-11 15:45:07 +02:00
ocornut
8ed4e2dde7
Fonts: Basic heuristic to repack instead of growing. Moved rects count/surface to internals.
2025-06-11 15:45:07 +02:00
ocornut
2137b3448b
Textures: Added atlas's TexMinWidth/TexMinHeight/TexMaxWidth/TexMaxHeight.
...
Fixed ImFontAtlasBuildGetTextureSizeEstimate().
Basic error handling on OOM.
2025-06-11 15:45:01 +02:00
ocornut
b06f3c6d1d
Fonts: turn public facing BuildRegisterGlyph() into ImFontAtlasBuildAddFontGlyph() thats sets up UV.
2025-06-11 15:44:38 +02:00
ocornut
4ff1631b31
Fonts: Rasterizing ellipsis character from dot as one glyph + avoid preloading if it not needed.
...
# Conflicts:
# imgui.cpp
2025-06-11 15:44:37 +02:00
ocornut
a2bc3d81c2
Fonts: Fixed support for multiple contexts.
2025-06-11 15:43:07 +02:00
ocornut
cec3e945f0
Fonts: added ImFontAtlas::RemoveFont(), fixed various leaks.
2025-06-11 15:43:07 +02:00
ocornut
df8450d928
Fonts: marked ImFontAtlas::Build() as obsolete
2025-06-11 15:43:07 +02:00
ocornut
4399599de9
Fonts: ClearCache(), ImFontAtlasBuildGetTextureSizeEstimate(), tweak clearing functions.
2025-06-11 15:43:06 +02:00
ocornut
553b1c301d
Fonts: repack without full reload, discard rectangle, fixed CustomRect api with stable id, remove public BuildInit().
2025-06-11 15:43:01 +02:00
ocornut
076a1ab85c
Fonts: Misc amends, remove _PackNodesFactor, comments.
2025-06-11 15:42:54 +02:00
ocornut
4f27792ffe
(Breaking) Removed atlas->TexDesiredWidth now unnecessary (github 327)
2025-06-11 15:42:54 +02:00
ocornut
0f553c57bd
Fonts: AddFont() actually does the work, so we can handle errors & return an accurate return value.
2025-06-11 15:41:21 +02:00
ocornut
c20e160e0f
Textures: added texture list pointer in ImDrawData.
...
# Conflicts:
# imgui.h
2025-06-11 15:12:02 +02:00
ocornut
208705368e
Textures: Adding a RefCount to textures so backend can avoid destroying them on shutdown if atlas is shared.
2025-06-11 15:05:51 +02:00
ocornut
a21a2e855b
Textures: Single Textures[] array allows backend to not have to care about atlases.
...
# Conflicts:
# imgui.h
2025-06-11 15:05:49 +02:00
ocornut
ee357aaddf
Textures: Add ImTextureUserID_Invalid + introducing SetTexID().
...
Which gives us room for potentially updating ImDrawData during render.
2025-06-11 15:04:02 +02:00
ocornut
2cde9125d6
Fonts: Selecting font config source list done by shared code.
2025-06-11 15:04:02 +02:00
ocornut
0f0473bf1c
Fonts, Textures: main code for ImGuiBackendFlags_RendererHasTextures feature.
...
# Conflicts:
# imgui.h
# imgui_demo.cpp
2025-06-11 15:03:46 +02:00
ocornut
191a728ecc
(Breaking) added ImTextureRef struct. Changed ImDrawCmd::TextureId to TexRef.
...
Softly breaking. May require support from language binding generator.
Rebased and reworked completely on 2025/03/19.
2025-06-11 15:02:36 +02:00
ocornut
c53c9a8644
Clipper: further mitigation/improvements for abnormally large contents ranges (larger than e.g. 2^31). ( #3609 , #8215 )
2025-05-30 21:53:25 +02:00
ocornut
407a0b972e
(Breaking) Fonts: CalcWordWrapPositionA() -> CalcWordWrapPosition(), takes size instead of scale.
...
This will be needed for upcoming changes.
2025-05-23 16:08:00 +02:00
ocornut
143924bbf3
Image(), ImageWithBg(): added extra comments. ( #8131 , #8238 )
2025-05-20 17:53:17 +02:00
ocornut
1ffa7a40ac
TextLinkOpenURL(): added bool return value on click. ( #8645 , #8451 , #7660 )
2025-05-20 17:32:50 +02:00
ocornut
cdb5cbe6f8
(Breaking) Commented out ImGuiListClipper::ForceDisplayRangeByIndices() which was obsoleted in 1.89.6.
...
Amend ecb0aaa
.
2025-05-15 17:44:27 +02:00
ocornut
d93d918eca
(Breaking) Commented out PushAllowKeyboardFocus()/PopAllowKeyboardFocus() which was obsoleted in 1.89.4. ( #3092 )
...
Amend e83fb46
.
2025-05-15 17:43:27 +02:00
ocornut
6d939fcedc
(Breaking) TreeNode: renamed ImGuiTreeNodeFlags_NavLeftJumpsBackHere to ImGuiTreeNodeFlags_NavLeftJumpsToParent for clarity. ( #1079 , #8639 )
2025-05-15 17:35:29 +02:00
ocornut
61242e2e6a
InputText: fixed cursor positioning issue using up/down keys on non-ASCII text. ( #8635 , #7925 )
...
Bug introduced in abd07f6d30
.
Ref https://github.com/nothings/stb/issues/188
2025-05-14 11:37:55 +02:00
ocornut
f484af34c2
Font: rename ImFont::AddRemapChar() parameters for clarity. ( #609 )
2025-05-08 18:05:05 +02:00
ocornut
6a42d6b339
Added wp TextAligned() TextAlignedV(), TextAlignedExV() to internal API. ( #7024 )
2025-04-23 14:39:59 +02:00
ocornut
bf0f586b69
Platform IME: added ImGuiPlatformImeData::WantTextInput, ViewportId. Backends: SDL3: honor WantTextInput. ( #8584 , #7492 , #6341 )
2025-04-22 11:21:02 +02:00