The easiest and most efficient way to check (and fix) interpolation compatibility between fonts is using the Prepolator extension.

This page shows how to check interpolation compatiblity with code.

Checking glyph compatibility

The RGlyph object has a isCompatible method which checks for interpolation compatibility with another glyph. It returns a boolean (indicating if the glyphs are or not compatible) and a string (a report about the glyphs).

f1 = AllFonts().getFontsByStyleName('LightCondensed')[0]
f2 = AllFonts().getFontsByStyleName('LightWide')[0]
>> (False, ["Fatal error: glyph a and glyph c don't have the same number of contours."])
>> (False, ["Fatal error: contour 1 in glyph a and glyph d don't have the same number of segments."])
>> (True, [''])

Marking glyphs by compatibility

The following script checks for glyph compatibility between all open fonts and a neutral font, and applies a mark color based on the result (green for compatible, red for not compatible).

from mojo.UI import SelectFont

neutral = SelectFont()

for f in AllFonts():

    if f == neutral:

    for g in f:
        compatible, report = g.isCompatible(neutral[])

        if compatible:
            f[].markColor = 0, 1, 0, 0.5
            f[].markColor = 1, 0, 0, 0.5


Setting starting points automatically

g = CurrentGlyph()

for c in g.contours:
Last edited on 01/09/2021