diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2018-11-25 15:59:04 +0100 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2018-11-29 12:03:18 +0000 |
commit | d4e3442fdbb98b5c635448031ff9958819a46bc5 (patch) | |
tree | e4e66db8e8d155ec011f5c9859d1c4b70279aab0 /src/plugins/platforms | |
parent | 1f998e040eb7202691f4a4eb5fb77499247b2aab (diff) |
CoreText: Modernize font smoothing and antialiasing threshold detection
The way macOS does font smoothing has changed in Mojave, and we need to
take both this new algorithm into account, as well as support users who
set legacy preferences to revert back to subpixel font smoothing.
As a followup to this patch we will tweak some of the existing logic
to take the new font smoothing algorithm into account, so this is
just a first step.
Change-Id: If37014c18515f406b8bb8194c9df7a75c2eb10fc
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r-- | src/plugins/platforms/cocoa/qpaintengine_mac.mm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/cocoa/qpaintengine_mac.mm b/src/plugins/platforms/cocoa/qpaintengine_mac.mm index 5c880b1cad..69e7a92234 100644 --- a/src/plugins/platforms/cocoa/qpaintengine_mac.mm +++ b/src/plugins/platforms/cocoa/qpaintengine_mac.mm @@ -914,7 +914,7 @@ void QCoreGraphicsPaintEngine::drawTextItem(const QPointF &pos, const QTextItem QFontEngine *fe = ti.fontEngine; const bool textAA = ((state->renderHints() & QPainter::TextAntialiasing) - && (fe->fontDef.pointSize > QCoreTextFontEngine::antialiasingThreshold) + && (fe->fontDef.pointSize > QCoreTextFontEngine::antialiasingThreshold()) && !(fe->fontDef.styleStrategy & QFont::NoAntialias)); const bool lineAA = state->renderHints() & QPainter::Antialiasing; if (textAA != lineAA) |