we account differently for the ascender already

This commit is contained in:
Konstantin Käfer
2014-08-05 15:08:26 +02:00
parent a790e080a5
commit af4ecc6260
2 changed files with 2 additions and 2 deletions

View File

@@ -54,6 +54,7 @@ const Shaping FontStack::getShaping(const std::u32string &string, const float &m
}
void alignVertically(Shaping &shaping, const uint32_t &lines, const float &lineHeight, const float &verticalAlign) {
// TODO: figure out correct ascender height.
const float dy = -(lineHeight * (lines - 1) + 24) * verticalAlign - 5;
for (PositionedGlyph &shape : shaping) {
shape.y += dy;