freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] Transform support for OT-SVG glyphs


From: Moazin Khatri
Subject: Re: [ft-devel] Transform support for OT-SVG glyphs
Date: Sat, 17 Aug 2019 13:15:33 +0500

Hi Werner,

I have added the support for transformations. However, there is one issue with the current implementation.

For traditional glyphs, you can apply a transformation multiple times, since the transformation is just directly applied on the actual coordinates. But for SVG glyphs, the transformation is just stored with the actual SVG document so that it can ultimately be picked up by the renderer, and the renderer then applies it. One way to support multiple transformations would be to store an array of transformations which can be applied one by one by the renderer. But, I think that'll create more issues than it solves. A better way would be store an equivalent transformation matrix. I think this should be possible by using homogeneous coordinates.  I'm going to try that. :)

Moazin

On Tue, Aug 13, 2019 at 10:21 AM Werner LEMBERG <address@hidden> wrote:

> I'm trying to add support for transformations to OT-SVG glyphs.
> [...]
>
> 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.

Starting to read your e-mail, I was immediately going to suggest
exactly that. :-)  So your idea looks good.


    Werner

reply via email to

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