From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Benjamin Riefenstahl Newsgroups: gmane.emacs.bugs Subject: bug#28339: 25.2; Emacs shows ZWNJ character (Zero Width non-Joiner) as Space Date: Mon, 18 Sep 2017 17:22:04 +0200 Message-ID: <87k20w3ucj.fsf@blei.turtle-trading.net> References: <871sn4srh2.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1505748189 24326 195.159.176.226 (18 Sep 2017 15:23:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 18 Sep 2017 15:23:09 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cc: nimawebgard@gmail.com, 28339@debbugs.gnu.org To: handa Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 18 17:23:05 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 1dtxt3-00067D-8w for geb-bug-gnu-emacs@m.gmane.org; Mon, 18 Sep 2017 17:23:05 +0200 Original-Received: from localhost ([::1]:37220 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dtxtA-0004SE-HZ for geb-bug-gnu-emacs@m.gmane.org; Mon, 18 Sep 2017 11:23:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46894) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dtxt4-0004Rv-QY for bug-gnu-emacs@gnu.org; Mon, 18 Sep 2017 11:23:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dtxt0-0004Dq-Dz for bug-gnu-emacs@gnu.org; Mon, 18 Sep 2017 11:23:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37908) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dtxt0-0004Dm-Af for bug-gnu-emacs@gnu.org; Mon, 18 Sep 2017 11:23:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dtxt0-0004AI-56 for bug-gnu-emacs@gnu.org; Mon, 18 Sep 2017 11:23:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Benjamin Riefenstahl Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 18 Sep 2017 15:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28339 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 28339-submit@debbugs.gnu.org id=B28339.150574813415924 (code B ref 28339); Mon, 18 Sep 2017 15:23:02 +0000 Original-Received: (at 28339) by debbugs.gnu.org; 18 Sep 2017 15:22:14 +0000 Original-Received: from localhost ([127.0.0.1]:46589 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dtxsD-00048l-TA for submit@debbugs.gnu.org; Mon, 18 Sep 2017 11:22:14 -0400 Original-Received: from odoacer.turtle-trading.net ([217.91.34.180]:48309) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dtxsC-00048Y-67 for 28339@debbugs.gnu.org; Mon, 18 Sep 2017 11:22:12 -0400 Original-Received: from justinian.turtle-trading.net ([192.168.2.118]) by odoacer.turtle-trading.net with esmtp (Exim 4.80) (envelope-from ) id 1dtxs4-0003Av-NG; Mon, 18 Sep 2017 17:22:04 +0200 Original-Received: from benny by justinian.turtle-trading.net with local (Exim 4.84_2) (envelope-from ) id 1dtxs4-0000HQ-Jm; Mon, 18 Sep 2017 17:22:04 +0200 In-Reply-To: <871sn4srh2.fsf@gnu.org> (handa@gnu.org's message of "Mon, 18 Sep 2017 10:52:41 +0900") 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:137057 Archived-At: Hi Handa, NB: Take these remarks with the usual grain of salt, I have not read the latest version of the standard about this. I do have some practical experience implementing my own fonts though, so I have thought about it before from that perspective. handa writes: > I checked the GSUB table of "Courier New" font (cour.ttf) using the > program ttx (included in fonttools package of Ubuntu). It surely > contains many rules with ZWNJ, but none of them are with Arabic > characters. So, I suspect that absorbing of ZWNJ for Arabic is done by > a layout engine (halfbuzz? uniscribe?) or by an application level > library (pango?). The font doesn't need a specific rule, because "not shaping" is the default in any combination that is not covered by rules. It only needs rules when it *does* want to do shaping. ZWNJ can work just by keeping the characters apart. After the shaping rules have been applied the question is, is ZWNJ just represented by an empty glyph, or do you have a rule that drops the ZWNJ from the glyph list. This is different from ZWJ, where you need specific rules to do shaping. That is why I said we need the font for that, while we could get the effect of ZWNJ by separate rendering. > Isn't there a case that ZWNJ is prepeneded to a character to change the > shape of the following character? ZWNJ is only interesting between characters. It does not have an effect at the start or the end of a string. It prevents changes which would occur because of ligatures or shaping rules. It should also prevent composition with accents, although that is not the usual way to prevent composition. At least not in western scripts, I don't know what indic scripts do or need. ZWJ OTOH is before or after a character to force the application of shaping. It does not make sense with ligatures, because there the effect depends on the other character, while with shaping there is a standard effect. benny