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#31315: wrong font encoding for fallback font Date: Fri, 04 May 2018 16:05:36 +0300 Message-ID: <83bmdvtvtr.fsf@gnu.org> References: <83a7tgpr43.fsf@gnu.org> <20180503.210528.278141526929157986.wl@gnu.org> <83vac4o6hr.fsf@gnu.org> <20180504.071137.973726089728856021.wl@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1525439108 27345 195.159.176.226 (4 May 2018 13:05:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 4 May 2018 13:05:08 +0000 (UTC) Cc: 31315@debbugs.gnu.org To: Werner LEMBERG Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri May 04 15:05:04 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 1fEaOW-00071H-67 for geb-bug-gnu-emacs@m.gmane.org; Fri, 04 May 2018 15:05:04 +0200 Original-Received: from localhost ([::1]:34243 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fEaQc-0005s0-Is for geb-bug-gnu-emacs@m.gmane.org; Fri, 04 May 2018 09:07:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37381) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fEaQV-0005rn-LM for bug-gnu-emacs@gnu.org; Fri, 04 May 2018 09:07:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fEaQQ-0005HT-Qc for bug-gnu-emacs@gnu.org; Fri, 04 May 2018 09:07:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:41124) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fEaQQ-0005HJ-NJ for bug-gnu-emacs@gnu.org; Fri, 04 May 2018 09:07:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fEaQQ-0003AI-Gm for bug-gnu-emacs@gnu.org; Fri, 04 May 2018 09:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 May 2018 13:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31315 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 31315-submit@debbugs.gnu.org id=B31315.152543916412101 (code B ref 31315); Fri, 04 May 2018 13:07:02 +0000 Original-Received: (at 31315) by debbugs.gnu.org; 4 May 2018 13:06:04 +0000 Original-Received: from localhost ([127.0.0.1]:49021 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fEaPU-000397-1K for submit@debbugs.gnu.org; Fri, 04 May 2018 09:06:04 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:45958) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fEaPS-00038e-K0 for 31315@debbugs.gnu.org; Fri, 04 May 2018 09:06:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fEaPM-0004MB-7l for 31315@debbugs.gnu.org; Fri, 04 May 2018 09:05:57 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43523) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fEaPE-0004Gg-0w; Fri, 04 May 2018 09:05:48 -0400 Original-Received: from [176.228.60.248] (port=1303 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fEaPC-0007mX-IY; Fri, 04 May 2018 09:05:47 -0400 In-reply-to: <20180504.071137.973726089728856021.wl@gnu.org> (message from Werner LEMBERG on Fri, 04 May 2018 07:11:37 +0200 (CEST)) 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] 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:146012 Archived-At: > Date: Fri, 04 May 2018 07:11:37 +0200 (CEST) > Cc: handa@gnu.org, 31315@debbugs.gnu.org > From: Werner LEMBERG > > > Emacs handles charsets and scripts separately. A script is matched > > against OTF/TTF features of fonts to make sure the necessary shaping > > features required by a script are supported. > > Interesting. Access to OpenType features is exactly what's needed to > improve font display for selected charsets. Where can I find the > related code in Emacs? Emacs delegates that to the font back-end. E.g., in font_match_p you will see that if certain 'otf' capabilities are required, Emacs calls the otf_capability method of the font driver. The ftfont.c driver implements that as ftfont_otf_capability. And which OTF capabilities are required for what scripts is set up in the fontsets by fontest.el. > Additionally, I suggest that the Emacs maintainers set up a GSoC > project, namely to improve font rendering. This is a broad topic, > which could be further split into smaller subprojects. Good idea. > Emacs uses Handa-san's libotf library (are there any other projects > that use this library?), but AFAICS it doesn't receive a lot of > testing. On the other hand, there is Behdad Esfahbod's `HarfBuzz' > shaping engine that comes with a large suite of tests. One of such > subprojects could be to take these tests and use them to improve > libotf, especially for Indic scripts. > > https://www.freedesktop.org/wiki/Software/HarfBuzz/ I think a better development would be to teach Emacs to use HarfBuzz as its shaping engine. HarfBuzz is available on many platforms, and is AFAIK actively developed, so we will gain better shaper and advanced features if we do that. Once again, such a project needs a motivated volunteer to carry it out.