all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Robert Pluim <rpluim@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: ucs-normalize and diacritics
Date: Tue, 24 Jul 2018 22:07:00 +0300	[thread overview]
Message-ID: <83lga0v4ff.fsf@gnu.org> (raw)
In-Reply-To: <8736w88pnn.fsf@gmail.com> (message from Robert Pluim on Tue, 24 Jul 2018 20:17:00 +0200)

> From: Robert Pluim <rpluim@gmail.com>
> Date: Tue, 24 Jul 2018 20:17:00 +0200
> 
> in
> <https://emacs.stackexchange.com/questions/43757/combining-diacritics-not-combining-visually>
> someone noted that â (that is LATIN SMALL LETTER A followed by
> COMBINING CIRCUMFLEX ACCENT) was not visually shown as â (LATIN SMALL
> LETTER A WITH CIRCUMFLEX). I can play around with the various
> ucs-normalize-* functions and get that to happen, but Iʼm just curious
> why it doesnʼt happen automatically (assuming it should, of course.

It does display as â, but only if you use a font that supports both
'a' and '̂'.  Emacs can only compose characters that are displayed by
the same font.

> I couldn't find any documentation on this kind of stuff).

Not sure what documentation you were looking for, but the data
structure to make this happen is set up in composite.el:

  (when unicode-category-table
    (let ((elt `([,(purecopy "\\c.\\c^+") 1 compose-gstring-for-graphic]
		 [nil 0 compose-gstring-for-graphic])))
      (map-char-table
       #'(lambda (key val)
	   (if (memq val '(Mn Mc Me))
	       (set-char-table-range composition-function-table key elt)))
       unicode-category-table))
    ;; for dotted-circle
    (aset composition-function-table #x25CC
	  `([,(purecopy ".\\c^") 0 compose-gstring-for-dotted-circle])))

That "\\c.\\c^+" regexp causes any base character (\c.) followed by
one or more combining characters (\c^) to be composable using the
function compose-gstring-for-graphic (which see).



  reply	other threads:[~2018-07-24 19:07 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-24 18:17 ucs-normalize and diacritics Robert Pluim
2018-07-24 19:07 ` Eli Zaretskii [this message]
2018-07-24 19:20   ` Eli Zaretskii
2018-07-24 20:48     ` Robert Pluim
2018-07-25  2:32       ` Eli Zaretskii
2018-07-25  7:40         ` Robert Pluim
2018-07-25 14:39           ` Eli Zaretskii
2018-07-25 19:59             ` Robert Pluim
2018-07-26 19:47               ` Eli Zaretskii
2018-07-25 14:45           ` Robert Pluim
2018-07-25 14:57             ` Eli Zaretskii
2018-07-26  1:14               ` Richard Stallman
2018-07-26 14:15                 ` Matt Lavallee
2018-07-26 18:42                   ` Eli Zaretskii
2018-07-26 21:01                     ` John Hsieh
2018-07-26 21:54                       ` Stefan Monnier
2018-07-28  3:17                         ` Richard Stallman
2018-07-31  1:09                       ` John Hsieh
2018-07-31 15:22                         ` Eli Zaretskii
2018-07-31 15:27                           ` John Hsieh
2018-07-31 15:45                             ` John Hsieh
2018-07-31 16:33                               ` Eli Zaretskii
2018-07-31 16:28                             ` Eli Zaretskii
2018-07-31 16:30                               ` John Hsieh
2018-07-27  3:21                   ` Richard Stallman
2018-07-27 23:48                     ` John Hsieh
2018-07-26  8:40               ` Robert Pluim
2018-07-26 18:41                 ` Eli Zaretskii
2018-07-26 20:40                   ` Robert Pluim
2018-07-27  5:56                     ` Eli Zaretskii
2018-07-27  6:59                       ` Eli Zaretskii
2018-07-27  8:36                         ` Robert Pluim
2018-07-31 12:37                         ` K. Handa
2018-07-31 15:21                           ` Eli Zaretskii
2018-08-03 14:21                             ` K. Handa
2018-08-03 14:44                               ` Andreas Schwab
2018-08-05 13:22                                 ` K. Handa
2018-08-05 15:28                                   ` Eli Zaretskii
2018-08-06 22:49                                     ` K. Handa
2018-08-11  8:20                                       ` Eli Zaretskii
2018-08-03 17:57                               ` Eli Zaretskii
2018-08-05 13:58                                 ` K. Handa
2018-07-24 20:54   ` Robert Pluim
2018-07-25  2:36     ` Eli Zaretskii
2018-07-25 14:36       ` Eli Zaretskii
2018-07-25 20:11         ` Robert Pluim
2018-07-25 20:21           ` Cesar Crusius
2018-07-25 20:44             ` Robert Pluim
2018-07-25 22:59               ` Cesar Crusius
2018-07-26  8:14                 ` Robert Pluim
2018-07-25 21:01           ` Yuri Khan
2018-07-26  2:41             ` Eli Zaretskii
2018-07-26  2:39           ` Eli Zaretskii

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=83lga0v4ff.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=rpluim@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.