GNU bug report logs -
#63731
[PATCH] Support Emoji Variation Sequence 16 (FE0F) where appropriate
Previous Next
Reported by: Steven Allen <steven <at> stebalien.com>
Date: Fri, 26 May 2023 03:19:01 UTC
Severity: normal
Tags: fixed, patch
Fixed in version 29.1
Done: Robert Pluim <rpluim <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
>>>>> On Fri, 26 May 2023 15:06:40 +0300, Eli Zaretskii <eliz <at> gnu.org> said:
>> From: Robert Pluim <rpluim <at> gmail.com>
>>
>> Composition is done for 1f44d+fe0f, but I suspect that with the current
>> setup, composition is called again for FE0F, which results in the box
>> glyph. With the second patch we will only do backwards looking composition
>> for FE0F
Eli> OK, then I think we should install this on the emacs-29 branch.
>> Youʼre right, thereʼs no forward looking regexp, only a backwards one
>> and a no-regexp. But itʼs undeniable that:
>>
>> [nil 0 compose-gstring-for-graphic]
>>
>> causes the issue. Iʼve never been clear on the semantics of that.
Eli> It has special support in compose-gstring-for-graphic, see there. The
Eli> doc string also says a few words about that. We use this, e.g., in
Eli> describe-char display, where we sometimes need to show a single
Eli> combining character with no base character to combine it with. I
Eli> think this is only relevant for accents and other such combining
Eli> characters, not for VS-n.
OK
Eli> What does this issue mean for the other VS-n characters, though?
Eli> Should we perhaps install something similar for them as well?
For VS-15 maybe? The following gets me text-presentation composition
with CHAR+FE0E and emoji-presentation with CHAR+FE0F
diff --git a/lisp/composite.el b/lisp/composite.el
index fb8b76114f4..ada35010146 100644
--- a/lisp/composite.el
+++ b/lisp/composite.el
@@ -762,6 +762,11 @@ compose-gstring-for-dotted-circle
(if (memq val '(Mn Mc Me))
(set-char-table-range composition-function-table key elt)))
unicode-category-table))
+ ;; for Emoji presentation selector
+ (set-char-table-range
+ composition-function-table
+ '(#xFE0E . #xFE0F)
+ `([,(purecopy "\\c.[\ufe0f\ufe0e]") 1 compose-gstring-for-graphic]))
;; for dotted-circle
(aset composition-function-table #x25CC
`([,(purecopy ".\\c^") 0 compose-gstring-for-dotted-circle]))
@@ -861,7 +866,7 @@ compose-gstring-for-variation-glyph
;; handled in font_range, we end up choosing the Emoji presentation
;; rather than the Text presentation.
(let ((elt '([".." 1 compose-gstring-for-variation-glyph])))
- (set-char-table-range composition-function-table '(#xFE00 . #xFE0E) elt)
+ (set-char-table-range composition-function-table '(#xFE00 . #xFE0D) elt)
(set-char-table-range composition-function-table '(#xE0100 . #xE01EF) elt))
(defun auto-compose-chars (func from to font-object string direction)
although perhaps we could have both `compose-gstring-for-graphic' and
`compose-gstring-for-variation-glyph' for FE0E
Robert
--
This bug report was last modified 1 year and 350 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.