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

CFF->TrueType #802

Closed
behdad opened this issue Jan 11, 2017 · 6 comments
Closed

CFF->TrueType #802

behdad opened this issue Jan 11, 2017 · 6 comments

Comments

@behdad
Copy link
Member

behdad commented Jan 11, 2017

Anyone wants to put together a snippet that uses cu2qu to convert an OpenType CFF to TrueType flavor?

@anthrotype
Copy link
Member

something like this?
googlefonts/cu2qu#47 (comment)

@behdad
Copy link
Member Author

behdad commented Jan 12, 2017

something like this?
googlefonts/cu2qu#47 (comment)

Yes please!

I'm starting to think that we should move Snippets inside Lib/fontTools so they can be called...

@anthrotype
Copy link
Member

I'm starting to think that we should move Snippets inside Lib/fontTools so they can be called...

hmm, I wouldn't like to move the Snippets inside the core library. They are by definition incomplete, otherwise we would have already done that.

What I'm thinking instead is have a new fontTools.convert module (and a corresponding fonttools convert subcommand) that can be used to convert between the various font formats (TTF, CFF/OTF, WOFF, WOFF2, and... TTX). We could also abuse the ttx command for that, although the latter has a long history and we wouldn't be able to change too much its interface.

To avoid a circular dependency between fonttools and cu2qu, I was thinking we could split cu2qu in half: one part (cu2qu.__init__ and the cu2qu.pens.Cu2QuPen segment pen) would be moved inside fonttools, and the rest (cu2qu.ufo and the point pens) could stay in its own separate cu2qu package (or even moved inside ufo2ft).

Let me know what you think.
In the meantime, I can already push the CFF-to-OTF snippet.

anthrotype pushed a commit that referenced this issue Jan 12, 2017
@anthrotype
Copy link
Member

I just added the "Snippets/otf2ttf.py", please test, thanks.

@anthrotype
Copy link
Member

Done in 2a4b3d5

@twardoch
Copy link
Contributor

I'm not sure if it's that simple — the "fonttools convert" function. Would it convert a TTC into multiple TTFs? Would it convert a TTF+gvar into a set of static TTFs? Would it convert an OTF+SVG into a TTF+sbix? And if not, why not?

I don't think it's so trivial anymore too define what exactly "convert" means. Such a converter would be great but I don't think it should be placed inside fontTools. It should be a separate app. The OTF+SVG to TTF+sbix conversion obviously would require an SVG rasterizer, other conversions might require FreeType or other dependencies.

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

3 participants