[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: PCB Gtk port



On Mon, 28 Feb 2005 12:36:34 -0300, Xtian Xultz <xultz@xxxxxxxxxxxx> wrote:
> Em Seg 28 Fev 2005 10:32, Sascha Silbe escreveu:
> > On Mon, Feb 28, 2005 at 08:08:15AM -0500, DJ Delorie wrote:
> > > "Would"?  No.  How would pcb know your screen resolution?
> >
> > I'd guess there's some Xlib function for that. The X server already
> > knows the physical resolution. You either tell it explicitly (by using
> > the "-dpi" parameter) or it gets calculated using the given physical
> > dimensions of the screen ("DisplaySize" in config) and the current
> > resolution. It's needed for font sizing.
> >
> How the system will know how big is the screen? 15'', 17'', 20''?

As DJ mentioned, it doesn't know. You have to set it by hand.

In the early days of X, it was more common for the vendor of a
workstation to ship a fixed-frequency monitor with a known physical
size, so it made sense to have the X server provide the DPI numbers.
EDID lets an X server query the monitor for physical dimensions, but
not all graphics cards support it reliably, and a lot of X clients
were written assuming that the X server DPI values had no bearing on
reality.

The GIMP has a DPI calibration dialog. It lets you choose between the
X server settings, and having the program calculate DPI by asking the
user to measure a pair of horizontal and vertical rulers on the
screen. (The dialog pops up once when you first run the program, but I
don't know how it handles moving between different X servers on
different invocations.)

If you really want a 1:1 display, you might want to take a look at the
GIMP calibration code. I wouldn't be surprised if it has been
extracted into a library by now.

-- 
- Charles Lepple