summaryrefslogtreecommitdiff
path: root/scripts/run_general_tests.py
diff options
context:
space:
mode:
authorRoozbeh Pournader <roozbeh@google.com>2015-01-06 15:16:41 -0800
committerJames Godfrey-Kittle <jamesgk@google.com>2015-04-16 12:16:24 -0700
commitfbed471ea76435347704bd576f9678671777fdfc (patch)
treede2e9cf619677db1205d0054bc1059f9e6ef928c /scripts/run_general_tests.py
parentca2779be9e95b7abe2e7fea7815f035c6f567bcc (diff)
Remove fix for macStyle from touchup_for_android.py.
And since the bug (issue 8) is fixed in the generated fonts now, add test for macStyle to run_general_test.py.
Diffstat (limited to 'scripts/run_general_tests.py')
-rwxr-xr-xscripts/run_general_tests.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/run_general_tests.py b/scripts/run_general_tests.py
index f160f15..5ea6de8 100755
--- a/scripts/run_general_tests.py
+++ b/scripts/run_general_tests.py
@@ -35,6 +35,25 @@ class TestItalicAngle(unittest.TestCase):
self.assertEqual(post_table.italicAngle, expected_angle)
+class TestHeadTable(unittest.TestCase):
+ """Test various things in the head table."""
+
+ def setUp(self):
+ _, self.fonts = load_fonts()
+
+ def test_mac_style(self):
+ """Tests the macStyle of the fonts to be correct.
+
+ Bug: https://code.google.com/a/google.com/p/roboto/issues/detail?id=8
+ """
+ for font in self.fonts:
+ font_name = font_data.font_name(font)
+ bold = ('Bold' in font_name) or ('Black' in font_name)
+ italic = 'Italic' in font_name
+ expected_mac_style = (italic << 1) | bold
+ self.assertEqual(font['head'].macStyle, expected_mac_style)
+
+
class TestDigitWidths(unittest.TestCase):
"""Tests the width of digits."""