for STRING in MySQL1 MySQL2 Loghost Backup; do
# Variables "invented" experimentally
A=3; B=70
# Length of string
X=${#STRING}
# Where to start to draw the label
Y=$((A*X+B))
# Imagemagick tool with PostScript command to rotate label
convert -size 20x120 xc:white \
-font /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerifCondensed.ttf \
-pointsize 16 \
-fill black \
-draw "rotate -90 text -$Y,15 '$STRING'" /tmp/${STRING}.png
done
Some experiments gave me variables for equation to center the label vertically. I can't do it in PostScript.
No comments:
Post a Comment