So we have:
descriptor.filename: the path to the UFO, relative to the documentpath
descriptor.path: the resolved, absolute path to the UFO
This means we have to be aware of a couple of situations, described in updatePaths() and testPatgNameResolve().
Case 1: both filename and path attributes are None. Action: write the descriptor as is, without filename attr.
Case 2: filename attribute points somewhere, but the path attribute is None. So we can't actually verify if the UFO really exists, but we don't have to. Action: write the filename attribute as is. We could calculate a new path though.
Case 3: filename attribute is None, path attribute has a path. So there is no legacy value for filename that we need to look out for. Action: we can calculate a new relative path and store that in filename.
Case 4: filename and path attributes are not None, but they're in conflict, pointing to different places/ So the absolute path of the UFO and the absolute path of the document produce a different relative path than is stored in filename. One of them must be wrong.
When a new filename is set, make sure to set the path attribute to None and vice versa.
- self_strictAxisNames controls whether unknown axis names are ignored when reading locations.
- if we don't have any axes in the document then we don't know the axis names, but we still need to read locations.
- after reading all locations we can then reconstruct axis objects.
- also set the copyInfo flag after choosing one.
__removeAxesFromDesignSpace(path) takes a designspace path, reads the file and deletes the <axes> element. This is to make a test file for reading a file without axes.
- independent reader / writer object for designspace documents.
- imports and exports easy to subclass objects for instance, source and axis data.
- roundtrips
- intended to be compatible with use in MutatorMath, Superpolatpor and varlib.