Re: [ft-devel] color framework

2018-12-19 Thread Alexei Podtelezhnikov
On Wed, Dec 19, 2018 at 10:35 AM Behdad Esfahbod wrote: > > On Wed, Dec 19, 2018 at 9:08 AM Alexei Podtelezhnikov > wrote: >> >> On Wed, Dec 19, 2018 at 5:43 AM Alexei Podtelezhnikov >> wrote: >> > > Alexei, I think we miscommunicate. >> > >> > I struggle to get your attention to

Re: [ft-devel] color framework

2018-12-19 Thread Behdad Esfahbod
On Wed, Dec 19, 2018 at 9:08 AM Alexei Podtelezhnikov wrote: > On Wed, Dec 19, 2018 at 5:43 AM Alexei Podtelezhnikov > wrote: > > > Alexei, I think we miscommunicate. > > > > I struggle to get your attention to FT_Glyph_To_Bitmap. > > I just discovered that, while ignoring the FT_Glyph

Re: [ft-devel] color framework

2018-12-19 Thread Alexei Podtelezhnikov
On Wed, Dec 19, 2018 at 5:43 AM Alexei Podtelezhnikov wrote: > > Alexei, I think we miscommunicate. > > I struggle to get your attention to FT_Glyph_To_Bitmap. I just discovered that, while ignoring the FT_Glyph abstraction in the current implementation, we also disregard FreeType caching

Re: [ft-devel] color framework

2018-12-19 Thread Behdad Esfahbod
On Tue, Dec 18, 2018 at 5:35 AM Werner LEMBERG wrote: > > >> FreeType is about to make a major leap into color rendering. > > > > Is it? Color rendering was the news before variable-fonts were > > news. So 2013. The world has moved on. > > You completely misunderstood. Alexei talks about

Re: [ft-devel] color framework

2018-12-19 Thread Behdad Esfahbod
On Wed, Dec 19, 2018 at 5:43 AM Alexei Podtelezhnikov wrote: > FT_Render_Glyph used to be democratic. The renderers were chosen based > on the match between the glyph format and the rendering mode. The only > way to keep it this way is either FT_RENDER_MODE_BGRA or > FT_GLYPH_FORMAT_LAYERED.

Re: [ft-devel] color framework

2018-12-19 Thread Alexei Podtelezhnikov
Hi Werner, > FT_LOAD_COLOR will *never* set > FT_LOAD_RENDER. How do you come to this impression? We are only > talking about the effect of FT_LOAD_COLOR on the rendering of > color-layered glyphs. Wonderful! > Alexei, I think we miscommunicate. I struggle to get your attention to

Re: [ft-devel] color framework

2018-12-19 Thread Werner LEMBERG
>> FT_LOAD_COLOR should trigger a standard case with some default >> blending; for finer color and blending control separate functions >> should be provided to allow direct layer access. > > Which [of] is these flags is spurious? > FT_LOAD_COLOR | FT_LOAD_RENDER | FT_LOAD_TARGET_BGRA > > I am

Re: [ft-devel] color framework

2018-12-18 Thread Alexei Podtelezhnikov
> > FT_LOAD_COLOR used to be a loading flag only. > > This depends on what you exactly mean with `loading' and > `rendering'... Naturally, the rendering is FT_Render_Glyph, which takes render_mode. Because FT_Glyph's are rendered with dummy FT_Face, we cannot and must not use FT_LOAD_COLOR or

Re: [ft-devel] color framework

2018-12-18 Thread Werner LEMBERG
>> Let's see whether someone is interested in this. What about making >> >> Add SVG support >> >> a GSoC project? :-) > > Ooohhh that's an extremely interesting and tempting thing; I wish I > could participate again (or had more time in general) :D The former is possible AFAIK, the latter

Re: [ft-devel] color framework

2018-12-18 Thread armin
> Let's see whether someone is interested in this. What about making > > Add SVG support > > a GSoC project? :-) Ooohhh that's an extremely interesting and tempting thing; I wish I could participate again (or had more time in general) :D ___

Re: [ft-devel] color framework

2018-12-18 Thread Werner LEMBERG
>> FreeType is about to make a major leap into color rendering. > > Is it? Color rendering was the news before variable-fonts were > news. So 2013. The world has moved on. You completely misunderstood. Alexei talks about FreeType, not about the latest font news. >> It is possible to make

Re: [ft-devel] color framework

2018-12-18 Thread Werner LEMBERG
>>> > As long as adding FT_LOAD_COLOR will get COLR/CPAL glyphs >>> > rendered into the bitmap, cairo/Chrome will work fine and I have >>> > no problem with that. >> >> FT_LOAD_COLOR has been FreeType public API since 2013. > > FT_LOAD_COLOR used to be a loading flag only. This depends on what

Re: [ft-devel] color framework

2018-12-17 Thread Alexei Podtelezhnikov
> All I'm asking is, if FT_LOAD_COLOR is passed to FT_Load_Glyph() then color > bitmap be rendered. How it trickles down the abstractions and machinery > into render, you can change. You object to explicit spelling FT_LOAD_COLOR | FT_LOAD_TARGET_BGRA | FT_LOAD_RENDER. Otherwise, you

Re: [ft-devel] color framework

2018-12-16 Thread Behdad Esfahbod
On Sat, Dec 15, 2018 at 11:10 PM Alexei Podtelezhnikov wrote: > > FreeType is about to make a major leap into color rendering. Is it? Color rendering was the news before variable-fonts were news. So 2013. The world has moved on. > It is > possible to make it right while keeping rendering

Re: [ft-devel] color framework

2018-12-15 Thread Alexei Podtelezhnikov
On Sat, Dec 15, 2018 at 2:55 PM Behdad Esfahbod wrote: >> It is wrong to use >> FT_LOAD_COLOR in FT_Render_Glyph. There is a way to properly pass all >> necessary information.to that function. > > I understand your desire to encode all info into FT_Outline; but given how > much glyphslot is

Re: [ft-devel] color framework

2018-12-15 Thread Behdad Esfahbod
On Fri, Dec 14, 2018 at 8:25 AM Alexei Podtelezhnikov wrote: > >> > As long as adding FT_LOAD_COLOR will get COLR/CPAL glyphs rendered > into the bitmap, cairo/Chrome will work fine and I have no problem with > that. > > > >> You started to use unreleased features. > > > > FT_LOAD_COLOR has been

Re: [ft-devel] color framework

2018-12-14 Thread Alexei Podtelezhnikov
>> > As long as adding FT_LOAD_COLOR will get COLR/CPAL glyphs rendered into >> > the bitmap, cairo/Chrome will work fine and I have no problem with that. > >> You started to use unreleased features. > > FT_LOAD_COLOR has been FreeType public API since 2013. FT_LOAD_COLOR used to be a loading

Re: [ft-devel] color framework

2018-12-13 Thread Behdad Esfahbod
On Thu, Dec 13, 2018 at 12:28 PM Alexei Podtelezhnikov wrote: > > As long as adding FT_LOAD_COLOR will get COLR/CPAL glyphs rendered into > the bitmap, cairo/Chrome will work fine and I have no problem with that. > > This is just unfair. FreeType is not paid by or owned by Google. Did I imply

Re: [ft-devel] color framework

2018-12-13 Thread Werner LEMBERG
>> ??? What do we break? COLR/CPAL support will be *new* in 2.10.0, >> it wasn't present in the 2.9.x series. We don't plan to drop the >> FT_PIXEL_MODE_RGBA mode that you've added for CBDT/CBLC/sbix >> support. > > As long as adding FT_LOAD_COLOR will get COLR/CPAL glyphs rendered > into

Re: [ft-devel] color framework

2018-12-13 Thread Alexei Podtelezhnikov
> As long as adding FT_LOAD_COLOR will get COLR/CPAL glyphs rendered into the > bitmap, cairo/Chrome will work fine and I have no problem with that. This is just unfair. FreeType is not paid by or owned by Google. You started to use unreleased features. Also Google did not contribute that code.

Re: [ft-devel] color framework

2018-12-13 Thread Behdad Esfahbod
On Thu, Dec 13, 2018 at 11:55 AM Werner LEMBERG wrote: > > >> > As long as you don't break cairo and Chrome, I don't care what > >> > you do. > > > > [...] and annoyed that you change things without caring about > > breaking things. > > ??? What do we break? COLR/CPAL support will be *new* in

Re: [ft-devel] color framework

2018-12-13 Thread Werner LEMBERG
>> > As long as you don't break cairo and Chrome, I don't care what >> > you do. > > [...] and annoyed that you change things without caring about > breaking things. ??? What do we break? COLR/CPAL support will be *new* in 2.10.0, it wasn't present in the 2.9.x series. We don't plan to drop

Re: [ft-devel] color framework

2018-12-13 Thread Behdad Esfahbod
On Thu, Dec 13, 2018 at 10:27 AM Alexei Podtelezhnikov wrote: > On Thu, Dec 13, 2018 at 10:23 AM Behdad Esfahbod > wrote: > > > > As long as you don't break cairo and Chrome, I don't care what you do. > > > > That is not how it works. Please help up to make FreeType better. > > I hate to say

Re: [ft-devel] color framework

2018-12-13 Thread Alexei Podtelezhnikov
On Thu, Dec 13, 2018 at 10:23 AM Behdad Esfahbod wrote: > > As long as you don't break cairo and Chrome, I don't care what you do. > That is not how it works. Please help up to make FreeType better. I hate to say it, but somebody should, you have been quite obnoxious recently. You one sentence

Re: [ft-devel] color framework

2018-12-13 Thread Behdad Esfahbod
As long as you don't break cairo and Chrome, I don't care what you do. On Thu, Dec 13, 2018 at 10:04 AM Alexei Podtelezhnikov wrote: > >> Once the TrueType loader learns to combine > >> all layers into a single outline and fill color information, it is > >> good to go. Just load and render

Re: [ft-devel] color framework

2018-12-13 Thread Alexei Podtelezhnikov
>> Once the TrueType loader learns to combine >> all layers into a single outline and fill color information, it is >> good to go. Just load and render those with FT_RENDER_MODE_BGRA. > > What was wrong with the existing code / model? > C'mon guys! Admit that the current implementation has tons

Re: [ft-devel] color framework

2018-12-12 Thread Alexei Podtelezhnikov
>> Just load and render those with FT_RENDER_MODE_BGRA. > > What was wrong with the existing code / model? The current implementation relies on FT_LOAD_COLOR and is contrary to FreeType design. Even ft2demos do not support it, besides ftview, which is forced to copy the the entire rendering code.

Re: [ft-devel] color framework

2018-12-12 Thread Behdad Esfahbod
On Tue, Dec 11, 2018 at 11:49 PM Alexei Podtelezhnikov wrote: > Hi all, > > I have just pushed out a new branch called color. This is a framework > and renderer for color glyphs, which Werner and I discussed offline. > The basic idea is to supplement outlines with color information for > each