diff options
author | aavit <qt-info@nokia.com> | 2011-05-02 09:26:47 (GMT) |
---|---|---|
committer | aavit <qt-info@nokia.com> | 2011-05-02 09:26:47 (GMT) |
commit | 903cd489d77a7a432c1d5127e238382f42f6e89f (patch) | |
tree | 86bb5583b23ea55863cab3ae76ace37bf3c3a2e9 /src/gui | |
parent | ab29e9f1ab52901a5ed98055cf203817d2248dd2 (diff) | |
parent | ac9e63b58533a3215106ed9da82cff3a3e3dda3a (diff) | |
download | Qt-903cd489d77a7a432c1d5127e238382f42f6e89f.zip Qt-903cd489d77a7a432c1d5127e238382f42f6e89f.tar.gz Qt-903cd489d77a7a432c1d5127e238382f42f6e89f.tar.bz2 |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-fire-team
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/text/qfont.h | 2 | ||||
-rw-r--r-- | src/gui/text/qrawfont.cpp | 6 | ||||
-rw-r--r-- | src/gui/text/qrawfont.h | 4 | ||||
-rw-r--r-- | src/gui/text/qtextlayout.cpp | 3 |
4 files changed, 9 insertions, 6 deletions
diff --git a/src/gui/text/qfont.h b/src/gui/text/qfont.h index 8dbc746..0c7b6f8 100644 --- a/src/gui/text/qfont.h +++ b/src/gui/text/qfont.h @@ -239,7 +239,7 @@ public: bool isCopyOf(const QFont &) const; #ifdef Q_COMPILER_RVALUE_REFS inline QFont &operator=(QFont &&other) - { qSwap(d, other.d); return *this; } + { qSwap(d, other.d); qSwap(resolve_mask, other.resolve_mask); return *this; } #endif #ifdef Q_WS_WIN diff --git a/src/gui/text/qrawfont.cpp b/src/gui/text/qrawfont.cpp index 6ac2677..1bce909 100644 --- a/src/gui/text/qrawfont.cpp +++ b/src/gui/text/qrawfont.cpp @@ -308,10 +308,10 @@ qreal QRawFont::descent() const \sa setPixelSize() */ -int QRawFont::pixelSize() const +qreal QRawFont::pixelSize() const { if (!isValid()) - return -1; + return 0.0; return d->fontEngine->fontDef.pixelSize; } @@ -577,7 +577,7 @@ QRawFont QRawFont::fromFont(const QFont &font, QFontDatabase::WritingSystem writ /*! Sets the pixel size with which this font should be rendered to \a pixelSize. */ -void QRawFont::setPixelSize(int pixelSize) +void QRawFont::setPixelSize(qreal pixelSize) { if (d->fontEngine == 0) return; diff --git a/src/gui/text/qrawfont.h b/src/gui/text/qrawfont.h index 96dc838..56aeefc 100644 --- a/src/gui/text/qrawfont.h +++ b/src/gui/text/qrawfont.h @@ -96,8 +96,8 @@ public: const QTransform &transform = QTransform()) const; QPainterPath pathForGlyph(quint32 glyphIndex) const; - void setPixelSize(int pixelSize); - int pixelSize() const; + void setPixelSize(qreal pixelSize); + qreal pixelSize() const; QFont::HintingPreference hintingPreference() const; diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp index 122382f..cb5ba0e 100644 --- a/src/gui/text/qtextlayout.cpp +++ b/src/gui/text/qtextlayout.cpp @@ -2149,6 +2149,9 @@ QList<QGlyphs> QTextLine::glyphs(int from, int length) const QGlyphLayout subLayout = glyphLayout.mid(start, end - start); glyphLayoutHash.insertMulti(multiFontEngine->engine(which), GlyphInfo(subLayout, pos, flags)); + for (int i = 0; i < subLayout.numGlyphs; i++) + pos += QPointF(subLayout.advances_x[i].toReal(), + subLayout.advances_y[i].toReal()); start = end; which = e; |