[comp.lang.postscript] TeX vs. PS

pem@cadnetix.COM (Paul Meyer) (06/28/89)

[]
	I am trying to bring up TeX on our system in cooperation with
a Laserwriter-compatible printer.  Along with the UNIX TeX
distribution, I received a tree of files relating to producing PS from
TeX .dvi files using PS fonts (a filter called "psdvi").  The tree
included loads of .tfm (TeX font metric) files with names like
"Helvetica.tfm".  Unfortunately, TeX is looking for scaled files with
names like "Helvetica9.tfm" for 9-point.  As most of TeX is a black
box to me (TeX in yields dvi out, and hopefully the right filter
yields postscript from that), could some kind soul tell me what I need
to due to create the scaled .tfm files?

	The distribution stuff I got includes a version of dvi2ps, but
I would much prefer to use psdvi and PS fonts, for cleaner, faster,
and shorter print jobs.  The tape also included Metafont, a bunch of
mf utilities, etc.

AdvThanksance
Paul Meyer                      pem@cadnetix.COM
Daisy/Cadnetix Inc.		{uunet,boulder}!cadnetix!pem
5775 Flatirons Pkwy.            GEnie P.MEYER
Boulder, CO 80301               (303)444-8075x277

lee@uhccux.uhcc.hawaii.edu (Greg Lee) (06/28/89)

From article <8634@cadnetix.COM>, by pem@cadnetix.COM (Paul Meyer):
" ...
" TeX .dvi files using PS fonts (a filter called "psdvi").  The tree
" included loads of .tfm (TeX font metric) files with names like
""Helvetica.tfm".  Unfortunately, TeX is looking for scaled files with
" names like "Helvetica9.tfm" for 9-point. ...

That's odd.  I don't have the latest version of TeX, but mine looks for
any file <name>.tfm you give it, by issuing a command
`\font\myfont=<name>'.  If the command was `\font\myfont=Helvetica',
then, TeX should look for the file named Helvetica.tfm, and would assume
a point size given as the default or design size within that .tfm file,
probably 10 points.  Since Adobe fonts are scalable, the natural way to
specify a different point size is with the `at' argument, as in
`\font\myfont=Helvetica at 9pt', in which case TeX will scale the
dimensions given in the Helvetica.tfm file down (in this case)
appropriately, and it's up to your PS driver program to pick up the
information TeX leaves in the .dvi file and issue corresponding PS
commands that ask for 9 point Helvetica (or whatever size gives that in
effect).  At least, this is how my version of dvi2ps works -- I haven't
used psdvi.

			Greg, lee@uhccux.uhcc.hawaii.edu

ken@cs.rochester.edu (Ken Yap) (06/29/89)

|	I am trying to bring up TeX on our system in cooperation with
|a Laserwriter-compatible printer.  Along with the UNIX TeX
|distribution, I received a tree of files relating to producing PS from
|TeX .dvi files using PS fonts (a filter called "psdvi").  The tree
|included loads of .tfm (TeX font metric) files with names like
|"Helvetica.tfm".  Unfortunately, TeX is looking for scaled files with
|names like "Helvetica9.tfm" for 9-point.  As most of TeX is a black
|box to me (TeX in yields dvi out, and hopefully the right filter
|yields postscript from that), could some kind soul tell me what I need
|to due to create the scaled .tfm files?

TeX is looking for Helvetica9 because somebody wrote the macros as

	\font\sf9=Helvetica9	(or something like that)

Instead, rewrite them as

	\font\sf9=Helvetica scaled 900

and you'll only need one tfm file per face. Naturally, the dvi backend
has to know the right thing to do.

|	The distribution stuff I got includes a version of dvi2ps, but
|I would much prefer to use psdvi and PS fonts, for cleaner, faster,
|and shorter print jobs.  The tape also included Metafont, a bunch of
|mf utilities, etc.

But keep in mind that math typesetting won't work well with PS fonts.
If you stick to ordinary stuff, you'll be ok.

amanda@intercon.UUCP (Amanda Walker) (06/30/89)

The .tfm files for psdvi are set up for a 1-point design size, so for
9 point Helvetica, you'd say

	\font\foo=Helvetica at 9pt

The version of dvi2ps that handles Adobe fonts uses similar .tfm files
set up for a 10 point design size.  This has the advantage of making
font scaling look the same for Adobe and CMR fonts.

--
Amanda Walker  <amanda@intercon.UUCP>
InterCon Systems Corporation
--
"Those preachers are right--there's more in these songs
than meets the eye..."  --Arlo Guthrie

jmr@nada.kth.se (Jan Michael Rynning) (07/02/89)

In article <1989Jun28.175531.8966@cs.rochester.edu> ken@cs.rochester.edu (Ken Yap) writes:
>Instead, rewrite them as
>
>	\font\sf9=Helvetica scaled 900

1. TeX only accepts letters in symbols, not digits, so trying to use "sf9"
   as the TeX symbol that refers to the font will result in TeX using the
   symbol "sf", and screwing up trying to find the font "9=Helvetica".

2. Some implementations use a 10pt default size for PostScript fonts, but
   most of those that I have seen use a 1pt (the PostScript default size).
   On the latter, asking for "scaled 900" will of course give you a 0.9pt
   size font, which is som small that it is hardly visible.

The following, syntactically correct, definition should give you a 9pt size
Helvetica on both kinds of implementations:

\font\ninesf=Helvetica at 9pt

Jan Michael Rynning,			jmr@nada.kth.se
Department of Numerical Analysis	If you can't fully handle domains:
  and Computing Science,		ARPA: jmr%nada.kth.se@uunet.uu.net
Royal Institute of Technology,		UUCP: {uunet,mcvax,...}!nada.kth.se!jmr
S-100 44 Stockholm,			BITNET: jmr@sekth
Sweden.					Phone: +46-8-7906288

ken@cs.rochester.edu (Ken Yap) (07/03/89)

|>	\font\sf9=Helvetica scaled 900
|
|1. TeX only accepts letters in symbols, not digits, so trying to use "sf9"
|   as the TeX symbol that refers to the font will result in TeX using the
|   symbol "sf", and screwing up trying to find the font "9=Helvetica".

Oops, you're right. One of the hazards of flipping between different
programming languages.

|2. Some implementations use a 10pt default size for PostScript fonts, but
|   most of those that I have seen use a 1pt (the PostScript default size).
|   On the latter, asking for "scaled 900" will of course give you a 0.9pt
|   size font, which is som small that it is hardly visible.

Correct again. I had forgotten that psdvi uses a base size of 1 pt.
Our filter uses a more reasonable default of 10 pt. To avoid problems,
state the point size explicitly as recommended.