forked from qt-creator/qt-creator
QmlProfiler: fixed font rendering problem on OsX
Change-Id: I86b4474aeadb991ba8591784945371e8ac925b00 Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user