[core] Pass images and evaluated layout text size to shaping

This commit is contained in:
Alexander Shalamov
2019-11-13 11:22:26 +02:00
parent a9c3b5a389
commit 34a9bc08ce
5 changed files with 65 additions and 22 deletions

View File

@@ -26,17 +26,21 @@ TEST(Shaping, ZWSP) {
{ FontStackHasher()(fontStack), {{u'中', std::move(immutableGlyph)}} }
};
const auto testGetShaping = [&] (const TaggedString& string, unsigned maxWidthInChars) {
ImagePositions imagePositions;
const auto testGetShaping = [&](const TaggedString& string, unsigned maxWidthInChars) {
return getShaping(string,
maxWidthInChars * ONE_EM,
ONE_EM, // lineHeight
ONE_EM, // lineHeight
style::SymbolAnchorType::Center,
style::TextJustifyType::Center,
0, // spacing
0, // spacing
{{0.0f, 0.0f}}, // translate
WritingModeType::Horizontal,
bidi,
glyphs,
imagePositions,
16.0,
/*allowVerticalPlacement*/ false);
};