[instance] add tests for full instancing

Also update previous tests with GDEF/GPOS tables
pull/3795/head
Qunxin Liu 3 years ago
parent 8f84c58a34
commit 88c02e0024
  1. BIN
      test/subset/data/expected/full-font/SourceSerifVariable-Roman.drop-hints.1FC,21,41,20,62,63.ttf
  2. BIN
      test/subset/data/expected/full_instance/Roboto-Variable.default.retain-all-codepoint.wght=150,wdth=80.ttf
  3. BIN
      test/subset/data/expected/full_instance/Roboto-Variable.default.retain-all-codepoint.wght=300,wdth=90.ttf
  4. BIN
      test/subset/data/expected/instantiate_glyf/Roboto-Variable.ABC.default.retain-all-codepoint.wght=200,wdth=90.ttf
  5. BIN
      test/subset/data/expected/instantiate_glyf/Roboto-Variable.ABC.default.retain-all-codepoint.wght=650,wdth=85.ttf
  6. BIN
      test/subset/data/expected/instantiate_glyf/Roboto-Variable.composite.default.retain-all-codepoint.wght=200,wdth=90.ttf
  7. BIN
      test/subset/data/expected/instantiate_glyf/Roboto-Variable.composite.default.retain-all-codepoint.wght=650,wdth=85.ttf
  8. BIN
      test/subset/data/expected/pin_all_at_default/Roboto-Variable.ABC.default.retain-all-codepoint.wght=400,wdth=100.0.ttf
  9. BIN
      test/subset/data/expected/pin_all_at_default/Roboto-Variable.ABC.default.retain-all-codepoint.wght=drop,wdth=100.ttf
  10. 12
      test/subset/data/tests/full_instance.tests
  11. 7
      test/subset/generate-expected-outputs.py
  12. 1
      test/subset/meson.build
  13. 3
      test/subset/run-tests.py

@ -0,0 +1,12 @@
FONTS:
Roboto-Variable.ttf
PROFILES:
default.txt
SUBSETS:
*
INSTANCES:
wght=150,wdth=80
wght=300,wdth=90

@ -34,9 +34,6 @@ def generate_expected_output(input_file, unicodes, profile_flags, instance_flags
"--drop-tables-=sbix",
"--unicodes=%s" % unicodes,
"--output-file=%s" % fonttools_path])
#TODO: remove the drop later as instancing support is added to GPOS/GDEF.
if instance_flags:
args.extend(["--drop-tables+=GPOS,GDEF"])
args.extend(profile_flags)
check_call(args)
@ -66,10 +63,8 @@ def generate_expected_output(input_file, unicodes, profile_flags, instance_flags
"--drop-tables+=DSIG",
"--drop-tables-=sbix"]
args.extend(profile_flags)
#TODO: remove the drop later as instancing support is added to GPOS/GDEF.
if instance_flags:
args.extend(["--drop-tables+=GDEF,GPOS",
"--instance=%s" % ','.join(instance_flags)])
args.extend(["--instance=%s" % ','.join(instance_flags)])
check_call(args)
with io.StringIO () as fp:

@ -53,6 +53,7 @@ tests = [
# instacing tests, enable when --instance is not experimental
# 'pin_all_at_default',
# 'instantiate_glyf',
# 'full_instance',
]
repack_tests = [

@ -56,8 +56,7 @@ def run_test (test, should_check_ots):
"--drop-tables-=sbix"]
cli_args.extend (test.get_profile_flags ())
if test.get_instance_flags ():
cli_args.extend (["--drop-tables+=GPOS,GDEF",
"--instance=%s" % ','.join(test.get_instance_flags ())])
cli_args.extend (["--instance=%s" % ','.join(test.get_instance_flags ())])
ret = subset_cmd (cli_args)
if ret != "success":

Loading…
Cancel
Save