summaryrefslogtreecommitdiffstats
path: root/src/gui/text
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/text')
-rw-r--r--src/gui/text/qfontdatabase_s60.cpp4
-rw-r--r--src/gui/text/qfontengine_s60.cpp1
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);
}