🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text.tex
Article #1374

Re: PCF fonts with xtex

#1374
From: G|ran Uddeborg
Date: Thu, 16 Apr 1992 14:26
77 lines
2915 bytes
In article <1992Apr13.182438.996@cfa.harvard.edu> chary@cfa.harvard.edu (Sumitra Chary) writes:
>I was wondering if anyone has created PCF fonts with xtex and tex
>and if they do have a suitable script which would automate this procedure.

For what it's worth, this is what I usually use.  It is called with
the last two arguments (the scale and font) of xtex's error message.
(This is slightly updated from the version I sent out a few days ago,
for those who saw that before I cancelled it.)

#! /bin/sh
# This is a shell archive, meaning:
# 1. Remove everything above the #! /bin/sh line.
# 2. Save the resulting text in a file.
# 3. Execute the file with /bin/sh (not csh) to create:
#	usr/bin/mktexfont
# This archive created: Thu Apr 16 16:23:53 1992
export PATH; PATH=/bin:/usr/bin:$PATH
if test -f 'mktexfont'
then
	echo shar: "will not over-write existing file 'mktexfont'"
else
sed 's/^X//' << \SHAR_EOF > 'mktexfont'
X#!/bin/sh
XFONTDIR=/usr/local/lib/X11/fonts/tex
X
Xerror()	{ echo "$1" >&2; exit 1; }
Xusage() { error "usage: mktexfont [ scale font ] ..."; }
X
Xcd $FONTDIR
Xwhile [ $# -ge 2 ]; do
X
X	font=$2
X	mag=1000 magstep=0
X	while [ $1 -gt $mag ]; do
X		magstep=`expr $magstep + 1`
X		mag=`expr \( $mag \* 1095435 + 500000 \) / 1000000`
X	done
X	while [ $1 -lt $mag ]; do
X		magstep=`expr $magstep - 1`
X		mag=`expr \( $mag \* 1000000 + 600000 \) / 1095435`
X	done
X	if [ $1 -ne $mag ]; then
X		error "mktexfont: $1 not a proper magstep"
X	fi
X	normres=`expr \( 85 \* $mag + 500 \) / 1000`
X	largeres=`expr \( $normres \* 1440 + 500 \) / 1000`
X	largemag=`expr \( $mag \* 1440 + 500 \) / 1000`
X
X	# The "cat" is a workaround for a bug in Sun's /usr/bin/sh
X	imagstep=`expr $magstep / 2 | cat`
X	fmagstep=`expr $magstep % 2 \* 5 | cat`
X
X	set -x
X	mf "\mode=sun; \mag=\magstep($imagstep.$fmagstep); input $font;"
X	mf "\mode=sun; \mag=\magstep(`expr $imagstep + 2`.$fmagstep); input $font;"
X	set -e
X	mftobdf -dpi 85 -dev sun -scaled $mag $font
X	mftobdf -dpi 85 -dev sun -scaled $largemag $font
X	bdftopcf $font.$normres.bdf -o $font.$normres.pcf
X	bdftopcf $font.$largeres.bdf -o $font.$largeres.pcf
X	set +ex
X	rm $font.tfm $font.${normres}gf $font.${largeres}gf
X	rm $font.log $font.$normres.bdf $font.$largeres.bdf
X
X	shift 2
Xdone
X
Xif [ $# -ne 0 ]; then usage; fi
X
Xset -ex
Xmkfontdir
Xxset fp rehash
SHAR_EOF
chmod +x 'mktexfont'
fi
exit 0
#	End of shell archive
Technical Details
Message-ID: <1992Apr16.142636.2272@sics.se>
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!swrinde!gatech!bloom-beacon!eru.mt.luth.se!lunic!sunic!sunic2!seunet!sics.se!uddeborg
References: <1992Apr13.182438.996@cfa.harvard.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!swrinde!gatech!bloom-beacon!eru.mt.luth.se!lunic!sunic!sunic2!seunet!sics.se!uddeborg
From: uddeborg@sisu.se (G|ran Uddeborg)
Newsgroups: comp.text.tex
Subject: Re: PCF fonts with xtex
Message-ID: <1992Apr16.142636.2272@sics.se>
Date: 16 Apr 92 14:26:36 GMT
References: <1992Apr13.182438.996@cfa.harvard.edu>
Sender: news@sics.se
Organization: Swedish Institute of Systems Development
Lines: 77