summaryrefslogtreecommitdiffstats
path: root/TOOLS
diff options
context:
space:
mode:
authoralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-03-03 19:17:22 +0000
committeralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-03-03 19:17:22 +0000
commitc0b53cbd697086cf452e93ee8ff2ac77a79ab02f (patch)
treea45bb6ddc9e1bdd42155b0e138ded5e0259c762d /TOOLS
parentf6878753fbd0d509134ac24c0e9f404ac74fc4fe (diff)
downloadmpv-c0b53cbd697086cf452e93ee8ff2ac77a79ab02f.tar.bz2
mpv-c0b53cbd697086cf452e93ee8ff2ac77a79ab02f.tar.xz
runme + ai :)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4935 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'TOOLS')
-rwxr-xr-xTOOLS/subfont-c/fontgen53
1 files changed, 53 insertions, 0 deletions
diff --git a/TOOLS/subfont-c/fontgen b/TOOLS/subfont-c/fontgen
new file mode 100755
index 0000000000..8e5224c5e3
--- /dev/null
+++ b/TOOLS/subfont-c/fontgen
@@ -0,0 +1,53 @@
+#!/bin/bash
+
+# Font Generator script by alex@naxine.org
+
+if [ -z $1 ]; then
+ echo "fontgen: too few parameters"
+ echo "fontgen: Usage: $0 <input font filename> <output dir>"
+ exit
+fi
+
+if [ ! -r $1 ]; then
+ echo "fontgen: input font file not readable"
+ exit
+fi
+
+subfont_exec=subfont
+#unicode="--unicode"
+#font=arial.ttf
+#font=mints-mild.pcf
+#font=/home/alex/artwiz-mints-mild-latin2.hex
+font=$1
+if [ ! -z $2 ]; then
+ outdir="--outdir $2"
+ mkdir $2
+fi
+#font=verdana.ttf
+encoding=iso-8859-2
+fontsize=12
+symbolssize=10
+blur=2
+outline=1.5
+
+if [ ! -x $subfont_exec ]; then
+ echo "fontgen: 'subfont' not found or not executable!"
+ echo "fontgen: trying to make sources"
+
+ make || exit
+
+ if [ ! -x $subfont_exec ]; then
+ echo "failed"
+ exit
+ fi
+
+ exit
+fi
+
+# subfont <encoding> <size> <input>
+echo "fontgen: creating font..."
+./$subfont_exec $outdir $unicode --blur $blur --outline $outline "$encoding" $fontsize "$font" || exit
+echo "fontgen: creating osd symbols..."
+./$subfont_exec $outdir --append --blur $blur --outline $outline encodings/osd-mplayer $symbolssize osd/osd.pfb || exit
+
+exit