Created
November 2, 2018 22:42
-
-
Save lucasdinonolte/9e31b82b2ee4724718e41efce7f545da to your computer and use it in GitHub Desktop.
Overshoot Reporter
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
print "Name\t\t\tMax\t\t\tMin" | |
for thisLayer in Glyphs.font.selectedLayers: | |
capHeight = Glyphs.font.masters[thisLayer.associatedMasterId].capHeight | |
xHeight = Glyphs.font.masters[thisLayer.associatedMasterId].xHeight | |
ascender = Glyphs.font.masters[thisLayer.associatedMasterId].ascender | |
maxY = 0 | |
minY = 1000 | |
for path in thisLayer.paths: | |
for node in path.nodes: | |
if node.y > maxY: | |
maxY = node.y | |
if node.y < minY: | |
minY = node.y | |
delta = 0 | |
if thisLayer.parent.subCategory == "Uppercase": | |
delta = maxY - capHeight | |
if thisLayer.parent.subCategory == "Lowercase": | |
delta = maxY - xHeight | |
if delta != 0 or minY != 0: | |
print thisLayer.parent.name, "\t\t\t", delta, "\t\t", minY |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment