>>>>> On Fri, 28 Feb 2020 10:25:22 +0200, Eli Zaretskii said: >> From: Mike FABIAN >> Cc: 39799@debbugs.gnu.org >> Date: Fri, 28 Feb 2020 08:36:10 +0100 >> >> > Patches are welcome to convert the emoji-related files in Unicode's >> > character database into appropriate composition-function-table setup, >> > similar to the example above. Some script to be run at Emacs build >> > time and produce, say, lisp/emoji.el to populate >> > composition-function-table, would be nice (see the Awk scripts in >> > admin/unidata as one source of inspiration). >> >> Pango also has a .c file which is generated by a python script from >> the Unicode emoji data files to make all these sequences known to Pango. >> >> I can try to write a script. Would it be OK to use Python for such a >> script generating emoji.el? Eli> I'd prefer not to add Python as prerequisite for building Emacs. We Eli> already use Awk, so using that'd be fine. I suck at awk, but my attempt is attached. It DTRT for me under Cairo if I change my fontset settings to use 'Noto Color Emoji' instead of Symbola for: (#x1F300 . #x1F5FF) ;; Misc Symbols and Pictographs (#x1F900 . #x1F9FF) ;; Supplemental Symbols and Pictographs It matches forward off the first char, so the composition-function-table entries all have '0' as the number of chars to match. Would it be better to match backwards? Weʼd run into the 4-character maximum for that, since some of the sequences are 7 or more characters long. >> > If you mean they are not displayed in correct colors, then Emacs >> > doesn't yet support color emoji, we lack some infrastructure for >> > that. Again, work in that area is welcome, it should be relatively >> > easy since we now have HarfBuzz support for text shaping. >> >> Actually the color display works already. I tested with current master >> (build with cairo) and the emoji display just fine in color. Eli> Maybe in a Cairo build. Or maybe I'm missing something. Iʼm not seeing colour emoji in a -Q Cairo build. Which sequence is this again? Robert