From 5d28d58c5754a1ef3e960772f0222fd645f7472e Mon Sep 17 00:00:00 2001 From: Christiaan Janssen Date: Fri, 10 Feb 2012 16:19:10 +0100 Subject: [PATCH] QmlProfiler: fixed font rendering problem on OsX Change-Id: I86b4474aeadb991ba8591784945371e8ac925b00 Reviewed-by: Kai Koehne --- src/plugins/qmlprofiler/canvas/qdeclarativecontext2d.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/plugins/qmlprofiler/canvas/qdeclarativecontext2d.cpp b/src/plugins/qmlprofiler/canvas/qdeclarativecontext2d.cpp index 39c69e85ddf..641eb749107 100644 --- a/src/plugins/qmlprofiler/canvas/qdeclarativecontext2d.cpp +++ b/src/plugins/qmlprofiler/canvas/qdeclarativecontext2d.cpp @@ -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); }