all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Jan Djärv" <jan.h.d@swipnet.se>
Cc: xfq.free@gmail.com, 15273@debbugs.gnu.org
Subject: bug#15273: 24.3.50; Combining character sequences are displayed weirdly
Date: Fri, 06 Sep 2013 09:29:57 +0300	[thread overview]
Message-ID: <83r4d2mpi2.fsf@gnu.org> (raw)
In-Reply-To: <5B85556B-72FB-49DB-96F8-A38939746260@swipnet.se>

> From: Jan Djärv <jan.h.d@swipnet.se>
> 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.





  reply	other threads:[~2013-09-06  6:29 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-05 14:08 bug#15273: 24.3.50; Combining character sequences are displayed weirdly Xue Fuqiao
2013-09-05 14:33 ` Eli Zaretskii
2013-09-05 23:26   ` Xue Fuqiao
2013-09-05 16:48 ` Jan Djärv
2013-09-05 17:12   ` Eli Zaretskii
2013-09-05 17:24     ` Eli Zaretskii
2013-09-05 17:33       ` Jan Djärv
2013-09-05 17:56         ` Eli Zaretskii
2013-09-06  5:08           ` Jan Djärv
2013-09-06  6:29             ` Eli Zaretskii [this message]
2013-09-06  6:42               ` Andreas Schwab
2013-09-06  7:32                 ` Eli Zaretskii
2013-09-06 14:37                   ` Xue Fuqiao
2013-09-06 15:53                     ` Eli Zaretskii
2013-09-06 22:17                       ` Xue Fuqiao
2013-09-06 22:37                         ` Xue Fuqiao
2013-09-07  7:27                           ` Eli Zaretskii
2013-09-07  7:26                         ` Eli Zaretskii
2013-09-07  7:36                           ` Jan Djärv
2013-09-07  7:57                             ` Eli Zaretskii
2013-09-07  8:02                               ` Jan Djärv
2013-09-07  8:10                                 ` Eli Zaretskii
2013-09-07  8:27                                   ` Jan Djärv
2013-09-07  8:40                                     ` Eli Zaretskii
2013-09-07  8:54                                       ` Jan Djärv
2013-09-07  9:59                                         ` Eli Zaretskii
2013-09-07 13:44                                           ` Jan Djärv
2013-09-07 15:20                                             ` Eli Zaretskii
2013-09-08  8:26                                               ` Jan Djärv
2013-09-07 22:50                                         ` Xue Fuqiao
2013-09-07  8:47                                     ` Jan Djärv
2013-09-07  9:22                                       ` Eli Zaretskii
2013-09-09  0:52                                       ` YAMAMOTO Mitsuharu
2013-09-09  5:17                                         ` Jan Djärv
2013-09-07 12:25                     ` Wolfgang Jenkner
2013-09-07 15:18                       ` Eli Zaretskii
2013-09-07 21:38                         ` Wolfgang Jenkner
2013-09-07 22:29                           ` Xue Fuqiao
2013-09-07 22:48                             ` Xue Fuqiao
2013-09-08 11:03                               ` Eli Zaretskii
2013-09-08 13:05               ` Kenichi Handa
2013-09-08 14:59                 ` Eli Zaretskii
2013-09-10 13:58                   ` Kenichi Handa
2013-09-10 15:37                     ` Eli Zaretskii
2013-09-12 14:52                     ` Kenichi Handa
2013-09-12 16:08                       ` Eli Zaretskii
2020-11-18 15:13                         ` Stefan Kangas
2020-11-18 17:09                           ` Eli Zaretskii
2013-09-14  8:51                       ` Jan Djärv
2013-09-14  9:12                         ` Jan Djärv
2013-09-05 17:29     ` Jan Djärv
2013-09-05 17:56       ` Eli Zaretskii
2013-09-05 23:27   ` Xue Fuqiao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83r4d2mpi2.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=15273@debbugs.gnu.org \
    --cc=jan.h.d@swipnet.se \
    --cc=xfq.free@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.