summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-07-27 13:54:36 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-07-27 13:54:36 (GMT)
commitc21b143c58b22ed564b04bd79b1b17776cf306e2 (patch)
tree5075585f290e230a80667039d87bca52ba4f2891
parentdb501e24d460231590c7e30cb8704c132efc3e8e (diff)
parentf4f10d2a2d60790939492694abf6b9578a5f048a (diff)
downloadQt-c21b143c58b22ed564b04bd79b1b17776cf306e2.zip
Qt-c21b143c58b22ed564b04bd79b1b17776cf306e2.tar.gz
Qt-c21b143c58b22ed564b04bd79b1b17776cf306e2.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public: Workaround for QTBUG-8013: Do not return an ascent of 0
-rw-r--r--src/gui/text/qfontengine_s60.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/text/qfontengine_s60.cpp b/src/gui/text/qfontengine_s60.cpp
index 93f02ff..9073f89 100644
--- a/src/gui/text/qfontengine_s60.cpp
+++ b/src/gui/text/qfontengine_s60.cpp
@@ -291,7 +291,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