we account differently for the ascender already
This commit is contained in:
@@ -219,8 +219,7 @@ void SymbolBucket::addFeature(const std::vector<Coordinate> &line, const Shaping
|
||||
anchors = {Anchor{float(line[0].x), float(line[0].y), 0, minScale}};
|
||||
}
|
||||
|
||||
// TODO: figure out correct ascender height.
|
||||
const vec2<float> origin = {0, -17};
|
||||
const vec2<float> origin = {0, 0};
|
||||
|
||||
for (Anchor &anchor : anchors) {
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user