Fonts: adding ImFontHooks for codepoint remapping.
This commit is contained in:
@@ -177,6 +177,7 @@ struct ImFontBaked; // Baked data for a ImFont at a given size.
|
||||
struct ImFontConfig; // Configuration data when adding a font or merging fonts
|
||||
struct ImFontGlyph; // A single font glyph (code point + coordinates within in ImFontAtlas + offset)
|
||||
struct ImFontGlyphRangesBuilder; // Helper to build glyph ranges from text/string data
|
||||
struct ImFontHooks; // Opaque interface to font hooks
|
||||
struct ImFontLoader; // Opaque interface to a font loading backend (stb_truetype, FreeType etc.).
|
||||
struct ImTextureData; // Specs and pixel storage for a texture used by Dear ImGui.
|
||||
struct ImTextureRect; // Coordinates of a rectangle within a texture.
|
||||
@@ -3682,6 +3683,7 @@ struct ImFontAtlas
|
||||
const ImFontLoader* FontLoader; // Font loader opaque interface (default to stb_truetype, can be changed to use FreeType by defining IMGUI_ENABLE_FREETYPE). Don't set directly!
|
||||
const char* FontLoaderName; // Font loader name (for display e.g. in About box) == FontLoader->Name
|
||||
void* FontLoaderData; // Font backend opaque storage
|
||||
const ImFontHooks* FontHooks; // Shared font hooks for all fonts.
|
||||
unsigned int FontBuilderFlags; // [FIXME: Should be called FontLoaderFlags] Shared flags (for all fonts) for font loader. THIS IS BUILD IMPLEMENTATION DEPENDENT (e.g. . Per-font override is also available in ImFontConfig.
|
||||
int RefCount; // Number of contexts using this atlas
|
||||
|
||||
@@ -3769,6 +3771,7 @@ struct ImFont
|
||||
float Scale; // 4 // in // Base font scale (~1.0f), multiplied by the per-window font scale which you can adjust with SetWindowFontScale()
|
||||
ImU8 Used8kPagesMap[(IM_UNICODE_CODEPOINT_MAX+1)/8192/8]; // 1 bytes if ImWchar=ImWchar16, 16 bytes if ImWchar==ImWchar32. Store 1-bit for each block of 4K codepoints that has one active glyph. This is mainly used to facilitate iterations across all used codepoints.
|
||||
bool EllipsisAutoBake; // 1 // // Mark when the "..." glyph needs to be generated.
|
||||
const ImFontHooks* FontHooks; // 8 // in // Custom font hooks for the font.
|
||||
|
||||
// Methods
|
||||
IMGUI_API ImFont();
|
||||
|
||||
Reference in New Issue
Block a user