%! Here's a little PostScript hack I committed last night, aided and abetted by % Jeff Moore. It isn't terribly pretty, and there's probably better ways of % doing this, but *I* don't have any of the better ways --- please send them % my way :-). % This is a little patch of PostScript. It's pretty revolting in its own % special way, but by whacking on the command at the bottom you can use it to % make a sampler page for a PostScript font. I wanted to get a good look at % the Utopia from the X11R5 package --- this did the job. % -Bennett % bet@sbi.com %! % This one tries to dump every printable character in the font. % Configurable parameters /Excess 1.05 def % Skip 5% more than bare font dimensions /Pointsize 40 def % Try a 40-point font /LeftMargin 20 def % Left margin here /font_size { % Font -- width height begin % Font -- /FontBBox load aload pop % -- ll_x ll_y ur_x ur_y /FontMatrix load dup % ll_x ll_y ur_x ur_y -- ll_x ll_y ur_x ur_y Matrix Matrix end 4 -2 roll % ll_x ll_y ur_x ur_y Matrix Matrix -- ll_x ll_y Matrix Matrix ur_x ur_y 3 -1 roll % ll_x ll_y Matrix Matrix ur_x ur_y -- ll_x ll_y Matrix ur_x ur_y Matrix transform % ll_x ll_y Matrix ur_x ur_y Matrix -- ll_x ll_y Matrix xformed_ur_x xformed_ur_y 5 -3 roll % ll_x ll_y Matrix xformed_ur_x xformed_ur_y -- ur_x ur_y Matrix ll_x ll_y Matrix transform % xformed_ur_x xformed_ur_y xformed_ll_x xformed_ll_y 4 -1 roll 3 -1 roll sub % xformed_ur_y xformed_ll_y width 3 1 roll sub % width height } def /page_size { % -- width height gsave initclip clippath pathbbox grestore % -- ll_x ll_y ur_x ur_y % If ll_x and ll_r aren't zero, buy a different printer. 4 -2 roll pop pop % ll_x ll_y ur_x ur_y -- ur_x ur_y } def /nl { % -- currentpoint exch pop Font_height sub LeftMargin exch moveto } def /Buf 64 string def /Char 1 string def /do_char { % ch_num -- Char 0 3 -1 roll put Char show currentpoint pop Margin ge { nl } if } def /do_font { % font -- page_size /Page_height exch def /Page_width exch def dup Buf cvs % font -- font (fontname) /Times-Roman findfont 20 scalefont dup setfont % font (fontname) -- font (fontname) Times font_size Excess mul /Font_height exch def Excess mul /Font_width exch def % font (fontname) Times -- font (fontname) 0 Page_height moveto nl % font (fontname) -- font (fontname) show % font (fontname) -- font dup findfont Pointsize scalefont dup font_size % /font -- /font font width height Excess mul /Font_height exch def Excess mul /Font_width exch def % /font font width height -- /font font nl /Margin Page_width Font_width div truncate 1 sub Font_width mul def % /font font -- /font font /Count 0 def setfont findfont begin /Encoding load end { /.notdef ne { Count do_char } if /Count Count 1 add def } forall } def /Bookman-Light do_font showpage .