提交 bf4eb2e4 编写于 作者: M Michiharu Ariza

Added SourceSansPro-Regular along as CFF full-font test case

derived "expected" subset fonts from fonttools then manually tweaked further so they resemble hb-subset output
上级 e75e7224
FONTS:
Roboto-Regular.ttf
SourceSansPro-Regular.otf
PROFILES:
default.txt
......
......@@ -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:
......
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册