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

Single line tuples #7

Merged
merged 4 commits into from
Jul 22, 2021
Merged

Conversation

simoncozens
Copy link
Contributor

Fixes #6

) == (
"""{
a = 1;
b = (2,3);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd have expected to find a space after the comma. But I guess that's what Glyphs does to shave off one byte? Ugh.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kind of makes sense when this is on every node in a file. Separate issue, but Glyphs also writes empty dictionaries without newlines, so that's another thing...

E               {
E               pos = 700;
E               },
E               {
E               pos = 500;
E               },
E             - {
E             - },
E             + {},
E             ? +
E               {
E               pos = -200;
E               }
E               );

At some point I think we just need to give up and aim for "something Glyphs can read without errors" rather than "100% whitespace-compatible round-tripping".

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

something Glyphs can read without errors

wait, are you saying that Glyphs trips up with an error when reading a tuple that has spaces after the comma, or an empty dict that is not inlined? that'd be weird.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I'm saying it doesn't. While it's nice to aim for 100% whitespace compatibility, it's not necessary. I guess what I'm saying is when we test round-tripping in glyphsLib test suites we could be more relaxed about whitespace differences.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when we test round-tripping in glyphsLib test suites we could be more relaxed about whitespace differences.

i agree

But in that case, I would care less about 100% whitespace compatibility and more about getting an output that matches reasonable user's expectations, like having a space after the comma in a single-line tuple.

@codecov-commenter
Copy link

codecov-commenter commented Jul 21, 2021

Codecov Report

❗ No coverage uploaded for pull request base (master@0e58a15). Click here to learn what that means.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master       #7   +/-   ##
=========================================
  Coverage          ?   93.19%           
=========================================
  Files             ?        5           
  Lines             ?      838           
  Branches          ?        6           
=========================================
  Hits              ?      781           
  Misses            ?       57           
  Partials          ?        0           
Impacted Files Coverage Δ
src/openstep_plist/writer.pyx 98.68% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0e58a15...d67d67e. Read the comment docs.

Co-authored-by: Cosimo Lupo <cosimo@anthrotype.com>
@simoncozens simoncozens merged commit a146852 into fonttools:master Jul 22, 2021
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.

Support Glyphs-style "tuples"
3 participants