billk@elric.UUCP (William A. Karns) (03/18/88)
Greetings, PostScribes! I'm trying to do something, and I need some help. What I'm trying to do is this: Produce a PostScript representation of a display screen, complete with some video effects such as reverse video (I don't need blinking :-) This is my current approach to producing reverse video: Given an arbitrary string and an arbitrary current font, define a box which *just* surrounds the string, horizontally and vertically. With a setgray value of black, fill the box and then show the string with setgray of white. My current problem is establishing a containing box for the Courier font, which is monospaced. I've tried the prescribed "charpath flattenpath pathbbox" sequence from the redbook, and it produces moderately aesthetic results. Unfortunately, the box varies vertically and if two such boxes are placed on the same line, odds are that their upper and lower vertical bounds don't match up, thus leaving unsightly copy. What I'd like is a PostScript sequence that will define "circumscribing" vertical bounds for a *font*, but that will allow the box to stretch horizon- tally to accommodate arbitrarily long strings (confined to the width of the page. Excuse the verbosity of this request: my disclaimer is that I'm used to the world of Mil-Stds (compress the least amount of ideas into the most amount of words. -- MT)