summaryrefslogtreecommitdiffstats
path: root/tests/manual/textrendering
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2018-12-18 22:20:57 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2018-12-23 12:00:07 +0000
commit3306b162392cb4afe268e8dfecd3a0e7ba7eaca6 (patch)
tree5d69c83f42fc17fe4cc16c59c768c644b767d72f /tests/manual/textrendering
parent5af60d3b371360285af442d1ee194b44d681f297 (diff)
macOS: Only do gamma-corrected blending for subpixel-antialiased text
The grayscale font-smoothing doesn't expect to be linearly blended, as first assumed. Amended nativetext manual test to better diagnose the native Core Text behavior. Non-linear blending will result in the magenta text having a dark outline against the green background. Change-Id: I24a5f04eb1bd66fb98d621078d80ee9b80800827 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'tests/manual/textrendering')
-rw-r--r--tests/manual/textrendering/nativetext/main.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/manual/textrendering/nativetext/main.cpp b/tests/manual/textrendering/nativetext/main.cpp
index 7e98dd44d0..b481e44bae 100644
--- a/tests/manual/textrendering/nativetext/main.cpp
+++ b/tests/manual/textrendering/nativetext/main.cpp
@@ -101,7 +101,7 @@ public:
const int ascent = fontMetrics().ascent();
- QPen metricsPen(Qt::magenta, 1.0);
+ QPen metricsPen(QColor(112, 216, 255), 1.0);
metricsPen.setCosmetic(true);
p.setPen(metricsPen);
p.drawLine(QPoint(0, ascent), QPoint(width(), ascent));
@@ -201,7 +201,7 @@ public:
case 0: return qMakePair(QColor(), QColor());
case 1: return qMakePair(QColor(Qt::black), QColor(Qt::white));
case 2: return qMakePair(QColor(Qt::white), QColor(Qt::black));
- case 3: return qMakePair(QColor(Qt::green), QColor(Qt::red));
+ case 3: return qMakePair(QColor(Qt::magenta), QColor(Qt::green));
case 4: return qMakePair(QColor(0, 0, 0, 128), QColor(Qt::white));
case 5: return qMakePair(QColor(255, 255, 255, 128), QColor(Qt::black));
default: return qMakePair(QColor(), QColor());