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
This commit is contained in:
Axel Svensson 2022-08-09 01:11:02 +02:00 committed by Eli Zaretskii
parent 8854b321c2
commit e7f1d4f6e1
2 changed files with 21 additions and 8 deletions

View file

@ -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

View file

@ -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'.