Constant DPI regardless of resolution

Nikos Chantziaras realnc at arcor.de
Tue Jul 1 12:37:31 PDT 2008


Nicolas Mailhot wrote:
> Le Mar 1 juillet 2008 05:10, Nikos Chantziaras a écrit :
>> David De La Harpe Golden wrote:
>>> Nikos Chantziaras wrote:
>>>
>>>>  The DPI  does not change (only the resolution changes.)
>>> Terminology: DPI measures the resolution...
>> Sorry, I should have clarified; with "resolution" I mean the width and
>> height of the picture in pixels.  Changing those on a DFP that always
>> operates at a fixed native resolution won't change the DPI value
> 
> The DPI you see in software in the DPI it controls. Any auto-scaling
> done by the hardware behind its back is beyond the software control.
> 
> What you really want with a DFP is to always operate it at native
> resolution without this kind of scaling, which requires for the
> software ot be able to adapt to this resolution (whatever it is)
> without trying to force bogus values such as 96dpi.

But this is exactly what I'm doing.  The DFP always operates at its 
native resolution, it's the X server's driver (I guess) that assumes it 
doesn't.  If I had set the DFP to scale the picture, then the current 
behavior would be correct (this is the most suitable behavior for the 
majority of cases; users want the picture to fill the whole area of the 
monitor).  But if the DFP is set to not scale, then that behavior is not 
correct anymore.

It seems what is really needed is a flag somewhere to switch between the 
two behaviors.  I don't think this can be auto-detected; X has no way of 
knowing if the DFP is configured to scale or not.

With VMs, this is also an issue with *any* display, not only DFPs, 
because X runs in a window.  Changing the resolution in X will simply 
resize the VM's window thus keeping the DPI constant; however, X assumes 
the picture is always full-screen and thus the problem arises.

My next try on this was to force the DPI in the font renderer.  The most 
obvious way would be to put "Xft.dpi: 86" in ~/.Xresources.  Doesn't 
work though, but I guess this is off-topic here.




More information about the xorg mailing list