summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <tmpsantos@gmail.com>2019-06-26 18:52:09 +0300
committerThiago Marcos P. Santos <tmpsantos@gmail.com>2019-06-28 15:19:58 +0300
commit848ad0d25e3ac4374447b7fb8e29c23cedc148be (patch)
tree2a1991fb1e501d57e6fcd2af3414a82652fc2ebc
parent0ca8ea6f169149cd414a65f40d0f7bdd40f3cca3 (diff)
downloadqtlocation-mapboxgl-848ad0d25e3ac4374447b7fb8e29c23cedc148be.tar.gz
[core] include Hiragana and Katakana glyph ranges to LocalGlyphRasterizer
Fixes #14993
-rw-r--r--src/mbgl/util/i18n.cpp3
-rw-r--r--test/fixtures/local_glyphs/mixed.json16
2 files changed, 10 insertions, 9 deletions
diff --git a/src/mbgl/util/i18n.cpp b/src/mbgl/util/i18n.cpp
index d98ac8dbf9..d3364f5e53 100644
--- a/src/mbgl/util/i18n.cpp
+++ b/src/mbgl/util/i18n.cpp
@@ -415,7 +415,8 @@ bool allowsIdeographicBreaking(char16_t chr) {
bool allowsFixedWidthGlyphGeneration(char16_t chr) {
// Mirrors conservative set of characters used in glyph_manager.js/_tinySDF
- return isInCJKUnifiedIdeographs(chr) || isInHangulSyllables(chr);
+ return isInCJKUnifiedIdeographs(chr) || isInHangulSyllables(chr)
+ || isInKatakana(chr) || isInHiragana(chr);
}
bool allowsVerticalWritingMode(const std::u16string& string) {
diff --git a/test/fixtures/local_glyphs/mixed.json b/test/fixtures/local_glyphs/mixed.json
index e07d429753..b982fd9641 100644
--- a/test/fixtures/local_glyphs/mixed.json
+++ b/test/fixtures/local_glyphs/mixed.json
@@ -11,7 +11,7 @@
{
"type": "Feature",
"properties": {
- "name": "身什戰 1"
+ "name": "身什戰アあ1"
},
"geometry": {
"type": "LineString",
@@ -30,7 +30,7 @@
{
"type": "Feature",
"properties": {
- "name": "two 身什戰"
+ "name": "A身什戰アあ"
},
"geometry": {
"type": "LineString",
@@ -49,7 +49,7 @@
{
"type": "Feature",
"properties": {
- "name": "身什戰33"
+ "name": "身什戰アあA"
},
"geometry": {
"type": "LineString",
@@ -68,7 +68,7 @@
{
"type": "Feature",
"properties": {
- "name": "身什戰"
+ "name": "身什戰アあ"
},
"geometry": {
"type": "LineString",
@@ -87,7 +87,7 @@
{
"type": "Feature",
"properties": {
- "name": "身什戰 five"
+ "name": "身什戰アあ5"
},
"geometry": {
"type": "LineString",
@@ -106,7 +106,7 @@
{
"type": "Feature",
"properties": {
- "name": "six 身什戰"
+ "name": "B身什戰アあ"
},
"geometry": {
"type": "LineString",
@@ -125,7 +125,7 @@
{
"type": "Feature",
"properties": {
- "name": "身什戰 seven"
+ "name": "身什戰アあS2"
},
"geometry": {
"type": "LineString",
@@ -144,7 +144,7 @@
{
"type": "Feature",
"properties": {
- "name": "eight 身什戰"
+ "name": "8身什戰アあ"
},
"geometry": {
"type": "LineString",