[comp.lang.postscript] Anything but Courier!!

berlin@bu-cs.BU.EDU (David K. Fickes) (03/08/88)

I'm working with several spreadsheets and am able to prot them to
our unix box without any problems... Currently, I am using Transcript
to print the spreadsheets landscape using Courier which is a non-proportional
font.  Any of the proportional fonts foul up the columns.  I've been
asked to print these sheets with something besides that "ugly" Courier
font and would like to use a pseudo-Helvetica (non-proportional) if 
I can find one...  

On the other hand, if anyone has a brilliant idea on filtering
these files to print properly using a Helvetica font I'm open
to suggestions....

thanks, david
-- 
==============================================================================
David K. Fickes     Center for Einstein Studies/Einstein Papers Project
UUCP: ...harvard!bu-it!berlin			Boston University 
BITNET: clx95on@bostonu				745 Commonwealth Avenue
PHONE:	(617) 353-9249	(617) 277-9741		Boston, MA 02215      
				 

ted@mitre-bedford.ARPA (Edward J. Ede) (03/09/88)

In article <20453@bu-cs.BU.EDU> berlin@buita.bu.edu (David Fickes Einstein Project) writes:
>Currently, I am using Transcript
>to print the spreadsheets landscape using Courier which is a non-proportional
>font.  Any of the proportional fonts foul up the columns.  I've been
>asked to print these sheets with something besides that "ugly" Courier
>font and would like to use a pseudo-Helvetica (non-proportional) if 
>I can find one...  

I spent about a week trying to hack a "good-looking" monospaced
Helvetica.  You can copy Helvetica's font dictionary and add a Metrics
dictionary to it.  It looks really bad.  If you space the font to
allow for characters as wide as 'W' and 'M' it looks even worse.

I ended up filtering the text.  I used a pretty simple algorithm that
produces ok results when printing Vugraphs designed on a VT100.

algorithm:
1) identify a "chunk"* of text
2) figure out how wide the text would've been if you were using a
   mono-spaced font
3) Use an ashow to adjust the width of the "chunk" to the width found
   in step 2
4) repeat until all "chunks" are printed on the page

*I defined a chunk to be the largest set of characters that did not
contain: 1) two or more spaces 2) any graphics characters or 3) any
video attribute changes.

Have you considers purchasing a different monospaced font from Adobe?
Packages 27-Letter Gothic, 28-Prestige Elite, and 29-Orator are all
monospaced.  27 & 28 are $185 apiece, 29 is $145.  I'd recommend
Letter Gothic, as Prestige Elite still looks similar to Courier and
Orator is all capital letters (in two heights).

As an aside, I think that in most fonts the cells for the digits are
the same size.  I know they are in Helvetica.

Good luck,
ted

Ted Ede -- ted@mitre-bedford.arpa -- The MITRE Corporation -- Burlington Road  
|        -- Bedford MA, 01730 -- Mail Stop B015 -- (617) 271-2524 --        |
|                   - this line intentionally left blank -                  |
+---------------------------------------------------------------------------+

richard@gryphon.CTS.COM (Richard Sexton) (03/11/88)

In article <20453@bu-cs.BU.EDU> berlin@buita.bu.edu (David Fickes Einstein Project) writes:
>
>I'm working with several spreadsheets and am able to prot them to
>our unix box without any problems... Currently, I am using Transcript
>to print the spreadsheets landscape using Courier which is a non-proportional
>font.  Any of the proportional fonts foul up the columns.  I've been
>asked to print these sheets with something besides that "ugly" Courier
>font and would like to use a pseudo-Helvetica (non-proportional) if 
>I can find one...  
>
>On the other hand, if anyone has a brilliant idea on filtering
>these files to print properly using a Helvetica font I'm open
>to suggestions....
>
>thanks, david

Why dont you make a seperate font, from Helvetica, that is monospaced ?


Or, by altering the aspect ratio of Courier, we have come up with some
pleasing alterntives.


-- 
                      "...(alright Nils, alright)..."
                          richard@gryphon.CTS.COM 
   {ihnp4!scgvaxd!cadovax, rutgers!marque, codas!ddsw1} gryphon!richard

geof@imagen.UUCP (Geoffrey Cooper) (03/12/88)

To make a font monospaced, just add a Metrics directory into any font
with all the characters having the same width.  Take the width of a
particular character (an M will guarantee that characters don't
overlap) and use CharStrings to ensure that all characters are
given the new metric.  The code included below does this.

The output is pretty dreadful, because no attempt is made to center the
characters within the em space.  To do that, you'd have to go to the
next level of metrics dictionary, where each entry is a pair,
containing left side bearing and metrics info.  To center each
character, you need to know its bounding box.  You can either work on a
host from an AFM file, or compute the bounding boxes by taking the
charpath of the character and flattening it.  The latter approach is
computationally expensive, but the resultant font will still print well.
Don't expect the results to be too good, since the fonts are not
designed to look good when spaced that way.

------monospace.ps-------
%!
/make_monospace
{
    findfont dup setfont (M) stringwidth pop 1000 mul /_w exch def
    dup length 1 add dict begin
    {
        1 index /FID eq { pop pop } { def } ifelse
    }
    forall
    currentdict end
    dup
    dup /CharStrings get dup length dict begin
    {
        pop _w def
    }
    forall
    /Metrics currentdict put end
    definefont
}
def

/Times-Mono /Times-Roman make_monospace 10 scalefont setfont

72 72 moveto
(This is some text in Times monospace.) show

showpage
------------------
-- 
{decwrl,sun,saber}!imagen!geof