Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ucbvax!ASC.SLB.COM!rxb From: rxb@ASC.SLB.COM (Rafael Bracho) Newsgroups: comp.windows.news Subject: Re: Open Windows Message-ID: <8912271740.AA04243.rxb@plutonium.ASC.SLB.COM> Date: 29 Dec 89 17:32:24 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 56 Re: doc%jalapeno.UUCP%fajita.UUCP@suntan.West.Sun.COM (Tom Dockery)'s message >The answer is somewhat simple: it's rather difficult to scale everything >appropriately to handle differing device densities if your have no way >of determining those densities. As most (though certainly not all) >monitors do not have any provisio for providing this information to the >framebuffer (and most framebuffers wouldnt know what to do with it anyway), >certain assumptions have to be made about the attached devices in advance. >In our shop, we regularly swap 16 and 19 inch color monitors around. On >a Sun cg-3 these both have a resolution of 1152 X 900; this means the 16 >inch monitor has a higher density of pixels per unit measure in either >dimension than the 19 inch. I agree with you in that it's impossible to find out actual monitor size. I still agree with Peter's original message in that the server should change the default matrix between an 1152 x 900 and a 1600 x 1280 framebuffers, so the same PostScript program should produce the same sized windows, on the same size monitors, regardless of framebuffer resolution. >The basic unit of measure in PostScript is the point, 1/72 of an inch; not >too metric, to be sure, but having a basis in the printing industry. If >the PostScript (or NeWS) programmer knows, or can query, the density of >the device to be driven, s/he can transform everything accordingly, so that >the same PS source prints to the same result on a 300 or 900 dpi printer. >The higher density printer then simply provides just that. If the >programmer can neither know in advance, nor find out a run-time by query >the density of the output device, however, s/he faces a quandry. There >is no real way, short of modifying the hardware, to solve the problem in a >device independent way ... I must disagree with you. The same PostScript source will produce the same output, without any resolution inquiries, providing the interpreter sets the default transformation matrix such that the default coordinate system is still 1/72's of an inch per unit (not quite points, but close enough). Thus the program: gsave 0 setgray /Helvetica findfont 14 scalefont setfont 144 144 scale 1 1 translate (Hello there!) show showpage grestore will produce a page with the string "Hello there!" in 14 point Helvetica, 2 inches above and 2 inches to the right of the lower left corner, *independently* of the printer's resolution. Note that it is possible to get in trouble by using 'setmatrix' instead of 'translate' and 'scale', particularly if one is not careful. Rafael Bracho rxb@asc.slb.com