Deokjin Kim | 25 May 2012 07:27

[ft] Problem of oblique using FT_Outline_Transform

Hello all,

FT2 provides us oblique style. (FT_GlyphSlot_Oblique and FT_Outline_Transform)
When I use FT_Outline_Transform for oblique, Werner suggest not to change glyph's advance.
(http://lists.nongnu.org/archive/html/freetype/2011-01/msg00030.html)
Then the end of the sentence is not displayed properly. The last glyph is cutted.

When I tested with changing glyph's advance(wider than original advance), The last glyph is displayed properly.
But overall display is not good.

My question is:
1. Werner said that changing advance width is not needed for oblique.
    I want to know reason in detail.
2. How can I resolve this issue? Changing advance width is best way?

Best Regards,
Deokjin Kim
Werner LEMBERG | 27 May 2012 07:20
Picon

Re: [ft] Problem of oblique using FT_Outline_Transform


> 1. Werner said that changing advance width is not needed for oblique.
>     I want to know reason in detail.

See below.

> 2. How can I resolve this issue? Changing advance width is best way?

The answer I gave then is still valid:

  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.

Here an example:

  http://tex.pienose.com/4062/space-between-emphasized-word-and-parenthesis.html

[Note that groff's font metric files actually can contain left italic
 correction values as discussed in the link.]

    Werner

Gmane