Added GetGlyphRangesVietnamese() helper. (#2403)

This commit is contained in:
omar 2019-03-11 22:02:59 +01:00
parent 65c2220049
commit a92c587c75
3 changed files with 19 additions and 0 deletions

View File

@ -85,6 +85,7 @@ Other Changes:
- Log/Capture: Fixed LogXXX functions 'auto_open_depth' parameter being treated as an absolute
tree depth instead of a relative one.
- Log/Capture: Fixed CollapsingHeader trailing ascii representation being "#" instead of "##".
- ImFont: Added GetGlyphRangesVietnamese() helper. (#2403)
- Misc: Asserting in NewFrame() if style.WindowMinSize is zero or smaller than (1.0f,1.0f).
- Demo: Using GetBackgroundDrawList() and GetForegroundDrawList() in "Custom Rendering" demo.
- Examples: OpenGL: Fix to be able to run on ES 2.0 / WebGL 1.0. [@rmitton, @gabrielcuvillier]

View File

@ -2047,6 +2047,7 @@ struct ImFontAtlas
IMGUI_API const ImWchar* GetGlyphRangesChineseSimplifiedCommon();// Default + Half-Width + Japanese Hiragana/Katakana + set of 2500 CJK Unified Ideographs for common simplified Chinese
IMGUI_API const ImWchar* GetGlyphRangesCyrillic(); // Default + about 400 Cyrillic characters
IMGUI_API const ImWchar* GetGlyphRangesThai(); // Default + Thai characters
IMGUI_API const ImWchar* GetGlyphRangesVietnamese(); // Default + Vietname characters
//-------------------------------------------
// Custom Rectangles/Glyphs API

View File

@ -2346,6 +2346,23 @@ const ImWchar* ImFontAtlas::GetGlyphRangesThai()
return &ranges[0];
}
const ImWchar* ImFontAtlas::GetGlyphRangesVietnamese()
{
static const ImWchar ranges[] =
{
0x0020, 0x00FF, // Basic Latin
0x0102, 0x0103,
0x0110, 0x0111,
0x0128, 0x0129,
0x0168, 0x0169,
0x01A0, 0x01A1,
0x01AF, 0x01B0,
0x1EA0, 0x1EF9,
0,
};
return &ranges[0];
}
//-----------------------------------------------------------------------------
// [SECTION] ImFontGlyphRangesBuilder
//-----------------------------------------------------------------------------