summaryrefslogtreecommitdiff
path: root/src/mbgl/util/i18n.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/util/i18n.cpp')
-rw-r--r--src/mbgl/util/i18n.cpp24
1 files changed, 11 insertions, 13 deletions
diff --git a/src/mbgl/util/i18n.cpp b/src/mbgl/util/i18n.cpp
index ce3ef65f3a..c8379a6703 100644
--- a/src/mbgl/util/i18n.cpp
+++ b/src/mbgl/util/i18n.cpp
@@ -614,21 +614,19 @@ bool charInSupportedScript(char16_t chr) {
// actually depends on the properties of the font being used
// and whether differences from the ideal rendering are considered
// semantically significant.
-
+
// Even in Latin script, we "can't render" combinations such as the fi
// ligature, but we don't consider that semantically significant.n false;
- if ((chr >= 0x0900 && chr <= 0x0DFF) ||
- // Main blocks for Indic scripts and Sinhala
- (chr >= 0x0F00 && chr <= 0x109F) ||
- // Main blocks for Tibetan and Myanmar
- isInKhmer(chr)) {
- // These blocks cover common scripts that require
- // complex text shaping, based on unicode script metadata:
- // http://www.unicode.org/repos/cldr/trunk/common/properties/scriptMetadata.txt
- // where "Web Rank <= 32" "Shaping Required = YES"
- return false;
- }
- return true;
+
+ // These blocks cover common scripts that require
+ // complex text shaping, based on unicode script metadata:
+ // http://www.unicode.org/repos/cldr/trunk/common/properties/scriptMetadata.txt
+ // where "Web Rank <= 32" "Shaping Required = YES"
+ return !((chr >= 0x0900 && chr <= 0x0DFF) ||
+ // Main blocks for Indic scripts and Sinhala
+ (chr >= 0x0F00 && chr <= 0x109F) ||
+ // Main blocks for Tibetan and Myanmar
+ isInKhmer(chr));
}
bool isStringInSupportedScript(const std::string& input) {