GNU bug report logs - #29078
25.2; font issue with FreeType 2.8; should not use the rounded ascender and descender

Previous Next

Package: emacs;

Reported by: Vincent Lefevre <vincent <at> vinc17.net>

Date: Tue, 31 Oct 2017 10:14:01 UTC

Severity: normal

Found in version 25.2

Full log


View this message in rfc822 format

From: Vincent Lefevre <vincent <at> vinc17.net>
To: Werner LEMBERG <wl <at> gnu.org>
Cc: rpluim <at> gmail.com, 29078 <at> debbugs.gnu.org
Subject: bug#29078: 25.2; font issue with FreeType 2.8; should not use the rounded ascender and descender
Date: Tue, 31 Oct 2017 14:43:12 +0100
On 2017-10-31 12:22:14 +0100, Werner LEMBERG wrote:
> No.  The `scalable' branch must make a distinction between TrueType
> and non-TrueType fonts if the font gets fully hinted (i.e., if the
> TrueType bytecode gets interpreted), something like
> 
>   if (scalable)
>     {
>       if (use_truetype_bytecode_hinting(font))
>         {
>           /* use TrueType rules for rounding */
>           font->ascent = ROUND(ft_face->ascender * size / upEM)
>           font->descent = ROUND(-ft_face->descender * size / upEM);
>           font->height = font->ascent + font->descent;
>         }
>       else
>         {
>           font->ascent = CEIL(ft_face->ascender * size / upEM);
>           font->descent = FLOOR(-ft_face->descender * size / upEM);
>           font->height = ROUND(ft_face->height * size / upEM);
>         }
>     }
>   ...

FLOOR, CEIL and ROUND round integers to multiples of 64. Don't
you mean floor(), ceil() and round() from <math.h>?

-- 
Vincent Lefèvre <vincent <at> vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)




This bug report was last modified 5 years and 267 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.