I don't think we can change GLIF in a way that both supports everything that SVG does *and* does not require massive reworking of existing tools. SVG is deeply complex and requires an Illustrator like editor that is very different from the black/white drawing model used for the vast majority of type design. We always try to stay environment neutral in UFO so this presents quite a conundrum. That doesn't mean that I don't think UFO can't or shouldn't support this. It's more of a matter of figuring out how to do it without breaking tons of stuff.
We've been wrestling with this at more of an abstract level in UFS (see the notes about "documents.plist"). The same abstractions apply to UFO. When we started UFO, font format specifications were moribund. UFO could go three years between spec revisions and still need only a handful of changes to support new parts of OpenType. That's obviously not the case now so I've been thinking about ways to make it easier to deploy new UFO versions. To date, there have been two places where the changes have needed to happen quickly and it hasn't been possible: GLIF and fontinfo.plist. The problem isn't in updating the spec. The problem is that if we add something to the spec, existing tools need to become aware of these changes before they can support them at all. For example, if we add a <foo> element to GLIF, all existing GLIF parsers/interpreters will not know what that <foo> element is. They'll either raise an error saying that an unknown element has been found or they will simply ignore it and the data inside of the element will be lost. Neither of those is good for users.
In the case of GLIF, I don't think we can solve this since the format consists of custom defined XML elements. Any changes to GLIF are going to be major events. In the case of fontinfo.plist, I think the use of Property Lists is going to be extremely helpful[1]. We can tweak the fontinfo.plist spec to say that if an unknown key/value pair is found, the pair should be retained and rewritten into the UFO without modification. This will allow us to quickly update the UFO spec to handle new details without encountering massive data loss. These will be minor updates between major updates that support big new things. Yay!
The other things that I think will help will be the various lib locations and the data directory. The libs have been around since RoboFog and they are real world tested and work amazingly well. The data directory hasn't seen much use yet, but Adobe's use of it has shown that it is going to be useful. Between major updates, the spec can define public.* locations and formats for big new things in the libs and data directory. Those are already designed to be lossless, so it should just work.
Anyway, back to SVG-in-OpenType. Given the above tweak to fontinfo.plist, we could do something like the following (I haven't read the details of the SVG table spec in a while, so I may have some details wrong).
- add the necessary font-level data to fontinfo.plist
- store the SVG documents in data/public.openTypeSVGGlyphs/*.svg
- store the *.svg file name and any glyph-level data in representative GLIFs in a layer named glyphs.public.openTypeSVG.
Just a quick thought.
Thanks,
Tal
[1] HAHAHAHAHAHAHAHAHA[2]
[2] Please don't restart the Property List debate.[1]