[comp.fonts] METAFONT -> PostScript

mcglk@scott.stat.washington.edu (Ken McGlothlen) (06/15/88)

I've been bouncing around an idea for some time, and it seems time to get
some opinions from a lot of people who've been at this longer than I have.

What I'd like to do is write a program to convert METAFONT source programs
into PostScript.

To be honest, I haven't done a lot of analysis on this topic, but it seems
the advantages would be several-fold.

	1)  No big bitmaps.

		Even PK files can get messy, and you need one for cmr5,
		cmr7, cmr8, cmr10, cmr12, and so on.  Once the font has
		been compiled, you need to run the compiler again to get
		a slightly different font.

	2)  Resize and reshape on the fly.

		With one PostScript program (albeit a somewhat large
		PostScript program), you could resize fonts on the fly, like

			10	% pointsize
			4 mag	% magnification
			/cmr	% fontname
			setTeXfont

		I assume that setTeXfont would only set up parameters, since
		there would be another procedure (say, draw_shape) that would
		actually USE the parameters in order to sketch out the
		character.

	3)  *Fast* DVI->PS conversion, *fast* downloading (hopefully).

		Instead of having to download those bitmaps every time you
		want to go to nine-point cmr from ten-point, you download
		the cmr_draw procedure once, and just change a couple of
		parameters on the fly.

	4)  If wanted, half-toning, patterns, etc.

		Why recompile in METAFONT to get an 80%-gray font?  PostScript
		does it fairly fast.

I am interested in writing a program of this sort, but I'd be interested
in trying.  I'd be interested in hearing your comments BEFORE I start,
though--I have a tendency to get myself in too deep too quickly, and this
is one of those things I'd rather do right the first time.  :)

Thanks in advance for your comments.

				--Ken McGlothlen
				  mcglk@max.acs.washington.edu
				  mcglk@scott.ms.washington.edu

dow@wjh12.harvard.edu (Dominik Wujastyk) (06/15/88)

In article <911@entropy.ms.washington.edu> mcglk@scott.ms.washington.edu (Ken McGlothlen) writes:
>I've been bouncing around an idea for some time, and it seems time to get
>some opinions from a lot of people who've been at this longer than I have.
>
>What I'd like to do is write a program to convert METAFONT source programs
>into PostScript.
>

A program to do this has already been done, by Leslie Carr of Southampton
University (UK).  He has written up what he did as "Of Metafont and
PostScript", in _TeX Users Group Eighth Annual Meeting: Conference
Proceedings_, (Providence: AMS, 1988).  This is number 5 in the TUG
TeXniques series.  

Leslie worked by converting not the GF file, but the LOG file! (Verbose
version.)  It really is very interesting, and amazing how well it worked.

Dominik Wujastyk

-- 
bitnet:	 user DOW on the bitnet node HARVUNXW
arpanet: dow@wjh12.harvard.edu
csnet:   dow@wjh12.harvard.edu
uucp:    ...!ihnp4!wjh12!dow

candy@umb.umb.edu (declarer/Karl B./dummy) (06/16/88)

Leslie Carr's article was interesting, and messing
around with the transcript file is certainly the only way to
go , but
(a) Metafont pens are not converted into outlines (i.e., splines),
hence MF programs that use pens (like Computer Modern) won't
be readily translatable, and
(b) His results are interesting from a computer scientist's
point of view, but from a type designer's point of view
they are, sad to say, not worth too much. His resulting type
doesn't look anything like Computer Modern; it's sort of
a bastardization of a modern type and an oldstyle type.
The transitional serifs (with a curve, instead of meeting
at right angles), are especially jarring.

This is an example of a general problem in computer science.
(It seems to me.) Computer people know a lot about computers;
but computers can simulate almost (perhaps in a few decades we'll
be able to strike the ``almost'') anything, but only if
the person doing the simulating knows as much as an expert
in that field. (In this case, type design.) This is not
a common combination. (In the Metafontbook, Don Knuth
says he hopes the best designs will result from collaborations
between designers who aren't experts in Metafont (i.e., computers),
and programmers who aren't experts in type design.) In other
fields, such as art (the Science news article a while back
about computer-generated ``Mondrians'', while good enough
to fool me, didn't even cause my friend with an art background
to blink an eyelash -- out of the four there, she pointed to
the genuine Mondrian without hesitation), music, and on and on.
As programmers get better at programming, they want to do more
challenging things, which unfortunately often leads to not-so-wonderful
results in terms of the field they're trying to write programs for.

Until universities or businesses start funding ``computer science
and X'' programs, I think the results will fall short.

Karl.      karl@umb.edu
Kathy.     letters@umb.edu

richard@gryphon.CTS.COM (Richard Sexton) (06/17/88)

In article <230@wjh12.harvard.edu> dow@wjh12.UUCP (Dominik Wujastyk) writes:
>In article <911@entropy.ms.washington.edu> mcglk@scott.ms.washington.edu (Ken McGlothlen) writes:
>>
>>What I'd like to do is write a program to convert METAFONT source programs
>>into PostScript.
>
>A program to do this has already been done, by Leslie Carr of Southampton
>University (UK).  He has written up what he did as "Of Metafont and
>PostScript", in _TeX Users Group Eighth Annual Meeting: Conference
>Proceedings_, (Providence: AMS, 1988).  This is number 5 in the TUG
>TeXniques series.  

Please go on.



-- 
                              "Shrimp Ahoy"
richard@gryphon.CTS.COM                               {backbone}!gryphon!richard

dow@wjh12.harvard.edu (Dominik Wujastyk) (06/18/88)

In article <4506@gryphon.CTS.COM> richard@gryphon.CTS.COM (Richard Sexton) writes:
>In article <230@wjh12.harvard.edu> dow@wjh12.UUCP (Dominik Wujastyk) writes:
>>In article <911@entropy.ms.washington.edu> mcglk@scott.ms.washington.edu (Ken McGlothlen) writes:
>>>
>>>What I'd like to do is write a program to convert METAFONT source programs
>>>into PostScript.
>>
>>A program to do this has already been done, by Leslie Carr of Southampton
>>University (UK).  He has written up what he did as "Of Metafont and
>>PostScript", in _TeX Users Group Eighth Annual Meeting: Conference
>>Proceedings_, (Providence: AMS, 1988).  This is number 5 in the TUG
>>TeXniques series.  
>
>Please go on.

I have just flipped through the article, thinking about doing a precis of
it for this news group.  But it has diagrams, is fairly detailed and hard
to summarise, and, hang it all, the whole book of proceedings only costs $15. 
You can order it from the 	TeX Users Group,
				P.O.Box 9506,
				Providence, RI, 02940, USA.
				Phone: (401) 751 7760
TUG will even accept credit card orders on the phone, so it's really easy.
And then you have the real thing.  The same volume also has papers on TeX
and typesetting Greek, Japanese and Turkish, with attention to the fonts
needed for each.


Dominik Wujastyk

-- 
bitnet:	 user DOW on the bitnet node HARVUNXW
arpanet: dow@wjh12.harvard.edu
csnet:   dow@wjh12.harvard.edu
uucp:    ...!ihnp4!wjh12!dow