[Qt-interest] [Linux] Ugly anti-aliasing (still) in Qt 4.5

andrew.m.goth at l-3com.com andrew.m.goth at l-3com.com
Thu Mar 5 22:23:10 CET 2009


Sebastian Krause wrote:
> http://realpath.org/screenshots/qt.png
> 
> In the foreground Qt with rather blurry fonts and in the background
> Gtk, demonstrating how it is supposed to look like.

I'm guessing you have horizontal BGR ordering.  From your screenshot, it
looks to me like Qt shifts everything horizontally by one subpixel,
since the left edges of glyphs are yellow (G+R) and the right edges are
blue.  But because of the filtering (described below), I can't be sure.

Try editing convertRGBToARGB in qt/src/gui/text/qfontengine_ft.cpp .

There is some filtering applied after rendering and before converting to
ARGB.  The function is called convoluteBitmap.  I see that the first and
last two output values are forced to zero, to avoid indexing outside the
bounds of the input array.  I hope this is accounted for elsewhere.  
Before calling this function, the pitch (horizontal size in subpixels)
is rounded up to the nearest multiple of four, and before that, eight
extra subpixels are added for luck.

I suggest tweaking all these operations until you find something that
works for you, then reporting on your findings here and perhaps in the
task tracker.

-- 
Andy Goth
<amgoth at link.com>




More information about the Qt-interest-old mailing list