From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jason Rumney Newsgroups: gmane.emacs.devel Subject: Re: display-mm-width return value off on Windows Date: Mon, 10 Jul 2006 22:28:32 +0100 Message-ID: <44B2C680.2080407@gnu.org> 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> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1152566955 4555 80.91.229.2 (10 Jul 2006 21:29:15 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 10 Jul 2006 21:29:15 +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 Mon Jul 10 23:29:14 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 1G03JR-0005i7-Hh for ged-emacs-devel@m.gmane.org; Mon, 10 Jul 2006 23:29:06 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G03JQ-0006sU-QT for ged-emacs-devel@m.gmane.org; Mon, 10 Jul 2006 17:29:04 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1G03JG-0006sA-C8 for emacs-devel@gnu.org; Mon, 10 Jul 2006 17:28:54 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1G03JG-0006rw-0k for emacs-devel@gnu.org; Mon, 10 Jul 2006 17:28:54 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G03JF-0006rt-NQ for emacs-devel@gnu.org; Mon, 10 Jul 2006 17:28:53 -0400 Original-Received: from [213.86.207.50] (helo=exchange.integrasp.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1G03KP-00007l-0u; Mon, 10 Jul 2006 17:30:05 -0400 Original-Received: from [10.0.0.32] (localhost [127.0.0.1]) by exchange.integrasp.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id NMA81YNT; Mon, 10 Jul 2006 22:20:32 +0100 Original-Received: from 83.67.23.108 ([83.67.23.108] helo=[10.0.0.32]) by ASSP-nospam; 10 Jul 2006 22:20:29 +0100 User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) Original-To: David Kastrup In-Reply-To: <854pxplez2.fsf@lola.goethe.zz> 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:56902 Archived-At: 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. 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.