Просмотр исходного кода

Added codepoint U+3000 (Ideographic space) and Katakana Phonetic Extensions to GetGlyphRangesChinese/GetGlyphRangesJapanese

ocornut 10 лет назад
Родитель
Сommit
168a811d11
1 измененных файлов с 5 добавлено и 1 удалено
  1. 5 1
      imgui.cpp

+ 5 - 1
imgui.cpp

@@ -7379,7 +7379,9 @@ const ImWchar*  ImFontAtlas::GetGlyphRangesChinese()
     static const ImWchar ranges[] =
     static const ImWchar ranges[] =
     {
     {
         0x0020, 0x00FF, // Basic Latin + Latin Supplement
         0x0020, 0x00FF, // Basic Latin + Latin Supplement
+        0x3000, 0x3000, // Ideographic Space
         0x3040, 0x30FF, // Hiragana, Katakana
         0x3040, 0x30FF, // Hiragana, Katakana
+        0x31F0, 0x31FF, // Katakana Phonetic Extensions
         0xFF00, 0xFFEF, // Half-width characters
         0xFF00, 0xFFEF, // Half-width characters
         0x4e00, 0x9FAF, // CJK Ideograms
         0x4e00, 0x9FAF, // CJK Ideograms
         0,
         0,
@@ -7427,10 +7429,12 @@ const ImWchar*  ImFontAtlas::GetGlyphRangesJapanese()
         109,2,18,23,0,0,9,61,3,0,28,41,77,27,19,17,81,5,2,14,5,83,57,252,14,154,263,14,20,8,13,6,57,39,38,
         109,2,18,23,0,0,9,61,3,0,28,41,77,27,19,17,81,5,2,14,5,83,57,252,14,154,263,14,20,8,13,6,57,39,38,
     };
     };
     static int ranges_unpacked = false;
     static int ranges_unpacked = false;
-    static ImWchar ranges[6 + 1 + IM_ARRAYSIZE(offsets_from_0x4E00)*2] =
+    static ImWchar ranges[10 + 1 + IM_ARRAYSIZE(offsets_from_0x4E00)*2] =
     {
     {
         0x0020, 0x00FF, // Basic Latin + Latin Supplement
         0x0020, 0x00FF, // Basic Latin + Latin Supplement
+        0x3000, 0x3000, // Ideographic Space
         0x3040, 0x30FF, // Hiragana, Katakana
         0x3040, 0x30FF, // Hiragana, Katakana
+        0x31F0, 0x31FF, // Katakana Phonetic Extensions
         0xFF00, 0xFFEF, // Half-width characters
         0xFF00, 0xFFEF, // Half-width characters
         0, 
         0, 
     };
     };