diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2018-12-18 22:20:57 +0100 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2018-12-23 12:00:07 +0000 |
commit | 3306b162392cb4afe268e8dfecd3a0e7ba7eaca6 (patch) | |
tree | 5d69c83f42fc17fe4cc16c59c768c644b767d72f /src/platformsupport/fontdatabases/mac | |
parent | 5af60d3b371360285af442d1ee194b44d681f297 (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 'src/platformsupport/fontdatabases/mac')
-rw-r--r-- | src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm index 19b450b643..7957cd130a 100644 --- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm +++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm @@ -736,7 +736,7 @@ bool QCoreTextFontEngine::shouldSmoothFont() const bool QCoreTextFontEngine::expectsGammaCorrectedBlending() const { - return shouldSmoothFont(); + return shouldSmoothFont() && fontSmoothing() == Subpixel; } qreal QCoreTextFontEngine::fontSmoothingGamma() |