summaryrefslogtreecommitdiff
path: root/src/builtins/buildfont
diff options
context:
space:
mode:
authorKaleb Keithley <kaleb@freedesktop.org>2003-11-14 16:48:50 +0000
committerKaleb Keithley <kaleb@freedesktop.org>2003-11-14 16:48:50 +0000
commit3795e9702b3b3a6fe0594d09cdd110adeb5e42f9 (patch)
treecaec4aaf13f12f0a31c15cb24ad2127eff834dd2 /src/builtins/buildfont
parent153e8da44452905ae04a0e20ad0d85f40399b4ca (diff)
Initial revision
Diffstat (limited to 'src/builtins/buildfont')
-rw-r--r--src/builtins/buildfont14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/builtins/buildfont b/src/builtins/buildfont
new file mode 100644
index 0000000..aa4602f
--- /dev/null
+++ b/src/builtins/buildfont
@@ -0,0 +1,14 @@
+#!/bin/sh
+#
+# Convert a bdf file into C-code suitable for inclusion in
+# builtin fonts
+#
+FONT=$1
+NAME=$2
+echo 'static const char file_'$NAME'[] = {'
+bdftopcf -p1 -u1 $1 |
+ compress -b 12 |
+ od -b -v -w8 |
+ sed 's/^[0-9]*\( *\)/\1\1\1\1/' |
+ sed 's/\([0-9][0-9]*\)/'"'"'\\\1'"'"',/g'
+echo '};'