mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-26 13:37:00 +00:00
Merge pull request #348 from zho7611/add_korean_support
ImFontAtlas: Added GetGlyphRangesKorean() for Korean.
This commit is contained in:
commit
9d89e03346
1
imgui.h
1
imgui.h
@ -1221,6 +1221,7 @@ struct ImFontAtlas
|
|||||||
// Helpers to retrieve list of common Unicode ranges (2 value per range, values are inclusive, zero-terminated list)
|
// Helpers to retrieve list of common Unicode ranges (2 value per range, values are inclusive, zero-terminated list)
|
||||||
// (Those functions could be static but aren't so most users don't have to refer to the ImFontAtlas:: name ever if in their code; just using io.Fonts->)
|
// (Those functions could be static but aren't so most users don't have to refer to the ImFontAtlas:: name ever if in their code; just using io.Fonts->)
|
||||||
IMGUI_API const ImWchar* GetGlyphRangesDefault(); // Basic Latin, Extended Latin
|
IMGUI_API const ImWchar* GetGlyphRangesDefault(); // Basic Latin, Extended Latin
|
||||||
|
IMGUI_API const ImWchar* GetGlyphRangesKorean(); // Default + Korean characters
|
||||||
IMGUI_API const ImWchar* GetGlyphRangesJapanese(); // Default + Hiragana, Katakana, Half-Width, Selection of 1946 Ideographs
|
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* GetGlyphRangesChinese(); // Japanese + full set of about 21000 CJK Unified Ideographs
|
||||||
IMGUI_API const ImWchar* GetGlyphRangesCyrillic(); // Default + about 400 Cyrillic characters
|
IMGUI_API const ImWchar* GetGlyphRangesCyrillic(); // Default + about 400 Cyrillic characters
|
||||||
|
@ -1458,6 +1458,18 @@ const ImWchar* ImFontAtlas::GetGlyphRangesDefault()
|
|||||||
return &ranges[0];
|
return &ranges[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const ImWchar* ImFontAtlas::GetGlyphRangesKorean()
|
||||||
|
{
|
||||||
|
static const ImWchar ranges[] =
|
||||||
|
{
|
||||||
|
0x0020, 0x00FF, // Basic Latin + Latin Supplement
|
||||||
|
0x3131, 0x3163, // Korean alphabets
|
||||||
|
0xAC00, 0xD79D, // Korean characters
|
||||||
|
0,
|
||||||
|
};
|
||||||
|
return &ranges[0];
|
||||||
|
}
|
||||||
|
|
||||||
const ImWchar* ImFontAtlas::GetGlyphRangesChinese()
|
const ImWchar* ImFontAtlas::GetGlyphRangesChinese()
|
||||||
{
|
{
|
||||||
static const ImWchar ranges[] =
|
static const ImWchar ranges[] =
|
||||||
|
Loading…
Reference in New Issue
Block a user