diff options
-rw-r--r-- | src/gui/text/qfontengine_s60.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/text/qfontengine_s60.cpp b/src/gui/text/qfontengine_s60.cpp index f691413..098d46f 100644 --- a/src/gui/text/qfontengine_s60.cpp +++ b/src/gui/text/qfontengine_s60.cpp @@ -374,7 +374,10 @@ glyph_metrics_t QFontEngineS60::boundingBox(glyph_t glyph) QFixed QFontEngineS60::ascent() const { - return m_originalFont->FontMaxAscent(); + // Workaround for QTBUG-8013 + // Stroke based fonts may return an incorrect FontMaxAscent of 0. + const QFixed ascent = m_originalFont->FontMaxAscent(); + return (ascent > 0) ? ascent : QFixed::fromReal(m_originalFontSizeInPixels) - descent(); } QFixed QFontEngineS60::descent() const |