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:
parent
191ca0f15b
commit
d8fadec098
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1
test/subset/data/profiles/desubroutinize.txt
Normal file
1
test/subset/data/profiles/desubroutinize.txt
Normal file
@ -0,0 +1 @@
|
||||
--desubroutinize
|
2
test/subset/data/profiles/drop-hints-desubroutinize.txt
Normal file
2
test/subset/data/profiles/drop-hints-desubroutinize.txt
Normal file
@ -0,0 +1,2 @@
|
||||
--no-hinting
|
||||
--desubroutinize
|
@ -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)
|
||||
|
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user