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

UFO to glyphs conversion #74

Closed
n8willis opened this issue Sep 24, 2016 · 15 comments
Closed

UFO to glyphs conversion #74

n8willis opened this issue Sep 24, 2016 · 15 comments

Comments

@n8willis
Copy link

It would be extremely helpful for me to be able to convert UFO files directly to glyphs format.

I realize from informal conversation that many of the internals necessary are in place or close; it wasn''t clear what remains.

I'm thinking primarily of the need to handle single UFOs, not multiple masters, although obviously that would be useful in the long run.

@schriftgestalt
Copy link
Collaborator

I started to implement a proper object model to represent glyphs files in memory. One advantage if it would be to able to write files. That is not 100% there yet and needs some updating an better integration with the rest of the code.

And what is your usecase for this?

@n8willis
Copy link
Author

The use case is working on collaborative projects between users using Glyphs and those using FontForge.

(At least until I persuade you to release a Linux version of Glyphs, round-tripping through UFO is the best alternative.... :) )

@schriftgestalt
Copy link
Collaborator

it might be more useful to add .glyphs support to fontforge directly.
The classes.py file from my branch in glyphsLib and the Fontlab export script can be used as reference.
That would allow for better translation between values, e.g., you could keep the MM setup.
I'm happy to help with the implementation.

@n8willis
Copy link
Author

Well, personally, I'd consider a FontForge-only solution less useful; because there are other UFO-centric tools. @jamesgk , what do you think?

@jamesgk
Copy link
Contributor

jamesgk commented Sep 26, 2016

We have gotten requests for a UFO->Glyphs converter before. We can read UFOs into UFO-like Python objects and write Glyphs source from Glyphs-like Python objects but the missing piece is converting UFO-like objects to Glyphs-like objects. Basically the opposite of builder.py which is ~750 lines and pretty messy.

Complicating this as a todo item is that we also want to overhaul our Glyphs-like Python objects to be class-based instead of Python-builtin-based (as Georg mentioned; this could make builder.py cleaner as well as making glyphsLib more generally useful). That is kind of a few weeks out for me unfortunately since I have other obligations I have to get to. Perhaps in the meantime someone could write a rudimentary UFO obj -> Glyph obj converter based on what we have now.

@schriftgestalt
Copy link
Collaborator

Depending on the time pressure for the ufo>glyphs converter, I would wait until the object model is in better shape?

@adrientetar
Copy link

a UFO -> Glyphs converter is yet to be built.

But if you want a glyphs file you probably have the Glyphs app too. Is its import function dissactisfactory or anything?

@jamesgk
Copy link
Contributor

jamesgk commented Nov 9, 2016

But if you want a glyphs file you probably have the Glyphs app too

Not necessarily. The use-case here and with Noto is that someone may want to contribute to a project which is based on existing Glyphs sources, but without using the Glyphs app.

@adrientetar
Copy link

Oh I see.

@schriftgestalt
Copy link
Collaborator

My (old) branch is able to write .glyphs file. So if we could implement this, it would be much easier to implement moving data in both directions.

@jamesgk
Copy link
Contributor

jamesgk commented Nov 9, 2016

My (old) branch is able to write .glyphs file.

So is the master branch. The missing piece is converting UFO-structured data to Glyphs-structured data.

So if we could implement this, it would be much easier to implement moving data in both directions.

Assuming you're talking about overhauling the Glyphs data handling, that's a big if. It's not a trivial task, and I'm quite busy these days. Honestly at this point I'm not sure if I'm ever going to have time for it. But I would like to see it happen.

@schriftgestalt
Copy link
Collaborator

There was a plan to refactor the lib to be object oriented. Then it would be easier to such things as migrating data.

@jamesgk
Copy link
Contributor

jamesgk commented Nov 9, 2016

Yes, that's exactly what I was referring to as "overhauling the Glyphs data handling".

jeromew added a commit to jeromew/noto-source that referenced this issue Nov 10, 2016
@belluzj
Copy link
Collaborator

belluzj commented Mar 22, 2018

Fixed in #244

@belluzj belluzj closed this as completed Mar 22, 2018
@anthrotype
Copy link
Member

🍰

moyogo pushed a commit to notofonts/Noto-LatinGreekCyrillic that referenced this issue May 5, 2021
moyogo pushed a commit to notofonts/Noto-LatinGreekCyrillic that referenced this issue May 5, 2021
moyogo pushed a commit to notofonts/Noto-Thai that referenced this issue May 31, 2021
moyogo pushed a commit to notofonts/Noto-Lao that referenced this issue Jun 1, 2021
moyogo pushed a commit to notofonts/Noto-Arabic that referenced this issue Jun 14, 2021
moyogo pushed a commit to notofonts/Noto-Devanagari that referenced this issue Jun 30, 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

No branches or pull requests

6 participants