comparison TOOLS/subfont-c/fontgen @ 4934:2a01a162266d

runme + ai :)
author alex
date Sun, 03 Mar 2002 19:17:22 +0000
parents
children ffcac0e6a5f4
comparison
equal deleted inserted replaced
4933:429994672d8c 4934:2a01a162266d
1 #!/bin/bash
2
3 # Font Generator script by alex@naxine.org
4
5 if [ -z $1 ]; then
6 echo "fontgen: too few parameters"
7 echo "fontgen: Usage: $0 <input font filename> <output dir>"
8 exit
9 fi
10
11 if [ ! -r $1 ]; then
12 echo "fontgen: input font file not readable"
13 exit
14 fi
15
16 subfont_exec=subfont
17 #unicode="--unicode"
18 #font=arial.ttf
19 #font=mints-mild.pcf
20 #font=/home/alex/artwiz-mints-mild-latin2.hex
21 font=$1
22 if [ ! -z $2 ]; then
23 outdir="--outdir $2"
24 mkdir $2
25 fi
26 #font=verdana.ttf
27 encoding=iso-8859-2
28 fontsize=12
29 symbolssize=10
30 blur=2
31 outline=1.5
32
33 if [ ! -x $subfont_exec ]; then
34 echo "fontgen: 'subfont' not found or not executable!"
35 echo "fontgen: trying to make sources"
36
37 make || exit
38
39 if [ ! -x $subfont_exec ]; then
40 echo "failed"
41 exit
42 fi
43
44 exit
45 fi
46
47 # subfont <encoding> <size> <input>
48 echo "fontgen: creating font..."
49 ./$subfont_exec $outdir $unicode --blur $blur --outline $outline "$encoding" $fontsize "$font" || exit
50 echo "fontgen: creating osd symbols..."
51 ./$subfont_exec $outdir --append --blur $blur --outline $outline encodings/osd-mplayer $symbolssize osd/osd.pfb || exit
52
53 exit