<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Gamma-corrected alpha blending for text output"
href="https://bugs.freedesktop.org/show_bug.cgi?id=28549#c5">Comment # 5</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Gamma-corrected alpha blending for text output"
href="https://bugs.freedesktop.org/show_bug.cgi?id=28549">bug 28549</a>
from <span class="vcard"><a class="email" href="mailto:octoploid@yandex.com" title="octoploid <octoploid@yandex.com>"> <span class="fn">octoploid</span></a>
</span></b>
<pre>I think the consensus is that this is not a freetype bug.
If you use qt-5 (KDE) you can get nice alpha blended fonts if you
set QPlatformIntegration::FontSmoothingGamma to 1.8.
diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp
b/src/plugins/platforms/xcb/qxcbintegration.cpp
index 258359d20f28..8181aeaf5c8b 100644
--- a/src/plugins/platforms/xcb/qxcbintegration.cpp
+++ b/src/plugins/platforms/xcb/qxcbintegration.cpp
@@ -357,7 +357,7 @@ QVariant
QXcbIntegration::styleHint(QPlatformIntegration::StyleHint hint) const
break; // Not implemented, use defaults
case QPlatformIntegration::FontSmoothingGamma:
// Match Qt 4.8 text rendering, and rendering of other X11 toolkits.
- return qreal(1.0);
+ return qreal(1.8);
case QPlatformIntegration::StartDragDistance: {
// The default (in QPlatformTheme::defaultThemeHint) is 10 pixels, but
// on a high-resolution screen it makes sense to increase it.
Similarly for Chromium you can get alpha blended fonts with a simple patch:
diff --git a/include/core/SkPostConfig.h b/include/core/SkPostConfig.h
index d08f68a1d91c..97fec8b47826 100644
--- a/include/core/SkPostConfig.h
+++ b/include/core/SkPostConfig.h
@@ -389,12 +389,9 @@
//////////////////////////////////////////////////////////////////////
-#if defined(SK_GAMMA_EXPONENT) && defined(SK_GAMMA_SRGB)
-# error "cannot define both SK_GAMMA_EXPONENT and SK_GAMMA_SRGB"
-#elif defined(SK_GAMMA_SRGB)
-# define SK_GAMMA_EXPONENT (0.0f)
-#elif !defined(SK_GAMMA_EXPONENT)
-# define SK_GAMMA_EXPONENT (2.2f)
-#endif
+#undef SK_GAMMA_EXPONENT
+#undef SK_GAMMA_CONTRAST
+# define SK_GAMMA_EXPONENT (1.8f)
+# define SK_GAMMA_CONTRAST (0.0f)
#endif // SkPostConfig_DEFINED
The reason this is not the default is because most people use crappy
TrueType fonts. And for them a gamma of 1.8 will make look fonts too light.
You really have to use freetype's new CFF engine to get good results.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>