mirror of
https://github.com/ocornut/imgui.git
synced 2026-04-02 05:27:40 -05:00
Fonts: adding ImFontHooks for codepoint remapping.
This commit is contained in:
@@ -37,7 +37,7 @@ Index of this file:
|
||||
// [SECTION] Tab bar, Tab item support
|
||||
// [SECTION] Table support
|
||||
// [SECTION] ImGui internal API
|
||||
// [SECTION] ImFontLoader
|
||||
// [SECTION] ImFontLoader, ImFontHooks
|
||||
// [SECTION] ImFontAtlas internal API
|
||||
// [SECTION] Test Engine specific hooks (imgui_test_engine)
|
||||
|
||||
@@ -3664,7 +3664,7 @@ namespace ImGui
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// [SECTION] ImFontLoader
|
||||
// [SECTION] ImFontLoader, ImFontHooks
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// Hooks and storage for a given font backend.
|
||||
@@ -3693,6 +3693,14 @@ struct ImFontLoader
|
||||
IMGUI_API const ImFontLoader* ImFontAtlasGetFontLoaderForStbTruetype();
|
||||
#endif
|
||||
|
||||
// User hooks
|
||||
// Conceptually this could be public, but API is still going to be evolve.
|
||||
struct ImFontHooks
|
||||
{
|
||||
// Modify codepoint to map to another value.
|
||||
void (*FontHookRemapCodepoint)(ImFontAtlas* atlas, ImFont* font, ImWchar* io_codepoint);
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// [SECTION] ImFontAtlas internal API
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user