diff options
author | Alessandro Portale <alessandro.portale@nokia.com> | 2011-06-16 21:40:56 (GMT) |
---|---|---|
committer | Alessandro Portale <alessandro.portale@nokia.com> | 2011-06-16 21:57:14 (GMT) |
commit | be681e71510de948dfc32a647ecef5def6c01118 (patch) | |
tree | b09f1c79faef6c42d472d8b72c14b9476a32d349 | |
parent | a4ff08bd1eb0ca91d795792cdd7454fcda4ca15d (diff) | |
download | Qt-be681e71510de948dfc32a647ecef5def6c01118.zip Qt-be681e71510de948dfc32a647ecef5def6c01118.tar.gz Qt-be681e71510de948dfc32a647ecef5def6c01118.tar.bz2 |
Revert "Symbian: Fix QFontInfo::pixelSize()"
This reverts commit fcfc19878a0a1a48194a786bba64da11606077d2.
I am happy that this commit fixed three bugs at once. But
Actually, I am not sure if QTBUG-15513 should be fixed at
this point. Fact is that the patch as it is would have changed
the point->pixels calculation back to how it was in Qt 4.6.
This means that the fonts which are defined with pointSize
would now (in Qt 4.7.4) suddenly be bigger than they were
in Qt 4.7.3. Imho this is unacceptable, as it would break
all layouts which were developed for Qt 4.7 apps, when
point size (instead of pixle size) was used.
I will need to fix QTBUG-17844 without fixing QTBUG-13009
If QTBUG-13009 will be fixed for 4.8 will be discussed.
-rw-r--r-- | src/gui/text/qfontdatabase_s60.cpp | 4 | ||||
-rw-r--r-- | src/gui/text/qfontengine_s60.cpp | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/text/qfontdatabase_s60.cpp b/src/gui/text/qfontdatabase_s60.cpp index 6ede1f1..1eb4242 100644 --- a/src/gui/text/qfontdatabase_s60.cpp +++ b/src/gui/text/qfontdatabase_s60.cpp @@ -1014,6 +1014,10 @@ QFontEngine *QFontDatabase::findFont(int script, const QFontPrivate *d, const QF const QSymbianTypeFaceExtras *typeFaceExtras = dbExtras->extras(fontFamily, request.weight > QFont::Normal, request.style != QFont::StyleNormal); + // We need a valid pixelSize, e.g. for lineThickness() + if (request.pixelSize < 0) + request.pixelSize = request.pointSize * d->dpi / 72; + fe = new QFontEngineS60(request, typeFaceExtras); #else // QT_NO_FREETYPE Q_UNUSED(d) diff --git a/src/gui/text/qfontengine_s60.cpp b/src/gui/text/qfontengine_s60.cpp index 6b93efa..36eb7c0 100644 --- a/src/gui/text/qfontengine_s60.cpp +++ b/src/gui/text/qfontengine_s60.cpp @@ -294,7 +294,6 @@ QFontEngineS60::QFontEngineS60(const QFontDef &request, const QSymbianTypeFaceEx , m_activeFont(0) { QFontEngine::fontDef = request; - QFontEngine::fontDef.pixelSize = m_originalFontSizeInPixels; // Needs a valid pixel size. QTBUG-13009, QTBUG-17844 setFontScale(1.0); cache_cost = sizeof(QFontEngineS60); } |