From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Werner LEMBERG Newsgroups: gmane.emacs.bugs 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) Message-ID: <20171031.172423.669114697480793458.wl@gnu.org> References: <874lqfmvvj.fsf@gmail.com> <20171031.122214.1272044855799157335.wl@gnu.org> <87zi87l8n5.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1509467131 1439 195.159.176.226 (31 Oct 2017 16:25:31 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 31 Oct 2017 16:25:31 +0000 (UTC) Cc: vincent@vinc17.net, 29078@debbugs.gnu.org To: rpluim@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 31 17:25:22 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e9ZLj-00079a-GC for geb-bug-gnu-emacs@m.gmane.org; Tue, 31 Oct 2017 17:25:11 +0100 Original-Received: from localhost ([::1]:46531 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9ZLq-0005u5-Lb for geb-bug-gnu-emacs@m.gmane.org; Tue, 31 Oct 2017 12:25:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58550) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9ZLe-0005oy-1M for bug-gnu-emacs@gnu.org; Tue, 31 Oct 2017 12:25:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e9ZLa-0002E0-U5 for bug-gnu-emacs@gnu.org; Tue, 31 Oct 2017 12:25:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35751) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e9ZLa-0002Ds-Pr for bug-gnu-emacs@gnu.org; Tue, 31 Oct 2017 12:25:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e9ZLa-0006Ql-GN for bug-gnu-emacs@gnu.org; Tue, 31 Oct 2017 12:25:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Werner LEMBERG Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 31 Oct 2017 16:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29078 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 29078-submit@debbugs.gnu.org id=B29078.150946707624680 (code B ref 29078); Tue, 31 Oct 2017 16:25:02 +0000 Original-Received: (at 29078) by debbugs.gnu.org; 31 Oct 2017 16:24:36 +0000 Original-Received: from localhost ([127.0.0.1]:44432 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e9ZL9-0006Q0-R9 for submit@debbugs.gnu.org; Tue, 31 Oct 2017 12:24:35 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:55069) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e9ZL7-0006Pk-AK for 29078@debbugs.gnu.org; Tue, 31 Oct 2017 12:24:33 -0400 Original-Received: from gnu.org ([193.170.181.157]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Lugbo-1d9rxp3EFU-00zphT; Tue, 31 Oct 2017 17:24:25 +0100 In-Reply-To: <87zi87l8n5.fsf@gmail.com> X-Mailer: Mew version 6.7 on Emacs 26.0.50 / Mule 6.0 (HANACH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MfQnLMLZKKuk1kIrSb6g X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:139270 Archived-At: >> 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.