CoreText: Define font smoothing gamma along with rest of relevant code
Change-Id: I57909603732de6c1a91c744a358968941e64acdf Reviewed-by: Lars Knoll <lars.knoll@qt.io>bb10
parent
5ed471a80a
commit
58e66a2573
|
|
@ -739,6 +739,11 @@ bool QCoreTextFontEngine::expectsGammaCorrectedBlending() const
|
|||
return shouldSmoothFont();
|
||||
}
|
||||
|
||||
qreal QCoreTextFontEngine::fontSmoothingGamma()
|
||||
{
|
||||
return 2.0;
|
||||
}
|
||||
|
||||
QImage QCoreTextFontEngine::imageForGlyph(glyph_t glyph, QFixed subPixelPosition, const QTransform &matrix)
|
||||
{
|
||||
glyph_metrics_t br = alphaMapBoundingBox(glyph, subPixelPosition, matrix, glyphFormat);
|
||||
|
|
|
|||
|
|
@ -127,6 +127,7 @@ public:
|
|||
Q_ENUM(FontSmoothing);
|
||||
|
||||
static FontSmoothing fontSmoothing();
|
||||
static qreal fontSmoothingGamma();
|
||||
|
||||
static bool ct_getSfntTable(void *user_data, uint tag, uchar *buffer, uint *length);
|
||||
static QFont::Weight qtWeightFromCFWeight(float value);
|
||||
|
|
|
|||
|
|
@ -63,6 +63,8 @@
|
|||
|
||||
#include <QtGui/private/qcoregraphics_p.h>
|
||||
|
||||
#include <QtFontDatabaseSupport/private/qfontengine_coretext_p.h>
|
||||
|
||||
#ifdef QT_WIDGETS_LIB
|
||||
#include <QtWidgets/qtwidgetsglobal.h>
|
||||
#if QT_CONFIG(filedialog)
|
||||
|
|
@ -477,7 +479,7 @@ QCocoaServices *QCocoaIntegration::services() const
|
|||
QVariant QCocoaIntegration::styleHint(StyleHint hint) const
|
||||
{
|
||||
if (hint == QPlatformIntegration::FontSmoothingGamma)
|
||||
return 2.0;
|
||||
return QCoreTextFontEngine::fontSmoothingGamma();
|
||||
|
||||
return QPlatformIntegration::styleHint(hint);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue