16 Commits

Author SHA1 Message Date
Erik
f74eae0ef3 Add classmethods for making source and instance descriptors. 2016-12-09 08:29:39 -08:00
Erik
fcdf6c8d93 Option to overwrite existing axes, or define new ones. 2016-12-02 20:39:31 +01:00
Erik
ea8c1270a5 When a document is read that has no axis definitions, there were no axis names to compare the locations to.
- 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.
2016-12-02 16:53:39 +01:00
Erik
e3cd7dd48b - check if a document has a default master define, repair if necessary.
- check if a document has axes defined, repair if necessary.
2016-12-02 12:22:07 +01:00
Erik
a854b170b6 - normalise the glyph instance location.
- normalise the glyph masters' location.
2016-11-28 22:29:14 +01:00
Erik
d1da75d3e3 Normalise the axis.map outputValues. 2016-11-28 17:18:36 +01:00
Erik
1b6ae36bab Initial commit for a normalize() method.
- instance locations
- source locations
- axis extremes and default values.

todo:
axis.map values.
2016-11-28 17:12:46 +01:00
Erik
448dd36973 Add an example on scripting with designSpaceDocument. 2016-11-26 14:45:56 +01:00
Erik
9abd4beec1 Convenience method that returns font objects for all the existing sources in the document. Defaults to defcon font object, but you can BYO. 2016-11-22 22:47:34 +01:00
Erik
733c4ea755 Smaller check. 2016-11-20 15:48:22 +01:00
Erik
079771dd76 Merge branch 'master' of https://github.com/LettError/designSpaceDocument
# Conflicts:
#	Lib/designSpaceDocument/__init__.py
2016-11-20 10:14:25 +01:00
Erik
8a0ad4bac8 - changed axis "labelName" element name to lowercase.
- actually also read the labelnames.
- added tests for axis data roundttrip
2016-11-20 10:05:55 +01:00
Denis Moyogo Jacquerye
050f5731b2 py23: unicode_literals 2016-11-15 20:17:57 +00:00
Denis Moyogo Jacquerye
a62918cb72 py23: print function 2016-11-15 20:16:48 +00:00
Denis Moyogo Jacquerye
6770d6a02f whitespace 2016-11-15 20:15:04 +00:00
Erik
2fbdd37362 Initial commit
- 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.
2016-11-15 13:27:39 +01:00