summaryrefslogtreecommitdiff
path: root/scripts/touchup_for_android.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/touchup_for_android.py')
-rwxr-xr-xscripts/touchup_for_android.py18
1 files changed, 13 insertions, 5 deletions
diff --git a/scripts/touchup_for_android.py b/scripts/touchup_for_android.py
index 7c1a5d3..8019852 100755
--- a/scripts/touchup_for_android.py
+++ b/scripts/touchup_for_android.py
@@ -10,6 +10,8 @@ from fontTools import ttLib
from nototools import font_data
from nototools import unicode_data
+import temporary_touchups
+
def drop_lookup(table, lookup_number):
"""Drop a lookup from an OpenType table by number.
@@ -149,13 +151,19 @@ def apply_android_specific_fixes(font):
hhea.descent = -500
hhea.lineGap = 0
- # Remove tab, combining keycap, the arrows, and unassigned characters
- # from the cmap table
+ # Remove tab, combining keycap, and the arrows from the cmap table.
+ #
+ # Arrows are removed to maximize consistency of arrows, since the rest
+ # of the arrows come from Noto Symbols.
+ #
+ # And here are the bugs for the other two issues:
# https://code.google.com/a/google.com/p/roboto/issues/detail?id=51
# https://code.google.com/a/google.com/p/roboto/issues/detail?id=52
- # https://code.google.com/a/google.com/p/roboto/issues/detail?id=53
font_data.delete_from_cmap(font, [
- 0x0009, 0x20E3, 0x2072, 0x2073, 0x208F, 0x2191, 0x2193])
+ 0x0009, # tab
+ 0x20E3, # combining keycap
+ 0x2191, 0x2193, # vertical arrows
+ ])
# Drop tables not useful on Android
for table in ['LTSH', 'hdmx', 'VDMX', 'gasp']:
@@ -166,7 +174,7 @@ def apply_android_specific_fixes(font):
def correct_font(source_font_name, target_font_name):
"""Corrects metrics and other meta information."""
font = ttLib.TTFont(source_font_name)
- apply_temporary_fixes(font)
+ temporary_touchups.apply_temporary_fixes(font)
apply_android_specific_fixes(font)
font.save(target_font_name)