After Tal’s presentation at Robothon last week, I spoke with Tal, John, Adam, and a few others about storing TT hints in UFOs. Here are a couple of my thoughts on it. I’d be interested in your feedback.
1. High- or low-level hints?
=================================
From a software architecture perspective, I highly recommend storing only high-level TT hints. One of the virtues of UFO is that it provides a single, authoritative source for the data required to build a font. This principle decouples ordering dependencies, enabling apps to add, remove, or transform font data, in any order in the workflow, and have one place from which the final binary can be built.
Low-level hint code is output data, not source. Embedding output data in a source file introduces an internal ordering dependency – low level code must stay in synch with the rest of the font data, and if that other data gets touched, the low-level code is invalid. A lot of the fragility, rigidity, and workflow linearity of the old tools (e.g. VTT, VOLT) is a result of mixing source data (e.g. VTT TSI tables) and final output data (the rest of the TTF that housed the TSI tables), thus creating an order dependency.
Determining if the low-level code is out of synch with the glyph data is a really hard problem – one that every application will need to get right. Even apps that don’t generate hints need to participate in detecting problems (even if only by setting a dirty cash flag). In my software career, I’ve seen too many similar strategies fail because not everyone will get things right in the same way.
Even if all apps got it right, embedding low-level code creates ambiguity: If an app detects a mismatch, what action should the designer take? Is the problem in the hints? The glyph data? We’ve all worked hard & late on an impending deadline and had something go wrong with our files. In that situation, we want clarity and an obvious next step. If we instead preserve the principle of a single authoritative source, then when you have a problem, you always know where the source of your problem lies (literally).
So: I really, really recommend storing high-level language, because that’s the source code for hints. Also, such a high-level language can be somewhat abstract so that it doesn’t have point number or glyph number dependencies, thus fits in nicely to a flexible workflow that UFO has enabled.
2) Towards a high-level TT language
=================================
Given the above, we need a standard language for describing high-level TT hints, just like Tal had hoped for in his presentation. To that end, I am floating a proposal here at Microsoft for releasing the specification of VTTalk as that high-level language specification. VTTalk has been refined over many years and is well tested. It is also a superset of the hinting functionality offered by all the TT hinting apps I’ve seen (FontLab, Glyphs, TTH), thus one can easily map the paradigms in those apps to VTTalk commands. (e.g. YAnchor(), YLink(), YInterpolate(), etc). Obviously we’d have to extend VTTalk to support point names as well as numbers.
I’m also floating a proposal of breaking out the VTTalk compiler from VTT and releasing it as a cross-platform, open-source project. It would act as a reference implementation of VTTalk, as well as a library for applications to call. Ideally, it would just be an object you could import, so applications can just drop the compiler in their final build process. This would make it easy for applications to adopt the new language. Ideally, too, there’d be a command-line wrapper for build scripts.
Also, using VTT’s compiler means that any apps that use it will take advantage of the two decades of R&D that we’ve put into it. For example, the VTT compiler has a code optimizer in it which produces very small, tight low-level code, which is handy for keeping webfont file-size down. Also, there are some other enhancements that we’ve recently made (first used in hinting Microsoft Sitka), that applications could potentially take advantage of without extra work.
To be clear: I’m making no promises at this point that we’ll do any of this. I’m just floating a proposal. I have not scoped out the work in detail (looks like a lot), nor checked against other priorities, vice-presidents, etc.
Since it’s just a proposal, I’ve a couple questions for you:
1) would it be valuable to release VTTalk as the high-level language?
2) is releasing the compiler useful (more specifically: who is interested in using it, and how would you use it)?
Looking forward to getting your input on these ideas.
// Rob
On Mar 12, 2015, at 1:10 PM, Rob McKaughan <rob...@microsoft.com> wrote:1. High- or low-level hints?=================================From a software architecture perspective, I highly recommend storing only high-level TT hints. One of the virtues of UFO is that it provides a single, authoritative source for the data required to build a font. This principle decouples ordering dependencies, enabling apps to add, remove, or transform font data, in any order in the workflow, and have one place from which the final binary can be built.Low-level hint code is output data, not source. Embedding output data in a source file introduces an internal ordering dependency – low level code must stay in synch with the rest of the font data, and if that other data gets touched, the low-level code is invalid. A lot of the fragility, rigidity, and workflow linearity of the old tools (e.g. VTT, VOLT) is a result of mixing source data (e.g. VTT TSI tables) and final output data (the rest of the TTF that housed the TSI tables), thus creating an order dependency.Determining if the low-level code is out of synch with the glyph data is a really hard problem – one that every application will need to get right. Even apps that don’t generate hints need to participate in detecting problems (even if only by setting a dirty cash flag). In my software career, I’ve seen too many similar strategies fail because not everyone will get things right in the same way.Even if all apps got it right, embedding low-level code creates ambiguity: If an app detects a mismatch, what action should the designer take? Is the problem in the hints? The glyph data? We’ve all worked hard & late on an impending deadline and had something go wrong with our files. In that situation, we want clarity and an obvious next step. If we instead preserve the principle of a single authoritative source, then when you have a problem, you always know where the source of your problem lies (literally).So: I really, really recommend storing high-level language, because that’s the source code for hints. Also, such a high-level language can be somewhat abstract so that it doesn’t have point number or glyph number dependencies, thus fits in nicely to a flexible workflow that UFO has enabled.
2) Towards a high-level TT language=================================Given the above, we need a standard language for describing high-level TT hints, just like Tal had hoped for in his presentation. To that end, I am floating a proposal here at Microsoft for releasing the specification of VTTalk as that high-level language specification. VTTalk has been refined over many years and is well tested. It is also a superset of the hinting functionality offered by all the TT hinting apps I’ve seen (FontLab, Glyphs, TTH), thus one can easily map the paradigms in those apps to VTTalk commands. (e.g. YAnchor(), YLink(), YInterpolate(), etc). Obviously we’d have to extend VTTalk to support point names as well as numbers.I’m also floating a proposal of breaking out the VTTalk compiler from VTT and releasing it as a cross-platform, open-source project. It would act as a reference implementation of VTTalk, as well as a library for applications to call. Ideally, it would just be an object you could import, so applications can just drop the compiler in their final build process. This would make it easy for applications to adopt the new language. Ideally, too, there’d be a command-line wrapper for build scripts.Also, using VTT’s compiler means that any apps that use it will take advantage of the two decades of R&D that we’ve put into it. For example, the VTT compiler has a code optimizer in it which produces very small, tight low-level code, which is handy for keeping webfont file-size down. Also, there are some other enhancements that we’ve recently made (first used in hinting Microsoft Sitka), that applications could potentially take advantage of without extra work.
1) would it be valuable to release VTTalk as the high-level language?
2) is releasing the compiler useful (more specifically: who is interested in using it, and how would you use it)?
--
You received this message because you are subscribed to the Google Groups "Unified Font Object Specification" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ufo-spec+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I imagine that the potentially opensourced VTT code could be integrated with the already-opensourced AFDKO code in several kinds of ways
See below:
From: ufo-...@googlegroups.com [mailto:ufo-...@googlegroups.com]
On Behalf Of Tal Leming
On Mar 12, 2015, at 1:10 PM, Rob McKaughan <rob...@microsoft.com> wrote:
1. High- or low-level hints?
=================================
…
So: I really, really recommend storing high-level language, because that’s the source code for hints. Also, such a high-level language can be somewhat abstract so that it doesn’t have point number or glyph number dependencies, thus fits in nicely to a flexible workflow that UFO has enabled.
I agree with all of this. The problem that I'm facing from the perspective of the spec editor is that lots of people are putting hints in their fonts. It's a huge amount of time and money to produce these things. The UFO is meant to be a place where we can keep all of our important data, but some of our most important data is not being stored.
----------
Yes, the investment people have in existing hinted fonts is an important practical issue. I’d guess that a lot of folks also want to convert every typeface project they’ve ever done to UFO for archival purposes.
I’m assuming that when people get their fonts hinted, they’re not just getting the final hinted TTF back, but also the hint source (VTT TSI tables, VFB, etc). Is this a valid assumption? (I’ve little idea: I only know what we do at MS, and indirectly from talking to other companies). If so, one could write a tool that pulled the source from these file formats and stored it as high-level language in the UFO.
If there are foundries with only the final TTFs and no source, how common is this? If it’s a small number, then is it worth the pain to find a solution?
Interestingly, Microsoft has a case somewhat like this: Times New Roman is filled with lots of hand-tuned low-level hinting code. Even if we moved to an entirely UFO-based workflow, I suspect we’d leave TNR as-is for fear of breaking the world’s most commonly used font. We’d likely leave it in its current source file and deal with it.
The other case is ttfautohint, as that never generates a high-level language. For this case, though, I don’t imagine people edit the hints after ttfautohint, so you could just run it again in the build process rather than caching its output.
I guess my short response is: can we find ways of helping people migrate their existing hint source to UFO with high-level hints, without having to add all the extra complexity of dealing with low-level hints? I’d be fantastic if we could, but being new to this conversation, I’m still optimistic.
Another approach: do it in a phased way: support a common high-level hinting source so that people can start using that. Then, in a later rev of the spec, add low-level support if people still feel the need. I think we agree that having high-level hints would be useful, but low-level hint support would be Hard. I’d hate a solution for high-level hints to be stalled waiting for a solution to low-level hints.
On Mar 13, 2015, at 6:57 PM, Rob McKaughan <rob...@microsoft.com> wrote:Yes, the investment people have in existing hinted fonts is an important practical issue. I’d guess that a lot of folks also want to convert every typeface project they’ve ever done to UFO for archival purposes.I’m assuming that when people get their fonts hinted, they’re not just getting the final hinted TTF back, but also the hint source (VTT TSI tables, VFB, etc). Is this a valid assumption? (I’ve little idea: I only know what we do at MS, and indirectly from talking to other companies). If so, one could write a tool that pulled the source from these file formats and stored it as high-level language in the UFO.
I guess my short response is: can we find ways of helping people migrate their existing hint source to UFO with high-level hints, without having to add all the extra complexity of dealing with low-level hints? I’d be fantastic if we could, but being new to this conversation, I’m still optimistic.
Another approach: do it in a phased way: support a common high-level hinting source so that people can start using that. Then, in a later rev of the spec, add low-level support if people still feel the need. I think we agree that having high-level hints would be useful, but low-level hint support would be Hard. I’d hate a solution for high-level hints to be stalled waiting for a solution to low-level hints.