[varLib.mutator] Move test for interpolating CFF2 tables
from varLib_test.py to mutator_test.py
This commit is contained in:
parent
617b8c6396
commit
bde62cd653
@ -3,6 +3,7 @@ from fontTools.misc.py23 import *
|
||||
from fontTools.ttLib import TTFont
|
||||
from fontTools.varLib import build
|
||||
from fontTools.varLib.mutator import main as mutator
|
||||
from fontTools.varLib.mutator import instantiateVariableFont as make_instance
|
||||
import difflib
|
||||
import os
|
||||
import shutil
|
||||
@ -160,6 +161,18 @@ class MutatorTest(unittest.TestCase):
|
||||
expected_ttx_path = self.get_test_output(varfont_name + '-instance.ttx')
|
||||
self.expect_ttx(instfont, expected_ttx_path, tables)
|
||||
|
||||
def test_varlib_mutator_CFF2(self):
|
||||
|
||||
otf_vf_path = self.get_test_input('TestCFF2VF.otf')
|
||||
expected_ttx_name = 'InterpolateTestCFF2VF'
|
||||
tables = ["fvar", "CFF2"]
|
||||
loc = {'wght':float(200)}
|
||||
|
||||
varfont = TTFont(otf_vf_path)
|
||||
new_font = make_instance(varfont, loc)
|
||||
expected_ttx_path = self.get_test_output(expected_ttx_name + '.ttx')
|
||||
self.expect_ttx(new_font, expected_ttx_path, tables)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(unittest.main())
|
||||
|
@ -3,7 +3,6 @@ from fontTools.misc.py23 import *
|
||||
from fontTools.ttLib import TTFont
|
||||
from fontTools.varLib import build
|
||||
from fontTools.varLib import main as varLib_main
|
||||
from fontTools.varLib.mutator import instantiateVariableFont as snapshot
|
||||
from fontTools.designspaceLib import DesignSpaceDocumentError
|
||||
import difflib
|
||||
import os
|
||||
@ -205,18 +204,6 @@ class BuildTest(unittest.TestCase):
|
||||
save_before_dump=True,
|
||||
)
|
||||
|
||||
def test_varlib_interpolate_CFF2(self):
|
||||
|
||||
otf_vf_path = self.get_test_input('TestCFF2VF.otf')
|
||||
expected_ttx_name = 'InterpolateTestCFF2VF'
|
||||
tables = ["fvar", "CFF2"]
|
||||
loc = {'wght':float(200)}
|
||||
|
||||
varfont = TTFont(otf_vf_path)
|
||||
new_font = snapshot(varfont, loc)
|
||||
expected_ttx_path = self.get_test_output(expected_ttx_name + '.ttx')
|
||||
self.expect_ttx(new_font, expected_ttx_path, tables)
|
||||
|
||||
def test_varlib_main_ttf(self):
|
||||
"""Mostly for testing varLib.main()
|
||||
"""
|
||||
|
Loading…
x
Reference in New Issue
Block a user