Bug#448555: Patch against deliberate font-uglification by Qt
M G Berberich wrote:
A patch that removes glyph blurrying is attached. It works fine here.
Thanks. I just rebuilt Qt 4.5 locally with the patch applied and can
confirm that it removes all the ugliness. I would really like this patch
to be included in the Debian packages. What do the maintainers think?
By the way, do we really need to remove the function convoluteBitmap()
as suggested in the patch? I would let it stay there (but just not use)
it in case some external program might need it. I'd suggest the
simplified attached patch.
Sebastian
--- qt4-x11-4.5.0-orig/src/gui/text/qfontengine_ft.cpp 2009-02-25 22:09:23.000000000 +0100
+++ qt4-x11-4.5.0/src/gui/text/qfontengine_ft.cpp 2009-03-15 15:37:18.000000000 +0100
@@ -1041,10 +1021,7 @@
if (hsubpixel) {
Q_ASSERT (bitmap.pixel_mode == FT_PIXEL_MODE_GRAY);
Q_ASSERT(antialias);
- uchar *convoluted = new uchar[bitmap.rows*bitmap.pitch];
- convoluteBitmap(bitmap.buffer, convoluted, bitmap.width, info.height, bitmap.pitch);
- convertRGBToARGB(convoluted + 1, (uint *)glyph_buffer, info.width, info.height, bitmap.pitch, subpixelType != QFontEngineFT::Subpixel_RGB);
- delete [] convoluted;
+ convertRGBToARGB(bitmap.buffer + 1, (uint *)glyph_buffer, info.width, info.height, bitmap.pitch, subpixelType != QFontEngineFT::Subpixel_RGB);
} else if (vfactor != 1) {
convertRGBToARGB_V(bitmap.buffer, (uint *)glyph_buffer, info.width, info.height, bitmap.pitch, subpixelType != QFontEngineFT::Subpixel_VRGB);
}
Reply to: