"/logoFont {\n" "/Helvetica findfont\n" "10 scalefont\n" "setfont\n" "} def\n" "\n" "\n" "/textBounds {\n" "% Figure out bounding box of string in current font. Usage:\n" "% call: text letterSize \n" "% sets: tbX1 tbY1 tbX2 tbY2 tbW tbH\n" "% The bounds are relative to the current position\n" "gsave\n" "newpath\n" "0 0 moveto\n" "true charpath\n" "flattenpath\n" "pathbbox\n" "grestore\n" "/tbY2 exch def\n" "/tbX2 exch def\n" "/tbY1 exch def\n" "/tbX1 exch def\n" "/tbW tbX2 tbX1 sub def\n" "/tbH tbY2 tbY1 sub def\n" "} def\n" "\n" "/textInBox {\n" "% Draw text so that it fits inside of box. Usage:\n" "% x1 y1 x2 y2 text textInBox\n" "\n" "% Copy parameters from variables to stack and save context\n" "/tibText exch def\n" "/tibY2 exch def\n" "/tibX2 exch def\n" "/tibY1 exch def\n" "/tibX1 exch def\n" "gsave\n" "\n" "% move to x1/y1 adjusted for text offset\n" "tibText textBounds\n" "tibX1 tbX1 sub tibY1 tbY1 sub moveto\n" "\n" "% Set scaling\n" "/tibW tibX2 tibX1 sub def\n" "/tibH tibY2 tibY1 sub def\n" "tibW tbW div tibH tbH div scale\n" "\n" "% draw and return\n" "tibText show\n" "grestore\n" "} def\n" "\n" "/aColor { 0 0.7 0 setrgbcolor } def\n" "/cColor { 0 0.5 0.7 setrgbcolor } def\n" "/gColor { 0.8 0.4 0 setrgbcolor } def\n" "/tColor { 0.9 0 0 setrgbcolor } def\n" "\n" "logoFont\n" "\n" "\n"