Re: [cairo] color fonts and CAIRO_OPERATOR_SOURCE



On Wed, Sep 13, 2017 at 11:07 AM, Bill Spitzak <spitzak gmail com> wrote:
On Mon, Sep 11, 2017 at 10:39 PM, Behdad Esfahbod <behdad 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.
 
>
> On Mon, Sep 11, 2017 at 1:44 AM, Uli Schlachter <psychon znc in> wrote:
>>
>> Hi everyone,
>>
>> yesterday I was asked to comment here:
>>
>> https://github.com/i3/i3/pull/2925
>>
>> The issue seems to be: With operator SOURCE, drawing a color glyph
>> clears the entire surface. So, while "normal" glyphs are supposed to be
>> a mask that is then filled, color glyphs seem to be handled as an
>> unbounded source. This doesn't make a difference for OVER, but for lots
>> of other operators (at least SOURCE) it obviously matters.
>>
>> I didn't investigate this at all. I did not even try to reproduce.
>> Hence, this ping. Could one of you please look at this, confirm this
>> really happens, and say what should be done about this? Thanks.
>>
>> And yes, in the thread on color fonts, Matthias Clasen answered one of
>> my questions with:
>>
>> >> Okay... so what is the new model? What happens when I draw a color
>> >> glyph
>> >> with operator XOR and a red source?
>> >
>> >
>> > The red source is ignored for color glyphs because they are used as the
>> > source.
>>
>> So apparently this behaviour is by design, meaning that glyphs can only
>> really be used with operator OVER any more (well, and some others). So
>> let me ask this another why: Is this really a good behaviour?
>>
>> Oh and one more thing: Who updates cairo's docs and all the explanations
>> on the web page? ("glyphs work like this, except when they do not").
>>
>> Cheers,
>> Uli
>>
>> P.S.: The list of recipents is copied from the recent thread on color
>> fonts. I have no overview of how people ended up in this list. Sorry if
>> $YOU are the wrong recipent.
>> P.P.S: Yes, I also included Gtk-devel-list. I vaguely remember someone
>> saying that this stuff is relevant there. Dear moderator, sorry for the
>> work that this causes you.
>> --
>> 99 little bugs in the code
>> 99 little bugs in the code
>> Take one down, patch it around
>> 117 little bugs in the code
>>   -- @irqed
>
>
>
>
> --
> behdad
> http://behdad.org/
>



--


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]