Comment 78 for bug 145604

Revision history for this message
In , Belshazzar (belshazzar) wrote :

> (In reply to comment #57)

Hello Carl. I very much agree with Nicolaus. I also understood that you were not against the Turnerian FIR filters but against possible distributors’ choices affecting what Cairo can promise to render or not. Still I want to point something out regarding which filter is better for Cairo.

> The filters in cairo were written with the assumption of strong hinting. And
> with that hinting, I still haven't seen any better filters, (freetype provides
> a "LEGACY" filter that's supposed to be similar---it's not identical but I
> don't know if one or the other would be "better" in my opinion). I do agree
> that there are really bad color fringes if you use this filtered sub-pixel
> rendering without good hinting. I think "just don't do that" would be that
> reaction of the original filter's author. :-)

But strong hinting is the wrong assumption to begin with. Full hinting — or worse, byte-code superhinting — is so 1990’s!

Sure, a lot of coder/UNIX types still prefer high contrast on-screen text, but for Cairo an algorithm that is so robust that it can accomodate both full hinting and light autohinting is much a much better match.

Cairo is general purpose, so one thing it’s used for is on-screen text in UI and, e.g., webpages. This is a setting where full hinting makes some sense, because integer point sizes are used and the Cairo filter then has to deal with 1px stems only. No big deal, as only the curves and bowls and diagonals need attention.

But Cairo is also used for freely scalable canvases, for rich graphics using serif, script, or decorative typefaces. For animation. Strong hinting makes no sense here. On a general image surface nice autohinted text blends in a lot better. Autohinting /is/ »good hinting«. And the FIR filters are the best match for it. Even better, the FIR filters even give very good results for strongly hinted UI text. It’s just more versatile.

Please see the AB comparison page I made: http://www.alice-dsl.net/towolf/cairo/
(Weakness: It only presents one case, one text setting, unlike the huge comparison that Sylvain presented.)