freetype
[Top][All Lists]
Advanced

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

[ft] Freetype, transformations and run-time italic


From: Tom Hacohen
Subject: [ft] Freetype, transformations and run-time italic
Date: Thu, 20 Jan 2011 16:19:50 +0900

Dear all,

My name is Tom (TAsn) Hacohen, and I currently work on EFL's
(enlightenment.org) font engine and Mr. Roy Kim (in cc) is my colleague.

We were thinking about ways of making EFL support run-time italicization
of fonts/glyphs. There are three functions that came into our attention,
the first: FT_Outline_Transform, the second FT_Glyph_Transform and the
third is FT_Set_Transform.
Note: It's important to add that in EFL, we convert all glyphs to
bitmaps (or just load them as such).

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. We find it odd that the sizes don't change but the image is
updated. We thought that FT_Glyph_Transform will maybe work, but that
also did not. Maybe it's because we activate the size (FT_Activate_Size)
after the transformation and the transformation resets (just a guess,
which sounded stupid in my second read)?

We haven't tried with FT_Set_Transform yet, but we are working on it. I
personally think this is the way to go, but we want to make sure you
agree, because we don't want to only get it to work, we also want to
make it correct.

In conclusion, what do you think is the correct approach (API to use)
when it comes to implementing run-time italicization? and why doesn't
glyph->advance.x gets updated in the cases described above?

Freetype version I tested on: 2.3.11 (latest in ubuntu 10.04, package:
libfreetype6).

Thanks,
Tom.




reply via email to

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