User Tools

Site Tools


photo:unicode_imgmgk
  • bash v3 does not support unicode output with the built-in printf, use MacPorts to install bash v4
  • once in bash v4, printf “\u266D” gives “♭”
  • to get a list of fonts in ImageMagick: convert -list font
bash-4.2$ cat chords.txt 
F
C	
G
D
A
E
B
F♯
G♭
C♯
D♭
G♯
A♭
D♯
E♭
A♯
B♭
bash-4.2$ for i in $(<chords.txt);do convert -font "Apple-Symbols-Ordinær" -density 90 -pointsize 144 label:$i  tmp/$i.gif;done
bash-4.2$ ls tmp
A.gif    A♯.gif   B♭.gif   C♯.gif   D♭.gif   E.gif    F.gif    G.gif    G♯.gif
A♭.gif   B.gif    C.gif    D.gif    D♯.gif   E♭.gif   F♯.gif   G♭.gif

ta-da:

photo/unicode_imgmgk.txt · Last modified: 2013/11/22 05:02 by ben