[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft] Vertical line spacing problems with different fonts.
From: |
Werner LEMBERG |
Subject: |
Re: [ft] Vertical line spacing problems with different fonts. |
Date: |
Wed, 02 Sep 2015 06:11:37 +0200 (CEST) |
> 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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [ft] Vertical line spacing problems with different fonts.,
Werner LEMBERG <=