TTX to UFO
Kamal Mansour
Posts: 20
Which tools can convert TTX format into UFO?
0
Comments
-
Your best option is Extractor. It can convert a few different binary font formats into UFO.0
-
RoboFont can open TTX files. And it saves to UFO by default.
2 -
Since a TTX file is an XML representation of an sfnt font, I am interested to know why you want to go direct from TTX to UFO rather than via the TTF/OTF that the TTX represents?0
-
John, because Glyphs app exposes different amount of the OpenType layout features depending on the format it "ingests". Glyphs exposes more of the features to the user when it opens a font in UFO format in comparison with the equivalent font in TTF/OTF. Seems unreasonable, but in practice, that's what happens. BTW, Glyphs doesn't read TTX. As you've noted, both TTX and UFO are XML representations, so the conversion should be relatively simple.0
-
Although conversion might be attractive in the short term, I would hope you’ve told @Georg Seifert about the problem. Arguably a bug, but at least a reasonable feature request!0
-
How did you get the TTX file? If you used the ttx tool to create it, you could convert it back using the same ttx tool. But, as @John Hudson pointed out, TTX is based on the SFNT container format that is used by TTF and OTF files. Those are exported font formats that cannot be reconstructed fully to the original source file. UFO is a source format and, as such, can be opened losslessly by a font editor. Converting a TTX to UFO will, in most cases, result in a less complete UFO file as compared to the original source file.
If you have access to the original source file, prefer it to any exported files like TTX/TTF/OFT when opening in a font editor since they do not contain all of the information. Features specifically cannot be losslessly reconstructed from an exported font (E.g., should a certain GPOS rule be imported as manual feature code or an anchor on a glyph layer? That is impossible to know from an exported file and requires guesswork by the font editor. Same for kerning and a lot of other things.)Kamal Mansour said:As you've noted, both TTX and UFO are XML representations, so the conversion should be relatively simple.0 -
Glyphs exposes more of the features to the user when it opens a font in UFO format in comparison with the equivalent font in TTF/OTF.UFO is designed as a source format, so I am not surprised that Glyphs can typically derive more OTL data from a source UFO than by decompiling a TTF. But it doesn’t follow that a UFO converted from a TTX representation of a TTF will contain any cleaner and more complete OTL data than the decompiled TTF: you are still dealing with a GSUB/GPOS table representation, not original OTL source code.
1 -
If you want to go from a font file to OpenType .fea, I recommend my fontFeatures library:
pip3 install fontFeatures
otf2fea YourFont.otf0 -
Thank you all for your helpful comments.
So, it's clear that there are many angles on this question. Some situations do not lend themselves to ideal solutions.
As an additional alternative, what are some reliable tools that convert OTF/TTF directly to UFO?0 -
I don't think there are any reliable tools that can do this well in the general case, yet. (In the general case it's impossible - if the TTF is a variable font it can't be expressed as UFO.) My babelfont project will get there eventually, but it's not there yet.
But stepping back, it looks like you're trying to unbake a cake, which is a sign that something has gone wrong earlier in the process.1 -
I often have to deal with imperfect projects that need to be fixed and supplemented. You could call them half-baked cakes, if you want. No need to include variable fonts in the question.0
-
@Simon Cozens otf2fea works very well. Thanks.0
-
> I often have to deal with imperfect projects that need to be fixed and supplemented. You could call them half-baked cakes, if you want. No need to include variable fonts in the question.
Can’t you get to the sources that where used to compile the font files?0 -
And as @Thomas Phinney said it might interesting to get your font to see if we can improve the feature decompiler.
0 -
Kamal, in case it is of use anywhere in your workflows: our Volto tool converts VOLT .vtp files or TSIV tables to AFDKO .fea syntax.
0 -
Thanks, John. That's good to know.
Georg, I will take the Glyphs-specific discussion to the Glyph Forum.0
Categories
- All Categories
- 43 Introductions
- 3.7K Typeface Design
- 799 Font Technology
- 1K Technique and Theory
- 617 Type Business
- 444 Type Design Critiques
- 541 Type Design Software
- 30 Punchcutting
- 136 Lettering and Calligraphy
- 83 Technique and Theory
- 53 Lettering Critiques
- 483 Typography
- 301 History of Typography
- 114 Education
- 68 Resources
- 498 Announcements
- 79 Events
- 105 Job Postings
- 148 Type Releases
- 165 Miscellaneous News
- 269 About TypeDrawers
- 53 TypeDrawers Announcements
- 116 Suggestions and Bug Reports