[cairo] Cairo 1.10 rendering text to transparent image surface [BUG?]
spitzak at gmail.com
Tue Nov 30 11:36:23 PST 2010
I believe this is unavoidable when there is only a single alpha value
for all three of the rgb channels. The pixels at the edge of the
characters are actually partially-transparent and somewhat red or blue
due to the subpixel antialiasing.
The direct rendering of glyphs on white works because the source image
is really a 1-channel image but with 3x the horizontal resolution.
A few ideas but they all require modifications to Cairo/Pixman:
- A surface with 6 channels: independent alpha for the r, g, and b. This
also allows a surface to simulate colored subtractive objects.
- A monochrome surface (ie one channel) with 3x the horizontal
resolution. This would match how the glyphs are drawn.
User would create these surfaces, draw into them, and use them as the
source and/or mask when compositing into the final result.
Geoff Youngs wrote:
> I've tried using the latest versions of pixman & cairo from git and
> I'm still getting colour corruption at the edge of glyphs rendered to
> an image surface with a non-opaque background...
More information about the cairo