emacs-devel
[Top][All Lists]
Advanced

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

Re: display-mm-width return value off on Windows


From: David Kastrup
Subject: Re: display-mm-width return value off on Windows
Date: Tue, 11 Jul 2006 00:05:15 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Jason Rumney <address@hidden> writes:

> David Kastrup wrote:
>> And for that it is necessary that Emacs and/or Windows convert the
>> points to pixels in a predictable way, and the display geometry is
>> the only pointer we have for that.
>>   
>
> Windows does not use the display geometry to convert points to
> pixels when it displays fonts. It uses the display geometry to
> decide whether to default to 96dpi or 120dpi (where i is a "logical
> inch" in Microsoft terminology, not necessarily a physical inch),
> then uses the dpi setting (which can be further customized by the
> user) to do its conversion between points and pixels, while
> continuing to report the physical size of the monitor in the
> functions that manage that.

What fun.

> I guess display-pixels-per-inch should report the dpi setting from
> the OS. Currently it seems to be hardcoded as 72.0, and the user
> needs to manually change it to match reality. At least on Windows,
> it is possible to read the system settings to get a more accurate
> value, but even if this is not possible on other window systems,
> 96.0 might be a better default these days.

Sigh.  At least on X11, we had no problems reported concerning the
size as far as I remember (except for XEmacs, but the place to rant
about that is elsewhere), and indeed, the usual X11 servers have a
consistent idea about the dpi, and Emacs seems to fetch and use it.
This need not match reality (depending on the monitor), but it seems
to apply everywhere, and thus leads to consistent results.  With
MacOSX, I am not quite sure.  I think we got rid of the worst trouble.

I really think that Windows at the moment is the worst offender.  If
we could get its idea of dpi consistent with its point/pixel
conversion, this would be quite beneficial.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

[Prev in Thread] Current Thread [Next in Thread]