From cd4e67968a34aa1f2cfa79beb928a64bfe0d4049 Mon Sep 17 00:00:00 2001 From: Chris Loer Date: Wed, 17 May 2017 16:48:06 -0700 Subject: [core] Don't unnecessarily request glyphs for verticalized punctuation. Issue #8982. --- src/mbgl/layout/symbol_layout.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/mbgl') 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() == AlignmentType::Map + && layout.get() == 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()].insert(chr); - if (char16_t verticalChr = util::i18n::verticalizePunctuation(chr)) { - glyphDependencies[layout.get()].insert(verticalChr); + if (canVerticalizeText) { + if (char16_t verticalChr = util::i18n::verticalizePunctuation(chr)) { + glyphDependencies[layout.get()].insert(verticalChr); + } } } } -- cgit v1.2.1