diff --git a/Tests/subset/data/BungeeColor-Regular.ttx b/Tests/subset/data/BungeeColor-Regular.ttx new file mode 100644 index 000000000..d14c89224 --- /dev/null +++ b/Tests/subset/data/BungeeColor-Regular.ttx @@ -0,0 +1,438 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Copyright 2008 The Bungee Project Authors (david@djr.com) + + + Bungee Color Regular + + + Regular + + + 1.000;djr ;BungeeColor-Regular + + + Bungee Color Regular Regular + + + Version 1.000;PS 1.0;hotconv 1.0.72;makeotf.lib2.5.5900 + + + BungeeColor-Regular + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/subset/subset_test.py b/Tests/subset/subset_test.py index d8f4dac0c..d1afb296f 100644 --- a/Tests/subset/subset_test.py +++ b/Tests/subset/subset_test.py @@ -1352,5 +1352,26 @@ def test_subset_svg_missing_lxml(ttf_path): subset.main([str(ttf_path), "--gids=0,1"]) +def test_subset_COLR_glyph_closure(tmp_path): + font = TTFont() + ttx = pathlib.Path(__file__).parent / "data" / "BungeeColor-Regular.ttx" + font.importXML(ttx) + font_path = tmp_path / "BungeeColor-Regular.ttf" + subset_path = font_path.with_suffix(".subset.ttf)") + font.save(font_path) + + subset.main( + [ + str(font_path), + "--glyph-names", + f"--output-file={subset_path}", + "--glyphs=Agrave", + ] + ) + subset_font = TTFont(subset_path) + # TODO + + + if __name__ == "__main__": sys.exit(unittest.main())