freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Update on OT-SVG in FreeType


From: Werner LEMBERG
Subject: Re: Update on OT-SVG in FreeType
Date: Tue, 03 Aug 2021 17:06:55 +0000 (UTC)

> As you can see in the TODO list in the MR, one of the items is
> having official hooks and documentation on how to create them.  I'm
> trying to write them in the repo below.  Maybe ultimately we can
> host it inside the FreeType group of repositories.
> 
> https://gitlab.freedesktop.org/moazin/freetype-librsvg-based-ot-svg-hooks

Thanks for setting this up!

I had a quick look at the code, and I've immediately found a
fundamental problem: You are directly accessing
`library->svg_renderer_state`.  This is a no-go for applications since
`FT_Library` is an opaque pointer that must not be dereferenced.

Is it actually necessary that `svg_renderer_state` is a member of
`FT_Library`?  Your SVG code doesn't access it.  If yes, we probably
need a driver property to pass the SVG renderer state structure back
and forth.

> Now I want to make it work with FreeType demo tools, I think the
> only one that makes sense for SVG glyphs would be ftview?

Probably yes.

> Do we wanna keep the hooks in the demo tools repository directly
> embedded or maybe do a git submodule?

I would favour to eventually add the example SVG hook(s) to the
`freetype-demos` repository.

> The hooks will change from time to time as I discover these problems
> and attempt to solve them so maybe submodule makes more sense.

No problem.  You already have write access to the FreeType
repositories :-)

> What about compilation?  Any flags/options to enable/disable OT-SVG
> glyphs or just enable it all the time in ftview?

IMHO, `ftview` are developer tools, and we expect that developers have
all necessary libraries installed.  However, `ftview` and friends
should respond to `ftoption.h`: if SVG is disabled there, the demo
programs should still compile and work.


    Werner



reply via email to

[Prev in Thread] Current Thread [Next in Thread]