emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master e7f1d4f6e1: Support the full range of variation selectors


From: Eli Zaretskii
Subject: master e7f1d4f6e1: Support the full range of variation selectors
Date: Thu, 11 Aug 2022 12:16:58 -0400 (EDT)

branch: master
commit e7f1d4f6e106576f3d8de4074290dc4e8c7c544f
Author: Axel Svensson <mail@axelsvensson.com>
Commit: Eli Zaretskii <eliz@gnu.org>

    Support the full range of variation selectors
    
    * lisp/international/characters.el: Provide acronyms for variation
    selectors.
    (update-glyphless-char-display): Update display of the full range
    of variation selectors.
    (glyphless-char-display-control): Update doc string.  (Bug#57072)
    
    * doc/lispref/display.texi (Glyphless Chars): Document more
    variation selectors.
    
    Copyright-paperwork-exempt: yes
---
 doc/lispref/display.texi         |  6 +++---
 lisp/international/characters.el | 23 ++++++++++++++++++-----
 2 files changed, 21 insertions(+), 8 deletions(-)

diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index ace67fbedb..96079dc106 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -8596,9 +8596,9 @@ Characters of Unicode General Category [Cf], such as 
U+200E
 images, such as U+00AD @sc{soft hyphen}.
 
 @item variation-selectors
-Unicode VS-1 through VS-16 (U+FE00 through U+FE0F), which are used to
-select between different glyphs for the same codepoints (typically
-emojis).
+Unicode VS-1 through VS-256 (U+FE00 through U+FE0F and U+E0100 through
+U+E01EF), which are used to select between different glyphs for the same
+codepoints (typically emojis).
 
 @item no-font
 Characters for which there is no suitable font, or which cannot be
diff --git a/lisp/international/characters.el b/lisp/international/characters.el
index ca28222c81..d6e83c81e7 100644
--- a/lisp/international/characters.el
+++ b/lisp/international/characters.el
@@ -1525,6 +1525,17 @@ Setup `char-width-table' appropriate for non-CJK 
language environment."
   (aset char-acronym-table (+ #xE0021 i) (format " %c TAG" (+ 33 i))))
 (aset char-acronym-table #xE007F "->|TAG") ; CANCEL TAG
 
+(dotimes (i 256)
+  (let* ((vs-number (1+ i))
+         (codepoint (if (< i 16)
+                        (+ #xfe00 i)
+                      (+ #xe0100 i -16)))
+         (delimiter (cond ((<= vs-number 9) "0")
+                          ((<= vs-number 99) "")
+                          (t " "))))
+    (aset char-acronym-table codepoint
+          (format "VS%s%s" delimiter vs-number))))
+
 ;; We can't use the \N{name} things here, because this file is used
 ;; too early in the build process.
 (defvar bidi-control-characters
@@ -1574,7 +1585,9 @@ option `glyphless-char-display'."
                                             #x80 #x9F method))
            ((eq target 'variation-selectors)
             (glyphless-set-char-table-range glyphless-char-display
-                                            #xFE00 #xFE0F method))
+                                            #xFE00 #xFE0F method)
+             (glyphless-set-char-table-range glyphless-char-display
+                                            #xE0100 #xE01EF method))
            ((or (eq target 'format-control)
                  (eq target 'bidi-control))
             (when unicode-category-table
@@ -1647,10 +1660,10 @@ GROUP must be one of these symbols:
                     that are relevant for bidirectional formatting control,
                     like U+2069 (PDI) and U+202B (RLE).
   `variation-selectors':
-                    Characters in the range U+FE00..U+FE0F, used for
-                    selecting alternate glyph presentations, such as
-                    Emoji vs Text presentation, of the preceding
-                    character(s).
+                    Characters in the range U+FE00..U+FE0F and
+                    U+E0100..U+E01EF, used for selecting alternate glyph
+                    presentations, such as Emoji vs Text presentation, of
+                    the preceding character(s).
   `no-font':        For GUI frames, characters for which no suitable
                     font is found; for text-mode frames, characters
                     that cannot be encoded by `terminal-coding-system'.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]