Skip to content

Instantly share code, notes, and snippets.

@typemytype
Created December 6, 2017 11:01
Show Gist options
  • Select an option

  • Save typemytype/f9a507bfc2e80aa89925dde963e24c94 to your computer and use it in GitHub Desktop.

Select an option

Save typemytype/f9a507bfc2e80aa89925dde963e24c94 to your computer and use it in GitHub Desktop.
show all installed fonts for a given string
characters = u"345678"
format = "A4"
margin = 10
t = FormattedString()
for fontName in installedFonts(characters):
t.font(fontName)
t += characters
while t:
newPage(format)
t = textBox(t, (margin, margin, width()-margin*2, height()-margin*2))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment