mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-18 01:14:19 +00:00
Merge branch 'master' into docking
This commit is contained in:
commit
92e2df5978
12 changed files with 149 additions and 65 deletions
|
|
@ -43,6 +43,17 @@ Breaking changes:
|
|||
|
||||
Other changes:
|
||||
|
||||
- Fonts: added ImFontAtlas::SetFontLoader() to dynamically change font
|
||||
loader at runtime without using internal API. (#8752, #8465)
|
||||
- Fonts: for large size fonts, layout/size calculation only load glyphs metrics.
|
||||
Actual glyphs are renderer+packed when used by drawing functions. (#8758, #8465)
|
||||
- Fonts: set a maximum font size of 512.0f at ImGui:: API level to reduce
|
||||
edge cases (e.g. out of memory errors). ImDrawList:: API doesn't have the
|
||||
constraint. (#8758)
|
||||
- Textures: Fixed support for `#define ImTextureID_Invalid` to non-zero value:
|
||||
ImTextureData() was incorrectly cleared with zeroes. (#8745) [@rachit7645]
|
||||
- Demo: Added "Text -> Font Size" demo section. (#8738) [@Demonese]
|
||||
- CI: Fixed dllimport/dllexport tests. (#8757) [@AidanSun05]
|
||||
- Backends: SDL3: avoid calling SDL_StartTextInput() again if already active.
|
||||
(#8727) [@morrazzzz]
|
||||
- Backends: OSX: added ImGuiMouseCursor_Wait and ImGuiMouseCursor_Progress
|
||||
|
|
@ -116,13 +127,11 @@ Breaking changes:
|
|||
`PushFont(NULL, some_size)` now keeps current change and changes size.
|
||||
- Renamed/moved 'io.FontGlobalScale' to 'style.FontScaleMain'.
|
||||
- Fonts: **IMPORTANT** on Font Merging:
|
||||
- When searching for a glyph in multiple merged fonts: font inputs are now scanned in order
|
||||
for the first font input which the desired glyph. This is technically a different behavior
|
||||
than before!
|
||||
- e.g. If you are merging fonts you may have glyphs that you expected to load from
|
||||
Font Source 2 which exists in Font Source 1. After the update and when using a new backend,
|
||||
those glyphs may now loaded from Font Source 1!
|
||||
- You can use `ImFontConfig::GlyphExcludeRanges[]` to specify ranges to ignore in given Input:
|
||||
- When searching for a glyph in multiple merged fonts: we search for the FIRST font source
|
||||
which contains the desired glyph. Because the user doesn't need to provide glyph ranges
|
||||
any more, it is possible that a glyph that you expected to fetch from a secondary/merged
|
||||
icon font may be erroneously fetched from the primary font.
|
||||
- We added `ImFontConfig::GlyphExcludeRanges[]` to specify ranges to exclude from a given font source:
|
||||
// Add Font Source 1 but ignore ICON_MIN_FA..ICON_MAX_FA range
|
||||
static ImWchar exclude_ranges[] = { ICON_MIN_FA, ICON_MAX_FA, 0 };
|
||||
ImFontConfig cfg1;
|
||||
|
|
@ -211,7 +220,7 @@ Breaking changes:
|
|||
- renamed/reworked ImFontBuilderIO into ImFontLoader,
|
||||
- renamed ImGuiFreeType::GetBuilderForFreeType() to ImGuiFreeType::GetFontLoader()
|
||||
- old: io.Fonts->FontBuilderIO = ImGuiFreeType::GetBuilderForFreeType()
|
||||
- new: io.Fonts.FontLoader = ImGuiFreeType::GetFontLoader();
|
||||
- new: io.Fonts->FontLoader = ImGuiFreeType::GetFontLoader()
|
||||
- DrawList: Renamed ImDrawList::PushTextureID()/PopTextureID() to PushTexture()/PopTexture().
|
||||
- Fonts: (users of custom rectangles)
|
||||
- Renamed AddCustomRectRegular() to AddCustomRect(). (#8466)
|
||||
|
|
|
|||
|
|
@ -387,7 +387,7 @@ io.Fonts->AddFontFromFileTTF("C:\\Windows\\Fonts\\seguiemj.ttf", 16.0f, &cfg);
|
|||
|
||||
## Using Custom Glyph Ranges
|
||||
|
||||
🆕 **Since 1.92, with an up to date backend: specifying glyph ranges is necessary, so this is not needed.**
|
||||
🆕 **Since 1.92, with an up to date backend: specifying glyph ranges is unnecessary. Therefore this is not really useful any more.**
|
||||
|
||||
:rewind: You can use the `ImFontGlyphRangesBuilder` helper to create glyph ranges based on text input. For example: for a game where your script is known, if you can feed your entire script to it and only build the characters the game needs.
|
||||
```cpp
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue