Some UFO lib entries get dropped on save

I’m getting UFOs from someone (I can’t share the files), but after saving the files I get lots of changes due to dropping lib entries that looks like this:

<key>com.adobe.type.autohint</key>
<data>
  SOME BASE46 DATA
</data>

Other lib entries seem to remain intact.

Could you send me one of those data sections?

Glyphs tries to parse that data and convert it into native hints. But ist is not writing that out again. I’m not sure about the best way to handle this.

The data in those keys is supposed to be dropped if you change anything on the outlines. But keeping track of this is very tricky.

And there is still no way to properly store high level postscript hints in an .ufo.

I’m not sure I can share the files. Also, it looks like something FontLab came up with, since AFDKO does not produce such <data> hints. I’m not touching the outlines, so may be Glyphs can keep the hinting it can’t parse as is, like any other lib entry?

But I guess it is futile to have such a multi-editor setup (so much for “Unified” Font Object) and I’ll do my changes then graft them back to the original files using a script.

I don’t need the file. Just one of those <data> sections.

It might be that the hints are properly imported, but isn’t writing it out (lack of proper data structure).

Here is one Omega_.txt (1.7 KB), interestingly, base46 fails to decode the extracted string unless I use --ignore-garbage, and then it decodes it as:

  <hintSetList>
    <hintset pointTag="hr01">
      <hstem pos="0" width="49" />
      <hstem pos="657" width="53" />
      <vstem pos="62" width="88" />
      <vstem pos="257" width="47" />
      <vstem pos="406" width="47" />
      <vstem pos="560" width="88" />
    </hintset>
    <hintset pointTag="hr02">
      <hstem pos="0" width="49" />
      <hstem pos="657" width="53" />
      <vstem pos="54" width="72" />
      <vstem pos="257" width="47" />
      <vstem pos="406" width="47" />
      <vstem pos="584" width="72" />
    </hintset>
    <hintset pointTag="hr03">
      <hstem pos="0" width="49" />
      <hstem pos="657" width="53" />
      <vstem pos="62" width="88" />
      <vstem pos="257" width="47" />
      <vstem pos="406" width="47" />
      <vstem pos="560" width="88" />
    </hintset>
    <hintset pointTag="hr04">
      <hstem pos="0" width="49" />
      <hstem pos="657" width="53" />
      <vstem pos="54" width="72" />
      <vstem pos="257" width="47" />
      <vstem pos="406" width="47" />
      <vstem pos="584" width="72" />
    </hintset>
  </hintSetList>

Works:

1 Like