> I am drawing multi line text using FreeType2.  Now,I compare my text
> position with Adobe AfterEffects built-in text.  I found that using
> standard fonts like Verdana the auto spacing looks good.  But with
> some less standard fonts like Segoe UI the second line text has a
> shift of several pixels on vertical axis.

Auto spacing?  What do you mean?

> I set the line spacing using Font metrics Height property.

What formula?

> Interesting also is that if I manually set the line spacing using
> this formula:
>
>   pen.y -= verticalSpacingInPixels /
>              ( fontSizeInPixels / FontMetrics->UnitsPerEM )
>
> then both in AfterEffects and in my app the spacing looks the same.

Then simply use this formula!

> What can it be?  May be Adobe AfterEffects calculates auto spacing
> in some unique way?  But then why does it show the same results as
> in my app for standard fonts?

I'm not sure I understand.  However, there are programs like TeX that
derive the baseline-to-baseline spacing directly from a font's point
size, completely ignoring any vertical dimensions stored in a fontc.
Maybe AfterEffects is using a similar strategy.


     Werner

_______________________________________________
Freetype mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/freetype

Reply via email to