Closed twardoch closed 5 years ago
And Test.stylespace
in YAML is:
axes:
- name: Weight
tag: wght
locations:
- name: XLight
value: 200
- name: Light
value: 300
- name:
en: Regular
de: Regulär
value: 400
linked_value: 700
flags:
- ElidableAxisValueName
- name: Semi Bold
value: 600
- name:
en: Bold
value: 700
- name: Black
value: 900
range:
- 701
- 900
- name: Italic
tag: ital
locations:
- name: Upright
value: 0
linked_value: 1
flags:
- ElidableAxisValueName
- name: Italic
value: 1
locations:
- name: ASDF
axis_values:
Weight: 333
Italic: 1
- name: fgfg
axis_values:
Weight: 650
Italic: 0.5
flags:
- ElidableAxisValueName
(You can of course have comments there.)
plist
are somewhat ugh, yes. I kept that because UFOs use plists and I didn't want to introduce yet another format. Now I was actually thinking of implementing a try/except thing that loads a .designspace with the yaml
, json
and plistlib
modules until something returns something. The caveat would be that your file has to load in at least one module 😁
Well, I actually think a good "filter" could work as well. I made my yaplon to work with piping, but even without that, I think font=Lato3UprMM; yaml22plist -i $font.stylespace.yaml -o $font.stylespace && statmake $font.stylespace $font.designspace $font-VF.ttf;
works decently.
Sure, if your build system is set up to use that. Do you need anything from statmake's side for this?
No, not really. I kind of agree that it should stay plist (esp. since then it really is compatible with being included in .designspace lib). I thought for human readability, the YAML notation is just easier to follow, so I posted the issue for other people's benefit. This might be some wiki entry.
yaplon
is mentioned in the Readme now.
I’ve written a small commandline tool
yaplon
that comes with a CLI commandyaml22plist
, because I truly hate writing .plist (including .stylespace) by hand.So now I can write my stylespace like this:
or this:
and via
yaml2plist -i Lato.stylespace.yaml -o Lato.stylespace
, I get