diff --git a/test/subset/data/expected/full-font/SourceSansPro-Regular.default.1FC,21,41,20,62,63.otf b/test/subset/data/expected/full-font/SourceSansPro-Regular.default.1FC,21,41,20,62,63.otf new file mode 100644 index 000000000..18a9bcc4c Binary files /dev/null and b/test/subset/data/expected/full-font/SourceSansPro-Regular.default.1FC,21,41,20,62,63.otf differ diff --git a/test/subset/data/expected/full-font/SourceSansPro-Regular.default.61,62,63.otf b/test/subset/data/expected/full-font/SourceSansPro-Regular.default.61,62,63.otf new file mode 100644 index 000000000..edd389b41 Binary files /dev/null and b/test/subset/data/expected/full-font/SourceSansPro-Regular.default.61,62,63.otf differ diff --git a/test/subset/data/expected/full-font/SourceSansPro-Regular.default.D7,D8,D9,DA,DE.otf b/test/subset/data/expected/full-font/SourceSansPro-Regular.default.D7,D8,D9,DA,DE.otf new file mode 100644 index 000000000..65fa1daea Binary files /dev/null and b/test/subset/data/expected/full-font/SourceSansPro-Regular.default.D7,D8,D9,DA,DE.otf differ diff --git a/test/subset/data/expected/full-font/SourceSansPro-Regular.drop-hints.1FC,21,41,20,62,63.otf b/test/subset/data/expected/full-font/SourceSansPro-Regular.drop-hints.1FC,21,41,20,62,63.otf new file mode 100644 index 000000000..604e14045 Binary files /dev/null and b/test/subset/data/expected/full-font/SourceSansPro-Regular.drop-hints.1FC,21,41,20,62,63.otf differ diff --git a/test/subset/data/expected/full-font/SourceSansPro-Regular.drop-hints.61,62,63.otf b/test/subset/data/expected/full-font/SourceSansPro-Regular.drop-hints.61,62,63.otf new file mode 100644 index 000000000..a0b2c2f7b Binary files /dev/null and b/test/subset/data/expected/full-font/SourceSansPro-Regular.drop-hints.61,62,63.otf differ diff --git a/test/subset/data/expected/full-font/SourceSansPro-Regular.drop-hints.D7,D8,D9,DA,DE.otf b/test/subset/data/expected/full-font/SourceSansPro-Regular.drop-hints.D7,D8,D9,DA,DE.otf new file mode 100644 index 000000000..805532868 Binary files /dev/null and b/test/subset/data/expected/full-font/SourceSansPro-Regular.drop-hints.D7,D8,D9,DA,DE.otf differ diff --git a/test/subset/data/fonts/SourceSansPro-Regular.otf b/test/subset/data/fonts/SourceSansPro-Regular.otf new file mode 100644 index 000000000..279e6914a Binary files /dev/null and b/test/subset/data/fonts/SourceSansPro-Regular.otf differ diff --git a/test/subset/data/tests/full-font.tests b/test/subset/data/tests/full-font.tests index ff195cead..f422ff577 100644 --- a/test/subset/data/tests/full-font.tests +++ b/test/subset/data/tests/full-font.tests @@ -1,5 +1,6 @@ FONTS: Roboto-Regular.ttf +SourceSansPro-Regular.otf PROFILES: default.txt diff --git a/test/subset/run-tests.py b/test/subset/run-tests.py index bc0d082e2..fb4684cf1 100755 --- a/test/subset/run-tests.py +++ b/test/subset/run-tests.py @@ -62,7 +62,7 @@ def fail_test(test, cli_args, message): return 1 def run_test(test, should_check_ots): - out_file = os.path.join(tempfile.mkdtemp (), test.get_font_name () + '-subset.ttf') + out_file = os.path.join(tempfile.mkdtemp (), test.get_font_name () + '-subset' + test.get_font_extension ()) cli_args = [hb_subset, "--font-file=" + test.font_path, "--output-file=" + out_file, @@ -107,7 +107,7 @@ def run_ttx (file): def strip_check_sum (ttx_string): return re.sub ('checkSumAdjustment value=["]0x([0-9a-fA-F])+["]', 'checkSumAdjustment value="0x00000000"', - ttx_string.decode (), count=1) + ttx_string.decode ("utf-8"), count=1) def has_ots (): if not ots_sanitize: diff --git a/test/subset/subset_test_suite.py b/test/subset/subset_test_suite.py index 35386508e..b9d0f053b 100644 --- a/test/subset/subset_test_suite.py +++ b/test/subset/subset_test_suite.py @@ -28,6 +28,11 @@ class Test: self.unicodes(), font_base_name_parts[1]) + def get_font_extension(self): + font_base_name = os.path.basename(self.font_path) + font_base_name_parts = os.path.splitext(font_base_name) + return font_base_name_parts[1] + # A group of tests to perform on the subsetter. Each test # Identifies a font a subsetting profile, and a subset to be cut. class SubsetTestSuite: