freetype
[Top][All Lists]
Advanced

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

Re: [ft] [ft-devel] heads-up: TrueType height computation has been fixed


From: Alexei Podtelezhnikov
Subject: Re: [ft] [ft-devel] heads-up: TrueType height computation has been fixed
Date: Thu, 24 Jan 2013 09:03:17 -0500

On Thu, Jan 24, 2013 at 2:23 AM, Wojciech Mamrak <address@hidden> wrote:
> 2013/1/23 Alexei Podtelezhnikov <address@hidden>:
>> On Wed, Jan 23, 2013 at 10:50 AM, Wojciech Mamrak <address@hidden> wrote:
>>> What is the largest possible "height" change between the old and new
>>> implementation? Can it exceed one pixel?
>>
>> It should not exceed 1 pixel unless the height specified in the font
>> differs from (acsender - descender) by more than 1 pixel.
>
> And why would anyone make it differ from that? :)

By design or by mistake...
I think that David's idea to make the change conditional can work
except we should use a softer condition:

  if ( FT_ABS( height_26.6 - (ascender_26.6 - descender_26.6) ) < 64 ) {
    height_int = ascender_int - descender_int;
  } else {
    height_int = FT_ROUND( height_26.6);
  }

This way we respect height that is very different from  (ascender - descender).



reply via email to

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