-
Notifications
You must be signed in to change notification settings - Fork 1
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
Evaluate UFO source format diffs across commonly used UFO serializers #4
Comments
Norad v0.4.0 chrissimpkins/ufo-format-diff#1 |
ufonormalizer v0.5.4 chrissimpkins/ufo-format-diff#3 |
ufoLib2 v0.11.1 chrissimpkins/ufo-format-diff#5 |
norad v0.4.0 after ufonormalizer v0.5.4 (shows diff between ufofmt/norad and ufonormalizer formatted sources) |
defcon v0.8.1 chrissimpkins/ufo-format-diff#9 |
So... funny question. What is the expected behaviour around line endings? Should the tool use the appropriate line ending for the current target platform, or should it (say) always use unix-style line endings? This has come up because I noticed that one of the test files in norad, If this is a convention we are expected to respect, things will be slightly more complicated... |
Good question. I didn't notice that. IMO it would be best to stick with a single approach that does not introduce a platform-specific diff with norad writes on different platforms. I think that Win and *nix users of Runebender would appreciate that in collaborative projects. This seems to make sense for cross-platform UFO formatting with an autoformatter on sources created by other tools too. @madig @belluzj @anthrotype do you know if ufonormalizer writes platform-specific line endings? If so, is this intentional/desirable? A bug? |
It looks like the intent may be to write with unix style newline char everywhere? |
Okay, there may have been something else going on in that test file, I'm not sure of its full origin story. |
It does indeed enforce Unix line endings. |
I am irrationally annoyed about another behaviour of |
I've opened an issue there (unified-font-object/ufoNormalizer#84) to see if there's something here that I'm overlooking. |
Are you explicitly trimming those |
I'm not sure I understand. Norad (currently) serializes the contents of notes directly, and does not modify whitespace at all; we have a commented out test that compares against the output of ufonormalizer, and there I noticed that ufonormalizer was adding whitespace. |
The glif
|
IMO the trimmed format is an improvement in the above example note. But I think that Colin makes a good point that there may be formatting requirements that should be preserved in freeform notes included by designers. I haven't come across any note use in the past to judge what designers put in there. What have you seen that section used to document Niko? |
I have only ever seen garbage in there or one-line comments. |
Yea, I don't think this matters a ton in practice but I just think it's bad form to go about inserting and deleting stuff that has been input by the user. changing leading/trailing whitespace is maybe-annoying-but-mostly-probably-fine, but inserting or removing whitespace in the middle of the text just feels wrong. |
Yeah, I also don't like changing anything other than trimming start and ending. The XML format is, uh, weird about this, though... |
No description provided.
The text was updated successfully, but these errors were encountered: