Debian Codegraph @

tests/test1005.py

raw symbols SCIP
1 #Needs: fonts/AddExtremaTest2.sfd
2
3 import sys, fontforge
4
5 font=fontforge.open(sys.argv[1])
6 font.selection.all()
7
8 for g in font.selection.byGlyphs:
9 c = g.foreground[0]
10 d = c.dup()
11 if c!=d:
12 raise ValueError("Comparison doesn't work")
13 d.addExtrema("only_good_rm",1000)
14 if c != d:
15 raise ValueError("addExtrema perturbed things badly in " + g.glyphname)
16
17 c = font["A"].foreground[0]
18 d = font["B"].foreground[0]
19 if c==d:
20 raise ValueError("Comparison thinks everything is the same")