[cairo] Cairo + Pango

Bill Spitzak spitzak at d2.com
Sun Aug 8 09:19:20 PDT 2004

On Saturday 07 August 2004 07:49 pm, Keith Packard wrote:
> Around 15 o'clock on Aug 7, Bill Spitzak wrote:
> > LCD screens should be treated by Cairo exactly like they have 3x
> > resolution in one direction. All transforms, etc, should be done as
> > though this is the final output device. The final stage of compositing
> > selects from the r,g,b of source and destination images according to x%3.
> > The other trick is that thin lines are made 3 pixels wide horizontally,
> > and the font renderer also likes to make things 3 pixels thick.
> It's harder than that; you have to filter the output to balance color
> fringing and resolution.  We've demonstrated that you can effectively
> sub-pixel position glyphs, but you have to respect the pixel grid when
> computing stem widths, and you have to filter the output a bit.

That's what I meant when I said "the font renderer also likes to make things 
3 pixels thick".

Early Microsoft implementations (shown in their papers) seemed to do error 
diffusion to the right of any glyph to balance the colors. But the new one, 
and FreeType, seem instead to alter the rendering so the error is corrected 
much more locally. It seems to me that this mostly means that vertical edges 
should be 3 pixels apart. This seems closely related to font hinting and 
should be done in the same area.

Cairo itself probably only needs to force the minimum line size for stroke to 
be 3 pixels horizontally and 1 vertically, thinner lines must be done with 
transparancy. I'm thinking fills could completely ignore any attempt to color 
balance, and assumme all filled shapes will be more than a few pixels wide.

More information about the cairo mailing list