[cairo] [PATCH 0/6] cover glyph support

Behdad Esfahbod behdad at cs.toronto.edu
Mon Apr 11 02:05:58 UTC 2016


On Sat, Apr 9, 2016 at 7:39 AM, Matthias Clasen <matthias.clasen at gmail.com>
wrote:

> On Sat, Apr 9, 2016 at 3:54 AM, Chris Wilson <chris at chris-wilson.co.uk>
> wrote:
> >
> > It's not mergeable since you break cairo_show_glyphs(), which now
> > randomly operates differently based on whether the system loaded a
> "color"
> > glyph - your implementation completely discards the source and changes
> > the definition of the glyph operator.
> >
>
> To put this another way, there are several places in cairo (and
> pixman) which make the assumption that "fonts are collections of
> masks".
> Fonts with color glyphs invalidate this assumption, which is why these
> patches are a bit ugly.
>
> Do you have advice on how to handle this nicely in the cairo architecture ?
>

It was part of cairo's original imaging model that show_glyphs is one of
the various methods to specify an area within which a Porter-Duff operator
happens.  It. it was defined as a mask.  Color fonts change all of that; I
remember, I think it was Owen, who was opposed to making such changes to
show_glyphs when I first brought up color fonts years ago.  But the world
has moved in this direction, and I don't see any other option.  Asking the
cairo client to separate color glyphs and draw them using a different
operator is not an option IMO.

That said, perhaps we should add a flag to scaled_font_options as well.

-- 
behdad
http://behdad.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cairographics.org/archives/cairo/attachments/20160410/a893843e/attachment.html>


More information about the cairo mailing list