Article View: comp.lang.postscript
Article #3357Re: Variable characters
From: Tom Schneider
Date: Mon, 15 Oct 1990 22:37
Date: Mon, 15 Oct 1990 22:37
81 lines
3074 bytes
3074 bytes
Thanks to Kevin Andresen [kevina@apple.com] I now know that it is possible to
adjust character sizes. Unfortunately every time I try to modify his program I
get tangled into some problem with one or the other postscript device I use.
Grrr #1.
NeWS (the old 1.0 kind I think) refuses to create small characters, and forces
them to be bigger. This is design error, in which someone thought that it
would to 'help' the user. By rotating my characters, I can to avoid the
problem some of the time. Anyone at Sun know why this was done? Does NeWS 2.0
still have this stupid 'feature'?
Grrr #2.
The other device I use is an Apple Laserwriter IIntx; which is in general a
great machine --- except that there is no way to reset the darn thing, short of
turning it off and on again. (The best contender, control-d didn't seem to
help at all.) I asked about this here about a month ago and have still not
gotten a satisfactory solution. Is there anyone at Apple who KNOWS the
solution? A satisfactory solution is one that works under Unix, and is
complete tested code. (Ie, exactly what do I send to the printer to clear
its little brain?)
So here's the problem: draw a character of a specified height in cm, with
its bounding box just to prove you have it under control. Have it function
on any device. When I run the following code on NeWS, it works fine. When
I send it to the printer, it works fine the first time. On the second shot
I get a blank page. What am I doing wrong? How do I tell the printer to
forget anything I ever told it before?????
Tom Schneider
National Cancer Institute
Laboratory of Mathematical Biology
Frederick, Maryland 21702-1201
toms@ncifcrf.gov
..........................................................................
(version = 2.00 of charbox.ps 1990 October 15 \n) print
initgraphics
/cmfactor { 72 2.54 div } def % defines points -> centimeters
/cm { cmfactor mul} def % defines centimeters
erasepage
12 cm 10 cm translate
90 rotate
4 4 scale
/Helvetica-Bold findfont 30 scalefont setfont
gsave
newpath
0 0 moveto
(G) true charpath
flattenpath
pathbbox % compute bounding box of 1 pt. char => lx ly ux uy
% the path is here, but toss it away ...
grestore
pstack
/uy exch def
/ux exch def
/ly exch def
/lx exch def
1 setlinewidth
gsave
newpath
0 0 moveto
ux 0 lineto
ux uy lineto
0 uy lineto
0 0 lineto
stroke
grestore
gsave
0 0 moveto
(G) show
grestore
showpage
Technical Details
Message-ID:
<1909@fcs280s.ncifcrf.gov>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!nih-csl!lhc!ncifcrf!fcs260c2!tomsReferences:
<293@heaven.woodside.ca.us> <AAS.90Oct15092820@boeygen.nr.no> <296@heaven.woodside.ca.us>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!nih-csl!lhc!ncifcrf!fcs260c2!toms From: toms@fcs260c2.ncifcrf.gov (Tom Schneider) Newsgroups: comp.lang.postscript Subject: Re: Variable characters Summary: still not solved Keywords: HELP!!! Message-ID: <1909@fcs280s.ncifcrf.gov> Date: 15 Oct 90 22:37:29 GMT References: <293@heaven.woodside.ca.us> <AAS.90Oct15092820@boeygen.nr.no> <296@heaven.woodside.ca.us> Sender: news@ncifcrf.gov Organization: NCI Supercomputer Facility, Frederick, MD Lines: 81