Re: [ft-devel] what FT_Color

2019-03-06 Thread Werner LEMBERG
>> It *might* be possible to add a means to manipulate gradients.
>> However, if this ever be desired, it must happen on the SVG side, this
>> is, outside of FreeType's direct control.
> 
> I understand that the main use of FreeType is to produce bitmaps
> while its ability to present the glyph data as outlines and how to
> paint them is secondary.  This is what is being lost.  I would like
> FT_Color be able to both be simple RGBA color for each contour or a
> reference to something more complex like an pattern or a gradient.
> Perhaps, I overthink this.

Let's stay with a simple solution.  If necessary we can always create
a new structure.


Werner

___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] what FT_Color

2019-03-06 Thread Alexei Podtelezhnikov
> It *might* be possible to add a means to manipulate gradients.
> However, if this ever be desired, it must happen on the SVG side, this
> is, outside of FreeType's direct control.

I understand that the main use of FreeType is to produce bitmaps while
its ability to present the glyph data as outlines and how to paint
them is secondary. This is what is being lost. I would like FT_Color
be able to both be simple RGBA color for each contour or a reference
to something more complex like an pattern or a gradient. Perhaps, I
overthink this.

___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] what FT_Color

2019-03-05 Thread Nikolaus Waxweiler
Make FT_Color an optional C11 Part and force everyone to update their
compilers 
___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] what FT_Color

2019-03-05 Thread Alexei Podtelezhnikov
> To summarize: The current definition of `FT_Color' should be just
> fine.

Ok, but I wish we could use anonymous unions of C11, so that we could
work with color as a 32-bit integer.

___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] what FT_Color

2019-03-04 Thread Werner LEMBERG


Hello Jan,


>> The next FreeType release will introduce FT_Color, [...]  Currently
>> it represents color as common 32-bit RGBA structure.  What is your
>> opinion about SVG color gradients?  Do we need to consider a more
>> complex color structure with full description of color gradients?
>> Or, alternatively, should we reference color gradients by an index
>> within FT_Color?
> 
> I think this feature was added to support COLR/CPAL fonts, which
> only have flat colors; the only use for gradients would thus be
> proper SVG.  Given the complexity of SVG I don't think it's a good
> idea to attempt to decompose it into a set of shape layers with
> gradient descriptions.  I think applications would rather consume
> the SVG directly.

thanks for your comment.

I've just done another look at OpenType's `SVG' description, and I
agree.  The `FT_Color' structure will exclusively be used for getting
and setting CPAL data (also for SVG glyphs), as far as I can see, and
an SVG gradient is not something a user should ever manipulate
according to the OpenType specification.

It *might* be possible to add a means to manipulate gradients.
However, if this ever be desired, it must happen on the SVG side, this
is, outside of FreeType's direct control.

Note that we do not plan to decompose SVG at all.  Decomposition into
layers is a `COLR' feature and thus not related to `SVG'.  The idea is
rather to parse the `SVG' table and feed all SVG data directly to an
SVG rendering library, which returns a bitmap (or pixmap) to FreeType.

To summarize: The current definition of `FT_Color' should be just
fine.


Werner

___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] what FT_Color

2019-03-04 Thread Jan Alexander Steffens
On Mon, Feb 25, 2019 at 4:14 PM Alexei Podtelezhnikov 
wrote:

> The next FreeType release will introduce FT_Color, which is a big
> deal. Currently it represents color as common 32-bit RGBA structure.
> What is your opinion about SVG color gradients?
>
> Do we need to consider a more complex color structure with full
> description of color gradients?
> Or, alternatively, should we reference color gradients by an index
> within FT_Color?
>

I think this feature was added to support COLR/CPAL fonts, which only have
flat colors; the only use for gradients would thus be proper SVG. Given the
complexity of SVG I don't think it's a good idea to attempt to decompose it
into a set of shape layers with gradient descriptions. I think applications
would rather consume the SVG directly.
___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] what FT_Color

2019-03-04 Thread Werner LEMBERG


> Skia has been rendering color fonts to billions of devices for over
> five years now, based on existing FreeType.  Patches existed for
> cairo for the same time and were finally integrated last year.  This
> idea that something big in FreeType has happened re color recently
> sounds detached from reality of FreeType clients IMO.  Specifically
> I advise against adding features without having potential major
> users first.


Behdad,


this patronizing comment is completely uncalled for.  Additionally, it
is off-topic, since the problem in discussion doesn't affect color
rendering using the `FT_LOAD_COLOR' flag.  The `FT_Color' structure is
something new, as you certainly know.  *Now* is the moment to discuss
its contents before it becomes part of a public header.

Have you actually read what Alexei was asking?


   Werner

___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] what FT_Color

2019-03-03 Thread Behdad Esfahbod
Skia has been rendering color fonts to billions of devices for over five
years now, based on existing FreeType.  Patches existed for cairo for the
same time and were finally integrated last year.  This idea that something
big in FreeType has happened re color recently sounds detached from reality
of FreeType clients IMO. Specifically I advise against adding features
without having potential major users first.

On Sun, Mar 3, 2019 at 3:19 AM Nikolaus Waxweiler 
wrote:

> I haven’t followed the color glyph discussion closely, but I think this is
> a question to ask the people who are going to implement color font
> rendering, i.e. Skia, Qt, Cairo, WebKit(?). I don’t think they read this
> mailing list.
> ___
> Freetype-devel mailing list
> Freetype-devel@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/freetype-devel
>


-- 
behdad
http://behdad.org/
___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel