summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfontengine_s60.cpp
diff options
context:
space:
mode:
authorRohan McGovern <rohan.mcgovern@nokia.com>2010-07-29 17:46:48 +1000
committerRohan McGovern <rohan.mcgovern@nokia.com>2010-07-29 17:46:48 +1000
commit940b5b23268193d58d7e229bf97a22276098790b (patch)
treeaf532e70e2646012b6a856bab48a105389bc2098 /src/gui/text/qfontengine_s60.cpp
parentd1e1f49ea0b742fd655112fdb30f5751e142a766 (diff)
parent0041606aefae5da0ff6c8187540f3eff33cbb643 (diff)
Merge remote branch 'origin/4.6' into 4.7-from-4.6
Conflicts: src/3rdparty/webkit/VERSION src/3rdparty/webkit/WebKit/qt/ChangeLog src/gui/itemviews/qlistview.cpp tests/auto/qlistview/tst_qlistview.cpp tests/auto/qnetworkreply/test/test.pro tests/auto/qsocks5socketengine/qsocks5socketengine.pro
Diffstat (limited to 'src/gui/text/qfontengine_s60.cpp')
-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 74ef646fbb..52a1fe70b1 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