diff --git a/Tests/subset/data/test_cntrmask_CFF.desub.ttx b/Tests/subset/data/test_cntrmask_CFF.desub.ttx
new file mode 100644
index 000000000..ff1c8c594
--- /dev/null
+++ b/Tests/subset/data/test_cntrmask_CFF.desub.ttx
@@ -0,0 +1,70 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -95 endchar
+
+
+ -298 -2 33 583 33 62 96 hstem
+ 6 96 4 85 4 96 vstem
+ cntrmask 00011100
+ 191 122 rmoveto
+ 401 vlineto
+ 0 83 17 5 70 3 6 6 0 21 -6 6 -44 -1 -47.5 -1 -38.5 0 -33.5 0 -48.5 1 -47 1 -6 -6 0 -21 6 -6 70 -3 17 -5 0 -83 rrcurveto
+ -401 vlineto
+ 0 -83 -17 -5 -70 -3 -6 -6 0 -21 6 -6 45 1 48.7002 1 36.2998 0 35.59961 0 48.40039 -1 45 -1 6 6 0 21 -6 6 -70 3 -17 5 0 83 rrcurveto
+ 4 635 rmoveto
+ -26 22 -22 26 26 22 22 26 26 -22 22 -26 -26 -22 -22 -26 vhcurveto
+ -189 hmoveto
+ -26 22 -22 26 26 22 22 26 26 -22 22 -26 -26 -22 -22 -26 vhcurveto
+ endchar
+
+
+
+
+
+
+
+
+
+
diff --git a/Tests/subset/data/test_cntrmask_CFF.ttx b/Tests/subset/data/test_cntrmask_CFF.ttx
new file mode 100644
index 000000000..5ab6268f6
--- /dev/null
+++ b/Tests/subset/data/test_cntrmask_CFF.ttx
@@ -0,0 +1,417 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Copyright © 2012-2019 The Libertinus Project Authors.
+
+
+ Libertinus Serif
+
+
+ Regular
+
+
+ 6.8;ALIF;LibertinusSerif-Regular
+
+
+ Libertinus Serif Regular
+
+
+ Version 6.8
+
+
+ LibertinusSerif-Regular
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -26 22 -22 26 26 22 22 26 26 -22 22 -26 -26 -22 -22 -26 vhcurveto
+ return
+
+
+ 401 vlineto
+ 0 83 17 5 70 3 6 6 0 21 -6 6 -44 -1 -47.5 -1 -38.5 0 -33.5 0 -48.5 1 -47 1 -6 -6 0 -21 6 -6 70 -3 17 -5 0 -83 rrcurveto
+ -401 vlineto
+ 0 -83 -17 -5 -70 -3 -6 -6 0 -21 6 -6 45 1 48.7002 1 36.2998 0 35.59961 0 48.40039 -1 45 -1 6 6 0 21 -6 6 -70 3 -17 5 0 83 rrcurveto
+ return
+
+
+
+
+
+ -95 endchar
+
+
+ -298 -2 33 583 33 62 96 hstem
+ 6 96 4 85 4 96 vstem
+ cntrmask 00011100
+ 191 122 rmoveto
+ -106 callsubr
+ 4 635 rmoveto
+ -107 callsubr
+ -189 hmoveto
+ -107 callsubr
+ endchar
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Tests/subset/subset_test.py b/Tests/subset/subset_test.py
index a269faccb..4a18358e3 100644
--- a/Tests/subset/subset_test.py
+++ b/Tests/subset/subset_test.py
@@ -426,6 +426,16 @@ class SubsetTest(unittest.TestCase):
self.expect_ttx(subsetfont, self.getpath(
"test_hinted_subrs_CFF.desub.ttx"), ["CFF "])
+ def test_desubroutinize_cntrmask_CFF(self):
+ ttxpath = self.getpath("test_cntrmask_CFF.ttx")
+ _, fontpath = self.compile_font(ttxpath, ".otf")
+ subsetpath = self.temp_path(".otf")
+ subset.main([fontpath, "--desubroutinize", "--notdef-outline",
+ "--output-file=%s" % subsetpath, "*"])
+ subsetfont = TTFont(subsetpath)
+ self.expect_ttx(subsetfont, self.getpath(
+ "test_cntrmask_CFF.desub.ttx"), ["CFF "])
+
def test_no_hinting_desubroutinize_CFF(self):
ttxpath = self.getpath("test_hinted_subrs_CFF.ttx")
_, fontpath = self.compile_font(ttxpath, ".otf")