Commit graph

249 commits

Author SHA1 Message Date
ocornut
0bb29b821d WIP - Fonts: change uses of ImFontAtlasRect to ImTextureRect for simplicity. 2025-04-02 12:08:38 +02:00
ocornut
8097e63d4b WIP - Fonts: fixed memory leaks, shutting down font loader, and on AddFont() failure in Freetype backend. 2025-04-02 12:08:37 +02:00
ocornut
15cfb4ed01 WIP - Fonts: fixed a bug using size specified by secondary font sources. 2025-04-02 12:08:37 +02:00
ocornut
26cc0cbc54 WIP - Added UI to edit FreeType loader flags. Added ImFontAtlasBuildReloadAll() / ImFontAtlasBuildReloadFont() 2025-04-02 12:08:37 +02:00
ocornut
1beaabb4d0 WIP - imgui_freetype: no need to store metrics locally. 2025-03-31 17:37:41 +02:00
ocornut
5b0ff5e36a WIP - Rework ImFontLoader signatures.
InitBaked may return false to signify this size is not supported.
2025-03-31 17:37:41 +02:00
ocornut
8d3f361b02 WIP - 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-03-31 17:37:41 +02:00
ocornut
8c7fbbc6ad WIP - Added ImFontAtlasBakedSetFontGlyphBitmap(). 2025-03-31 17:37:41 +02:00
ocornut
4f8f7ff999 WIP - Baked system, fix subsequent sources overriding shared font metrics. 2025-03-31 17:37:41 +02:00
ocornut
9b583b9da2 WIP - ImFontConfig: added GlyphExcludeRanges 2025-03-31 17:37:41 +02:00
ocornut
ad9bff0b4c WIP - Baked system, v12: support GlyphOffset / GlyphMinAdvanceX / GlyphMaxAdvanceX by scaling from ref value.
Overwriting cfg->PixelSnapH = true; in imgui_freetype is weird.
2025-03-31 17:37:41 +02:00
ocornut
523e4ae0e2 WIP - Baked system, with auto-bind, v10. 2025-03-31 17:37:40 +02:00
ocornut
00e4d681f1 WIP - Added atlas's TexMinWidth/TexMinHeight/TexMaxWidth/TexMaxHeight.
Fixed ImFontAtlasBuildGetTextureSizeEstimate().
Basic error handling on OOM.
2025-03-31 17:37:39 +02:00
ocornut
4c0c7c1f39 WIP - Turn public facing BuildRegisterGlyph() into ImFontAtlasBuildAddFontGlyph() thats sets up UV. 2025-03-31 17:37:39 +02:00
ocornut
50b2a81ee6 WIP - Use a structure for post-processing - easier to pass things around and iterate on. 2025-03-31 17:37:39 +02:00
ocornut
49e35f0089 imgui_freetype: Removing old code. 2025-03-31 17:37:38 +02:00
ocornut
cf6b4c76c4 imgui_freetype: Added Freetype implementation for new architecture. 2025-03-31 17:37:38 +02:00
ocornut
e8cda61bc1 WIP - Main code for ImGuiBackendFlags_RendererHasTextures feature. 2025-03-31 14:53:54 +02:00
ocornut
889b03b320 WIP (Breaking) added ImTextureRef struct.
Softly breaking. May require support from language binding generator.
Rebased and reworked completely on 2025/03/19.
2025-03-31 14:53:54 +02:00
ocornut
df5690d91a Merge branch 'master' into docking
Some checks are pending
build / Linux (push) Waiting to run
build / Emscripten (push) Waiting to run
build / Windows (push) Waiting to run
build / MacOS (push) Waiting to run
build / iOS (push) Waiting to run
build / Android (push) Waiting to run
# Conflicts:
#	backends/imgui_impl_osx.mm
#	backends/imgui_impl_sdl2.cpp
#	backends/imgui_impl_sdl3.cpp
#	imgui.cpp
2025-03-30 16:42:28 +02:00
tanksdude
f5003aff69
Docs: Fix some typos (#8505) 2025-03-21 16:23:09 +01:00
ocornut
3fb14b50f8 Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_dx12.cpp
#	backends/imgui_impl_sdl2.cpp
#	backends/imgui_impl_sdl3.cpp
#	imgui.cpp
2025-02-26 21:08:45 +01:00
ocornut
4c0604ec2e Font: shallow refactor, rename ConfigData[] fields to Sources[], ConfigDataCount to SourcesCount.
In theory this is all internal stuff.
2025-02-25 17:41:29 +01:00
ocornut
afd659bb92 Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_sdl2.cpp
#	backends/imgui_impl_vulkan.cpp
2025-02-17 11:46:16 +01:00
Rémy Tassoux
f94a5f0e8c
Docs: Update doc about plutosvg (#8395) 2025-02-13 14:30:49 +01:00
ocornut
8679cfa2d8 Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_glfw.cpp
#	backends/imgui_impl_glfw.h
#	examples/example_apple_metal/example_apple_metal.xcodeproj/project.pbxproj
#	imgui.cpp
2025-02-07 18:27:32 +01:00
fdsa
4f1d3809c3 Fixed tabs and spaces (#8377) 2025-02-06 19:54:43 +01:00
ocornut
355cb589e3 Merge branch 'master' into docking, incl conflict merge in BeginMenuBar() for #8267
# Conflicts:
#	imgui_widgets.cpp
2025-01-24 19:40:54 +01:00
ocornut
8a1613a382 Fonts: OversampleH/OversampleV value defaults to 0 for automatic selection. 2025-01-24 19:32:30 +01:00
ocornut
6e94f6cefb Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_osx.mm
#	backends/imgui_impl_sdl2.cpp
#	backends/imgui_impl_sdl3.cpp
#	imgui.cpp
#	imgui_internal.h
2025-01-20 18:04:31 +01:00
ocornut
4c64ba16c5 imgui_freetype: fixed issue where glyph advances would incorrectly be snapped to pixels. 2025-01-16 17:42:00 +01:00
ocornut
960a6f14bf Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_dx10.cpp
#	backends/imgui_impl_dx11.cpp
#	backends/imgui_impl_metal.mm
#	imgui.cpp
2025-01-08 14:36:14 +01:00
ocornut
0514332474 Avoid clang/gcc warnings: -Wnontrivial-memaccess in backends. (#8295, #8129, #8135) 2025-01-08 11:44:00 +01:00
ocornut
9cc0bf89bd Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_vulkan.cpp
2025-01-06 17:59:22 +01:00
juur
f169102c8e Misc: fixed misc/cpp/imgui_stdlib.h/.cpp not supporting IMGUI_DISABLE. (#8294) 2025-01-06 14:16:10 +01:00
ocornut
a9cd0f5e42 Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_allegro5.cpp
#	backends/imgui_impl_allegro5.h
#	backends/imgui_impl_android.cpp
#	backends/imgui_impl_android.h
#	backends/imgui_impl_dx10.cpp
#	backends/imgui_impl_dx10.h
#	backends/imgui_impl_dx12.cpp
#	backends/imgui_impl_dx9.cpp
#	backends/imgui_impl_dx9.h
#	backends/imgui_impl_glfw.cpp
#	backends/imgui_impl_glfw.h
#	backends/imgui_impl_metal.h
#	backends/imgui_impl_metal.mm
#	backends/imgui_impl_opengl2.cpp
#	backends/imgui_impl_opengl2.h
#	backends/imgui_impl_opengl3.cpp
#	backends/imgui_impl_opengl3.h
#	backends/imgui_impl_sdl2.cpp
#	backends/imgui_impl_sdl2.h
#	backends/imgui_impl_sdl3.cpp
#	backends/imgui_impl_sdl3.h
#	backends/imgui_impl_vulkan.cpp
#	backends/imgui_impl_vulkan.h
#	backends/imgui_impl_win32.cpp
#	backends/imgui_impl_win32.h
#	imgui.cpp
2024-12-11 12:27:25 +01:00
ocornut
566558b17c Replacing NULL with nullptr in examples/backends when they creeped back. (#6313, #7071, #4537) 2024-12-05 12:25:02 +01:00
ocornut
ff2d6815ef Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_dx9.cpp
#	backends/imgui_impl_dx9.h
#	backends/imgui_impl_vulkan.cpp
#	imgui.cpp
2024-12-04 19:56:35 +01:00
ocornut
ee2119d7cb imgui_freetype: Fix build broken by 19a1f2a (#8107) 2024-11-29 19:10:39 +01:00
ocornut
19a1f2a5d2 Fonts: fixed AddCustomRect() not being packed with TexGlyphPadding + not accounted in surface area. (#8107) 2024-11-29 18:58:01 +01:00
ocornut
cdf21f6773 Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_dx12.cpp
#	docs/CHANGELOG.txt
#	imgui.cpp
#	imgui_internal.h
2024-11-21 14:52:04 +01:00
ocornut
20360e00ce Merge miscellaneous small changes to reduce drift with texture update branch.
- ImGuiDebugLogFlags_EventFont is yet unused.
2024-11-20 21:46:47 +01:00
ocornut
551b6c4d66 Tools: binary_to_compressed_c: added -u8/-u32/-base85 export options. 2024-11-20 14:32:44 +01:00
ocornut
d0e870aad2 Misc: changed embedded ProggyClean encoding to save a bit of binary space (~12kb to 9.5kb). (#8161)
Encoding as char to ensure compatibility with big endian (#81)
2024-11-20 14:16:34 +01:00
ocornut
368123ab06 Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_metal.mm
#	imgui_draw.cpp
2024-11-07 19:58:23 +01:00
ocornut
3b683927ee imgui_freetype: Fixed a crash in build font atlas when using merged fonts and the first font in a merged set has no loaded glyph. (#8081) 2024-11-07 14:39:54 +01:00
ocornut
4e2126ee44 Merge branch 'master' into docking
# Conflicts:
#	docs/CHANGELOG.txt
#	imgui.cpp
#	imgui.h
#	imgui_demo.cpp
#	imgui_widgets.cpp
2024-10-18 18:59:27 +02:00
Pascal Thomet
04d9a04557 imgui_freetype: Added support for plutosvg to render OpenType SVG fonts. (#7927, #7187 + #6591, #6607)
See #7927 for details.
2024-10-17 11:01:59 +02:00
ocornut
24b077c7f8 Merge branch 'master' into docking (multi-viewport broken until next commit)
# Conflicts:
#	backends/imgui_impl_sdl2.cpp
#	backends/imgui_impl_sdl3.cpp
2024-08-19 14:44:35 +02:00
ocornut
8cc6eee295 Fonts: amend assert when glyph range data seems incorrect. (#7856) 2024-08-03 15:25:47 +02:00