#!/usr/bin/python from fontTools.ttLib import TTFont a = TTFont('misc/azuki.ttf') b = TTFont('exported/czuki.ttf') a_metrics = a['hmtx'].metrics b_metrics = b['hmtx'].metrics for glyph in b.getGlyphOrder(): if glyph in a_metrics: b_metrics[glyph] = a_metrics[glyph] b.save('patched/czuki.ttf')