freetype
[Top][All Lists]
Advanced

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

Re: [Freetype] A question about rotated glyph metrics


From: David Turner
Subject: Re: [Freetype] A question about rotated glyph metrics
Date: Thu, 30 Aug 2001 10:13:39 +0200

Hello Alexander,

Alexander Gelfenbain a écrit :
> 
> I understand that I am most likely losing hints here. Is this correct?
>
Yes.
 
> Question: What are the correct load flags in case (3) ? Should I specify
> TTLOAD_SCALE_GLYPH and TTLOAD_HINT_GLYPH? Or are these flags irrelevant?
> 
> Question: what is the proper way to calculate glyph metrics for a transformed
> glyph? If the transformed glyph is unhinted, my guess would be to load
> an unscaled glyph, convert FUnits to floating point coordinates  and apply 
> the affine
> transform to them in my code. Or should I scale the untransformed glyph with
> TT_Set_Instance_CharSize(1<<6), get its metrics and apply my affine transform 
> to it?
> 
> I understand that TT_Get_Glyph_Big_Metrics() will only return a metrics 
> (sidebearings,
> advance widths and height, etc.) along an untranslated vertical or horisontal
> baseline. In my application a baseline is generally speaking not a vertical
> or horisontal line.
>

Generally speaking, you should decompose your affine transform into
a scale then another rotation/skewing transform.

Use the first transform (i.e. the scale factors) to set the character
size, load the glyph (with hinting), then transform its outline
with the second one.

the hints are always computed according to the current character
size, which is why you'll lose this information too if you use a
charsize of "1 << 6" (i.e. 1 pixel)..

Regards,

- David



reply via email to

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