%!PS-Adobe-2.0 % Title: PostScript banner-maker % Creator: Sean M. Burke sburke@cpan.org http://interglacial.com/ % Date: 2004-09-19 %%% desc{a PostScript banner-maker} /BannerMessage (Happy Birthday Årlog-Shaniqwéh!) % <-- Banner message here % Potentially including these Latin-1 characters: % ¡¢£¤¥¦§¨©ª«¬ ®¯ °±²³´µ¶·¸¹º»¼½¾¿ % ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏ ÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞß % àáâãäåæçèéêëìíîï ðñòóôõö÷øùúûüýþÿ def /BannerFont /ZapfChancery-MediumItalic % <-- What font to use % or: /ZapfChancery-MediumItalic /Helvetica % /Times-Roman /Times-Italic /Helvetica-BoldOblique def /Gray 0.5 def % How dark to make it. 0.0 = black, 1.0 = white /OverLap { .5 inch } def % How much overlap to have between each page. % End of configurables % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% gsave /inch {72 mul} def % Convert inches->points (1/72 inch) /in {inch} def % Convert inches->points (1/72 inch) % Figure out the printable page size... gsave initclip clippath pathbbox grestore % eg: 0.0 0.0 612.0 792.0 /urY exch def /urX exch def /llY exch def /llX exch def urX llX sub dup /PagePortraitWidth exch def /PageLandscapeHeight exch def urY llY sub dup /PagePortraitHeight exch def /PageLandscapeWidth exch def /Latin1ize { % Thanks to Gisle Aas for this findfont begin currentdict dup length dict begin { 1 index /FID ne {def} {pop pop} ifelse } forall /FontName exch def /Encoding exch def currentdict dup end end /FontName get exch definefont pop } bind def /HugeFont ISOLatin1Encoding /LatinateFont BannerFont Latin1ize /LatinateFont findfont PageLandscapeHeight scalefont def /UseBigFont { HugeFont setfont } def UseBigFont /MessageWidth BannerMessage stringwidth pop def currentfont /FontBBox get 0 get /FontBBDescent exch def %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % The main loop: 0 PageLandscapeWidth OverLap sub MessageWidth { /SoFar exch def gsave Gray setgray llX urY SoFar add translate -90 rotate % Switch to landscape orientation UseBigFont 0 FontBBDescent neg moveto % make room for any descenders BannerMessage show showpage grestore } for %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% grestore %% End %%