[cairo] Sub-pixel Font Filtering in 1.10
Freddie Witherden
freddie at witherden.org
Fri Jan 15 11:09:38 PST 2010
On Friday 15 January 2010 16:54:34 Lance Hepler wrote:
> 1) The cairo developers do not share the freetype developers' patent
> fears. They simply ignore this point. (I might be wrong here..)
Possibly, however, some distributions are patent conscious. The easier we can
make their lives the better.
> 2) As for API breakage, the API is broken. If freetype disables its
> SPR, then it _silently_ fails to produce SPR text when asked. The
> cairo developers regarded this as unacceptable. Prior the 1.8 release,
> David Turner's freetype work was present in cairo , but because Fedora
> disables SPR, cairo would silently fail vast swaths of its test suite
> and they found this unacceptable. The patches were reverted and
> another solution was asked for.
The breakage is only silent if ones application is poorly written. See
FT_Library_SetLcdFilter; if LCD filtering is patent-disabled it returns
FT_Err_Unimplemented_Feature.
<Rant>
Moreover what is *any* test suite for Cairo doing relying on the pixel output
of FreeType!?! Even minor releases of FreeType (e.g., 2.3.9 -> 2.3.11) change
the pixel output for given fonts at different sizes. It is one of the main
advantages of the auto-hinter --- that it can be improved retroactively. Any
test suite relying on non-invariant properties of other libraries deserves to
break. Regularly.
</Rant>
Finally, as far as I am aware the patches by David Turner never made it into
any stable release of Cairo and I have been patching since 1.2.x. (Although
support was added in the 1.7.x development series it was subsequently removed
due to a questionable API --- a decision which I reaffirm my support for.)
> 3) Behdad has some plans for the way the font backend works. Something
> to do with perfect scalability. As I understand it, this is difficult
> to achieve if we pass the font rasterization task to freetype.
Do you have a mailing list posting on this? I'd be really interested to give
it a read (and almost certainly missed it in my font article).
However, DIY rasterisation is seldom a sound idea and is likely to alienate
users. (Consider Safari on Windows, a case study I cover in my article or the
Qt OpenGL back-end, whose text output is often condemned by users.)
Polemically yours, Freddie.
More information about the cairo
mailing list