From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#33885: 27.0.50; PUA character makes emacs crash Date: Fri, 28 Dec 2018 17:33:07 +0200 Message-ID: <83tvix64zw.fsf@gnu.org> References: <83y38a57vi.fsf@gnu.org> <20181228.133856.379302464249110348.wl@gnu.org> <83va3d6ani.fsf@gnu.org> <20181228.155850.556290055640666168.wl@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1546011937 11601 195.159.176.226 (28 Dec 2018 15:45:37 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 28 Dec 2018 15:45:37 +0000 (UTC) Cc: 33885@debbugs.gnu.org To: Werner LEMBERG Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 28 16:45:33 2018 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 1gcuKH-0002qb-Rf for geb-bug-gnu-emacs@m.gmane.org; Fri, 28 Dec 2018 16:45:29 +0100 Original-Received: from localhost ([127.0.0.1]:59866 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gcuMO-0003uD-3k for geb-bug-gnu-emacs@m.gmane.org; Fri, 28 Dec 2018 10:47:40 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:37130) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gcuLU-00038r-N2 for bug-gnu-emacs@gnu.org; Fri, 28 Dec 2018 10:46:50 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gcu9D-0005ma-Tr for bug-gnu-emacs@gnu.org; Fri, 28 Dec 2018 10:34:07 -0500 Original-Received: from debbugsout.gnu.org ([209.51.188.43]:60031) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gcu9C-0005eD-Ip for bug-gnu-emacs@gnu.org; Fri, 28 Dec 2018 10:34:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gcu9B-0002ui-T6 for bug-gnu-emacs@gnu.org; Fri, 28 Dec 2018 10:34:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 Dec 2018 15:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33885 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 33885-submit@debbugs.gnu.org id=B33885.154601121511155 (code B ref 33885); Fri, 28 Dec 2018 15:34:01 +0000 Original-Received: (at 33885) by debbugs.gnu.org; 28 Dec 2018 15:33:35 +0000 Original-Received: from localhost ([127.0.0.1]:40608 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gcu8k-0002tr-Mv for submit@debbugs.gnu.org; Fri, 28 Dec 2018 10:33:34 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:56359) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gcu8i-0002te-9R for 33885@debbugs.gnu.org; Fri, 28 Dec 2018 10:33:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gcu8b-0003kD-6d for 33885@debbugs.gnu.org; Fri, 28 Dec 2018 10:33:27 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:42721) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gcu8V-0003Xj-A3; Fri, 28 Dec 2018 10:33:19 -0500 Original-Received: from [176.228.60.248] (port=4794 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gcu8U-0003Mn-64; Fri, 28 Dec 2018 10:33:19 -0500 In-reply-to: <20181228.155850.556290055640666168.wl@gnu.org> (message from Werner LEMBERG on Fri, 28 Dec 2018 15:58:50 +0100 (CET)) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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] [fuzzy] X-Received-From: 209.51.188.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:153960 Archived-At: > Date: Fri, 28 Dec 2018 15:58:50 +0100 (CET) > Cc: 33885@debbugs.gnu.org > From: Werner LEMBERG > > OK. `XftFontOpenPattern' returns the following data for `Cardo': > > (gdb) p *xftfont > $12 = { > ascent = 16, > descent = -5, > height = 6, > max_advance_width = 91, > charset = 0x7fffe23d52d8, > pattern = 0x1f01050 > } > > This is problematic, since it only reflects the Apple values for > ascent and descent (i.e., the data in the font's `hhea' table). To > solve the issue, there are two possible solutions IMHO. > > (1) Simply accept whatever `XftFontOpenPattern' returns, including > negative values for `descent' – actually, such font might exist: > for example, consider a special font that only contains dashes of > different length. I don't think this is a good idea. > (2) Improve the heuristics to get sensible global ascent and descent > values of a font. In particular, use the FreeType library to > access a TrueType's or OpenType's `OS/2' table and compare its > vertical metrics values with the `hhea' data to eliminate bugs in > the font – sign problems with `descent' do happen especially in > older fonts that were either designed for Apple or for Windows, > and the fields for the `other' OS were filled out arbitrarily, > more or less. I'd appreciate more details on how this could be done. I'm no expert on fonts nor on FreeType, and last I checked we have no one else. Thanks.