From 848ad0d25e3ac4374447b7fb8e29c23cedc148be Mon Sep 17 00:00:00 2001 From: "Thiago Marcos P. Santos" Date: Wed, 26 Jun 2019 18:52:09 +0300 Subject: [core] include Hiragana and Katakana glyph ranges to LocalGlyphRasterizer Fixes #14993 --- src/mbgl/util/i18n.cpp | 3 ++- test/fixtures/local_glyphs/mixed.json | 16 ++++++++-------- 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", -- cgit v1.2.1