Created
July 29, 2016 22:07
-
-
Save lucasdinonolte/cdd0d153d668e2367f77a62b4c103fdd to your computer and use it in GitHub Desktop.
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
# type your Python code here and press cmd+Return to run. | |
reference = "n" | |
glyph = Glyphs.font.glyphs[reference].layers[0] | |
referenceWidth = glyph.width - glyph.LSB - glyph.RSB | |
print "Reference:", reference, referenceWidth | |
for char in ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]: | |
curGlyph = Glyphs.font.glyphs[char].layers[0] | |
width = curGlyph.width - curGlyph.LSB - curGlyph.RSB | |
print char, width / referenceWidth * 100, "%" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment