Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save marcdama/e3216238263150d6d4a9 to your computer and use it in GitHub Desktop.

Select an option

Save marcdama/e3216238263150d6d4a9 to your computer and use it in GitHub Desktop.
FL: All Glyphs: replace outline with advanced width square
from robofab.world import *
f=CurrentFont()
for i in f:
g = i.width
h = f.insertGlyph(i).getPen()
h.moveTo((0,0))
h.lineTo((g,0))
h.lineTo((g, 750))
h.lineTo((0, 750))
h.closePath()
f.update()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment