[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft-devel] Rounding of ascent, descent, and line height
From: |
Alexei Podtelezhnikov |
Subject: |
Re: [ft-devel] Rounding of ascent, descent, and line height |
Date: |
Thu, 10 Jan 2013 16:03:40 -0500 |
On Thu, Jan 10, 2013 at 1:38 PM, Behdad Esfahbod <address@hidden> wrote:
> Hi,
>
> There's a bug against Webkit:
>
> https://bugs.webkit.org/show_bug.cgi?id=102374
>
> that I think points to a problem in FreeType. Simply put: for fonts that have
> ascent+descent=line-height, this property may not hold anymore after hinting.
> ascent+descent may be off by one pixel compared to line-height, which is not
> quite desirable.
If I understand correctly that equality is broken only in the broken
fonts. So have you tried just forcing it?
metrics->height = metrics->ascender + metrics->descender;
If the height is more trustworthy, force the ascender:
metrics->ascender = metrics->height + metrics->descender;