Index of /graphics/fig2mf
      Name                    Last modified       Size  Description

[DIR] Parent Directory 17-Jan-2021 04:14 - [   ] alltypes.fig 19-Mar-1993 10:00 3k [   ] balls.fig 19-Mar-1993 10:00 3k [   ] bean.fig 19-Mar-1993 10:00 1k [   ] book.fig 19-Mar-1993 10:00 1k [   ] chase.fig 19-Mar-1993 10:00 1k [   ] face.fig 19-Mar-1993 10:00 2k [TXT] fig2MF.c 19-Mar-1993 10:00 10k [TXT] fig2MFman.tex 19-Mar-1993 10:00 4k [   ] 19-Mar-1993 10:00 24k [   ] house.fig 19-Mar-1993 10:00 9k [   ] many.fig 19-Mar-1993 10:00 1k [   ] mitsu.fig 19-Mar-1993 10:00 1k [   ] parc-place.fig 19-Mar-1993 10:00 1k [   ] plane.fig 19-Mar-1993 10:00 1k [   ] powells.fig 19-Mar-1993 10:00 2k [   ] qd.fig 19-Mar-1993 10:00 1k [   ] shade.fig 19-Mar-1993 10:00 1k [   ] tf 19-Mar-1993 10:00 1k [   ] thick.fig 19-Mar-1993 10:00 1k [   ] type.fig 19-Mar-1993 10:00 7k

Here is fig2MF, a tool to convert fig 2.1 input to METAFONT. The 
generated METAFONT code uses the mfpic macros.

Fig2MF should compile with any C compiler known to man. Under Unix,
just say:

	make fig2MF

Usage is straightforward:

	fig2mf file.fig >
	mf '\mode:=localfont; input'
	tex '\font\foo=foo \foo \char33 \bye'

In order to use the font you've just created, you must
place the mfpic macros where METAFONT will find them, and
adjust your TeX environment to recognize the .tfm and
.gf files. You may also convert the .gf file to .pk format.

Fig2MF has a few options:

Option    Default Description
-mag 	  1000   Font magstep
-code 	  32     Initial METAFONT font code value
-pen 	  0.5    Size of the METAFONT pen (points)
-xscale   0.125  x coordinate scaling factor
-yscale   0.125  y coordinate scaling factor
-xneg 	  0.0    Minimum x coordinate value of the figure (inches)
-xpos 	  8.0    Maximum x coordinate value of the figure (inches)
-yneg 	  0.0    Minimum y coordinate value of the figure (inches)
-ypos 	  8.0    Maximum y coordinate value of the figure (inches)
-top 	  8.0    Top of the whole coordinate system (inches)

The options are specified in the form of -opt=value. For example:

	fig2MF -xscale=0.25 -xpos=4.0 foo.fig

Enclosed is:

fig2MF.c		source code
fig2MFman.tex		manual		mfpic macros
tf			shell script to test new fonts

Samples fig files:



Thanks go to Thomas Leathrum for creating the mfpic METAFONT macros.
Geoffery Tobin contributed ideas, fruitful discussion and the 
enhanced mfpic macros.

I'd dearly love to receive any bug fixes and enhancements. 
Anthony Starks