bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#29078: 25.2; font issue with FreeType 2.8; should not use the rounde


From: Vincent Lefevre
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
User-agent: Mutt/1.9.1-7173-vl-r99863 (2017-09-30)

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@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)





reply via email to

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