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 0000000000000000000000000000000000000000..18a9bcc4ca74c7ebbd7a146d3f7036c7f9afa2b7 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 0000000000000000000000000000000000000000..edd389b41de72da8b3e4cbeb6e399f7c679c0f24 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 0000000000000000000000000000000000000000..65fa1daea7088efd9f7b2ac972fdc63b21037492 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 0000000000000000000000000000000000000000..604e14045765c95402808c010571b62f017c414f 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 0000000000000000000000000000000000000000..a0b2c2f7b0ede852d1302752a1c5b9d6b4cc4717 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 0000000000000000000000000000000000000000..805532868799ece5ed8a5e11557045b85a28d3de 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 0000000000000000000000000000000000000000..279e6914a6fa7fe0dfa06c2563b8b6842ac95c97 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 ff195cead90ab74a461e0b4757aca5ac98e6b134..f422ff5775a2ebe9167a9920f79074c8d49722a8 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 bc0d082e2d8f0178b629512d946e7336b08ca478..fb4684cf1533e0e5544739d51eaea3a82eac7a72 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 35386508ea0cf9fea202e669938645cd14dc1f02..b9d0f053bb64d405182b699eb935e541daf0b088 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: