#
#	Fix makeDESC output for DWB 1.0 which requires that the
#	psuedo chars '\|' and '\^' be in the font tables
#
#	$Id: dwb1fix.sh,v 1.2 89/09/01 09:03:06 rick Exp $
#
#	this file gets installed as "/usr/lib/font/devjet/dwb1fix"
#

#
#	If you have DWB 1.0, you should call this script from
#	the script "/usr/lib/font/fontcfg".  Your "fontcfg"
#	script should look something like this when you
#	get done adding the call:
#		...
#		./makeDESC $*
#		./dwb1fix
#		echo "Making standard fonts:  \c"
#		...
#
#	Then, run "fontcfg" again.
#
#	NOTE:
#		DWB 1.0's troff is likely to core dump if a large
#	number of special characters or fonts are configured.
#	If you have this trouble, trim out some special characters
#	that you don't need from the *.code tables, then re-run "fontcfg".
#	With JetRoff 2.6, you can knock out all of the "combo" characters
#	by running "fontcfg -C".  This is a quick way to determine if
#	you need to trim the *.code tables yourself.
#

EM_SIXTH=6	# 1/6 em in dots at 10 point (roughly)
EM_TWELFTH=3	# 1/12 em in dots at 10 point (roughly)

echo "Adding psuedo chars '\|' and '\^' for DWB 1.0's pleasure"
for i in [A-Z] [A-Za-z][A-Za-z] 
do
	if [ ! -f $i ]; then continue; fi
	echo $i
	ed - $i <<-EOF
	/charset/a
	\|	$EM_SIXTH 0	0
	\^	$EM_TWELFTH 0	0
	.
	w
	q
	EOF
done
ed - DESC <<-EOF
/charset/a
\| \^
.
w
q
EOF
