How to find out what the interpolation error shown is?

With https://github.com/Gue3bara/Lemonada-Arabic/blob/master/Lemonada-Arabic.glyphs then the tcheh-ar glyph is not interpolatable:

However, I can not see where to find out what is causing this interpolation incompatibility; all the outlines are green.

If I run Re-Interpolate then the current master is overwritten by the other master’s glyph :frowning:

Hi @davelab6,

Lemonada’s tcheh-ar has a extra anchor (center at x = 509, y = -104) in Light Italic.

You need to match the number of anchors also in order to achieve compatibility. Paths and anchors.

Best,

Nicolás

Awesome tip, thanks!

But how to know that?

I’d also like it to somehow show when anchors are making things incompatible. I’ve often been around outlines again and again trying to find the difference when it’s been the anchors instead. I’ll try to make a reporter plugin for this.

3 Likes

Yesterday I was writing a plugin for exactly this. I have to clean up some stuff and upload it to github. I will keep you posted.

Best regards.

Hi @davelab6, how to know about what?

About anchors, usually a visual inspection is fine when the incompatible flag is on.

What I do is the following
High level review:

  1. Check that the origin point are in the same location, if
    incompatibility persist;
  2. Check order of paths (Filter > Fix
    Compatibility), if incompatibility persist;
  3. Check for extra
    anchors. Mekkablue has a script to fix missing anchors, if incompatibility persist, so your should try this step in low level.

Alternative Low level review:

Work in progress:

#######################################
#   comparing paths and nodes number  #
#######################################
referenceMasterName = "Regular"
incompatibleGlyphs = []

for layer in Glyphs.font.selectedLayers: 
	thisGlyph = layer.parent
	glyphReport = str(thisGlyph.name)
	for master in Glyphs.font.masters:
		if master.name == referenceMasterName:
			id = master.id
			break
	referenceLayer = thisGlyph.layers[id]
	#print referenceLayer
	referencePathNumber = len(referenceLayer.paths)
	#print referencePathNumber
	numberOfLayers = len(thisGlyph.layers)
	#print numberOfLayers
	for testedLayer in range(numberOfLayers):
		if referencePathNumber == len(thisGlyph.layers[testedLayer].paths):
			#print referencePathNumber, len(thisGlyph.layers[testedLayer].paths)
			#print thisGlyph.layers[testedLayer].paths
			#print referenceLayer.paths
			for thisPath, referencePath in zip(thisGlyph.layers[testedLayer].paths, referenceLayer.paths):
				if len(thisPath.nodes) != len(referencePath.nodes):
					glyphReport +=  ":\n\t%s" % (referencePathNumber-len(thisGlyph.layers[testedLayer].paths))
		else:
			if referencePathNumber-len(thisGlyph.layers[testedLayer].paths) > 0:
				glyphReport +=  ":\n\t%s %s extra path(s)" % (thisGlyph.layers[testedLayer].name, (referencePathNumber-len(thisGlyph.layers[testedLayer].paths)))
			else:
				glyphReport +=  ":\n\t%s %s path(s) less" % (thisGlyph.layers[testedLayer].name, (referencePathNumber-len(thisGlyph.layers[testedLayer].paths)))
	print glyphReport

A explanation of interpolation problems would be great. The current system works well for two or three masters. But when you get up to, say, nine, or eighteen, there’s so much to look at that it can be hard to spot an error. An “Anchor missing in master X” or “Inconsistent path order in masters 2 and 7” message would make it easier to know what to look for.

1 Like

We are thinking about an improvement.

For now, Filter > Fix Compatibility helps with path & component orders, wrong node associations should be easy to spot in the compatibility view. And for anchors, try the All Anchors in All Layers script, which adds missing anchors.

1 Like

I didn’t knew about All Anchors in All Layers script I think it might be very helpful.
By the way, here is the reporter plugin that I mentioned before.

Best regards.

1 Like

That would assume your XML glyphdata file describes all the glyphs in your font, yes? Most of the time, for me, that’s not the case. Building a new XML for every project is not feasible.

No, it does not check Glyph Data. It looks at what is present in the glyph, and on any given layer, it adds only anchors that other layers of the same glyph currently have.

Oh! I see. That’s a useful thing :smile: