diff --git a/tests/data/TestFont-NoOverlaps-CFF-pathops.ttx b/tests/data/TestFont-NoOverlaps-CFF-pathops.ttx new file mode 100644 index 000000000..a714f607a --- /dev/null +++ b/tests/data/TestFont-NoOverlaps-CFF-pathops.ttx @@ -0,0 +1,507 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Unique Font Identifier + + + Copyright © Some Foundry. + + + Some Font Regular (Style Map Family Name) + + + Regular + + + OpenType name Table Unique ID + + + Some Font (Preferred Family Name) Regular (Preferred Subfamily Name) + + + OpenType name Table Version + + + SomeFont-Regular Postscript Font Name + + + Trademark Some Foundry + + + Some Foundry (Manufacturer Name) + + + Some Designer + + + Some Font by Some Designer for Some Foundry. + + + http://somefoundry.com + + + http://somedesigner.com + + + License info for Some Foundry. + + + http://somefoundry.com/license + + + Some Font (Preferred Family Name) + + + Regular (Preferred Subfamily Name) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 66 510 rmoveto + 85 -288 rlineto + -164 -8 -42 -54 -137 vvcurveto + 509 hlineto + 140 -44 53 -173 6 vhcurveto + 85 288 rlineto + return + + + rmoveto + -34 -27 -27 -33 -33 27 -27 34 33 27 27 33 33 -27 27 -33 hvcurveto + endchar + + + + + + 100 450 hmoveto + 750 -400 -750 vlineto + 350 50 rmoveto + -300 650 300 hlineto + endchar + + + -150 endchar + + + -12 66 hmoveto + 256 hlineto + -128 510 rlineto + endchar + + + 10 100 505 rmoveto + -510 210 510 vlineto + endchar + + + -26 300 -10 rmoveto + 510 vlineto + -150 -50 -50 -205 -205 50 -50 150 hvcurveto + endchar + + + -26 151 197 -106 callsubr + + + -12 -107 callsubr + endchar + + + 10 -107 callsubr + -85 -288 rmoveto + -43 -147 -43 147 rlineto + 1 15 16 0 17 hhcurveto + 13 13 0 -1 12 hvcurveto + endchar + + + -12 66 hmoveto + 256 hlineto + -128 510 rlineto + endchar + + + 10 100 505 rmoveto + -510 210 510 vlineto + -99 152 -106 callsubr + + + 200 -55 -80 rmoveto + 509 hlineto + 123 -34 55 -127 16 vhcurveto + -99 396 -100 -397 rlineto + -117 -18 -32 -56 -119 vvcurveto + endchar + + + 200 -55 -80 rmoveto + 199 hlineto + 50 -200 50 200 rlineto + 210 hlineto + 123 -34 55 -127 16 vhcurveto + 29 116 -256 0 29 -117 rlineto + -118 -18 -32 -55 -120 vvcurveto + endchar + + + 200 66 hmoveto + 356 hlineto + -128 510 -50 -199 -50 199 rlineto + endchar + + + 200 334 hmoveto + 88 hlineto + -128 510 -44 -175 -44 175 -128 -510 rlineto + endchar + + + + + + + + + + + + 0001beef + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/data/TestFont-NoOverlaps-TTF-pathops.ttx b/tests/data/TestFont-NoOverlaps-TTF-pathops.ttx new file mode 100644 index 000000000..2fd2173c6 --- /dev/null +++ b/tests/data/TestFont-NoOverlaps-TTF-pathops.ttx @@ -0,0 +1,577 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Unique Font Identifier + + + Copyright © Some Foundry. + + + Some Font Regular (Style Map Family Name) + + + Regular + + + OpenType name Table Unique ID + + + Some Font (Preferred Family Name) Regular (Preferred Subfamily Name) + + + OpenType name Table Version + + + SomeFont-Regular Postscript Font Name + + + Trademark Some Foundry + + + Some Foundry (Manufacturer Name) + + + Some Designer + + + Some Font by Some Designer for Some Foundry. + + + http://somefoundry.com + + + http://somedesigner.com + + + License info for Some Foundry. + + + http://somefoundry.com/license + + + Some Font (Preferred Family Name) + + + Regular (Preferred Subfamily Name) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0001beef + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/integration_test.py b/tests/integration_test.py index 91f78e761..4f0e60459 100644 --- a/tests/integration_test.py +++ b/tests/integration_test.py @@ -94,10 +94,22 @@ def test_removeOverlaps_CFF(self, testufo): otf = compileOTF(testufo, removeOverlaps=True) expectTTX(otf, "TestFont-NoOverlaps-CFF.ttx") + def test_removeOverlaps_CFF_pathops(self, testufo): + otf = compileOTF( + testufo, removeOverlaps=True, removeOverlapsBackend="pathops" + ) + expectTTX(otf, "TestFont-NoOverlaps-CFF-pathops.ttx") + def test_removeOverlaps(self, testufo): ttf = compileTTF(testufo, removeOverlaps=True) expectTTX(ttf, "TestFont-NoOverlaps-TTF.ttx") + def test_removeOverlaps_pathops(self, testufo): + ttf = compileTTF( + testufo, removeOverlaps=True, removeOverlapsBackend="pathops" + ) + expectTTX(ttf, "TestFont-NoOverlaps-TTF-pathops.ttx") + def test_interpolatableTTFs_lazy(self, FontClass): # two same UFOs **must** be interpolatable ufos = [FontClass(getpath("TestFont.ufo")) for _ in range(2)] diff --git a/tox.ini b/tox.ini index 634cf1fc4..32ee0116d 100644 --- a/tox.ini +++ b/tox.ini @@ -6,6 +6,8 @@ deps = cov: coverage pytest -rrequirements.txt +extras = + pathops commands = # run the test suite against the package installed inside tox env. # We use parallel mode and then combine later so that coverage.py will take