pjb@tcom.stc.co.uk (Peter J. Bishop) (09/22/88)
I am trying to write a program (in C - or postscript if its possible) that will take the input, and produce the necessary PostScript code to write justified text (similar to troff). My questions are: a) Has anyone done this, and if so how? b) If not, does anyone know where I could start looking to find out the character widths for each font. As always, thanks in advance, -------------------------------------------------------------------------------- Peter Bishop. <pjb@tcom.stc.co.uk> || ...!mcvax!ukc!stc!pjb STC TNDD, Harlow Technical Centre, 20-22 Edinburgh Way, Harlow ESSEX CM20 2DE Phone : +44 279 626626 x2795
pvo1478@neptune.uucp (Paul O'Neill) (09/24/88)
In article <647@jura.tcom.stc.co.uk> pjb@tcom.stc.co.uk (Peter J. Bishop) writes: >I am trying to write a program (in C - or postscript if its possible) that will >take the input, and produce the necessary PostScript code to write justified >text (similar to troff). > Just copy it out of Adobe's Green Book: Postscript Language Program Design. Paul O'Neill pvo@oce.orst.edu Coastal Imaging Lab OSU--Oceanography Corvallis, OR 97331 503-754-3251
lupin3@ucscb.UCSC.EDU (-=/ Larry Hastings /=-) (09/26/88)
+-In article <647@jura.tcom.stc.co.uk>, pjb@tcom.stc.co.uk (Peter J. Bishop) wrote:- +---------- | |I am trying to write a program (in C - or postscript if its possible) that will | take the input, and produce the necessary PostScript code to write justified | text (similar to troff). | | My questions are: | | a) Has anyone done this, and if so how? | | b) If not, does anyone know where I could start looking to find out the | character widths for each font. | | Peter Bishop. <pjb@tcom.stc.co.uk> || ...!mcvax!ukc!stc!pjb +---------- a) Yes, of course. Just as an example, the Sprint formatter (Borland's Sprint, for DOS machines, has a seperate editor and formatter) takes text and produces beautiful justified text. (You have to do your own hyphenation, as it isn't that smart; at least it has conditional hyphens.. nevermind.) As to HOW they did it is quite interesting, but it would take a lot of explaining... their formatter is very versitile, and makes not only beautiful PS text but beautiful text on a variety of printers. If you want more info, get a copy of Sprint and start dissecting it, and dissecting both the data for Postscript printers for its formatter, and the PS it spits out therafter. b) Yes. A program came free with Final Word II (update 2.20, anyways) that you sent to your printer and it would send back the character widths of a particular font in a particular size, nicely formatted to be used as data for Final Word's formatter. I don't remember if this code is copyrighted; if it isn't, I'd be happy to send you a copy (mail such a request to my work address, shown below.) -- /|\ /|\ .. . . . . . . . . . . | |\| |\| .. . . . . . . . . . . |/|\|/|\|/|| _ _ _ _ |_| _ _ |_ -__ _ _ARPA: lupin3@ucscb.ucsc.EDU | |/| |/|L_ (_\( ( (_/ | |(_\_) (_ || )(_)_)UUCP: *!ucbvax!ucscc!ucscb!lupin3 \|/ \|/ larry / hastings _/ WORK: sun!acad!metaware!funkster MetaWare "I wish people who have trouble communicating would just shut up."\\\ IncorporateDisclaimer:[MetaWare, UCSC]->opinion!=lhastings->opinion\\\Tom Lehrer