[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Gradient Color Fonts, COLR v1 Contributions to FreeType
From: |
Werner LEMBERG |
Subject: |
Re: Gradient Color Fonts, COLR v1 Contributions to FreeType |
Date: |
Tue, 04 Aug 2020 12:05:59 +0200 (CEST) |
>> I've made some progress with the COLR v1 extension implementation
>> in FreeType and would be happy to hear initial feedback on the
>> general approach and API style.
Dominik, this is very nice code, thanks!
> I would much rather prefer that
>
> 1) FT_Load_Glyph sequentially loads and merges all contours from all
> layers into a single outline and uses FT_GlyphSlot->other to tag
> each contour with the layer information and the corresponding
> comprehensive (including gradient) color description after
> palette decoding. This could potentially work for SVG glyphs
> too. I really want FT_GlyphSlot to be self-sufficient and ready
> for a renderer to handle it without any additional calls. This
> could be a new glyph format.
>
> 2) then FT_Render_Glyph just calls a color renderer which quickly
> allocates the entire CBox of memory and just blends the layers
> possibly using FT_RASTER_FLAG_DIRECT for speed. We can
> eventually have gradient support as well.
Alexei, this sounds interesting. Care to implement this, as an
alternative interface? What Dominik has written fits quite well to
the existing API, so I'm in favor to add his code.
Note that the iterative API works also quite nicely if you are *not*
using FreeType to manage gradients and the like. On the other hand,
it seems to me that your proposed solution necessitates gradient
handling within FreeType (but maybe I'm just confused).
Werner
- Re: Gradient Color Fonts, COLR v1 Contributions to FreeType,
Werner LEMBERG <=