[Qt-interest] No glyph grid-fitting in QT4?

Oliver.Knoll at comit.ch Oliver.Knoll at comit.ch
Wed Jan 19 16:59:02 CET 2011


On 2011-01-19 Clemens Clemens Eisserer wrote:

> Hi,
> 
> I am a long-term KDE/QT user, but since the introduction of QT4 I am a bit
> bothered by its text rendering.
> 
> All the QT3/GTK+ based applications (including FireFox which is not gtk based)
> seem to apply some kind of grid-fitting algorythm, whereas QT simply seems to
> rely on subpixel rendering.

A quick google research "glyph grid fitting" came up with:

  https://secure.wikimedia.org/wikipedia/en/wiki/Saffron_Type_System 
  https://secure.wikimedia.org/wikipedia/en/wiki/Saffron_Type_System#Grid_fitting

I am no font expert, but IIRC Qt does not do the font rendering itself - on X11 I think it relies on Freetype, on Windows on whatever is used to render fonts on Windows (GDI?) etc.


Besides, there is an article here starting with " The last week I looked at some issues regarding Qt’s font rendering on X11, triggered by some bug reports comparing Qt 4′s font rendering to Qt 3′s and GTK’s font rendering, specifically when subpixel antialiasing is enabled.": 

  http://labs.qt.nokia.com/2008/09/01/subpixel-antialiasing-on-x11/

"After doing some digging I found out that we changed the smoothing filter in the transition from Qt 3 to Qt 4 to use an interpixel as opposed to intrapixel filter. Interpixel means we do the smoothing on the subpixels directly, ignoring pixel boundaries, which is arguably more correct from a technical perspective. However, since Qt 4 was released, Freetype has added support for doing subpixel rendering and filtering itself, along with several settings for which filter to use. [...]"

I think that contains (some) of the answers to your question, such as:

"As the legacy smoothing filter looks really ugly with certain fonts and/or slight hinting there is no way we want to use it by default in Qt, but if you really want Qt 4′s fonts to be rendered as in Qt 3, you can enable the legacy subpixel filtering as described on http://johan.kiviniemi.name/blag/2008/01/12/ubuntu-hardy-fonts/ (note it seems you might have to use the value “legacy” or “lcdlegacy” instead of “lcdfilterlegacy” depending on your system). Note that this can cause severe color fringes with certain fonts, while making other fonts crisper."


Bottom line: so yes, there are definitively changes between Qt 3 to 4, but "only to the good" (where "good" is apparently a *very* subjective opinion when it comes to fonts ;)

Did you try the tip apparently described here: http://johan.kiviniemi.name/blag/2008/01/12/ubuntu-hardy-fonts/ ? Does that bring back the desired "Qt 3 font rendering"?

Cheers, Oliver



--
Oliver Knoll
Dipl. Informatik-Ing. ETH
COMIT AG - ++41 79 520 95 22





More information about the Qt-interest-old mailing list