[core] Don't unnecessarily request glyphs for verticalized punctuation.

Issue #8982.
This commit is contained in:
Chris Loer
2017-05-17 16:48:06 -07:00
committed by Chris Loer
parent eae2c715f1
commit cd4e67968a

View File

@@ -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);
}
}
}
}