#!/bin/sh { read junk; read script_id; read author; } << 'EOF' jiskan24-bdf-to-amckan34-bdf 1.0.1 (2000-Jun-13-Tue) Adam M. Costello This script expects to be fed jiskan24.bdf (which comes with XFree86) on stdin. It writes amckan34.bdf to stdout, which is the same except that the cells are padded from 24x24 to 26x34 by adding one pixel on the left and right and five pixels on the top and bottom. The result goes well with 13x34amc.bdf (a sans-serif font). Copyright (c) 2000 Adam M. Costello. Everyone is hereby granted permission to do whatever they like with this file, provided that if they modify it they take reasonable steps to avoid confusing or misleading people about the authors, version, and terms of use of the derived file. The copyright holder makes no guarantees about the correctness of this file, and is not responsible for any damage resulting from its use. EOF awk ' $1 == "STARTFONT" { print $0 print "COMMENT amckan34.bdf" print "COMMENT produced by", script_id print "COMMENT by", author print "COMMENT 26x34 kanji font" print "COMMENT Derived from jiskan24.bdf by adding one pixel of padding" print "COMMENT on the left and right, and five on the top and bottom." print "COMMENT" print "COMMENT Original description:" print "COMMENT" next } $1 == "FONT" { expected_name = \ "-JIS-Fixed-Medium-R-Normal--24-230-75-75-C-240-JISX0208.1983-0" new_name = \ "-JIS&AMC-Fixed-Medium-R-Normal--34-230-75-75-C-260-JISX0208.1983-0" if ($2 != expected_name) { print "error: unexpected font on input" print "we expected", expected_name print "but got", $2 exit 1 } print $1, new_name next } $1 == "FONTBOUNDINGBOX" { print $1, 24, 24, 1, -2 print "COMMENT The first two arguments of FONTBOUNDINGBOX are the" print "COMMENT width and height of the bounding rectangle. The next" print "COMMENT two are the x and y displacements from the origin" print "COMMENT to the lower-left corner of the bounding rectangle." print "COMMENT" next } $1 == "FONT_ASCENT" { print $1, 26 next } $1 == "FONT_DESCENT" { print $1, 8 next } $1 == "FOUNDRY" { print $1, "\"JIS&AMC\"" next } $1 == "PIXEL_SIZE" { print $1, 34 next } $1 == "AVERAGE_WIDTH" { print $1, 260 next } $1 == "SWIDTH" { print $1, $2 * 13 / 12, $3 next } $1 == "DWIDTH" { print $1, 26, $3 next } $1 == "BBX" { print $1, 24, 24, 1, -2 next } 1 == 1 { print $0; } ' "script_id=$script_id" "author=$author"