Created
June 25, 2015 11:40
-
-
Save casasin/f1df848b5c3bb0e8ed60 to your computer and use it in GitHub Desktop.
Compare all open fonts glyphOrder to the current font's.
This file contains 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 characters
# compareGlyphOrders.py | |
""" | |
Compare all open fonts glyphOrder to the current font's. | |
""" | |
current = CurrentFont() | |
fonts = AllFonts()[1:] | |
currentSet = set(current.keys()) | |
print '- MASTER: %s-%s, %s glyphs' % (current.info.familyName, current.info.styleName, len(current)) | |
for f in fonts: | |
print '\n\t%s-%s: %s glyphs' % (f.info.familyName, f.info.styleName, len(f)) | |
fSet = set(f.keys()) | |
missingSet = currentSet.difference(fSet) | |
additionalSet = fSet.difference(currentSet) | |
print '\t' + '=' * 30 | |
print '\tMISSING:\n\t', ' '.join(list(missingSet)) | |
print '\t' + '=' * 30 | |
print '\tADDITIONAL:\n\t', ' '.join(list(additionalSet)) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment