Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

[core] Include Hiragana and Katakana glyph ranges to LocalGlyphRasterizer #15009

Merged
merged 2 commits into from
Jun 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/mbgl/util/i18n.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
16 changes: 8 additions & 8 deletions test/fixtures/local_glyphs/mixed.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{
"type": "Feature",
"properties": {
"name": "身什戰 1"
"name": "身什戰アあ1"
},
"geometry": {
"type": "LineString",
Expand All @@ -30,7 +30,7 @@
{
"type": "Feature",
"properties": {
"name": "two 身什戰"
"name": "A身什戰アあ"
},
"geometry": {
"type": "LineString",
Expand All @@ -49,7 +49,7 @@
{
"type": "Feature",
"properties": {
"name": "身什戰33"
"name": "身什戰アあA"
},
"geometry": {
"type": "LineString",
Expand All @@ -68,7 +68,7 @@
{
"type": "Feature",
"properties": {
"name": "身什戰"
"name": "身什戰アあ"
},
"geometry": {
"type": "LineString",
Expand All @@ -87,7 +87,7 @@
{
"type": "Feature",
"properties": {
"name": "身什戰 five"
"name": "身什戰アあ5"
},
"geometry": {
"type": "LineString",
Expand All @@ -106,7 +106,7 @@
{
"type": "Feature",
"properties": {
"name": "six 身什戰"
"name": "B身什戰アあ"
},
"geometry": {
"type": "LineString",
Expand All @@ -125,7 +125,7 @@
{
"type": "Feature",
"properties": {
"name": "身什戰 seven"
"name": "身什戰アあS2"
},
"geometry": {
"type": "LineString",
Expand All @@ -144,7 +144,7 @@
{
"type": "Feature",
"properties": {
"name": "eight 身什戰"
"name": "8身什戰アあ"
},
"geometry": {
"type": "LineString",
Expand Down
Binary file modified test/fixtures/local_glyphs/no_local/expected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/fixtures/local_glyphs/ping_fang/expected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.