From 14aa9df496b5a7692c6a5ea5d48c298df642f133 Mon Sep 17 00:00:00 2001 From: Stone Li Date: Tue, 27 Sep 2022 16:03:48 +0800 Subject: [PATCH] FIX: fix chinese display error in imgui Change-Id: I03f463725a4688354cf82d96505e5187912df3a4 (cherry picked from commit e040d640a65c228229ec1f547d1b5a93d667989d) --- src/imgui/imgui_draw.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/imgui/imgui_draw.cpp b/src/imgui/imgui_draw.cpp index 77d1babbf..70f6b0418 100644 --- a/src/imgui/imgui_draw.cpp +++ b/src/imgui/imgui_draw.cpp @@ -2919,13 +2919,14 @@ const ImWchar* ImFontAtlas::GetGlyphRangesChineseSimplifiedCommon() 0x2000, 0x206F, // General Punctuation 0x3000, 0x30FF, // CJK Symbols and Punctuations, Hiragana, Katakana 0x31F0, 0x31FF, // Katakana Phonetic Extensions + 0x4e00, 0x9FAF, // CJK Ideograms 0xFF00, 0xFFEF // Half-width characters }; static ImWchar full_ranges[IM_ARRAYSIZE(base_ranges) + IM_ARRAYSIZE(accumulative_offsets_from_0x4E00) * 2 + 1] = { 0 }; if (!full_ranges[0]) { memcpy(full_ranges, base_ranges, sizeof(base_ranges)); - UnpackAccumulativeOffsetsIntoRanges(0x4E00, accumulative_offsets_from_0x4E00, IM_ARRAYSIZE(accumulative_offsets_from_0x4E00), full_ranges + IM_ARRAYSIZE(base_ranges)); + //UnpackAccumulativeOffsetsIntoRanges(0x4E00, accumulative_offsets_from_0x4E00, IM_ARRAYSIZE(accumulative_offsets_from_0x4E00), full_ranges + IM_ARRAYSIZE(base_ranges)); } return &full_ranges[0]; }