On 01 Dec 2013, at 20:58, Frederik Berlaen <
fred...@typemytype.com> wrote:
> what happens when for example kerning is being added by MetricsMachine and the data is not compatible anymore with the "private" data folder?
This is something I asked about back in April on the RoboFab list:
https://groups.google.com/forum/#!topic/robofab/9sZd5p7t9_g
There are largely several levels of any information about some font data:
Level 1.0. "deliverable code": binary SFNT data in the final container (TTF/OTF, WOFF, TTC etc.), signed, customized etc.
Level 1.5. "machine code": "master" binary SFNT data
Level 2.0. "assembly code": source representation of SFNT data (let's assume for simplicity that it's TTX XML).
Level 3.0. "source code" Middle level: native UFO XML information
Level 4.0. "code generator code": "above UFO" information, e.g. Superpolator masters with interpolation info, Kalliculator skeletons and pen strokes, Victoria parametric info etc.
Kerning is a good example where there are even more levels:
Level 1.0 and 1.5 as above.
Level 2.0. "assembly code": Lowest level: XML representation of the "GPOS" table and the "kern" table
Level 2.5. "intermediate code": FEA syntax information for GPOS "kern" feature and, potentially, separate contents of the "kern" table, or VOLT syntax for GPOS "kern" feature
Level 3.0. "source code": Native UFO information about kerning groups and kerning values, and potentially some information as to which pairs should also go into the "kern" table
Level 4.0. "code generator code": High-level information, e.g. Victoria dynamic group definitions or formula-based kerning values
Taking Kalliculator as an example, a glyph would typically have three levels (let's forget about the 1.x levels now):
Level 2.0. TTX code for "glyf" or "CFF " representation; in case of "glyf", potentially with bytecode hinting.
Level 3.0. UFO code in GLIF format, potentially with Adobe-compatible PS hinting and FontLab-compatible TT visual hinting
Level 4.0. Kalliculator's own "glyph generation" data, the shape of the skeleton and some pen definitions
In case of Superpolator, there could be instances on levels 2 and 3 (e.g. with hinting info added), and then there could be the Superpolator masters in Level 4.
Generally speaking, I think a good tool and format should have the ability to:
1. Detect when a lower-level code becomes out-of-sync ("outdated") due to changes in higher-level code.
2. Allow the user to lock portions of lower-level code i.e. protect them from being overwritten.
3. Allow the user to overwrite the unlocked portions of lower-level code with code generated from updated higher-level code.
4. Whenever a tool deems it recommended that lower-level data is overwritten, but that lower-level data is locked, it should ask the user: "Unlock NNN and overwrite?" (Yes, Yes for All, No, No for All). For certain types of data, "Keep both" could also be an option.
5. The user should be able to set the preference whether to: present this question every time, overwrite every time or skip every time, and whether to log the overwrites and skips.
All that should happen on font-wide, glyph group, glyph and, where applicable, sub-glyph scope.
Very basic conflict resolution can be done using timestamps. Certain version control systems also have this functionality, but that usually applies to older and newer versions of the same data. What I'm talking about is mostly when a more complex process has to transform one type of data into another.
Is this type of marking certain data as "locked" part of UFO?
It would be very useful. For example, I could declare that my "kern" feature definition in features.plist is "locked" and then it would not be overwritten if I change the UFO kerning. But if it is unlocked and I change the UFO kerning, then the "kern" feature gets regenerated.
The same applies really to every aspect of the font production chain. For example, certain kerning pairs or sidebearings etc. could be "locked" by the user, and then if the user runs an autokerning/autospacing algorithm, that algorithm will do its thing only on the unlocked pairs or sidebearings, but it will not touch the locked entries.
If the build process is so that at some point the font is output as a set of TTX tables, and there is an older version of the tables already present, and the user has declared that the "name" table TTX file is "locked", then the outputting tool would honor that and produce newer versions of all the other table files, but keep "name" as it was before.
What do you think about that? Of course tools would need to me made aware of that.
Best,
Adam