Created
December 7, 2019 20:01
-
-
Save raphlinus/c31c92af12aab5aa62a975d0cf4c7c2a to your computer and use it in GitHub Desktop.
Revisions
-
raphlinus created this gist
Dec 7, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ # Script to decompose components with mismatched 2x2 matrix # See https://github.com/googlefonts/fontmake/issues/595 for glyph in Glyphs.font.glyphs: #print glyph xforms = [] mismatch = [] for (i, layer) in enumerate(glyph.layers): for (j, component) in enumerate(layer.components): if i == 0: xforms.append(component.transform) else: if xforms[j][:4] != component.transform[:4]: if j not in mismatch: mismatch.append(j) if mismatch: print glyph.name, mismatch mismatch.reverse() for layer in glyph.layers: for j in mismatch: layer.components[j].decompose()