1 |
#!/bin/bash |
2 |
|
3 |
: >glyph.arc |
4 |
|
5 |
glyph() { |
6 |
local base="$1" |
7 |
local text="$2" |
8 |
local color="$3" |
9 |
local font="$4" |
10 |
|
11 |
file="$base.x11.64x64.png" |
12 |
font=$(fc-list "$font" file | tail -1 | sed -e 's/..$//') |
13 |
convert -size 64x64 xc:none -set hinting on \ |
14 |
-font "$font" -pointsize 64 -fill "$color" -gravity center -draw "text 0,-3 \"$text\"" "$file" |
15 |
optipng -o9 -q "$file" >/dev/null |
16 |
|
17 |
cat >>glyph.arc <<EOF |
18 |
object $base |
19 |
name $text |
20 |
name ${text}s |
21 |
face $base.x11 |
22 |
no_pick 1 |
23 |
visibility 100 |
24 |
nrof 1 |
25 |
weight 1000000 |
26 |
end |
27 |
|
28 |
EOF |
29 |
} |
30 |
|
31 |
for glyph in A B C D E F G H I J K L M N O P Q R S T U V W X Y Z; do |
32 |
glyph glyph_$glyph $glyph gray30 "Luxi Sans:style=Bold" |
33 |
done |
34 |
for glyph in 0 1 2 3 4 5 6 7 8 9; do |
35 |
glyph glyph_$glyph $glyph gray30 "Luxi Sans:style=Bold" |
36 |
done |