From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#15273: 24.3.50; Combining character sequences are displayed weirdly Date: Fri, 06 Sep 2013 09:29:57 +0300 Message-ID: <83r4d2mpi2.fsf@gnu.org> References: <9243D0C8-83F9-40B4-8F2C-37517A1F6BCC@swipnet.se> <8338pjnqfm.fsf@gnu.org> <831u53npuy.fsf@gnu.org> <7977F745-C1B8-44AD-9710-3CE9567C5338@swipnet.se> <83zjrrm9tc.fsf@gnu.org> <5B85556B-72FB-49DB-96F8-A38939746260@swipnet.se> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-Trace: ger.gmane.org 1378449078 20593 80.91.229.3 (6 Sep 2013 06:31:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 6 Sep 2013 06:31:18 +0000 (UTC) Cc: xfq.free@gmail.com, 15273@debbugs.gnu.org To: Jan =?UTF-8?Q?Dj=C3=A4rv?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 06 08:31:20 2013 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 1VHpZd-00032M-Lj for geb-bug-gnu-emacs@m.gmane.org; Fri, 06 Sep 2013 08:31:17 +0200 Original-Received: from localhost ([::1]:35309 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHpZc-0005Tg-Vp for geb-bug-gnu-emacs@m.gmane.org; Fri, 06 Sep 2013 02:31:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57713) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHpZU-0005TV-OY for bug-gnu-emacs@gnu.org; Fri, 06 Sep 2013 02:31:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VHpZP-0007sf-EJ for bug-gnu-emacs@gnu.org; Fri, 06 Sep 2013 02:31:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34482) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHpZP-0007sb-AQ for bug-gnu-emacs@gnu.org; Fri, 06 Sep 2013 02:31:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VHpZO-0001PV-FR for bug-gnu-emacs@gnu.org; Fri, 06 Sep 2013 02:31: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, 06 Sep 2013 06:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15273 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 15273-submit@debbugs.gnu.org id=B15273.13784490215361 (code B ref 15273); Fri, 06 Sep 2013 06:31:02 +0000 Original-Received: (at 15273) by debbugs.gnu.org; 6 Sep 2013 06:30:21 +0000 Original-Received: from localhost ([127.0.0.1]:42772 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VHpYh-0001ON-CH for submit@debbugs.gnu.org; Fri, 06 Sep 2013 02:30:20 -0400 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:35434) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VHpYc-0001Nz-2Q for 15273@debbugs.gnu.org; Fri, 06 Sep 2013 02:30:15 -0400 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0MSO00100XQ1X100@a-mtaout21.012.net.il> for 15273@debbugs.gnu.org; Fri, 06 Sep 2013 09:30:06 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MSO001SXY26QU90@a-mtaout21.012.net.il>; Fri, 06 Sep 2013 09:30:06 +0300 (IDT) In-reply-to: <5B85556B-72FB-49DB-96F8-A38939746260@swipnet.se> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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:78031 Archived-At: > From: Jan Djärv > Date: Fri, 6 Sep 2013 07:08:56 +0200 > Cc: xfq.free@gmail.com, > 15273@debbugs.gnu.org > > > Thanks. So this is not a composition at all, and the wicked way the > > triangle is displayed is not Emacs's fault at all. I guess the font > > used by NS or the font driver are at fault here. FWIW, on MS-Windows, > > I see the ! and the triangle after it correctly, as 2 separate > > characters (using Code2000 font). > > What do you mean by composition? Is it that the two characters are replaced by another character that is equivalent? That may not be possible since we can combine any character with the triangle, such a glyph may not be available. Character composition in Emacs can happen in 1 of 2 ways: . The font driver tells Emacs to compose several characters into a single grapheme cluster, by drawing all of them as a single unit, and by drawing the 2nd, 3rd, etc. character glyphs at certain pixel offsets relative to the base glyph. . Emacs itself has composition rules for 2 or more characters; in this case, the same pixel offsets come from those rules. The first possibility includes possible substitution of a single glyph for several characters, but that's not the only possibility, because the font driver tells Emacs both the glyphs to draw and their relative pixel positions. In both cases, Emacs shows the composition details in "C-u C-x =", here's an example: Composed with the following character(s) "ִ" using this font: uniscribe:-outline-Courier New-bold-normal-normal-mono-15-*-*-*-c-*-iso10646-1 by these glyphs: [0 1 1506 690 9 0 8 12 5 nil] [0 1 1460 657 9 0 5 12 5 [-7 0 0]] In the case in point, there was no such display of composition details. So I concluded that no composition was done. > Or is it simply that Emacs treats the two characters as one? Emacs will treat them as one, more or less, if they are composed by one of the above two methods. ("More or less" because we still allow certain operations, such as delete-char, to act on individual characters that were composed.) > Why is displaying the ! and the triangle after it as separate characters correct? The triangle is a composing character and should be displayed above the !. I meant "correct" in the sense that there's no apparent redisplay bug: the display engine behaves according to the information it has. The OP's bug report was about the partial display of the triangle, not about the lack of composition. If the font driver doesn't tell us that the characters need to be combined, and we don't have in Emacs a rule to do that ourselves, then the problem, if there is one, is not in the display engine. If we want to combine this character, we should write a composition rule for it.