Re: color fonts and CAIRO_OPERATOR_SOURCE

2017-09-11 Thread Behdad Esfahbod
It was actually not that complicated:
https://bugs.freedesktop.org/show_bug.cgi?id=102661

On Mon, Sep 11, 2017 at 1:44 AM, Uli Schlachter  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/
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Color fonts

2017-06-30 Thread Matthias Clasen
On Thu, Jun 29, 2017 at 11:18 PM, Matthias Clasen  wrote:

> I had another go at this here:  https://github.com/
> matthiasclasen/cairo/tree/emoji-again
>

I've spent some more time on this branch. It now uses paint only for
clusters that consists
purely of color glyphs, rewriting the inputs to remove handled clusters,
and then falls through
the show_glyphs code paths.

It seems to work ok, at least as far as gedit / pango let me test easily.
I'm less confident that
the CAIRO_TEXT_CLUSTER_FLAG_BACKWARD case is entirely correct, that is hard
for me
to judge.

An unrelated observation: pango treats the gap between an emoji modifier
base and a variant selector
as a cursor position. That looks like a bug.
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Color fonts

2017-06-30 Thread Bastien Nocera
On Thu, 2017-06-29 at 23:18 -0400, Matthias Clasen wrote:
> I had another go at this here:  
> https://github.com/matthiasclasen/cairo/tree/emoji-again

I rebased your old branch on top of 1.14.10 (the current stable):
https://fedorapeople.org/~hadess/emoji/cairo-emoji-5-rebased-on-1.14.10.patch
for posterity more than anything.

I've also updated the COPR. Installing both packages in there should
get you colored emojis in Characters and other GTK+ 3.x apps.

https://copr.fedorainfracloud.org/coprs/hadess/emoji/
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Color fonts

2017-06-29 Thread Matthias Clasen
I had another go at this here:
https://github.com/matthiasclasen/cairo/tree/emoji-again
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Color fonts

2017-06-29 Thread Matthias Clasen
On Wed, Jun 28, 2017 at 8:23 AM, Behdad Esfahbod  wrote:

> Hello,
>
> All of you have asked me about the status of color fonts in cairo.
> There's some discussion here:
>
> https://github.com/googlei18n/noto-emoji/issues/36
>
> The remaining part is indeed the cairo patchset.  Matthias had a reworked
> version, which Chris Wilson objected to.  I agree with parts of his
> objection.  In particular, I don't think we should need to touch every
> compositor.
>
> IMO, this is how it should work:
>
>   - Extend glyph cache to also hold a color-glyph object possibly,
>
>   - Early on, perhals in _cairo_surface_show_text_glyphs(), ask
> scaled_font to see if it has color.  If it does, call a special function
> that iterates over the glyphs, for each, load it and see if it has color.
> Show the color ones using image ops, show the rest using text ops. Or just
> show all as image ops, that's feasible too.
>
> With the above, we wouldn't need to touch any compositor whatsoever.
>
> Unfortunately I'm too busy / lazy to do this any time soon.  However, I
> just bought my ticket to GUADEC, so working on it together there definitely
> is an option.
>
>
Thanks for the guidance on fixing up the cairo patchset. And yay for coming
to GUADEC!
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list