summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@nokia.com>2009-10-28 09:03:12 (GMT)
committerJoerg Bornemann <joerg.bornemann@nokia.com>2009-11-03 09:06:15 (GMT)
commit9fab0ede200960f0dbec1457757a6ba3214c3ce6 (patch)
tree506193cc33c06953a348b4872467a743e00f61cd /src
parentfa1856bcb2eff41dadf0900202dd43f44ddb2343 (diff)
downloadQt-9fab0ede200960f0dbec1457757a6ba3214c3ce6.zip
Qt-9fab0ede200960f0dbec1457757a6ba3214c3ce6.tar.gz
Qt-9fab0ede200960f0dbec1457757a6ba3214c3ce6.tar.bz2
fix font height calculation on QWS
fontDef.pixelSize is a qreal now and we should round it after multiplication to avoid an accuracy loss. Reviewed-by: mae
Diffstat (limited to 'src')
-rw-r--r--src/gui/text/qfontengine_qpf.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qfontengine_qpf.cpp b/src/gui/text/qfontengine_qpf.cpp
index 6ff0fbd..94974fc 100644
--- a/src/gui/text/qfontengine_qpf.cpp
+++ b/src/gui/text/qfontengine_qpf.cpp
@@ -819,7 +819,7 @@ FT_Face QFontEngineQPF::lockFace() const
FT_Face face = freetype->face;
// ### not perfect
- const int ysize = int(fontDef.pixelSize) << 6;
+ const int ysize = qRound(fontDef.pixelSize * qreal(64));
const int xsize = ysize;
if (freetype->xsize != xsize || freetype->ysize != ysize) {