> The whole environment variable thing is a string, so a sequence of
> bytes.  If I set FREETYPE_PROPERTIES to
> `ot-svg:svg_hooks=asdjkfsjlfdk', In `ft_svg_property_set', `value'
> will have the address of letter `a' and thus, when the types are
> cast to hooks, weird address will be set and when the `ot-svg'
> module calls my hooks, things will crash.

The handling of `FREETYPE_PROPERTIES' doesn't work like this.  The
first step would be to search whether `svg_hooks' corresponds to a
property.  Let's say yes.  The next step would be to check whether
`asdjkfsjlfdk' is one of the allowed values for `svg_hooks'.  Assuming
that valid values are `librsvg', `resvg', and `svgnative', the answer
is no, and the value would be ignored.

To make that work, ports for the values `librsvg', `resvg', and
`svgnative' must be registered in FreeType.  However, I think this is
really overkill and not needed.  Let's just have a driver property
that is not exposed via `FREETYPE_PROPERTIES'.


    Werner

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

Reply via email to