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

glyphSet is required to load glyphs #218

Closed
typemytype opened this issue Dec 17, 2018 · 6 comments
Closed

glyphSet is required to load glyphs #218

typemytype opened this issue Dec 17, 2018 · 6 comments

Comments

@typemytype
Copy link
Member

path = 'path/to/a/compressed.ufoz'  # a zipped ufo

from defcon import Font

f = Font(path)
print(f.layers.defaultLayer._glyphSet)
# without loading all glyphs
f.save()
# save will reset the _glyphSet object to None
print(f.layers.defaultLayer._glyphSet)
# but still not glyphs loaded
print(f.layers.defaultLayer._glyphs)
# but the font has some glyphName to be loaded
print(f.layers.defaultLayer.keys())

I dont know what the best option is: zipped ufozz are already slow as hell and now all glyphs needs to be loaded while reading for all al layers....

I understand the glyphSet object needs to be reset due to how zips work.
Is an immutable version possible?

This is a serious bug and makes ufoz not reliable...

@typemytype
Copy link
Member Author

@anthrotype (to be sure you see this :) )

@anthrotype
Copy link
Member

Oh yeah I saw it. Gimme some time to wrap my head around this

@typemytype
Copy link
Member Author

This could also be a ufoLib issue, as a glyphSet in a zipped file system is not able to be kept as a reference to load unloaded data...

@typesupply
Copy link
Member

I’ll take a look tomorrow as well.

@typesupply
Copy link
Member

Quick update: I've done some thinking and have a plan to fix this. I'll update everyone here when it is ready.

@benkiel
Copy link
Member

benkiel commented May 27, 2020

Fixed in #220

@benkiel benkiel closed this as completed May 27, 2020
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

No branches or pull requests

4 participants