summaryrefslogtreecommitdiff
path: root/scripts/run_web_tests.py
diff options
context:
space:
mode:
authorRoozbeh Pournader <roozbeh@google.com>2015-01-13 09:28:45 -0800
committerJames Godfrey-Kittle <jamesgk@google.com>2015-04-16 12:16:25 -0700
commit29257870e8eb50be42c0e36f70c88817c0a9ce50 (patch)
treebced17bcc48da24ec62ebef66de230f0c2c32d86 /scripts/run_web_tests.py
parent36623f13d922461c897fe0ae1ff550a073385329 (diff)
Add tests for the bad hinting of lowercase 'o'.
Diffstat (limited to 'scripts/run_web_tests.py')
-rwxr-xr-xscripts/run_web_tests.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/scripts/run_web_tests.py b/scripts/run_web_tests.py
index 6b6adf9..fbeee0a 100755
--- a/scripts/run_web_tests.py
+++ b/scripts/run_web_tests.py
@@ -72,7 +72,7 @@ class TestHints(unittest.TestCase):
"""Tests hints."""
def setUp(self):
- _, self.fonts = FONTS
+ self.fontfiles, self.fonts = FONTS
def test_existance_of_hints(self):
"""Tests all glyphs and makes sure non-composite ones have hints."""
@@ -89,6 +89,16 @@ class TestHints(unittest.TestCase):
self.assertTrue(missing_hints == [])
+ def test_height_of_lowercase_o(self):
+ """Tests the height of the lowercase o in low resolutions."""
+ for fontfile in self.fontfiles:
+ for size in range(8, 30): # Kind of arbitrary
+ o_height = common_tests.get_rendered_char_height(
+ fontfile, size, 'o')
+ n_height = common_tests.get_rendered_char_height(
+ fontfile, size, 'n')
+ self.assertEqual(o_height, n_height)
+
if __name__ == '__main__':
unittest.main()