GNU bug report logs -
#29078
25.2; font issue with FreeType 2.8; should not use the rounded ascender and descender
Previous Next
Full log
Message #23 received at 29078 <at> debbugs.gnu.org (full text, mbox):
>> if (scalable)
>> {
>> if (use_truetype_bytecode_hinting(font))
>
> Hmm, ok. Then it becomes a question of determining how to define
> 'use_truetype_bytecode_hinting', which is not immediately obvious to
> me.
FreeType decides at glyph loading time (i.e., while calling
`FT_Load_Glyph' and its siblings) whether native bytecode hinting gets
used.[*]
Or to say it differently: It's up to Emacs which hinting mode gets
used. Currently, Emacs uses the FT_LOAD_DEFAULT flag almost
everywhere; this flag implies native TrueType hinting first. Only if
the TTF doesn't contain bytecode FreeType tries auto-hinting. So
maybe a simpler alternative is just to test whether we have a TrueType
font:
if (scalable)
{
if (!strcmp(FT_Get_X11_Font_Format(ft_face), "TrueType")
&& !(ft_load_glyph_mode & FT_LOAD_NO_HINTING)
&& !(ft_load_glyph_mode & FT_LOAD_FORCE_AUTOHINT))
Note that this is true for direct FreeType access. I don't know how
Emacs interacts with GTK, Pango, Cairo, whatever, behaves. I also
wonder whether Emacs obeys fontconfig settings, which are normally
used to globally set the hinting mode on a GNU/Linux box...
Werner
[*] I meanwhile consider this late selection of the hinting mode a
design error in FreeType, which I can't change due to backward
compatibility.
This bug report was last modified 5 years and 268 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.