Hello everyone,

Le mar. 9 juin 2020 à 14:14, Alexei Podtelezhnikov <apodt...@gmail.com> a
écrit :

> Hi David,
>
> I actually thought about FT_Add_Module as a visionary interface for
> dynamically plugging alternative renderers:
>
> https://github.com/raphlinus/font-rs
> https://github.com/mooman219/fontdue
> https://github.com/servo/pathfinder
>
> Admittedly, none of those projects explored this possibility or there
> are more straightforward ways to achieve this.
>
>
I'm not against the idea of being able to plug external renderers to
FreeType if it makes sense. The OT-SVG case is a compelling reason to.
However, I want to deprecate the existing module API. It has grown a little
too complex for its own good, and there are opportunities to simplify the
codebase (making the code both shorter and more maintainable), by getting
rid of the ability to add/replace/remove arbitrary modules.

That would not prevent us from introducing a new way to "plug" renderers,
probably with a new interface, that would be much more specific, and would
deal better with subtle issues like deallocating bitmap buffers that were
allocated by the renderer.

In the case of OT-SVG, I haven't looked at the problem in detail, but it
looks like this would require a new glyph image type to support (doable),
and the ability to provide FreeType with an interface it could use to
render these with a third-party library.
Do you know if the format allows compositing SVG and non-SVG glyphs
together? That would be ... difficult to support though.

I don't think we want to statically link any SVG renderer to the library by
default. There are so many subtleties related to vector graphics rendering,
that there is no "good" default choice to make. In other words, any default
we select at link time would probably be inappropriate for a lot of
developers anyway.

- David

Then there is this whole discussion on how to integrate SVG, which
> again comes down to using an alternative renderer module and whether
> it is worth hooking inside a single module or Add/Remove multiple
> modules.
> https://lists.nongnu.org/archive/html/freetype-devel/2019-07/msg00058.html
>
> So I know that nobody uses FT_Add_Module but it is not a bad interface.
>
> Alexei
>

Reply via email to