#tex2html_wrap_indisplay519#
cmr10 ;SPMamp; 300 ;SPMamp; 13200 ;SPMamp; 5484 ;SPMamp; 42%#tex2html_wrap_indisplay520#cmr10 ;SPMamp; 360 ;SPMamp; 15342 ;SPMamp; 6496 ;SPMamp; 42%#tex2html_wrap_indisplay521#cmr10 ;SPMamp; 432 ;SPMamp; 18120 ;SPMamp; 7808 ;SPMamp; 43%#tex2html_wrap_indisplay522#cmr10 ;SPMamp; 511 ;SPMamp; 21020 ;SPMamp; 9440 ;SPMamp; 45%#tex2html_wrap_indisplay523#cmr10 ;SPMamp; 622 ;SPMamp; 24880 ;SPMamp; 11492 ;SPMamp; 46%#tex2html_wrap_indisplay524#cmr10 ;SPMamp; 746 ;SPMamp; 29464 ;SPMamp; 13912 ;SPMamp; 47%#tex2html_wrap_indisplay525#cminch ;SPMamp; 300 ;SPMamp; 48764 ;SPMamp; 22076 ;SPMamp; 45%#tex2html_wrap_indisplay526#Itishopedthatthesimplicityandsmallsizeofthe˙PKfileswillmakethemwidelyaccepted.The˙PKformatwasdesignedandimplementedbyTomasRokickiduring@Rokicki, TomasGerhardPaul@ ;SPMgt; thesummerof1985.Thisprogramborrowsafewroutinesfrom˙GFtoPXLbyArthurSamuel.@Samuel, ArthurLee@ ;SPMgt; The| banner| stringdefinedhereshouldbechangedwhenever˙GFtoPKgetsmodified.The| preamblecomment| macro(neartheendoftheprogram)shouldbechangedtoo.@dbanner=='ThisisGFtoPK, Version2.3'printedwhentheprogramstarts@Someofthediagnosticinformationisprintedusing| dprintln|.Whendebugging, itshouldbesetthesameas| println|, definedlater.@debugging@ ;SPMgt; @ddprintln(#)==@ThisprogramiswritteninstandardPascal, exceptwhereitisnecessarytouseextensions;forexample, oneextensionistouseadefault| case| asin˙TANGLE,˙WEAVE, etc.Allplaceswherenonstandardconstructionsareusedshouldbelistedintheindexunder``systemdependencies.''@!@systemdependencies@ ;SPMgt; @dothercases==others:defaultforcasesnotlistedexplicitly@dendcases==@+endfollowsthedefaultcaseinanextended| case| statement@fothercases==else@fendcases==end@Thebinaryinputcomesfrom| gffile|, andtheoutputfontiswrittenon| pkfile|.AlltextoutputiswrittenonPascal'sstandard| output| file.Theterm| print| isusedinsteadof| write| whenthisprogramwriteson| output|, sothatallsuchoutputcouldeasilyberedirectedifdesired.@dprint(#)==write(#)@dprintln(#)==writeln(#)@pprogramGFtoPK(@!gffile,@!pkfile,@!output);label@ ;SPMlt; Labelsintheouterblock@ ;SPMgt; @/const@ ;SPMlt; Constantsintheouterblock@ ;SPMgt; @/type@ ;SPMlt; Typesintheouterblock@ ;SPMgt; @/var@ ;SPMlt; Globalsintheouterblock@ ;SPMgt; @/procedureinitialize;thisproceduregetsthingsstartedproperlyvari:integer;loopindexforinitializationsbeginprintln(banner);@/@ ;SPMlt; Setinitialvalues@ ;SPMgt; @/end;@Iftheprogramhastostopprematurely, itgoestothe`| finalend|'.@dfinalend=9999labelfortheendofitall@ ;SPMlt; Labels...@ ;SPMgt; =finalend;@Thefollowingparameterscanbechangedatcompiletimetoextendorreduce˙GFtoPK′scapacity.Thevaluesgivenhereshouldbequiteadequateformostuses.Assuminganaverageofaboutthreestrokesperrasterline, therearesixrun-countsperline, andtherefore| maxrow| willbesufficientforacharacter2600pixelshigh.@ ;SPMlt; Constants...@ ;SPMgt; =@!linelength=79;bracketedlinesofoutputwillbeatmostthislong@!maxrow=16000;largestindexinthemain| row| array@Herearesomemacrosforcommonprogrammingidioms.@dincr(#)==#:=#+1increaseavariablebyunity@ddecr(#)==#:=#-1decreaseavariablebyunity@Ifthe˙GFfileisbadlymalformed, thewholeprocessmustbeaborted;˙GFtoPKwillgiveup, afterissuinganerrormessageaboutthesymptomsthatwerenoticed.Sucherrorsmightbediscoveredinsideofsubroutinesinsideofsubroutines, soaprocedurecalled| jumpout| hasbeenintroduced.Thisprocedure, whichsimplytransferscontroltothelabel| finalend| attheendoftheprogram, containstheonlynon-local| goto| statementin˙GFtoPK.@systemdependencies@ ;SPMgt; @dabort(#)==beginprint('',#);jumpout;end@dbadgf (#)==abort('BadGFfile:',#,'!')@.BadGFfile@ ;SPMgt; @pprocedurejumpout;begingotofinalend;@*Thecharacterset.Likeallprogramswrittenwiththe˙WEBsystem,˙GFtoPKcanbeusedwithanycharacterset.ButitusesASCIIcodeinternally, becausetheprogrammingforportableinput-outputiseasierwhenafixedinternalcodeisused.Thenextfewsectionsof˙GFtoPKhavethereforebeencopiedfromtheanalogousonesinthe˙WEBsystemroutines.Theyhavebeenconsiderablysimplified, since˙GFtoPKneednotdealwiththecontroversialASCIIcodeslessthan@'40orgreaterthan@'176.Ifsuchcodesappearinthe˙GFfile, theywillbeprintedasquestionmarks.@ ;SPMlt; Types...@ ;SPMgt; =@!ASCIIcode=;SPMquot;;SPMquot;..;SPMquot;~;SPMquot;;asubrangeoftheintegers@TheoriginalPascal compilerwasdesignedinthelate60s, whensix-bitcharactersetswerecommon, soitdidnotmakeprovisionforlowercaseletters.Nowadays, ofcourse, weneedtodealwithbothupperandlowercasealphabetsinaconvenientway, especiallyinaprogramlike˙GFtoPK.SoweshallassumethatthePascal systembeingusedfor˙GFtoPKhasacharactersetcontainingatleastthestandardvisiblecharactersofASCIIcode(|;SPMquot;!;SPMquot;| through|;SPMquot;~;SPMquot;|).SomePascal compilersusetheoriginalname| char| forthedatatypeassociatedwiththecharactersintextfiles, whileotherPascalsconsider| char| tobea64-elementsubrangeofalargerdatatypethathassomeothername.Inordertoaccommodatethisdifference, weshallusethename| textchar| tostandforthedatatypeofthecharactersintheoutputfile.Weshallalsoassumethat| textchar| consistsoftheelements| chr(firsttextchar)| through| chr(lasttextchar)|, inclusive.Thefollowingdefinitionsshouldbeadjustedifnecessary.@systemdependencies@ ;SPMgt; @dtextchar==charthedatatypeofcharactersintextfiles@dfirsttextchar=0ordinalnumberofthesmallestelementof| textchar|@dlasttextchar=127ordinalnumberofthelargestelementof| textchar|@ ;SPMlt; Types...@ ;SPMgt; =@!textfile=packedfileoftextchar;@The˙GFtoPKprocessorconvertsbetweenASCIIcodeandtheuser'sexternalcharactersetbymeansofarrays| xord| and| xchr| thatareanalogoustoPascal's| ord| and| chr| functions.@ ;SPMlt; Globals...@ ;SPMgt; =@!xord:array[textchar]ofASCIIcode;specifiesconversionofinputcharacters@!xchr:array[0..255]oftextchar;specifiesconversionofoutputcharacters@UnderourassumptionthatthevisiblecharactersofstandardASCIIareallpresent, thefollowingassignmentstatementsinitializethe| xchr| arrayproperly, withoutneedinganysystem-dependentchanges.@ ;SPMlt; Setinit...@ ;SPMgt; =fori:=0to@'37doxchr[i]:='?';xchr[@'40]:='';xchr[@'41]:='!';xchr[@'42]:=';SPMquot;';xchr[@'43]:='#';xchr[@'44]:='$';xchr[@'45]:='27xchr[@'46]:=' ;SPMamp; ';xchr[@'47]:='''';@/xchr[@'50]:='(';xchr[@'51]:=')';xchr[@'52]:='*';xchr[@'53]:='+';xchr[@'54]:=',';xchr[@'55]:='-';xchr[@'56]:='.';xchr[@'57]:='/';@/xchr[@'60]:='0';xchr[@'61]:='1';xchr[@'62]:='2';xchr[@'63]:='3';xchr[@'64]:='4';xchr[@'65]:='5';xchr[@'66]:='6';xchr[@'67]:='7';@/xchr[@'70]:='8';xchr[@'71]:='9';xchr[@'72]:=':';xchr[@'73]:=';';xchr[@'74]:=' ;SPMlt; ';xchr[@'75]:='=';xchr[@'76]:=' ;SPMgt; ';xchr[@'77]:='?';@/xchr[@'100]:='@@';xchr[@'101]:='A';xchr[@'102]:='B';xchr[@'103]:='C';xchr[@'104]:='D';xchr[@'105]:='E';xchr[@'106]:='F';xchr[@'107]:='G';@/xchr[@'110]:='H';xchr[@'111]:='I';xchr[@'112]:='J';xchr[@'113]:='K';xchr[@'114]:='L';xchr[@'115]:='M';xchr[@'116]:='N';xchr[@'117]:='O';@/xchr[@'120]:='P';xchr[@'121]:='Q';xchr[@'122]:='R';xchr[@'123]:='S';xchr[@'124]:='T';xchr[@'125]:='U';xchr[@'126]:='V';xchr[@'127]:='W';@/xchr[@'130]:='X';xchr[@'131]:='Y';xchr[@'132]:='Z';xchr[@'133]:='[';xchr[@'134]:=';́xchr[@'135]:=']';xchr[@'136]:='';xchr[@'137]:='';@/xchr[@'140]:='`';xchr[@'141]:='a';xchr[@'142]:='b';xchr[@'143]:='c';xchr[@'144]:='d';xchr[@'145]:='e';xchr[@'146]:='f';xchr[@'147]:='g';@/xchr[@'150]:='h';xchr[@'151]:='i';xchr[@'152]:='j';xchr[@'153]:='k';xchr[@'154]:='l';xchr[@'155]:='m';xchr[@'156]:='n';xchr[@'157]:='o';@/xchr[@'160]:='p';xchr[@'161]:='q';xchr[@'162]:='r';xchr[@'163]:='s';xchr[@'164]:='t';xchr[@'165]:='u';xchr[@'166]:='v';xchr[@'167]:='w';@/xchr[@'170]:='x';xchr[@'171]:='y';xchr[@'172]:='z';xchr[@'173]:='';xchr[@'174]:='|';xchr[@'175]:='′;xchr[@'176]:='~';fori:=@'177to255doxchr[i]:='?';@Thefollowingsystem-independentcodemakesthe| xord| arraycontainasuitableinversetotheinformationin| xchr|.@ ;SPMlt; Setinit...@ ;SPMgt; =fori:=firsttextchartolasttextchardoxord[chr(i)]:=@'40;fori:=;SPMquot;;SPMquot;to;SPMquot;~;SPMquot;doxord[xchr[i]]:=i;@*Genericfontfileformat.Themostimportantoutputproducedbyatypicalrunof#tex2html_wrap_indisplay529#META#tex2html_wrap_indisplay530#FONT isthe``genericfont''(˙GF)filethatspecifiesthebitpatternsofthecharactersthathavebeendrawn.Theterm#tex2html_wrap_indisplay531#indicatesthatthisfileformatdoesn'tmatchtheconventionsofanyname-brandmanufacturer;butitiseasytoconvert˙GFfilestothespecialformatrequiredbyalmostalldigitalphototypesettingequipment.There'sastronganalogybetweenthe˙DVIfileswrittenbyTEX andthe˙GFfileswrittenby#tex2html_wrap_indisplay532#META#tex2html_wrap_indisplay533#FONT;and, infact, thefileformatshavealotincommon.A˙GFfileisastreamof8-bitbytesthatmayberegardedasaseriesofcommandsinamachine-likelanguage.Thefirstbyteofeachcommandistheoperationcode, andthiscodeisfollowedbyzeroormorebytesthatprovideparameterstothecommand.Theparametersthemselvesmayconsistofseveralconsecutivebytes;forexample, the`| boc|'(beginningofcharacter)commandhassixparameters, eachofwhichisfourbyteslong.Parametersareusuallyregardedasnonnegativeintegers;butfour-byte-longparameterscanbeeitherpositiveornegative, hencetheyrangeinvaluefrom$-231$to$231-1$.Asin˙TFMfiles, numbersthatoccupymorethanonebytepositionappearinBigEndianorder, andnegativenumbersappearintwo'scomplementnotation.A˙GFfileconsistsofa``preamble,''followedbyasequenceofoneormore``characters,''followedbya``postamble.''Thepreambleissimplya| pre| command, withitsparametersthatintroducethefile;thismustcomefirst.Each``character''consistsofa| boc| command, followedbyanynumberofothercommandsthatspecify``black''pixels, followedbyan| eoc| command.Thecharactersappearintheorderthat#tex2html_wrap_indisplay534#META#tex2html_wrap_indisplay535#FONTI>generatedthem.Ifweignoreno-opcommands(whichareallowedbetweenanytwocommandsinthefile), each| eoc| commandisimmediatelyfollowedbya| boc| command, orbya| post| command;inthelattercase, therearenomorecharactersinthefile, andtheremainingbytesformthepostamble.Furtherdetailsaboutthepostamblewillbeexplainedlater.Someparametersin˙GFcommandsare``pointers.''Thesearefour-bytequantitiesthatgivethelocationnumberofsomeotherbyteinthefile;thefirstfilebyteisnumber~0, thencomesnumber~1, andsoon.@The˙GFformatisintendedtobebothcompactandeasilyinterpretedbyamachine.Compactnessisachievedbymakingmostoftheinformationrelativeinsteadofabsolute.Whena˙GF-readingprogramreadsthecommandsforacharacter, itkeepstrackoftwoquantities:(a)~thecurrentcolumnnumber,~| m|;and (b)~thecurrentrownumber,~| n|.Theseare32-bitsignedintegers, althoughmostactualfontformatsproducedfrom˙GFfileswillneedtocurtailthisvastrangebecauseofpracticallimitations.(#tex2html_wrap_indisplay536#META#tex2html_wrap_indisplay537#FONT outputwillneverallow$|m|$or$|n|$togetextremelylarge, butthe˙GFformattriestobemoregeneral.)Howdo˙GF′srowandcolumnnumberscorrespondtotheconventionsofTEX and#tex2html_wrap_indisplay539#META#tex2html_wrap_indisplay540#FONT?Well, the``referencepoint''ofacharacter, inTEX'sview, isconsideredtobeatthelowerleftcornerofthepixelinrow~0andcolumn~0.Thispointistheintersectionofthebaselinewiththeleftedgeofthetype;itcorrespondstolocation$(0, 0)$in#tex2html_wrap_indisplay541#META#tex2html_wrap_indisplay542#FONT programs.Thusthepixelin˙GFrow~0andcolumn~0is#tex2html_wrap_indisplay543#META#tex2html_wrap_indisplay545#FONT′sunitsquare, comprisingtheregionoftheplanewhosecoordinatesbothliebetween0and~1.Thepixelin˙GFrow~| n| andcolumn~| m| consistsofthepointswhose#tex2html_wrap_indisplay546#META#tex2html_wrap_indisplay547#FONTI>coordinates|(x, y)| satisfy| m ;SPMlt; =x ;SPMlt; =m+1| and| n ;SPMlt; =y ;SPMlt; =n+1|.Negativevaluesof| m| and~| x| correspondtocolumnsofpixels#tex2html_wrap_indisplay548#ofthereferencepoint;negativevaluesof| n| and~| y| correspondtorowsofpixels#tex2html_wrap_indisplay549#thebaseline.Besides| m| and| n|, there'salsoathirdaspectofthecurrentstate, namelythe@!| paintswitch|, whichisalwayseither
blackor
white.Each
paintcommandadvances| m| byaspecifiedamount~| d|, andblackenstheinterveningpixelsif| paintswitch=black|;thenthe| paintswitch| changestotheoppositestate.˙GF′scommandsaredesignedsothat| m| willneverdecreasewithinarow, and| n| willneverincreasewithinacharacter;hencethereisnowaytowhitenapixelthathasbeenblackened.@Hereisalistofallthecommandsthatmayappearina˙GFfile.Eachcommandisspecifiedbyitssymbolicname(e.g.,| boc|), itsopcodebyte(e.g., 67), anditsparameters(ifany).Theparametersarefollowedbyabracketednumbertellinghowmanybytestheyoccupy;forexample,`| d[2]|'meansthatparameter| d| istwobyteslong.#tex2html_wrap_indisplay551##tex2html_wrap_indisplay552#3em | paint0| 0.Thisisa
paintcommandwith| d=0|;itdoesnothingbutchangethe| paintswitch| from
blackto
whiteorvice~versa.#tex2html_wrap_indisplay553##tex2html_wrap_indisplay554#3em
paint#tex2html_wrap_indisplay555#1through
paint#tex2html_wrap_indisplay556#63(opcodes1to63).Theseare
paintcommandswith| d=1| to~63, definedasfollows:If| paintswitch=black|, blacken| d|~pixelsofthecurrentrow~| n|, incolumns| m| through| m+d-1| inclusive.Then, inanycase, complementthe| paintswitch| andadvance| m| by~| d|.#tex2html_wrap_indisplay557##tex2html_wrap_indisplay558#3em | paint1| 64| d[1]|.Thisisa
paintcommandwithaspecifiedvalueof~| d|;#tex2html_wrap_indisplay559#META#tex2html_wrap_indisplay560#FONT usesittopaintwhen| 64 ;SPMlt; =d ;SPMlt; 256|.#tex2html_wrap_indisplay561##tex2html_wrap_indisplay562#3em |@!paint2| 65| d[2]|.Sameas| paint1|, but| d|~canbeashighas~65535.#tex2html_wrap_indisplay563##tex2html_wrap_indisplay564#3em |@!paint3| 66| d[3]|.Sameas| paint1|, but| d|~canbeashighas$224-1$.#tex2html_wrap_indisplay565#META#tex2html_wrap_indisplay566#FONT neverneedsthiscommand, anditishardtoimagineanybodymakingpracticaluseofit;surelyamorecompactencodingwillbedesirablewhencharacterscanbethislarge.Butthecommandisthere, anyway, justincase.#tex2html_wrap_indisplay567##tex2html_wrap_indisplay568#3em | boc| 67| c[4]|| p[4]|| minm[4]|| maxm[4]|| minn[4]|| maxn[4]|.Beginningofacharacter:Here| c| isthecharactercode, and| p| pointstothepreviouscharacterbeginning(ifany)forcharactershavingthiscodenumbermodulo256.(Thepointer| p| is|-1| iftherewasnopriorcharacterwithanequivalentcode.)Thevaluesofregisters| m| and| n| definedbytheinstructionsthatfollowforthischaractermustsatisfy| minm ;SPMlt; =m ;SPMlt; =maxm| and| minn ;SPMlt; =n ;SPMlt; =maxn|.(Thevaluesof| maxm| and| minn| neednotbethetightestboundspossible.)Whena˙GF-readingprogramseesa| boc|, itcanuse| minm|,| maxm|,| minn|, and| maxn| toinitializetheboundsofanarray.Thenitsets| m:=minm|,| n:=maxn|, and| paintswitch:=white|.#tex2html_wrap_indisplay569##tex2html_wrap_indisplay570#3em | boc1| 68| c[1]||@!delm[1]|| maxm[1]||@!deln[1]|| maxn[1]|.Sameas| boc|, but| p| isassumedtobe~$-1$;also| delm=maxm-minm| and| deln=maxn-minn| aregiveninsteadof| minm| and| minn|.Theone-byteparametersmustbebetween0and255, inclusive. (Thisabbreviated| boc| saves19~bytespercharacter, incommoncases.)#tex2html_wrap_indisplay571##tex2html_wrap_indisplay572#3em | eoc| 69.Endofcharacter:Allpixelsblackenedsofarconstitutethepatternforthischaracter.Inparticular, acompletelyblankcharactermighthave| eoc| immediatelyfollowing| boc|.#tex2html_wrap_indisplay573##tex2html_wrap_indisplay574#3em | skip0| 70.Decrease| n| by1andset| m:=minm|,| paintswitch:=white|. (Thisfinishesonerowandbeginsanother, readytowhitentheleftmostpixelinthenewrow.)#tex2html_wrap_indisplay575##tex2html_wrap_indisplay576#3em | skip1| 71| d[1]|.Decrease| n| by| d+1|, set| m:=minm|, andset| paintswitch:=white|.Thisisawaytoproduce| d| all-whiterows.#tex2html_wrap_indisplay577##tex2html_wrap_indisplay578#3em |@!skip2| 72| d[2]|.Sameas| skip1|, but| d| canbeaslargeas65535.#tex2html_wrap_indisplay579##tex2html_wrap_indisplay580#3em |@!skip3| 73| d[3]|.Sameas| skip1|, but| d| canbeaslargeas$224-1$.#tex2html_wrap_indisplay581#META#tex2html_wrap_indisplay582#FONT obviouslyneverneedsthiscommand.#tex2html_wrap_indisplay583##tex2html_wrap_indisplay584#3em | newrow0| 74.Decrease| n| by1andset| m:=minm|,| paintswitch:=black|. (Thisfinishesonerowandbeginsanother, readyto#tex2html_wrap_indisplay585#theleftmostpixelinthenewrow.)#tex2html_wrap_indisplay586##tex2html_wrap_indisplay587#3em |@!newrow1| through|@!newrow164|(opcodes75to238).Sameas| newrow0|, butwith| m:=minm+1| through| minm+164|, respectively.#tex2html_wrap_indisplay588##tex2html_wrap_indisplay589#3em | xxx1| 239| k[1]|| x[k]|.Thiscommandisundefinedingeneral;itfunctionsasa$(k+2)$-byte| noop| unlessspecial˙GF-readingprogramsarebeingused.#tex2html_wrap_indisplay590#META#tex2html_wrap_indisplay591#FONT generates
xxxcommandswhenencounteringaspecialstring;thisoccursinthe˙GFfileonlybetweencharacters, afterthepreamble, andbeforethepostamble.However,
xxxcommandsmightappearwithincharacters, in˙GFfilesgeneratedbyotherprocessors.Itisrecommendedthat| x| beastringhavingtheformofakeywordfollowedbypossibleparametersrelevanttothatkeyword.#tex2html_wrap_indisplay592##tex2html_wrap_indisplay593#3em |@!xxx2| 240| k[2]|| x[k]|.Like| xxx1|, but| 0 ;SPMlt; =k ;SPMlt; 65536|.#tex2html_wrap_indisplay594##tex2html_wrap_indisplay595#3em | xxx3| 241| k[3]|| x[k]|.Like| xxx1|, but| 0 ;SPMlt; =k ;SPMlt; @t$224$@ ;SPMgt; |.#tex2html_wrap_indisplay596#META#tex2html_wrap_indisplay597#FONT usesthiswhensendingaspecialstringwhoselengthexceeds~255.#tex2html_wrap_indisplay598##tex2html_wrap_indisplay599#3em |@!xxx4| 242| k[4]|| x[k]|.Like| xxx1|, but| k| canberidiculouslylarge;| k| mustn'tbenegative.#tex2html_wrap_indisplay600##tex2html_wrap_indisplay601#3em | yyy| 243| y[4]|.Thiscommandisundefinedingeneral;itfunctionsasa5-byte| noop| unlessspecial˙GF-readingprogramsarebeingused.#tex2html_wrap_indisplay602#META#tex2html_wrap_indisplay603#FONT puts| scaled| numbersinto| yyy|'s, asaresultofnumspecialcommands;theintentistoprovidenumericparametersto
xxxcommandsthatimmediatelyprecede.#tex2html_wrap_indisplay604##tex2html_wrap_indisplay605#3em | noop| 244.Nooperation, donothing.Anynumberof| noop|'smayoccurbetween˙GFcommands, buta| noop| cannotbeinsertedbetweenacommandanditsparametersorbetweentwoparameters.#tex2html_wrap_indisplay606##tex2html_wrap_indisplay607#3em | charloc| 245| c[1]|| dx[4]|| dy[4]|| w[4]|| p[4]|.Thiscommandwillappearonlyinthepostamble, whichwillbeexplainedshortly.#tex2html_wrap_indisplay608##tex2html_wrap_indisplay609#3em |@!charloc0| 246| c[1]||@!dm[1]|| w[4]|| p[4]|.Sameas| charloc|, exceptthat| dy| isassumedtobezero, andthevalueof~| dx| istakentobe| 65536*dm|, where| 0 ;SPMlt; =dm ;SPMlt; 256|.#tex2html_wrap_indisplay610##tex2html_wrap_indisplay611#3em | pre| 247| i[1]|| k[1]|| x[k]|.Beginningofthepreamble;thismustcomeattheverybeginningofthefile.Parameter| i| isanidentifyingnumberfor˙GFformat, currently131.Theotherinformationismerelycommentary;itisnotgivenspecialinterpretationlike
xxxcommandsare.(Notethat
xxxcommandsmayimmediatelyfollowthepreamble, beforethefirst| boc|.)#tex2html_wrap_indisplay612##tex2html_wrap_indisplay613#3em | post| 248.Beginningofthepostamble, seebelow.#tex2html_wrap_indisplay614##tex2html_wrap_indisplay615#3em | postpost| 249.Endingofthepostamble, seebelow.#tex2html_wrap_indisplay616#Commands250--255areundefinedatthepresenttime.@dgfidbyte=131identifiesthekindof˙GFfilesdescribedhere@Herearetheopcodesthat˙GFtoPKactuallyrefersto.@dpaint0=0beginningofthe
paintcommands@dpaint1=64moverightagivennumberofcolumns, thenblack$#tex2html_wrap_indisplay617#$white@dboc=67beginningofacharacter@dboc1=68abbreviated| boc|@deoc=69endofacharacter@dskip0=70skipnoblankrows@dskip1=71skipoverblankrows@dnewrow0=74movedownonerowandthenright@dmaxnewrow=238movedownonerowandthenright@dxxx1=239forspecialstrings@dyyy=243fornumspecialnumbers@dnoop=244nooperation@dcharloc=245characterlocatorsinthepostamble@dcharloc0=246characterlocatorsinthepostamble@dpre=247preamble@dpost=248postamblebeginning@dpostpost=249postambleending@dundefinedcommands==250, 251, 252, 253, 254, 255@Thelastcharacterina˙GFfileisfollowedby`| post|';thiscommandintroducesthepostamble, whichsummarizesimportantfactsthat#tex2html_wrap_indisplay618#META#tex2html_wrap_indisplay619#FONT hasaccumulated.Thepostamblehastheform#tex2html_wrap_indisplay620##tex2html_wrap_indisplay621##;SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp; ;SPMamp; #;SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp; ;SPMamp; ;SPMamp; #;SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp;#tex2html_wrap_indisplay622#Font ;SPMamp; Resolution;SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp; ;SPMamp; ˙GFsize ;SPMamp; ˙PKsize ;SPMamp; Reductionfactor#tex2html_wrap_indisplay623#
cmr10 ;SPMamp; 300 ;SPMamp; 13200 ;SPMamp; 5484 ;SPMamp; 42%#tex2html_wrap_indisplay624#cmr10 ;SPMamp; 360 ;SPMamp; 15342 ;SPMamp; 6496 ;SPMamp; 42%#tex2html_wrap_indisplay625#cmr10 ;SPMamp; 432 ;SPMamp; 18120 ;SPMamp; 7808 ;SPMamp; 43%#tex2html_wrap_indisplay626#cmr10 ;SPMamp; 511 ;SPMamp; 21020 ;SPMamp; 9440 ;SPMamp; 45%#tex2html_wrap_indisplay627#cmr10 ;SPMamp; 622 ;SPMamp; 24880 ;SPMamp; 11492 ;SPMamp; 46%#tex2html_wrap_indisplay628#cmr10 ;SPMamp; 746 ;SPMamp; 29464 ;SPMamp; 13912 ;SPMamp; 47%#tex2html_wrap_indisplay629#cminch ;SPMamp; 300 ;SPMamp; 48764 ;SPMamp; 22076 ;SPMamp; 45%#tex2html_wrap_indisplay630#Itishopedthatthesimplicityandsmallsizeofthe˙PKfileswillmakethemwidelyaccepted.The˙PKformatwasdesignedandimplementedbyTomasRokickiduring@Rokicki, TomasGerhardPaul@ ;SPMgt; thesummerof1985.Thisprogramborrowsafewroutinesfrom˙GFtoPXLbyArthurSamuel.@Samuel, ArthurLee@ ;SPMgt; The| banner| stringdefinedhereshouldbechangedwhenever˙GFtoPKgetsmodified.The| preamblecomment| macro(neartheendoftheprogram)shouldbechangedtoo.@dbanner = = 'ThisisGFtoPK, Version2.3'printedwhentheprogramstarts@Someofthediagnosticinformationisprintedusing| dprintln|.Whendebugging, itshouldbesetthesameas| println|, definedlater.@debugging@ ;SPMgt; @ddprintln(#) = = @ThisprogramiswritteninstandardPascal, exceptwhereitisnecessarytouseextensions;forexample, oneextensionistouseadefault| case| asin˙TANGLE,˙WEAVE, etc.Allplaceswherenonstandardconstructionsareusedshouldbelistedintheindexunder``systemdependencies.''@!@systemdependencies@ ;SPMgt; @dothercases = = others : defaultforcasesnotlistedexplicitly@dendcases = = @ + endfollowsthedefaultcaseinanextended| case| statement@fothercases = = else@fendcases = = end@Thebinaryinputcomesfrom| gffile|, andtheoutputfontiswrittenon| pkfile|.AlltextoutputiswrittenonPascal'sstandard| output| file.Theterm| print| isusedinsteadof| write| whenthisprogramwriteson| output|, sothatallsuchoutputcouldeasilyberedirectedifdesired.@dprint(#) = = write(#)@dprintln(#) = = writeln(#)@pprogramGFtoPK(@!gffile,@!pkfile,@!output);label@ ;SPMlt; Labelsintheouterblock@ ;SPMgt; @/const@ ;SPMlt; Constantsintheouterblock@ ;SPMgt; @/type@ ;SPMlt; Typesintheouterblock@ ;SPMgt; @/var@ ;SPMlt; Globalsintheouterblock@ ;SPMgt; @/procedureinitialize;thisproceduregetsthingsstartedproperlyvari : integer;loopindexforinitializationsbeginprintln(banner);@/@ ;SPMlt; Setinitialvalues@ ;SPMgt; @/end;@Iftheprogramhastostopprematurely, itgoestothe`| finalend|'.@dfinalend = 9999labelfortheendofitall@ ;SPMlt; Labels...@ ;SPMgt; = finalend;@Thefollowingparameterscanbechangedatcompiletimetoextendorreduce˙GFtoPK′scapacity.Thevaluesgivenhereshouldbequiteadequateformostuses.Assuminganaverageofaboutthreestrokesperrasterline, therearesixrun - countsperline, andtherefore| maxrow| willbesufficientforacharacter2600pixelshigh.@ ;SPMlt; Constants...@ ;SPMgt; = @!linelength = 79;bracketedlinesofoutputwillbeatmostthislong@!maxrow = 16000;largestindexinthemain| row| array@Herearesomemacrosforcommonprogrammingidioms.@dincr(#) = = # : = # + 1increaseavariablebyunity@ddecr(#) = = # : = # - 1decreaseavariablebyunity@Ifthe˙GFfileisbadlymalformed, thewholeprocessmustbeaborted;˙GFtoPKwillgiveup, afterissuinganerrormessageaboutthesymptomsthatwerenoticed.Sucherrorsmightbediscoveredinsideofsubroutinesinsideofsubroutines, soaprocedurecalled| jumpout| hasbeenintroduced.Thisprocedure, whichsimplytransferscontroltothelabel| finalend| attheendoftheprogram, containstheonlynon - local| goto| statementin˙GFtoPK.@systemdependencies@ ;SPMgt; @dabort(#) = = beginprint('',#);jumpout;end@dbadgf (#) = = abort('BadGFfile : ',#,'!')@.BadGFfile@ ;SPMgt; @pprocedurejumpout;begingotofinalend;@*Thecharacterset.Likeallprogramswrittenwiththe˙WEBsystem,˙GFtoPKcanbeusedwithanycharacterset.ButitusesASCIIcodeinternally, becausetheprogrammingforportableinput - outputiseasierwhenafixedinternalcodeisused.Thenextfewsectionsof˙GFtoPKhavethereforebeencopiedfromtheanalogousonesinthe˙WEBsystemroutines.Theyhavebeenconsiderablysimplified, since˙GFtoPKneednotdealwiththecontroversialASCIIcodeslessthan@'40orgreaterthan@'176.Ifsuchcodesappearinthe˙GFfile, theywillbeprintedasquestionmarks.@ ;SPMlt; Types...@ ;SPMgt; = @!ASCIIcode = ;SPMquot;;SPMquot;..;SPMquot;~;SPMquot;;asubrangeoftheintegers@TheoriginalPascal compilerwasdesignedinthelate60s, whensix - bitcharactersetswerecommon, soitdidnotmakeprovisionforlowercaseletters.Nowadays, ofcourse, weneedtodealwithbothupperandlowercasealphabetsinaconvenientway, especiallyinaprogramlike˙GFtoPK.SoweshallassumethatthePascal systembeingusedfor˙GFtoPKhasacharactersetcontainingatleastthestandardvisiblecharactersofASCIIcode(|;SPMquot;!;SPMquot;| through|;SPMquot;~;SPMquot;|).SomePascal compilersusetheoriginalname| char| forthedatatypeassociatedwiththecharactersintextfiles, whileotherPascalsconsider| char| tobea64 - elementsubrangeofalargerdatatypethathassomeothername.Inordertoaccommodatethisdifference, weshallusethename| textchar| tostandforthedatatypeofthecharactersintheoutputfile.Weshallalsoassumethat| textchar| consistsoftheelements| chr(firsttextchar)| through| chr(lasttextchar)|, inclusive.Thefollowingdefinitionsshouldbeadjustedifnecessary.@systemdependencies@ ;SPMgt; @dtextchar = = charthedatatypeofcharactersintextfiles@dfirsttextchar = 0ordinalnumberofthesmallestelementof| textchar|@dlasttextchar = 127ordinalnumberofthelargestelementof| textchar|@ ;SPMlt; Types...@ ;SPMgt; = @!textfile = packedfileoftextchar;@The˙GFtoPKprocessorconvertsbetweenASCIIcodeandtheuser'sexternalcharactersetbymeansofarrays| xord| and| xchr| thatareanalogoustoPascal's| ord| and| chr| functions.@ ;SPMlt; Globals...@ ;SPMgt; = @!xord : array[textchar]ofASCIIcode;specifiesconversionofinputcharacters@!xchr : array[0..255]oftextchar;specifiesconversionofoutputcharacters@UnderourassumptionthatthevisiblecharactersofstandardASCIIareallpresent, thefollowingassignmentstatementsinitializethe| xchr| arrayproperly, withoutneedinganysystem - dependentchanges.@ ;SPMlt; Setinit...@ ;SPMgt; = fori : = 0to@'37doxchr[i] : = '?';xchr[@'40] : = '';xchr[@'41] : = '!';xchr[@'42] : = ';SPMquot;';xchr[@'43] : = '#';xchr[@'44] : = '$';xchr[@'45] : = '27xchr[@'46] : = ' ;SPMamp; ';xchr[@'47] : = '''';@/xchr[@'50] : = '(';xchr[@'51] : = ')';xchr[@'52] : = '*';xchr[@'53] : = ' + ';xchr[@'54] : = ',';xchr[@'55] : = ' - ';xchr[@'56] : = '.';xchr[@'57] : = '/';@/xchr[@'60] : = '0';xchr[@'61] : = '1';xchr[@'62] : = '2';xchr[@'63] : = '3';xchr[@'64] : = '4';xchr[@'65] : = '5';xchr[@'66] : = '6';xchr[@'67] : = '7';@/xchr[@'70] : = '8';xchr[@'71] : = '9';xchr[@'72] : = ' : ';xchr[@'73] : = ';';xchr[@'74] : = ' ;SPMlt; ';xchr[@'75] : = ' = ';xchr[@'76] : = ' ;SPMgt; ';xchr[@'77] : = '?';@/xchr[@'100] : = '@@';xchr[@'101] : = 'A';xchr[@'102] : = 'B';xchr[@'103] : = 'C';xchr[@'104] : = 'D';xchr[@'105] : = 'E';xchr[@'106] : = 'F';xchr[@'107] : = 'G';@/xchr[@'110] : = 'H';xchr[@'111] : = 'I';xchr[@'112] : = 'J';xchr[@'113] : = 'K';xchr[@'114] : = 'L';xchr[@'115] : = 'M';xchr[@'116] : = 'N';xchr[@'117] : = 'O';@/xchr[@'120] : = 'P';xchr[@'121] : = 'Q';xchr[@'122] : = 'R';xchr[@'123] : = 'S';xchr[@'124] : = 'T';xchr[@'125] : = 'U';xchr[@'126] : = 'V';xchr[@'127] : = 'W';@/xchr[@'130] : = 'X';xchr[@'131] : = 'Y';xchr[@'132] : = 'Z';xchr[@'133] : = '[';xchr[@'134] : = ';́xchr[@'135] : = ']';xchr[@'136] : = '';xchr[@'137] : = '';@/xchr[@'140] : = '`';xchr[@'141] : = 'a';xchr[@'142] : = 'b';xchr[@'143] : = 'c';xchr[@'144] : = 'd';xchr[@'145] : = 'e';xchr[@'146] : = 'f';xchr[@'147] : = 'g';@/xchr[@'150] : = 'h';xchr[@'151] : = 'i';xchr[@'152] : = 'j';xchr[@'153] : = 'k';xchr[@'154] : = 'l';xchr[@'155] : = 'm';xchr[@'156] : = 'n';xchr[@'157] : = 'o';@/xchr[@'160] : = 'p';xchr[@'161] : = 'q';xchr[@'162] : = 'r';xchr[@'163] : = 's';xchr[@'164] : = 't';xchr[@'165] : = 'u';xchr[@'166] : = 'v';xchr[@'167] : = 'w';@/xchr[@'170] : = 'x';xchr[@'171] : = 'y';xchr[@'172] : = 'z';xchr[@'173] : = '';xchr[@'174]:='|';xchr[@'175]:='′;xchr[@'176] : = '~';fori : = @'177to255doxchr[i] : = '?';@Thefollowingsystem - independentcodemakesthe| xord| arraycontainasuitableinversetotheinformationin| xchr|.@ ;SPMlt; Setinit...@ ;SPMgt; = fori : = firsttextchartolasttextchardoxord[chr(i)] : = @'40;fori : = ;SPMquot;;SPMquot;to;SPMquot;~;SPMquot;doxord[xchr[i]] : = i;@*Genericfontfileformat.Themostimportantoutputproducedbyatypicalrunof#tex2html_wrap_indisplay633#META#tex2html_wrap_indisplay634#FONT isthe``genericfont''(˙GF)filethatspecifiesthebitpatternsofthecharactersthathavebeendrawn.Theterm#tex2html_wrap_indisplay635#indicatesthatthisfileformatdoesn'tmatchtheconventionsofanyname - brandmanufacturer;butitiseasytoconvert˙GFfilestothespecialformatrequiredbyalmostalldigitalphototypesettingequipment.There'sastronganalogybetweenthe˙DVIfileswrittenbyTEX andthe˙GFfileswrittenby#tex2html_wrap_indisplay636#META#tex2html_wrap_indisplay637#FONT;and, infact, thefileformatshavealotincommon.A˙GFfileisastreamof8 - bitbytesthatmayberegardedasaseriesofcommandsinamachine - likelanguage.Thefirstbyteofeachcommandistheoperationcode, andthiscodeisfollowedbyzeroormorebytesthatprovideparameterstothecommand.Theparametersthemselvesmayconsistofseveralconsecutivebytes;forexample, the`| boc|'(beginningofcharacter)commandhassixparameters, eachofwhichisfourbyteslong.Parametersareusuallyregardedasnonnegativeintegers;butfour - byte - longparameterscanbeeitherpositiveornegative, hencetheyrangeinvaluefrom$ - 231$to$231 -1$.Asin˙TFMfiles, numbersthatoccupymorethanonebytepositionappearinBigEndianorder, andnegativenumbersappearintwo'scomplementnotation.A˙GFfileconsistsofa``preamble,''followedbyasequenceofoneormore``characters,''followedbya``postamble.''Thepreambleissimplya| pre| command, withitsparametersthatintroducethefile;thismustcomefirst.Each``character''consistsofa| boc| command, followedbyanynumberofothercommandsthatspecify``black''pixels, followedbyan| eoc| command.Thecharactersappearintheorderthat#tex2html_wrap_indisplay638#META#tex2html_wrap_indisplay639#FONTI>generatedthem.Ifweignoreno - opcommands(whichareallowedbetweenanytwocommandsinthefile), each| eoc| commandisimmediatelyfollowedbya| boc| command, orbya| post| command;inthelattercase, therearenomorecharactersinthefile, andtheremainingbytesformthepostamble.Furtherdetailsaboutthepostamblewillbeexplainedlater.Someparametersin˙GFcommandsare``pointers.''Thesearefour - bytequantitiesthatgivethelocationnumberofsomeotherbyteinthefile;thefirstfilebyteisnumber~0, thencomesnumber~1, andsoon.@The˙GFformatisintendedtobebothcompactandeasilyinterpretedbyamachine.Compactnessisachievedbymakingmostoftheinformationrelativeinsteadofabsolute.Whena˙GF - readingprogramreadsthecommandsforacharacter, itkeepstrackoftwoquantities : (a)~thecurrentcolumnnumber,~| m|;and (b)~thecurrentrownumber,~| n|.Theseare32 - bitsignedintegers, althoughmostactualfontformatsproducedfrom˙GFfileswillneedtocurtailthisvastrangebecauseofpracticallimitations.(#tex2html_wrap_indisplay640#META#tex2html_wrap_indisplay641#FONT outputwillneverallow$|m|$or$|n|$togetextremelylarge, butthe˙GFformattriestobemoregeneral.)Howdo˙GF′srowandcolumnnumberscorrespondtotheconventionsofTEX and#tex2html_wrap_indisplay643#META#tex2html_wrap_indisplay644#FONT?Well, the``referencepoint''ofacharacter, inTEX'sview, isconsideredtobeatthelowerleftcornerofthepixelinrow~0andcolumn~0.Thispointistheintersectionofthebaselinewiththeleftedgeofthetype;itcorrespondstolocation$(0, 0)$in#tex2html_wrap_indisplay645#META#tex2html_wrap_indisplay646#FONT programs.Thusthepixelin˙GFrow~0andcolumn~0is#tex2html_wrap_indisplay647#META#tex2html_wrap_indisplay649#FONT′sunitsquare, comprisingtheregionoftheplanewhosecoordinatesbothliebetween0and~1.Thepixelin˙GFrow~| n| andcolumn~| m| consistsofthepointswhose#tex2html_wrap_indisplay650#META#tex2html_wrap_indisplay651#FONTI>coordinates|(x, y)| satisfy| m ;SPMlt; = x ;SPMlt; = m + 1| and| n ;SPMlt; = y ;SPMlt; = n + 1|.Negativevaluesof| m| and~| x| correspondtocolumnsofpixels#tex2html_wrap_indisplay652#ofthereferencepoint;negativevaluesof| n| and~| y| correspondtorowsofpixels#tex2html_wrap_indisplay653#thebaseline.Besides| m| and| n|, there'salsoathirdaspectofthecurrentstate, namelythe@!| paintswitch|, whichisalwayseither
blackor
white.Each
paintcommandadvances| m| byaspecifiedamount~| d|, andblackenstheinterveningpixelsif| paintswitch = black|;thenthe| paintswitch| changestotheoppositestate.˙GF′scommandsaredesignedsothat| m| willneverdecreasewithinarow, and| n| willneverincreasewithinacharacter;hencethereisnowaytowhitenapixelthathasbeenblackened.@Hereisalistofallthecommandsthatmayappearina˙GFfile.Eachcommandisspecifiedbyitssymbolicname(e.g.,| boc|), itsopcodebyte(e.g., 67), anditsparameters(ifany).Theparametersarefollowedbyabracketednumbertellinghowmanybytestheyoccupy;forexample,`| d[2]|'meansthatparameter| d| istwobyteslong.#tex2html_wrap_indisplay655##tex2html_wrap_indisplay656#3em | paint0| 0.Thisisa
paintcommandwith| d = 0|;itdoesnothingbutchangethe| paintswitch| from
blackto
whiteorvice~versa.#tex2html_wrap_indisplay657##tex2html_wrap_indisplay658#3em
paint#tex2html_wrap_indisplay659#1through
paint#tex2html_wrap_indisplay660#63(opcodes1to63).Theseare
paintcommandswith| d = 1| to~63, definedasfollows : If| paintswitch = black|, blacken| d|~pixelsofthecurrentrow~| n|, incolumns| m| through| m + d - 1| inclusive.Then, inanycase, complementthe| paintswitch| andadvance| m| by~| d|.#tex2html_wrap_indisplay661##tex2html_wrap_indisplay662#3em | paint1| 64| d[1]|.Thisisa
paintcommandwithaspecifiedvalueof~| d|;#tex2html_wrap_indisplay663#META#tex2html_wrap_indisplay664#FONT usesittopaintwhen| 64 ;SPMlt; = d ;SPMlt; 256|.#tex2html_wrap_indisplay665##tex2html_wrap_indisplay666#3em |@!paint2| 65| d[2]|.Sameas| paint1|, but| d|~canbeashighas~65535.#tex2html_wrap_indisplay667##tex2html_wrap_indisplay668#3em |@!paint3| 66| d[3]|.Sameas| paint1|, but| d|~canbeashighas$224 -1$.#tex2html_wrap_indisplay669#META#tex2html_wrap_indisplay670#FONT neverneedsthiscommand, anditishardtoimagineanybodymakingpracticaluseofit;surelyamorecompactencodingwillbedesirablewhencharacterscanbethislarge.Butthecommandisthere, anyway, justincase.#tex2html_wrap_indisplay671##tex2html_wrap_indisplay672#3em | boc| 67| c[4]|| p[4]|| minm[4]|| maxm[4]|| minn[4]|| maxn[4]|.Beginningofacharacter : Here| c| isthecharactercode, and| p| pointstothepreviouscharacterbeginning(ifany)forcharactershavingthiscodenumbermodulo256.(Thepointer| p| is| - 1| iftherewasnopriorcharacterwithanequivalentcode.)Thevaluesofregisters| m| and| n| definedbytheinstructionsthatfollowforthischaractermustsatisfy| minm ;SPMlt; = m ;SPMlt; = maxm| and| minn ;SPMlt; = n ;SPMlt; = maxn|.(Thevaluesof| maxm| and| minn| neednotbethetightestboundspossible.)Whena˙GF - readingprogramseesa| boc|, itcanuse| minm|,| maxm|,| minn|, and| maxn| toinitializetheboundsofanarray.Thenitsets| m : = minm|,| n : = maxn|, and| paintswitch : = white|.#tex2html_wrap_indisplay673##tex2html_wrap_indisplay674#3em | boc1| 68| c[1]||@!delm[1]|| maxm[1]||@!deln[1]|| maxn[1]|.Sameas| boc|, but| p| isassumedtobe~$ - 1$;also| delm = maxm - minm| and| deln = maxn - minn| aregiveninsteadof| minm| and| minn|.Theone - byteparametersmustbebetween0and255, inclusive. (Thisabbreviated| boc| saves19~bytespercharacter, incommoncases.)#tex2html_wrap_indisplay675##tex2html_wrap_indisplay676#3em | eoc| 69.Endofcharacter : Allpixelsblackenedsofarconstitutethepatternforthischaracter.Inparticular, acompletelyblankcharactermighthave| eoc| immediatelyfollowing| boc|.#tex2html_wrap_indisplay677##tex2html_wrap_indisplay678#3em | skip0| 70.Decrease| n| by1andset| m : = minm|,| paintswitch : = white|. (Thisfinishesonerowandbeginsanother, readytowhitentheleftmostpixelinthenewrow.)#tex2html_wrap_indisplay679##tex2html_wrap_indisplay680#3em | skip1| 71| d[1]|.Decrease| n| by| d + 1|, set| m : = minm|, andset| paintswitch : = white|.Thisisawaytoproduce| d| all - whiterows.#tex2html_wrap_indisplay681##tex2html_wrap_indisplay682#3em |@!skip2| 72| d[2]|.Sameas| skip1|, but| d| canbeaslargeas65535.#tex2html_wrap_indisplay683##tex2html_wrap_indisplay684#3em |@!skip3| 73| d[3]|.Sameas| skip1|, but| d| canbeaslargeas$224 -1$.#tex2html_wrap_indisplay685#META#tex2html_wrap_indisplay686#FONT obviouslyneverneedsthiscommand.#tex2html_wrap_indisplay687##tex2html_wrap_indisplay688#3em | newrow0| 74.Decrease| n| by1andset| m : = minm|,| paintswitch : = black|. (Thisfinishesonerowandbeginsanother, readyto#tex2html_wrap_indisplay689#theleftmostpixelinthenewrow.)#tex2html_wrap_indisplay690##tex2html_wrap_indisplay691#3em |@!newrow1| through|@!newrow164|(opcodes75to238).Sameas| newrow0|, butwith| m : = minm +1| through| minm +164|, respectively.#tex2html_wrap_indisplay692##tex2html_wrap_indisplay693#3em | xxx1| 239| k[1]|| x[k]|.Thiscommandisundefinedingeneral;itfunctionsasa$(k + 2)$ - byte| noop| unlessspecial˙GF - readingprogramsarebeingused.#tex2html_wrap_indisplay694#META#tex2html_wrap_indisplay695#FONT generates
xxxcommandswhenencounteringaspecialstring;thisoccursinthe˙GFfileonlybetweencharacters, afterthepreamble, andbeforethepostamble.However,
xxxcommandsmightappearwithincharacters, in˙GFfilesgeneratedbyotherprocessors.Itisrecommendedthat| x| beastringhavingtheformofakeywordfollowedbypossibleparametersrelevanttothatkeyword.#tex2html_wrap_indisplay696##tex2html_wrap_indisplay697#3em |@!xxx2| 240| k[2]|| x[k]|.Like| xxx1|, but| 0 ;SPMlt; = k ;SPMlt; 65536|.#tex2html_wrap_indisplay698##tex2html_wrap_indisplay699#3em | xxx3| 241| k[3]|| x[k]|.Like| xxx1|, but| 0 ;SPMlt; = k ;SPMlt; @t$224$@ ;SPMgt; |.#tex2html_wrap_indisplay700#META#tex2html_wrap_indisplay701#FONT usesthiswhensendingaspecialstringwhoselengthexceeds~255.#tex2html_wrap_indisplay702##tex2html_wrap_indisplay703#3em |@!xxx4| 242| k[4]|| x[k]|.Like| xxx1|, but| k| canberidiculouslylarge;| k| mustn'tbenegative.#tex2html_wrap_indisplay704##tex2html_wrap_indisplay705#3em | yyy| 243| y[4]|.Thiscommandisundefinedingeneral;itfunctionsasa5 - byte| noop| unlessspecial˙GF - readingprogramsarebeingused.#tex2html_wrap_indisplay706#META#tex2html_wrap_indisplay707#FONT puts| scaled| numbersinto| yyy|'s, asaresultofnumspecialcommands;theintentistoprovidenumericparametersto
xxxcommandsthatimmediatelyprecede.#tex2html_wrap_indisplay708##tex2html_wrap_indisplay709#3em | noop| 244.Nooperation, donothing.Anynumberof| noop|'smayoccurbetween˙GFcommands, buta| noop| cannotbeinsertedbetweenacommandanditsparametersorbetweentwoparameters.#tex2html_wrap_indisplay710##tex2html_wrap_indisplay711#3em | charloc| 245| c[1]|| dx[4]|| dy[4]|| w[4]|| p[4]|.Thiscommandwillappearonlyinthepostamble, whichwillbeexplainedshortly.#tex2html_wrap_indisplay712##tex2html_wrap_indisplay713#3em |@!charloc0| 246| c[1]||@!dm[1]|| w[4]|| p[4]|.Sameas| charloc|, exceptthat| dy| isassumedtobezero, andthevalueof~| dx| istakentobe| 65536*dm|, where| 0 ;SPMlt; = dm ;SPMlt; 256|.#tex2html_wrap_indisplay714##tex2html_wrap_indisplay715#3em | pre| 247| i[1]|| k[1]|| x[k]|.Beginningofthepreamble;thismustcomeattheverybeginningofthefile.Parameter| i| isanidentifyingnumberfor˙GFformat, currently131.Theotherinformationismerelycommentary;itisnotgivenspecialinterpretationlike
xxxcommandsare.(Notethat
xxxcommandsmayimmediatelyfollowthepreamble, beforethefirst| boc|.)#tex2html_wrap_indisplay716##tex2html_wrap_indisplay717#3em | post| 248.Beginningofthepostamble, seebelow.#tex2html_wrap_indisplay718##tex2html_wrap_indisplay719#3em | postpost| 249.Endingofthepostamble, seebelow.#tex2html_wrap_indisplay720#Commands250 - -255areundefinedatthepresenttime.@dgfidbyte = 131identifiesthekindof˙GFfilesdescribedhere@Herearetheopcodesthat˙GFtoPKactuallyrefersto.@dpaint0 = 0beginningofthe
paintcommands@dpaint1 = 64moverightagivennumberofcolumns, thenblack$#tex2html_wrap_indisplay721#$white@dboc = 67beginningofacharacter@dboc1 = 68abbreviated| boc|@deoc = 69endofacharacter@dskip0 = 70skipnoblankrows@dskip1 = 71skipoverblankrows@dnewrow0 = 74movedownonerowandthenright@dmaxnewrow = 238movedownonerowandthenright@dxxx1 = 239forspecialstrings@dyyy = 243fornumspecialnumbers@dnoop = 244nooperation@dcharloc = 245characterlocatorsinthepostamble@dcharloc0 = 246characterlocatorsinthepostamble@dpre = 247preamble@dpost = 248postamblebeginning@dpostpost = 249postambleending@dundefinedcommands = = 250, 251, 252, 253, 254, 255@Thelastcharacterina˙GFfileisfollowedby`| post|';thiscommandintroducesthepostamble, whichsummarizesimportantfactsthat#tex2html_wrap_indisplay722#META#tex2html_wrap_indisplay723#FONT hasaccumulated.Thepostamblehastheform$$#tex2html_wrap_indisplay724##tex2html_wrap_indisplay725###tex2html_wrap_indisplay726#| post|| p[4]||@!ds[4]||@!cs[4]||@!hppp[4]||@!vppp[4]||@!minm[4]||@!maxm[4]||@!minn[4]||@!maxn[4]|#tex2html_wrap_indisplay727#$〈 $characterlocators$ 〉$#tex2html_wrap_indisplay728#| postpost|| q[4]|| i[1]| 223's$[#tex2html_wrap_indisplay729#4]$#tex2html_wrap_indisplay730#