Path: utzoo!attcan!uunet!seismo!sundc!pitstop!sun!amdcad!ames!mailrus!bbn!spdcc!bloom-beacon!sparky.UUCP!jdi From: jdi@sparky.UUCP (John Irwin) Newsgroups: comp.windows.x Subject: physical screen dimensions on a Sun Message-ID: <8811010704.AA01663@sparky> Date: 1 Nov 88 07:04:28 GMT Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 37 The Release 3 (R2 also) server returns bogus values for the physical screen width and height of a Sun (in millimeters). The relevant code from the monochrome initialization routine (it's much the same for a color screen) looks like: if (!mfbScreenInit(index, pScreen, sunFbs[index].fb, sunFbs[index].info.fb_width, sunFbs[index].info.fb_height, 90, 90)) ... The 90's are the values for dots-per-inch (horizontal and vertical). So on a high-res screen (1600x1280) the server says the physical screen dimensions are much larger than on a normal screen (1152x900), which is incorrect. Pulling out my trusty ruler I find that the Sun screen I use is 13.75 inches in width and 11 inches in height. (About 17 diagonal inches) This trans- lates to about 82dpi for the normal screen and 115dpi for the high-res screen. Is 90 supposed to be a compromise? :-) So we went about looking for a way to query the operating system (or whatever) to determine how big a physical screen you've got. Guess what? There doesn't appear to be a way! NeWS 1.1 also doesn't appear to have a way to get the physical screen dimensions. This is especially amusing given that NeWS is touted as being "pixel size independent." Knowing the physical dimensions of the screen is critical to providing some sort of pixel independence. The new Release 3 fonts are wonderful, but it's hard to know how to translate a desired point size into an actual font choice on a Sun. Asking the user to measure his screen when he starts a client doesn't seem like much of an option. :-) Anyone know how to solve this problem? (hacks welcome) -- John Irwin, Franz Inc. jdi%franz.uucp@ucbarpa.berkeley.edu