> On 13 Mar 2015, at 07:25, Tal Leming <
t...@typesupply.com> wrote:
>
> 1. Does this cross over into the spec defining application behavior? I don't know, but it is something that we should think about. We *try* to keep the spec from dictating anything other than read, write and "don't discard without alerting the user". There are some interpretation and translation guidelines, but those are mostly to ensure data consistency.
Well, given that the foundation of UFO is very much linked to FontLab Studio 5 (most data structures present in FLS 5 translate to UFO in some way) and AFDKO (most things that makeOTF expects as input are in UFO), I don't think you can really "unlink" UFO and app behavior. UFO seems also to be linked to defcon/Robofab. Given that RoboFont is a "UFO editor", and there also seems to be a certain reluctance in introducing things to UFO that would be difficult for Frederik to implement. I wonder how much this situation is compliant with item #2 of the UFO Design Philosophy for me.
UFO dictates app behavior in countless aspects implicitly. The fact that OpenType Layout feature definitions are stored in the text-based FEA format "dictates" that an app has to be able to deal with that format somehow. Limitations of the FEA format also dictate limitations of UFO and apps. I have yet to see an approach that would allow to easily "superpolate" arbitrary GPOS or GDEF features rather than just "kerning" and "anchors". Caret positions? Cursive attachment? Contextual GPOS rules? Most Indic scripts use GPOS for things far beyond "mark attachment", but there's hardly any trace of consideration for the needs of complex-script designers in UFO.
UFO is useless without a FEA compiler. The Adobe implementation has only been opensourced last year (great!), but has been a closed-source app for more than a decade, and certainly has been at the time of the UFO inception. That's a conflict with item #2 of the UFO Design Philosophy for me.
UFO assumes that each "font" has its own set of glyphs, its own "features.plist" etc., despite the fact that in TTC, you can share glyphs, feature tables and other structures, and such practice is common in font development (CJK but not just). If you update a GLIF that is shared across 4 fonts in one UFO, you need to copy that GLIF into 3 other UFOs. Clear conflict with item #3 of the UFO Design Philosophy. I think it's rather telling that all the sources for the Adobe "Source" font series are available in UFO except Source Han Sans.
Even the fact that UFO excludes certain structures from standardization dictates app behavior. If you're making an app that allows you to design monochrome PostScript outlines, monochrome TrueType outlines and color (or monochrome) SVG outlines simultaneously, you have a problem: you can put the set of PS outlines into one UFO, the set of TT outlines in another UFO, and the set of SVG outlines in some custom place in either UFO (or both?). Clear conflict with item #3 of the Philosophy.
UFO says that GLIF glyph names can be of arbitrary length and contents, but ALL current implementations make a silent assumption that these names translate directly to PostScript glyph names which are subject to severe limitations. That actually is very much in sync with item #2 of the Philosophy, but that's where I think the Philosophy is wrongly applied (or wrong by itself).
Item #1 of the Philosophy postulates human readability and editability. You already know my opinion about "human readability" of the plist format. In fact, you yourself told me that I shouldn't be writing the plist format by hand and recommended a more abstract notation. And I think anyone who followed the discussion about the Adobe and FontLab storage of hinting data will agree that the non-plist formats we introduced are far more human-readable than the ones converted to be plist-compliant (see examples on
https://github.com/adobe-type-tools/afdko/issues/25 ). We're going to make them plist-compliant, i.e. more *machine-readable* and less human-readable.
I commend the philosophical background to UFO, but I don't think UFO really delivers on its "high-level" promises. I'm not saying UFO should try to do it. But perhaps it's time to amend the UFO Design Philosophy towards actual practice. UFO is great, but it's great for "something" and certainly not "everything" or even "most things".
I don't want to turn this into a "rant" about what's wrong with UFO, because it would be pointless. I hope you appreciate my feedback *despite* the critical tone. In fact, I believe that in a way, we're not that different. I, too, am concerned about human accessibility of the font sources, it's future-proofness, app independence and avoidance of redundancy. But I also have concerns about the fact that in its current incarnation, UFO makes the European scripts strong first citizens while offering little benefit to Asian scripts. That's something that hurts and bothers me.
However, I am aware of how much work it would be to make UFO "world-ready", and I'm not even sure it is entirely possible.
As I've said on multiple occasions, you, Frederik, Erik, Just and others have done a tremendous service to the type community.
I think that contribution is very much on par with the work that Yuri has done to enable countless independent type designers to make Unicode-compliant, OpenType-aware fonts with high screen quality, and bring them out of the dark ages of Western-centric Type 1 world of the old Fontographer.
You guys have brought that effort to the next level, for which I am tremendously grateful.
We often hear about what UFO *is good for*, and I somewhat miss the bits where people would openly say what it *isn't good for*. So, hopefully in the interest of type designers across the entire world, I sometimes assume the role of the guy who fills that gap.
In the end, I'm not much of a philosopher myself. I just talk to type designers (from Europe, America, Japan, India, Hong Kong etc.), and listen to their stories. I try to understand the problems they're facing, and try to come up with possible practical solutions that address their needs. I don't actually care whether the solutions are called .ufo, .ufoz, .glyphs, .sfd or .vfb, as long as they address as many needs as possible.
> 2. Adding a tags element at this point could cause some breakage or non-trivial implementation for developers.
So UFO is not application independent after all. It's fine with me! ;)
> I want to keep UFO 4 limited to just a file structure change if at all possible. It could be implemented in the interim via the lib like this:
>
> public.tags : {
> identifier : "tags",
> etc.
> }
>
> Though, the tags could also be implemented with an array so that string breaking wouldn't be necessary:
>
> public.tags : {
> identifier : ["tag1", "tag2", etc.]
> }
Are you suggesting a JSON notation for this, or are the current UFO not sufficiently human editable to be written by hand, so you're picking a more abstract representation? ;)
OK, enough with the picking.
I agree that hijacking the point "name" attribute for a multi-string storage (in the style that Frederik has done in RoboFont) is not elegant. I'm open to do it either way, with some list of explicitly enumerated tags (elegant though disconnected from GLIF core so needs more cross-structure management) or with using Frederik's current method of hijacking the "name" attribute, which makes it more compact and provides a useful purpose for the already-specified "name" attribute.
Both approaches have their pros and cons, but I think ultimately, an explicit "tags" structure along the lines of what you're proposing is better. If more app developers implement behaviors such as the ones I name as examples at the end of this email, a "name" attribute could become really long (full of those space-separated keywords), and that would be kind of nasty.
> Answering some of your points:
>
>> At Robothon, I have talked to Tal briefly about the PS hint representation. He said he still intends to propose a better representation. His concern is that the current representation is like FontLab "hints", i.e. you have hint positions and widths, while he'd somehow prefer FontLab "links", i.e. info about linking points (that would ultimately use the UFO3 object IDs and be a bit more abstract).
>
> My issue with the current implementation is that it is specific to a state of the glyph. If the outlines change, the hint data can become invalid. That sort of dependency is something that we try to avoid by design, but it may not be possible to do so with this. (See also: TT hints; Ugh; Quagmire.) I'm still mulling things over and Adobe's proposal may very likely be the basis of the official storage structure. (Apart from the whole base64 thing.)
But that's the whole point behind the fundamental difference between PostScript hinting and TrueType instructions. TrueType instructions deal with points, so it makes sense to link them to points in some way, ideally using some high-level language and without references to point indexes.
But PostScript hints have nothing to do with points. You can have (and should be able to store) hints that are wider than any points, or hints where no points are to be found. PostScript hints are effectively more like "zones" within which "something" is "supposed" to happen.
Of course, if we adopt the VTTalk language for high-level hinting, we'll get stuff like links between points for free. It will be trivial to generate PostScript hints from VTTalk data. VTTalk has the concept of links between points. You can turn them into some TT assembly, but you can also generate the PostScript vstem or hstem stuff from them. Perhaps there are some aspects of PS hinting which cannot be implied from VTTalk in a direct and stable way, but I think that could be added to a slight revision of VTTalk.
In other words, VTTalk (or a subset thereof, or a dialect that defines of what FontLab TTH and VTT can do) is a sensible high-level language that can be used to express HINTS for both outline flavors: you can generate TrueType instructions from VTT hints, and you can also generate PostScript hints from VTT hints.
> The thing that I was talking about was an abstract way of noting that certain points/contours meant certain things. It wasn't just for hints specifically, but could represent lots of things: "these points form a serif", "these points are grouped together", "the segment between these points should be rendered as a sequence of pink hearts". This idea is cool but long dead. (cough UFO 6 cough)
Sounds good, but IMO, that's something for storage formats that are of higher level of abstraction (less flat) than UFO. :)
>> 4. The language for the "name" attribute of a GLIF glyph should be changed so it actually does impose some limitations, and the VERY least that the "name" attribute should not contain spaces. Virtually all implementations of UFO assume that the "name" attribute is closely tied to the PostScript name of a glyph. Tal's Robothon suggestion to introduce a "public.displayName" element strengthens this assumption. My initial suggestion was actually the reverse: to introduce "public.postScriptName", which would be strictly the name to be used as the 'post' glyph name. Then, the "name" attribute could remain "free". But I that would require changes in various codebases, and I guess that Tal is not willing to impose that work on the involved parties. The current situation is BAD. The spec suggests the "name" attribute can be anything but virtually all implementers pass that attribute straight into the 'post' table and 'CFF' table. This is BAD BAD BAD BAD! At the very least, the description of the "name" attribute should be strengthened to reflect that practice.
>
> We should start a separate thread for this. My public.designName idea is not even half baked yet and it needs a lot more thought. Glyph names are a nightmare of backwards compatibility in every possible way. We relaxed the requirements for glyph names in UFO 3 because we don't want to make the format follow outdated notions of glyph naming. Why should we force the glyph names to conform to OTF-CFF naming requirements? Why stop there? Let's make them use a subset of ASCII that will make the names work on any OS since 1976! :-) But, yeah, we should have a discussion about glyph names at some point.
Well, we should ask ourselves the question: what do people mean by a "glyph name". I think there are two kinds of glyph names: "public" glyph names, which are standardized to some extent and are subject of some limitations (effectively PostScript names at this point), and "private" glyph names (which I call "nicknames" rather than "display names" ;) ), which should enjoy full freedom. We'll most certainly not fit both kinds of requirements into one data point.
>> c) The "identifier" attribute of a [glyph or] point or guideline DOES need to be unique (as unique as only possible, even across the fonts), and the result of a selection by identifier should always be just one object.
>
> The identifiers must be unique across a glyph, but there is no requirement for them to be unique across the font. We thought about this a lot. In theory, the number of possible identifiers should be enough to allow a unique identifier across the font for every single object. But, testing for and maintaining that uniqueness across such a huge number of objects would be troublesome in practice. So, we limited the scope. layer name + glyph name + identifier will give you a precise object locator.
Ah, OK, thanks for the clarification! :)
>> Opinions?
>
> Could you give a few more use cases for the tags? I mean, as I understand it, it allows hint abstractions to point to types of things. Do you think it could be useful for other things?
Well, RoboFont uses the "hijack" paradigm. For example, if you open a TTF in RF, there will be many points on the outline which have the name "inserted". That "inserted" thingie actually belongs to tags. FontLab Studio 5.2.1 for Windows has a set of flags for "interpolated points" (in X and Y separately), where the app is supposed to calculate their position when other points are moved. These kinds of flags could be expressed as tags. We have several other point types and additional point behaviors in FontLab VI, but I cannot talk about them publicly at this point. They are useful for designers, and generally, their functioning is similar to the "inserted" RoboFont tag/flag or "interpolated" FontLab Studio 5.2 tag/flag. I can also imagine that a user could tag points with things like "round" or "inktrap" and then an app such as roundingUFO could have a mode where it only makes rounded corners or inktraps on points which have such tags, rather than on all corner points. These tags could also have a reversed meaning of course, so a user could prepare a design to be processed via roundingUFO, but could tag just a few points with "dontround" and then roundingUFO would keep these points as corners.
There's tons of other such scenarios I can think of, but I hope the examples above show the general gist. :)
Many thanks!
Best,
Adam