summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authoryirui <yirui@google.com>2016-09-07 14:37:30 +0900
committeryirui <yirui@google.com>2016-09-14 10:30:59 +0900
commitf9936b9b7cade30306d5f17534256e587c172254 (patch)
tree29134457b4cdaa7112ca139304e8892ac8f839f0 /tools
parente9eb001e886632e91d1fe3601f9c4a93fd0e542f (diff)
Fix incorrect emoji presentation for 'Zsym' script
If the language tag "und-Zsym" is applied to a TextView, the default presentation should be text-style. However, it didn't work before this patch, due to a lack of "und-Zsym" language tag in fonts.xml. Bug: 31297127 Change-Id: Ieed8fe1532806dd1e75c58aa0d7a724bfeed7796
Diffstat (limited to 'tools')
-rwxr-xr-xtools/fonts/fontchain_lint.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/fonts/fontchain_lint.py b/tools/fonts/fontchain_lint.py
index 372cb20e0b92..219fa2de7e50 100755
--- a/tools/fonts/fontchain_lint.py
+++ b/tools/fonts/fontchain_lint.py
@@ -314,8 +314,11 @@ def check_emoji_defaults(default_emoji):
continue
# For later fonts, we only check them if they have a script
# defined, since the defined script may get them to a higher
- # score even if they appear after the emoji font.
- if emoji_font_seen and not record.scripts:
+ # score even if they appear after the emoji font. However,
+ # we should skip checking the text symbols font, since
+ # symbol fonts should be able to override the emoji display
+ # style when 'Zsym' is explicitly specified by the user.
+ if emoji_font_seen and (not record.scripts or 'Zsym' in record.scripts):
continue
# Check default emoji-style characters