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>
This commit is contained in:
parent
247baedb25
commit
1f1dc3fc4c
@ -736,8 +736,7 @@ bool QCoreTextFontEngine::shouldSmoothFont() const
|
|||||||
|
|
||||||
bool QCoreTextFontEngine::expectsGammaCorrectedBlending() const
|
bool QCoreTextFontEngine::expectsGammaCorrectedBlending() const
|
||||||
{
|
{
|
||||||
// Only works well when font-smoothing is enabled
|
return shouldSmoothFont();
|
||||||
return (glyphFormat == Format_A32) && !(fontDef.styleStrategy & (QFont::NoAntialias | QFont::NoSubpixelAntialias));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QImage QCoreTextFontEngine::imageForGlyph(glyph_t glyph, QFixed subPixelPosition, const QTransform &matrix)
|
QImage QCoreTextFontEngine::imageForGlyph(glyph_t glyph, QFixed subPixelPosition, const QTransform &matrix)
|
||||||
|
Loading…
Reference in New Issue
Block a user