Xref: utzoo comp.text:7857 comp.lang.postscript:7244 Path: utzoo!telly!eci386!ecicrl!clewis From: clewis@ecicrl.UUCP (Chris Lewis) Newsgroups: comp.text,comp.lang.postscript Subject: Re: Help me write some DESC files for postscript Message-ID: <1073@ecicrl.UUCP> Date: 11 Jan 91 20:26:15 GMT References: <1991Jan9.175920.20119@bradley.bradley.edu> Reply-To: clewis@ecicrl.UUCP (Chris Lewis) Followup-To: comp.text Organization: Elegant Communications Inc., Ottawa, Canada Lines: 43 In article <1991Jan9.175920.20119@bradley.bradley.edu> brad@bradley.bradley.edu (Bradley E. Smith) writes: >Hi, I am try to write DESC & font files for postscript fonts we have One way of doing this is to get the psdtwd program out of the psroff distribution. It's a postscript program that you download to the printer which will punt back up to the host a set of ditroff width tables for the fonts you want. (provided that the font is actually on the printer first..) Since you seem to have tpscript, tpscript comes with the original version of this program, so you could use that instead. If there's sufficient interest, I could post the psdtwd program. Regarding DESC files. Use the ones that come with tpscript, they work well. The widths in the ditroff tables are the widths in the "res" value at the unitwidth size. Thus, with your example of res being 720 and unitwidth being 10, a 33 means that the character is 33/720's of an inch wide at 10 points. Where a width doesn't scale exactly, round off as close as possible. Otherwise, ditroff filters that optimize (convert individual character placements into strings with a single show) will bugger up royally - noticable in either too big or too small inter-word spacing. This is noticable in psroff (CAT troff), where a single digit change in the width tables (res == 432, unitwidth == 6) can bugger the optimizer's word spacing with words as short as 9 letters. For a little increased accuracy, you could change unitwidth to the largest number you can, where the highest converted width is still less than 255. The unitwidth MUST be the same for all fonts under a given DESC (because it can only be specified in the DESC). Enforced by the binary width table structure. Also, the width values themselves MUST be <= 255 (stored as chars in the width table binary files). As far as calculating goes, consider ! again, which has the AFM of 333. Which means, that a 10 point (unitwidth!) "!" would be 3.33 points wide (333 * 10/1000). Then, you convert it to decipoints (res!) which gives 33.3, then round off to 33. Ie: divide by 10 and round. You were right. -- Chris Lewis, Phone: (613) 832-0541 UUCP: uunet!utai!lsuc!ecicrl!clewis Moderator of the Ferret Mailing List (ferret-request@eci386) Psroff mailing list (psroff-request@eci386)