Commit graph

10468 commits

Author SHA1 Message Date
ocornut
3939697023 WIP - Fonts: add optional out parameter to AddCustomRect()
Some checks failed
build / Windows (push) Has been cancelled
build / Linux (push) Has been cancelled
build / MacOS (push) Has been cancelled
build / iOS (push) Has been cancelled
build / Emscripten (push) Has been cancelled
build / Android (push) Has been cancelled
2025-03-31 22:20:46 +02:00
ocornut
4ca7745e69 WIP - Fonts: GC Compact All exposed in Metrics->Memory Allocations includes compacting texture data. 2025-03-31 21:50:18 +02:00
ocornut
74b53b4743 WIP - Fonts: added RemoveCustomRect().
Some checks are pending
build / Windows (push) Waiting to run
build / Linux (push) Waiting to run
build / MacOS (push) Waiting to run
build / iOS (push) Waiting to run
build / Emscripten (push) Waiting to run
build / Android (push) Waiting to run
+ internally add ImFontAtlasPackReuseRectEntry()
2025-03-31 20:30:27 +02:00
ocornut
124dcd3fad WIP - Fonts: moved ImFontAtlasRectId back to public API. 2025-03-31 20:30:27 +02:00
ocornut
002c14caa8 WIP - Fonts: added ImFontAtlasRectId_Invalid == -1 2025-03-31 20:30:27 +02:00
ocornut
87911d2bae WIP - Fonts: (Breaking) rework GetCustomRect() api. Reintroduce ImFontAtlasRect. 2025-03-31 20:30:26 +02:00
ocornut
009693872d WIP - Fonts: (Breaking) renamed AddCustomRectRegular() -> AddCustomRect(). 2025-03-31 17:51:04 +02:00
ocornut
b431320038 WIP - Fonts: Comments.
comments

comments
2025-03-31 17:50:29 +02:00
ocornut
83212d2404 WIP - Fonts: fixed GetCustomRectUV().
Fixing typo. Broken by fe598f7
2025-03-31 17:37:44 +02:00
ocornut
e0950e97d3 WIP - Fonts: fixed calling AddFontXXX not invalidating texture for legacy backends. 2025-03-31 17:37:44 +02:00
ocornut
0337a56244 WIP - (Breaking) Fonts: PushFont() default to preserve current font size. 2025-03-31 17:37:44 +02:00
ocornut
df06e9dd59 WIP - Fonts: Tools: added option to hide font preview text. Move code. 2025-03-31 17:37:43 +02:00
ocornut
d813bcae77 WIP - Fonts: removed size rounding in AddFont() which breaks relative sizing of merged fonts (8502) 2025-03-31 17:37:43 +02:00
ocornut
7b1ef0556d WIP - Fonts: fixed legacy backend path preloading all sources sizes erroneously + failing to use ellipsis. 2025-03-31 17:37:43 +02:00
ocornut
a6dabf2e66 WIP - Fonts: awkwardly alias old TexID name to TexRef using an union (may backtrack and just keep old name) 2025-03-31 17:37:43 +02:00
ocornut
efada143af WIP - Fonts: detect if backend assign to texture on creation but doesn't update Status.
+ 1 fix
2025-03-31 17:37:43 +02:00
ocornut
7522919e7f WIP - Fonts: avoid both ImTextureRef being set simultaneously. 2025-03-31 17:37:43 +02:00
ocornut
e11526e9ba WIP - Fonts: comments, tweaks, minor amends.
Comments, tweaks
2025-03-31 17:37:43 +02:00
ocornut
6ae2e2e60c WIP - Fonts: fixed ImTextureID() being zero-cleared instead of using ImTextureUserID_Invalid. . 2025-03-31 17:37:43 +02:00
ocornut
b6635f69b3 WIP - Fonts: Fixed PopFont() recovery.
(To squash into "Added PushFontSize(), PopFontSize() api."
2025-03-31 17:37:43 +02:00
ocornut
3ecb5590bc WIP - Fonts: Added ImTextureRef::GetTexID() mostly for consistency. 2025-03-31 17:37:43 +02:00
ocornut
73b0c4b197 WIP - Fonts: fixed crashing password fields. 2025-03-31 17:37:43 +02:00
ocornut
fc4b575c61 WIP - (Breaking) Fonts: renamed CalcCustomRectUV() to GetCustomRectUV() for simplicity. 2025-03-31 17:37:43 +02:00
ocornut
8f3ac6f62b WIP - Fonts: rename ImFontAtlasBuildClearTexture() to ImFontAtlasBuildClear() 2025-03-31 17:37:43 +02:00
ocornut
2e4d808fff WIP - (Breaking) Fonts: rename GetCustomRectByIndex() to GetCustomRect(). Made return struct const. 2025-03-31 17:37:43 +02:00
ocornut
ea6a37ed23 WIP - Fonts: narrowed invalid value for ImFontAtlasRectId to -1 a we will change implementation. 2025-03-31 17:37:43 +02:00
ocornut
066d58bd37 WIP - Fonts: change uses of ImFontAtlasRect to ImTextureRect for simplicity. 2025-03-31 17:37:43 +02:00
ocornut
b9409682a2 WIP - Fonts: fixed implicit init when calling AddCustomRectRegular(). LoaderShutdown match BuildDestroy. 2025-03-31 17:37:43 +02:00
ocornut
4d85d48e38 WIP - Fonts: fixed an issue calling legacy ImFontAtlas::Clear(). 2025-03-31 17:37:42 +02:00
ocornut
73dd9c3c26 WIP - Fonts: fixed memory leaks, shutting down font loader, and on AddFont() failure in Freetype backend. 2025-03-31 17:37:42 +02:00
ocornut
22f6b77fd0 WIP - ImTextureData pixels are not immediately destroyed on setting ImTextureStatus_WantDestroy. 2025-03-31 17:37:42 +02:00
ocornut
a8444e7deb WIP - Fonts: fixed a bug using size specified by secondary font sources. 2025-03-31 17:37:42 +02:00
ocornut
691783a292 WIP - Exposed some basic UI in demo for sanity. 2025-03-31 17:37:42 +02:00
ocornut
0a3626a44b WIP - Added UI to edit FreeType loader flags. Added ImFontAtlasBuildReloadAll() / ImFontAtlasBuildReloadFont() 2025-03-31 17:37:42 +02:00
ocornut
6ddcbc149e WIP - In ShowFontAtlas() preserve open-state for latest texture. Improve debug display. 2025-03-31 17:37:42 +02:00
ocornut
6f34f382cf WIP - ImFontConfig::GlyphExcludeRanges is owner and copied. 2025-03-31 17:37:42 +02:00
ocornut
9395af9231 WIP - Update font documenttion. 2025-03-31 17:37:42 +02:00
ocornut
a408133dae WIP - Obsolete GetGlyphRangesXXX() functions. 2025-03-31 17:37:42 +02:00
ocornut
27bd2a6fba WIP - Fixed various small warnings / build issues. 2025-03-31 17:37:42 +02:00
ocornut
a5b879e6ea WIP - Added a ImFontFlags_NoLoadError flag to let user code try file paths. (3611) 2025-03-31 17:37:42 +02:00
ocornut
342c211182 WIP - Detect when using a texture that's about to be destroyed. 2025-03-31 17:37:42 +02:00
ocornut
6a41bccf3d WIP - Demo: Add a "Fonts" section for visibility. 2025-03-31 17:37:42 +02:00
ocornut
48c0166f43 WIP - GetFontBaked() default to searching for closest size font. 2025-03-31 17:37:42 +02:00
ocornut
e782ffbbb8 WIP - Added ImTextureData::UsedRect. 2025-03-31 17:37:42 +02:00
ocornut
79150af29a WIP - Tidying up font scale logic. 2025-03-31 17:37:42 +02:00
ocornut
a856035678 WIP - Removed LockSingleSrcConfigIdx which isn't needed anymore since we don't load glyphs in ImFontAtlasBuildAddFont(). 2025-03-31 17:37:42 +02:00
ocornut
2c060d4a07 WIP - Fallback glyph is now lazily loaded on demand (yay!). Moving ImFontBaked:: functions outside of class. 2025-03-31 17:37:41 +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
9b5a3a05d1 WIP - A font source can specify its own loader/backend. 2025-03-31 17:37:41 +02:00