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

Serialization normalizations #126

Merged
merged 3 commits into from
May 12, 2021
Merged

Serialization normalizations #126

merged 3 commits into from
May 12, 2021

Conversation

madig
Copy link
Collaborator

@madig madig commented May 12, 2021

Move more closely to ufonormalizer output.

I'm a bit mystified by our custom lib writing code. Why does the lib section end up unordered? It should be sorted alphabetically and I thought that's what plist was doing.

Closes #125
Closes #105

@madig madig force-pushed the serialization-normalizations branch from 2dfe9c0 to c855651 Compare May 12, 2021 15:33
@linebender linebender deleted a comment from github-actions bot May 12, 2021
@madig madig force-pushed the serialization-normalizations branch from c855651 to e006785 Compare May 12, 2021 15:34
@linebender linebender deleted a comment from github-actions bot May 12, 2021
@madig madig mentioned this pull request May 12, 2021
@cmyr
Copy link
Member

cmyr commented May 12, 2021

oh no! I hadn't noticed this 😆

Copy link
Member

@cmyr cmyr left a comment

Choose a reason for hiding this comment

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

Cool, this all looks sensible. Maybe take a look at my patches and see if there's anything interesting in there, to you?

I'll take a look at this lib-ordering business. Do you know if it's recursive? That is, if the lib contains nested dictionaries, is everything sorted during deserialization?

src/glyph/serialize.rs Outdated Show resolved Hide resolved
src/error.rs Outdated Show resolved Hide resolved
src/glyph/serialize.rs Show resolved Hide resolved
src/glyph/serialize.rs Show resolved Hide resolved
src/glyph/serialize.rs Outdated Show resolved Hide resolved
@madig
Copy link
Collaborator Author

madig commented May 12, 2021

I'll take a look at this lib-ordering business. Do you know if it's recursive? That is, if the lib contains nested dictionaries, is everything sorted during deserialization?

I think dictionary keys are always sorted inside a lib 🤔

@madig madig force-pushed the serialization-normalizations branch from e006785 to aab411d Compare May 12, 2021 20:03
@madig
Copy link
Collaborator Author

madig commented May 12, 2021

Cool, this all looks sensible. Maybe take a look at my patches and see if there's anything interesting in there, to you?

I copied your is_normal approach to advance widths. The tests I'll leave for now I think, once the lib order stuff is taken care of, my glif roundtrip test should test the exact order and formatting of all glif elements and attributes.

@github-actions
Copy link

🗜 Bloat check ⚖️

Comparing d80653f against ff64998

target old size new size difference
target/release/examples/open_ufo 1.71 MB 1.71 MB ---
target/debug/examples/open_ufo 7.11 MB 7.11 MB 32 Bytes (0.00%)

@linebender linebender deleted a comment from github-actions bot May 12, 2021
Copy link
Member

@cmyr cmyr left a comment

Choose a reason for hiding this comment

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

Cool, yea, let's keep the test because I will work on getting it passing.

@madig madig merged commit 3d502fe into master May 12, 2021
@madig madig deleted the serialization-normalizations branch May 12, 2021 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants