Created
August 14, 2017 21:57
-
-
Save fogrew/bdb39fcc6e4038cc92e648b4fff52e65 to your computer and use it in GitHub Desktop.
Visualizing ImageMagick fonts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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