Hi all,

I'm trying to add support for transformations to OT-SVG glyphs. I've a
concern.

For traditional glyphs, transforms are just directly applied to the
coordinates of outline points. FreeType understands these outlines thus it
can apply the transforms. For SVG glyphs, FreeType doesn't have the ability
to manipulate the documents, instead we are gonna rely on the external
library to apply the transform. The coordinate system of TTF/CFF outlines
is different than the SVG coordinate system in many ways. The y axis is
inverted and the relative scale is different too, since the SVG glyph is
also free to choose the size of the EM square.

Thus, my point is, if I just directly apply the transform that the user has
given, the result may not be the expected one if the user is unaware that
the actual glyph that will get loaded is an OT SVG glyph. What's even worse
is that, the transform is set before the glyphs are loaded, so the user
doesn't know the EM square of the SVG glyph until after the glyph has been
loaded.

The solution that I have in mind is, let the user pretend that the glyph is
just a traditional one, then we take the transformation that the user has
given and convert it to an equivalent one for the SVG coordinate system.
The conversion will take into account y-axis inversion as well as the
relative scale difference between the two.

I think this solution is good. Let me know your views. :-)

Moazin
_______________________________________________
Freetype-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/freetype-devel

Reply via email to