diff options
Diffstat (limited to 'src/mbgl/util')
-rw-r--r-- | src/mbgl/util/i18n.cpp | 8 | ||||
-rw-r--r-- | src/mbgl/util/i18n.hpp | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/mbgl/util/i18n.cpp b/src/mbgl/util/i18n.cpp index 716481734e..885c8ec3d1 100644 --- a/src/mbgl/util/i18n.cpp +++ b/src/mbgl/util/i18n.cpp @@ -643,6 +643,14 @@ bool isStringInSupportedScript(const std::string& input) { return true; } +bool isCharInComplexShapingScript(char16_t chr) { + return isInArabic(chr) || + isInArabicSupplement(chr) || + isInArabicExtendedA(chr) || + isInArabicPresentationFormsA(chr) || + isInArabicPresentationFormsB(chr); +} + bool isWhitespace(char16_t chr) { return chr == u' ' || chr == u'\t' || chr == u'\n' || chr == u'\v' || chr == u'\f' || chr == u'\r'; } diff --git a/src/mbgl/util/i18n.hpp b/src/mbgl/util/i18n.hpp index c7544f443b..7e75aa06f7 100644 --- a/src/mbgl/util/i18n.hpp +++ b/src/mbgl/util/i18n.hpp @@ -75,6 +75,8 @@ char16_t verticalizePunctuation(char16_t chr); bool isStringInSupportedScript(const std::string& input); +bool isCharInComplexShapingScript(char16_t chr); + bool isWhitespace(char16_t chr); } // namespace i18n |