diff --git a/tests/tx_data/expected_output/ufo-advance-height-weight.pfa b/tests/tx_data/expected_output/ufo-advance-height-weight.pfa new file mode 100644 index 000000000..048ed541c --- /dev/null +++ b/tests/tx_data/expected_output/ufo-advance-height-weight.pfa @@ -0,0 +1,53 @@ +%!FontType1-1.1: Dummy-Style_01 +%ADOt1write: (1.0.35) +%%Copyright: Copyright 2023 Adobe System Incorporated. All rights reserved. +%%BeginResource: font Dummy-Style_01 +12 dict dup begin +/FontType 1 def +/FontName /Dummy-Style_01 def +/FontInfo 4 dict dup begin +/FamilyName (Dummy) def +end def +/PaintType 0 def +/FontMatrix [0.001 0 0 0.001 0 0] def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +def +/FontBBox {47 168 353 456} def +end +currentfile eexec BAB431EA06BB0A1031E1AA11919E714AC6968FC4C8AFEB +5F1C717DAFACA48FA00303519D5ACA187D3A7A07245E6211EF0746489B63BDB8 +0250FD69171FFE98581843A94F9CCED81A25205CD6D774793B21300079565F0A +4BF8837D8515ABA83CB5A7F24504D739F5F3A4B99A7943FAB759865E3004DE57 +99F6362268FB0C639E3F79E17225917725B80B87480702698D6AB89A3359AA7D +2A57D785A9BF0E5E9885B01513DF76B37CFC742EBC0B1410D1A7AB1852617B37 +0EB7E8B8DFD74F4D9E046D06F6939AADFA874ABC9679AC0AD855F15B72B24EBB +5FB8E172A2203758AA3593CFF1015CD161143ADCA4DCA397B4D7E5F0AF3A1683 +EDE4630CB25FB53C9E88DD3716C1D3C68496A09EF92FEE8C8AAE27D258F77D48 +30A3B72B10D77054438D5299CEB9C6D45F4AF2C1AC6458E860A62818A3617DAA +1F19DD688A12407C892F494A18D403392E42B8AA19B5891A3C9659F9267DF804 +CD1278B964EC5878D987800B4AFD844DC6636196F168889FDF1CA4B8898A9FD8 +17A8F64903ADA8285AFD6CF9394799092A54A749DA9C770F81B160D2705A2085 +7B085902A6D4397181E202CB5BF2750B7BF3482845DE4A0743A1143FC6C9D3A8 +EA50911EB1D0DA484F02F53238E002FBD0196F67EC218167D7F88779C62BF015 +87CE8D5826A6BB6C62130CC1140E75B45BF215E6CF63B4FD2248F95E0AAC8706 +E6D31A405CD24F41481153D90DFD8DDAC0D4040185FB0DFBCB161B35E76808B0 +212CC5E46BF999EFC8D23B5811A89F3F06A126B289DAC3AD205EC2DECA0FD118 +7E4BFFF533368DFC86697930E2DBF1A5B3B8FDEECD52CAF82F0A5B13B67A5B42 +16EAC9566B9D025DB912A9836BE21B7DF27D46C4601A46F78F1BD112D24DD1A8 +115D3F69D85B5A1FACCA83C7B0AC3E292EA27CF2C9AD1C4E25F06D510077083E +30241D95F6703041C6634FB225CFADB64CE29EE9C6F737C9992041B45E0635FD +1645DBBB7C6CC29A62A7FF5C95B4CC44D157DA302EABA329F7072F499565D337 +7A27A2EC6F2452DA3B940EE2F2C9418150DDFBC5C920CFDEFBD349E2F485B18C +D565 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +%%EndResource +%%EOF diff --git a/tests/tx_data/input/ufo-advance-height-weight.ufo/data/com.adobe.type.processedHashMap b/tests/tx_data/input/ufo-advance-height-weight.ufo/data/com.adobe.type.processedHashMap new file mode 100644 index 000000000..4ea4cc6a6 --- /dev/null +++ b/tests/tx_data/input/ufo-advance-height-weight.ufo/data/com.adobe.type.processedHashMap @@ -0,0 +1,6 @@ +{ +'.notdef': ['w100', ['checkOutlines', 'autohint']], +'A': ['w400l47243l119456l353343l273183l173168', ['checkOutlines', 'autohint']], +'hashMapVersion': (1, 0), +'space': ['w200', ['checkOutlines', 'autohint']], +} diff --git a/tests/tx_data/input/ufo-advance-height-weight.ufo/fontinfo.plist b/tests/tx_data/input/ufo-advance-height-weight.ufo/fontinfo.plist new file mode 100644 index 000000000..887fe72ad --- /dev/null +++ b/tests/tx_data/input/ufo-advance-height-weight.ufo/fontinfo.plist @@ -0,0 +1,43 @@ + + + + + ascender + 750 + capHeight + 750 + descender + -250 + familyName + Dummy + guidelines + + + postscriptBlueValues + + + postscriptFamilyBlues + + + postscriptFamilyOtherBlues + + + postscriptFontName + Dummy-Style_01 + postscriptOtherBlues + + + postscriptStemSnapH + + + postscriptStemSnapV + + + styleName + Style_01 + unitsPerEm + 1000 + xHeight + 500 + + diff --git a/tests/tx_data/input/ufo-advance-height-weight.ufo/glyphs.com.adobe.type.processedglyphs/A_.glif b/tests/tx_data/input/ufo-advance-height-weight.ufo/glyphs.com.adobe.type.processedglyphs/A_.glif new file mode 100644 index 000000000..0da30d2a1 --- /dev/null +++ b/tests/tx_data/input/ufo-advance-height-weight.ufo/glyphs.com.adobe.type.processedglyphs/A_.glif @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + com.adobe.type.autohint.v2 + + hintSetList + + + pointTag + hintSet0000 + stems + + hstem 168 288 + vstem 47 306 + + + + id + w400l47243l119456l353343l273183l173168 + + + + diff --git a/tests/tx_data/input/ufo-advance-height-weight.ufo/glyphs.com.adobe.type.processedglyphs/contents.plist b/tests/tx_data/input/ufo-advance-height-weight.ufo/glyphs.com.adobe.type.processedglyphs/contents.plist new file mode 100644 index 000000000..be1cec832 --- /dev/null +++ b/tests/tx_data/input/ufo-advance-height-weight.ufo/glyphs.com.adobe.type.processedglyphs/contents.plist @@ -0,0 +1,8 @@ + + + + + A + A_.glif + + diff --git a/tests/tx_data/input/ufo-advance-height-weight.ufo/glyphs/A_.glif b/tests/tx_data/input/ufo-advance-height-weight.ufo/glyphs/A_.glif new file mode 100644 index 000000000..d1e2cdfab --- /dev/null +++ b/tests/tx_data/input/ufo-advance-height-weight.ufo/glyphs/A_.glif @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/tests/tx_data/input/ufo-advance-height-weight.ufo/glyphs/_notdef.glif b/tests/tx_data/input/ufo-advance-height-weight.ufo/glyphs/_notdef.glif new file mode 100644 index 000000000..f505796dc --- /dev/null +++ b/tests/tx_data/input/ufo-advance-height-weight.ufo/glyphs/_notdef.glif @@ -0,0 +1,4 @@ + + + + diff --git a/tests/tx_data/input/ufo-advance-height-weight.ufo/glyphs/contents.plist b/tests/tx_data/input/ufo-advance-height-weight.ufo/glyphs/contents.plist new file mode 100644 index 000000000..bf0670d27 --- /dev/null +++ b/tests/tx_data/input/ufo-advance-height-weight.ufo/glyphs/contents.plist @@ -0,0 +1,12 @@ + + + + + .notdef + _notdef.glif + A + A_.glif + space + space.glif + + diff --git a/tests/tx_data/input/ufo-advance-height-weight.ufo/glyphs/space.glif b/tests/tx_data/input/ufo-advance-height-weight.ufo/glyphs/space.glif new file mode 100644 index 000000000..20d12349f --- /dev/null +++ b/tests/tx_data/input/ufo-advance-height-weight.ufo/glyphs/space.glif @@ -0,0 +1,5 @@ + + + + + diff --git a/tests/tx_data/input/ufo-advance-height-weight.ufo/layercontents.plist b/tests/tx_data/input/ufo-advance-height-weight.ufo/layercontents.plist new file mode 100644 index 000000000..e7ec5cadb --- /dev/null +++ b/tests/tx_data/input/ufo-advance-height-weight.ufo/layercontents.plist @@ -0,0 +1,14 @@ + + + + + + public.default + glyphs + + + com.adobe.type.processedglyphs + glyphs.com.adobe.type.processedglyphs + + + diff --git a/tests/tx_data/input/ufo-advance-height-weight.ufo/lib.plist b/tests/tx_data/input/ufo-advance-height-weight.ufo/lib.plist new file mode 100644 index 000000000..616be1835 --- /dev/null +++ b/tests/tx_data/input/ufo-advance-height-weight.ufo/lib.plist @@ -0,0 +1,12 @@ + + + + + public.glyphOrder + + .notdef + space + A + + + diff --git a/tests/tx_data/input/ufo-advance-height-weight.ufo/metainfo.plist b/tests/tx_data/input/ufo-advance-height-weight.ufo/metainfo.plist new file mode 100644 index 000000000..555d9ce4c --- /dev/null +++ b/tests/tx_data/input/ufo-advance-height-weight.ufo/metainfo.plist @@ -0,0 +1,10 @@ + + + + + creator + com.github.fonttools.ufoLib + formatVersion + 3 + + diff --git a/tests/tx_test.py b/tests/tx_test.py index 6b5db9c48..cd9842e7f 100644 --- a/tests/tx_test.py +++ b/tests/tx_test.py @@ -1678,3 +1678,16 @@ def test_alt_missing_glyph(): expected_path = generate_ps_dump(expected_path) output_path = generate_ps_dump(output_path) assert differ([expected_path, output_path]) + + +def test_parsing_attrs_bug1673(): + """ + Test parsing nested attributes within an xmlNode. + """ + input_path = get_input_path("ufo-advance-height-weight.ufo") + expected_path = get_expected_path("ufo-advance-height-weight.pfa") + output_path = get_temp_file_path() + subprocess.call([TOOL, '-t1', '-o', output_path, input_path]) + expected_path = generate_ps_dump(expected_path) + output_path = generate_ps_dump(output_path) + assert differ([expected_path, output_path, '-s', PFA_SKIP[0]])