From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Vincent Lefevre 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 14:43:12 +0100 Message-ID: <20171031134312.GC2878@cventin.lip.ens-lyon.fr> References: <87d153pqw0.fsf@cventin.lip.ens-lyon.fr> <874lqfmvvj.fsf@gmail.com> <20171031.122214.1272044855799157335.wl@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1509457458 27995 195.159.176.226 (31 Oct 2017 13:44:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 31 Oct 2017 13:44:18 +0000 (UTC) User-Agent: Mutt/1.9.1-7173-vl-r99863 (2017-09-30) Cc: rpluim@gmail.com, 29078@debbugs.gnu.org To: Werner LEMBERG Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 31 14:44:12 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 1e9Wpt-0006dX-U6 for geb-bug-gnu-emacs@m.gmane.org; Tue, 31 Oct 2017 14:44:10 +0100 Original-Received: from localhost ([::1]:45729 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9Wq1-0003HZ-0w for geb-bug-gnu-emacs@m.gmane.org; Tue, 31 Oct 2017 09:44:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40316) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9Wpr-0003GB-0s for bug-gnu-emacs@gnu.org; Tue, 31 Oct 2017 09:44:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e9Wpm-00079F-5x for bug-gnu-emacs@gnu.org; Tue, 31 Oct 2017 09:44:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34781) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e9Wpm-00078z-1p for bug-gnu-emacs@gnu.org; Tue, 31 Oct 2017 09:44:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e9Wpl-0002HD-Rz for bug-gnu-emacs@gnu.org; Tue, 31 Oct 2017 09:44:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Vincent Lefevre Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 31 Oct 2017 13:44:01 +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.15094573978674 (code B ref 29078); Tue, 31 Oct 2017 13:44:01 +0000 Original-Received: (at 29078) by debbugs.gnu.org; 31 Oct 2017 13:43:17 +0000 Original-Received: from localhost ([127.0.0.1]:43459 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e9Wp2-0002Fq-Mk for submit@debbugs.gnu.org; Tue, 31 Oct 2017 09:43:16 -0400 Original-Received: from cventin.lip.ens-lyon.fr ([140.77.13.17]:47634) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e9Wp0-0002Ff-CS for 29078@debbugs.gnu.org; Tue, 31 Oct 2017 09:43:14 -0400 Original-Received: from vlefevre by cventin.lip.ens-lyon.fr with local (Exim 4.89) (envelope-from ) id 1e9Woy-0005Dt-Kw; Tue, 31 Oct 2017 14:43:12 +0100 Content-Disposition: inline In-Reply-To: <20171031.122214.1272044855799157335.wl@gnu.org> X-Mailer-Info: https://www.vinc17.net/mutt/ 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:139262 Archived-At: 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 ? -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)