Re: Color fonts

Andrea Canciani <[email protected]>
Newsgroups gmane.comp.lib.cairo,gmane.comp.gnome.gtk+.devel.general
Message-ID <CAN_5=BBAGk3r7q+tOKn6F8b9syxxQ-6y46zLeYOs_iR=wuc9Kg@mail.gmail.com>
On Fri, Jul 28, 2017 at 4:38 PM, Behdad Esfahbod <[email protected]> wrote:

> Uli,
>
> Can we commit this?  I don't think waiting another few years will result
> in a superior patchset. :)
>

Would it be possible to add a test?
I have written one in the branch where color glyphs were added to the
quartz backend (not yet merged):
https://cgit.freedesktop.org/~ranma42/cairo/commit/?h=wip/quartz-font-wanna-ct&id=9696ac368796d4d5129d3f31fdde724a71b35d00

As stated in the code, that test will need some changes to work on other
font backends.

Sorry if this sounds like a pushback. Actually I would love to get the
colored glyphs in and to update the quartz backend to support them :)

Andrea


>
> Cheers,
>
> behdad
>
> On Wed, Jul 19, 2017 at 1:53 AM, Behdad Esfahbod <[email protected]>
> wrote:
>
>> Right.  In the future we would want to make it show glyphs in the input
>> order, ie. not separate color vs non-color.  That's the order required by
>> CSS for example.  In a show-text-glyphs call with
>> CAIRO_TEXT_CLUSTER_FLAG_BACKWARD, it might be desirable to show
>> back-to-front.
>>
>> On Tue, Jul 18, 2017 at 1:59 PM, Matthias Clasen <
>> [email protected]> wrote:
>>
>>> On Sat, Jul 15, 2017 at 4:05 AM, Uli Schlachter <[email protected]> wrote:
>>>
>>>> On 07.07.2017 15:23, Matthias Clasen wrote:
>>>> > On Sat, Jul 1, 2017 at 2:25 AM, Uli Schlachter <[email protected]>
>>>> wrote:
>>>> >> On 30.06.2017 17:29, Behdad Esfahbod wrote:
>>>> >>> On Jun 30, 2017 7:51 PM, "Matthias Clasen" <[email protected]>
>>>> wrote:
>>>> >>> On Fri, 2017-06-30 at 17:02 +0200, Uli Schlachter wrote:
>>>> >>>> On 28.06.2017 14:23, Behdad Esfahbod wrote:
>>>> >>>>> All of you have asked me about the status of color fonts in
>>>> >>>>> cairo.  There's
>>>> >>>>> some discussion here:
>>>> >>>>
>>>> >>>> what was the solution to make this fit into cairo's drawing model?
>>>> >>>> Text
>>>> >>>> / glyphs are used as a mask and a mask does not have colors.
>>>> >>>>
>>>> >>>
>>>> >>> There is no solution to that. The assumption in cairo's drawing
>>>> model
>>>> >>> about glyphs/fonts has simply been invalidated by reality.
>>>> >>>
>>>> >>>
>>>> >>> Correct.
>>>> >>
>>>> >> 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.
>>>>
>>>> Hi again,
>>>>
>>>> I just came up with another question: How are overlapping glyphs
>>>> handled?
>>>>
>>>> Let's say I have a red glyph and a blue glyph and I draw them in such a
>>>> way that they overlap. Let's say this additionally overlaps with a
>>>> non-colored glyph in the same position and I use a green source with 50%
>>>> alpha (cairo_set_source_rgba(cr, 0, 1, 0, 0.5)).
>>>>
>>>> What's the visible result?
>>>>
>>>>
>>> Here is what my implementation does: It renders the color glyphs, in
>>> order, followed by the non-color glyphs.
>>>
>>> In practice, I don't think the case of mixed color and non-color glyphs
>>> in the same call will be all that common.
>>> Most apps will explicitly set a color font just for the emoji and they
>>> won't render regular text with an emoji font,
>>> with the result that runs of color glyphs and non-color glyphs will
>>> typically be in separate calls.
>>>
>>
>>
>>
>> --
>> behdad
>> http://behdad.org/
>>
>
>
>
> --
> behdad
> http://behdad.org/
>
> --
> cairo mailing list
> [email protected]
> https://lists.cairographics.org/mailman/listinfo/cairo
>

-- 
cairo mailing list
[email protected]
https://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.