Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to read new format="4.0" as a float #117

Merged
merged 1 commit into from
Jun 7, 2018

Conversation

anthrotype
Copy link
Collaborator

In fonttools/fonttools@ceb41ec (still unreleased), @LettError changed the designspace document "format" field from an integer "3" to a float "4.0".

Using mutatorMath DesignSpaceDocumentReader with a designspace file that was generated by the new fontTools.designspaceLib (with format "4.0"), currently throws a ValueError.
GlyphsLib uses fonttools.designspaceLib to create designspace documents, and fontmake (still) uses mutatorMath for instantiating UFOs.

I undersand we want to move away from relying on mutatorMath's own UFO processing (#113) in favour of ufoProcessor. However, we need some time before we can update fontmake to use that. And before then we need to be able to release the new fonttools without breaking fontmake because of mutatorMath..

This patch allows to read in a 4.0 designspace document without the error. Note that the only new feature added to 4.0 is the conditionset elements in the rules, but mutatorMath itself does not read the rules elements, so this change should be innocuous.

PTAL, thanks.

@anthrotype anthrotype requested a review from LettError June 6, 2018 15:11
@coveralls
Copy link

coveralls commented Jun 6, 2018

Coverage Status

Coverage decreased (-0.1%) to 88.042% when pulling 669b71c on anthrotype:format-float into 6aa2924 on LettError:master.

@anthrotype
Copy link
Collaborator Author

I think this is trivial change so I'll go on and merge, then cut a bugfix release

@anthrotype anthrotype merged commit 9c2ec50 into LettError:master Jun 7, 2018
@anthrotype anthrotype deleted the format-float branch June 7, 2018 09:55
anthrotype added a commit that referenced this pull request Jun 7, 2018
- Assume incoming locations might be plain dicts and wrap them (#110).
- Don't fail when reading designspace documents with `format` attribute
  formatted as a float, as in latest designspace spec (#117).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants