I think the cmp operator on two fonts is not working correctly … This works:
sf = CurrentFont()
print "Current:", sf
for f in AllFonts():
if f == sf:
print "equal:", f
else:
print "not equal:", f
result:
Current: Font Light
equal: Font Light
not equal: Font Bold
not equal: Font Book
but this gives the opposite of the expected result:
sf = CurrentFont()
print "Current:", sf
for f in AllFonts():
if f != sf:
print "not equal:", f
else:
print "equal:", f
result:
Current: Font Light
not equal: Font Light
equal: Font Bold
equal: Font Book