From 1b9d4d792cbd877f627987cbd0d5ed41709375c8 Mon Sep 17 00:00:00 2001 From: Alexander Shalamov Date: Sun, 4 Aug 2019 14:44:22 +0300 Subject: [core] Render half-width glyphs in upright orientation This change forces glyphs whose natural orientation in vertical writing mode is 'sideways' to be rendered in upright orientation (only for non complex text layouts). This is different compared to W3C / browser behavior that is by default, renders glyphs in their respective natural orientation. In the future, there might need to add a new layout property that would control glyph orientation separately (e.g., text-glyph-orientation: natural | upright). --- src/mbgl/util/i18n.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/mbgl/util/i18n.cpp') 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'; } -- cgit v1.2.1