mirror of
https://github.com/ocornut/imgui.git
synced 2026-11-06 06:25:54 +01:00
This commit is contained in:
parent
09d740ba32
commit
dfa3c0c0bb
@ -47,6 +47,8 @@ Breaking Changes:
|
||||
- style.CurveTessellationMaxError == sqrf(style.CurveTessellationTol).
|
||||
- ImGuiTextFilter: removed `float width` parameter of `Draw(const char* filter, float width)`:
|
||||
prefer using `SetNextItemWidth(float)` which is standard. Kept inline redirection function.
|
||||
- Fonts: renamed `AddRemapChar()` to `AddRemapCodepoint()` (rarely used, marked internal).
|
||||
(#609, #5748, #9559)
|
||||
- Backends:
|
||||
- DirectX12: Removed support for legacy `ImGui_ImplDX12_Init()` signature, which was
|
||||
obsoleted in 1.91.6 (December 2014), because it needed to forcefully disable support
|
||||
|
||||
@ -395,6 +395,7 @@ IMPLEMENTING SUPPORT for ImGuiBackendFlags_RendererHasTextures:
|
||||
When you are not sure about an old symbol or function name, try using the Search/Find function of your IDE to look for comments or references in all imgui files.
|
||||
You can read releases logs https://github.com/ocornut/imgui/releases for more details.
|
||||
|
||||
- 2026/09/30 (1.93.0) - ImFont: renamed `AddRemapChar()` to `AddRemapCodepoint()` (rarely used, marked internal). (#609, #5748)
|
||||
- 2026/09/18 (1.93.0) - ImGuiTextFilter: removed `float width` parameter of `Draw(const char* filter, float width)`: prefer using `SetNextItemWidth(float)` which is standard. Kept inline redirection function.
|
||||
- 2026/08/03 (1.93.0) - Style: obsoleted `style.CurveTessellationTol (default 1.25)` which was in Pixels² unit in favor of `style.CurveTessellationMaxError` (default 1.12)` which is in Pixels unit.
|
||||
- style.CurveTessellationMaxError == sqrf(style.CurveTessellationTol).
|
||||
|
||||
5
imgui.h
5
imgui.h
@ -3967,7 +3967,7 @@ struct ImFont
|
||||
ImWchar FallbackChar; // 2-4 // out // Character used if a glyph isn't found (U+FFFD, '?')
|
||||
ImU8 Used8kPagesMap[(IM_UNICODE_CODEPOINT_MAX+1)/8192/8]; // 1 bytes if ImWchar=ImWchar16, 17 bytes if ImWchar==ImWchar32. Store 1-bit for each block of 8K codepoints that has one active glyph. This is mainly used to facilitate iterations across all used codepoints.
|
||||
bool EllipsisAutoBake; // 1 // // Mark when the "..." glyph (== EllipsisChar) needs to be generated by combining multiple '.'.
|
||||
ImGuiStorage RemapPairs; // 16 // // Remapping pairs when using AddRemapChar(), otherwise empty.
|
||||
ImGuiStorage RemapPairs; // 16 // // Remapping pairs when using AddRemapCodepoint(), otherwise empty.
|
||||
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
||||
float Scale; // 4 // in // Legacy base font scale (~1.0f), multiplied by the per-window font scale which you can adjust with SetWindowFontScale()
|
||||
#endif
|
||||
@ -3993,8 +3993,9 @@ struct ImFont
|
||||
|
||||
// [Internal] Don't use!
|
||||
IMGUI_API void ClearOutputData();
|
||||
IMGUI_API void AddRemapChar(ImWchar from_codepoint, ImWchar to_codepoint); // Makes 'from_codepoint' character points to 'to_codepoint' glyph.
|
||||
IMGUI_API void AddRemapCodepoint(ImWchar from_codepoint, ImWchar to_codepoint); // Makes 'from_codepoint' character points to 'to_codepoint' glyph.
|
||||
IMGUI_API bool IsGlyphRangeUnused(unsigned int c_begin, unsigned int c_last);
|
||||
//inline void AddRemapChar(ImWchar from_codepoint, ImWchar to_codepoint) { AddRemapCodepointToCodepoint(from_codepoint, to_codepoint); } // Renamed in 1.93.0 (Oct 2026)
|
||||
};
|
||||
|
||||
// This is provided for consistency (but we don't actually use this)
|
||||
|
||||
@ -4562,6 +4562,12 @@ static void ImFontBaked_BuildGrowIndex(ImFontBaked* baked, int new_size)
|
||||
baked->IndexLookup.resize(new_size, IM_FONTGLYPH_INDEX_UNUSED);
|
||||
}
|
||||
|
||||
// Remap a codepoint to another codepoint
|
||||
void ImFont::AddRemapCodepoint(ImWchar from_codepoint, ImWchar to_codepoint)
|
||||
{
|
||||
RemapPairs.SetInt((ImGuiID)from_codepoint, (int)to_codepoint);
|
||||
}
|
||||
|
||||
static void ImFontAtlas_FontHookRemapCodepoint(ImFontAtlas* atlas, ImFont* font, ImWchar* c)
|
||||
{
|
||||
IM_UNUSED(atlas);
|
||||
@ -5346,11 +5352,6 @@ void ImFontAtlasBakedSetFontGlyphBitmap(ImFontAtlas* atlas, ImFontBaked* baked,
|
||||
ImFontAtlasTextureBlockQueueUpload(atlas, tex, r->x, r->y, r->w, r->h);
|
||||
}
|
||||
|
||||
void ImFont::AddRemapChar(ImWchar from_codepoint, ImWchar to_codepoint)
|
||||
{
|
||||
RemapPairs.SetInt((ImGuiID)from_codepoint, (int)to_codepoint);
|
||||
}
|
||||
|
||||
// Find glyph, load if necessary, return fallback if missing
|
||||
ImFontGlyph* ImFontBaked::FindGlyph(ImWchar c)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user