[cairo] Subpixel Positioning w/FreeType

Freddie Witherden freddie at witherden.org
Tue Oct 6 12:58:32 PDT 2009


Hi all,

I am wondering about any current or future proposals for supporting  
subpixel positioning with FreeType. Subpixel positioning -- not to be  
confused with subpixel rendering/anti-aliasing -- allows for more  
accurate glyph positioning.

Much like subpixel rendering, subpixel positioning takes advantage of  
the fact that LCD screens are made up of three subpixels in a specific  
order. This order is usually RGB. The predictable subpixel order  
allows for three times the horizontal resolution. The same technique  
can be applied to glyph positions. Instead of having to start on a  
pixel boundary glyphs are instead able to start on a subpixel  
boundary. This allows for spacing accurate to 1/3 of a pixel in most  
cases.

It is my understanding (from looking over the source) that Cairo does  
not currently support subpixel positing under FreeType. Further, I  
also understand that the FreeType code has been recently re-written  
(there was a note on the 1.10 roadmap) to take advantage of the  
subpixel filtering API exported by FreeType.

I believe that basic, 1/3 of a pixel, subpixel positing could be  
implemented in Cairo without a huge amount of work. It would of course  
only be applicable when subpixel rendering is enabled. Since Cairo and  
Pango both already use fractional co-ordinates this should not break  
backwards compatibility.

Both Quartz (OS X) and ClearType (Windows) support this already.

Polemically yours, Freddie.


More information about the cairo mailing list