diff options
author | James Godfrey-Kittle <jamesgk@google.com> | 2015-09-29 17:57:37 -0700 |
---|---|---|
committer | James Godfrey-Kittle <jamesgk@google.com> | 2015-09-29 17:59:14 -0700 |
commit | 24632ad9ef96131a86b5a099f2eb59888df1cc5f (patch) | |
tree | 1a15d8d671bfeadadc242b84d3c307c0ae10524a /scripts/run_web_tests.py | |
parent | 26990b6f5a8170656a0064e49b2c9b7a4f9b8d54 (diff) |
Generalize and move vertical metrics tests
Diffstat (limited to 'scripts/run_web_tests.py')
-rwxr-xr-x | scripts/run_web_tests.py | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/scripts/run_web_tests.py b/scripts/run_web_tests.py index c6e0aa3..1c88537 100755 --- a/scripts/run_web_tests.py +++ b/scripts/run_web_tests.py @@ -66,15 +66,18 @@ class TestCharacterCoverage(common_tests.TestCharacterCoverage): class TestVerticalMetrics(common_tests.TestVerticalMetrics): loaded_fonts = FONTS - def test_os2_metrics(self): - """Tests OS/2 vertical metrics to be equal to the old values.""" - for font in self.fonts: - os2_table = font['OS/2'] - self.assertEqual(os2_table.sTypoDescender, -512) - self.assertEqual(os2_table.sTypoAscender, 1536) - self.assertEqual(os2_table.sTypoLineGap, 102) - self.assertEqual(os2_table.usWinDescent, 512) - self.assertEqual(os2_table.usWinAscent, 1946) + expected_head_yMin = -555 + expected_head_yMax = 2163 + + expected_hhea_descent = -500 + expected_hhea_ascent = 1900 + expected_hhea_lineGap = 0 + + expected_os2_sTypoDescender = -512 + expected_os2_sTypoAscender = 1536 + expected_os2_sTypoLineGap = 102 + expected_os2_usWinDescent = 512 + expected_os2_usWinAscent = 1946 class TestLigatures(common_tests.TestLigatures): @@ -115,4 +118,3 @@ class TestHints(unittest.TestCase): if __name__ == '__main__': unittest.main() - |