From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 2 Sep 2019 13:46:59 +0900 Subject: Initial commit --- graphics/pbmtopk/README | 8 + graphics/pbmtopk/doc/Makefile | 23 + graphics/pbmtopk/doc/beast3_300.pbm.Z.btoa | 198 ++++++ graphics/pbmtopk/doc/examplf.opt | 10 + graphics/pbmtopk/doc/examplf300.opt | 10 + graphics/pbmtopk/doc/name300.pbm.Z.btoa | 18 + graphics/pbmtopk/doc/pbmtopk.ps | 724 +++++++++++++++++++ graphics/pbmtopk/doc/pbmtopk.tex | 179 +++++ graphics/pbmtopk/doc/smiley300.pbm.Z.btoa | 6 + graphics/pbmtopk/pbmtopk/Makefile | 28 + graphics/pbmtopk/pbmtopk/face.pbm | 66 ++ graphics/pbmtopk/pbmtopk/pbmtopk.1 | 73 ++ graphics/pbmtopk/pbmtopk/pbmtopk.c | 1050 ++++++++++++++++++++++++++++ graphics/pbmtopk/pbmtopk/pktopbm.1 | 17 + graphics/pbmtopk/pbmtopk/pktopbm.c | 381 ++++++++++ graphics/pbmtopk/pbmtopk/sign.pbm | 302 ++++++++ graphics/pbmtopk/pbmtopk/test.opt | 8 + graphics/pbmtopk/pbmtopk/test.tex | 11 + 18 files changed, 3112 insertions(+) create mode 100644 graphics/pbmtopk/README create mode 100644 graphics/pbmtopk/doc/Makefile create mode 100644 graphics/pbmtopk/doc/beast3_300.pbm.Z.btoa create mode 100644 graphics/pbmtopk/doc/examplf.opt create mode 100644 graphics/pbmtopk/doc/examplf300.opt create mode 100644 graphics/pbmtopk/doc/name300.pbm.Z.btoa create mode 100644 graphics/pbmtopk/doc/pbmtopk.ps create mode 100644 graphics/pbmtopk/doc/pbmtopk.tex create mode 100644 graphics/pbmtopk/doc/smiley300.pbm.Z.btoa create mode 100644 graphics/pbmtopk/pbmtopk/Makefile create mode 100644 graphics/pbmtopk/pbmtopk/face.pbm create mode 100644 graphics/pbmtopk/pbmtopk/pbmtopk.1 create mode 100644 graphics/pbmtopk/pbmtopk/pbmtopk.c create mode 100644 graphics/pbmtopk/pbmtopk/pktopbm.1 create mode 100644 graphics/pbmtopk/pbmtopk/pktopbm.c create mode 100644 graphics/pbmtopk/pbmtopk/sign.pbm create mode 100644 graphics/pbmtopk/pbmtopk/test.opt create mode 100644 graphics/pbmtopk/pbmtopk/test.tex (limited to 'graphics/pbmtopk') diff --git a/graphics/pbmtopk/README b/graphics/pbmtopk/README new file mode 100644 index 0000000000..b646f98d01 --- /dev/null +++ b/graphics/pbmtopk/README @@ -0,0 +1,8 @@ +This directory contains the PBMtoPK and PKtoPBM programs. The PBM libraries +required to compile these programs are available from expo.lcs.mit.edu in the +directory contrib/. +The PBM library is the work of Jef Poskanzer (jef@well.sf.ca.us), and PBMtoPK +and PKtoPBM are the work of Angus Duggan (ajcd@lfcs.ed.ac.uk), based on +programs by Tom Rokicki. + +AJCD 30/10/91 diff --git a/graphics/pbmtopk/doc/Makefile b/graphics/pbmtopk/doc/Makefile new file mode 100644 index 0000000000..033ef04ca0 --- /dev/null +++ b/graphics/pbmtopk/doc/Makefile @@ -0,0 +1,23 @@ +# noddy Makefile for pbmtopk documentation + +all: pbmtopk.dvi examplf.tfm examplf.300pk + +pbmtopk.dvi: examplf.tfm pbmtopk.aux pbmtopk.tex + latex pbmtopk.tex + +pbmtopk.aux: pbmtopk.tex + latex pbmtopk.tex + +examplf.tfm examplf.300pk: examplf300.opt\ + beast3_300.pbm smiley300.pbm name300.pbm + pbmtopk examplf.300pk examplf.tfm 300 -s 20 -f examplf300.opt + +beast3_300.pbm: beast3_300.pbm.Z.btoa + atob beast3_300.pbm + +name300.pbm: name300.pbm.Z.btoa + atob name300.pbm + +smiley300.pbm: smiley300.pbm.Z.btoa + atob smiley300.pbm + diff --git a/graphics/pbmtopk/doc/beast3_300.pbm.Z.btoa b/graphics/pbmtopk/doc/beast3_300.pbm.Z.btoa new file mode 100644 index 0000000000..3853c3f404 --- /dev/null +++ b/graphics/pbmt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Qj3^hf`V&gIJn/2UDE8`@#-uDqd(\J#D`#4M^Q4ifiEi=/]E.V4GY:p +u7=ga8=^GlC$$Dog])oelBAAp[O5k_hVqLmt+Y>C1Bhu3+k?Jmc\=TOXjd(K5NWJtNCWD=50D2U.6HF>-m:O^;^1*G;ZB/-'pUeMB]3dL.Aj0q%D:\&@ofZ6I+>4P)' +0m'o/\C('D'(>%jr*Qr'$@MbjL%*Q0(tTT_Y1g]ApC[DY)W.c*n-&E'7] +=h3h4gME)o;S;Zs&ipn6`?p&1B6ds-,p_QimVqg-_rWr>IbqU-nrm$;oV;C&6lXeE91%P&IqEGD?S,I&^oVjn)fD(hAjoXN2S9D.e +gh5AS*o#k*_12/_IU]MW4a_]ocenX!ehl#"q`Na@DgbjinJ+4GVu,2=^2I4u:D146dVno%5O%)(/[+ +iB]9kr?j3[%ke.dE*YIqesI>@o5N;*'lict:Z]=]Vu=`pY8_qk*p?iRumM_]1W*rk]D_k6tm?fd(=]mdhi.g"O\C^$KXkPY"%U>PD5XSmY$hmWdLD.1lCn( +70iJ$>OI#a#:?cl[^\pj#IP@.rd`EI`Afk?%@_IiVlc`VR]+&Kh:F!2=>bhZR'\[=HM-`:s2CJ.Q)q +R*[^?!+6=."+GRO*s($o/V'0p",QZIHJP4T#6L?@0&R<)"6tE:(B=F8 +xbtoa End N 12209 2fb1 E f4 S 18d252 R 5e4b7d96 diff --git a/graphics/pbmtopk/doc/examplf.opt b/graphics/pbmtopk/doc/examplf.opt new file mode 100644 index 0000000000..e025fe73f6 --- /dev/null +++ b/graphics/pbmtopk/doc/examplf.opt @@ -0,0 +1,10 @@ +% pbmtopk option file for the examplf font. +% invoke with: pbmtopk examplf.300pk examplf.tfm 300 -s 20 -f examplf.opt += 65 +% character 'A': "angus" signature +name300.pbm * 46 +% character 'B': beasty from Irish fiver +beast3_300.pbm += 83 +% character 'S': big smiley face +smiley300.pbm diff --git a/graphics/pbmtopk/doc/examplf300.opt b/graphics/pbmtopk/doc/examplf300.opt new file mode 100644 index 0000000000..fba9d66148 --- /dev/null +++ b/graphics/pbmtopk/doc/examplf300.opt @@ -0,0 +1,10 @@ +% pbmtopk option file for the examplf font. +% invoke with: pbmtopk examplf.300pk examplf.tfm 300 -s 20 -f examplf300.opt += 65 +% character 'A': "angus" signature +name300.pbm * 46 +% character 'B': beasty from Irish fiver +beast3_300.pbm += 83 +% character 'S': big smiley face +smiley300.pbm diff --git a/graphics/pbmtopk/doc/name300.pbm.Z.btoa b/graphics/pbmtopk/doc/name300.pbm.Z.btoa new file mode 100644 index 0000000000..34e09da979 --- /dev/null +++ b/graphics/pbmtopk/doc/name300.pbm.Z.btoa @@ -0,0 +1,18 @@ +xbtoa Begin ++.\Ki@OR$uUBZMo!b!K^aKV@*KeXc8S4Kno70OG_C>?n8+\%2.4$nlsP,-0_%RZsqamu,t(b[b4S2m +oea-\c+ML:8E,0c`+F_9thZm\A7)hCU\C31ZIVGJ!Oc1ob#c);#B@Pp3S@TA=fZ"i)E[-PW514tH1b +8-sFX'q3\>haG&=b^Zg`oUCUmb>'h=6=?\[dVAN,:0eR>Lmam`%V6GQ<^f$j.1\i;AQoJVrc)Amgcc +dg,!EV+>nB*X;LVEe#=.LT%ppJlc-1SY@]fLk3(J81\^%FS)nSH:B(eO?5khDj3!;G?%2Qo9;IM<;b +),gH>]^nS**3*gcOZJgI79\D>nq6n1gB7ce5upG3LC;qegnHBDRWR&]UGi;Z4X5J?B?[d=($%QJHZj +LA$paE]j\6?1@sJi-0'9R$NHk`E1rJ*n$igB&Ir*Q$sWD<#CE#RFi^/;lSsqM^5k>(K390k`A[u%A_ +WH2XZBnC`15p;G9?m-tA'-$CN'"70;U]@^XUZ;NpWRLa-#!"r1%$b=2pLQRhIO=Vh68:l'@uU1,gVWM?0QOFGaC-iKAc#3N8RAVTIqrPHMC +YFGH<<':E3JBk`d*meJ3"EH]L&JR%'sC9"o:(i,q:I\l1i7eYF!Z,/DV/:t+/pnaQX/M!U'VFEu=ZG +2ug-&g4!MX@k%7]L:7biVNq[NG_kXLXpsKd`LPDHj!MjF0.+UO%W\URNC_$Z(l^epCo9mJ/a$]9FA; +X1s]b37OREedL]'%PJ*-W9]2+jG;[CLTkrsU<0Z_h>&NB;ik"<,,j`%`M(F'c'Y3%#rW3u9/E1:03] +m_Cbr2bK%BPfJh4FZe]VnfpCG.pI$1])ZfB2i-"nPQJiE"IWhH=5Kn9+O?['^j[bI1go?4SbHp% +nQUtlRgjsp^Q%(E(qV.sDME-*c#;5l:I9/B'hQoRPHg/"pY&!<50s720^q78OfZ0?GqWGPahE(&J-] +^CI]?;4Bm"Y\EHh:,Zhu12J?f+!3g'>eafouT`[eS:3NO=t4#<0B`AoH=Bk2*RsH*;>s5N$GelQ>g= +kIOgH9QS8mfi"gT4-0FB +xbtoa End N 951 3b7 E 5a S 1fe12 R f16c2fe9 diff --git a/graphics/pbmtopk/doc/pbmtopk.ps b/graphics/pbmtopk/doc/pbmtopk.ps new file mode 100644 index 0000000000..532f0a4038 --- /dev/null +++ b/graphics/pbmtopk/doc/pbmtopk.ps @@ -0,0 +1,724 @@ +%!PS-Adobe-2.0 +%%Creator: This is dvips, version 5.33 (C) 1986-90 Radical Eye Software +%%Title: pbmtopk.dvi +%%Pages: 3 1 +%%BoundingBox: 0 0 595 842 +%%EndComments +/SafetyEnclosure save def +%%BeginDocument: texc.pro +/TeXDict 200 dict def TeXDict begin /bdf{bind def}def /islandscape false def +/vsize 10 def /hsize 8.5 def /@rigin{islandscape{[0 1 -1 0 0 0]concat}if 72 +Resolution div 72 VResolution div neg scale Resolution VResolution islandscape +{1}{1 vsize sub}ifelse mul translate}bdf /@paper{/islandscape exch def /vsize +exch def /hsize exch def}bdf /@manualfeed{statusdict /manualfeed true put}bdf +/@copies{/#copies exch def}bdf /@FontMatrix[1 0 0 -1 0 0]def /@FontBBox[0 0 0 +0]def /dmystr(ZZf@@@)def /newname{dmystr cvn}bdf /df{/scalefactor 1 def /fntrx +@FontMatrix def df-tail}bdf /dfs{div /scalefactor exch def /fntrx[scalefactor +0 0 scalefactor neg 0 0]def df-tail}bdf /df-tail{/maxcc exch def /numcc exch +def /fontname exch def dmystr 2 fontname cvx(@@@@)cvs putinterval newname 8 +dict def newname load begin /FontType 3 def /FontMatrix fntrx def /FontBBox +@FontBBox def /BitMaps numcc array def /base maxcc string def /BuildChar{ +CharBuilder}def /Encoding IdentityEncoding def end fontname{/foo setfont}2 +array copy cvx def fontname load 0 dmystr 6 string copy cvn cvx put /ctr 0 def +}bdf /dfe{newname dup load definefont setfont}bdf /ch-image{ch-data 0 get dup +type /stringtype ne{ctr get /ctr ctr 1 add def}if}bdf /ch-width{ch-data 1 get} +bdf /ch-height{ch-data 2 get}bdf /ch-xoff{ch-data 3 get}bdf /ch-yoff{ch-data 4 +get}bdf /ch-dx{ch-data 5 get}bdf /ctr 0 def /CharBuilder{save 3 1 roll exch +dup /base get 2 index get exch /BitMaps get exch get /ch-data exch def pop +/ctr 0 def ch-data null ne{ch-dx 0 ch-xoff ch-yoff neg ch-xoff ch-width add +ch-height ch-yoff sub setcachedevice ch-width ch-height true[1 0 0 -1 -.1 +ch-xoff sub ch-height ch-yoff sub .1 add]/id ch-image def /rw ch-width 7 add 8 +idiv string def /rc 0 def /gp 0 def /cp 0 def{rc 0 ne{rc 1 sub /rc exch def rw +}{G}ifelse}imagemask}if restore}bdf /G{{id gp get /gp gp 1 add def dup 18 mod +exch 18 idiv pl exch get exec}loop}bdf /adv{cp add /cp exch def}bdf /chg{rw cp +id gp 4 index getinterval putinterval dup gp add /gp exch def adv}bdf /nd{/cp +0 def rw exit}bdf /lsh{rw cp 2 copy get dup 0 eq{pop 1}{dup 255 eq{pop 254}{ +dup dup add 255 and exch 1 and or}ifelse}ifelse put 1 adv}bdf /rsh{rw cp 2 +copy get dup 0 eq{pop 128}{dup 255 eq{pop 127}{dup 2 idiv exch 128 and or} +ifelse}ifelse put 1 adv}bdf /clr{rw cp 2 index string putinterval adv}bdf /set +{rw cp fillstr 0 4 index getinterval putinterval adv}bdf /fillstr 18 string 0 +1 17{2 copy 255 put pop}for def /pl[{adv 1 chg}bind{adv 1 chg nd}bind{1 add +chg}bind{1 add chg nd}bind{adv lsh}bind{adv lsh nd}bind{adv rsh}bind{adv rsh +nd}bind{1 add adv}bind{/rc exch def nd}bind{1 add set}bind{1 add clr}bind{adv +2 chg}bind{adv 2 chg nd}bind{pop nd}bind]def /dc{newname load dup /base get 3 +2 roll ctr put /BitMaps get exch ctr exch dup dup 5 get scalefactor div 5 exch +put put /ctr ctr 1 add def}bdf /bop{userdict /bop-hook known{bop-hook}if +/SaveImage save def @rigin 0 0 moveto}bdf /eop{clear SaveImage restore +userdict /eop-hook known{eop-hook}if showpage}bdf /@start{userdict /start-hook +known{start-hook}if /VResolution exch def /Resolution exch def 1000 div +/DVImag exch def clear /IdentityEncoding 256 array def 0 1 255{ +IdentityEncoding exch 1 string dup 0 3 index put cvn put}for}bdf /p{show}bdf +/RuleMatrix[1 0 0 -1 -.1 -.1]def /BlackDots 8 string def /v{gsave currentpoint +translate false RuleMatrix{BlackDots}imagemask grestore}bdf /a{moveto}bdf +/delta 0 def /tail{dup /delta exch def 0 rmoveto}bdf /b{exch show tail}bdf /c{ +show delta 4 sub tail}bdf /d{show delta 3 sub tail}bdf /e{show delta 2 sub +tail}bdf /f{show delta 1 sub tail}bdf /g{show delta 0 rmoveto}bdf /h{show +delta 1 add tail}bdf /i{show delta 2 add tail}bdf /j{show delta 3 add tail} +bdf /k{show delta 4 add tail}bdf /l{show -4 0 rmoveto}bdf /m{show -3 0 rmoveto +}bdf /n{show -2 0 rmoveto}bdf /o{show -1 0 rmoveto}bdf /q{show 1 0 rmoveto} +bdf /r{show 2 0 rmoveto}bdf /s{show 3 0 rmoveto}bdf /t{show 4 0 rmoveto}bdf /w +{0 rmoveto}bdf /x{0 exch rmoveto}bdf /y{3 2 roll show moveto}bdf /bos{ +/section save def}bdf /eos{clear section restore}bdf end +%%EndDocument +TeXDict begin 3 1 1000 300 300 @start /fa 6 117 df[24 37 -1 8 23]12 dc[13 18 5 0 19]101 dc[9 29 4 0 11]108 dc[16 18 4 0 18]114 dc[14 18 3 0 17]115 dc[<13C01201A3EA0380A4EAFFE0EA0700A3120EA45AA4EA3840A31380EA +1900120E>11 26 3 0 14]116 dc dfe /fb 26 121 df[17 3 2 -11 22]45 dc[< +127012F8A31270>5 5 8 0 22]46 dc[17 25 2 0 22]48 dc[< +EA01801203A21207120F127F12FF12731203AEEA7FF813FC13F8>14 25 4 0 22]49 dc[17 25 2 0 22]51 dc[18 25 1 0 22] +80 dc[12 32 8 3 22]91 dc[12 32 1 3 22]93 dc[19 18 2 0 22]97 dc[16 18 3 0 22]99 dc[16 18 3 0 22]101 dc[<131FEB7F8013FFEA01E7EBC30013C0A2EA7FFFB5FCA2EA01C0AC +EA3FFE487E6C5A>17 25 1 0 22]102 dc[<127E12FE127E120EA4133C13FEEA0FFFEB87801303 +120EAA387FC7F038FFE7F8387FC7F0>21 25 0 0 22]104 dc[16 26 3 0 22]105 dc[<127E12FE127E120EA4EB7FE0A3EB0F +00131E5B5B5B120F7F13BC131EEA0E0E7F1480387F87F0EAFFCFEA7F87>20 25 0 0 22]107 dc +[17 25 2 0 22]108 dc[<38F9C38038FFEFC0EBFFE0EA3C78A2EA +3870AA38FE7CF8A2EB3C78>21 18 0 0 22]109 dc[17 18 2 0 22]111 dc[20 27 0 9 22]112 dc[<38FF0FC0EB3FE0137F3807F040EBC0005BA290C7 +FCA8EAFFFCA3>19 18 1 0 22]114 dc[15 18 3 0 22]115 dc[<1203 +5AA4EA7FFFB5FCA20007C7FCA75BEB0380A3EB8700EA03FE6C5A6C5A>17 23 1 0 22]116 dc[< +387E1F80EAFE3FEA7E1FEA0E03AB130F380FFFF03807FBF83803E3F0>21 18 0 0 22]117 dc[< +387F1FC000FF13E0007F13C0381C0700EA1E0FEA0E0EA36C5AA4EA03B8A3EA01F0A26C5A>19 18 +1 0 22]118 dc[<38FF1FE013BF131F38380380A413E33819F300A213B3EA1DB7A4EA0F1EA3> +19 18 1 0 22]119 dc[<387F1FC0133F131F380F1C00EA073CEA03B813F012016C5A12017FEA +03B8EA073C131CEA0E0E387F1FC038FF3FE0387F1FC0>19 18 1 0 22]120 dc dfe /fc 3 69 +df[145 +91 0 44 145]65 dc[712 355 0 0 712]66 dc[32 32 0 0 32]68 dc dfe /fd 40 126 df[< +EAFFFEA3>15 3 2 -10 20]45 dc[<127012F8A31270>5 5 7 0 20]46 dc[15 23 2 0 +20]48 dc[<1203A25A5A123F12F712471207AEEA7FF0A2>12 23 4 0 20]49 dc[15 23 2 0 20]51 dc[15 23 2 0 20]53 dc[15 23 2 0 20]54 dc[ +17 9 1 -7 20]61 dc[17 23 1 0 20]65 dc[16 23 1 0 20]66 dc[16 +23 1 0 20]75 dc[<38FE0FE0A2003E1380EA3B1BA413BBA2EA39B3A313F3EA38E3A21303A638 +FE0FE0A2>19 23 0 0 20]77 dc[16 23 1 0 20]80 dc[11 29 7 3 20]91 dc[< +12C07EA21270A27EA27EA27EA27EA2EA0380A3EA01C0A2EA00E0A21370A21338A2131CA2130EA2 +1306>15 29 2 3 20]92 dc[11 29 1 3 20]93 dc[17 16 2 0 +20]97 dc[<12FCA2121CA513F8EA1DFEEA1F07EA1E03001C1380EB01C0A6EB0380001E1300EA1F +0EEA1DFCEA0CF8>18 23 0 0 20]98 dc[15 16 2 0 20]99 dc[<137EA2130EA5EA07CEEA0FFEEA +1C3EEA301EEA700E12E0A61270EA301EEA383E381FEFC0EA07CF>18 23 1 0 20]100 dc[15 16 2 0 20]101 dc[<137C13FEEA01CEEA03841380A3EA7FFE12FFEA0380ACEA7FFCA2> +15 23 1 0 20]102 dc[17 25 1 +9 20]103 dc[<12FCA2121CA51378EA1DFEEA1F86EA1E07121CAA38FF8FE0A2>19 23 0 0 20] +104 dc[<1203EA0780A2EA0300C7FCA4EA7F80A21203ACEAFFFCA2>14 24 3 0 20]105 dc[<12 +FCA2121CA5381DFF80A2381C3C005B5BEA1DE0EA1FC0A27FEA1EF0EA1C707FA27F38FE3F80A2> +17 23 1 0 20]107 dc[15 23 2 0 20]108 dc[19 16 0 0 20]109 dc[19 16 0 0 20]110 dc[15 16 2 0 20]111 dc[18 24 0 8 20]112 dc[17 16 1 0 20]114 dc[15 +16 2 0 20]115 dc[<12035AA4EA7FFC12FFEA0700A8130EA3130CEA03FCEA00F0>15 21 1 0 +20]116 dc[19 16 0 0 20]117 dc[<38FE3F80A2 +381C1C00A46C5AA3EA0630EA0770A36C5AA3>17 16 1 0 20]118 dc[17 16 1 0 20]120 dc[<38FE +3F80A2381C1C00A3120E5BA212071330A2EA0370A26C5AA35BA3485A12730077C7FC127E123C> +17 24 1 8 20]121 dc[<133E13FEEA01E0EA0380AAEA7F0012FE127FEA0380AAEA01E0EA00FE +133E>15 29 2 3 20]123 dc[<127812FE120FEA0380AAEA01FCEA00FEEA01FCEA0380AAEA0F00 +12FE1278>15 29 2 3 20]125 dc dfe /fe 68 125 df[26 29 0 0 24]11 dc[<137E38 +01C180EA0301380703C0120EEB018090C7FCA5B512C0EA0E01B0387F87F8>21 29 0 0 23]12 +dc[21 29 0 0 23]13 dc[13 12 1 -17 21]34 dc[ +<126012F012F812681208A31210A2122012401280>5 12 4 -17 12]39 dc[<13401380EA0100 +120212065AA25AA25AA212701260A312E0AC1260A312701230A27EA27EA27E12027EEA00801340 +>10 42 3 11 16]40 dc[<7E12407E7E12187EA27EA27EA213801201A313C0AC1380A312031300 +A21206A25AA25A12105A5A5A>10 42 2 11 16]41 dc[<126012F0A212701210A41220A2124012 +80>4 12 4 8 12]44 dc[11 2 0 -8 14]45 dc[<126012F0A21260>4 4 4 0 12] +46 dc[16 29 2 1 21]48 dc[<12035A123F12C71207B3A4EA0F80EAFFF8>13 +28 4 0 21]49 dc[16 28 2 0 +21]50 dc[16 29 2 1 21]51 dc[< +130CA2131C133CA2135C13DC139CEA011C120312021204120C1208121012301220124012C0B512 +C038001C00A73801FFC0>18 28 1 0 21]52 dc[ +16 29 2 1 21]53 dc[<13F0EA030CEA0604EA0C0EEA181E1230130CEA7000A21260EAE3E0EAE4 +30EAE818EAF00C130EEAE0061307A51260A2EA7006EA300E130CEA1818EA0C30EA03E0>16 29 2 +1 21]54 dc[<126012F0A212601200AA126012F0A21260>4 18 4 0 12]58 dc[<126012F0A212 +601200AA126012F0A212701210A41220A212401280>4 26 4 8 12]59 dc[<1306A3130FA3EB17 +80A3EB23C0A3EB41E0A3EB80F0A200017FEB0078EBFFF83803007C0002133CA20006133E000413 +1EA2000C131F121E39FF80FFF0>28 29 1 0 31]65 dc[24 28 2 +0 29]66 dc[<90381F8080EBE0613801801938070007000E13035A14015A00781300A2127000F0 +1400A8007014801278A212386CEB0100A26C13026C5B380180083800E030EB1FC0>25 30 2 1 +30]67 dc[27 28 2 0 32]68 dc[24 28 2 0 28]69 dc[ +22 28 2 0 27]70 dc[<90381F8080EBE0613801801938070007000E13035A14015A007813 +00A2127000F01400A6ECFFF0EC0F80007013071278A212387EA27E6C130B380180113800E06090 +381F8000>28 30 2 1 33]71 dc[12 28 1 0 15]73 dc[16 29 1 1 21]74 dc[<39FFF03FE0 +390F000F00140C14085C5C5C5C49C7FC13025B130E131F132FEB27801347EB83C0EB01E0A26D7E +80147880A280141F158039FFF07FF0>28 28 2 0 32]75 dc[21 28 2 0 26]76 dc[33 28 2 0 38]77 dc[27 30 2 1 32]79 dc[23 28 2 0 28]80 dc[28 29 2 1 31]82 dc[<3807E080EA1C19EA3005EA7003EA600112E01300A36C +13007E127CEA7FC0EA3FF8EA1FFEEA07FFC61380130FEB07C0130313011280A300C01380A238E0 +0300EAD002EACC0CEA83F8>18 30 2 1 23]83 dc[<007FB512C038700F010060130000401440 +A200C014201280A300001400B1497E3803FFFC>27 28 1 0 30]84 dc[<39FFF07FC0390F000E +001404B3A26C5B138000035B12016C6C5AEB70C0011FC7FC>26 29 2 1 31]85 dc[<39FFE00F +F0391F0003C06CEB018015006D5A00071302A26C6C5AA36C6C5AA213F000005BA2EBF830EB7820 +A26D5AA36D5AA2131F6DC7FCA21306A3>28 29 1 1 31]86 dc[<3AFFE0FFE0FF3A1F001F003C +001E011E13186C011F1310A3D807801420EC2780A2D803C01440EC43C0A213E00001903881E080 +A33A00F100F100A3017913FA017A137AA2013E137C013C133CA301181318A3>40 29 1 1 43] +87 dc[<397FF0FFC0390FC03E0038078018EA03C0EBE01000015BEBF06000001340EB7880137D +013DC7FC7F131F7F80A2EB13C0EB23E01321EB41F0EBC0F8EB80783801007C48133C00027F0006 +131F001FEB3F8039FFC0FFF0>28 28 1 0 31]88 dc[13 12 6 -17 21]92 dc[18 18 2 0 21]97 dc[ +<12FC121CAA137CEA1D86EA1E03381C018014C0130014E0A614C013011480381E0300EA1906EA +10F8>19 29 1 0 23]98 dc[14 18 2 0 18]99 dc[<133F1307AAEA03E7EA0C17EA180F487E1270 +126012E0A61260127012306C5AEA0C373807C7E0>19 29 2 0 23]100 dc[15 18 1 +0 18]101 dc[<13F8EA018CEA071E1206EA0E0C1300A6EAFFE0EA0E00B0EA7FE0>15 29 0 0 13 +]102 dc[18 28 1 9 21]103 dc[<12FC121CAA137C1387EA1D03001E1380121CAD38FF9FF0>20 29 1 0 +23]104 dc[<1218123CA21218C7FCA712FC121CB0EAFF80>9 29 1 0 12]105 dc[<13C0EA01E0 +A2EA00C01300A7EA0FE01200B3A21260EAF0C012F1EA6180EA3E00>11 37 -3 8 13]106 dc[< +12FC121CAAEB3FC0EB0F00130C13085B5B5B13E0121DEA1E70EA1C781338133C131C7F130F1480 +38FF9FE0>19 29 1 0 22]107 dc[<12FC121CB3A9EAFF80>9 29 1 0 12]108 dc[<39FC7E07 +E0391C838838391D019018001EEBE01C001C13C0AD3AFF8FF8FF80>33 18 1 0 36]109 dc[20 18 1 0 23]110 dc[18 18 1 0 +21]111 dc[19 26 1 8 23]112 dc[19 26 2 8 22]113 dc[13 18 1 0 16]114 dc[13 18 1 0 16] +115 dc[<1204A4120CA2121C123CEAFFE0EA1C00A91310A5120CEA0E20EA03C0>12 26 1 0 16] +116 dc[<38FC1F80EA1C03AD1307120CEA0E1B3803E3F0>20 18 1 0 23]117 dc[<38FF07E038 +3C0380381C0100A2EA0E02A26C5AA3EA0388A213D8EA01D0A2EA00E0A31340>19 18 1 0 22] +118 dc[<39FF3FCFE0393C0F0380381C07011500130B000E1382A21311000713C4A213203803A0 +E8A2EBC06800011370A2EB803000001320>27 18 1 0 30]119 dc[<387F8FF0380F03801400EA +0702EA0384EA01C813D8EA00F01370137813F8139CEA010E1202EA060738040380381E07C038FF +0FF8>21 18 0 0 22]120 dc[<38FF07E0383C0380381C0100A2EA0E02A26C5AA3EA0388A213D8 +EA01D0A2EA00E0A31340A25BA212F000F1C7FC12F31266123C>19 26 1 8 22]121 dc[14 18 1 0 18]122 dc[41 1 0 -11 42]124 dc dfe /ff 16 117 df[<12 +3C127E12FFA4127E123C>8 8 5 0 18]46 dc[39 40 2 0 46]66 dc[<91387F +C004903907FFF80C90391FE01E1C90397F00073CD801FCEB01FC484813004848147C485A49143C +001F151C485AA2007F150C90C8FCA24892C7FCA94AB512C07E903A800001FC00A2123FA26C7E12 +0F7F6C7E6C7E6C6C1303D8007F130790391FE01E3C903907FFF81C9039007FE004>42 40 4 0 +51]71 dc[45 40 2 0 50]75 dc[33 40 2 0 39]76 dc[54 40 3 0 61]77 dc[37 +40 2 0 44]80 dc[<01FF13400007EBE0C0380F80F9381E001F48130F007C13031278140112F8 +1400A27E15007EEA7F8013F8383FFFC014F86C7F6C7F00037FC61480010F13C01300141FEC0FE0 +1407A200C01303A46C14C0A26CEB07807E00FEEB0F0038E7C03E38C1FFF838803FE0>27 40 4 0 +36]83 dc[44 40 2 0 49]85 dc[24 26 2 0 29]101 dc[<9038FE03E03907FFCFF0380F83F838 +1F01F0393E00F8E01500007E7FA5003E5BA26C485A380F83E0EBFFC0D810FEC7FC90C8FC1238A2 +123C383FFFF06C13FE806C14804814C0383C001F007CEB07E0481303A4007CEB07C0A26CEB0F80 +391FC07F003807FFFCC613E0>28 38 2 12 32]103 dc[<120FEA1F8013C0123FA2121F1380EA +0F00C7FCA7EAFFC0A2120FB3A4EAFFFCA2>14 41 1 0 17]105 dc[<38FFC0FCEBC3FF390FC60F +8001C813C09038D007E013E0A313C0B039FFFC7FFEA2>31 26 2 0 36]110 dc[27 26 2 0 32]111 dc[<3803F8C0EA1FFF +EA3C07EA78011270EAF000A27E6C1300EAFFC0EA7FFC6CB4FC6C13806C13C0000113E038000FF0 +1303EAC00113007EA26C13E0EAF80138FE03C038E7FF8038C1FC00>20 26 2 0 25]115 dc[<13 +60A413E0A21201A212031207121FB512C0A23807E000AE1460A63803F0C012013800FF80EB3E00 +>19 37 1 0 25]116 dc dfe /fg 12 118 df[<1230127812FCA212781230>6 6 10 0 26]46 +dc[<133E3801FF804813C03807C1E0EA0F00381E0F70383C3FF0EA387F387070F8EBE078A238E1 +C038A83870E070A2EB70E0EA387F383C3FC0381E0F00380F00383807C0F83803FFF06C13E03800 +3F00>21 30 2 0 26]64 dc[22 21 3 0 26]97 dc[20 21 3 0 26]99 dc[22 30 2 0 +26]100 dc[20 21 3 0 26]101 dc[ +21 30 1 0 26]102 dc[<130C131EA2130C1300A6EA0FFEA3EA000EB3A5131C1260EAF038EAFF +F8EA7FF0EA1FC0>15 42 2 11 26]106 dc[<12FEA3120EA6EB0FFCEB1FFEEB0FFCEB03C0EB07 +80EB0F00131E5B5B13FC120F13DE138F380E07801303EB01C014E0EB00F038FFE3FE14FF14FE> +24 30 1 0 26]107 dc[19 30 3 0 26]108 dc[<3807FB80EA +1FFF127FEA7807EAE003A30078C7FCEA7FC0EA3FFCEA07FE38003F801307386001C012E0A2EAF0 +0338FC0780B51200EAEFFEEAE3F8>18 21 4 0 26]115 dc[<38FE0FE0A3EA0E00AD1301EA0F03 +3807FFFE7EEA00FC>23 21 1 0 26]117 dc dfe /fh 20 118 df[<132013401380EA01005A12 +061204120CA25AA25AA312701260A312E0AE1260A312701230A37EA27EA2120412067E7EEA0080 +13401320>11 50 4 13 19]40 dc[<7E12407E7E12187E12041206A27EA2EA0180A313C01200A3 +13E0AE13C0A312011380A3EA0300A21206A21204120C5A12105A5A5A>11 50 3 13 19]41 dc[< +EA01F0EA071CEA0C06487E00381380A2387001C0A400F013E0AE007013C0A3EA780300381380A2 +381C0700EA0C06EA071CEA01F0>19 34 2 1 24]48 dc[<13801203120F12F31203B3A9EA07C0 +EAFFFE>15 33 4 0 24]49 dc[19 33 2 0 24]50 dc[19 34 2 1 24]57 dc[<497EA3497EA3EB05E0A2EB0DF0 +1308A2497E1478A2497EA3497EA3497EA290B5FC3901000780A24814C000021303A24814E01401 +A2000CEB00F0A2003EEB01F839FF800FFF>32 35 2 0 37]65 dc[31 34 2 0 37]68 dc[<3803F020380C0C60EA1802383001E0EA700000 +60136012E0A21420A36C1300A21278127FEA3FF0EA1FFE6C7E0003138038003FC0EB07E01301EB +00F0A214707EA46C1360A26C13C07E38C8018038C60700EA81FC>20 36 3 1 27]83 dc[21 21 2 0 24]97 dc[<120E12FE121E120EAB131FEB61C0EB8060380F00 +30000E1338143C141C141EA7141C143C1438000F1370380C8060EB41C038083F00>23 35 1 0 +27]98 dc[19 21 1 0 22]101 dc[<14703801F19838071E +18EA0E0E381C0700A2003C1380A4001C1300A2EA0E0EEA0F1CEA19F00010C7FCA21218A2EA1FFE +380FFFC014E0383800F0006013300040131812C0A300601330A2003813E0380E03803803FE00> +21 33 1 11 24]103 dc[<390E1FC07F3AFE60E183803A1E807201C03A0F003C00E0A2000E1338 +AF3AFFE3FF8FFE>39 21 1 0 42]109 dc[<380E1F8038FE60C0381E80E0380F0070A2120EAF38 +FFE7FF>24 21 1 0 27]110 dc[23 31 1 10 27]112 dc[< +EA0E3CEAFE46EA1E8FEA0F0F13061300120EAD120FEAFFF0>16 21 1 0 19]114 dc[14 21 2 0 19]115 dc[<1202A41206A3120E121E123EEAFFF8EA0E00 +AB1304A6EA07081203EA01F0>14 31 1 0 19]116 dc[<000E137038FE07F0EA1E00000E1370AD +14F0A238060170380382783800FC7F>24 21 1 0 27]117 dc dfe /fi 20 125 df[38 48 4 0 46]66 dc[<91383FC002903901 +FFF806903807E01C90391F00070E013CEB018E49EB00DE49145E4848143E4848141E485A48C812 +0EA2001E1506A2123E003C1502127CA30078150012F8AA1278127C1602A2123C123E121E16047E +160C6C6C14086C6C14186C6C14106C6C1420017814406DEB0180011FEB0300903807E01E903801 +FFF89038003FC0>39 50 4 1 47]67 dc[44 48 4 0 51]75 dc[ +52 48 4 0 60]77 dc[36 48 4 0 44] +80 dc[<13FE38070380380801E0486C7E003C1378123E80A2121CC7FCA3EB07FCEB7C3CEA03E0 +EA0780EA1F00123E123C127C0078140812F8A3147CA2007C13BC393E011E10390F060FE03903F8 +07C0>29 30 3 0 32]97 dc[<487E123F12FFA2120F1207AEEB81F8EB860790389803C09038A0 +00E001C013F01578491338153C153E151EA2151FA8151E153E153CA215786D1370014013F09038 +2001C0390610038090380C0E00380403F8>32 49 2 0 36]98 dc[25 30 2 0 29]101 dc[22 49 +1 0 20]102 dc[29 46 2 15 32]103 dc[<1207EA0F80121FA2120FEA0700C7FC +ABEA0180121F12FFA2120F1207B3A4EA0FC0EAFFF8A2>13 47 2 0 18]105 dc[<260181FEEB3F +C03B3F860780C0F03BFF8801C10038019001E2133C270FA000E4131C000702F4131E01C013F8A2 +495BB3486C486C133F3CFFFC1FFF83FFF0A2>52 30 2 0 56]109 dc[<380181FC383F860F39FF +880380019013C0380FA001D807C013E0A31380B3390FC003F039FFFC3FFFA2>32 30 2 0 36] +110 dc[28 30 2 0 32]111 dc[<380181F8383F860F39FF9803C09038A001E03907C000F015785B153C +153EA2151E151FA8151E153E153CA215786D13F0A29038A001C0903890038090388C0E00EB83F8 +0180C7FCAB487EEAFFFCA2>32 44 2 14 36]112 dc[<380183E0383F8C1838FF907CA2EA0FA0 +3807C0381400A35BB2487EEAFFFEA2>22 30 2 0 25]114 dc[<3803FC20380E0260383801E0EA +300048136012E01420A27EA2007C1300EA7F80EA3FFC6CB4FC00071380000113E0EA000FEB01F0 +388000F8147814387EA36C13306C1370146000C813C038C603803881FE00>21 30 2 0 25]115 +dc[<1340A513C0A31201A212031207120F381FFFE0B5FC3803C000AF1410A80001132013E00000 +1340EB78C0EB1F00>20 43 1 0 25]116 dc[<39FFF803FFA2390FC000F86C48137015606C6C13 +40A26C6C1380A33900F00100A26D5AEB7802A26D5AA2EB3E0CEB1E08A26D5AA214B0EB07A0A2EB +03C0A36D5AA2>32 30 1 0 34]118 dc[65 1 0 -18 65]124 dc dfe end +%%EndProlog +%%BeginSetup +%%Feature: *Resolution 300 +%%Feature: *ManualFeed False + TeXDict begin 8.267717 11.692913 false @paper +%%EndSetup +%%Page: 1 1 + bop 335 340 a fi(PBMtoPK)23 b(|)f(Con)n(v)n(erting)h(bitmaps)e(to)h(fon)n +(ts)525 461 y fh(Angus)16 b(Duggan)i(\()p fg(ajcd@uk.ac.)o(ed)o(.lf)o(cs)p fh +(\))738 558 y(21)f(Septem)o(b)q(er)d(1990)75 737 y ff(PBMtoPK.)75 828 y fe +(PBMtoPK)k(is)f(a)f(program)f(for)i(con)o(v)o(erting)f(and)h(collecting)f(bit\ +maps)g(in)o(to)g(a)g(PK)i(format)d(fon)o(t,)h(for)g(use)75 878 y(with)11 b +(T)190 887 y(E)213 878 y(X.)g(PKtoPBM)h(p)q(erforms)f(the)g(in)o(v)o(erse)h +(op)q(eration,)f(extracting)h(bitmaps)d(from)h(a)g(PK)i(format)d(fon)o(t.)75 +1015 y ff(PBMPLUS.)75 1106 y fe(The)j(PBM)h(\(P)o(ortable)f(BitMap\))g(format) +e(w)o(as)i(created)h(b)o(y)f(Jef)h(P)o(osk)n(anzer)f(as)g(a)g(\\lo)o(w)o(est) +f(common)f(denom-)75 1156 y(inator")j(format,)f(whic)o(h)i(images)e(could)i +(b)q(e)g(translated)h(to)f(and)g(from)e(with)h(ease.)20 b(The)14 b(bitmap)e +(represen-)75 1206 y(tation)k(is)h(giv)o(en)f(in)h(plain)f(ASCI)q(I)h(text,)g +(so)g(that)g(images)f(can)h(b)q(e)g(mailed)e(b)q(et)o(w)o(een)j(di\013eren)o +(t)g(mac)o(hines)75 1256 y(and)12 b(net)o(w)o(orks)h(without)f(the)h(usual)f +(problems)f(of)h(enco)q(ding)g(and)h(deco)q(ding.)k(\(The)c(ASCI)q(I)g(repres\ +en)o(tation)75 1305 y(of)g(the)i(bitmap)d(also)i(allo)o(ws)f(y)o(ou)g(to)h +(create)i(or)e(alter)g(images)e(with)i(a)g(text)h(editor,)e(if)h(no)f(b)q(ett\ +er)j(to)q(ols)e(are)75 1355 y(a)o(v)n(ailable.\))137 1405 y(The)h(PBM)f(forma\ +t)e(is)i(v)o(ery)g(simple:)179 1467 y fd(P1)179 1513 y(16)19 b(16)179 1559 y +(000001111)o(110)o(00)o(00)179 1604 y(000110000)o(001)o(10)o(00)179 1650 y +(001000000)o(000)o(01)o(00)179 1696 y(010000000)o(000)o(00)o(10)179 1741 y +(010000000)o(000)o(00)o(10)179 1787 y(100011000)o(011)o(00)o(01)179 1833 y +(100011000)o(011)o(00)o(01)179 1878 y(100000000)o(000)o(00)o(01)179 1924 y +(100000000)o(000)o(00)o(01)179 1970 y(100000000)o(000)o(00)o(01)179 2015 y +(100010000)o(001)o(00)o(01)179 2061 y(010001000)o(010)o(00)o(10)179 2107 y +(010000111)o(100)o(00)o(10)179 2152 y(001000000)o(000)o(01)o(00)179 2198 y +(000110000)o(001)o(10)o(00)179 2244 y(000001111)o(110)o(00)o(00)137 2306 y fe +(The)14 b(image)d(ab)q(o)o(v)o(e)i(is)g(a)g(smiley)f(face)h(\()p fc(D)p fe +(\).)g(The)h(\014rst)g(t)o(w)o(o)f(c)o(haracters)i(of)e(the)h(\014le)f(con)o +(tain)g(the)g(\\magic)75 2356 y(n)o(um)o(b)q(er")e(of)h(the)h(\014le)f(|)g +(in)g(the)h(case)g(of)f(a)g(PBM)h(\014le,)f(this)g(is)g(\\)p fb(P1)p fe(".)17 +b(The)12 b(width)g(and)h(heigh)o(t)f(of)f(the)i(image)75 2405 y(follo)o(w,)e +(sep)q(erated)j(b)o(y)f(whitespace)h(\(spaces,)g(tabs)f(or)g(newlines\),)g +(and)f(then)i(the)f(image)e(data,)h(enco)q(ded)i(as)75 2455 y(ones)f(and)f +(zeros.)19 b(The)13 b(PBM)g(format)e(sp)q(eci\014cation)i(allo)o(ws)e(white)i +(space)h(to)e(app)q(ear)h(almost)d(an)o(ywhere)k(in)75 2505 y(the)g(\014le)f +(|)f(the)i(image)d(need)j(not)f(ha)o(v)o(e)g(newlines)h(b)q(et)o(w)o(een)g +(image)d(ro)o(ws,)i(and)g(the)h(bits)f(can)g(b)q(e)h(sep)q(erated)75 2555 y +(b)o(y)g(whitespace)h(if)e(desired.)19 b(Commen)o(ts)12 b(can)i(b)q(e)h(inclu\ +ded)f(in)g(PBM)g(\014les,)g(but)g(most)f(of)g(the)i(PBM)f(\014lters)75 2605 y +(will)e(delete)j(them)e(from)g(their)h(output.)137 2655 y(The)k(PBMPLUS)h(to) +q(olkit)e(con)o(tains)h(programs)e(to)i(p)q(erform)f(man)o(y)f(common)f(image) +g(manipulation)75 2704 y(op)q(erations)g(on)g(PBM)h(format)d(images,)h(suc)o +(h)i(as)f(cropping,)g(cutting,)g(pasting,)g(rotating,)f(shearing,)h(con-)75 +2754 y(v)o(erting)g(b)q(et)o(w)o(een)h(image)d(formats,)g(etc..)21 b(These)16 +b(programs)d(are)j(usually)e(arranged)h(as)g fa(\014lters)s fe(;)f(they)h(tak) +o(e)930 2866 y(1)p eop +%%Page: 2 2 + bop 75 166 a fe(the)11 b(input)f(image)f(on)h(the)h(default)g(input)f(stream\ +,)g(and)g(write)h(their)g(output)g(to)f(the)h(default)g(output)f(stream.)75 +216 y(This)k(organisation)f(allo)o(ws)g(m)o(ultiple)f(image)h(manipulations)e +(to)j(b)q(e)h(strung)g(together)h(in)e(a)g(pip)q(eline,)f(cre-)75 266 y(ating) +g(no)h(unnecessary)i(temp)q(orary)d(\014les.)137 315 y(There)18 b(are)e(t)o +(w)o(o)g(other)h(image)d(formats)g(whic)o(h)i(are)h(supp)q(orted)g(b)o(y)f +(the)h(PBMPLUS)g(to)q(olkit.)24 b(These)75 365 y(are)15 b(the)g(PGM)f(\(P)o +(ortable)g(Gra)o(yMap\))g(format,)e(and)i(the)h(PPM)f(\(P)o(ortable)h(PixMap\ +\))f(format,)e(whic)o(h)i(are)75 415 y(lo)o(w)o(est)c(common)e(denominator)h +(formats)g(for)i(gra)o(yscale)f(and)h(colour)f(images)f(resp)q(ectiv)o(ely)m +(.)18 b(These)12 b(formats)75 465 y(ha)o(v)o(e)i(the)h(magic)d(n)o(um)o(b)q +(ers)i(P2)h(and)f(P3,)g(and)g(a)g(similar)e(organisation)h(of)g(the)i(image)e +(data.)19 b(In)14 b(addition,)75 515 y(there)e(are)f(binary)g(v)n(arian)o(ts) +f(on)g(the)i(PBM,)f(PGM)f(and)h(PPM)g(formats,)f(whic)o(h)h(are)g(unsuitable) +g(for)f(mailing.)75 565 y(These)15 b(v)n(arian)o(ts)e(ha)o(v)o(e)h(the)h(magi\ +c)c(n)o(um)o(b)q(ers)j(P4,)f(P5,)h(and)f(P6.)137 614 y(W)m(riting)g(programs) +g(whic)o(h)h(use)h(the)f(PBMPLUS)i(formats)c(is)i(made)f(a)h(lot)g(easier)h +(b)o(y)e(the)i(PBMPLUS)75 664 y(libraries,)h(whic)o(h)g(pro)o(vide)g(function\ +s)h(for)f(reading)g(and)g(writing)f(PBMPLUS)i(images)e(in)h(their)h(en)o(tire\ +t)o(y)m(,)75 714 y(or)d(ro)o(w)g(b)o(y)f(ro)o(w.)137 764 y(The)i(PBMPLUS)g +(to)q(olkit)d(has)i(b)q(een)h(p)q(orted)g(to)f(VMS)g(and)g(other)g(systems.) +75 901 y ff(Using)23 b(PBMtoPK.)75 992 y fe(PBMtoPK)15 b(and)g(PKtoPBM)g(are) +g(based)g(on)f(T)m(om)e(Rokic)o(ki's)h(PXtoPK)i(and)f(PKtoPX)h(programs.)j +(They)75 1042 y(are)e(written)f(in)g(C,)g(and)g(are)h(link)o(ed)e(with)h(the) +h(PBM)g(library)m(.)21 b(PBMtoPK)16 b(can)g(b)q(e)f(used)i(to)e(incorp)q(orat\ +e)75 1092 y(bi-lev)o(el)g(images)f(in)o(to)h(T)467 1101 y(E)490 1092 y(X)h +(do)q(cumen)o(ts,)g(b)o(y)g(creating)g(a)f(fon)o(t)h(whic)o(h)f(con)o(tains)h +(the)g(images)f(used)h(in)g(the)75 1141 y(do)q(cumen)o(t)d(as)h(c)o(haracters\ +.)20 b(Figure)14 b(1)g(sho)o(ws)g(an)g(example)e(graphic)i(whic)o(h)g(w)o(as) +f(created)j(in)d(this)h(w)o(a)o(y)m(.)584 1554 y fc(B)411 1646 y fe(Figure)g +(1:)j(A)d(scanned)h(line-dra)o(wing)e(con)o(v)o(erted)i(b)o(y)f(PBMtoPK)137 +1745 y(Some)20 b(D)o(VI)g(driv)o(ers)h(ma)o(y)e(ha)o(v)o(e)i(problems)e(handl\ +ing)h(the)h(large)g(c)o(haracters)h(whic)o(h)f(are)g(t)o(ypically)75 1795 y +(created)e(b)o(y)f(this)g(pro)q(cess.)32 b(This)18 b(should)g(not)g(b)q(e)g +(a)g(problem)f(if)g(the)h(driv)o(er)h(adheres)g(to)f(the)g(recen)o(tly-)75 +1845 y(published)c(draft)g(Lev)o(el)g(0)f(D)o(VI)h(driv)o(er)g(sp)q(eci\014ca\ +tions.)137 1895 y(T)m(o)19 b(create)j(a)d(simple)f(fon)o(t)i(con)o(taining)e +(only)h(one)h(image)e(\(in)i(the)g(c)o(haracter)h(p)q(osition)e(of)g(\\A"\),) +h(a)75 1945 y(command)11 b(similar)h(to)179 2007 y fd(pbmtopk)17 b(example.3) +o(00)o(pk)f(example.tf)o(m)h(300)h(-s10)g(-c65)g(image.pbm)75 2069 y fe(w)o +(ould)e(b)q(e)h(used.)28 b(This)16 b(command)e(will)h(create)j(the)g(PK)f(fon) +o(t)f(\014le)h fb(example.300pk)d fe(and)i(the)i(TFM)e(\014le)75 2119 y fb +(example.tfm)p fe(,)c(setting)i(the)h(resolution)g(of)f(the)g(fon)o(t)g(to)h +(300)e(dots)i(p)q(er)g(inc)o(h,)f(and)g(the)h(design)g(size)g(of)f(the)75 2169 +y(fon)o(t)h(to)h(10)f(p)q(oin)o(ts.)24 b(T)m(o)15 b(include)h(this)g(image)d +(in)j(the)g(do)q(cumen)o(t,)f(a)h(fon)o(t)f(declaration)h(should)f(b)q(e)i +(put)f(in)75 2218 y(the)e(do)q(cumen)o(t)g(prologue:)179 2281 y fd(\\font\\im\ +a)o(gef)o(on)o(t=e)o(xa)o(mpl)o(e)137 2343 y fe(The)i(fon)o(t)e(ma)o(y)f(then) +i(b)q(e)h(selected,)g(and)f(the)g(image)e(can)i(b)q(e)g(t)o(yp)q(eset)i(b)o +(y)d(placing)g(the)h(c)o(haracter)i(\\A")75 2393 y(on)d(the)g(page.)k(F)m(or) +c(example:)179 2455 y fd(\\begin{fi)o(gur)o(e})o([hb)o(t])o(\\ce)o(nte)o(ri)o +(ng)179 2501 y(\\mbox{\\im)o(age)o(fo)o(nt)i(A})179 2546 y(\\caption{)o(A)h +(scanned)f(image)i(converted)e(by)j(PBMtoPK})179 2592 y(\\end{figu)o(re})137 +2654 y fe(The)12 b(TFM)f(and)g(PK)h(\014les)g(will)d(probably)i(ha)o(v)o(e)g +(to)g(b)q(e)h(mo)o(v)o(ed)d(to)i(an)g(appropriate)h(directory)g(\(the)g(exact) +75 2704 y(directory)j(names)f(are)h(site)f(and)h(D)o(VI)f(driv)o(er)g(sp)q +(eci\014c\);)i(D)o(VI)e(driv)o(ers)h(and)f(preview)o(ers)i(ma)o(y)d(also)g +(require)75 2754 y(that)g(the)h(lo)q(cation)e(of)h(the)h(PK)f(and)h(TFM)f(\ +\014les)g(are)h(included)f(in)g(option)g(\014les)g(or)g(en)o(vironmen)o(t)f +(v)n(ariables.)930 2866 y(2)p eop +%%Page: 3 3 + bop 137 166 a fe(The)17 b(ma)r(jor)d(disadv)n(an)o(tage)i(of)f(this)i(metho) +q(d)e(of)h(including)f(raster)i(graphics)g(in)e(T)1476 175 y(E)1499 166 y(X)i +(output)f(is)g(that)75 216 y(the)e(user)h(m)o(ust)e(kno)o(w)h(man)o(y)e(detai\ +ls)h(ab)q(out)h(the)h(output)f(device.)137 266 y(PBMtoPK)h(pro)o(vides)e(a)g +(large)g(n)o(um)o(b)q(er)g(of)g(options)g(whic)o(h)g(can)g(b)q(e)h(used)h(to) +e(alter)g(information)e(in)i(the)75 315 y(PK)k(and)f(TFM)h(fon)o(t)f(\014les) +h(|)f(the)h(designsize,)h(resolution,)e(fon)o(t)g(parameters,)h(and)g(the)g +(co)q(ding)f(sc)o(heme)75 365 y(and)g(fon)o(t)g(family)e(name)h(commen)o(ts)g +(can)i(all)e(b)q(e)j(reset.)28 b(Options)16 b(are)h(pro)o(vided)g(to)f(set)i +(the)f(c)o(haracter's)75 415 y(width,)g(heigh)o(t,)f(depth,)i(and)e(italic)g +(correction)h(in)g(the)g(TFM)g(\014le)f(for)g(eac)o(h)i(c)o(haracter)g(\(thes\ +e)g(need)f(not)75 465 y(b)q(e)g(the)g(same)e(as)h(the)h(c)o(haracter's)g(actu\ +al)f(width)g(or)g(heigh)o(t)g(in)g(pixels\),)g(and)g(the)h(c)o(haracter)g(ori\ +gin)e(and)75 515 y(horizon)o(tal)g(and)g(v)o(ertical)h(escap)q(emen)o(ts)g +(in)f(the)i(PK)f(\014le.)23 b(Sensible)16 b(guesses)i(are)e(made)e(for)h(an)o +(y)g(piece)i(of)75 565 y(information)11 b(not)j(supplied,)f(based)i(on)e(the) +i(information)c(whic)o(h)j(w)o(as)f(supplied)h(and)g(the)h(image)d(size.)137 +614 y(If)e(m)o(ultiple)f(images)g(are)h(b)q(eing)h(included)g(in)f(one)g(fon) +o(t)g(\014le,)h(or)f(a)h(fon)o(t)f(is)g(b)q(eing)g(con)o(v)o(erted)i(from)d +(another)75 664 y(format)15 b(in)o(to)h(a)g(PK)h(fon)o(t,)f(the)i(command-l)o +(ine)c(options)i(rapidly)g(b)q(ecome)g(un)o(wieldy)g(and)h(ma)o(y)e(o)o(v)o +(er\015o)o(w)75 714 y(the)g(maxim)n(um)10 b(command)i(line)i(size.)20 b(A)14 b +(facilit)o(y)f(is)h(therefore)i(pro)o(vided)e(to)h(read)g(the)g(c)o(haracter-\ +sp)q(eci\014c)75 764 y(options)f(from)e(a)h(\014le,)h(whic)o(h)f(can)i(b)q +(e)f(prepared)h(with)f(a)f(text)i(editor,)e(or)h(automatically)d(generated.) +137 814 y(Ligature)k(and)g(k)o(erning)g(tables)g(are)g(not)g(catered)h(for)f +(at)g(all)e(b)o(y)i(PBMtoPK)h(|)e(if)g(these)j(features)f(are)75 863 y(requir\ +ed)h(in)e(the)i(fon)o(t,)e(the)i(TFM)f(\014le)g(should)g(b)q(e)g(con)o(v)o +(erted)h(to)f(a)g(PL)g(\(Prop)q(ert)o(y)h(List\))f(\014le,)g(edited)g(b)o(y) +75 913 y(hand,)d(and)h(con)o(v)o(erted)h(bac)o(k)f(in)o(to)f(a)h(TFM)g(\014le\ +.)137 963 y(The)h(in)o(terface)f(to)g(PKtoPBM)h(is)f(m)o(uc)o(h)f(simpler;)f +(the)j(name)e(of)g(the)i(PK)f(\014le)g(from)e(whic)o(h)i(glyphs)g(are)75 1013 +y(to)e(b)q(e)i(extracted)g(is)e(giv)o(en)h(on)f(the)h(command)d(line,)i(with) +g(a)h(list)f(of)g(names)g(for)g(the)h(PBM)g(\014les)g(mixed)f(with)75 1063 y +(switc)o(hes)j(whic)o(h)f(set)h(the)f(n)o(um)o(b)q(er)f(of)h(the)g(next)g(c)o +(haracter)i(to)d(b)q(e)i(extracted.)75 1200 y ff(Getting)22 b(PBMtoPK.)75 1291 +y fe(PBMtoPK)13 b(and)e(PKtoPBM)i(are)f(on)f(the)h(Aston)g(arc)o(hiv)o(e,)g +(in)f(the)h(directory)g fb([tex-archive.wherev)o(er])p fe(.)75 1341 y(PBMtoPK) +k(w)o(as)g(p)q(osted)g(to)f(Usenet)i(group)f fb(alt.sources)d fe(in)i(early)g +(August,)h(and)f(so)g(should)h(b)q(e)g(found)75 1391 y(in)d(an)o(y)h(arc)o +(hiv)o(e)g(storing)g fb(alt.sources)p fe(.)1649 1450 y fc(A)p fe(.)930 2866 y +(3)p eop +%%Trailer + end +userdict /end-hook known{end-hook}if +SafetyEnclosure restore +%%EOF diff --git a/graphics/pbmtopk/doc/pbmtopk.tex b/graphics/pbmtopk/doc/pbmtopk.tex new file mode 100644 index 0000000000..b963197716 --- /dev/null +++ b/graphics/pbmtopk/doc/pbmtopk.tex @@ -0,0 +1,179 @@ +%%% pbmtopk.tex +%%% AJCD 21/9/90 +%%% Short article for UK TeX User's Group newsletter about the PBMtoPK and +%%% PKtoPBM programs. + +\documentstyle[a4,verbatim]{article} + +\title{PBMtoPK --- Converting bitmaps to fonts} +\author{Angus Duggan ({\tt ajcd@uk.ac.ed.lfcs})} +\date{21 September 1990} + +%%% Please alter this directory +\def\inaston{[tex-archive.fonts.duggan]} + +%%% Dates of Usenet posting +\def\postingdates{at the beginning of August, with three patches on 10th +August, 12th August, and 21st September} + +%%% Example font for this document +\font\examplf=examplf + +%%% new environment for examples; small, indented, verbatim +\newenvironment{example}% + {\quote\small\verbatim}% + {\endverbatim\endquote\smallskip} + +\begin{document} + +\maketitle + +\section*{PBMtoPK.} +PBMtoPK is a program for converting and collecting bitmaps into a PK format +font, for use with \TeX. PKtoPBM performs the inverse operation, extracting +bitmaps from a PK format font. + +\section*{PBMPLUS.} +The PBM (Portable BitMap) format was created by Jef Poskanzer as a ``lowest +common denominator'' format, which images could be translated to and from with +ease. The bitmap representation is given in plain ASCII text, so that images +can be mailed between different machines and networks without the usual +problems of encoding and decoding. (The ASCII representation of the bitmap +also allows you to create or alter images with a text editor, if no better +tools are available.) + +The PBM format is very simple: +\begin{example} +P1 +16 16 +0000011111100000 +0001100000011000 +0010000000000100 +0100000000000010 +0100000000000010 +1000110000110001 +1000110000110001 +1000000000000001 +1000000000000001 +1000000000000001 +1000100000010001 +0100010000100010 +0100001111000010 +0010000000000100 +0001100000011000 +0000011111100000 +\end{example} +The image above is a smiley face ({\examplf S}). +The first two characters of the file contain the ``magic number'' of the +file --- in the case of a PBM file, this is ``{\tt P1}''. The width and height +of the image follow, seperated by whitespace (spaces, tabs or newlines), and +then the image data, encoded as ones and zeros. The PBM format specification +allows white space to appear almost anywhere in the file --- the image need +not have newlines between image rows, and the bits can be seperated by +whitespace if desired. Comments can be included in PBM files, but most of the +PBM filters will delete them from their output. + +The PBMPLUS toolkit contains programs to perform many common image +manipulation operations on PBM format images, such as cropping, cutting, +pasting, rotating, shearing, converting between image formats, etc.. +These programs are usually arranged as {\em filters\/}; they take the input +image on the default input stream, and write their output to the default +output stream. This organisation allows multiple image manipulations to be +strung together in a pipeline, creating no unnecessary temporary files. + +There are two other image formats which are supported by the PBMPLUS toolkit. +These +are the PGM (Portable GrayMap) format, and the PPM (Portable PixMap) format, +which are lowest common denominator formats for grayscale and colour images +respectively. These formats have the magic numbers P2 and P3, and a similar +organisation of the image data. In addition, there are binary variants +on the PBM, PGM and PPM formats, which are unsuitable for mailing. These +variants have the magic numbers P4, P5, and P6. + +Writing programs which use the PBMPLUS formats is made a lot easier by the +PBMPLUS libraries, which provide functions for reading and writing PBMPLUS +images in +their entirety, or row by row. + +The PBMPLUS toolkit has been ported to VMS and other systems. + +\section*{Using PBMtoPK.} +PBMtoPK and PKtoPBM are based on Tom Rokicki's PXtoPK and PKtoPX programs. +They are written in C, and are linked with the PBM library. PBMtoPK can be +used to incorporate bi-level images into \TeX\ documents, by creating a font +which contains the images used in the document as characters. +Figure~\ref{fig:beast} shows an example graphic which was created in this way. + +\begin{figure}[hbt]\centering +\mbox{\examplf B} +\caption{A scanned line-drawing converted by PBMtoPK}\label{fig:beast} +\end{figure} + +Some DVI drivers may have problems handling the large characters which are +typically created by this process. This should not be a problem if the driver +adheres to the recently-published draft Level~0 DVI driver specifications. + +To create a simple font containing only one image (in the character position +of ``A''), a command similar to +\begin{example} +pbmtopk example.300pk example.tfm 300 -s10 -c65 image.pbm +\end{example} +\noindent +would be used. This command will create the PK font file {\tt example.300pk} +and the TFM file {\tt example.tfm}, setting the resolution of the font to 300 +dots per inch, and the design size of the font to 10 points. To include this +image in the document, a font declaration should be put in the document +prologue: +\begin{example} +\font\imagefont=example +\end{example} +The font may then be selected, and the image can be typeset by placing the +character ``A'' on the page. For example: +\begin{example} +\begin{figure}[hbt]\centering +\mbox{\imagefont A} +\caption{A scanned image converted by PBMtoPK} +\end{figure} +\end{example} +The TFM and PK files will probably have to be moved to +an appropriate directory (the exact directory names are site and DVI driver +specific); DVI drivers and previewers may also require that the location of the +PK and TFM files are included in option files or environment variables. + +The major disadvantage of this method of including raster graphics in \TeX\ +output is that the user must know many details about the output device. + +PBMtoPK provides a large number of options which can be used to alter +information in the PK and TFM font files --- the designsize, resolution, +font parameters, and the coding scheme and font family name comments can all +be reset. Options are provided to set the character's width, height, depth, +and italic correction in the TFM file for each character (these need not be +the same as the +character's actual width or height in pixels), and the character origin and +horizontal and vertical escapements in the PK file. Sensible guesses are made +for any piece of information not supplied, based on the information +which was supplied and the image size. + +If multiple images are being included in one font file, or a font is being +converted from another format into a PK font, the command-line options +rapidly become unwieldy and may overflow the maximum command line size. +A facility is therefore provided to read the character-specific options from a +file, which can be prepared with a text editor, or automatically generated. + +Ligature and kerning tables are not catered for at all by PBMtoPK --- if these +features are required in the font, the TFM file should be converted to a PL +(Property List) file, edited by hand, and converted back into a TFM file. + +The interface to PKtoPBM is much simpler; the name of the PK file from which +glyphs are to be extracted is given on the command line, with a list of names +for the PBM files mixed with switches which set the number of the next +character to be extracted. + +\section*{Getting PBMtoPK.} +PBMtoPK and PKtoPBM are on the Aston archive, in the directory {\tt\inaston}. +PBMtoPK was posted to Usenet group {\tt alt.sources} \postingdates, and +so should be available from any archive storing {\tt alt.sources}. + +\noindent\hfill{\examplf A}. + +\end{document} diff --git a/graphics/pbmtopk/doc/smiley300.pbm.Z.btoa b/graphics/pbmtopk/doc/smiley300.pbm.Z.btoa new file mode 100644 index 0000000000..cfca32bd6e --- /dev/null +++ b/graphics/pbmtopk/doc/smiley300.pbm.Z.btoa @@ -0,0 +1,6 @@ +xbtoa Begin ++.\Ki@ORTe!sCmn0G5j?(o*eBLCG%lKRn*:6AQIg=B&CbTu2j2,>.$:TI"lX2!IsgAsj!jR +MII/[Ue9mNVdj2?*7G[:6fP$.+Z"Rn`mJBoInV*C,$Ltb>kh$_^48.>mZnejMmI[eg3=VDWf7l1I=4 +Gq6+JB$31&+ +xbtoa End N 194 c2 E b6 S 5cea R 95a887dc diff --git a/graphics/pbmtopk/pbmtopk/Makefile b/graphics/pbmtopk/pbmtopk/Makefile new file mode 100644 index 0000000000..a1f21555e2 --- /dev/null +++ b/graphics/pbmtopk/pbmtopk/Makefile @@ -0,0 +1,28 @@ +# Simple makefile for pbmtopk & pktopbm +# AJCD 9/8/90 + +#CC=gcc-1.37.1 +CFLAGS=-I. -O + +all: pbmtopk pktopbm + +test: test.dvi test.pbm + +pbmtopk: pbmtopk.c + $(CC) $(CFLAGS) -o pbmtopk pbmtopk.c -lpbm + +pktopbm: pktopbm.c + $(CC) $(CFLAGS) -o pktopbm pktopbm.c -lpbm + +test.pbm: pktopbm test.300pk + pktopbm test.300pk -c 65 test.pbm + +test.dvi: test.tex test.tfm + tex test + +test.300pk test.tfm: pbmtopk test.opt + pbmtopk test.300pk test.tfm 300 -s 10 -f test.opt + +clean: + rm -f pbmtopk pktopbm test.dvi test.log test.tfm test.300pk test.pbm + diff --git a/graphics/pbmtopk/pbmtopk/face.pbm b/graphics/pbmtopk/pbmtopk/face.pbm new file mode 100644 index 0000000000..eb79666e15 --- /dev/null +++ b/graphics/pbmtopk/pbmtopk/face.pbm @@ -0,0 +1,66 @@ +P1 +64 64 +0111110100000000010110101110101001000010100000010000000000001001 +0011011101011011010110111111011010010100000101000101000010100000 +1111101010000101011011011110101001010010101000010000010001000001 +0011110100101010110110111111110101011101000010100010100101011000 +1111011011001011101011111010101010101010010000010100001000110000 +0110110100101010111101011011111101011011010101010000010010000100 +1111010101010101101111111101100101010100101010101010100100000000 +0101010010101011011111010101011010110101010110101010010001000000 +1110100110111010111110101101010101111101101101101001001000000000 +0100010101010101011101010111101110101010111110101011010101001010 +0001001111010000000010010101110101010101010000000100100101010000 +0100011101010101001000101011011101101010101010000001010101010010 +0010110101101000000010000111110110101001000000000000010101010100 +1000111111010000010000010001010101010000010000000001010101010000 +0011110110101001000000000000100010000100000000000000101110101010 +0010111111010100000101000100001000000000000000000100011011010100 +0101011111100000010000000000000000000000000000000000111111110101 +0001111111110101000100000000000000000000000000000000011111111010 +0111111111000000000001000000000000000000100000000000111111111100 +1011111111101010001000010001000000000000000100010000011101111111 +0111111111010000000000000000000000000000000000000010111111111010 +0001110111100101001001000000001000000000000000000000011111111110 +0111111111010000000000000000000000000000000000100000111111011100 +0010111111101010100000000100000000000000000000000010011111111101 +0001111111000000000000100000000000000100000000000000111011111010 +1010111111010100000000000000100000100000000000000100011111110100 +0001011111000001001010010100001000000000000000000000011111111010 +0100111111110100010001010010100010010100010010000010001111110100 +0001011011000010101101111010001000101010100000000000011111110010 +0100101111001000010011110101100010101010100101010000101110111100 +0001011111100010101101001010010001010101110100000000011111110010 +0100000101001001010010110001000000010101110101010100001111101000 +0010001011000000000000000100000000000000001000000000010100011101 +1000100001010010000100100000100000000100100000000000000100000110 +0000001010000000100000000010000000100000000001000000010010010101 +0010100010101000000100100000100000000001000000000000000100001011 +0100000100000010000000000100000000000000000000000000100000000100 +0010101001011000000000000001000000000000001000000010000000010101 +1010111000100001000000000000010000000000000000000000000000100010 +0001110101000100000100001001000000001000000001001001001000010101 +0101110000101001000000000000000000000000000000000000000010001001 +0000111010010000010000100101010010100000000000010001001001010010 +0101001010100101000000000010100101010010000000000100000010101101 +0000100001010000000100000101011011100000010001000000001010000101 +0000001010100100100000100010101000010000000000001001010001010101 +0010100010010000000000001000100101000000000000000000001010101011 +0000001001000101001001000010001000000000000100010001010101010111 +0010101010010000000000001000100100001001000000000000010101001011 +0100010001000100100010100101010010000000010000100010011010100111 +1000101010010000001000010111111111110101000000000000001101001011 +0101010100100101000000001010101000101000000000010010100110101111 +1010010010001000000100100001010101000001001001000000001010101111 +0001101000100100100000000100101010010000000000001010101101011111 +0110010010010001001010100001000001000010001000100000001010101111 +1010101001000100010000001000010000001000000010001001101100111111 +0101010010000010100010100000000100000000101000100100010101011111 +1110101001010000010100000100000000000000000010000001111000111111 +1010100101001010100000100000000000000001001000010010110010111111 +0101010010010001001010001001001010010000010010000101100101110111 +1010100100000110010010100100100001000101001001000011010100111111 +0101001001010010001000100010010100101001000100000101101011111111 +1010100100101100100101001001001001010010010000000010010100111111 +0100010001001001000010101010010101001001000000000101101011111111 +0101000101010100010100010000100010010100000001000010011111111111 diff --git a/graphics/pbmtopk/pbmtopk/pbmtopk.1 b/graphics/pbmtopk/pbmtopk/pbmtopk.1 new file mode 100644 index 0000000000..d518356b99 --- /dev/null +++ b/graphics/pbmtopk/pbmtopk/pbmtopk.1 @@ -0,0 +1,73 @@ +.TH pbmtopk 1 "6 August 1990" +.SH NAME +pbmtopk - convert a portable bitmap into a packed (PK) format font +.SH SYNOPSIS +pbmtopk pkfile[.pk] tfmfile[.tfm] resolution [-s designsize] [-p num param...] +[-C codingscheme] [-F family] [-f optfile] [-c num] +[-W width] [-H height] [-D depth] +[-I ital] [-h horiz] [-v vert] [-x xoff] [-y yoff] [pbmfile]... +.SH DESCRIPTION +Reads portable bitmaps as input, and produces a packed (PK) font file and a +TFM (TeX font metric) file as output. The resolution parameter indicates the +resolution of the font, in dots per inch. If the filename "-" is used for any +of the filenames, the standard input stream (or standard output where +appropriate) will be used. +.SH OPTIONS +.IP "-s designsize" +Sets the design size of the font, in TeX's points (72.27pt to the inch). The +default design size is 1. The TFM parameters are given as multiples of the +design size. +.IP "-p num param..." +Sets the first num font parameters for the font. The first seven parameters +are the slant, +interword spacing, interword space stretchability, interword space +shrinkability, x-height, quad width, and post-sentence extra space of the +font. Math and symbol fonts may have more parameters; see The TeXbook for a +list of these. Reasonable default values are chosen for parameters which are +not specified. +.IP "-C codingscheme" +Sets the coding scheme comment in the TFM file. +.IP "-F family" +Sets the font family comment in the TFM file. +.IP "-f optfile" +Reads the file optfile, which should contain a lines of the form: +.sp +.nf +.na + filename xoff yoff horiz vert width height depth ital +.fi +.ad +.sp +The pbm files specified by the filename parameters are inserted consecutively +in the font with the specified attributes. If any of the attributes are +omitted, or replaced with "*", a default value will be calculated from the +size of the bitmap. The settings of the -W, -H, -D, -I, -h, -v, -x, and -y +options do not affected characters created in this way. +The character number can be changed by including a line starting with "=", +followed by the new number. +Lines beginning with +"%" or "#" are ignored. +.IP "-c num" +Sets the character number of the next bitmap encountered to num. +.IP "-W width" +Sets the TFM width of the next character to width (in design size multiples). +.IP "-H height" +Sets the TFM height of the next character to height (in design size multiples). +.IP "-D depth" +Sets the TFM depth of the next character to depth (in design size multiples). +.IP "-I ital" +Sets the italic correction of the next character to +ital (in design size multiples). +.IP "-h horiz" +Sets the horizontal escapement of the next character to horiz (in pixels). +.IP "-v vert" +Sets the vertical escapement of the next character to vert (in pixels). +.IP "-x xoff" +Sets the horizontal offset of the next character to xoff (in pixels). +.IP "-y yoff" +Sets the vertical offset of the next character to yoff (in pixels, from the +top row). +.SH "SEE ALSO" +pktopbm(1), pbm(5) +.SH AUTHOR +Adapted from Tom Rokicki's pxtopk by Angus Duggan . diff --git a/graphics/pbmtopk/pbmtopk/pbmtopk.c b/graphics/pbmtopk/pbmtopk/pbmtopk.c new file mode 100644 index 0000000000..45696e9684 --- /dev/null +++ b/graphics/pbmtopk/pbmtopk/pbmtopk.c @@ -0,0 +1,1050 @@ +/* + pbmtopk, adapted from "pxtopk.c by tomas rokicki" by AJCD 1/8/90 + + compile with: cc -o pbmtopk pbmtopk.c -lm -lpbm + */ + +#include +#include +#include + +extern double atof(); + +#define MAXPKCHAR 256 +#define MAXOPTLINE 200 +#define MAXWIDTHTAB 256 +#define MAXHEIGHTTAB 16 +#define MAXDEPTHTAB 16 +#define MAXITALICTAB 64 +#define MAXPARAMS 30 +#define NAMELENGTH 80 + +#define true (1) +#define false (0) +#define chr(a) a + +#define round(a) ((int)(a+.5)) +#define fixword(d) ((int)((double)(d)*1048576)) +#define unfixword(f) ((double)(f) / 1048576) +#define fixrange(f) ((f) < 16777216 && (f) > -16777216) +#define designunits(p) ((p)*72.27/(double)resolution/unfixword(designsize)) + +/* character flags: in order of appearance in option files. */ +#define XOFFSET 1 +#define YOFFSET 2 +#define HORZESC 4 +#define VERTESC 8 +#define TFMWIDTH 16 +#define TFMHEIGHT 32 +#define TFMDEPTH 64 +#define TFMITALIC 128 + +typedef int integer ; +typedef char quarterword ; +typedef char boolean ; +typedef quarterword ASCIIcode ; +typedef quarterword eightbits ; +typedef FILE *bytefile ; +typedef unsigned char byte ; + +integer resolution, designsize ; +char *filename[MAXPKCHAR] ; + +integer xoffset[MAXPKCHAR] ; +integer yoffset[MAXPKCHAR] ; +integer horzesc[MAXPKCHAR] ; +integer vertesc[MAXPKCHAR] ; + +byte tfmindex[MAXPKCHAR] ; +byte hgtindex[MAXPKCHAR] ; +byte depindex[MAXPKCHAR] ; +byte italindex[MAXPKCHAR] ; +byte charflags[MAXPKCHAR] ; + +bit **bitmap ; +integer smallestch, largestch ; +integer emwidth ; +integer checksum ; +char *codingscheme = "GRAPHIC" ; +char *familyname = "PBM" ; + +integer widthtab[MAXWIDTHTAB] ; /* TFM widths */ +integer numwidth ; /* number of entries in width table */ +integer heighttab[MAXHEIGHTTAB] ; +integer numheight ; +integer depthtab[MAXDEPTHTAB] ; +integer numdepth ; +integer italictab[MAXITALICTAB] ; +integer numitalic ; +integer parameters[MAXPARAMS] ; +integer numparam ; + +ASCIIcode xord[128] ; +char xchr[256] ; +bytefile tfmfile, pkfile ; +char tfmname[NAMELENGTH+1], pkname[NAMELENGTH+1] ; +integer pkloc ; +integer bitweight ; +integer outputbyte ; +integer car ; +integer hppp ; +integer width ; +integer height ; +integer power[32] ; + +integer +compute_checksum() +{ + /* + begin + c0:=bc; c1:=ec; c2:=bc; c3:=ec; + for c:=bc to ec do if char_wd[c]>0 then + begin + temp_width:=memory[char_wd[c]]; + if design_units<>unity then + temp_width:=round((temp_width/design_units)*1048576.0); + temp_width:=temp_width + (c+4)*@'20000000; {this should be positive} + c0:=(c0+c0+temp_width) mod 255; + c1:=(c1+c1+temp_width) mod 253; + c2:=(c2+c2+temp_width) mod 251; + c3:=(c3+c3+temp_width) mod 247; + end; + header_bytes[check_sum_loc]:=c0; + header_bytes[check_sum_loc+1]:=c1; + header_bytes[check_sum_loc+2]:=c2; + header_bytes[check_sum_loc+3]:=c3; + end + */ +} + +#define add_tfmwidth(v) (add_tfmtable(widthtab, &numwidth, v, MAXWIDTHTAB,\ + "TFM width")) +#define add_tfmheight(v) (add_tfmtable(heighttab, &numheight, v, MAXHEIGHTTAB,\ + "TFM height")) +#define add_tfmdepth(v) (add_tfmtable(depthtab, &numdepth, v, MAXDEPTHTAB,\ + "TFM depth")) +#define add_tfmitalic(v) (add_tfmtable(italictab, &numitalic, v, MAXITALICTAB,\ + "Italic correction")) +byte +add_tfmtable(table, count, value, maxv, name) + integer *table, *count, value, maxv; + char *name; +{ + integer i; + for (i = 0; i < *count; i++) /* search for value in tfm table */ + if (table[i] == value) return (byte)i; + if (*count >= maxv) { + fprintf(stderr, "Too many values in %s table!\n", name) ; + jumpout(); + } + if (!fixrange(value)) { + fprintf(stderr, " %s %f for char %d out of range!\n", + name, unfixword(value), car); + jumpout(); + } + table[*count] = value ; + return (*count)++ ; +} + +add_suffix(name, suffix) + char *name, *suffix ; +{ + int haveext = 0; + if (name && strcmp(name, "-")) { + while (*name) { + if (*name == '/') haveext = 0 ; + else if (*name == '.') haveext = 1 ; + name++ ; + } + if (!haveext) { + *name++ = '.'; + strcpy(name,suffix) ; + } + } +} + +initialize() +{ + integer i ; + fprintf(stderr, "This is PBMtoPK, C Version 2.3\n") ; + for (i = 0 ; i <= 31 ; i ++) xchr[i] = '?' ; + xchr[32] = ' ' ; + xchr[33] = '!' ; + xchr[34] = '"' ; + xchr[35] = '#' ; + xchr[36] = '$' ; + xchr[37] = '%' ; + xchr[38] = '&' ; + xchr[39] = '\'' ; + xchr[40] = '(' ; + xchr[41] = ')' ; + xchr[42] = '*' ; + xchr[43] = '+' ; + xchr[44] = ',' ; + xchr[45] = '-' ; + xchr[46] = '.' ; + xchr[47] = '/' ; + xchr[48] = '0' ; + xchr[49] = '1' ; + xchr[50] = '2' ; + xchr[51] = '3' ; + xchr[52] = '4' ; + xchr[53] = '5' ; + xchr[54] = '6' ; + xchr[55] = '7' ; + xchr[56] = '8' ; + xchr[57] = '9' ; + xchr[58] = ':' ; + xchr[59] = ';' ; + xchr[60] = '<' ; + xchr[61] = '=' ; + xchr[62] = '>' ; + xchr[63] = '?' ; + xchr[64] = '@' ; + xchr[65] = 'A' ; + xchr[66] = 'B' ; + xchr[67] = 'C' ; + xchr[68] = 'D' ; + xchr[69] = 'E' ; + xchr[70] = 'F' ; + xchr[71] = 'G' ; + xchr[72] = 'H' ; + xchr[73] = 'I' ; + xchr[74] = 'J' ; + xchr[75] = 'K' ; + xchr[76] = 'L' ; + xchr[77] = 'M' ; + xchr[78] = 'N' ; + xchr[79] = 'O' ; + xchr[80] = 'P' ; + xchr[81] = 'Q' ; + xchr[82] = 'R' ; + xchr[83] = 'S' ; + xchr[84] = 'T' ; + xchr[85] = 'U' ; + xchr[86] = 'V' ; + xchr[87] = 'W' ; + xchr[88] = 'X' ; + xchr[89] = 'Y' ; + xchr[90] = 'Z' ; + xchr[91] = '[' ; + xchr[92] = '\\' ; + xchr[93] = ']' ; + xchr[94] = '^' ; + xchr[95] = '_' ; + xchr[96] = '`' ; + xchr[97] = 'a' ; + xchr[98] = 'b' ; + xchr[99] = 'c' ; + xchr[100] = 'd' ; + xchr[101] = 'e' ; + xchr[102] = 'f' ; + xchr[103] = 'g' ; + xchr[104] = 'h' ; + xchr[105] = 'i' ; + xchr[106] = 'j' ; + xchr[107] = 'k' ; + xchr[108] = 'l' ; + xchr[109] = 'm' ; + xchr[110] = 'n' ; + xchr[111] = 'o' ; + xchr[112] = 'p' ; + xchr[113] = 'q' ; + xchr[114] = 'r' ; + xchr[115] = 's' ; + xchr[116] = 't' ; + xchr[117] = 'u' ; + xchr[118] = 'v' ; + xchr[119] = 'w' ; + xchr[120] = 'x' ; + xchr[121] = 'y' ; + xchr[122] = 'z' ; + xchr[123] = '{' ; + xchr[124] = '|' ; + xchr[125] = '}' ; + xchr[126] = '~' ; + for (i = 127 ; i <= 255 ; i ++) xchr[i] = '?' ; + for (i = 0 ; i <= 127 ; i ++) xord[chr(i)] = 32 ; + for (i = 32 ; i <= 126 ; i ++) xord[xchr[i]] = i ; + for (i = 0 ; i < 32 ; i++) power[i] = 1 << i ; + for (i = 0; i < MAXPKCHAR; i++) { + filename[i] = NULL; + charflags[i] = 0; + } + pkloc = 0 ; + designsize = fixword(1.0) ; + numparam = 0; + widthtab[0] = heighttab[0] = depthtab[0] = italictab[0] = 0 ; + numwidth = numheight = numdepth = numitalic = 1; + smallestch = MAXPKCHAR ; + largestch = -1 ; + emwidth = 0 ; +} + +jumpout() +{ + exit(1) ; +} + +pkbyte(b) + integer b ; +{ + if (b < 0) b = b + 256 ; + putc(b, pkfile) ; + pkloc++ ; +} + +pkhalfword(a) + integer a ; +{ + if (a < 0) a = a + 65536 ; + pkbyte(a >> 8) ; + pkbyte(a & 255) ; +} + +pkthreebytes(a) + integer a ; +{ + pkbyte((a>>16) & 255) ; + pkbyte((a>>8) & 255) ; + pkbyte(a & 255) ; +} + +pkword(a) + integer a ; +{ + pkbyte((a>>24) & 255) ; + pkbyte((a>>16) & 255) ; + pkbyte((a>>8) & 255) ; + pkbyte(a & 255) ; +} + +pknyb(a) + integer a ; +{ + if (bitweight == 16) { + outputbyte = (a<<4) ; + bitweight = 1 ; + } else { + pkbyte(outputbyte + a) ; + bitweight = 16 ; + } +} + +writepreamble() +{ + integer i ; + char *comment = "PBMtoPK 2.3 output" ; + + pkbyte(247) ; + pkbyte(89) ; + pkbyte(strlen(comment)) ; + for (i = 0 ; i < strlen(comment); i++) pkbyte(xord[comment[i]]) ; + pkword(designsize) ; + pkword(checksum) ; /* checksum; calculate if possible */ + pkword(hppp) ; + pkword(hppp) ; +} + +writepostamble() +{ + pkbyte(245) ; + while ((pkloc % 4 != 0)) pkbyte(246) ; + fprintf(stderr, "%d bytes written to packed file.\n", pkloc) ; +} + +tfmbyte(b) + integer b ; +{ + if (b < 0) b = b + 256 ; + putc(b, tfmfile) ; +} + +tfmhalfword(a) + integer a ; +{ + if (a < 0) a = a + 65536 ; + tfmbyte(a >> 8) ; + tfmbyte(a & 255) ; +} + +tfmword(a) + integer a ; +{ + tfmbyte((a>>24) & 255) ; + tfmbyte((a>>16) & 255) ; + tfmbyte((a>>8) & 255) ; + tfmbyte(a & 255) ; +} + +writetfmfile() +{ + integer totallength ; + integer headersize = 17; + integer i ; + + if (largestch - smallestch < 0) { + largestch = 0; + smallestch = 1; + } + if (numparam < 7) /* set default parameters */ + switch (numparam) { + case 0: /* slant */ + parameters[numparam++] = 0 ; + case 1: /* space */ + parameters[numparam++] = fixword(designunits(emwidth/3.0)); + case 2: /* space_stretch */ + parameters[numparam++] = fixword(unfixword(parameters[1])/2.0) ; + case 3: /* space_shrink */ + parameters[numparam++] = fixword(unfixword(parameters[1])/3.0) ; + case 4: /* x_height */ + parameters[numparam++] = fixword(0.45); + case 5: /* quad */ + parameters[numparam++] = fixword(designunits(emwidth)) ; + case 6: /* extra_space */ + parameters[numparam++] = fixword(unfixword(parameters[1])/3.0) ; + } + totallength = 6 + headersize + (largestch+1-smallestch) + + numwidth + numheight + numdepth + numitalic + numparam ; + /* lengths */ + tfmhalfword(totallength) ; + tfmhalfword(headersize) ; + tfmhalfword(smallestch) ; + tfmhalfword(largestch) ; + tfmhalfword(numwidth) ; + tfmhalfword(numheight) ; + tfmhalfword(numdepth) ; + tfmhalfword(numitalic) ; + tfmhalfword(0) ; /* lig/kern table */ + tfmhalfword(0) ; /* kern table */ + tfmhalfword(0) ; /* extensible char table */ + tfmhalfword(numparam) ; + /* header */ + tfmword(checksum) ; + tfmword(designsize) ; + if (strlen(codingscheme) > 39) tfmbyte(39) ; + else tfmbyte(strlen(codingscheme)) ; + for (i = 0; i < 39; i++) + if (*codingscheme) tfmbyte(xord[*codingscheme++]) ; + else tfmbyte(0) ; + if (strlen(familyname) > 19) tfmbyte(19) ; + else tfmbyte(strlen(familyname)) ; + for (i = 0; i < 19; i++) + if (*familyname) tfmbyte(xord[*familyname++]) ; + else tfmbyte(0) ; + /* char_info */ + for (car = smallestch; car <= largestch; car++) + if (filename[car]) { + tfmbyte(tfmindex[car]) ; + tfmbyte((hgtindex[car]<<4) + depindex[car]) ; + tfmbyte(italindex[car]<<2) ; + tfmbyte(0) ; + } else tfmword(0) ; + /* width */ + for (i = 0; i < numwidth; i++) tfmword(widthtab[i]) ; + /* height */ + for (i = 0; i < numheight; i++) tfmword(heighttab[i]) ; + /* depth */ + for (i = 0; i < numdepth; i++) tfmword(depthtab[i]) ; + /* italic */ + for (i = 0; i < numitalic; i++) tfmword(italictab[i]) ; + /* no lig_kern, kern, or exten */ + /* param */ + for (i = 0; i < numparam; i++) + if (i && (!fixrange(parameters[i]))) { + fprintf(stderr, " Parameter %d out of range (-p)!\n", i); + jumpout(); + } + else tfmword(parameters[i]) ; + fprintf(stderr, "%d bytes written to tfm file.\n", totallength*4) ; +} + +readcharacter() +{ + FILE *fp; + + if (!strcmp(filename[car], "-")) fp = stdin; + else if ((fp = fopen(filename[car], "r")) == NULL) { + fprintf(stderr, " Can't open pbm file %s!\n", filename[car]); + jumpout(); + } + bitmap = pbm_readpbm(fp, &width, &height) ; + if (fp != stdin) fclose(fp) ; + + if ((charflags[car] & HORZESC) == 0) horzesc[car] = width ; + if ((charflags[car] & VERTESC) == 0) vertesc[car] = 0; + if ((charflags[car] & XOFFSET) == 0) xoffset[car] = 0; + if ((charflags[car] & YOFFSET) == 0) yoffset[car] = height-1; + if ((charflags[car] & TFMWIDTH) == 0) + tfmindex[car] = add_tfmwidth(fixword(designunits(width))); + if ((charflags[car] & TFMHEIGHT) == 0) + hgtindex[car] = add_tfmheight(fixword(designunits(yoffset[car]+1))); + if ((charflags[car] & TFMDEPTH) == 0) + depindex[car] = add_tfmdepth(fixword(designunits(height-1-yoffset[car]))); + if ((charflags[car] & TFMITALIC) == 0) italindex[car] = 0; + + if (car < smallestch) smallestch = car; + if (car > largestch) largestch = car; + if (width > emwidth) emwidth = width ; +} + +int +equal(row1, row2) + bit *row1, *row2 ; +{ + integer i ; + + for (i = 0; i < width; i++) + if (row1[i] != row2[i]) return (0) ; + return(1) ; +} + +shipcharacter() +{ + integer compsize ; + integer i, j, k ; + bit *zerorow, *onesrow ; + integer *repeatptr, *bitcounts ; + integer count ; + integer test ; + integer curptr, rowptr ; + integer bitval ; + integer repeatflag ; + integer colptr ; + integer currepeat ; + integer dynf ; + integer deriv[14] ; + integer bcompsize ; + boolean firston ; + integer flagbyte ; + boolean state ; + boolean on ; + integer hbit ; + integer pbit ; + boolean ron, son ; + integer rcount, scount ; + integer ri, si ; + integer max2 ; + integer predpkloc ; + integer buff ; + + integer tfwid = widthtab[tfmindex[car]] ; + integer hesc = horzesc[car] ; + integer vesc = vertesc[car] ; + integer xoff = xoffset[car] ; + integer yoff = yoffset[car] ; + + zerorow = pbm_allocrow(width) ; + onesrow = pbm_allocrow(width) ; + repeatptr = + (integer *)malloc((unsigned int)((height+1)*sizeof(integer))) ; + bitcounts = + (integer *)malloc((unsigned int)((height*width)*sizeof(integer))) ; + if (repeatptr == NULL || bitcounts == NULL) { + fprintf(stderr, " Out of memory while allocating bit counts!\n"); + jumpout() ; + } + for (i = 0 ; i < width ; i++) { + zerorow[i] = PBM_WHITE ; + onesrow[i] = PBM_BLACK ; + } + for (i=0; i < height; i++) { + if (equal(bitmap[i], zerorow)) + repeatptr[i] = 0 ; + else if (equal(bitmap[i], onesrow)) + repeatptr[i] = 0 ; + else if (i + 1 < height && equal(bitmap[i],bitmap[i+1])) + repeatptr[i] = 1 ; + else + repeatptr[i] = 0 ; + } + i = 0 ; + while (i < height) { + k = i ; + while (repeatptr[k] == 1) k++ ; + repeatptr[i] = k - i ; + i = k + 1 ; + } + repeatptr[i] = 0 ; + colptr = width - 1 ; + repeatflag = currepeat = curptr = count = rowptr = 0 ; + test = PBM_WHITE ; + do { + colptr++ ; + if (colptr == width) { + colptr = 0 ; + rowptr = currepeat ; + if (repeatptr[currepeat] > 0) { + repeatflag = repeatptr[currepeat] ; + currepeat += repeatflag ; + rowptr += repeatflag ; + } + currepeat++ ; + } + if (rowptr >= height) bitval = -1 ; + else bitval = bitmap[rowptr][colptr] ; + if (bitval == test) count++ ; + else { + bitcounts[curptr++] = count ; + if (curptr+3 >= height*width) { + fprintf(stderr, " Out of memory while saving character counts!\n"); + jumpout() ; + } + count = 1 ; + test = bitval ; + if (repeatflag > 0) { + bitcounts[curptr++] = -repeatflag ; + repeatflag = 0 ; + } + } + } while (test != -1) ; + bitcounts[curptr] = 0 ; + bitcounts[curptr + 1] = 0 ; + for (i = 1 ; i <= 13 ; i ++) deriv[i] = 0 ; + i = firston = (bitcounts[0] == 0) ; + compsize = 0 ; + while (bitcounts[i] != 0) { + j = bitcounts[i] ; + if (j == -1) compsize++ ; + else { + if (j < 0) { + compsize++ ; + j = -j ; + } + if (j < 209) compsize += 2 ; + else { + k = j - 193 ; + while (k >= 16) { + k >>= 4 ; + compsize += 2 ; + } + compsize++ ; + } + if (j < 14) (deriv[j])-- ; + else if (j < 209) (deriv[(223 - j) / 15])++ ; + else { + k = 16 ; + while (((k<<4) < j + 3)) k <<= 4 ; + if (j - k <= 192) + deriv[(207 - j + k) / 15] += 2 ; + } + } + i++ ; + } + bcompsize = compsize ; + dynf = 0 ; + for (i = 1 ; i <= 13 ; i ++) { + compsize += deriv[i] ; + if (compsize <= bcompsize) { + bcompsize = compsize ; + dynf = i ; + } + } + compsize = ((bcompsize + 1)>>1) ; + if ((compsize > ((height*width+7)>>3)) || (height*width == 0)) { + compsize = ((height*width+7)>>3) ; + dynf = 14 ; + } + flagbyte = (dynf<<4) ; + if (firston) flagbyte |= 8 ; + if ((tfwid > 16777215) || (tfwid < 0) || (hesc < 0) || (vesc != 0) || + (compsize > 196579) || (width > 65535) || (height > 65535) || + (xoff > 32767) || (yoff > 32767) || (xoff < -32768) || (yoff < -32768)) { + flagbyte |= 7 ; + pkbyte(flagbyte) ; + compsize += 28 ; + pkword(compsize) ; + pkword(car) ; + predpkloc = pkloc + compsize ; + pkword(tfwid) ; + pkword(hesc<<16) ; + pkword(vesc<<16) ; + pkword(width) ; + pkword(height) ; + pkword(xoff) ; + pkword(yoff) ; + } else if ((hesc > 255) || (width > 255) || (height > 255) || + (xoff > 127) || (yoff > 127) || (xoff < -128) || + (yoff < -128) || (compsize > 1016)) { + compsize += 13 ; + flagbyte += (compsize>>16) + 4 ; + pkbyte(flagbyte) ; + pkhalfword(compsize & 65535) ; + pkbyte(car) ; + predpkloc = pkloc + compsize ; + pkthreebytes(tfwid) ; + pkhalfword(hesc) ; + pkhalfword(width) ; + pkhalfword(height) ; + pkhalfword(xoff) ; + pkhalfword(yoff) ; + } else { + compsize += 8 ; + flagbyte = flagbyte + (compsize>>8) ; + pkbyte(flagbyte) ; + pkbyte(compsize & 255) ; + pkbyte(car) ; + predpkloc = pkloc + compsize ; + pkthreebytes(tfwid) ; + pkbyte(hesc) ; + pkbyte(width) ; + pkbyte(height) ; + pkbyte(xoff) ; + pkbyte(yoff) ; + } + if (dynf != 14) { + bitweight = 16 ; + max2 = 208 - 15 * dynf ; + i = firston ; + while (bitcounts[i] != 0) { + j = bitcounts[i] ; + if (j == - 1) pknyb(15) ; + else { + if (j < 0) { + pknyb(14) ; + j = -j ; + } + if (j <= dynf) pknyb(j) ; + else if (j <= max2) { + j -= dynf + 1 ; + pknyb((j >> 4) + dynf + 1) ; + pknyb((j & 15)) ; + } else { + j -= max2 - 15 ; + k = 16 ; + while (k <= j) { + k <<= 4 ; + pknyb(0) ; + } + while (k > 1) { + k >>= 4 ; + pknyb(j / k) ; + j = j % k ; + } + } + } + i++ ; + } + if (bitweight != 16) pkbyte(outputbyte) ; + } else { + buff = 0 ; + pbit = 8 ; + i = firston ; + hbit = width ; + on = ! firston ; + state = false ; + count = repeatflag = 0 ; + while ((bitcounts[i] != 0) || state || (count > 0)) { + if (state) { + count = rcount ; + i = ri ; + on = ron ; + repeatflag-- ; + } else { + rcount = count ; + ri = i ; + ron = on ; + } + do { + if (count == 0) { + if (bitcounts[i] < 0) { + if (! state) repeatflag = -bitcounts[i] ; + i++ ; + } + count = bitcounts[i] ; + i++ ; + on = !on ; + } + if ((count >= pbit) && (pbit < hbit)) { + if (on) buff += power[pbit] - 1 ; + pkbyte(buff) ; + buff = 0 ; + hbit -= pbit ; + count -= pbit ; + pbit = 8 ; + } else if ((count < pbit) && (count < hbit)) { + if (on) buff += power[pbit] - power[pbit - count] ; + pbit -= count ; + hbit -= count ; + count = 0 ; + } else { + if (on) buff += power[pbit] - power[pbit - hbit] ; + count -= hbit ; + pbit -= hbit ; + hbit = width ; + if (pbit == 0) { + pkbyte(buff) ; + buff = 0 ; + pbit = 8 ; + } + } + } while (hbit != width) ; + if (state && (repeatflag == 0)) { + count = scount ; + i = si ; + on = son ; + state = false ; + } else if (! state && (repeatflag > 0)) { + scount = count ; + si = i ; + son = on ; + state = true ; + } + } + if (pbit != 8) pkbyte(buff) ; + } + if (predpkloc != pkloc) { + fprintf(stderr, " Bad predicted character length: character %d!\n", car); + jumpout() ; + } + pbm_freerow(zerorow); + pbm_freerow(onesrow); + free((char *)repeatptr); + free((char *)bitcounts); +} + +usage() +{ + fprintf(stderr, " Usage: pbmtopk pkfile[.pk] tfmfile[.tfm] dpi\n") ; + fprintf(stderr, " [-s designsize] [-p num param...]\n"); + fprintf(stderr, " [-C codingscheme ] [-F family]\n"); + fprintf(stderr, " [-c num | ]...\n"); + fprintf(stderr, " is: [-W tfmwidth] [-H tfmheight] [-D tfmdepth]\n"); + fprintf(stderr, " [-I ital_corr] [-h horiz] [-v vert]\n") ; + fprintf(stderr, " [-x xoffset] [-y yoffset] file\n") ; + fprintf(stderr, " or: -f optfile\n") ; + jumpout() ; +} + +checkchar() +{ + if (car < 0 || car >= MAXPKCHAR) { + fprintf(stderr, " Character must be in range 0 to %d (-c)!\n", + MAXPKCHAR-1) ; + jumpout() ; + } +} + +optionfile(name) + char *name ; +{ + FILE *fp ; + char buffer[MAXOPTLINE] ; + + if (!strcmp(name, "-")) fp = stdin ; + else if ((fp = fopen(name, "r")) == NULL) { + fprintf(stderr, " Can't open option file %s!\n", name) ; + jumpout() ; + } + while (!feof(fp)) { + char *here = buffer; + + if (fgets(buffer, MAXOPTLINE, fp) == NULL) break ; + while (isspace(*here)) here++ ; + if (*here && *here == '=') { + if (sscanf(here+1, "%d", &car) != 1) { + fprintf(stderr, "Bad option file line %s!\n", buffer) ; + jumpout() ; + } + } else if (*here && *here != '%' && *here != '#') { + char str[NAMELENGTH] ; + integer i, n; + + checkchar() ; + if (sscanf(here, "%s%n", str, &n) != 1) { + fprintf(stderr, "Bad option file line %s!\n", buffer) ; + jumpout() ; + } + filename[car] = + (char *)malloc((unsigned int)(sizeof(char)*(strlen(str)+1))) ; + strcpy(filename[car], str) ; + for (i = 1; i < 256; i<<=1) { + here += n; + if (sscanf(here, "%s%n", str, &n) != 1) break ; + if (strcmp(str, "*")) { + charflags[car] |= i ; + switch (i) { + case XOFFSET: + xoffset[car] = atoi(str) ; + break ; + case YOFFSET: + yoffset[car] = atoi(str) ; + break ; + case HORZESC: + horzesc[car] = atoi(str) ; + break ; + case VERTESC: + vertesc[car] = atoi(str) ; + break ; + case TFMWIDTH: + tfmindex[car] = add_tfmwidth(fixword(atof(str))) ; + break ; + case TFMHEIGHT: + hgtindex[car] = add_tfmheight(fixword(atof(str))) ; + break ; + case TFMDEPTH: + depindex[car] = add_tfmdepth(fixword(atof(str))) ; + break ; + case TFMITALIC: + italindex[car] = add_tfmitalic(fixword(atof(str))) ; + break ; + } + } + } + car++ ; + } + } + if (fp != stdin) fclose(fp) ; +} + +dialog(gargc, gargv) + int gargc ; + char **gargv ; +{ + integer i, hesc, vesc, xoff, yoff, tfwid, tfdep, tfhgt, tfital ; + byte flags ; + + if (--gargc < 1) usage() ; + strcpy(pkname, *++gargv) ; + add_suffix(pkname, "pk") ; + + if (--gargc < 1) usage() ; + strcpy(tfmname, *++gargv) ; + add_suffix(tfmname, "tfm") ; + + if (--gargc < 1) usage() ; + resolution = atoi(*++gargv) ; + if (resolution < 1 || resolution > 32767) { + fprintf(stderr, " Unlikely resolution %d dpi!\n", resolution); + jumpout(); + } + + car = flags = hesc = vesc = xoff = yoff = tfwid = 0; + while (++gargv, --gargc) { + if (gargv[0][0] == '-' && gargv[0][1]) { + char c, *p; + c = gargv[0][1] ; + if (gargv[0][2]) p = *gargv + 2 ; + else if (++gargv, --gargc) p = *gargv ; + else usage() ; + switch (c) { + case 'C': + codingscheme = p; + break ; + case 'F': + familyname = p; + break ; + case 'c': + car = atoi(p) ; + break ; + case 's': + designsize = fixword(atof(p)); + if (designsize < 1048576) { + fprintf(stderr, " Design size %f out of range!\n", + unfixword(designsize)); + jumpout() ; + } + case 'h': + hesc = atoi(p) ; + flags |= HORZESC ; + break ; + case 'v': + vesc = atoi(p) ; + flags |= VERTESC ; + break ; + case 'x': + xoff = atoi(p) ; + flags |= XOFFSET ; + break ; + case 'y': + yoff = atoi(p) ; + flags |= YOFFSET ; + break ; + case 'W': + tfwid = fixword(atof(p)) ; + flags |= TFMWIDTH ; + break ; + case 'H': + tfhgt = fixword(atof(p)) ; + flags |= TFMHEIGHT ; + break ; + case 'D': + tfdep = fixword(atof(p)) ; + flags |= TFMDEPTH ; + break ; + case 'I': + tfital = fixword(atof(p)) ; + flags |= TFMITALIC ; + break ; + case 'f': + optionfile(p) ; + break ; + case 'p': + numparam = atoi(p); + if (numparam < 1 || numparam > 30) { + fprintf(stderr, " Parameter count %d out of range!\n", numparam); + jumpout(); + } + for (i=0; i. diff --git a/graphics/pbmtopk/pbmtopk/pktopbm.c b/graphics/pbmtopk/pbmtopk/pktopbm.c new file mode 100644 index 0000000000..d511a768c2 --- /dev/null +++ b/graphics/pbmtopk/pbmtopk/pktopbm.c @@ -0,0 +1,381 @@ +/* + pktopbm, adapted from "pktopx in C by Tomas Rokicki" by AJCD 1/8/90 + + compile with: cc -lpbm -o pktopbm pktopbm.c + */ + +#include +#include + +#define NAMELENGTH 80 +#define MAXROWWIDTH 3200 +#define MAXPKCHAR 256 + +#define round(a) ((int)(a+0.5)) + +typedef int integer ; +typedef unsigned char quarterword ; +typedef char boolean ; +typedef quarterword eightbits ; +typedef FILE *bytefile ; + +bytefile pkfile ; +char pkname[NAMELENGTH+1] ; +integer pkloc ; +integer i, j ; +char *filename[MAXPKCHAR] ; +bit **bitmap = NULL ; +integer dynf ; +eightbits inputbyte ; +eightbits bitweight ; +integer repeatcount ; +integer flagbyte ; + +add_suffix(name, suffix) + char *name, *suffix ; +{ + int haveext = 0; + if (name) { + while (*name) { + if (*name == '/') haveext = 0 ; + else if (*name == '.') haveext = 1 ; + name++ ; + } + if (!haveext) { + *name++ = '.'; + strcpy(name,suffix) ; + } + } +} + +initialize() +{ + integer i ; + + fprintf(stderr, "This is PKtoPBM, C Version 2.3\n") ; + for (i = 0 ; i < MAXPKCHAR ; i ++) filename[i] = NULL ; +} + +jumpout() +{ + exit(1) ; +} + +openpkfile() +{ + if ((pkfile = fopen(pkname, "r")) == NULL) { + fprintf(stderr, " Can't open pk file %s!\n", pkname) ; + } + pkloc = 0 ; +} + +eightbits pkbyte() +{ + pkloc++ ; + return(getc(pkfile)) ; +} + +integer get16() +{ + integer a = pkbyte() ; + return((a<<8) + pkbyte()) ; +} + +integer get32() +{ + integer a = get16() ; + if (a > 32767) a -= 65536 ; + return((a<<16) + get16()) ; +} + +integer getnyb() +{ + eightbits temp ; + if (bitweight == 0) { + inputbyte = pkbyte() ; + bitweight = 16 ; + } + temp = inputbyte / bitweight ; + inputbyte -= temp * bitweight ; + bitweight >>= 4 ; + return(temp) ; +} + +boolean getbit() +{ + boolean temp ; + bitweight >>= 1 ; + if (bitweight == 0) { + inputbyte = pkbyte() ; + bitweight = 128 ; + } + temp = (inputbyte >= bitweight) ; + if (temp) inputbyte -= bitweight ; + return(temp) ; +} + +integer pkpackednum() +{ + integer i, j ; + i = getnyb() ; + if (i == 0) { + do { + j = getnyb() ; + i++ ; + } while (!(j != 0)) ; + while (i > 0) { + j = (j<<4) + getnyb() ; + i-- ; + } + return(j - 15 +((13 - dynf)<<4) + dynf) ; + } else if (i <= dynf) return(i) ; + else if (i < 14) return(((i - dynf - 1)<<4) + getnyb() + dynf + 1) ; + else { + if (i == 14) repeatcount = pkpackednum() ; + else repeatcount = 1 ; + return(pkpackednum()) ; + } +} + +skipspecials() +{ + integer i, j, k ; + do { + flagbyte = pkbyte() ; + if (flagbyte >= 240) + switch(flagbyte) { + case 240: + case 241: + case 242: + case 243: + i = 0 ; + for (j = 240 ; j <= flagbyte ; j ++) i = (i<<8) + pkbyte() ; + for (j = 1 ; j <= i ; j ++) k = pkbyte() ; + break ; + case 244: + i = get32() ; + break ; + case 245: + break ; + case 246: + break ; + case 247: + case 248: + case 249: + case 250: + case 251: + case 252: + case 253: + case 254: + case 255: + fprintf(stderr, " Unexpected flag byte %d!\n", flagbyte) ; + jumpout() ; + } + } while (!((flagbyte < 240) || (flagbyte == 245))) ; +} + +usage() +{ + fprintf(stderr, " Usage: pktopbm pkfile[.pk] [[-c num] pbmfile]...\n"); + jumpout() ; +} + +dialog(gargc, gargv) + int gargc ; + char **gargv ; +{ + integer car ; + + if (--gargc < 1) usage() ; + strcpy(pkname, *++gargv) ; + add_suffix(pkname, "pk") ; + car = 0 ; + while (++gargv, --gargc) { + if (gargv[0][0] == '-' && gargv[0][1]) + switch (gargv[0][1]) { + case 'c': + if (gargv[0][2]) car = atoi(*gargv+2) ; + else if (++gargv, --gargc) car = atoi(*gargv) ; + else usage() ; + break ; + default: + usage() ; + } else if (car < 0 || car >= MAXPKCHAR) { + fprintf(stderr, " Character must be in range 0 to %d (-c)!\n", + MAXPKCHAR-1) ; + jumpout() ; + } else filename[car++] = *gargv ; + } +} + +main(argc, argv) + int argc ; + char *argv[] ; +{ + integer endofpacket ; + integer designsize ; + integer checksum ; + integer hppp, vppp ; + integer cheight, cwidth ; + integer horesc ; + integer packetlength ; + integer rowsleft ; + boolean turnon ; + integer hbit ; + integer count ; + integer rp ; + integer i, j, k ; + integer car ; + bit row[MAXROWWIDTH+1] ; + + initialize() ; + dialog(argc, argv) ; + openpkfile() ; + if (pkbyte() != 247) { + fprintf(stderr, " Bad pk file (pre command missing)!\n") ; + jumpout() ; + } + if (pkbyte() != 89) { + fprintf(stderr, " Wrong version of packed file!\n") ; + jumpout() ; + } + j = pkbyte() ; + for (i = 1 ; i <= j ; i ++) k = pkbyte() ; + designsize = get32() ; + checksum = get32() ; + hppp = get32() ; + vppp = get32() ; + if (hppp != vppp) fprintf(stderr, " Warning: aspect ratio not 1:1!\n") ; + skipspecials() ; + while (flagbyte != 245) { + dynf = (flagbyte>>4) ; + flagbyte &= 15 ; + turnon = (flagbyte >= 8) ; + if (turnon) flagbyte &= 7 ; + if (flagbyte == 7) { + packetlength = get32() ; + car = get32() ; + endofpacket = packetlength + pkloc ; + if ((car >= MAXPKCHAR) || (car < 0)) goto lab9997 ; + i = get32() ; /* tfmwidth */ + horesc = get32() ; + i = get32() ; + cwidth = get32() ; + cheight = get32() ; + if ((cwidth < 0) || (cheight < 0) || (cwidth > 65535) || (cheight > 65535)) goto lab9997 ; + i = get32() ; + j = get32() ; + } else if (flagbyte > 3) { + packetlength =((flagbyte - 4)<<16) + get16() ; + car = pkbyte() ; + endofpacket = packetlength + pkloc ; + if (car >= MAXPKCHAR) goto lab9997 ; + i = pkbyte() ; /* tfmwidth */ + i = get16() ; + horesc = get16() ; + cwidth = get16() ; + cheight = get16() ; + i = get16() ; + j = get16() ; + } else { + packetlength = (flagbyte<<8) + pkbyte() ; + car = pkbyte() ; + endofpacket = packetlength + pkloc ; + if (car >= MAXPKCHAR) goto lab9997 ; + i = pkbyte() ; /* tfmwidth */ + i = get16() ; + horesc = pkbyte() ; + cwidth = pkbyte() ; + cheight = pkbyte() ; + i = pkbyte() ; + j = pkbyte() ; + } + if (filename[car]) { + bitmap = pbm_allocarray(cwidth, cheight) ; + if (bitmap == NULL) { + fprintf(stderr, " Out of memory allocating bitmap!\n") ; + jumpout() ; + } + } else goto lab9997 ; + bitweight = 0 ; + if (dynf == 14) { + for (i = 0 ; i < cheight ; i ++) + for (j = 0 ; j < cwidth ; j ++) { + if (getbit()) + bitmap[i][j] = PBM_BLACK ; + else + bitmap[i][j] = PBM_WHITE ; + } + } else { + rowsleft = cheight ; + hbit = cwidth ; + repeatcount = rp =0 ; + while (rowsleft > 0) { + count = pkpackednum() ; + while (count > 0) { + if (count < hbit) { + hbit -= count ; + while (count--) { + if (turnon) + row[rp++] = PBM_BLACK ; + else + row[rp++] = PBM_WHITE ; + } + } else { + count -= hbit ; + while (hbit--) { + if (turnon) + row[rp++] = PBM_BLACK ; + else + row[rp++] = PBM_WHITE ; + } + for (i = 0; i <= repeatcount; i++) + for (j = 0; j < cwidth; j++) + bitmap[i + cheight-rowsleft][j] = row[j] ; + rowsleft -= repeatcount + 1; + repeatcount = rp = 0 ; + hbit = cwidth ; + } + } + turnon = ! turnon ; + } + if ((rowsleft != 0) || (hbit != cwidth)) { + fprintf(stderr, " Bad pk file (more bits than required)!\n") ; + jumpout() ; + } + } + if (endofpacket != pkloc) { + fprintf(stderr, " Bad pk file (bad packet length)!\n") ; + jumpout() ; + } + /* output bitmap to file */ + { + FILE *fp ; + if (!strcmp(filename[car], "-")) + fp = stdout ; + else { + if ((fp = fopen(filename[car], "w")) == NULL) { + fprintf(stderr, " Can't open file %s!\n", filename[car]) ; + jumpout() ; + } + } + filename[car] = NULL; + pbm_writepbm(fp, bitmap, cwidth, cheight, 0) ; + pbm_freearray(bitmap, cheight) ; + if (fp != stdout) (void)fclose(fp) ; + } + goto lab9998 ; + lab9997: while (pkloc != endofpacket) i = pkbyte() ; + if (car < 0 || car >= MAXPKCHAR) + fprintf(stderr, " Character %d out of range!\n", car) ; + lab9998: skipspecials() ; + } + while (! feof(pkfile)) i = pkbyte() ; + pkloc-- ; + for (car = 0; car < MAXPKCHAR; car++) + if (filename[car]) + fprintf(stderr, " Warning: No character in position %d (file %s).\n", + car, filename[car]) ; + fprintf(stderr, "%d bytes read from packed file.\n", pkloc) ; + exit(0); +} diff --git a/graphics/pbmtopk/pbmtopk/sign.pbm b/graphics/pbmtopk/pbmtopk/sign.pbm new file mode 100644 index 0000000000..3a8717968c --- /dev/null +++ b/graphics/pbmtopk/pbmtopk/sign.pbm @@ -0,0 +1,302 @@ +P1 +150 100 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000000000000001111110000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000000000000111111111000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000000000011110000011100000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000000001111000000000110000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000000011100000000000011000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000000011000000000000001100000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000000110000000000000001100000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000001100000000000000000110000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000011000000000000000000110000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000011000000000000000000110000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000110000000000000000000011000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000110000000000000000000011000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000001100000000000000000000011000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000001100000000000000000000001100000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000011000000000000000000000001100000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000011000000000000000000000001100000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000110000000000000000000000001100000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000110000000000000000000000001100000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000 +0000000000001100000000000000000000000011000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000 +0000000000001100000000000000000000000011000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000 +0000000000001100000000000000000000000011000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000 +0000000000011000000000000000000000000011000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000 +0000000000011000000000000000000000000011000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000 +0000000000011000000000000000000000000011000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000 +0000000000110000000000000000000000000011000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000 +0000000000110000000000000000000000000011000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000 +0000000001100000000000000000000000000110000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000 +0000000001100000000000000000000000000110000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000 +0000000001100000000000000000000000000110000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000 +0000000011000000000000000000000000000110011000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000 +0000000011000000000000000000000000000110011000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000 +0000000011000000000000000000000000001100110000011000000111111100000000 +0000000111100000000000000000000000000000000000000000000000000000000000 +0000000000 +0000000011000000000000000000000000001100110000011000011111111110000000 +0000011111111000000000000000000000000000000000000000011110000000000000 +0000000000 +0000000011000000000000000000000000001101110000011000111100000111000000 +0001110000011100000000000000000011000000000000000001111111000000000000 +0000000000 +0000000110000000000000000000000000011001100000111001110000000011100000 +0011100000001100000000000000000111100000000000000001100001000000000000 +0000000000 +0000000110000000000000000000000000011011100001101011000000000001110000 +0011000000000110000100000000001101100000000000000011000011000000000000 +0000000000 +0000000110000000000000000000000000011111100001101011000000000000110000 +0110000000000110000100000000001101100000000000000011000110000000000000 +0000000000 +0000000110000000000000000000000000000111000011001110000000000000110000 +0100000000000010001100000000011001100000000000000011111100000000000000 +0000000000 +0000000110000000000000000000000000001111000011001100000000000000110000 +1100000000000011001100000000011001100000000000000000111111000000000000 +0000000000 +0000000110000000000000000000000000001111000010001100000000000000110000 +1000000000000011001100000000111011000000000000000001110011110000000000 +0000000000 +0000000110000000000000000000000000011110000110011100000000000000110001 +1000000000000011001100000000110011000000000000000001100000111000000000 +0000000000 +0000000110000000000000000000000000110110000110011000000000000001100001 +1000000000000011011100000000110011000000000000000011000000001110000000 +0000000000 +0000000110000000000000000000000001101100000100011000000000000001100001 +1000000000000011011100000000110110000000000000000110000000000111000000 +0000000000 +0000000110000000000000000000000001101100001100111000000000000001100001 +1000000000000001011100000000111110000000000000001100000000000011000000 +0000000000 +0000000110000000000000000000000011001100001000111000000000000001100001 +1000000000000000111100000000111100000000000000011000000000000001100000 +0000000000 +0000000110000000000000000000000011001000011000110000000000000011000001 +1000000000000000111100000000111000000000000000110000000000000001100000 +0000000000 +0000000110000000000000000000000110011000011000110000000000000011000001 +1000000000000000101100000000110000000000000001100000000000000000110000 +0000000000 +0000000110000000000000000000001100011000011000110000000000000011000001 +1000000000000000101100000001110000000000000111000000000000000000110000 +0000000000 +0000000111000000000000000000011100111000110001110000000000000011000001 +1000000000000001001100000001111000000000011110001000000000000000110000 +0000000000 +0000000011000000000000000000111000111000100001100000000000000011000001 +1000000000000011001100000011011000000001111000001100000000000000110000 +0000000000 +0000000011000000000000000001110000011011000001100000000000000011000001 +1100000000000010001100000110011100001111100000000110000000000000110000 +0000000000 +0000000001100000000000000111100000011111000001100000000000000011000100 +1100000000000110001100001100001111111110000000000111000000000001100000 +0000000000 +0000000001110000000000001110000000001100000011100000000000000001001100 +0111000000001100001100011000000111110000000000000011100000000011100000 +0000000000 +0000000000111100000001111100000000000000000011100000000000000001111000 +0011100000111000011000110000000000000000000000000001111000000111000000 +0000000000 +0000000000001111111111100000000000000000000011100000000000000001110000 +0001111111110000011001100000000000000000000000000000011111111110000000 +0000000000 +0000000000000011111110000000000000000000000000000000000000000000000000 +0000011111000000011011000000000000000000000000000000000111111100000000 +0000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000011110000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000011100000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000111000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000001111000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000011011000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000110011000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000001100011000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000011000011000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000001110000011000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000011100000011000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000111000000011000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000011110000000011000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000011000000000111000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0001110000000000110000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0001100000000000110000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0011100000000000110000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0111000000000000110000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0110000000000000110000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +1100000000000000110000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +1100000000000000110000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000000000000000000000000000000000000000000000000000000001 +1000000000000001100000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000000000000000000000000000000000000000000000000000000001 +1000000000000001100000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000000000000000000000000000000000000000000000000000000011 +0000000000000001100000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000000000000000000000000000000000000000000000000000000011 +0000000000000011000000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000000000000000000000000000000000000000000000000000000011 +0000000000000011000000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000000000000000000000000000000000000000000000000000000011 +0000000000000011000000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000000000000000000000000000000000000000000000000000000011 +0000000000000110000000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000000000000000000000000000000000000000000000000000000011 +0000000000000110000000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000000000000000000000000000000000000000000000000000000011 +0000000000000110000000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000000000000000000000000000000000000000000000000000000011 +0000000000001100000000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000000000000000000000000000000000000000000000000000000011 +0000000000001100000000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000000000000000000000000000000000000000000000000000000011 +0000000000011000000000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000000000000000000000000000000000000000000000000000000001 +0000000000011000000000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000000000000000000000000000000000000000000000000000000001 +1000000000110000000000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +1110000001100000000000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0111100111000000000000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0001111110000000000000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000011000000000000000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000 +0000000000 diff --git a/graphics/pbmtopk/pbmtopk/test.opt b/graphics/pbmtopk/pbmtopk/test.opt new file mode 100644 index 0000000000..ce9828eea0 --- /dev/null +++ b/graphics/pbmtopk/pbmtopk/test.opt @@ -0,0 +1,8 @@ +% pbmtopk option file for the 'test font. +% invoke with: pbmtopk test.300pk test.tfm 300 -s 10 -f test.opt +% reset character number to 65 ('A') += 65 +% character 'A': small 64x64 version of my face. +face.pbm +% character 'B': my name. +sign.pbm * 57 diff --git a/graphics/pbmtopk/pbmtopk/test.tex b/graphics/pbmtopk/pbmtopk/test.tex new file mode 100644 index 0000000000..40cbd3b2f0 --- /dev/null +++ b/graphics/pbmtopk/pbmtopk/test.tex @@ -0,0 +1,11 @@ +% test.tex +% test file for simple font produced by pbmtopk. +% AJCD 9 Aug 90 + +\font\test=test + +This is a test of the font produced with pbmtopk; character A is {\test A}, +and character B is {\test B}. + +\vfil\eject +\bye -- cgit v1.2.3