This shows you the differences between two versions of the page.
| — |
photo:unicode_imgmgk [2013/11/22 05:02] (current) ben created |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | * 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'' | ||
| + | |||
| + | <code> | ||
| + | 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 | ||
| + | </code> | ||
| + | |||
| + | |||
| + | ta-da: | ||
| + | |||
| + | |||
| + | {{:photo:a♭.gif|}} | ||
| + | {{:photo:a.gif|}} | ||
| + | {{:photo:a♯.gif|}} | ||
| + | {{:photo:b♭.gif|}} | ||
| + | {{:photo:b.gif|}} | ||
| + | {{:photo:c.gif|}} | ||
| + | {{:photo:c♯.gif|}} | ||
| + | {{:photo:d♭.gif|}} | ||
| + | {{:photo:d.gif|}} | ||
| + | {{:photo:d♯.gif|}} | ||
| + | {{:photo:e♭.gif|}} | ||
| + | {{:photo:e.gif|}} | ||
| + | {{:photo:f.gif|}} | ||
| + | {{:photo:f♯.gif|}} | ||
| + | {{:photo:g♭.gif|}} | ||
| + | {{:photo:g.gif|}} | ||
| + | {{:photo:g♯.gif|}} | ||