summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-11-16 16:01:30 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2018-11-30 00:18:59 +0000
commit1f1dc3fc4c2e5e2d94e86dfc7235a4b762da2e72 (patch)
treed9a136fa68040368a3d9e89818aa97545f3d7c5d
parent247baedb2560d23d14f27cd52f4759e07b0049c0 (diff)
Fix gamma-correction in QCoreTextFontEngine with Mojave
The code was previously assuming font-smoothing was only used with A32 font antialiasing, so the corresponding gamma-correction was not performed. Task-number: QTBUG-71075 Task-number: QTBUG-71946 Change-Id: I68d8304cf18638239d8bfac32c67333f16ccc7bd Reviewed-by: Lars Knoll <lars.knoll@qt.io>
-rw-r--r--src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
index 271f07e0c1..7fb22c0675 100644
--- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
+++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
@@ -736,8 +736,7 @@ bool QCoreTextFontEngine::shouldSmoothFont() const
bool QCoreTextFontEngine::expectsGammaCorrectedBlending() const
{
- // Only works well when font-smoothing is enabled
- return (glyphFormat == Format_A32) && !(fontDef.styleStrategy & (QFont::NoAntialias | QFont::NoSubpixelAntialias));
+ return shouldSmoothFont();
}
QImage QCoreTextFontEngine::imageForGlyph(glyph_t glyph, QFixed subPixelPosition, const QTransform &matrix)