#
# File:       Makefile: for evaluation of METAFONT mode_defs using sample characters
# Author:     Pierre A. MacKay
# Internet:   mackay@cs.washington.edu
# Date:       December 20, 1990
#
# usage: make ENGINE=[black,white] BLACKER=n.n FILLIN=n.n OCORR=n.n DPI=n FONT=<font>
# Leaves a copy of each mode_def in testmode.mf, in hopes that it may be the right one.
# 

ENGINE  = black
BLACKER = 0.0
FILLIN  = 0.0
OCORR   = 0.0
DPI     = 300
MF      = cmmf
FONT    = cmr7
DOTMODE = square

modetest: mode_stamp mtest.mf
	@$(MF) '\smode="testmode";' '\batchmode;' \input mtest input $(FONT)
	@echo " Running gftype -- image on $(FONT).$(DPI)i "
	@echo ""
	@gftype -i mtest.$(DPI)gf > $(FONT).$(DPI)i
	@cat  $(FONT).$(DPI)i

mode_stamp: testmode.mf testmode.tex
	@echo " Preparing a mode_def in file testmode.mf"
	@echo ""
	@echo "% mode_def YouNameIt = % (testmode.mf for smode use.)" | cat > testmode.mf  
	@echo "$(ENGINE) let font_setup=white_setup;" | cat >> testmode.mf  
	@echo " proofing:=0;" | cat >> testmode.mf
	@echo " % fontmaking:=1; % (don't make TFM while testing)" | cat >> testmode.mf
	@echo " tracingtitles:=1;" | cat >> testmode.mf            
	@echo " pixels_per_inch:=$(DPI);" | cat >> testmode.mf        
	@echo " blacker:=$(BLACKER);" | cat >> testmode.mf                  
	@echo " fillin:=$(FILLIN);" | cat >> testmode.mf                  
	@echo " o_correction:=$(OCORR);" | cat >> testmode.mf            
	@echo "% enddef;"| cat >> testmode.mf  
	@echo ""
	@echo "2s/white let/ let/ | wq" | ex - testmode.mf >/dev/null
	@echo "/black let/d | wq" | ex - testmode.mf > /dev/null
	@cat testmode.mf
	@echo ""


