Skip to content

Instantly share code, notes, and snippets.

@lucasdinonolte
Created November 2, 2018 22:42
Show Gist options
  • Save lucasdinonolte/9e31b82b2ee4724718e41efce7f545da to your computer and use it in GitHub Desktop.
Save lucasdinonolte/9e31b82b2ee4724718e41efce7f545da to your computer and use it in GitHub Desktop.
Overshoot Reporter
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