From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: display-mm-width return value off on Windows Date: Tue, 11 Jul 2006 00:05:15 +0200 Message-ID: <85irm5i09w.fsf@lola.goethe.zz> References: <87slldpd8s.fsf@neutrino.caeruleus.net> <44AFB1E1.20906@student.lu.se> <8764i7kywu.fsf@neutrino.caeruleus.net> <858xn1n3gt.fsf@lola.goethe.zz> <44B25639.8060000@gnu.org> <854pxplez2.fsf@lola.goethe.zz> <44B2C680.2080407@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1152599504 21234 80.91.229.2 (11 Jul 2006 06:31:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 11 Jul 2006 06:31:44 +0000 (UTC) Cc: Ralf Angeli , lennart.borgman.073@student.lu.se, Eli Zaretskii , emacs-devel@gnu.org, "Kim F. Storm" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 11 08:31:41 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1G0BmR-0002Pc-9t for ged-emacs-devel@m.gmane.org; Tue, 11 Jul 2006 08:31:35 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G0BmQ-00011R-Qk for ged-emacs-devel@m.gmane.org; Tue, 11 Jul 2006 02:31:34 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1G0Blk-0000q1-8e for emacs-devel@gnu.org; Tue, 11 Jul 2006 02:30:52 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1G0Blj-0000ph-Qz for emacs-devel@gnu.org; Tue, 11 Jul 2006 02:30:51 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G0Blj-0000pb-Ed for emacs-devel@gnu.org; Tue, 11 Jul 2006 02:30:51 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1G0Bmz-0006rP-AU for emacs-devel@gnu.org; Tue, 11 Jul 2006 02:32:09 -0400 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.34) id 1G0Ble-0007yb-Ob; Tue, 11 Jul 2006 02:30:47 -0400 Original-Received: by lola.goethe.zz (Postfix, from userid 1002) id 965031C4CCED; Tue, 11 Jul 2006 00:05:15 +0200 (CEST) Original-To: Jason Rumney In-Reply-To: <44B2C680.2080407@gnu.org> (Jason Rumney's message of "Mon, 10 Jul 2006 22:28:32 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:56915 Archived-At: Jason Rumney 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