[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem with ~ and ^
- To: "Berthold K.P. Horn" <bkph@ai.mit.edu>
- Subject: Re: Problem with ~ and ^
- From: Bruce Momjian <root@candle.pha.pa.us>
- Date: Tue, 23 Nov 1999 23:27:27 -0500 (EST)
- CC: tex-fonts@tug.org
- In-Reply-To: <4.2.2.19991117163730.00a93718@mail.ai.mit.edu> from "Berthold K.P.Horn" at "Nov 17, 1999 04:42:57 pm"
> At 01:46 PM 11/17/1999 -0500, you wrote:
>
> >I am having some trouble installing my own fonts into LaTeX using
> >psnfss. I have read dvips.dvi and gotten the needed commands.
> >
> >For some reason, the caret (^) and tilde (~) symbols will not print in
> >any of my fonts. I have fonts from three foundries, and they all don't
> >print carets or tildes. I am printing them as \~{} and \^{}.
>
> It's hard to answer your question without knowing what font encoding you
> are using. From the error message it seems that some part of what you are
> doing is trying to use T1, where circumflex accent and tilde accent are at
> char code 2 and 3 respectively.
>
> Note that asciitilde and asciicircumflex (at 94 and 126 in T1) are different,
> larger, lower glyphs than the tilde and circumflex.
>
> Since you don't seem to say how your TFMs where made and how you are
> reencoding the fonts, its hard to say more...
Seems I was too brief. I am using the attached script to generate the
*.tfm and *.vf from the *.afm files. I am using the Alladin PS fonts
and the Bitstream 500 fonts. I even have a script to generate the
psnfss *.sty files for the Bitstream 500 fonts.
When I was using the metafont *.tfm files, I couldn't get my fonts to
print certain ligatures and other characters because I don't have actual
Adobe fonts. I created my own *.tfm and *.vf files using this script.
I think the problem is that I have to generate my own files to match the
actual postscript fonts I am using.
Seems my versions of the fonts don't have the needed entries. But I
see in my *.afm files:
C 94 ; WX 479 ; N asciicircum ; B 51 323 428 698 ;
C 195 ; WX 273 ; N circumflex ; B -8 604 281 750 ;
C 126 ; WX 479 ; N asciitilde ; B 50 173 429 336 ;
C 196 ; WX 273 ; N tilde ; B -14 610 287 737 ;
However, \~{} and \^{} print nothing, while \asciitextcircum and
\asciitexttilde work fine.
Any ideas? My guess is that I am missing something in the attached
script, but I have no idea what it could be since all the other
characters like copyright symbol and ligatures print fine. Is it wrong
not to encode them as 8r? I don't have any need for *.dvi files because
I output only PDF and use latex2html for html output.
Also, my script has to use the raw *.tfm files for smallcaps in my *.map
files because I don't follow the standard font naming convensions, and
TeX will not find them. It assumes smallcaps in a virtual font have a
certain name extension. However, smallcaps are not related to my
problem above.
My book is at http://www.postgresql.org/docs/awbook.html.
I got most of this information from dvips.dvi.
I am familiar with installing fonts in troff, but this is my first font
install process for TeX.
---------------------------------------------------------------------------
:
[ "$#" -eq 0 ] && echo "Usage: $0 [-n] afm ..." 1>&2 && exit 1
trap "rm -fr /tmp/$$ /tmp/$$a" 0 1 2 3 15
#set -x
mkdir /tmp/$$
for FILE
do
# Remove a__ for Bitstream
BASE="`filebaseonly $FILE | sed 's/[a-z]___$//g' | sed 's/___$//g'`"
BASEFILE="`filebaseonly $FILE`"
# non-smallcaps
afm2tfm "$FILE" -v /tmp/$$/"$BASE" /tmp/$$/r"$BASE" | tee /tmp/$$a
vptovf /tmp/$$/"$BASE".vpl /tmp/$$/"$BASE".vf /tmp/$$/"$BASE".tfm
FONT="`head -1 /tmp/$$a | sed 's/^r//g'`"
FONTSC="r`echo $FONT | sed 's/ /sc /'`"
# do smallcaps
afm2tfm "$FILE" -V /tmp/$$/"${BASE}sc" /tmp/$$/"r${BASE}sc" | tee /tmp/$$a
vptovf /tmp/$$/"${BASE}sc".vpl /tmp/$$/"${BASE}sc".vf /tmp/$$/"${BASE}sc".tfm
cp /tmp/$$/*.tfm /usr/contrib/teTeX/texmf/fonts/tfm/local
cp /tmp/$$/*.vf /usr/contrib/teTeX/texmf/fonts/vf/local
rm /tmp/$$/*
pipe grep -v "^$FONT$" /usr/contrib/teTeX/texmf/fontname/local.map
echo "$FONT" >> /usr/contrib/teTeX/texmf/fontname/local.map
pipe grep -v "^$FONTSC$" /usr/contrib/teTeX/texmf/fontname/local.map
echo "$FONTSC" >> /usr/contrib/teTeX/texmf/fontname/local.map
pipe grep -v "^$FONT " /usr/contrib/teTeX/texmf/dvips/misc/psfonts.map
# TeXBase1Encoding ReEncodeFont <8r.enc
echo "$FONT" "<$BASEFILE.pfb" >>/usr/contrib/teTeX/texmf/dvips/misc/psfonts.map
pipe grep -v "^$FONTSC " /usr/contrib/teTeX/texmf/dvips/misc/psfonts.map
# TeXBase1Encoding ReEncodeFont <8r.enc
echo "$FONTSC" "<$BASEFILE.pfb" >>/usr/contrib/teTeX/texmf/dvips/misc/psfonts.map
done
texhash
--
Bruce Momjian | http://www.op.net/~candle
root@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026