From: Werner LEMBERG <wl@gnu.org>
To: rpluim@gmail.com
Cc: vincent@vinc17.net, 29078@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 17:24:23 +0100 (CET) [thread overview]
Message-ID: <20171031.172423.669114697480793458.wl@gnu.org> (raw)
In-Reply-To: <87zi87l8n5.fsf@gmail.com>
>> 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.
next prev parent reply other threads:[~2017-10-31 16:24 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-31 10:12 bug#29078: 25.2; font issue with FreeType 2.8; should not use the rounded ascender and descender Vincent Lefevre
2017-10-31 10:53 ` Robert Pluim
2017-10-31 11:22 ` Werner LEMBERG
2017-10-31 13:43 ` Vincent Lefevre
2017-10-31 15:45 ` Werner LEMBERG
2017-10-31 14:00 ` Robert Pluim
2017-10-31 16:24 ` Werner LEMBERG [this message]
2019-11-17 8:02 ` Lars Ingebrigtsen
2019-11-18 7:47 ` Vincent Lefevre
2019-11-18 8:30 ` Lars Ingebrigtsen
2019-11-18 16:05 ` Eli Zaretskii
2019-11-19 10:07 ` Robert Pluim
2019-11-19 11:34 ` Vincent Lefevre
2019-11-19 16:41 ` Stefan Kangas
2019-11-19 17:33 ` Eli Zaretskii
2019-11-18 15:36 ` Eli Zaretskii
2019-11-18 16:04 ` Vincent Lefevre
2019-11-18 17:09 ` Eli Zaretskii
2019-11-18 17:23 ` Vincent Lefevre
2019-11-18 17:50 ` Eli Zaretskii
2019-11-18 17:58 ` Eli Zaretskii
2019-11-18 18:20 ` Vincent Lefevre
2019-11-18 18:31 ` Eli Zaretskii
2019-11-18 18:15 ` Vincent Lefevre
2019-11-18 18:32 ` Lars Ingebrigtsen
2019-11-18 20:26 ` Vincent Lefevre
2019-11-18 20:31 ` Lars Ingebrigtsen
2019-11-19 15:55 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171031.172423.669114697480793458.wl@gnu.org \
--to=wl@gnu.org \
--cc=29078@debbugs.gnu.org \
--cc=rpluim@gmail.com \
--cc=vincent@vinc17.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).