MF(1) MF(1) NAME mf,inimf,virmf−Metafont,alanguageforfontandlogodesign SYNOPSIS mf[options][commands] DESCRIPTION Thismanualpageisnotmeanttobeexhaustive.Thecompletedocumentationforthisversionof TEXcanbefoundintheinfofileormanualWeb2C:ATeXimplementation. METAFONTreadstheprograminthespecifiedfilesandoutputsfontrasters(ingfformat)and fontmetrics(intfmformat).TheMETAFONTlanguageisdescribedinTheMETAFONTbook. LikeTEX,METAFONTisnormallyusedwithalargebodyofprecompiledmacros,andfontgenerationinparticularrequiresthesupportofseveralmacrofiles.ThisversionofMETAFONTlooksat itscommandlinetoseewhatnameitwascalledunder.Bothinimfandvirmfaresymlinksto themfexecutable.Whencalledasinimf(orwhenthe--inioptionisgiven)itcanbeusedto precompilemacrosintoa.basefile.Whencalledasvirmfitwillusetheplainbase.Whencalled underanyothername,METAFONTwillusethatnameasthenameofthebasetouse.Forexample,whencalledasmfthemfbaseisused,whichisidenticaltotheplainbase.Otherbasesthan plainarerarelyused. ThecommandsgivenonthecommandlinetotheMETAFONTprogramarepassedtoitasthefirst inputline.(Butitisofteneasiertotypeextendedargumentsasthefirstinputline,sinceUNIX shellstendtogobbleupormisinterpretMETAFONT’sfavoritesymbols,likesemicolons,unlessyou quotethem.)AsdescribedinTheMETAFONTbook,thatfirstlineshouldbeginwithafilename,a \controlsequence,ora&basename. Thenormalusageistosay mf’\mode=<printengine>;[mag=magstep(n);]’inputfont tostartprocessingfont.mf.ThesinglequotesarethebestwayofkeepingtheUnixshellfrom misinterpretingthesemicolonsandfromremovingthe\character,whichisneededheretokeep METAFONTfromthinkingthatyouwanttoproduceafontcalledmode.(Oryoucanjustsaymf andgivetheotherstuffonthenextline,withoutquotes.)Othercontrolsequences,suchasbatchmode(forsilentoperation)canalsoappear.Thenamefontwillbethe‘‘jobname’’,andisusedin formingoutputfilenames.IfMETAFONTdoesn’tgetafilenameinthefirstline,thejobnameis mfput.Thedefaultextension,.mf,canbeoverriddenbyspecifyinganextensionexplicitly. Alogoferrormessagesgoesintothefilejobname.log.Theoutputfilesarejobname.tfmand jobname.<number>gf,where<number>dependsontheresolutionandmagnificationofthefont. Themodeinthisexampleisshowngenericallyas<printengine>,asymbolictermforwhichthe nameofanactualdeviceor,mostcommonly,thenamelocalfont(seebelow)mustbesubstituted. Ifthemodeisnotspecifiedorisnotvalidforyoursite,METAFONTwilldefaulttoproofmode whichproduceslargecharacterimagesforuseinfontdesignandrefinement.Proofmodecanbe recognizedbythesuffix.2602gfafterthejobname.Examplesofproofmodeoutputcanbefound inComputerModernTypefaces(VolumeEofComputersandTypesetting).ThesystemofmagstepsisidenticaltothesystemusedbyTEX,withvaluesgenerallyintherange0.5,1.0,2.0,3.0, 4.0and5.0.Alistingofgfnumbersfor118-dpi,240-dpiand300-dpifontsisshownbelow. Magnificationcanalsobespecifiednotasamagstepbutasanarbitraryvalue,suchas1.315,to createspecialcharactersizes. Beforefontproductioncanbegin,itisnecessarytosetuptheappropriatebasefiles.Theminimumsetofcomponentsforfontproductionforagivenprint-engineistheplain.mfmacrofileand thelocalmodedeffile.Themacrosinplain.mfcanbestudiedinanappendixtothe METAFONTbook;theyweredevelopedbyDonaldE.Knuth,andthisfileshouldneverbealtered exceptwhenitisofficiallyupgraded.Eachmodedefspecificationhelpsadaptfontstoaparticularprint-engine.ThereisaregulardiscussionofmodedefsinTUGboat,thejournaloftheTEX UsersGroup.Thelocalonesinuseonthiscomputershouldbeinmodes.mf. Web2C7.32x 29March1999 1 MF(1) MF(1) TheeresponsetoMETAFONT’serror-recoverymodeinvokesthesystemdefaulteditorattheerro-neouslineofthesourcefile.Thereisanenvironmentvariable,MFEDIT,thatoverridesthe defaulteditor.Itshouldcontainastringwith"%s"indicatingwherethefilenamegoesand"%d" indicatingwherethedecimallinenumber(ifany)goes.Forexample,anMFEDITstringforthe vieditorcanbesetwiththecshcommand setenvMFEDIT"/usr/ucb/vi+%d%s" Aconvenientfileinthelibraryisnull.mf,containingnothing.Whenmfcan’tfindthefileit thinksyouwanttoinput,itkeepsaskingyouforanotherfilename;responding‘null’getsyouout oftheloopifyoudon’twanttoinputanything. ONLINEGRAPHICSOUTPUT METAFONTcanusemostmoderndisplays,soyoucanseeitsoutputwithoutprinting.Chapter23 ofTheMETAFONTbookdescribeswhatyoucando.ThisimplementationofMETAFONTusesenvironmentvariablestodeterminewhichdisplaydeviceyouwanttouse.Firstitlooksforavariable MFTERM,andthenforTERM.Ifitcan’tfindeither,yougetnoonlineoutput.Otherwise,the valueofthevariabledeterminesthedevicetouse:hp2627,sun(foroldSunView),tek,uniterm (foranAtariSTTek4014emulator),xterm(foreitherX10orX11).Someofthesedevicesmay notbesupportedinallMETAFONTexecutables;thechoiceismadeatcompilationtime. OPTIONS ThisversionofMETAFONTunderstandsthefollowingcommandlineoptions. --basebase Usebaseasthenameofthebasetobeused,insteadofthenamebywhichMETAFONT wascalledora%&line. --helpPrinthelpmessageandexit. --iniBeinimf,fordumpingbases;thisisimplicitlytrueiftheprogramiscalledasinimf. --interactionmode Setstheinteractionmode.Themodecanbeoneofbatchmode,nonstopmode,scrollmode, anderrorstopmode.Themeaningofthesemodesisthesameasthatofthecorresponding commands. --kpathsea-debugbitmask Setspathsearchingdebuggingflagsaccordingtothebitmask.SeetheKpathseamanual fordetails. --maketexfmt Enablemktexfmt,wherefmtmustbemf. --no-maketexfmt Disablemktexfmt,wherefmtmustbemf. --prognamename Pretendtobeprogramname.Thisaffectsboththeformatusedandthesearchpaths. --translate-filetcxname Usethetcxnametranslationtable. --version Printversioninformationandexit. ENVIRONMENT SeetheKpathsearchlibrarydocumentation(the‘Pathspecifications’node)forthedetailsofhow theenvironmentvariablesareusewhensearching.Thekpsewhichutilitycanbeusedtoquery thevaluesofthevariables. IftheenvironmentvariableTEXMFOUTPUTisset,METAFONTattemptstoputitsoutputfiles init,iftheycannotbeputinthecurrentdirectory.Again,seetex(1). Web2C7.32x 29March1999 2 MF(1) MF(1) MFINPUTS Searchpathforinputandopeninfiles. MFEDIT Commandtemplateforswitchingtoeditor. MFTERM Determinestheonlinegraphicsdisplay.IfMFTERMisnotset,andDISPLAYisset,the MetafontwindowsupportforXisused.(DISPLAYmustbesettoavalidXserverspecification,asusual.)IfneitherMFTERMnorDISPLAYisset,TERMisusedtoguessthe windowsupporttouse. FONTUTILITIES Anumberofutilityprogramsareavailable.Thefollowingisapartiallistofavailableutilitiesand theirpurpose.ConsultyourlocalMETAFONTgurufordetails. gftopkTakesagffileandproducesamoretightlypackedpkfontfile. gftodviProducesproofsheetsforfonts. gftypeDisplaysthecontentsofagffileinmnemonicsand/orimages. pktypeMnemonicallydisplaysthecontentsofapkfile. mftFormatsasourcefileasshowninComputerModernTypefaces. FILES mf.pool EncodedtextofMETAFONT’smessages. *.basePredigestedMETAFONTbasefiles. $TEXMFMAIN/metafont/base/plain.mf Thestandardbase. $TEXMFMAIN/metafont/misc/modes.mf Thefileofmodedefsforyoursite’svariousprinters SUGGESTEDREADING DonaldE.Knuth,TheMETAFONTbook(VolumeCofComputersandTypesetting),Addison-Wes-ley,1986,ISBN0-201-13445-4. DonaldE.Knuth,METAFONT:TheProgram(VolumeDofComputersandTypesetting),Addison-Wesley,1986,ISBN0-201-13438-1. DonaldE.Knuth,ComputerModernTypefaces(VolumeEofComputersandTypesetting),Addison-Wesley,1986,ISBN0-201-13446-2. TUGboat(thejournaloftheTEXUsersGroup). COMMENTS Warning:‘‘Typedesigncanbehazardoustoyourotherinterests.Onceyougethooked,youwill developintensefeelingsaboutletterforms;themediumwillintrudeonthemessagesthatyouread. Andyouwillperpetuallybethinkingofimprovementstothefontsthatyouseeeverywhere,especiallythoseofyourowndesign.’’ SEEALSO gftopk(1),gftodvi(1),gftype(1),mft(1),pltotf(1),tftopl(1). BUGS OnJanuary4,1986the‘‘final’’buginMETAFONTwasdiscoveredandremoved.Ifanerrorstill lurksinthecode,DonaldE.Knuthpromisestopayafinder’sfeewhichdoubleseveryyeartothe firstpersonwhofindsit.Happyhunting. AUTHORS METAFONTwasdesignedbyDonaldE.Knuth,whoimplementeditusinghisWEBsystemforPascalprograms.ItwasoriginallyportedtoUnixbyPaulRichardsattheUniversityofIllinoisat Urbana-Champaign.ThispagewasmostlywrittenbyPierreMacKay. Web2C7.32x 29March1999 3