From fa3ed7e618678a141c9d79eb3639fe6a57efd119 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sun, 11 May 2025 23:26:27 +0200 Subject: [PATCH] impr: Load all unicode planes if requested --- plugins/fonts/include/font_atlas.hpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/plugins/fonts/include/font_atlas.hpp b/plugins/fonts/include/font_atlas.hpp index 61a0bb24e..d98327464 100644 --- a/plugins/fonts/include/font_atlas.hpp +++ b/plugins/fonts/include/font_atlas.hpp @@ -208,9 +208,15 @@ namespace hex::fonts { } if (enabled) { - constexpr static std::array fullRange = { 0x0180, 0xFFEF, 0 }; + constexpr static ImWchar fullUnicodeRanges[] = { + 0x0080, 0x00FF, // Latin-1 Supplement + 0x0100, 0xFFEF, // Remaining BMP (excluding specials) + 0x10000, 0x1FFFF, // Plane 1 + 0x20000, 0x2FFFF, // Plane 2 + 0 // null-terminated + }; - glyphRangesBuilder.AddRanges(fullRange.data()); + glyphRangesBuilder.AddRanges(fullUnicodeRanges); } else { glyphRangesBuilder.AddRanges(m_fontAtlas->GetGlyphRangesJapanese()); glyphRangesBuilder.AddRanges(m_fontAtlas->GetGlyphRangesChineseFull());