Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!cs.utexas.edu!execu!sequoia!rpp386!woody From: woody@rpp386.cactus.org (Woodrow Baker) Newsgroups: comp.lang.postscript Subject: Re: PostScript utility for font changes, subscripts within string Summary: font changes Message-ID: <17479@rpp386.cactus.org> Date: 21 Dec 89 22:35:31 GMT References: <12294@phoenix.Princeton.EDU> <7026@shlump.nac.dec.com> Distribution: na Organization: River Parishes Programming, Plano, TX Lines: 21 The way to accomplish what you asked for (embedded control characters) in your text string, is to parse the textstring line at a time, looking for characters. Don Lancaster has a thing he calls "gonzo justify" that does exactly that. Basically, you do a read of the currentfile, and convert the integer to a string character. The you test the string character to see if a procedure by that name is known. You can then load teh procedure and execute it, else you image the character. There was an emulator pshed by adobe at one time that was a simple diablo emulator. It worked this way. Basically, you had a dctionary called ESC (defined by the number 27. The dictionary then had procedures, each of which had an integer for the name, and each integer had an entry or procedure. each procedure in the escape dictionary was named for a letter, i.e. for say T where t was say goto bold, you would have an entry in the ESC dictionary with a name of 84 (the decimal code for T or so I think), and a prcdr that did what was needed to go to bold. Cheers Woody p.s. Sorry for the misspellings, I still haven't masterd VI, so I can't go change them..