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

License? #41

Open
simoncozens opened this issue Oct 2, 2020 · 3 comments
Open

License? #41

simoncozens opened this issue Oct 2, 2020 · 3 comments

Comments

@simoncozens
Copy link

I'd like to use ObjectsGS in babelfont, (via glyphsLib) to provide a unified interface to UFO, Glyphs, OTF, and TTF files. But I don't know if I can do that.

@schriftgestalt
Copy link
Owner

I would not touch that code. It depends on the old and deprecated robofab.
Do you like to use it to be able to use .glyphs file in babelfont?

You should look into this: https://github.com/schriftgestalt/GlyphsSDK/tree/Glyphs3/ObjectWrapper/fontparts It is WIP but clearly the way to go.

@simoncozens
Copy link
Author

Cool, thank you. Actually I am now wondering if I need to start from scratch with babelfont anyway. fontParts proxies information to underlying font libraries, which means it only "reads" the data on demand and the data is still dependant on the underlying font format. This is OK in most cases, but not all. If I instead got the underlying libraries to read all the font data into a set of R... objects up front, then we really have the data in a format-independent way. That means you could e.g. Babelfont.load("foo.glyphs").save("bar.otf").

@schriftgestalt
Copy link
Owner

That sounds like a lot of work. And you will face similar problems like I have when I try to write the fontParts stuff. There are subtle differences in the data structures that are not easy to solve. You need to make sure you pick the right data structure for your intermediate object model. And the R… classes might not be a good choice, specially if you aim to be able to use .glyphs files as a data source. The master/glyph/layer structure is too different (e.g. RFont has only one set of vertical metrics, so you need one for each master, but where to put the intermediate layers).

Babelfont.load("foo.glyphs").save("bar.otf").
Glyphs files most likely have more than one instance. So that would need to be

Babelfont.load("foo.glyphs").instances[0].save(format:"otf")

(the instance defines its own file name)

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

2 participants