Skip to content
Snippets Groups Projects
Commit f9936b9b authored by yirui's avatar yirui
Browse files

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
parent e9eb001e
No related branches found
No related tags found
No related merge requests found
......@@ -350,7 +350,7 @@
<family lang="und-Zsye">
<font weight="400" style="normal">NotoColorEmoji.ttf</font>
</family>
<family>
<family lang="und-Zsym">
<font weight="400" style="normal">NotoSansSymbols-Regular-Subsetted2.ttf</font>
</family>
<family>
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment