Repository navigation
Fix loading designspace libs containing data or date values - #419
Merged
Merged
Conversation
We were asking serde for a borrowed str, which the reader-backed deserializer used by load can never produce, so any designspace with a <data> or <date> in a lib failed to load. Also strip indentation inside <data>, which plistlib emits.
Merged
anthrotype
approved these changes
Sep 25, 2026
Comment on lines
+315
to
+317
| // per line, and other writers (e.g. python's plistlib) also indent | ||
| // each line. If this is multiline, we need to strip all of that | ||
| // whitespace before decoding: |
Collaborator
There was a problem hiding this comment.
fontTools wraps the base64 at 76 columns with each line indented and the payload on its own lines, whereas norad emits it unwrapped on one line.
Also in fonttools empty data is <data></data> versus norad's self-closing <data/>. Both are valid, it would only matter for workflow that rely on exact string diffing. And it is pre-existing, so not blocking this.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We were asking serde for a borrowed str, which the reader-backed deserializer used by load can never produce, so any designspace with a or in a lib failed to load. Also strip indentation inside , which plistlib emits.
I screwed up earlier: my #418 branch was actually PR'd onto this, but I'd never PR'd this itself, so doing that now and then i'll reopen the designspace bit.