annotate TOOLS/subfont-c/fontgen @ 9278:caea8ed36b48

The reason why mplayer crashes (in some cases) when using x11 output and -wid (>0) parameter is this: Mplayer by default creates a colormap using DirectColor visual. If the window given to mplayer uses TrueColor visual there will be an error when mplayer sets the colormap for the window. This patch modifies mplayer to use TrueColor visual if the window given to mplayer uses TrueColor. Another solution is to make sure that the window given to mplayer is created using DirectColor visual if it is supported by the display. Jouni Tulkki <jitulkki@cc.hut.fi>
author arpi
date Tue, 04 Feb 2003 18:31:44 +0000
parents ffcac0e6a5f4
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4934
2a01a162266d runme + ai :)
alex
parents:
diff changeset
1 #!/bin/bash
2a01a162266d runme + ai :)
alex
parents:
diff changeset
2
2a01a162266d runme + ai :)
alex
parents:
diff changeset
3 # Font Generator script by alex@naxine.org
2a01a162266d runme + ai :)
alex
parents:
diff changeset
4
2a01a162266d runme + ai :)
alex
parents:
diff changeset
5 if [ -z $1 ]; then
2a01a162266d runme + ai :)
alex
parents:
diff changeset
6 echo "fontgen: too few parameters"
2a01a162266d runme + ai :)
alex
parents:
diff changeset
7 echo "fontgen: Usage: $0 <input font filename> <output dir>"
2a01a162266d runme + ai :)
alex
parents:
diff changeset
8 exit
2a01a162266d runme + ai :)
alex
parents:
diff changeset
9 fi
2a01a162266d runme + ai :)
alex
parents:
diff changeset
10
2a01a162266d runme + ai :)
alex
parents:
diff changeset
11 if [ ! -r $1 ]; then
2a01a162266d runme + ai :)
alex
parents:
diff changeset
12 echo "fontgen: input font file not readable"
2a01a162266d runme + ai :)
alex
parents:
diff changeset
13 exit
2a01a162266d runme + ai :)
alex
parents:
diff changeset
14 fi
2a01a162266d runme + ai :)
alex
parents:
diff changeset
15
2a01a162266d runme + ai :)
alex
parents:
diff changeset
16 subfont_exec=subfont
2a01a162266d runme + ai :)
alex
parents:
diff changeset
17 #unicode="--unicode"
2a01a162266d runme + ai :)
alex
parents:
diff changeset
18 #font=arial.ttf
2a01a162266d runme + ai :)
alex
parents:
diff changeset
19 #font=mints-mild.pcf
2a01a162266d runme + ai :)
alex
parents:
diff changeset
20 #font=/home/alex/artwiz-mints-mild-latin2.hex
2a01a162266d runme + ai :)
alex
parents:
diff changeset
21 font=$1
2a01a162266d runme + ai :)
alex
parents:
diff changeset
22 if [ ! -z $2 ]; then
2a01a162266d runme + ai :)
alex
parents:
diff changeset
23 outdir="--outdir $2"
2a01a162266d runme + ai :)
alex
parents:
diff changeset
24 mkdir $2
2a01a162266d runme + ai :)
alex
parents:
diff changeset
25 fi
2a01a162266d runme + ai :)
alex
parents:
diff changeset
26 #font=verdana.ttf
2a01a162266d runme + ai :)
alex
parents:
diff changeset
27 encoding=iso-8859-2
2a01a162266d runme + ai :)
alex
parents:
diff changeset
28 fontsize=12
2a01a162266d runme + ai :)
alex
parents:
diff changeset
29 symbolssize=10
2a01a162266d runme + ai :)
alex
parents:
diff changeset
30 blur=2
2a01a162266d runme + ai :)
alex
parents:
diff changeset
31 outline=1.5
2a01a162266d runme + ai :)
alex
parents:
diff changeset
32
2a01a162266d runme + ai :)
alex
parents:
diff changeset
33 if [ ! -x $subfont_exec ]; then
2a01a162266d runme + ai :)
alex
parents:
diff changeset
34 echo "fontgen: 'subfont' not found or not executable!"
6788
alex
parents: 4934
diff changeset
35 echo "fontgen: trying to compile"
4934
2a01a162266d runme + ai :)
alex
parents:
diff changeset
36
2a01a162266d runme + ai :)
alex
parents:
diff changeset
37 make || exit
2a01a162266d runme + ai :)
alex
parents:
diff changeset
38
2a01a162266d runme + ai :)
alex
parents:
diff changeset
39 if [ ! -x $subfont_exec ]; then
2a01a162266d runme + ai :)
alex
parents:
diff changeset
40 echo "failed"
2a01a162266d runme + ai :)
alex
parents:
diff changeset
41 exit
2a01a162266d runme + ai :)
alex
parents:
diff changeset
42 fi
2a01a162266d runme + ai :)
alex
parents:
diff changeset
43
2a01a162266d runme + ai :)
alex
parents:
diff changeset
44 exit
2a01a162266d runme + ai :)
alex
parents:
diff changeset
45 fi
2a01a162266d runme + ai :)
alex
parents:
diff changeset
46
2a01a162266d runme + ai :)
alex
parents:
diff changeset
47 # subfont <encoding> <size> <input>
2a01a162266d runme + ai :)
alex
parents:
diff changeset
48 echo "fontgen: creating font..."
2a01a162266d runme + ai :)
alex
parents:
diff changeset
49 ./$subfont_exec $outdir $unicode --blur $blur --outline $outline "$encoding" $fontsize "$font" || exit
2a01a162266d runme + ai :)
alex
parents:
diff changeset
50 echo "fontgen: creating osd symbols..."
2a01a162266d runme + ai :)
alex
parents:
diff changeset
51 ./$subfont_exec $outdir --append --blur $blur --outline $outline encodings/osd-mplayer $symbolssize osd/osd.pfb || exit
2a01a162266d runme + ai :)
alex
parents:
diff changeset
52
2a01a162266d runme + ai :)
alex
parents:
diff changeset
53 exit