-
Notifications
You must be signed in to change notification settings - Fork 1
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 sources? #3
Comments
I do intend to read and write UFO sources--it shouldn't be difficult. I'm not sure of a timeline: at this relatively early stage of the project, my to-do list is pretty long. |
That's understandable. When/if you finish it, it's no problem for me to include w/the MFEK distribution. I'd call it |
(And if you never get to it, I may end up doing it or hiring someone to do it. :-) ) |
Oh, I'll get to it. It came up a while ago in the Typedrawers forum, and it's been on the to-do list for a while. I wouldn't call it cool, though. |
Really? Why not? It's really cool! |
Thinking aloud about a plan for this. Looking over the UFO spec, I can see how to store ygt source (or, eventually, VTTTalk) in private dictionaries in the UFO. Storing in the UFO this way should be the default "save" behavior when either (1) user started the project by reading a UFO or (2) the current session began with ygt code read from a UFO. "Save as" will override the default behavior "Export" should offer user a choice: export to .ttf font or export to UFO (either store TrueType "assembly" code in an existing UFO or write a new UFO if necessary). Comment? |
That makes total sense to me! |
A progress report. (I'm not putting this in the repository until it's complete.) Just as you can begin a project by opening a There are two next steps. One (the easy one) is to export compiled TrueType instructions to the UFO (instead of generating a new TTF). I say it's easy because UFO 3 prescribes places to put all instruction-related data, and fontTools provides methods for storing it. The second step is "save as," necessary for moving back and forth between free-standing ygt source and ygt source stashed inside the UFO. This is more complicated because, while reading a UFO and afterwards generating a So I am thinking of saying that I'm not in the business of generating UFOs. If you have a free-standing I'm still hoping to find a suitable tool for saving a UFO, but this is the state of things right now. |
This feature is complete but subject to revision and debugging. The behavior of ygt is determined by the extension of the source file. If you begin a project by opening a if you begin a project by opening a "Save As" lets you move back and forth between these two modes. I'm not sure I'm completely satisfied with the behavior of "Save As" yet: I might have to add a separate menu item An important point: Ygt is happy to hint a font with CFF outlines, even though CFF fonts can't be hinted with TrueType hints. If you do this, you should hide off-curve points display and record points as coordinates (View-->Point coordinates), since the point indices of the generated font will be different from those displayed by ygt, and the off-curve points will be different as well. Further, before you export TrueType hints to a UFO, you should make sure that it contains quadratic, not cubic outlines: otherwise the point indices will be catastrophically wrong. You can change a UFO's cff to quadratic outlines by running cu2qu on the UFO. Finally I should say that I have no idea whether any program can make use of hints embedded in a UFO3, though it would be easy to do so. |
The UFO-handling version of ygt is in the repository now. |
Hi Peter, when working with UFO 3 sources, I guess it’d be useful to somehow be able to specify which layer to take the outline data from. That way, one could store cubic outlines in the foreground layer, but have quadratic outlines elsewhere in a background layer, ready to be hinted. |
@verbosus: Good idea. I'll look into it. |
So far I'm not finding a lot of facilities in the standard UFO tools for dealing with layers: ufoLib2 knows about layers, but it seems there's not much in fontTools.ufoLib or ufo2ft (which converts a UFO to a fontTools TTFont. What are you using to manage layers in your UFOs? BTW, you can base your hints on the on-curve points in a CFF font. Just set up Ygt to use coordinates instead of indices as point identifiers and turn off display of off-curve points. I haven't done a lot of experimenting with UFOs yet, and I've still got a good bit to learn. |
With
|
Cool project!
I wonder: thoughts on UFO sources, instead of only TTF?
The text was updated successfully, but these errors were encountered: