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

Re: DPI in intel modesetting driver



On Tue, 2007-01-02 at 22:33 +0000, Leo wrote:
> Hi all,
> 
> [A thread started by me in xorg mailing list on setting a 96x96 DPI:
> http://permalink.gmane.org/gmane.comp.freedesktop.xorg/14115]
> 
> So far I haven't got any decent solution. Passing an argument to X or
> adding a 'Monitor' section in xorg.conf seems backwards. Thus I think
> it deserves to be fixed by autodetecting i.e. DPI should come out
> correctly by system-config-display.
> 
> Could anyone run `xdpyinfo|grep resolution' to see if your DPI is set
> correctly? Since gnome will adjust it to 96x96, you won't see any
> difference no matter what value you get. But in other WMs, you will
> see the difference for example, the font size could appear to be too
> large or too small.

You are conflating two different things.

The "DPI" setting used by Gnome for font sizing is a lie.  It has no
actual relation to dots per inch of monitor.  The naming is unfortunate,
but every time I ask Gnome people about it, the answer is "oh but people
expect it to be called DPI", which is crap, but oh well.

It is, in effect, a scale factor passed to Freetype when rendering.
Divide it by 96 and you get the scale percentage.  Don't ask why 96 was
chosen when the vast majority of LCDs extant are 100 or 75 but nothing
in between, no one knows.  If other WMs aren't respecting this setting,
and they're using client-side fonts with Freetype, then that's probably
their bug, but we'd have to check to be sure.

The DPI setting reported by X is the physical dots per inch of the
monitor.  You never want to override this, because it determines how big
Freetype thinks pixels really are, and therefore affects coloration when
doing subpixel antialiasing.  X should be getting it correct.

X's DPI number also happens to get used when rendering core fonts, as a
conversion factor between point size and pixels.  If you still have any
apps that use core fonts, well, you have already lost, and changing X's
DPI setting to make them look "better" will just make your non-core
fonts look worse.

- ajax


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