src/gui/text/qfontengine_qpf.cpp
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 4 3b1da2848fc7
--- a/src/gui/text/qfontengine_qpf.cpp	Tue Jan 26 12:42:25 2010 +0200
+++ b/src/gui/text/qfontengine_qpf.cpp	Tue Feb 02 00:43:10 2010 +0200
@@ -819,7 +819,7 @@
     FT_Face face = freetype->face;
 
     // ### not perfect
-    const int ysize = fontDef.pixelSize << 6;
+    const int ysize = qRound(fontDef.pixelSize * qreal(64));
     const int xsize = ysize;
 
     if (freetype->xsize != xsize || freetype->ysize != ysize) {
@@ -938,7 +938,7 @@
     g.advance = qRound(metrics.xoff);
 
     QT_WRITE(fd, &g, sizeof(g));
-    QT_WRITE(fd, img.bits(), img.numBytes());
+    QT_WRITE(fd, img.bits(), img.byteCount());
 
     glyphPos = oldSize - glyphDataOffset;
 #if 0 && defined(DEBUG_FONTENGINE)
@@ -948,7 +948,7 @@
     quint32 *gmap = (quint32 *)(fontData + glyphMapOffset);
     gmap[glyph] = qToBigEndian(glyphPos);
 
-    glyphDataSize = glyphPos + sizeof(g) + img.numBytes();
+    glyphDataSize = glyphPos + sizeof(g) + img.byteCount();
     quint32 *blockSizePtr = (quint32 *)(fontData + glyphDataOffset - 4);
     *blockSizePtr = qToBigEndian(glyphDataSize);
 }