diff options
author | Roozbeh Pournader <roozbeh@google.com> | 2015-01-06 17:25:38 -0800 |
---|---|---|
committer | James Godfrey-Kittle <jamesgk@google.com> | 2015-04-16 12:16:24 -0700 |
commit | 26c0c6588b8bae5df35c9c968d0e088b5cc37ef6 (patch) | |
tree | ed4796f1fa0d5c587a4144554cf6ce794b8715a1 | |
parent | fbed471ea76435347704bd576f9678671777fdfc (diff) |
Test for fsType being 0.
Also remove the code that touched it to be zero, since the value is
fixed in the fonts now.
Fixes issue 29.
-rwxr-xr-x | scripts/run_general_tests.py | 14 | ||||
-rwxr-xr-x | scripts/touchup_for_android.py | 6 |
2 files changed, 13 insertions, 7 deletions
diff --git a/scripts/run_general_tests.py b/scripts/run_general_tests.py index 5ea6de8..f032762 100755 --- a/scripts/run_general_tests.py +++ b/scripts/run_general_tests.py @@ -35,8 +35,8 @@ class TestItalicAngle(unittest.TestCase): self.assertEqual(post_table.italicAngle, expected_angle) -class TestHeadTable(unittest.TestCase): - """Test various things in the head table.""" +class TestMetaInfo(unittest.TestCase): + """Test various meta information.""" def setUp(self): _, self.fonts = load_fonts() @@ -53,6 +53,16 @@ class TestHeadTable(unittest.TestCase): expected_mac_style = (italic << 1) | bold self.assertEqual(font['head'].macStyle, expected_mac_style) + def test_fs_type(self): + """Tests the fsType of the fonts to be 0. + + fsType of 0 marks the font free for installation, embedding, etc. + + Bug: https://code.google.com/a/google.com/p/roboto/issues/detail?id=29 + """ + for font in self.fonts: + self.assertEqual(font['OS/2'].fsType, 0) + class TestDigitWidths(unittest.TestCase): """Tests the width of digits.""" diff --git a/scripts/touchup_for_android.py b/scripts/touchup_for_android.py index 870c4ff..7c1a5d3 100755 --- a/scripts/touchup_for_android.py +++ b/scripts/touchup_for_android.py @@ -99,13 +99,9 @@ def fix_ccmp_lookup(font): def apply_temporary_fixes(font): """Apply some temporary fixes. """ - # Mark the font free for installation, embedding, etc. - # https://code.google.com/a/google.com/p/roboto/issues/detail?id=29 - os2 = font['OS/2'] - os2.fsType = 0 - # Set the font vendor to Google # https://code.google.com/a/google.com/p/roboto/issues/detail?id=46 + os2 = font['OS/2'] os2.achVendID = 'GOOG' # Drop the lookup forming the ff ligature |