From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Benjamin Riefenstahl Newsgroups: gmane.emacs.bugs Subject: bug#21846: 25.0.50; emacs hebrew script bidi nikud rendering bug Date: Fri, 11 Dec 2015 00:15:55 +0100 Message-ID: <87vb85q4ic.fsf@justinian.turtle-trading.net> References: <87wpttemc1.fsf@justinian.turtle-trading.net> <83611dpu8m.fsf@gnu.org> <87oaf5ehp1.fsf@justinian.turtle-trading.net> <87wpt1udet.fsf@justinian.turtle-trading.net> <3F7EF7A4-689A-41E9-88A4-5028AD420087@yv.org> <87two3l7wg.fsf@justinian.turtle-trading.net> <874mg3um4s.fsf@justinian.turtle-trading.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1449789443 6656 80.91.229.3 (10 Dec 2015 23:17:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 10 Dec 2015 23:17:23 +0000 (UTC) Cc: 21846@debbugs.gnu.org To: Mark David Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 11 00:17:13 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1a7ASW-0002nh-3F for geb-bug-gnu-emacs@m.gmane.org; Fri, 11 Dec 2015 00:17:12 +0100 Original-Received: from localhost ([::1]:44846 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7ASV-0004QJ-H6 for geb-bug-gnu-emacs@m.gmane.org; Thu, 10 Dec 2015 18:17:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44735) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7ASR-0004Pz-DW for bug-gnu-emacs@gnu.org; Thu, 10 Dec 2015 18:17:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a7ASM-0006qN-Dm for bug-gnu-emacs@gnu.org; Thu, 10 Dec 2015 18:17:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56495) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7ASM-0006qI-A4 for bug-gnu-emacs@gnu.org; Thu, 10 Dec 2015 18:17:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1a7ASM-0003Ns-1f for bug-gnu-emacs@gnu.org; Thu, 10 Dec 2015 18:17:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Benjamin Riefenstahl Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Dec 2015 23:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21846 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21846-submit@debbugs.gnu.org id=B21846.144978936312937 (code B ref 21846); Thu, 10 Dec 2015 23:17:01 +0000 Original-Received: (at 21846) by debbugs.gnu.org; 10 Dec 2015 23:16:03 +0000 Original-Received: from localhost ([127.0.0.1]:39522 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a7ARP-0003Mb-Gv for submit@debbugs.gnu.org; Thu, 10 Dec 2015 18:16:03 -0500 Original-Received: from odoacer.turtle-trading.net ([217.91.34.180]:41014) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a7ARO-0003Lu-LW for 21846@debbugs.gnu.org; Thu, 10 Dec 2015 18:16:03 -0500 Original-Received: from justinian.turtle-trading.net ([192.168.2.118]) by odoacer.turtle-trading.net with esmtp (Exim 4.80) (envelope-from ) id 1a7ARI-00009P-0a; Fri, 11 Dec 2015 00:15:56 +0100 Original-Received: from benny by justinian.turtle-trading.net with local (Exim 4.84) (envelope-from ) id 1a7ARH-00017M-Tq; Fri, 11 Dec 2015 00:15:55 +0100 In-Reply-To: <874mg3um4s.fsf@justinian.turtle-trading.net> (Benjamin Riefenstahl's message of "Tue, 01 Dec 2015 00:02:11 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) 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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:109854 Archived-At: Benjamin Riefenstahl writes: > With m17n-edit, the text is run through COMBINING.flt (according to > MDEBUG_FLT=3), with Emacs, no FLT is triggered at all. Which makes me > suspect that Emacs does not use m17n for this font at all (?). So I armed myself with a debugger and tried to trace what happens. My command line is gdb --args ./emacs -Q --eval '(set-default-font "Aharoni CLM 20")' test.txt The first wrong turn is in hebrew-shape-gstring (lisp/language/hebrew.el). This only calls the font-based shaping function, if the font indicates that it supports OpenType (OTF) features for Hebrew. As a fallback, limited shaping is done in ELisp by looking up precomposed characters. When I stub this out for further testing, we get until ftfont_shape (ftfont.c). That function checks if there is any OTF support in the font and only when it is there, it calls libm17n. The next function in the chain (ftfont_shape_by_flt) actually uses that OTF object that we did not get in ftfont_shape to pass some font information. There seem to be three possibilities: * Don't fix, PostScript fonts are just not supported here. Maybe instead "Aharoni CLM" could be converted to OpenType. * Try to support non-OTF fonts in ftfont_shape_by_flt. See how the example programs for libm17n do it. * Reimplement what COMBINING.flt does in hebrew.el.