Home | History | Annotate | Line # | Download | only in builtins
      1 #!/bin/sh
      2 #
      3 # Convert a bdf file into C-code suitable for inclusion in
      4 # builtin fonts
      5 #
      6 FONT=$1
      7 NAME=$2
      8 echo 'static const char file_'$NAME'[] = {'
      9 bdftopcf -p1 -u1 $1 |
     10       compress -b 12 |
     11       od -b -v -w8 |
     12       sed 's/^[0-9]*\( *\)/\1\1\1\1/' |
     13       sed 's/\([0-9][0-9]*\)/'"'"'\\\1'"'"',/g'
     14 echo '};'
     15