aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Svensson2022-08-09 01:11:02 +0200
committerEli Zaretskii2022-08-11 19:14:45 +0300
commite7f1d4f6e106576f3d8de4074290dc4e8c7c544f (patch)
tree1f1aa47d773c138644febcdd5745a3b6f9fbebc3
parent8854b321c2cf6132d7de43682c8ea26dd436c9d4 (diff)
downloademacs-e7f1d4f6e106576f3d8de4074290dc4e8c7c544f.tar.gz
emacs-e7f1d4f6e106576f3d8de4074290dc4e8c7c544f.zip
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
-rw-r--r--doc/lispref/display.texi6
-rw-r--r--lisp/international/characters.el23
2 files changed, 21 insertions, 8 deletions
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index ace67fbedb7..96079dc106a 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
8596images, such as U+00AD @sc{soft hyphen}. 8596images, such as U+00AD @sc{soft hyphen}.
8597 8597
8598@item variation-selectors 8598@item variation-selectors
8599Unicode VS-1 through VS-16 (U+FE00 through U+FE0F), which are used to 8599Unicode VS-1 through VS-256 (U+FE00 through U+FE0F and U+E0100 through
8600select between different glyphs for the same codepoints (typically 8600U+E01EF), which are used to select between different glyphs for the same
8601emojis). 8601codepoints (typically emojis).
8602 8602
8603@item no-font 8603@item no-font
8604Characters for which there is no suitable font, or which cannot be 8604Characters for which there is no suitable font, or which cannot be
diff --git a/lisp/international/characters.el b/lisp/international/characters.el
index ca28222c815..d6e83c81e74 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."
1525 (aset char-acronym-table (+ #xE0021 i) (format " %c TAG" (+ 33 i)))) 1525 (aset char-acronym-table (+ #xE0021 i) (format " %c TAG" (+ 33 i))))
1526(aset char-acronym-table #xE007F "->|TAG") ; CANCEL TAG 1526(aset char-acronym-table #xE007F "->|TAG") ; CANCEL TAG
1527 1527
1528(dotimes (i 256)
1529 (let* ((vs-number (1+ i))
1530 (codepoint (if (< i 16)
1531 (+ #xfe00 i)
1532 (+ #xe0100 i -16)))
1533 (delimiter (cond ((<= vs-number 9) "0")
1534 ((<= vs-number 99) "")
1535 (t " "))))
1536 (aset char-acronym-table codepoint
1537 (format "VS%s%s" delimiter vs-number))))
1538
1528;; We can't use the \N{name} things here, because this file is used 1539;; We can't use the \N{name} things here, because this file is used
1529;; too early in the build process. 1540;; too early in the build process.
1530(defvar bidi-control-characters 1541(defvar bidi-control-characters
@@ -1574,7 +1585,9 @@ option `glyphless-char-display'."
1574 #x80 #x9F method)) 1585 #x80 #x9F method))
1575 ((eq target 'variation-selectors) 1586 ((eq target 'variation-selectors)
1576 (glyphless-set-char-table-range glyphless-char-display 1587 (glyphless-set-char-table-range glyphless-char-display
1577 #xFE00 #xFE0F method)) 1588 #xFE00 #xFE0F method)
1589 (glyphless-set-char-table-range glyphless-char-display
1590 #xE0100 #xE01EF method))
1578 ((or (eq target 'format-control) 1591 ((or (eq target 'format-control)
1579 (eq target 'bidi-control)) 1592 (eq target 'bidi-control))
1580 (when unicode-category-table 1593 (when unicode-category-table
@@ -1647,10 +1660,10 @@ GROUP must be one of these symbols:
1647 that are relevant for bidirectional formatting control, 1660 that are relevant for bidirectional formatting control,
1648 like U+2069 (PDI) and U+202B (RLE). 1661 like U+2069 (PDI) and U+202B (RLE).
1649 `variation-selectors': 1662 `variation-selectors':
1650 Characters in the range U+FE00..U+FE0F, used for 1663 Characters in the range U+FE00..U+FE0F and
1651 selecting alternate glyph presentations, such as 1664 U+E0100..U+E01EF, used for selecting alternate glyph
1652 Emoji vs Text presentation, of the preceding 1665 presentations, such as Emoji vs Text presentation, of
1653 character(s). 1666 the preceding character(s).
1654 `no-font': For GUI frames, characters for which no suitable 1667 `no-font': For GUI frames, characters for which no suitable
1655 font is found; for text-mode frames, characters 1668 font is found; for text-mode frames, characters
1656 that cannot be encoded by `terminal-coding-system'. 1669 that cannot be encoded by `terminal-coding-system'.