Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to generate a preview of multiple TTF fonts without installing them.

Each font should have custom text, and the output should be 1 font per line in a format like JPEG or PDF, so that I could view them all at once.

I am using OS X but if there is a solution under Windows only I would be happy to try.

share|improve this question
up vote 0 down vote accepted

You could use ImageMagick, but it doesn't use native text rendering.

i=1; for f in *.ttf; do convert -size x30 -gravity center -font "$f" -pointsize 16 label:"${f##*/}: some text" font_$((i++)).png; done; convert -append font_*.png fonts.png

Or if the fonts have been installed, you could use /Library/Scripts/Font Book/Create Font Sample.scpt or a shell script like this:

preview=$(jot -s '' -c 89 33)

for font in Times Helvetica; do
    out+="<tr style=\"font-family:'$font'\"><td>$font</td><td>$preview</td></tr>

echo "$out" > /tmp/fonts.html
open /tmp/fonts.html
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.