| |
@@ -1,5 +1,17 @@
|
| |
+ From e158cbe50e17dad1bd41c641d01f3c3989c083c6 Mon Sep 17 00:00:00 2001
|
| |
+ From: Mike FABIAN <maiku.fabian@gmail.com>
|
| |
+ Date: Wed, 17 Jul 2019 10:33:21 +0200
|
| |
+ Subject: [PATCH 1/2] Make it work both with Python2 and Python3
|
| |
+
|
| |
+ ---
|
| |
+ add_glyphs.py | 8 +--
|
| |
+ map_pua_emoji.py | 4 +-
|
| |
+ third_party/color_emoji/emoji_builder.py | 63 ++++++++++++++----------
|
| |
+ third_party/color_emoji/png.py | 42 +++++++++++-----
|
| |
+ 4 files changed, 73 insertions(+), 44 deletions(-)
|
| |
+
|
| |
diff --git a/add_glyphs.py b/add_glyphs.py
|
| |
- index 7ff47c9..c4883a3 100644
|
| |
+ index a12b4401..b5918d42 100644
|
| |
--- a/add_glyphs.py
|
| |
+++ b/add_glyphs.py
|
| |
@@ -66,7 +66,7 @@ def collect_seq_to_file(image_dirs, prefix, suffix):
|
| |
@@ -11,16 +23,7 @@
|
| |
|
| |
|
| |
def get_png_file_to_advance_mapper(lineheight):
|
| |
- @@ -228,7 +228,7 @@ def get_rtl_seq(seq):
|
| |
-
|
| |
- rev_seq = list(seq)
|
| |
- rev_seq.reverse()
|
| |
- - for i in xrange(1, len(rev_seq)):
|
| |
- + for i in range(1, len(rev_seq)):
|
| |
- if is_fitzpatrick(rev_seq[i-1]):
|
| |
- tmp = rev_seq[i]
|
| |
- rev_seq[i] = rev_seq[i-1]
|
| |
- @@ -282,7 +282,7 @@ def add_ligature_sequences(font, seqs, aliases):
|
| |
+ @@ -280,7 +280,7 @@ def add_ligature_sequences(font, seqs, aliases):
|
| |
return
|
| |
|
| |
rtl_seq_to_target_name = {
|
| |
@@ -29,7 +32,7 @@
|
| |
seq_to_target_name.update(rtl_seq_to_target_name)
|
| |
# sequences that don't have rtl variants get mapped to the empty sequence,
|
| |
# delete it.
|
| |
- @@ -291,7 +291,7 @@ def add_ligature_sequences(font, seqs, aliases):
|
| |
+ @@ -289,7 +289,7 @@ def add_ligature_sequences(font, seqs, aliases):
|
| |
|
| |
# organize by first codepoint in sequence
|
| |
keyed_ligatures = collections.defaultdict(list)
|
| |
@@ -38,7 +41,7 @@
|
| |
first_cp = t[0][0]
|
| |
keyed_ligatures[first_cp].append(t)
|
| |
|
| |
- @@ -341,7 +341,7 @@ def apply_aliases(seq_dict, aliases):
|
| |
+ @@ -339,7 +339,7 @@ def apply_aliases(seq_dict, aliases):
|
| |
source is a key in the dictionary, we can delete it. This updates the
|
| |
dictionary and returns the usable aliases."""
|
| |
usable_aliases = {}
|
| |
@@ -48,7 +51,7 @@
|
| |
usable_aliases[k] = v
|
| |
if k in seq_dict:
|
| |
diff --git a/map_pua_emoji.py b/map_pua_emoji.py
|
| |
- index f2b9be9..866670a 100644
|
| |
+ index aac031c5..ff8d6a9b 100644
|
| |
--- a/map_pua_emoji.py
|
| |
+++ b/map_pua_emoji.py
|
| |
@@ -53,8 +53,8 @@ def add_pua_cmap(source_file, target_file):
|
| |
@@ -63,7 +66,7 @@
|
| |
glyph_name = get_glyph_name_from_gsub([ch1, ch2], font)
|
| |
if glyph_name is not None:
|
| |
diff --git a/third_party/color_emoji/emoji_builder.py b/third_party/color_emoji/emoji_builder.py
|
| |
- index 4157807..7f17c62 100644
|
| |
+ index 4157807e..7f17c62f 100644
|
| |
--- a/third_party/color_emoji/emoji_builder.py
|
| |
+++ b/third_party/color_emoji/emoji_builder.py
|
| |
@@ -19,7 +19,7 @@
|
| |
@@ -206,7 +209,7 @@
|
| |
print("Output font '%s' generated." % out_file)
|
| |
|
| |
diff --git a/third_party/color_emoji/png.py b/third_party/color_emoji/png.py
|
| |
- index 20f849a..f5d4c2d 100644
|
| |
+ index 20f849ae..f5d4c2d5 100644
|
| |
--- a/third_party/color_emoji/png.py
|
| |
+++ b/third_party/color_emoji/png.py
|
| |
@@ -17,7 +17,12 @@
|
| |