Automatic Alignment not detected

I have this situation where I’ve generated a bunch of diacritic glyphs, I want to detect which glyphs have components that are floating without anchors setting it’s automatic alignment:

e.g. I have a:

  • M without “top” anchor
  • acute with “_top” anchor

I generate a “Macute” and then if I check the automaticAlignment on it, it returns True, even though it’s not actually attached to anything, i.e. it’s free to move around. How can I detect when a glyph doesn’t have all it’s components attached with an anchor, I recall this method used to work?

You should be able to do this with a quick script:

for Layer in Font.selectedLayers:
	for i in range(len(Layer.components)):
		if Layer.components[i].isAligned() < 1:
			print "%s has unaligned component %s." % (Layer.parent.name, Layer.components[i].componentName)
2 Likes

Thanks! This worked.