From 4141144b217ce89e819a1c9a4aac165789342188 Mon Sep 17 00:00:00 2001 From: Adisorn Aeksatean <nProtect@users.noreply.github.com> Date: Tue, 19 Jul 2016 22:56:59 +0700 Subject: [PATCH 1/2] Added GetGlyphRangesThai() --- imgui.h | 1 + imgui_draw.cpp | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/imgui.h b/imgui.h index dffb5060..27518016 100644 --- a/imgui.h +++ b/imgui.h @@ -1322,6 +1322,7 @@ struct ImFontAtlas IMGUI_API const ImWchar* GetGlyphRangesJapanese(); // Default + Hiragana, Katakana, Half-Width, Selection of 1946 Ideographs IMGUI_API const ImWchar* GetGlyphRangesChinese(); // Japanese + full set of about 21000 CJK Unified Ideographs IMGUI_API const ImWchar* GetGlyphRangesCyrillic(); // Default + about 400 Cyrillic characters + IMGUI_API const ImWchar* GetGlyphRangesThai(); //Default + Thai charactors // Members // (Access texture data via GetTexData*() calls which will setup a default font for you.) diff --git a/imgui_draw.cpp b/imgui_draw.cpp index 1cbd39d8..c5770da8 100644 --- a/imgui_draw.cpp +++ b/imgui_draw.cpp @@ -1652,6 +1652,17 @@ const ImWchar* ImFontAtlas::GetGlyphRangesCyrillic() return &ranges[0]; } +const ImWchar* ImFontAtlas::GetGlyphRangesThai() +{ + static const ImWchar ranges[] = + { + 0x0020, 0x00FF, //Basic Latin + 0x0E00, 0x0E7F, //Thai Unicode + 0, + }; + return &ranges[0]; +} + //----------------------------------------------------------------------------- // ImFont //----------------------------------------------------------------------------- From 8efd05a1489a92f2c4d33ef7a0e2a3f3702c191f Mon Sep 17 00:00:00 2001 From: ocornut <omarcornut@gmail.com> Date: Wed, 20 Jul 2016 11:39:38 +0200 Subject: [PATCH 2/2] Tab->Spaces, missing spaces, typos --- imgui.h | 2 +- imgui_draw.cpp | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/imgui.h b/imgui.h index 27518016..fbd8c9fe 100644 --- a/imgui.h +++ b/imgui.h @@ -1322,7 +1322,7 @@ struct ImFontAtlas IMGUI_API const ImWchar* GetGlyphRangesJapanese(); // Default + Hiragana, Katakana, Half-Width, Selection of 1946 Ideographs IMGUI_API const ImWchar* GetGlyphRangesChinese(); // Japanese + full set of about 21000 CJK Unified Ideographs IMGUI_API const ImWchar* GetGlyphRangesCyrillic(); // Default + about 400 Cyrillic characters - IMGUI_API const ImWchar* GetGlyphRangesThai(); //Default + Thai charactors + IMGUI_API const ImWchar* GetGlyphRangesThai(); // Default + Thai characters // Members // (Access texture data via GetTexData*() calls which will setup a default font for you.) diff --git a/imgui_draw.cpp b/imgui_draw.cpp index c5770da8..45549298 100644 --- a/imgui_draw.cpp +++ b/imgui_draw.cpp @@ -1654,13 +1654,13 @@ const ImWchar* ImFontAtlas::GetGlyphRangesCyrillic() const ImWchar* ImFontAtlas::GetGlyphRangesThai() { - static const ImWchar ranges[] = - { - 0x0020, 0x00FF, //Basic Latin - 0x0E00, 0x0E7F, //Thai Unicode - 0, - }; - return &ranges[0]; + static const ImWchar ranges[] = + { + 0x0020, 0x00FF, // Basic Latin + 0x0E00, 0x0E7F, // Thai + 0, + }; + return &ranges[0]; } //-----------------------------------------------------------------------------