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