[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft] Freetype, transformations and run-time italic
From: |
Werner LEMBERG |
Subject: |
Re: [ft] Freetype, transformations and run-time italic |
Date: |
Thu, 20 Jan 2011 09:17:40 +0100 (CET) |
> We were thinking about ways of making EFL support run-time italicization
> of fonts/glyphs.
Minor nitpick: It is not possible to `italicize' a glyph: many italic
glyphs have different shapes compared to the upright version. What
you actually want to do is to slant the glyphs (`oblique type').
> Doing FT_Outline_Transform just before doing FT_Get_Glyph and
> FT_Glyph_To_Bitmap (because we are calling load with
> FT_LOAD_NO_BITMAP because of FT_Outline_Transform) works on the
> output image (i.e it's painted correctly, in italic) but doesn't
> update the X_Advance (glyph->advance.x) of the glyph, but instead
> contains the non-italic size.
This is correct behaviour: The advance width doesn't change if you
slant a glyph. What you really want to apply at the end of the word
is an `italic correction' (as used eg. in TeX or groff) so that the
next non-slanted word doesn't collide with the slanted text. An
automatic value might be computed based on the last glyph's height and
the slant angle.
Werner