[cairo] [PATCH] Use the new pixman_glyph_cache_t API that will be in pixman 0.28.0

Søren Sandmann sandmann at cs.au.dk
Wed May 30 20:37:50 PDT 2012

Behdad Esfahbod <behdad at behdad.org> writes:

>> - The mask format used with pixman_composite_glyphs() is that of the
>>   first glyph. This makes the implicit assumption that all the glyphs
>>   in the font have the same format, which I believe is true.
> Keith thought so too.  Wrong.  See:
> commit 805b668260c47e6d3d854361fcc53f12bd2a57e1
> commit 83963d2a9ec445e23cfbe692b877177a9d9d135e
> commit 83963d2a9ec445e23cfbe692b877177a9d9d135e
> https://bugs.freedesktop.org/show_bug.cgi?id=13479

Okay, thanks for the pointers. Do you know of any test cases that use

>>   Note that while the current code _looks_ like it will support both
>>   a8 and a8r8g8b8 glyphs within the same font, that is not actually
>>   the case since if the mask gets upgraded, adding a8 glyphs will
>>   produce the wrong result since the RGB channels are considered 0 in
>>   this format and so they will be drawn empty.
> Again, wrong.  I fixed and tested this.  See:

The *current* code - master as of today - doesn't do this, but I do
remember that the code used to do this, and I agree it's the right thing
to do.

It's easy enough to fix in the pixman code; the only concern is how
seriously we need to take the Render spec. It does seem to call for the
behavior of directly adding the glyphs, but that behavior is so useless
that I can't imagine how anyone could actually rely on it. So I guess
I'll just update the pixman code to do the white-source thing.


More information about the cairo mailing list