|
From: | Tuom Larsen |
Subject: | Re: [ft-devel] Scaling of composite glyphs |
Date: | Fri, 14 Jun 2013 20:27:39 +0200 |
You can rotate a subglyph by setting the WE_HAVE_A_2X2 flag, see
> It regards the "glyf" table and the scaling of composite glyphs.
> From what I understood the flags specify the magnitudes for scaling
> of all the points of the whole compontent/"subglyph". By reading
> the code:
>
> translate_array( num_points - num_base_points,
> base_vec + num_base_points,
> x, y );
>
> it seems that FT only offsets the component by "x" and "y". The
> offset gets scaled, yes, but I cannot find where are the
> glyph-points scaled or rotated ("This could be used for 90-degree
> rotations, for example." - from the spec).
`TT_Load_Composite_Glyph'. The transformation matrix gets then
applied in function `TT_Process_Composite_Component'
The subglyph itself gets scaled/rotated, then the offset gets
> Please, what is the right way of doing this? What should be scaled
> - only the offset or the whole component?
applied (scaled if the SCALED_COMPONENT_OFFSET flag is set).
> Does FT support this?
Certainly, since it is part of the TrueType specification.
Werner
[Prev in Thread] | Current Thread | [Next in Thread] |