Glyphs misinterpreting UFO composite offsets?

In working with associate designers, using UFO as a transfer format between FontLab and Glyphs, we’ve noticed that Glyphs incorrectly positions some components. This seems to happen mostly when a composite glyph does not inherit the metrics of the first component, e.g. Greek uppercase diacritics, digraphs, precomposed fractions, but I’ve also seen it affect Vietnamese diacritics where the composite does inherit metrics from the base letter.

This is how a set of precomposed fractions composite glyphs looked in FontLab VI (also FLS5):

When I export a UFO from FLVI (or create one using vfb2ufo from a FLS5 source; I’ve tested both methods), and then open the UFO I get this:

If I open the same UFO in FLVI, the composites are fine. I’ve also checked the XML for these glyphs in the UFO folder, and the offsets are correctly recorded:

<?xml version="1.0" encoding="UTF-8"?>
<glyph name="onequarter" format="1">
  <advance width="1446"/>
  <unicode hex="00BC"/>
  <outline>
    <component base="onesuperior" yOffset="39"/>
    <component base="fraction" xOffset="522"/>
    <component base="foursuperior" xOffset="752" yOffset="-619"/>
  </outline>
  <lib>
  <dict>
  <key>com.typemytype.robofont.mark</key>
  <array>
    <real>0.713</real>
    <real>0.6</real>
    <real>1</real>
    <real>1</real>
  </array>
  </dict>
  </lib>
</glyph>

So it does seem like Glyphs is at fault here.

I would suspect the auto alignment to be the cause of this. Do you have “Disable Auto alignment for imported files” checked in Preferences > User Settings?

If that is the case, could you send me a sample .ufo?

Aha! Yes, that was the problem.

Seems a strange ‘feature’.

The automatic alignment is a great feature if used properly. It can save a lot of work and keep the component glyphs in sync. So you like the option to be on most of the time.

I can definitely see the usefulness in being able to selectively turn on auto-alignment for specific composite glyphs, i.e. those in which one wants the metrics to be inherited from the base component as in most diacritics. But I can’t imagine ever wanting it to happen for all composites and especially not when importing a file. When I open a font, in whatever format, in a tool, I want to be able to see what is in that font, not have bits auto-anything’d.

2 Likes

You are right. And for .glyphs files that there is a warning dialog and the possibility to review and revert changed like this. Now the same will happen for all imported files.

1 Like