Skip to content

Commit

Permalink
Merge pull request #545 from googlefonts/u14
Browse files Browse the repository at this point in the history
U14
  • Loading branch information
rsheeter authored Sep 9, 2021
2 parents 801cdc0 + 4b0ae18 commit 9660cfc
Show file tree
Hide file tree
Showing 8 changed files with 310 additions and 82 deletions.
19 changes: 6 additions & 13 deletions nototools/unicode_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
from nototools import tool_utils # parse_int_ranges

# Update this when we update the base version data we use
UNICODE_VERSION = 12.0
UNICODE_VERSION = 14.0

_data_is_loaded = False
_property_value_aliases_data = {}
Expand Down Expand Up @@ -940,11 +940,6 @@ def _read_emoji_test_data(data_string):
#
# This data is in the format of emoji-sequences.txt and emoji-zwj-sequences.txt
_LEGACY_ANDROID_SEQUENCES = """
1F91D 1F3FB ; Emoji_Modifier_Sequence; handshake: light skin tone # 9.0
1F91D 1F3FC ; Emoji_Modifier_Sequence; handshake: medium-light skin tone # 9.0
1F91D 1F3FD ; Emoji_Modifier_Sequence; handshake: medium skin tone # 9.0
1F91D 1F3FE ; Emoji_Modifier_Sequence; handshake: medium-dark skin tone # 9.0
1F91D 1F3FF ; Emoji_Modifier_Sequence; handshake: dark skin tone # 9.0
1F93C 1F3FB ; Emoji_Modifier_Sequence ; people wrestling: light skin tone # 9.0
1F93C 1F3FC ; Emoji_Modifier_Sequence ; people wrestling: medium-light skin tone # 9.0
1F93C 1F3FD ; Emoji_Modifier_Sequence ; people wrestling: medium skin tone # 9.0
Expand All @@ -966,12 +961,6 @@ def _read_emoji_test_data(data_string):
# have been nice to merge it into the above legacy data but that would have
# required a format change.
_LEGACY_ANDROID_ORDER = """
-1F91D # handshake
1F91D 1F3FB
1F91D 1F3FC
1F91D 1F3FD
1F91D 1F3FE
1F91D 1F3FF
-1F93C # people wrestling
1F93C 1F3FB
1F93C 1F3FC
Expand Down Expand Up @@ -1205,7 +1194,11 @@ def add_data(data):
if is_default_text_presentation:
seq = (cp, EMOJI_VS)

emoji_age = float(age(cp)) or PROPOSED_EMOJI_AGE
emoji_age = age(cp)
if emoji_age is not None:
emoji_age = float(emoji_age)
emoji_age = PROPOSED_EMOJI_AGE

current_data = _emoji_sequence_data.get(seq) or (
emoji_name,
emoji_age,
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fonttools==4.11.0
fs==2.4.11
lxml==4.6.3
MutatorMath==3.0.1
pathspec==0.8.0
pathspec>=0.9.0
Pillow==8.3.2
psautohint==2.0.1
pyclipper==1.2.1
Expand Down
5 changes: 3 additions & 2 deletions tests/hb_input_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@

from fontTools.agl import AGL2UV
from fontTools.feaLib.builder import addOpenTypeFeaturesFromString
from fontTools.misc import UnicodeIO
from fontTools import mtiLib
from fontTools.pens.ttGlyphPen import TTGlyphPen
from fontTools.ttLib import newTable, TTFont
from fontTools.ttLib.tables._c_m_a_p import cmap_format_4

from io import StringIO

from nototools.hb_input import HbInputGenerator


Expand Down Expand Up @@ -159,7 +160,7 @@ def make_font(feature_source, fea_type="fea"):
if fea_type == "fea":
addOpenTypeFeaturesFromString(font, feature_source)
elif fea_type == "mti":
font["GSUB"] = mtiLib.build(UnicodeIO(feature_source), font)
font["GSUB"] = mtiLib.build(StringIO(feature_source), font)

return font

Expand Down
96 changes: 66 additions & 30 deletions third_party/ucd/emoji-data.txt

Large diffs are not rendered by default.

78 changes: 72 additions & 6 deletions third_party/ucd/emoji-sequences.txt

Large diffs are not rendered by default.

156 changes: 134 additions & 22 deletions third_party/ucd/emoji-test.txt

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions third_party/ucd/emoji-variation-sequences.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# emoji-variation-sequences.txt
# Date: 2020-01-21, 07:15:05 GMT
# © 2020 Unicode®, Inc.
# emoji-variation-sequences-14.0.0.txt
# Date: 2021-06-08, 05:19:16 GMT
# © 2021 Unicode®, Inc.
# Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries.
# For terms of use, see http://www.unicode.org/terms_of_use.html
#
# Emoji Variation Sequences for UTS #51
# Version: 13.0
# Used with Emoji Version 14.0 and subsequent minor revisions (if any)
#
# For documentation and usage, see http://www.unicode.org/reports/tr51
#
Expand Down
28 changes: 24 additions & 4 deletions third_party/ucd/emoji-zwj-sequences.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# emoji-zwj-sequences.txt
# Date: 2020-08-30, 17:14:54 GMT
# © 2020 Unicode®, Inc.
# Date: 2021-06-08, 05:19:16 GMT
# © 2021 Unicode®, Inc.
# Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries.
# For terms of use, see http://www.unicode.org/terms_of_use.html
#
# Emoji ZWJ Sequences for UTS #51
# Version: 13.1
# Version: 14.0
#
# For documentation and usage, see http://www.unicode.org/reports/tr51
#
Expand Down Expand Up @@ -339,8 +339,28 @@
1F9D1 1F3FF 200D 1F91D 200D 1F9D1 1F3FD ; RGI_Emoji_ZWJ_Sequence ; people holding hands: dark skin tone, medium skin tone # E12.0 [1] (🧑🏿‍🤝‍🧑🏽)
1F9D1 1F3FF 200D 1F91D 200D 1F9D1 1F3FE ; RGI_Emoji_ZWJ_Sequence ; people holding hands: dark skin tone, medium-dark skin tone # E12.0 [1] (🧑🏿‍🤝‍🧑🏾)
1F9D1 1F3FF 200D 1F91D 200D 1F9D1 1F3FF ; RGI_Emoji_ZWJ_Sequence ; people holding hands: dark skin tone # E12.0 [1] (🧑🏿‍🤝‍🧑🏿)
1FAF1 1F3FB 200D 1FAF2 1F3FC ; RGI_Emoji_ZWJ_Sequence ; handshake: light skin tone, medium-light skin tone # E14.0 [1] (🫱🏻‍🫲🏼)
1FAF1 1F3FB 200D 1FAF2 1F3FD ; RGI_Emoji_ZWJ_Sequence ; handshake: light skin tone, medium skin tone # E14.0 [1] (🫱🏻‍🫲🏽)
1FAF1 1F3FB 200D 1FAF2 1F3FE ; RGI_Emoji_ZWJ_Sequence ; handshake: light skin tone, medium-dark skin tone # E14.0 [1] (🫱🏻‍🫲🏾)
1FAF1 1F3FB 200D 1FAF2 1F3FF ; RGI_Emoji_ZWJ_Sequence ; handshake: light skin tone, dark skin tone # E14.0 [1] (🫱🏻‍🫲🏿)
1FAF1 1F3FC 200D 1FAF2 1F3FB ; RGI_Emoji_ZWJ_Sequence ; handshake: medium-light skin tone, light skin tone # E14.0 [1] (🫱🏼‍🫲🏻)
1FAF1 1F3FC 200D 1FAF2 1F3FD ; RGI_Emoji_ZWJ_Sequence ; handshake: medium-light skin tone, medium skin tone # E14.0 [1] (🫱🏼‍🫲🏽)
1FAF1 1F3FC 200D 1FAF2 1F3FE ; RGI_Emoji_ZWJ_Sequence ; handshake: medium-light skin tone, medium-dark skin tone # E14.0 [1] (🫱🏼‍🫲🏾)
1FAF1 1F3FC 200D 1FAF2 1F3FF ; RGI_Emoji_ZWJ_Sequence ; handshake: medium-light skin tone, dark skin tone # E14.0 [1] (🫱🏼‍🫲🏿)
1FAF1 1F3FD 200D 1FAF2 1F3FB ; RGI_Emoji_ZWJ_Sequence ; handshake: medium skin tone, light skin tone # E14.0 [1] (🫱🏽‍🫲🏻)
1FAF1 1F3FD 200D 1FAF2 1F3FC ; RGI_Emoji_ZWJ_Sequence ; handshake: medium skin tone, medium-light skin tone # E14.0 [1] (🫱🏽‍🫲🏼)
1FAF1 1F3FD 200D 1FAF2 1F3FE ; RGI_Emoji_ZWJ_Sequence ; handshake: medium skin tone, medium-dark skin tone # E14.0 [1] (🫱🏽‍🫲🏾)
1FAF1 1F3FD 200D 1FAF2 1F3FF ; RGI_Emoji_ZWJ_Sequence ; handshake: medium skin tone, dark skin tone # E14.0 [1] (🫱🏽‍🫲🏿)
1FAF1 1F3FE 200D 1FAF2 1F3FB ; RGI_Emoji_ZWJ_Sequence ; handshake: medium-dark skin tone, light skin tone # E14.0 [1] (🫱🏾‍🫲🏻)
1FAF1 1F3FE 200D 1FAF2 1F3FC ; RGI_Emoji_ZWJ_Sequence ; handshake: medium-dark skin tone, medium-light skin tone # E14.0 [1] (🫱🏾‍🫲🏼)
1FAF1 1F3FE 200D 1FAF2 1F3FD ; RGI_Emoji_ZWJ_Sequence ; handshake: medium-dark skin tone, medium skin tone # E14.0 [1] (🫱🏾‍🫲🏽)
1FAF1 1F3FE 200D 1FAF2 1F3FF ; RGI_Emoji_ZWJ_Sequence ; handshake: medium-dark skin tone, dark skin tone # E14.0 [1] (🫱🏾‍🫲🏿)
1FAF1 1F3FF 200D 1FAF2 1F3FB ; RGI_Emoji_ZWJ_Sequence ; handshake: dark skin tone, light skin tone # E14.0 [1] (🫱🏿‍🫲🏻)
1FAF1 1F3FF 200D 1FAF2 1F3FC ; RGI_Emoji_ZWJ_Sequence ; handshake: dark skin tone, medium-light skin tone # E14.0 [1] (🫱🏿‍🫲🏼)
1FAF1 1F3FF 200D 1FAF2 1F3FD ; RGI_Emoji_ZWJ_Sequence ; handshake: dark skin tone, medium skin tone # E14.0 [1] (🫱🏿‍🫲🏽)
1FAF1 1F3FF 200D 1FAF2 1F3FE ; RGI_Emoji_ZWJ_Sequence ; handshake: dark skin tone, medium-dark skin tone # E14.0 [1] (🫱🏿‍🫲🏾)

# Total elements: 312
# Total elements: 332

# ================================================

Expand Down

0 comments on commit 9660cfc

Please sign in to comment.