[cairo] color fonts and CAIRO_OPERATOR_SOURCE

Bill Spitzak spitzak at gmail.com
Wed Sep 20 19:39:31 UTC 2017


On Wed, Sep 20, 2017 at 12:15 PM, Behdad Esfahbod <behdad at behdad.org> wrote:
> On Wed, Sep 13, 2017 at 11:07 AM, Bill Spitzak <spitzak at gmail.com> wrote:
>>
>> On Mon, Sep 11, 2017 at 10:39 PM, Behdad Esfahbod <behdad at behdad.org>
>> wrote:
>> > It was actually not that complicated:
>> > https://bugs.freedesktop.org/show_bug.cgi?id=102661
>>
>> Yes that sounds just like my second suggestion.
>>
>> To deal with the double-premultiply, I would just special-case OVER
>> (and perhaps a few other bounded operators). They cause the current
>> code to be run where it uses the glyph color+alpha as the source. All
>> other compositing operators ignore the glyph color, and use the glyph
>> alpha as the letter shape.
>>
>> SOURCE can then be used to fill the glyph shapes with a constant color.
>
>
> I'm not sure how I feel about that.

Yes there is a problem in that you cannot make a partially-transparent
shadow with this. I'm not sure if perhaps one of the other compositing
operators (ATOP?) will produce the desired result.

All I can say for sure is that OVER must produce the colored glyphs or
you will break everything, and that SOURCE is currently useless so it
makes sense to change what it does.


More information about the cairo mailing list