Subject: bug#63731: [PATCH] Support Emoji Variation Sequence 16 (FE0F) where appropriate

From: Robert Pluim <[email-masked]>
Date: Fri, 26 May 2023 17:25:24 +0200

>>>>> On Fri, 26 May 2023 17:55:26 +0300, Eli Zaretskii <[email-masked]> said:

    >> From: Robert Pluim <[email-masked]>
    >> Cc: [email-masked],  [email-masked]
    >> Date: Fri, 26 May 2023 16:02:40 +0200
    >> 
    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

    Eli> Actually, I forgot about compose-gstring-for-variation-glyph.  My
    Eli> question was actually whether the general setting in

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

    Eli> affects also the VS-n selectors.  But since the latter setting of

    Eli>   (let ((elt '([".." 1 compose-gstring-for-variation-glyph])))
    Eli>     (set-char-table-range composition-function-table '(#xFE00 . #xFE0E) elt)
    Eli>     (set-char-table-range composition-function-table '(#xE0100 . #xE01EF) elt))

    Eli> takes care of all the VS-n selectors except VS-16, and your patch now
    Eli> will take care of VS-16, it sounds like we don't need to care about
    Eli> other VS-n selectors?

    Eli> Or are you saying that without including VS-15, CHAR+FE0E is not
    Eli> displayed using its text representation?

Not quite. If I donʼt have compose-gstring-for-graphic for VS-15, no
composition occurs for CHAR+FE0E. With my change youʼll get
composition, but itʼs still not 100% correct: CHAR+FE0E when CHAR is a
member of the emoji script will use emoji presentation, not text, but
the extra empty box will not show, so itʼs still an improvement.

    Eli> Did you test the proposed change with the admin/emoji-*.txt files, to
    Eli> make sure they all still display OK?

Yes. Iʼve also got a change that makes Emoji_Keycap_Sequence work, but
I think we can leave that for master.

Robert
--