summaryrefslogtreecommitdiff
path: root/scripts/temporary_touchups.py
diff options
context:
space:
mode:
authorRoozbeh Pournader <roozbeh@google.com>2015-01-06 23:05:29 -0800
committerJames Godfrey-Kittle <jamesgk@google.com>2015-04-16 12:16:24 -0700
commit3c963abcf66d44c1587376e7d245b889ae62401a (patch)
tree3c37ad64eda098c72e88e28fabda64b4968659a2 /scripts/temporary_touchups.py
parent26c0c6588b8bae5df35c9c968d0e088b5cc37ef6 (diff)
Update Android touchup and test tools for latest delivery.
Touchup: - Shared touchups between Android and web are moved to a new module - OS/2.usWeightClass is fixed to match the font name - Unassigned characters are no longer explicitly dropped Testing: - Rhotic hook is skipped when checking that spacing marks don't form ligatures - OS/2.usWeightClass is tested to be set correctly
Diffstat (limited to 'scripts/temporary_touchups.py')
-rw-r--r--scripts/temporary_touchups.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/temporary_touchups.py b/scripts/temporary_touchups.py
new file mode 100644
index 0000000..1891bc2
--- /dev/null
+++ b/scripts/temporary_touchups.py
@@ -0,0 +1,14 @@
+#!/usr/bin/python
+"""Temporary post-build changes for Roboto."""
+
+from nototools import font_data
+
+import roboto_data
+
+def apply_temporary_fixes(font):
+ """Apply some temporary fixes."""
+ # Fix usWeight:
+ font_name = font_data.font_name(font)
+ weight = roboto_data.extract_weight_name(font_name)
+ weight_number = roboto_data.WEIGHTS[weight]
+ font['OS/2'].usWeightClass = weight_number