added desubroutinize full font test profiles & expected fonts

modified subset_test_suite.py to apply desubroutinize profiles to CFF only (not to TT)
This commit is contained in:
Michiharu Ariza 2018-11-04 13:12:20 -08:00
parent 191ca0f15b
commit d8fadec098
38 changed files with 9 additions and 2 deletions

View File

@ -0,0 +1 @@
--desubroutinize

View File

@ -0,0 +1,2 @@
--no-hinting
--desubroutinize

View File

@ -23,7 +23,6 @@ def generate_expected_output(input_file, unicodes, profile_flags, output_path):
"--name-languages=*",
"--name-legacy",
"--drop-tables+=DSIG,GPOS,GSUB,GDEF",
"--desubroutinize",
"--unicodes=%s" % unicodes,
"--output-file=%s" % output_path])
check_call(args)

View File

@ -33,6 +33,9 @@ class Test:
font_base_name_parts = os.path.splitext(font_base_name)
return font_base_name_parts[1]
def applicable(self):
return self.profile_path.find("desubroutinize") < 0 or self.get_font_extension() == "otf"
# 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:
@ -62,7 +65,9 @@ class SubsetTestSuite:
for profile in self.profiles:
profile = os.path.join(self._base_path(), "profiles", profile)
for subset in self.subsets:
yield Test(font, profile, subset)
test = Test(font, profile, subset)
if test.applicable():
yield test
def _base_path(self):
return os.path.dirname(os.path.dirname(self.test_path))