QmlProfiler: fixed font rendering problem on OsX

Change-Id: I86b4474aeadb991ba8591784945371e8ac925b00
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
This commit is contained in:
Christiaan Janssen
2012-02-10 16:19:10 +01:00
parent da4b62e1db
commit 5d28d58c57

View File

@@ -589,7 +589,14 @@ void Context2D::setFont(const QString &fontString)
else if (token.endsWith(QLatin1String("px"))) {
QString number = token;
number.remove("px");
#ifdef Q_OS_MACX
// compensating the extra antialias space with bigger fonts
// this class is only used by the QML Profiler
// not much harm can be inflicted by this dirty hack
font.setPointSizeF(number.trimmed().toFloat()*4.0f/3.0f);
#else
font.setPointSizeF(number.trimmed().toFloat());
#endif
} else
font.setFamily(token);
}