[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Unicode 13 Emoji ranges composed with wrong font on NS port
From: |
Robert Pluim |
Subject: |
Re: Unicode 13 Emoji ranges composed with wrong font on NS port |
Date: |
Tue, 12 Oct 2021 19:13:59 +0200 |
Robert> On Gnu/Linux with Noto Color Emoji they all look very colourful. For
Robert> some reason on macOS the code thatʼs supposed to handle VS16 is not
Robert> working correctly.
Robert> Hmm, the bit in font_range that does the lookup based off
Robert> Vscript_representative_chars is working correctly, which means Iʼll
Robert> need to look into the macOS font/display code. Given that
Robert> glyphless-char-display appears not to be honored on macOS, maybe
Robert> thereʼs some code missing. Alan?
This turns out not to be due to macOS differences, but because of this
code in lisp/composite.el:
(let ((elt '([".." 1 compose-gstring-for-variation-glyph])))
(set-char-table-range composition-function-table '(#xFE00 . #xFE0F) elt)
(set-char-table-range composition-function-table '(#xE0100 . #xE01EF) elt))
If I change that to use `compose-gstring-for-graphic' instead, then
the emoji+VS-16 display works correctly on macOS and GNU/Linux.
Eli, something like the following for emacs-28?
diff --git a/lisp/composite.el b/lisp/composite.el
index 859253ec7e..983398f469 100644
--- a/lisp/composite.el
+++ b/lisp/composite.el
@@ -835,8 +835,11 @@ compose-gstring-for-variation-glyph
(throw 'tag gstring)))))))
(let ((elt '([".." 1 compose-gstring-for-variation-glyph])))
- (set-char-table-range composition-function-table '(#xFE00 . #xFE0F) elt)
+ (set-char-table-range composition-function-table '(#xFE00 . #xFE0E) elt)
(set-char-table-range composition-function-table '(#xE0100 . #xE01EF) elt))
+;; We don't want variation selectors to be used to look up glyphs for FE0F
+(set-char-table-range composition-function-table #xFE0F
+ '([".." 1 compose-gstring-for-graphic]))
(defun auto-compose-chars (func from to font-object string direction)
"Compose the characters at FROM by FUNC.
- Unicode 13 Emoji ranges composed with wrong font on NS port, Jimmy Yuen Ho Wong, 2021/10/10
- Re: Unicode 13 Emoji ranges composed with wrong font on NS port, Eli Zaretskii, 2021/10/10
- Re: Unicode 13 Emoji ranges composed with wrong font on NS port, Robert Pluim, 2021/10/10
- Re: Unicode 13 Emoji ranges composed with wrong font on NS port, Eli Zaretskii, 2021/10/10
- Re: Unicode 13 Emoji ranges composed with wrong font on NS port, Jimmy Yuen Ho Wong, 2021/10/11
- Re: Unicode 13 Emoji ranges composed with wrong font on NS port, Robert Pluim, 2021/10/12
- Re: Unicode 13 Emoji ranges composed with wrong font on NS port, Eli Zaretskii, 2021/10/12
- Re: Unicode 13 Emoji ranges composed with wrong font on NS port,
Robert Pluim <=
- Re: Unicode 13 Emoji ranges composed with wrong font on NS port, Eli Zaretskii, 2021/10/12
- Re: Unicode 13 Emoji ranges composed with wrong font on NS port, Robert Pluim, 2021/10/13
- Re: Unicode 13 Emoji ranges composed with wrong font on NS port, Eli Zaretskii, 2021/10/13
- Re: Unicode 13 Emoji ranges composed with wrong font on NS port, Robert Pluim, 2021/10/13
- Re: Unicode 13 Emoji ranges composed with wrong font on NS port, Eli Zaretskii, 2021/10/13
- Re: Unicode 13 Emoji ranges composed with wrong font on NS port, Robert Pluim, 2021/10/14
- Re: Unicode 13 Emoji ranges composed with wrong font on NS port, Eli Zaretskii, 2021/10/14
- Re: Unicode 13 Emoji ranges composed with wrong font on NS port, Jimmy Yuen Ho Wong, 2021/10/12
- Re: Unicode 13 Emoji ranges composed with wrong font on NS port, Eli Zaretskii, 2021/10/12
- Re: Unicode 13 Emoji ranges composed with wrong font on NS port, Alan Third, 2021/10/12