From 309fef46f36c1ce72ea9e02ca89db8bc7cddd9cf Mon Sep 17 00:00:00 2001 From: Olli Meier Date: Fri, 19 Apr 2024 15:34:54 +0200 Subject: [PATCH] replacing data --- .gitignore | 1 + .../GlyphsUnitTestSans3.fontra/font-data.json | 56 ++ .../GlyphsUnitTestSans3.fontra/glyph-info.csv | 12 + .../glyphs/A^1.json | 237 +++++ .../glyphs/Adieresis^1.json | 79 ++ .../glyphs/_part.shoulder.json | 918 +++++++++++++++++ .../glyphs/_part.stem.json | 288 ++++++ .../GlyphsUnitTestSans3.fontra/glyphs/a.json | 927 ++++++++++++++++++ .../glyphs/a.sc.json | 232 +++++ .../glyphs/adieresis.json | 77 ++ .../glyphs/dieresis.json | 181 ++++ .../GlyphsUnitTestSans3.fontra/glyphs/h.json | 85 ++ .../GlyphsUnitTestSans3.fontra/glyphs/m.json | 103 ++ .../GlyphsUnitTestSans3.fontra/glyphs/n.json | 67 ++ tests/data/fontra-glyphs/A_.json | 97 -- tests/data/fontra-glyphs/A_dieresis.json | 79 -- tests/data/fontra-glyphs/_part.shoulder.json | 261 ----- tests/data/fontra-glyphs/_part.stem.json | 150 --- tests/data/fontra-glyphs/a.json | 135 --- tests/data/fontra-glyphs/a.sc.json | 97 -- tests/data/fontra-glyphs/adieresis.json | 77 -- tests/data/fontra-glyphs/dieresis.json | 91 -- tests/data/fontra-glyphs/h.json | 85 -- tests/data/fontra-glyphs/m.json | 103 -- tests/data/fontra-glyphs/n.json | 67 -- tests/test_backend.py | 4 +- 26 files changed, 3265 insertions(+), 1244 deletions(-) create mode 100644 tests/data/GlyphsUnitTestSans3.fontra/font-data.json create mode 100644 tests/data/GlyphsUnitTestSans3.fontra/glyph-info.csv create mode 100644 tests/data/GlyphsUnitTestSans3.fontra/glyphs/A^1.json create mode 100644 tests/data/GlyphsUnitTestSans3.fontra/glyphs/Adieresis^1.json create mode 100644 tests/data/GlyphsUnitTestSans3.fontra/glyphs/_part.shoulder.json create mode 100644 tests/data/GlyphsUnitTestSans3.fontra/glyphs/_part.stem.json create mode 100644 tests/data/GlyphsUnitTestSans3.fontra/glyphs/a.json create mode 100644 tests/data/GlyphsUnitTestSans3.fontra/glyphs/a.sc.json create mode 100644 tests/data/GlyphsUnitTestSans3.fontra/glyphs/adieresis.json create mode 100644 tests/data/GlyphsUnitTestSans3.fontra/glyphs/dieresis.json create mode 100644 tests/data/GlyphsUnitTestSans3.fontra/glyphs/h.json create mode 100644 tests/data/GlyphsUnitTestSans3.fontra/glyphs/m.json create mode 100644 tests/data/GlyphsUnitTestSans3.fontra/glyphs/n.json delete mode 100644 tests/data/fontra-glyphs/A_.json delete mode 100644 tests/data/fontra-glyphs/A_dieresis.json delete mode 100644 tests/data/fontra-glyphs/_part.shoulder.json delete mode 100644 tests/data/fontra-glyphs/_part.stem.json delete mode 100644 tests/data/fontra-glyphs/a.json delete mode 100644 tests/data/fontra-glyphs/a.sc.json delete mode 100644 tests/data/fontra-glyphs/adieresis.json delete mode 100644 tests/data/fontra-glyphs/dieresis.json delete mode 100644 tests/data/fontra-glyphs/h.json delete mode 100644 tests/data/fontra-glyphs/m.json delete mode 100644 tests/data/fontra-glyphs/n.json diff --git a/.gitignore b/.gitignore index 2f9b62f..ed4378d 100644 --- a/.gitignore +++ b/.gitignore @@ -161,3 +161,4 @@ cython_debug/ # scm file src/fontra_glyphs/_version.py +.DS_Store \ No newline at end of file diff --git a/tests/data/GlyphsUnitTestSans3.fontra/font-data.json b/tests/data/GlyphsUnitTestSans3.fontra/font-data.json new file mode 100644 index 0000000..b68ba29 --- /dev/null +++ b/tests/data/GlyphsUnitTestSans3.fontra/font-data.json @@ -0,0 +1,56 @@ +{ +"unitsPerEm": 1000, +"fontInfo": { +"familyName": "Glyphs Unit Test Sans", +"versionMajor": 1, +"versionMinor": 0 +}, +"axes": { +"axes": [ +{ +"name": "Weight", +"label": "Weight", +"tag": "wght", +"minValue": 100, +"defaultValue": 400, +"maxValue": 900, +"mapping": [ +[ +100, +17 +], +[ +200, +30 +], +[ +300, +55 +], +[ +357, +75 +], +[ +400, +90 +], +[ +500, +133 +], +[ +700, +179 +], +[ +900, +220 +] +] +} +] +}, +"sources": {}, +"customData": {} +} diff --git a/tests/data/GlyphsUnitTestSans3.fontra/glyph-info.csv b/tests/data/GlyphsUnitTestSans3.fontra/glyph-info.csv new file mode 100644 index 0000000..da08a51 --- /dev/null +++ b/tests/data/GlyphsUnitTestSans3.fontra/glyph-info.csv @@ -0,0 +1,12 @@ +glyph name;code points +A;U+0041 +Adieresis;U+00C4 +_part.shoulder; +_part.stem; +a;U+0061 +a.sc; +adieresis;U+00E4 +dieresis;U+00A8 +h;U+0068 +m;U+006D +n;U+006E diff --git a/tests/data/GlyphsUnitTestSans3.fontra/glyphs/A^1.json b/tests/data/GlyphsUnitTestSans3.fontra/glyphs/A^1.json new file mode 100644 index 0000000..94590a9 --- /dev/null +++ b/tests/data/GlyphsUnitTestSans3.fontra/glyphs/A^1.json @@ -0,0 +1,237 @@ +{ +"name": "A", +"sources": [ +{ +"name": "Light", +"layerName": "Light (layer #0)", +"location": { +"Weight": 17 +} +}, +{ +"name": "Regular", +"layerName": "Regular (layer #1)", +"location": { +"Weight": 90 +} +}, +{ +"name": "Bold", +"layerName": "Bold (layer #2)", +"location": { +"Weight": 220 +} +} +], +"layers": { +"Bold (layer #2)": { +"glyph": { +"path": { +"contours": [ +{ +"points": [ +{ +"x": 733, +"y": 0 +}, +{ +"x": 555, +"y": 700 +}, +{ +"x": 205, +"y": 700 +}, +{ +"x": 20, +"y": 0 +}, +{ +"x": 253, +"y": 0 +}, +{ +"x": 356, +"y": 470 +}, +{ +"x": 385, +"y": 470 +}, +{ +"x": 491, +"y": 0 +} +], +"isClosed": true +}, +{ +"points": [ +{ +"x": 600, +"y": 268 +}, +{ +"x": 162, +"y": 268 +}, +{ +"x": 154, +"y": 103 +}, +{ +"x": 596, +"y": 103 +} +], +"isClosed": true +} +] +}, +"xAdvance": 753 +} +}, +"Light (layer #0)": { +"glyph": { +"path": { +"contours": [ +{ +"points": [ +{ +"x": 548, +"y": 0 +}, +{ +"x": 321, +"y": 700 +}, +{ +"x": 275, +"y": 700 +}, +{ +"x": 45, +"y": 0 +}, +{ +"x": 65, +"y": 0 +}, +{ +"x": 289, +"y": 679 +}, +{ +"x": 307, +"y": 679 +}, +{ +"x": 527, +"y": 0 +} +], +"isClosed": true +}, +{ +"points": [ +{ +"x": 467, +"y": 225 +}, +{ +"x": 128, +"y": 225 +}, +{ +"x": 123, +"y": 207 +}, +{ +"x": 472, +"y": 207 +} +], +"isClosed": true +} +] +}, +"xAdvance": 593 +} +}, +"Regular (layer #1)": { +"glyph": { +"path": { +"contours": [ +{ +"points": [ +{ +"x": 617, +"y": 0 +}, +{ +"x": 412, +"y": 700 +}, +{ +"x": 248, +"y": 700 +}, +{ +"x": 40, +"y": 0 +}, +{ +"x": 134, +"y": 0 +}, +{ +"x": 313, +"y": 610 +}, +{ +"x": 342, +"y": 610 +}, +{ +"x": 521, +"y": 0 +} +], +"isClosed": true +}, +{ +"points": [ +{ +"x": 514, +"y": 269 +}, +{ +"x": 150, +"y": 269 +}, +{ +"x": 148, +"y": 178 +}, +{ +"x": 510, +"y": 178 +} +], +"isClosed": true +} +] +}, +"xAdvance": 657 +} +} +}, +"customData": { +"com.glyphsapp.glyph-color": [ +120, +220, +20, +4 +] +} +} diff --git a/tests/data/GlyphsUnitTestSans3.fontra/glyphs/Adieresis^1.json b/tests/data/GlyphsUnitTestSans3.fontra/glyphs/Adieresis^1.json new file mode 100644 index 0000000..f276d95 --- /dev/null +++ b/tests/data/GlyphsUnitTestSans3.fontra/glyphs/Adieresis^1.json @@ -0,0 +1,79 @@ +{ +"name": "Adieresis", +"sources": [ +{ +"name": "Light", +"layerName": "Light (layer #0)", +"location": { +"Weight": 17 +} +}, +{ +"name": "Regular", +"layerName": "Regular (layer #1)", +"location": { +"Weight": 90 +} +}, +{ +"name": "Bold", +"layerName": "Bold (layer #2)", +"location": { +"Weight": 220 +} +} +], +"layers": { +"Bold (layer #2)": { +"glyph": { +"components": [ +{ +"name": "A" +}, +{ +"name": "dieresis", +"transformation": { +"translateX": 110, +"translateY": 210 +} +} +], +"xAdvance": 753 +} +}, +"Light (layer #0)": { +"glyph": { +"components": [ +{ +"name": "A" +}, +{ +"name": "dieresis", +"transformation": { +"translateX": 110, +"translateY": 230 +} +} +], +"xAdvance": 593 +} +}, +"Regular (layer #1)": { +"glyph": { +"components": [ +{ +"name": "A" +}, +{ +"name": "dieresis", +"transformation": { +"translateX": 128, +"translateY": 220 +} +} +], +"xAdvance": 657 +} +} +} +} diff --git a/tests/data/GlyphsUnitTestSans3.fontra/glyphs/_part.shoulder.json b/tests/data/GlyphsUnitTestSans3.fontra/glyphs/_part.shoulder.json new file mode 100644 index 0000000..dd2cde4 --- /dev/null +++ b/tests/data/GlyphsUnitTestSans3.fontra/glyphs/_part.shoulder.json @@ -0,0 +1,918 @@ +{ +"name": "_part.shoulder", +"axes": [ +{ +"name": "crotchDepth", +"minValue": -100, +"defaultValue": 0, +"maxValue": 0 +}, +{ +"name": "shoulderWidth", +"minValue": 0, +"defaultValue": 100, +"maxValue": 100 +} +], +"sources": [ +{ +"name": "Light", +"layerName": "Light (layer #0)", +"location": { +"Weight": 17 +} +}, +{ +"name": "Light / NarrowShoulder", +"layerName": "Light / NarrowShoulder (layer #3)", +"location": { +"Weight": 17, +"shoulderWidth": 0 +} +}, +{ +"name": "Light / LowCrotch", +"layerName": "Light / LowCrotch (layer #4)", +"location": { +"Weight": 17, +"crotchDepth": -100 +} +}, +{ +"name": "Regular", +"layerName": "Regular (layer #1)", +"location": { +"Weight": 90 +} +}, +{ +"name": "Regular / NarrowShoulder", +"layerName": "Regular / NarrowShoulder (layer #5)", +"location": { +"Weight": 90, +"shoulderWidth": 0 +} +}, +{ +"name": "Regular / LowCrotch", +"layerName": "Regular / LowCrotch (layer #6)", +"location": { +"Weight": 90, +"crotchDepth": -100 +} +}, +{ +"name": "Bold", +"layerName": "Bold (layer #2)", +"location": { +"Weight": 220 +} +}, +{ +"name": "Bold / NarrowShoulder", +"layerName": "Bold / NarrowShoulder (layer #7)", +"location": { +"Weight": 220, +"shoulderWidth": 0 +} +}, +{ +"name": "Bold / LowCrotch", +"layerName": "Bold / LowCrotch (layer #8)", +"location": { +"Weight": 220, +"crotchDepth": -100 +} +} +], +"layers": { +"Bold (layer #2)": { +"glyph": { +"path": { +"contours": [ +{ +"points": [ +{ +"x": 162, +"y": 401 +}, +{ +"x": 250, +"y": 229 +}, +{ +"x": 250, +"y": 268, +"type": "cubic" +}, +{ +"x": 259, +"y": 283, +"type": "cubic" +}, +{ +"x": 284, +"y": 283, +"smooth": true +}, +{ +"x": 295, +"y": 283, +"type": "cubic" +}, +{ +"x": 304, +"y": 280, +"type": "cubic" +}, +{ +"x": 310, +"y": 276 +}, +{ +"x": 310, +"y": 0 +}, +{ +"x": 530, +"y": 0 +}, +{ +"x": 530, +"y": 448 +}, +{ +"x": 490, +"y": 478, +"type": "cubic" +}, +{ +"x": 430, +"y": 501, +"type": "cubic" +}, +{ +"x": 357, +"y": 501, +"smooth": true +}, +{ +"x": 259, +"y": 501, +"type": "cubic" +}, +{ +"x": 209, +"y": 461, +"type": "cubic" +}, +{ +"x": 188, +"y": 401 +} +], +"isClosed": true +} +] +}, +"xAdvance": 560 +} +}, +"Bold / LowCrotch (layer #8)": { +"glyph": { +"path": { +"contours": [ +{ +"points": [ +{ +"x": 162, +"y": 371 +}, +{ +"x": 250, +"y": 199 +}, +{ +"x": 250, +"y": 251, +"type": "cubic" +}, +{ +"x": 259, +"y": 283, +"type": "cubic" +}, +{ +"x": 284, +"y": 283, +"smooth": true +}, +{ +"x": 295, +"y": 283, +"type": "cubic" +}, +{ +"x": 304, +"y": 280, +"type": "cubic" +}, +{ +"x": 310, +"y": 276 +}, +{ +"x": 310, +"y": 0 +}, +{ +"x": 530, +"y": 0 +}, +{ +"x": 530, +"y": 448 +}, +{ +"x": 490, +"y": 478, +"type": "cubic" +}, +{ +"x": 430, +"y": 501, +"type": "cubic" +}, +{ +"x": 357, +"y": 501, +"smooth": true +}, +{ +"x": 259, +"y": 501, +"type": "cubic" +}, +{ +"x": 209, +"y": 461, +"type": "cubic" +}, +{ +"x": 188, +"y": 371 +} +], +"isClosed": true +} +] +}, +"xAdvance": 560 +} +}, +"Bold / NarrowShoulder (layer #7)": { +"glyph": { +"path": { +"contours": [ +{ +"points": [ +{ +"x": 162, +"y": 401 +}, +{ +"x": 250, +"y": 229 +}, +{ +"x": 250, +"y": 268, +"type": "cubic" +}, +{ +"x": 259, +"y": 283, +"type": "cubic" +}, +{ +"x": 274, +"y": 283, +"smooth": true +}, +{ +"x": 285, +"y": 283, +"type": "cubic" +}, +{ +"x": 294, +"y": 280, +"type": "cubic" +}, +{ +"x": 300, +"y": 276 +}, +{ +"x": 300, +"y": 0 +}, +{ +"x": 520, +"y": 0 +}, +{ +"x": 520, +"y": 448 +}, +{ +"x": 480, +"y": 478, +"type": "cubic" +}, +{ +"x": 420, +"y": 501, +"type": "cubic" +}, +{ +"x": 347, +"y": 501, +"smooth": true +}, +{ +"x": 259, +"y": 501, +"type": "cubic" +}, +{ +"x": 209, +"y": 461, +"type": "cubic" +}, +{ +"x": 188, +"y": 401 +} +], +"isClosed": true +} +] +}, +"xAdvance": 560 +} +}, +"Light (layer #0)": { +"glyph": { +"path": { +"contours": [ +{ +"points": [ +{ +"x": 102, +"y": 384 +}, +{ +"x": 117, +"y": 266 +}, +{ +"x": 117, +"y": 410, +"type": "cubic" +}, +{ +"x": 173, +"y": 463, +"type": "cubic" +}, +{ +"x": 262, +"y": 463, +"smooth": true +}, +{ +"x": 322, +"y": 463, +"type": "cubic" +}, +{ +"x": 365, +"y": 437, +"type": "cubic" +}, +{ +"x": 394, +"y": 408 +}, +{ +"x": 394, +"y": 0 +}, +{ +"x": 411, +"y": 0 +}, +{ +"x": 411, +"y": 414 +}, +{ +"x": 377, +"y": 450, +"type": "cubic" +}, +{ +"x": 333, +"y": 479, +"type": "cubic" +}, +{ +"x": 262, +"y": 479, +"smooth": true +}, +{ +"x": 169, +"y": 479, +"type": "cubic" +}, +{ +"x": 132, +"y": 429, +"type": "cubic" +}, +{ +"x": 121, +"y": 384 +} +], +"isClosed": true +} +] +}, +"xAdvance": 501 +} +}, +"Light / LowCrotch (layer #4)": { +"glyph": { +"path": { +"contours": [ +{ +"points": [ +{ +"x": 102, +"y": 354 +}, +{ +"x": 117, +"y": 236 +}, +{ +"x": 117, +"y": 410, +"type": "cubic" +}, +{ +"x": 173, +"y": 463, +"type": "cubic" +}, +{ +"x": 262, +"y": 463, +"smooth": true +}, +{ +"x": 322, +"y": 463, +"type": "cubic" +}, +{ +"x": 365, +"y": 437, +"type": "cubic" +}, +{ +"x": 394, +"y": 408 +}, +{ +"x": 394, +"y": 0 +}, +{ +"x": 411, +"y": 0 +}, +{ +"x": 411, +"y": 414 +}, +{ +"x": 377, +"y": 450, +"type": "cubic" +}, +{ +"x": 333, +"y": 479, +"type": "cubic" +}, +{ +"x": 262, +"y": 479, +"smooth": true +}, +{ +"x": 169, +"y": 479, +"type": "cubic" +}, +{ +"x": 132, +"y": 429, +"type": "cubic" +}, +{ +"x": 121, +"y": 354 +} +], +"isClosed": true +} +] +}, +"xAdvance": 501 +} +}, +"Light / NarrowShoulder (layer #3)": { +"glyph": { +"path": { +"contours": [ +{ +"points": [ +{ +"x": 102, +"y": 384 +}, +{ +"x": 117, +"y": 266 +}, +{ +"x": 117, +"y": 410, +"type": "cubic" +}, +{ +"x": 173, +"y": 463, +"type": "cubic" +}, +{ +"x": 252, +"y": 463, +"smooth": true +}, +{ +"x": 292, +"y": 463, +"type": "cubic" +}, +{ +"x": 335, +"y": 437, +"type": "cubic" +}, +{ +"x": 364, +"y": 408 +}, +{ +"x": 364, +"y": 0 +}, +{ +"x": 381, +"y": 0 +}, +{ +"x": 381, +"y": 414 +}, +{ +"x": 347, +"y": 450, +"type": "cubic" +}, +{ +"x": 303, +"y": 479, +"type": "cubic" +}, +{ +"x": 252, +"y": 479, +"smooth": true +}, +{ +"x": 169, +"y": 479, +"type": "cubic" +}, +{ +"x": 132, +"y": 429, +"type": "cubic" +}, +{ +"x": 121, +"y": 384 +} +], +"isClosed": true +} +] +}, +"xAdvance": 501 +} +}, +"Regular (layer #1)": { +"glyph": { +"path": { +"contours": [ +{ +"points": [ +{ +"x": 131, +"y": 409 +}, +{ +"x": 167, +"y": 246 +}, +{ +"x": 167, +"y": 355, +"type": "cubic" +}, +{ +"x": 203, +"y": 402, +"type": "cubic" +}, +{ +"x": 277, +"y": 402, +"smooth": true +}, +{ +"x": 315, +"y": 402, +"type": "cubic" +}, +{ +"x": 345, +"y": 390, +"type": "cubic" +}, +{ +"x": 365, +"y": 370 +}, +{ +"x": 365, +"y": 0 +}, +{ +"x": 455, +"y": 0 +}, +{ +"x": 455, +"y": 423 +}, +{ +"x": 425, +"y": 452, +"type": "cubic" +}, +{ +"x": 380, +"y": 490, +"type": "cubic" +}, +{ +"x": 294, +"y": 490, +"smooth": true +}, +{ +"x": 205, +"y": 490, +"type": "cubic" +}, +{ +"x": 170, +"y": 452, +"type": "cubic" +}, +{ +"x": 155, +"y": 409 +} +], +"isClosed": true +} +] +}, +"xAdvance": 528 +} +}, +"Regular / LowCrotch (layer #6)": { +"glyph": { +"path": { +"contours": [ +{ +"points": [ +{ +"x": 131, +"y": 379 +}, +{ +"x": 167, +"y": 216 +}, +{ +"x": 167, +"y": 325, +"type": "cubic" +}, +{ +"x": 203, +"y": 402, +"type": "cubic" +}, +{ +"x": 277, +"y": 402, +"smooth": true +}, +{ +"x": 315, +"y": 402, +"type": "cubic" +}, +{ +"x": 345, +"y": 390, +"type": "cubic" +}, +{ +"x": 365, +"y": 370 +}, +{ +"x": 365, +"y": 0 +}, +{ +"x": 455, +"y": 0 +}, +{ +"x": 455, +"y": 423 +}, +{ +"x": 425, +"y": 452, +"type": "cubic" +}, +{ +"x": 380, +"y": 490, +"type": "cubic" +}, +{ +"x": 294, +"y": 490, +"smooth": true +}, +{ +"x": 205, +"y": 490, +"type": "cubic" +}, +{ +"x": 170, +"y": 452, +"type": "cubic" +}, +{ +"x": 155, +"y": 379 +} +], +"isClosed": true +} +] +}, +"xAdvance": 528 +} +}, +"Regular / NarrowShoulder (layer #5)": { +"glyph": { +"path": { +"contours": [ +{ +"points": [ +{ +"x": 131, +"y": 409 +}, +{ +"x": 167, +"y": 246 +}, +{ +"x": 167, +"y": 355, +"type": "cubic" +}, +{ +"x": 203, +"y": 402, +"type": "cubic" +}, +{ +"x": 257, +"y": 402, +"smooth": true +}, +{ +"x": 285, +"y": 402, +"type": "cubic" +}, +{ +"x": 315, +"y": 390, +"type": "cubic" +}, +{ +"x": 335, +"y": 370 +}, +{ +"x": 335, +"y": 0 +}, +{ +"x": 425, +"y": 0 +}, +{ +"x": 425, +"y": 423 +}, +{ +"x": 395, +"y": 452, +"type": "cubic" +}, +{ +"x": 350, +"y": 490, +"type": "cubic" +}, +{ +"x": 274, +"y": 490, +"smooth": true +}, +{ +"x": 205, +"y": 490, +"type": "cubic" +}, +{ +"x": 170, +"y": 452, +"type": "cubic" +}, +{ +"x": 155, +"y": 409 +} +], +"isClosed": true +} +] +}, +"xAdvance": 528 +} +} +} +} diff --git a/tests/data/GlyphsUnitTestSans3.fontra/glyphs/_part.stem.json b/tests/data/GlyphsUnitTestSans3.fontra/glyphs/_part.stem.json new file mode 100644 index 0000000..7c2eefb --- /dev/null +++ b/tests/data/GlyphsUnitTestSans3.fontra/glyphs/_part.stem.json @@ -0,0 +1,288 @@ +{ +"name": "_part.stem", +"axes": [ +{ +"name": "height", +"minValue": 0, +"defaultValue": 0, +"maxValue": 100 +} +], +"sources": [ +{ +"name": "Light", +"layerName": "Light (layer #0)", +"location": { +"Weight": 17 +} +}, +{ +"name": "Light / TallStem", +"layerName": "Light / TallStem (layer #3)", +"location": { +"Weight": 17, +"height": 100 +} +}, +{ +"name": "Regular", +"layerName": "Regular (layer #1)", +"location": { +"Weight": 90 +} +}, +{ +"name": "Regular / TallStem", +"layerName": "Regular / TallStem (layer #4)", +"location": { +"Weight": 90, +"height": 100 +} +}, +{ +"name": "Bold", +"layerName": "Bold (layer #2)", +"location": { +"Weight": 220 +} +}, +{ +"name": "Bold / TallStem", +"layerName": "Bold / TallStem (layer #5)", +"location": { +"Weight": 220, +"height": 100 +} +} +], +"layers": { +"Bold (layer #2)": { +"glyph": { +"path": { +"contours": [ +{ +"points": [ +{ +"x": 250, +"y": 256 +}, +{ +"x": 181, +"y": 385 +}, +{ +"x": 162, +"y": 490 +}, +{ +"x": 30, +"y": 490 +}, +{ +"x": 30, +"y": 0 +}, +{ +"x": 250, +"y": 0 +} +], +"isClosed": true +} +] +}, +"xAdvance": 600 +} +}, +"Bold / TallStem (layer #5)": { +"glyph": { +"path": { +"contours": [ +{ +"points": [ +{ +"x": 250, +"y": 256 +}, +{ +"x": 250, +"y": 385 +}, +{ +"x": 250, +"y": 800 +}, +{ +"x": 30, +"y": 800 +}, +{ +"x": 30, +"y": 0 +}, +{ +"x": 250, +"y": 0 +} +], +"isClosed": true +} +] +}, +"xAdvance": 600 +} +}, +"Light (layer #0)": { +"glyph": { +"path": { +"contours": [ +{ +"points": [ +{ +"x": 117, +"y": 306 +}, +{ +"x": 119, +"y": 368 +}, +{ +"x": 115, +"y": 470 +}, +{ +"x": 100, +"y": 470 +}, +{ +"x": 100, +"y": 0 +}, +{ +"x": 117, +"y": 0 +} +], +"isClosed": true +} +] +}, +"xAdvance": 600 +} +}, +"Light / TallStem (layer #3)": { +"glyph": { +"path": { +"contours": [ +{ +"points": [ +{ +"x": 117, +"y": 306 +}, +{ +"x": 117, +"y": 368 +}, +{ +"x": 117, +"y": 800 +}, +{ +"x": 100, +"y": 800 +}, +{ +"x": 100, +"y": 0 +}, +{ +"x": 117, +"y": 0 +} +], +"isClosed": true +} +] +}, +"xAdvance": 600 +} +}, +"Regular (layer #1)": { +"glyph": { +"path": { +"contours": [ +{ +"points": [ +{ +"x": 167, +"y": 286 +}, +{ +"x": 149, +"y": 393 +}, +{ +"x": 139, +"y": 480 +}, +{ +"x": 77, +"y": 480 +}, +{ +"x": 77, +"y": 0 +}, +{ +"x": 167, +"y": 0 +} +], +"isClosed": true +} +] +}, +"xAdvance": 600 +} +}, +"Regular / TallStem (layer #4)": { +"glyph": { +"path": { +"contours": [ +{ +"points": [ +{ +"x": 167, +"y": 286 +}, +{ +"x": 167, +"y": 393 +}, +{ +"x": 167, +"y": 800 +}, +{ +"x": 77, +"y": 800 +}, +{ +"x": 77, +"y": 0 +}, +{ +"x": 167, +"y": 0 +} +], +"isClosed": true +} +] +}, +"xAdvance": 600 +} +} +} +} diff --git a/tests/data/GlyphsUnitTestSans3.fontra/glyphs/a.json b/tests/data/GlyphsUnitTestSans3.fontra/glyphs/a.json new file mode 100644 index 0000000..7c1b92e --- /dev/null +++ b/tests/data/GlyphsUnitTestSans3.fontra/glyphs/a.json @@ -0,0 +1,927 @@ +{ +"name": "a", +"sources": [ +{ +"name": "Light", +"layerName": "Light (layer #0)", +"location": { +"Weight": 17 +} +}, +{ +"name": "Regular", +"layerName": "Regular (layer #1)", +"location": { +"Weight": 90 +} +}, +{ +"name": "Regular / {155, 100}", +"layerName": "Regular / {155, 100} (layer #3)", +"location": { +"Weight": 155 +} +}, +{ +"name": "Bold", +"layerName": "Bold (layer #2)", +"location": { +"Weight": 220 +} +} +], +"layers": { +"Bold (layer #2)": { +"glyph": { +"path": { +"contours": [ +{ +"points": [ +{ +"x": 268, +"y": 392 +}, +{ +"x": 268, +"y": 153, +"smooth": true +}, +{ +"x": 268, +"y": 123, +"type": "cubic" +}, +{ +"x": 254, +"y": 113, +"type": "cubic" +}, +{ +"x": 236, +"y": 113, +"smooth": true +}, +{ +"x": 214, +"y": 113, +"type": "cubic" +}, +{ +"x": 205, +"y": 127, +"type": "cubic" +}, +{ +"x": 205, +"y": 143, +"smooth": true +}, +{ +"x": 205, +"y": 155, +"type": "cubic" +}, +{ +"x": 210, +"y": 164, +"type": "cubic" +}, +{ +"x": 218, +"y": 170, +"smooth": true +}, +{ +"x": 233, +"y": 181, +"type": "cubic" +}, +{ +"x": 254, +"y": 182, +"type": "cubic" +}, +{ +"x": 275, +"y": 182 +}, +{ +"x": 295, +"y": 289 +}, +{ +"x": 203, +"y": 289, +"type": "cubic" +}, +{ +"x": 123, +"y": 277, +"type": "cubic" +}, +{ +"x": 72, +"y": 240, +"smooth": true +}, +{ +"x": 40, +"y": 216, +"type": "cubic" +}, +{ +"x": 21, +"y": 182, +"type": "cubic" +}, +{ +"x": 21, +"y": 133, +"smooth": true +}, +{ +"x": 21, +"y": 49, +"type": "cubic" +}, +{ +"x": 75, +"y": -8, +"type": "cubic" +}, +{ +"x": 184, +"y": -8, +"smooth": true +}, +{ +"x": 250, +"y": -8, +"type": "cubic" +}, +{ +"x": 288, +"y": 12, +"type": "cubic" +}, +{ +"x": 310, +"y": 44 +}, +{ +"x": 320, +"y": 44 +}, +{ +"x": 336, +"y": 0 +}, +{ +"x": 488, +"y": 0 +}, +{ +"x": 488, +"y": 454 +}, +{ +"x": 437, +"y": 484, +"type": "cubic" +}, +{ +"x": 354, +"y": 505, +"type": "cubic" +}, +{ +"x": 255, +"y": 505, +"smooth": true +}, +{ +"x": 167, +"y": 505, +"type": "cubic" +}, +{ +"x": 86, +"y": 489, +"type": "cubic" +}, +{ +"x": 25, +"y": 461 +}, +{ +"x": 56, +"y": 298 +}, +{ +"x": 90, +"y": 311, +"type": "cubic" +}, +{ +"x": 134, +"y": 322, +"type": "cubic" +}, +{ +"x": 194, +"y": 322, +"smooth": true +}, +{ +"x": 225, +"y": 322, +"type": "cubic" +}, +{ +"x": 270, +"y": 319, +"type": "cubic" +}, +{ +"x": 308, +"y": 305 +} +], +"isClosed": true +} +] +}, +"xAdvance": 518 +} +}, +"Light (layer #0)": { +"glyph": { +"path": { +"contours": [ +{ +"points": [ +{ +"x": 352, +"y": 429 +}, +{ +"x": 352, +"y": 147, +"smooth": true +}, +{ +"x": 352, +"y": 68, +"type": "cubic" +}, +{ +"x": 314, +"y": 7, +"type": "cubic" +}, +{ +"x": 212, +"y": 7, +"smooth": true +}, +{ +"x": 132, +"y": 7, +"type": "cubic" +}, +{ +"x": 97, +"y": 47, +"type": "cubic" +}, +{ +"x": 97, +"y": 105, +"smooth": true +}, +{ +"x": 97, +"y": 136, +"type": "cubic" +}, +{ +"x": 107, +"y": 160, +"type": "cubic" +}, +{ +"x": 125, +"y": 178, +"smooth": true +}, +{ +"x": 166, +"y": 219, +"type": "cubic" +}, +{ +"x": 249, +"y": 224, +"type": "cubic" +}, +{ +"x": 355, +"y": 224 +}, +{ +"x": 355, +"y": 241 +}, +{ +"x": 245, +"y": 241, +"type": "cubic" +}, +{ +"x": 158, +"y": 233, +"type": "cubic" +}, +{ +"x": 113, +"y": 190, +"smooth": true +}, +{ +"x": 92, +"y": 169, +"type": "cubic" +}, +{ +"x": 80, +"y": 141, +"type": "cubic" +}, +{ +"x": 80, +"y": 105, +"smooth": true +}, +{ +"x": 80, +"y": 39, +"type": "cubic" +}, +{ +"x": 119, +"y": -10, +"type": "cubic" +}, +{ +"x": 212, +"y": -10, +"smooth": true +}, +{ +"x": 283, +"y": -10, +"type": "cubic" +}, +{ +"x": 334, +"y": 18, +"type": "cubic" +}, +{ +"x": 349, +"y": 68 +}, +{ +"x": 352, +"y": 68 +}, +{ +"x": 354, +"y": 0 +}, +{ +"x": 369, +"y": 0 +}, +{ +"x": 369, +"y": 428 +}, +{ +"x": 333, +"y": 460, +"type": "cubic" +}, +{ +"x": 291, +"y": 480, +"type": "cubic" +}, +{ +"x": 224, +"y": 480, +"smooth": true +}, +{ +"x": 163, +"y": 480, +"type": "cubic" +}, +{ +"x": 116, +"y": 462, +"type": "cubic" +}, +{ +"x": 82, +"y": 438 +}, +{ +"x": 87, +"y": 423 +}, +{ +"x": 123, +"y": 448, +"type": "cubic" +}, +{ +"x": 167, +"y": 463, +"type": "cubic" +}, +{ +"x": 224, +"y": 463, +"smooth": true +}, +{ +"x": 284, +"y": 463, +"type": "cubic" +}, +{ +"x": 323, +"y": 445, +"type": "cubic" +}, +{ +"x": 355, +"y": 417 +} +], +"isClosed": true +} +] +}, +"xAdvance": 456 +} +}, +"Regular (layer #1)": { +"glyph": { +"path": { +"contours": [ +{ +"points": [ +{ +"x": 333, +"y": 454 +}, +{ +"x": 333, +"y": 176, +"smooth": true +}, +{ +"x": 333, +"y": 119, +"type": "cubic" +}, +{ +"x": 309, +"y": 69, +"type": "cubic" +}, +{ +"x": 231, +"y": 69, +"smooth": true +}, +{ +"x": 170, +"y": 69, +"type": "cubic" +}, +{ +"x": 153, +"y": 99, +"type": "cubic" +}, +{ +"x": 153, +"y": 127, +"smooth": true +}, +{ +"x": 153, +"y": 152, +"type": "cubic" +}, +{ +"x": 166, +"y": 169, +"type": "cubic" +}, +{ +"x": 183, +"y": 179, +"smooth": true +}, +{ +"x": 219, +"y": 200, +"type": "cubic" +}, +{ +"x": 284, +"y": 204, +"type": "cubic" +}, +{ +"x": 338, +"y": 204 +}, +{ +"x": 338, +"y": 282 +}, +{ +"x": 249, +"y": 282, +"type": "cubic" +}, +{ +"x": 193, +"y": 276, +"type": "cubic" +}, +{ +"x": 142, +"y": 251, +"smooth": true +}, +{ +"x": 94, +"y": 227, +"type": "cubic" +}, +{ +"x": 65, +"y": 185, +"type": "cubic" +}, +{ +"x": 65, +"y": 125, +"smooth": true +}, +{ +"x": 65, +"y": 42, +"type": "cubic" +}, +{ +"x": 119, +"y": -11, +"type": "cubic" +}, +{ +"x": 215, +"y": -11, +"smooth": true +}, +{ +"x": 277, +"y": -11, +"type": "cubic" +}, +{ +"x": 310, +"y": 11, +"type": "cubic" +}, +{ +"x": 330, +"y": 41 +}, +{ +"x": 338, +"y": 41 +}, +{ +"x": 346, +"y": 0 +}, +{ +"x": 423, +"y": 0 +}, +{ +"x": 423, +"y": 435 +}, +{ +"x": 383, +"y": 468, +"type": "cubic" +}, +{ +"x": 316, +"y": 492, +"type": "cubic" +}, +{ +"x": 232, +"y": 492, +"smooth": true +}, +{ +"x": 171, +"y": 492, +"type": "cubic" +}, +{ +"x": 116, +"y": 479, +"type": "cubic" +}, +{ +"x": 72, +"y": 460 +}, +{ +"x": 86, +"y": 371 +}, +{ +"x": 122, +"y": 388, +"type": "cubic" +}, +{ +"x": 166, +"y": 400, +"type": "cubic" +}, +{ +"x": 225, +"y": 400, +"smooth": true +}, +{ +"x": 262, +"y": 400, +"type": "cubic" +}, +{ +"x": 312, +"y": 395, +"type": "cubic" +}, +{ +"x": 353, +"y": 361 +} +], +"isClosed": true +} +] +}, +"xAdvance": 496 +} +}, +"Regular / {155, 100} (layer #3)": { +"glyph": { +"path": { +"contours": [ +{ +"points": [ +{ +"x": 301, +"y": 423 +}, +{ +"x": 301, +"y": 174, +"smooth": true +}, +{ +"x": 301, +"y": 129, +"type": "cubic" +}, +{ +"x": 272, +"y": 107, +"type": "cubic" +}, +{ +"x": 224, +"y": 107, +"smooth": true +}, +{ +"x": 182, +"y": 107, +"type": "cubic" +}, +{ +"x": 169, +"y": 123, +"type": "cubic" +}, +{ +"x": 169, +"y": 140, +"smooth": true +}, +{ +"x": 169, +"y": 155, +"type": "cubic" +}, +{ +"x": 178, +"y": 165, +"type": "cubic" +}, +{ +"x": 191, +"y": 172, +"smooth": true +}, +{ +"x": 216, +"y": 185, +"type": "cubic" +}, +{ +"x": 259, +"y": 186, +"type": "cubic" +}, +{ +"x": 307, +"y": 186 +}, +{ +"x": 306, +"y": 298 +}, +{ +"x": 216, +"y": 294, +"type": "cubic" +}, +{ +"x": 148, +"y": 288, +"type": "cubic" +}, +{ +"x": 97, +"y": 255, +"smooth": true +}, +{ +"x": 58, +"y": 230, +"type": "cubic" +}, +{ +"x": 34, +"y": 190, +"type": "cubic" +}, +{ +"x": 34, +"y": 132, +"smooth": true +}, +{ +"x": 34, +"y": 47, +"type": "cubic" +}, +{ +"x": 81, +"y": -10, +"type": "cubic" +}, +{ +"x": 190, +"y": -10, +"smooth": true +}, +{ +"x": 252, +"y": -10, +"type": "cubic" +}, +{ +"x": 297, +"y": 8, +"type": "cubic" +}, +{ +"x": 320, +"y": 42 +}, +{ +"x": 329, +"y": 42 +}, +{ +"x": 341, +"y": 0 +}, +{ +"x": 446, +"y": 0 +}, +{ +"x": 446, +"y": 445 +}, +{ +"x": 400, +"y": 476, +"type": "cubic" +}, +{ +"x": 326, +"y": 499, +"type": "cubic" +}, +{ +"x": 236, +"y": 499, +"smooth": true +}, +{ +"x": 160, +"y": 499, +"type": "cubic" +}, +{ +"x": 92, +"y": 483, +"type": "cubic" +}, +{ +"x": 39, +"y": 461 +}, +{ +"x": 61, +"y": 329 +}, +{ +"x": 96, +"y": 343, +"type": "cubic" +}, +{ +"x": 141, +"y": 355, +"type": "cubic" +}, +{ +"x": 200, +"y": 355, +"smooth": true +}, +{ +"x": 234, +"y": 355, +"type": "cubic" +}, +{ +"x": 281, +"y": 351, +"type": "cubic" +}, +{ +"x": 321, +"y": 327 +} +], +"isClosed": true +} +] +}, +"xAdvance": 496 +} +} +} +} diff --git a/tests/data/GlyphsUnitTestSans3.fontra/glyphs/a.sc.json b/tests/data/GlyphsUnitTestSans3.fontra/glyphs/a.sc.json new file mode 100644 index 0000000..aa1acc8 --- /dev/null +++ b/tests/data/GlyphsUnitTestSans3.fontra/glyphs/a.sc.json @@ -0,0 +1,232 @@ +{ +"name": "a.sc", +"sources": [ +{ +"name": "Light", +"layerName": "Light (layer #0)", +"location": { +"Weight": 17 +} +}, +{ +"name": "Regular", +"layerName": "Regular (layer #1)", +"location": { +"Weight": 90 +} +}, +{ +"name": "Bold", +"layerName": "Bold (layer #2)", +"location": { +"Weight": 220 +} +} +], +"layers": { +"Bold (layer #2)": { +"glyph": { +"path": { +"contours": [ +{ +"points": [ +{ +"x": 608, +"y": 0 +}, +{ +"x": 461, +"y": 552 +}, +{ +"x": 158, +"y": 552 +}, +{ +"x": 5, +"y": 0 +}, +{ +"x": 208, +"y": 0 +}, +{ +"x": 289, +"y": 351 +}, +{ +"x": 312, +"y": 351 +}, +{ +"x": 395, +"y": 0 +} +], +"isClosed": true +}, +{ +"points": [ +{ +"x": 498, +"y": 234 +}, +{ +"x": 122, +"y": 234 +}, +{ +"x": 115, +"y": 65 +}, +{ +"x": 495, +"y": 65 +} +], +"isClosed": true +} +] +}, +"xAdvance": 613 +} +}, +"Light (layer #0)": { +"glyph": { +"path": { +"contours": [ +{ +"points": [ +{ +"x": 445, +"y": 0 +}, +{ +"x": 252, +"y": 528 +}, +{ +"x": 228, +"y": 528 +}, +{ +"x": 33, +"y": 0 +}, +{ +"x": 41, +"y": 0 +}, +{ +"x": 234, +"y": 519 +}, +{ +"x": 247, +"y": 519 +}, +{ +"x": 437, +"y": 0 +} +], +"isClosed": true +}, +{ +"points": [ +{ +"x": 380, +"y": 167 +}, +{ +"x": 99, +"y": 167 +}, +{ +"x": 95, +"y": 159 +}, +{ +"x": 384, +"y": 159 +} +], +"isClosed": true +} +] +}, +"xAdvance": 478 +} +}, +"Regular (layer #1)": { +"glyph": { +"path": { +"contours": [ +{ +"points": [ +{ +"x": 511, +"y": 0 +}, +{ +"x": 357, +"y": 540 +}, +{ +"x": 191, +"y": 540 +}, +{ +"x": 24, +"y": 0 +}, +{ +"x": 119, +"y": 0 +}, +{ +"x": 255, +"y": 448 +}, +{ +"x": 277, +"y": 448 +}, +{ +"x": 414, +"y": 0 +} +], +"isClosed": true +}, +{ +"points": [ +{ +"x": 427, +"y": 208 +}, +{ +"x": 114, +"y": 208 +}, +{ +"x": 111, +"y": 125 +}, +{ +"x": 424, +"y": 125 +} +], +"isClosed": true +} +] +}, +"xAdvance": 535 +} +} +}, +"customData": { +"com.glyphsapp.glyph-color": 10 +} +} diff --git a/tests/data/GlyphsUnitTestSans3.fontra/glyphs/adieresis.json b/tests/data/GlyphsUnitTestSans3.fontra/glyphs/adieresis.json new file mode 100644 index 0000000..ec17c59 --- /dev/null +++ b/tests/data/GlyphsUnitTestSans3.fontra/glyphs/adieresis.json @@ -0,0 +1,77 @@ +{ +"name": "adieresis", +"sources": [ +{ +"name": "Light", +"layerName": "Light (layer #0)", +"location": { +"Weight": 17 +} +}, +{ +"name": "Regular", +"layerName": "Regular (layer #1)", +"location": { +"Weight": 90 +} +}, +{ +"name": "Bold", +"layerName": "Bold (layer #2)", +"location": { +"Weight": 220 +} +} +], +"layers": { +"Bold (layer #2)": { +"glyph": { +"components": [ +{ +"name": "a" +}, +{ +"name": "dieresis", +"transformation": { +"translateX": -9 +} +} +], +"xAdvance": 518 +} +}, +"Light (layer #0)": { +"glyph": { +"components": [ +{ +"name": "a" +}, +{ +"name": "dieresis", +"transformation": { +"translateX": 39, +"translateY": 1 +} +} +], +"xAdvance": 456 +} +}, +"Regular (layer #1)": { +"glyph": { +"components": [ +{ +"name": "a" +}, +{ +"name": "dieresis", +"transformation": { +"translateX": 47 +} +} +], +"xAdvance": 496 +} +} +} +} diff --git a/tests/data/GlyphsUnitTestSans3.fontra/glyphs/dieresis.json b/tests/data/GlyphsUnitTestSans3.fontra/glyphs/dieresis.json new file mode 100644 index 0000000..e7fe491 --- /dev/null +++ b/tests/data/GlyphsUnitTestSans3.fontra/glyphs/dieresis.json @@ -0,0 +1,181 @@ +{ +"name": "dieresis", +"sources": [ +{ +"name": "Light", +"layerName": "Light (layer #0)", +"location": { +"Weight": 17 +} +}, +{ +"name": "Regular", +"layerName": "Regular (layer #1)", +"location": { +"Weight": 90 +} +}, +{ +"name": "Bold", +"layerName": "Bold (layer #2)", +"location": { +"Weight": 220 +} +} +], +"layers": { +"Bold (layer #2)": { +"glyph": { +"path": { +"contours": [ +{ +"points": [ +{ +"x": 482, +"y": 735 +}, +{ +"x": 298, +"y": 735 +}, +{ +"x": 298, +"y": 547 +}, +{ +"x": 482, +"y": 547 +} +], +"isClosed": true +}, +{ +"points": [ +{ +"x": 232, +"y": 735 +}, +{ +"x": 48, +"y": 735 +}, +{ +"x": 48, +"y": 547 +}, +{ +"x": 232, +"y": 547 +} +], +"isClosed": true +} +] +}, +"xAdvance": 600 +} +}, +"Light (layer #0)": { +"glyph": { +"path": { +"contours": [ +{ +"points": [ +{ +"x": 289, +"y": 650 +}, +{ +"x": 261, +"y": 650 +}, +{ +"x": 261, +"y": 621 +}, +{ +"x": 289, +"y": 621 +} +], +"isClosed": true +}, +{ +"points": [ +{ +"x": 116, +"y": 650 +}, +{ +"x": 88, +"y": 650 +}, +{ +"x": 88, +"y": 621 +}, +{ +"x": 116, +"y": 621 +} +], +"isClosed": true +} +] +}, +"xAdvance": 600 +} +}, +"Regular (layer #1)": { +"glyph": { +"path": { +"contours": [ +{ +"points": [ +{ +"x": 349, +"y": 700 +}, +{ +"x": 252, +"y": 700 +}, +{ +"x": 252, +"y": 601 +}, +{ +"x": 349, +"y": 601 +} +], +"isClosed": true +}, +{ +"points": [ +{ +"x": 149, +"y": 700 +}, +{ +"x": 52, +"y": 700 +}, +{ +"x": 52, +"y": 601 +}, +{ +"x": 149, +"y": 601 +} +], +"isClosed": true +} +] +}, +"xAdvance": 600 +} +} +} +} diff --git a/tests/data/GlyphsUnitTestSans3.fontra/glyphs/h.json b/tests/data/GlyphsUnitTestSans3.fontra/glyphs/h.json new file mode 100644 index 0000000..9fceaf0 --- /dev/null +++ b/tests/data/GlyphsUnitTestSans3.fontra/glyphs/h.json @@ -0,0 +1,85 @@ +{ +"name": "h", +"sources": [ +{ +"name": "Light", +"layerName": "Light (layer #0)", +"location": { +"Weight": 17 +} +}, +{ +"name": "Regular", +"layerName": "Regular (layer #1)", +"location": { +"Weight": 90 +} +}, +{ +"name": "Bold", +"layerName": "Bold (layer #2)", +"location": { +"Weight": 220 +} +} +], +"layers": { +"Bold (layer #2)": { +"glyph": { +"components": [ +{ +"name": "_part.stem", +"location": { +"height": 100 +} +}, +{ +"name": "_part.shoulder", +"location": { +"crotchDepth": -80.20097 +} +} +], +"xAdvance": 560 +} +}, +"Light (layer #0)": { +"glyph": { +"components": [ +{ +"name": "_part.stem", +"location": { +"height": 100 +} +}, +{ +"name": "_part.shoulder", +"location": { +"crotchDepth": -80.20097 +} +} +], +"xAdvance": 511 +} +}, +"Regular (layer #1)": { +"glyph": { +"components": [ +{ +"name": "_part.stem", +"location": { +"height": 100 +} +}, +{ +"name": "_part.shoulder", +"location": { +"crotchDepth": -80.20097 +} +} +], +"xAdvance": 532 +} +} +} +} diff --git a/tests/data/GlyphsUnitTestSans3.fontra/glyphs/m.json b/tests/data/GlyphsUnitTestSans3.fontra/glyphs/m.json new file mode 100644 index 0000000..d19ee80 --- /dev/null +++ b/tests/data/GlyphsUnitTestSans3.fontra/glyphs/m.json @@ -0,0 +1,103 @@ +{ +"name": "m", +"sources": [ +{ +"name": "Light", +"layerName": "Light (layer #0)", +"location": { +"Weight": 17 +} +}, +{ +"name": "Regular", +"layerName": "Regular (layer #1)", +"location": { +"Weight": 90 +} +}, +{ +"name": "Bold", +"layerName": "Bold (layer #2)", +"location": { +"Weight": 220 +} +} +], +"layers": { +"Bold (layer #2)": { +"glyph": { +"components": [ +{ +"name": "_part.stem" +}, +{ +"name": "_part.shoulder", +"location": { +"shoulderWidth": 0 +} +}, +{ +"name": "_part.shoulder", +"transformation": { +"translateX": 270 +}, +"location": { +"shoulderWidth": 0 +} +} +], +"xAdvance": 820 +} +}, +"Light (layer #0)": { +"glyph": { +"components": [ +{ +"name": "_part.stem" +}, +{ +"name": "_part.shoulder", +"location": { +"shoulderWidth": 0 +} +}, +{ +"name": "_part.shoulder", +"transformation": { +"translateX": 264 +}, +"location": { +"shoulderWidth": 0 +} +} +], +"xAdvance": 745 +} +}, +"Regular (layer #1)": { +"glyph": { +"components": [ +{ +"name": "_part.stem" +}, +{ +"name": "_part.shoulder", +"location": { +"shoulderWidth": 0 +} +}, +{ +"name": "_part.shoulder", +"transformation": { +"translateX": 258 +}, +"location": { +"shoulderWidth": 0 +} +} +], +"xAdvance": 760 +} +} +} +} diff --git a/tests/data/GlyphsUnitTestSans3.fontra/glyphs/n.json b/tests/data/GlyphsUnitTestSans3.fontra/glyphs/n.json new file mode 100644 index 0000000..2610e3d --- /dev/null +++ b/tests/data/GlyphsUnitTestSans3.fontra/glyphs/n.json @@ -0,0 +1,67 @@ +{ +"name": "n", +"sources": [ +{ +"name": "Light", +"layerName": "Light (layer #0)", +"location": { +"Weight": 17 +} +}, +{ +"name": "Regular", +"layerName": "Regular (layer #1)", +"location": { +"Weight": 90 +} +}, +{ +"name": "Bold", +"layerName": "Bold (layer #2)", +"location": { +"Weight": 220 +} +} +], +"layers": { +"Bold (layer #2)": { +"glyph": { +"components": [ +{ +"name": "_part.shoulder" +}, +{ +"name": "_part.stem" +} +], +"xAdvance": 560 +} +}, +"Light (layer #0)": { +"glyph": { +"components": [ +{ +"name": "_part.shoulder" +}, +{ +"name": "_part.stem" +} +], +"xAdvance": 501 +} +}, +"Regular (layer #1)": { +"glyph": { +"components": [ +{ +"name": "_part.shoulder" +}, +{ +"name": "_part.stem" +} +], +"xAdvance": 528 +} +} +} +} diff --git a/tests/data/fontra-glyphs/A_.json b/tests/data/fontra-glyphs/A_.json deleted file mode 100644 index 4a6424f..0000000 --- a/tests/data/fontra-glyphs/A_.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "name": "A", - "sources": [ - { - "name": "Light", - "layerName": "Light (layer #0)", - "location": { - "Weight": 17 - } - }, - { - "name": "Regular", - "layerName": "Regular (layer #1)", - "location": { - "Weight": 90 - } - }, - { - "name": "Bold", - "layerName": "Bold (layer #2)", - "location": { - "Weight": 220 - } - } - ], - "layers": { - "Light (layer #0)": { - "glyph": { - "path": { - "coordinates": [ - 548, 0, 321, 700, 275, 700, 45, 0, 65, 0, 289, 679, 307, 679, 527, 0, 467, - 225, 128, 225, 123, 207, 472, 207 - ], - "pointTypes": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - "contourInfo": [ - { - "endPoint": 7, - "isClosed": true - }, - { - "endPoint": 11, - "isClosed": true - } - ] - }, - "xAdvance": 593 - } - }, - "Regular (layer #1)": { - "glyph": { - "path": { - "coordinates": [ - 617, 0, 412, 700, 248, 700, 40, 0, 134, 0, 313, 610, 342, 610, 521, 0, 514, - 269, 150, 269, 148, 178, 510, 178 - ], - "pointTypes": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - "contourInfo": [ - { - "endPoint": 7, - "isClosed": true - }, - { - "endPoint": 11, - "isClosed": true - } - ] - }, - "xAdvance": 657 - } - }, - "Bold (layer #2)": { - "glyph": { - "path": { - "coordinates": [ - 733, 0, 555, 700, 205, 700, 20, 0, 253, 0, 356, 470, 385, 470, 491, 0, 600, - 268, 162, 268, 154, 103, 596, 103 - ], - "pointTypes": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - "contourInfo": [ - { - "endPoint": 7, - "isClosed": true - }, - { - "endPoint": 11, - "isClosed": true - } - ] - }, - "xAdvance": 753 - } - } - }, - "customData": { - "com.glyphsapp.glyph-color": [120, 220, 20, 4] - } -} diff --git a/tests/data/fontra-glyphs/A_dieresis.json b/tests/data/fontra-glyphs/A_dieresis.json deleted file mode 100644 index 47d21f1..0000000 --- a/tests/data/fontra-glyphs/A_dieresis.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "name": "Adieresis", - "sources": [ - { - "name": "Light", - "layerName": "Light (layer #0)", - "location": { - "Weight": 17 - } - }, - { - "name": "Regular", - "layerName": "Regular (layer #1)", - "location": { - "Weight": 90 - } - }, - { - "name": "Bold", - "layerName": "Bold (layer #2)", - "location": { - "Weight": 220 - } - } - ], - "layers": { - "Light (layer #0)": { - "glyph": { - "components": [ - { - "name": "A" - }, - { - "name": "dieresis", - "transformation": { - "translateX": 110, - "translateY": 230 - } - } - ], - "xAdvance": 593 - } - }, - "Regular (layer #1)": { - "glyph": { - "components": [ - { - "name": "A" - }, - { - "name": "dieresis", - "transformation": { - "translateX": 128, - "translateY": 220 - } - } - ], - "xAdvance": 657 - } - }, - "Bold (layer #2)": { - "glyph": { - "components": [ - { - "name": "A" - }, - { - "name": "dieresis", - "transformation": { - "translateX": 110, - "translateY": 210 - } - } - ], - "xAdvance": 753 - } - } - } -} diff --git a/tests/data/fontra-glyphs/_part.shoulder.json b/tests/data/fontra-glyphs/_part.shoulder.json deleted file mode 100644 index e070bdb..0000000 --- a/tests/data/fontra-glyphs/_part.shoulder.json +++ /dev/null @@ -1,261 +0,0 @@ -{ - "name": "_part.shoulder", - "axes": [ - { - "name": "crotchDepth", - "minValue": -100, - "defaultValue": 0, - "maxValue": 0 - }, - { - "name": "shoulderWidth", - "minValue": 0, - "defaultValue": 100, - "maxValue": 100 - } - ], - "sources": [ - { - "name": "Light", - "layerName": "Light (layer #0)", - "location": { - "Weight": 17 - } - }, - { - "name": "Light / NarrowShoulder", - "layerName": "Light / NarrowShoulder (layer #3)", - "location": { - "Weight": 17, - "shoulderWidth": 0 - } - }, - { - "name": "Light / LowCrotch", - "layerName": "Light / LowCrotch (layer #4)", - "location": { - "Weight": 17, - "crotchDepth": -100 - } - }, - { - "name": "Regular", - "layerName": "Regular (layer #1)", - "location": { - "Weight": 90 - } - }, - { - "name": "Regular / NarrowShoulder", - "layerName": "Regular / NarrowShoulder (layer #5)", - "location": { - "Weight": 90, - "shoulderWidth": 0 - } - }, - { - "name": "Regular / LowCrotch", - "layerName": "Regular / LowCrotch (layer #6)", - "location": { - "Weight": 90, - "crotchDepth": -100 - } - }, - { - "name": "Bold", - "layerName": "Bold (layer #2)", - "location": { - "Weight": 220 - } - }, - { - "name": "Bold / NarrowShoulder", - "layerName": "Bold / NarrowShoulder (layer #7)", - "location": { - "Weight": 220, - "shoulderWidth": 0 - } - }, - { - "name": "Bold / LowCrotch", - "layerName": "Bold / LowCrotch (layer #8)", - "location": { - "Weight": 220, - "crotchDepth": -100 - } - } - ], - "layers": { - "Light (layer #0)": { - "glyph": { - "path": { - "coordinates": [ - 102, 384, 117, 266, 117, 410, 173, 463, 262, 463, 322, 463, 365, 437, 394, - 408, 394, 0, 411, 0, 411, 414, 377, 450, 333, 479, 262, 479, 169, 479, 132, - 429, 121, 384 - ], - "pointTypes": [0, 0, 2, 2, 8, 2, 2, 0, 0, 0, 0, 2, 2, 8, 2, 2, 0], - "contourInfo": [ - { - "endPoint": 16, - "isClosed": true - } - ] - }, - "xAdvance": 501 - } - }, - "Light / NarrowShoulder (layer #3)": { - "glyph": { - "path": { - "coordinates": [ - 102, 384, 117, 266, 117, 410, 173, 463, 252, 463, 292, 463, 335, 437, 364, - 408, 364, 0, 381, 0, 381, 414, 347, 450, 303, 479, 252, 479, 169, 479, 132, - 429, 121, 384 - ], - "pointTypes": [0, 0, 2, 2, 8, 2, 2, 0, 0, 0, 0, 2, 2, 8, 2, 2, 0], - "contourInfo": [ - { - "endPoint": 16, - "isClosed": true - } - ] - }, - "xAdvance": 501 - } - }, - "Light / LowCrotch (layer #4)": { - "glyph": { - "path": { - "coordinates": [ - 102, 354, 117, 236, 117, 410, 173, 463, 262, 463, 322, 463, 365, 437, 394, - 408, 394, 0, 411, 0, 411, 414, 377, 450, 333, 479, 262, 479, 169, 479, 132, - 429, 121, 354 - ], - "pointTypes": [0, 0, 2, 2, 8, 2, 2, 0, 0, 0, 0, 2, 2, 8, 2, 2, 0], - "contourInfo": [ - { - "endPoint": 16, - "isClosed": true - } - ] - }, - "xAdvance": 501 - } - }, - "Regular (layer #1)": { - "glyph": { - "path": { - "coordinates": [ - 131, 409, 167, 246, 167, 355, 203, 402, 277, 402, 315, 402, 345, 390, 365, - 370, 365, 0, 455, 0, 455, 423, 425, 452, 380, 490, 294, 490, 205, 490, 170, - 452, 155, 409 - ], - "pointTypes": [0, 0, 2, 2, 8, 2, 2, 0, 0, 0, 0, 2, 2, 8, 2, 2, 0], - "contourInfo": [ - { - "endPoint": 16, - "isClosed": true - } - ] - }, - "xAdvance": 528 - } - }, - "Regular / NarrowShoulder (layer #5)": { - "glyph": { - "path": { - "coordinates": [ - 131, 409, 167, 246, 167, 355, 203, 402, 257, 402, 285, 402, 315, 390, 335, - 370, 335, 0, 425, 0, 425, 423, 395, 452, 350, 490, 274, 490, 205, 490, 170, - 452, 155, 409 - ], - "pointTypes": [0, 0, 2, 2, 8, 2, 2, 0, 0, 0, 0, 2, 2, 8, 2, 2, 0], - "contourInfo": [ - { - "endPoint": 16, - "isClosed": true - } - ] - }, - "xAdvance": 528 - } - }, - "Regular / LowCrotch (layer #6)": { - "glyph": { - "path": { - "coordinates": [ - 131, 379, 167, 216, 167, 325, 203, 402, 277, 402, 315, 402, 345, 390, 365, - 370, 365, 0, 455, 0, 455, 423, 425, 452, 380, 490, 294, 490, 205, 490, 170, - 452, 155, 379 - ], - "pointTypes": [0, 0, 2, 2, 8, 2, 2, 0, 0, 0, 0, 2, 2, 8, 2, 2, 0], - "contourInfo": [ - { - "endPoint": 16, - "isClosed": true - } - ] - }, - "xAdvance": 528 - } - }, - "Bold (layer #2)": { - "glyph": { - "path": { - "coordinates": [ - 162, 401, 250, 229, 250, 268, 259, 283, 284, 283, 295, 283, 304, 280, 310, - 276, 310, 0, 530, 0, 530, 448, 490, 478, 430, 501, 357, 501, 259, 501, 209, - 461, 188, 401 - ], - "pointTypes": [0, 0, 2, 2, 8, 2, 2, 0, 0, 0, 0, 2, 2, 8, 2, 2, 0], - "contourInfo": [ - { - "endPoint": 16, - "isClosed": true - } - ] - }, - "xAdvance": 560 - } - }, - "Bold / NarrowShoulder (layer #7)": { - "glyph": { - "path": { - "coordinates": [ - 162, 401, 250, 229, 250, 268, 259, 283, 274, 283, 285, 283, 294, 280, 300, - 276, 300, 0, 520, 0, 520, 448, 480, 478, 420, 501, 347, 501, 259, 501, 209, - 461, 188, 401 - ], - "pointTypes": [0, 0, 2, 2, 8, 2, 2, 0, 0, 0, 0, 2, 2, 8, 2, 2, 0], - "contourInfo": [ - { - "endPoint": 16, - "isClosed": true - } - ] - }, - "xAdvance": 560 - } - }, - "Bold / LowCrotch (layer #8)": { - "glyph": { - "path": { - "coordinates": [ - 162, 371, 250, 199, 250, 251, 259, 283, 284, 283, 295, 283, 304, 280, 310, - 276, 310, 0, 530, 0, 530, 448, 490, 478, 430, 501, 357, 501, 259, 501, 209, - 461, 188, 371 - ], - "pointTypes": [0, 0, 2, 2, 8, 2, 2, 0, 0, 0, 0, 2, 2, 8, 2, 2, 0], - "contourInfo": [ - { - "endPoint": 16, - "isClosed": true - } - ] - }, - "xAdvance": 560 - } - } - } -} diff --git a/tests/data/fontra-glyphs/_part.stem.json b/tests/data/fontra-glyphs/_part.stem.json deleted file mode 100644 index e1b1d67..0000000 --- a/tests/data/fontra-glyphs/_part.stem.json +++ /dev/null @@ -1,150 +0,0 @@ -{ - "name": "_part.stem", - "axes": [ - { - "name": "height", - "minValue": 0, - "defaultValue": 0, - "maxValue": 100 - } - ], - "sources": [ - { - "name": "Light", - "layerName": "Light (layer #0)", - "location": { - "Weight": 17 - } - }, - { - "name": "Light / TallStem", - "layerName": "Light / TallStem (layer #3)", - "location": { - "Weight": 17, - "height": 100 - } - }, - { - "name": "Regular", - "layerName": "Regular (layer #1)", - "location": { - "Weight": 90 - } - }, - { - "name": "Regular / TallStem", - "layerName": "Regular / TallStem (layer #4)", - "location": { - "Weight": 90, - "height": 100 - } - }, - { - "name": "Bold", - "layerName": "Bold (layer #2)", - "location": { - "Weight": 220 - } - }, - { - "name": "Bold / TallStem", - "layerName": "Bold / TallStem (layer #5)", - "location": { - "Weight": 220, - "height": 100 - } - } - ], - "layers": { - "Light (layer #0)": { - "glyph": { - "path": { - "coordinates": [117, 306, 119, 368, 115, 470, 100, 470, 100, 0, 117, 0], - "pointTypes": [0, 0, 0, 0, 0, 0], - "contourInfo": [ - { - "endPoint": 5, - "isClosed": true - } - ] - }, - "xAdvance": 600 - } - }, - "Light / TallStem (layer #3)": { - "glyph": { - "path": { - "coordinates": [117, 306, 117, 368, 117, 800, 100, 800, 100, 0, 117, 0], - "pointTypes": [0, 0, 0, 0, 0, 0], - "contourInfo": [ - { - "endPoint": 5, - "isClosed": true - } - ] - }, - "xAdvance": 600 - } - }, - "Regular (layer #1)": { - "glyph": { - "path": { - "coordinates": [167, 286, 149, 393, 139, 480, 77, 480, 77, 0, 167, 0], - "pointTypes": [0, 0, 0, 0, 0, 0], - "contourInfo": [ - { - "endPoint": 5, - "isClosed": true - } - ] - }, - "xAdvance": 600 - } - }, - "Regular / TallStem (layer #4)": { - "glyph": { - "path": { - "coordinates": [167, 286, 167, 393, 167, 800, 77, 800, 77, 0, 167, 0], - "pointTypes": [0, 0, 0, 0, 0, 0], - "contourInfo": [ - { - "endPoint": 5, - "isClosed": true - } - ] - }, - "xAdvance": 600 - } - }, - "Bold (layer #2)": { - "glyph": { - "path": { - "coordinates": [250, 256, 181, 385, 162, 490, 30, 490, 30, 0, 250, 0], - "pointTypes": [0, 0, 0, 0, 0, 0], - "contourInfo": [ - { - "endPoint": 5, - "isClosed": true - } - ] - }, - "xAdvance": 600 - } - }, - "Bold / TallStem (layer #5)": { - "glyph": { - "path": { - "coordinates": [250, 256, 250, 385, 250, 800, 30, 800, 30, 0, 250, 0], - "pointTypes": [0, 0, 0, 0, 0, 0], - "contourInfo": [ - { - "endPoint": 5, - "isClosed": true - } - ] - }, - "xAdvance": 600 - } - } - } -} diff --git a/tests/data/fontra-glyphs/a.json b/tests/data/fontra-glyphs/a.json deleted file mode 100644 index 4cb2b5e..0000000 --- a/tests/data/fontra-glyphs/a.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "name": "a", - "sources": [ - { - "name": "Light", - "layerName": "Light (layer #0)", - "location": { - "Weight": 17 - } - }, - { - "name": "Regular", - "layerName": "Regular (layer #1)", - "location": { - "Weight": 90 - } - }, - { - "name": "Regular / {155, 100}", - "layerName": "Regular / {155, 100} (layer #3)", - "location": { - "Weight": 155.0 - } - }, - { - "name": "Bold", - "layerName": "Bold (layer #2)", - "location": { - "Weight": 220 - } - } - ], - "layers": { - "Light (layer #0)": { - "glyph": { - "path": { - "coordinates": [ - 352, 429, 352, 147, 352, 68, 314, 7, 212, 7, 132, 7, 97, 47, 97, 105, 97, - 136, 107, 160, 125, 178, 166, 219, 249, 224, 355, 224, 355, 241, 245, 241, - 158, 233, 113, 190, 92, 169, 80, 141, 80, 105, 80, 39, 119, -10, 212, -10, - 283, -10, 334, 18, 349, 68, 352, 68, 354, 0, 369, 0, 369, 428, 333, 460, - 291, 480, 224, 480, 163, 480, 116, 462, 82, 438, 87, 423, 123, 448, 167, - 463, 224, 463, 284, 463, 323, 445, 355, 417 - ], - "pointTypes": [ - 0, 8, 2, 2, 8, 2, 2, 8, 2, 2, 8, 2, 2, 0, 0, 2, 2, 8, 2, 2, 8, 2, 2, 8, 2, - 2, 0, 0, 0, 0, 0, 2, 2, 8, 2, 2, 0, 0, 2, 2, 8, 2, 2, 0 - ], - "contourInfo": [ - { - "endPoint": 43, - "isClosed": true - } - ] - }, - "xAdvance": 456 - } - }, - "Regular (layer #1)": { - "glyph": { - "path": { - "coordinates": [ - 333, 454, 333, 176, 333, 119, 309, 69, 231, 69, 170, 69, 153, 99, 153, 127, - 153, 152, 166, 169, 183, 179, 219, 200, 284, 204, 338, 204, 338, 282, 249, - 282, 193, 276, 142, 251, 94, 227, 65, 185, 65, 125, 65, 42, 119, -11, 215, - -11, 277, -11, 310, 11, 330, 41, 338, 41, 346, 0, 423, 0, 423, 435, 383, - 468, 316, 492, 232, 492, 171, 492, 116, 479, 72, 460, 86, 371, 122, 388, - 166, 400, 225, 400, 262, 400, 312, 395, 353, 361 - ], - "pointTypes": [ - 0, 8, 2, 2, 8, 2, 2, 8, 2, 2, 8, 2, 2, 0, 0, 2, 2, 8, 2, 2, 8, 2, 2, 8, 2, - 2, 0, 0, 0, 0, 0, 2, 2, 8, 2, 2, 0, 0, 2, 2, 8, 2, 2, 0 - ], - "contourInfo": [ - { - "endPoint": 43, - "isClosed": true - } - ] - }, - "xAdvance": 496 - } - }, - "Regular / {155, 100} (layer #3)": { - "glyph": { - "path": { - "coordinates": [ - 301, 423, 301, 174, 301, 129, 272, 107, 224, 107, 182, 107, 169, 123, 169, - 140, 169, 155, 178, 165, 191, 172, 216, 185, 259, 186, 307, 186, 306, 298, - 216, 294, 148, 288, 97, 255, 58, 230, 34, 190, 34, 132, 34, 47, 81, -10, - 190, -10, 252, -10, 297, 8, 320, 42, 329, 42, 341, 0, 446, 0, 446, 445, 400, - 476, 326, 499, 236, 499, 160, 499, 92, 483, 39, 461, 61, 329, 96, 343, 141, - 355, 200, 355, 234, 355, 281, 351, 321, 327 - ], - "pointTypes": [ - 0, 8, 2, 2, 8, 2, 2, 8, 2, 2, 8, 2, 2, 0, 0, 2, 2, 8, 2, 2, 8, 2, 2, 8, 2, - 2, 0, 0, 0, 0, 0, 2, 2, 8, 2, 2, 0, 0, 2, 2, 8, 2, 2, 0 - ], - "contourInfo": [ - { - "endPoint": 43, - "isClosed": true - } - ] - }, - "xAdvance": 496 - } - }, - "Bold (layer #2)": { - "glyph": { - "path": { - "coordinates": [ - 268, 392, 268, 153, 268, 123, 254, 113, 236, 113, 214, 113, 205, 127, 205, - 143, 205, 155, 210, 164, 218, 170, 233, 181, 254, 182, 275, 182, 295, 289, - 203, 289, 123, 277, 72, 240, 40, 216, 21, 182, 21, 133, 21, 49, 75, -8, 184, - -8, 250, -8, 288, 12, 310, 44, 320, 44, 336, 0, 488, 0, 488, 454, 437, 484, - 354, 505, 255, 505, 167, 505, 86, 489, 25, 461, 56, 298, 90, 311, 134, 322, - 194, 322, 225, 322, 270, 319, 308, 305 - ], - "pointTypes": [ - 0, 8, 2, 2, 8, 2, 2, 8, 2, 2, 8, 2, 2, 0, 0, 2, 2, 8, 2, 2, 8, 2, 2, 8, 2, - 2, 0, 0, 0, 0, 0, 2, 2, 8, 2, 2, 0, 0, 2, 2, 8, 2, 2, 0 - ], - "contourInfo": [ - { - "endPoint": 43, - "isClosed": true - } - ] - }, - "xAdvance": 518 - } - } - } -} diff --git a/tests/data/fontra-glyphs/a.sc.json b/tests/data/fontra-glyphs/a.sc.json deleted file mode 100644 index 1ae6c5f..0000000 --- a/tests/data/fontra-glyphs/a.sc.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "name": "a.sc", - "sources": [ - { - "name": "Light", - "layerName": "Light (layer #0)", - "location": { - "Weight": 17 - } - }, - { - "name": "Regular", - "layerName": "Regular (layer #1)", - "location": { - "Weight": 90 - } - }, - { - "name": "Bold", - "layerName": "Bold (layer #2)", - "location": { - "Weight": 220 - } - } - ], - "layers": { - "Light (layer #0)": { - "glyph": { - "path": { - "coordinates": [ - 445, 0, 252, 528, 228, 528, 33, 0, 41, 0, 234, 519, 247, 519, 437, 0, 380, - 167, 99, 167, 95, 159, 384, 159 - ], - "pointTypes": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - "contourInfo": [ - { - "endPoint": 7, - "isClosed": true - }, - { - "endPoint": 11, - "isClosed": true - } - ] - }, - "xAdvance": 478 - } - }, - "Regular (layer #1)": { - "glyph": { - "path": { - "coordinates": [ - 511, 0, 357, 540, 191, 540, 24, 0, 119, 0, 255, 448, 277, 448, 414, 0, 427, - 208, 114, 208, 111, 125, 424, 125 - ], - "pointTypes": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - "contourInfo": [ - { - "endPoint": 7, - "isClosed": true - }, - { - "endPoint": 11, - "isClosed": true - } - ] - }, - "xAdvance": 535 - } - }, - "Bold (layer #2)": { - "glyph": { - "path": { - "coordinates": [ - 608, 0, 461, 552, 158, 552, 5, 0, 208, 0, 289, 351, 312, 351, 395, 0, 498, - 234, 122, 234, 115, 65, 495, 65 - ], - "pointTypes": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - "contourInfo": [ - { - "endPoint": 7, - "isClosed": true - }, - { - "endPoint": 11, - "isClosed": true - } - ] - }, - "xAdvance": 613 - } - } - }, - "customData": { - "com.glyphsapp.glyph-color": 10 - } -} diff --git a/tests/data/fontra-glyphs/adieresis.json b/tests/data/fontra-glyphs/adieresis.json deleted file mode 100644 index 24aa49b..0000000 --- a/tests/data/fontra-glyphs/adieresis.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "name": "adieresis", - "sources": [ - { - "name": "Light", - "layerName": "Light (layer #0)", - "location": { - "Weight": 17 - } - }, - { - "name": "Regular", - "layerName": "Regular (layer #1)", - "location": { - "Weight": 90 - } - }, - { - "name": "Bold", - "layerName": "Bold (layer #2)", - "location": { - "Weight": 220 - } - } - ], - "layers": { - "Light (layer #0)": { - "glyph": { - "components": [ - { - "name": "a" - }, - { - "name": "dieresis", - "transformation": { - "translateX": 39, - "translateY": 1 - } - } - ], - "xAdvance": 456 - } - }, - "Regular (layer #1)": { - "glyph": { - "components": [ - { - "name": "a" - }, - { - "name": "dieresis", - "transformation": { - "translateX": 47 - } - } - ], - "xAdvance": 496 - } - }, - "Bold (layer #2)": { - "glyph": { - "components": [ - { - "name": "a" - }, - { - "name": "dieresis", - "transformation": { - "translateX": -9 - } - } - ], - "xAdvance": 518 - } - } - } -} diff --git a/tests/data/fontra-glyphs/dieresis.json b/tests/data/fontra-glyphs/dieresis.json deleted file mode 100644 index 42745ff..0000000 --- a/tests/data/fontra-glyphs/dieresis.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "name": "dieresis", - "sources": [ - { - "name": "Light", - "layerName": "Light (layer #0)", - "location": { - "Weight": 17 - } - }, - { - "name": "Regular", - "layerName": "Regular (layer #1)", - "location": { - "Weight": 90 - } - }, - { - "name": "Bold", - "layerName": "Bold (layer #2)", - "location": { - "Weight": 220 - } - } - ], - "layers": { - "Light (layer #0)": { - "glyph": { - "path": { - "coordinates": [ - 289, 650, 261, 650, 261, 621, 289, 621, 116, 650, 88, 650, 88, 621, 116, 621 - ], - "pointTypes": [0, 0, 0, 0, 0, 0, 0, 0], - "contourInfo": [ - { - "endPoint": 3, - "isClosed": true - }, - { - "endPoint": 7, - "isClosed": true - } - ] - }, - "xAdvance": 600 - } - }, - "Regular (layer #1)": { - "glyph": { - "path": { - "coordinates": [ - 349, 700, 252, 700, 252, 601, 349, 601, 149, 700, 52, 700, 52, 601, 149, 601 - ], - "pointTypes": [0, 0, 0, 0, 0, 0, 0, 0], - "contourInfo": [ - { - "endPoint": 3, - "isClosed": true - }, - { - "endPoint": 7, - "isClosed": true - } - ] - }, - "xAdvance": 600 - } - }, - "Bold (layer #2)": { - "glyph": { - "path": { - "coordinates": [ - 482, 735, 298, 735, 298, 547, 482, 547, 232, 735, 48, 735, 48, 547, 232, 547 - ], - "pointTypes": [0, 0, 0, 0, 0, 0, 0, 0], - "contourInfo": [ - { - "endPoint": 3, - "isClosed": true - }, - { - "endPoint": 7, - "isClosed": true - } - ] - }, - "xAdvance": 600 - } - } - } -} diff --git a/tests/data/fontra-glyphs/h.json b/tests/data/fontra-glyphs/h.json deleted file mode 100644 index f02e217..0000000 --- a/tests/data/fontra-glyphs/h.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "name": "h", - "sources": [ - { - "name": "Light", - "layerName": "Light (layer #0)", - "location": { - "Weight": 17 - } - }, - { - "name": "Regular", - "layerName": "Regular (layer #1)", - "location": { - "Weight": 90 - } - }, - { - "name": "Bold", - "layerName": "Bold (layer #2)", - "location": { - "Weight": 220 - } - } - ], - "layers": { - "Light (layer #0)": { - "glyph": { - "components": [ - { - "name": "_part.stem", - "location": { - "height": 100 - } - }, - { - "name": "_part.shoulder", - "location": { - "crotchDepth": -80.20097 - } - } - ], - "xAdvance": 511 - } - }, - "Regular (layer #1)": { - "glyph": { - "components": [ - { - "name": "_part.stem", - "location": { - "height": 100 - } - }, - { - "name": "_part.shoulder", - "location": { - "crotchDepth": -80.20097 - } - } - ], - "xAdvance": 532 - } - }, - "Bold (layer #2)": { - "glyph": { - "components": [ - { - "name": "_part.stem", - "location": { - "height": 100 - } - }, - { - "name": "_part.shoulder", - "location": { - "crotchDepth": -80.20097 - } - } - ], - "xAdvance": 560 - } - } - } -} diff --git a/tests/data/fontra-glyphs/m.json b/tests/data/fontra-glyphs/m.json deleted file mode 100644 index 12b33d3..0000000 --- a/tests/data/fontra-glyphs/m.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "name": "m", - "sources": [ - { - "name": "Light", - "layerName": "Light (layer #0)", - "location": { - "Weight": 17 - } - }, - { - "name": "Regular", - "layerName": "Regular (layer #1)", - "location": { - "Weight": 90 - } - }, - { - "name": "Bold", - "layerName": "Bold (layer #2)", - "location": { - "Weight": 220 - } - } - ], - "layers": { - "Light (layer #0)": { - "glyph": { - "components": [ - { - "name": "_part.stem" - }, - { - "name": "_part.shoulder", - "location": { - "shoulderWidth": 0 - } - }, - { - "name": "_part.shoulder", - "transformation": { - "translateX": 264 - }, - "location": { - "shoulderWidth": 0 - } - } - ], - "xAdvance": 745 - } - }, - "Regular (layer #1)": { - "glyph": { - "components": [ - { - "name": "_part.stem" - }, - { - "name": "_part.shoulder", - "location": { - "shoulderWidth": 0 - } - }, - { - "name": "_part.shoulder", - "transformation": { - "translateX": 258 - }, - "location": { - "shoulderWidth": 0 - } - } - ], - "xAdvance": 760 - } - }, - "Bold (layer #2)": { - "glyph": { - "components": [ - { - "name": "_part.stem" - }, - { - "name": "_part.shoulder", - "location": { - "shoulderWidth": 0 - } - }, - { - "name": "_part.shoulder", - "transformation": { - "translateX": 270 - }, - "location": { - "shoulderWidth": 0 - } - } - ], - "xAdvance": 820 - } - } - } -} diff --git a/tests/data/fontra-glyphs/n.json b/tests/data/fontra-glyphs/n.json deleted file mode 100644 index 5475ac8..0000000 --- a/tests/data/fontra-glyphs/n.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "name": "n", - "sources": [ - { - "name": "Light", - "layerName": "Light (layer #0)", - "location": { - "Weight": 17 - } - }, - { - "name": "Regular", - "layerName": "Regular (layer #1)", - "location": { - "Weight": 90 - } - }, - { - "name": "Bold", - "layerName": "Bold (layer #2)", - "location": { - "Weight": 220 - } - } - ], - "layers": { - "Light (layer #0)": { - "glyph": { - "components": [ - { - "name": "_part.shoulder" - }, - { - "name": "_part.stem" - } - ], - "xAdvance": 501 - } - }, - "Regular (layer #1)": { - "glyph": { - "components": [ - { - "name": "_part.shoulder" - }, - { - "name": "_part.stem" - } - ], - "xAdvance": 528 - } - }, - "Bold (layer #2)": { - "glyph": { - "components": [ - { - "name": "_part.shoulder" - }, - { - "name": "_part.stem" - } - ], - "xAdvance": 560 - } - } - } -} diff --git a/tests/test_backend.py b/tests/test_backend.py index 7c29272..027abe5 100644 --- a/tests/test_backend.py +++ b/tests/test_backend.py @@ -12,7 +12,7 @@ glyphs3Path = dataDir / "GlyphsUnitTestSans3.glyphs" glyphsPackagePath = dataDir / "GlyphsUnitTestSans3.glyphspackage" -expectedGlyphDataDir = dataDir / "fontra-glyphs" +expectedGlyphDataDir = dataDir / "GlyphsUnitTestSans3.fontra" @pytest.fixture(scope="module", params=[glyphs2Path, glyphs3Path, glyphsPackagePath]) @@ -108,7 +108,7 @@ async def test_glyphRead(testFont, glyphName): # glyphsLib doesn't read the color attr from Glyphs-2 files, # so let's monkeypatch the data glyph.customData = {"com.glyphsapp.glyph-color": [120, 220, 20, 4]} - glyphPath = expectedGlyphDataDir / userNameToFileName(glyphName, suffix=".json") + glyphPath = expectedGlyphDataDir / 'glyphs' / userNameToFileName(glyphName, suffix=".json") glyphDict = json.loads(json.dumps(unstructure(glyph))) # glyphPath.write_text(json.dumps(glyphDict, indent=2)) expectedGlyphDict = json.loads(glyphPath.read_text())