From af4ecc62607e1b8870d2338377422e137cef6068 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Ka=CC=88fer?= Date: Tue, 5 Aug 2014 15:08:26 +0200 Subject: [PATCH] we account differently for the ascender already --- src/renderer/symbol_bucket.cpp | 3 +-- src/text/glyph_store.cpp | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/symbol_bucket.cpp b/src/renderer/symbol_bucket.cpp index 2009fe364..e5bd3a3e1 100644 --- a/src/renderer/symbol_bucket.cpp +++ b/src/renderer/symbol_bucket.cpp @@ -219,8 +219,7 @@ void SymbolBucket::addFeature(const std::vector &line, const Shaping anchors = {Anchor{float(line[0].x), float(line[0].y), 0, minScale}}; } - // TODO: figure out correct ascender height. - const vec2 origin = {0, -17}; + const vec2 origin = {0, 0}; for (Anchor &anchor : anchors) { diff --git a/src/text/glyph_store.cpp b/src/text/glyph_store.cpp index 83c2beb5c..fa3990222 100644 --- a/src/text/glyph_store.cpp +++ b/src/text/glyph_store.cpp @@ -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;