diff --git a/python/afdko/makeotf.py b/python/afdko/makeotf.py index 93ee49661..ca98600a6 100644 --- a/python/afdko/makeotf.py +++ b/python/afdko/makeotf.py @@ -26,7 +26,7 @@ """ __version__ = """\ -makeotf.py v2.7.0 Feb 8 2019 +makeotf.py v2.7.1 Feb 9 2019 """ __methods__ = """ @@ -2570,6 +2570,11 @@ def runMakeOTF(makeOTFParams): if not os.path.exists(tempOutPath) or (os.path.getsize(tempOutPath) < 500): print("makeotf [Error] Failed to build output font file '%s'." % tempOutPath) + if os.path.exists(tempOutPath): + try: + os.remove(tempOutPath) + except OSError: + pass raise MakeOTFRunError if makeOTFParams.srcIsTTF: @@ -2578,6 +2583,11 @@ def runMakeOTF(makeOTFParams): if not os.path.exists(outputPath) or (os.path.getsize(outputPath) < 500): print("makeotf [Error] Failed to build output font file '%s'." % outputPath) + if os.path.exists(outputPath): + try: + os.remove(outputPath) + except OSError: + pass raise MakeOTFRunError # The following check is here because of the internal Adobe diff --git a/tests/makeotf_data/input/bug736/feat.fea b/tests/makeotf_data/input/bug736/feat.fea new file mode 100644 index 000000000..31351ea68 --- /dev/null +++ b/tests/makeotf_data/input/bug736/feat.fea @@ -0,0 +1,4 @@ + +table head { + FontRevisio 1.011; +} head; diff --git a/tests/makeotf_data/input/bug736/font.pfa b/tests/makeotf_data/input/bug736/font.pfa new file mode 100644 index 000000000..4ac04bd76 --- /dev/null +++ b/tests/makeotf_data/input/bug736/font.pfa @@ -0,0 +1,65 @@ +%!FontType1-1.1: SourceSans-Test 2.20 +%ADOt1write: (1.0.34) +%%BeginResource: font SourceSans-Test +12 dict dup begin +/FontType 1 def +/FontName /SourceSans-Test def +/FontInfo 8 dict dup begin +/version (2.20) def +/Notice (Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries.) def +/Copyright (Copyright 2010, 2012, 2014 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'.) def +/FamilyName (Source Sans) def +/UnderlinePosition -75 def +end def +/PaintType 0 def +/FontMatrix [0.001 0 0 0.001 0 0] def +/Encoding StandardEncoding def +/FontBBox {52 -12 565 660} def +end +currentfile eexec BAB431EA06BB0A1031E1AA11919E714AC69FC4EA3B6672 +ABF3FDE103443FF5321890FEA3C9361761AC3B607C4C960F4D385045AB5EBCA8 +90FBA7C10718659A90ABF027E30B88E7D14F8D16AC4F74C85733B7705F6CF5C8 +EBAB2E0E40F736110B62422F3D642359FA764B81D9A72049DBFF40187C41455E +5378378702658031C363F2CD4F37345F8FA78044A0491D8AE5B00254A201ADC9 +30CA211B7CAA4782B90547B9664E61F24869CF78DB4E8687FFFE91F16C9E5FF1 +186F31A78B27F54E1C146EDF26271FB25D6AD6FEF7C6577CD58340BEADDE6FFC +AA900264B944E40145476E80CCD21E6143836F5909D71062CC93959AE79B8E83 +83907879DE05209C61D11D1236219DB0524104110DAFF742B28B499F14E126FD +A0B725194ECC86E08F6388D0444BA0297C3D0DEB2E3B1C8EEAF8712C66B0B663 +F560C0CC421487AA0FF3D43F6D48F457D378DC3FDC3FBFE182735FEE782B8801 +D71B6BBB5D42EDB9CF55722C3867223F258B86586AE360694E1980B8BF6B3EC4 +08D39C47787B894DA23EA2DAC3297E0D49C2CAF9BC9F44E24F07AE4F5B3826E9 +F6406BEAEE900804BF3FE8C42804115163753BBA67420C52696A6BD7AFEF9266 +733FB27A68B5D05F4C091ECD0262FD43CB49605B04E19CCB129439ABE1EFA11B +705FCA0AC57C815EA8E7E65644FDC17369A707D15D5A4D2E1596BFE6917189A8 +A2711DC2D996CA9970006BB5EF58211349AAD9B49C2D377C07024428552D8168 +2D2031300451A384F73FCFDCDF5C29A00C657B7CFC409A30E2BF2AC1944EB028 +23EC388C2A1D6B20D52EC2E817E0A063AE48AA7CFBFFD30E7BACEDCA93995CB1 +66379EA794F61F3DFFB4D9FC7C25DD5ACC48DD8EE6BBB6DE526717BDED470F33 +321CED8A2958D6F8490D834DA175A70D0F759ABD27B37C6FFE6BC0590D470A32 +91F4374CD9C6471A21BCFBC97625E3C4116D9B0C6ADF60E1F47F0B76080F725D +53B5ADFC880200B5CFA40536E83FC0FF61BB5D5B86B115A68D95CEEAD85B8C9D +A1E6931780781FA3FB0FDB5A575C95FED4BB91F2154DCF699885C4585B2A4AD9 +25FAD160F60F34F298B5F65386E4CBA229C37569A7BD7C58F64E20D225C8A925 +ECA90B51A3EB7E335F5FE4D6E9A6D6F8F5CC5106984801198FA2D1E43219FA92 +C8AD14E7B1610DAA215E8D63216A90D9992C5106349C40967149FDAD08EE9638 +485B07609C18C971ADCC2E04FC4A51D6B6FC0E77918C9EC1F5D0651432D84B35 +9FD0F6C03F4826D53A2DDEC99DB19EA1ACD2E040E85D07C68E7A4FE59DAE50AF +DF8F1B67C27F14450C52EB5BE7B7232C1E35D8CDC5612A7C4DCE98767FF7059E +6680989C0671CBACC8E7EF04DD0C9CB3B3E2B29564EE440C4119AB58E893D38D +7136FAC9AA14E9A26AF56A31DAA71EBF7508559349A63354E5105465E83DDDE6 +E78A4D81F3995CD991B70281C228E34F6084A4D4E76BAF6CFB86EF73706910DB +AC7EB1793FB658C9AF0288258A8D370AE2A694AB571B793BE22436C0B1A35111 +C3039ED8C9EA63598025A5EDA8DDFC3A972B982F1D1B2E7F24AF925331B9F762 +0A07166437AD880584C5D4F39C +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +%%EndResource +%%EOF diff --git a/tests/makeotf_test.py b/tests/makeotf_test.py index be35bb99f..d05b4639e 100644 --- a/tests/makeotf_test.py +++ b/tests/makeotf_test.py @@ -591,3 +591,16 @@ def test_unhandled_ufo_glif_token_bug705(): with open(stderr_path, 'rb') as f: output = f.read() assert b"unhandled token: