emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 6738111 4/6: Generate skin tone compositions from emoji-sequences


From: Robert Pluim
Subject: master 6738111 4/6: Generate skin tone compositions from emoji-sequences.txt
Date: Fri, 24 Sep 2021 07:40:34 -0400 (EDT)

branch: master
commit 6738111ae2baa45f1eb53e0d208f49855af128d6
Author: Robert Pluim <rpluim@gmail.com>
Commit: Robert Pluim <rpluim@gmail.com>

    Generate skin tone compositions from emoji-sequences.txt
    
    Read skin tone modifier sequences from emoji-sequences.txt and add
    them to the per-character composition rules derived from
    emoji-zwj-sequences.txt, rather than adding them as lookback rules for
    the skin tone modifiers.  This avoids an issue with the application of
    such lookback rules.  See Bug#39799,
    specifically
    <https://lists.gnu.org/archive/html/bug-gnu-emacs/2021-09/msg01878.html>
    for more details.
    
    * admin/unidata/Makefile.in (zwj): Add emoji-sequences.txt as a dependency.
    * admin/unidata/emoji-zwj.awk: Match RGI_Emoji_ZWJ_Sequence and
    RGI_Emoji_Modifier_Sequence.  Remove manual addition of skin tone
    composition rules with lookback.
---
 admin/unidata/Makefile.in   |  4 ++--
 admin/unidata/emoji-zwj.awk | 14 +++-----------
 2 files changed, 5 insertions(+), 13 deletions(-)

diff --git a/admin/unidata/Makefile.in b/admin/unidata/Makefile.in
index a2a2e42..a953044 100644
--- a/admin/unidata/Makefile.in
+++ b/admin/unidata/Makefile.in
@@ -91,8 +91,8 @@ emoji-zwj.el: ${unidir}/emoji-zwj.el
 
 zwj = ${srcdir}/emoji-zwj.awk
 
-${unidir}/emoji-zwj.el: ${srcdir}/emoji-zwj-sequences.txt ${zwj}
-       $(AM_V_GEN)$(AWK) -f ${zwj} < $< > $@
+${unidir}/emoji-zwj.el: ${srcdir}/emoji-zwj-sequences.txt 
$(srcdir)/emoji-sequences.txt ${zwj}
+       $(AM_V_GEN)$(AWK) -f ${zwj} $^ > $@
 
 .PHONY: clean bootstrap-clean distclean maintainer-clean gen-clean
 
diff --git a/admin/unidata/emoji-zwj.awk b/admin/unidata/emoji-zwj.awk
index bdc50f5..5aca157 100644
--- a/admin/unidata/emoji-zwj.awk
+++ b/admin/unidata/emoji-zwj.awk
@@ -39,7 +39,7 @@
 
 ### Code:
 
-/^[0-9A-F]/ {
+/^[0-9A-F].*; RGI_Emoji_(ZWJ|Modifier)_Sequence/ {
     sub(/ *;.*/, "", $0)
     num = split($0, elts)
     if (ch[elts[1]] == "")
@@ -62,7 +62,7 @@
 
 END {
      print ";;; emoji-zwj.el --- emoji zwj character composition table  -*- 
lexical-binding:t -*-"
-     print ";;; Automatically generated from 
admin/unidata/emoji-zwj-sequences.txt"
+     print ";;; Automatically generated from 
admin/unidata/emoji-{zwj-,}sequences.txt"
      print "(eval-when-compile (require 'regexp-opt))"
      print "(dolist (elt `("
 
@@ -78,7 +78,7 @@ END {
      print "                                             0"
      print "                                             
'compose-gstring-for-graphic)))))"
 
-     print ";; The following three blocks are derived by hand from 
emoji-sequences.txt"
+     print ";; The following two blocks are derived by hand from 
emoji-sequences.txt"
      print ";; FIXME: add support for Emoji_Keycap_Sequence once we learn how 
to respect FE0F/VS-16"
      print ";; for ASCII characters."
 
@@ -98,14 +98,6 @@ END {
      print "                                           0"
      print "                                    
'compose-gstring-for-graphic))))"
 
-     print ";; Skin tones"
-     print "(set-char-table-range composition-function-table"
-     print "                      '(#x1F3FB . #x1F3FF)"
-     print "                      (nconc (char-table-range 
composition-function-table '(#x1F3FB . #x1F3FF))"
-     print "                             (list (vector 
\".[\\U0001F3FB-\\U0001F3FF]\""
-     print "                                           1"
-     print "                                    
'compose-gstring-for-graphic))))"
-
      print "\n"
      print "(provide 'emoji-zwj)"
 }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]