diff options
author | Chris Loer <chris.loer@gmail.com> | 2017-05-17 16:48:06 -0700 |
---|---|---|
committer | Chris Loer <chris.loer@mapbox.com> | 2017-05-18 11:19:17 -0700 |
commit | cd4e67968a34aa1f2cfa79beb928a64bfe0d4049 (patch) | |
tree | a2bd332f3144de71561d14b52ac55ddcef5138c2 | |
parent | eae2c715f1ead523de2984cde8708627bfc3f180 (diff) | |
download | qtlocation-mapboxgl-cd4e67968a34aa1f2cfa79beb928a64bfe0d4049.tar.gz |
[core] Don't unnecessarily request glyphs for verticalized punctuation.
Issue #8982.
-rw-r--r-- | src/mbgl/layout/symbol_layout.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mbgl/layout/symbol_layout.cpp b/src/mbgl/layout/symbol_layout.cpp index 0e8b2fa636..bfe1db7a73 100644 --- a/src/mbgl/layout/symbol_layout.cpp +++ b/src/mbgl/layout/symbol_layout.cpp @@ -136,12 +136,17 @@ SymbolLayout::SymbolLayout(const BucketParameters& parameters, } ft.text = applyArabicShaping(util::utf8_to_utf16::convert(u8string)); + const bool canVerticalizeText = layout.get<TextRotationAlignment>() == AlignmentType::Map + && layout.get<SymbolPlacement>() == SymbolPlacementType::Line + && util::i18n::allowsVerticalWritingMode(*ft.text); // Loop through all characters of this text and collect unique codepoints. for (char16_t chr : *ft.text) { glyphDependencies[layout.get<TextFont>()].insert(chr); - if (char16_t verticalChr = util::i18n::verticalizePunctuation(chr)) { - glyphDependencies[layout.get<TextFont>()].insert(verticalChr); + if (canVerticalizeText) { + if (char16_t verticalChr = util::i18n::verticalizePunctuation(chr)) { + glyphDependencies[layout.get<TextFont>()].insert(verticalChr); + } } } } |