2 # (c) Ricardas Cepas <rch@pub.osf.lt>. Copying policy: GNU GPL V2.
6 then echo ' Usage: psfsplit <psf_bitmap_font_filename> '
9 if [ `hexdump -e '/2 "%X" ' -n2 $1 ` != "436" ]
10 then echo $1 -- non .psf file
13 size=`hexdump -e '/1 "%i" ' -n1 -s2 $1 `
14 size=$[ ($size % 2 + 1) * 256 ]
15 height=`hexdump -e '/1 "%i" ' -n1 -s3 $1 `
16 echo $size chars, height=$height
18 dd bs=4 count=1 if=$1 of=$1_/#psf_header &>/dev/null
20 while let $[ i < $size ]
22 dd bs=1 count=$height skip=$[ $i * $height + 4 ] if=$1 \
23 of=$1_/`printf "%.3x" $i` &>/dev/null
26 dd bs=1 skip=$[ $i * $height + 4 ] if=$1 of=$1_/map_tables &>/dev/null