Skip to content

Instantly share code, notes, and snippets.

@fogrew
Created August 14, 2017 21:57
Show Gist options
  • Save fogrew/bdb39fcc6e4038cc92e648b4fff52e65 to your computer and use it in GitHub Desktop.
Save fogrew/bdb39fcc6e4038cc92e648b4fff52e65 to your computer and use it in GitHub Desktop.
Visualizing ImageMagick fonts
#!/bin/bash
FONTS=`convert -list FONT | grep "Font:" | sed "s/Font: //g"`
SIZEX=300
SIZEY=30
convert -size "${SIZEX}x${SIZEY}" canvas:white canvas.png
for FONT in $FONTS;
do
convert -background none -size ${SIZEX}x${SIZEY} \
-gravity center -font $FONT caption:"$FONT" font.png
composite font.png canvas.png "$FONT".png
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment