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 14:29:29 +0100 Message-ID: <44B25639.8060000@gnu.org> References: <87slldpd8s.fsf@neutrino.caeruleus.net> <44AFB1E1.20906@student.lu.se> <8764i7kywu.fsf@neutrino.caeruleus.net> <858xn1n3gt.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 1152538298 28281 80.91.229.2 (10 Jul 2006 13:31:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 10 Jul 2006 13:31:38 +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 15:31:31 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 1FzvqP-00056o-Ov for ged-emacs-devel@m.gmane.org; Mon, 10 Jul 2006 15:30:38 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FzvqP-0005GZ-15 for ged-emacs-devel@m.gmane.org; Mon, 10 Jul 2006 09:30:37 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fzvpj-00053E-R9 for emacs-devel@gnu.org; Mon, 10 Jul 2006 09:29:55 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fzvph-00052J-Ud for emacs-devel@gnu.org; Mon, 10 Jul 2006 09:29:55 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fzvph-00052E-QG for emacs-devel@gnu.org; Mon, 10 Jul 2006 09:29:53 -0400 Original-Received: from [213.86.207.50] (helo=exchange.integrasp.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fzvql-0005ku-JT; Mon, 10 Jul 2006 09:30:59 -0400 Original-Received: from [192.168.111.61] (localhost [127.0.0.1]) by exchange.integrasp.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id NMA81YFV; Mon, 10 Jul 2006 14:21:25 +0100 Original-Received: from 192.168.111.61 ([192.168.111.61] helo=[192.168.111.61]) by ASSP-nospam; 10 Jul 2006 14:21:25 +0100 User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) Original-To: David Kastrup In-Reply-To: <858xn1n3gt.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:56887 Archived-At: David Kastrup wrote: > storm@cua.dk (Kim F. Storm) writes: > > >> So I tried to do fix that (in a way similar to the one proposed for >> display-mm-*) some time ago, but didn't complete it, as it wasn't >> really clear what had to be done. >> >> First of all, it had to be done per-display (at least X supports >> multiple display), >> >> Secondly, it was not clear to me whether this problem was specific >> to X, but I guessed it was not, so changes had to be done for >> all platforms (as it involved added stuff to "display-info".) >> >> Last, but not least, it was unclear what other parts of the code >> would also need changes -- e.g. display-mm-* -- which would have >> to be reworked to not just use some X-macro like WidthMMOfScreen. >> > > Whatever solution is chosen in the end: it is important that the same > algorithm is used for converting point size of fonts into pixel size > and vice versa. > > preview-latex needs to guess how many pixels a given font will occupy > on the screen in order to create graphics matching in size. And the > font sizes are returned in points, namely physical dimensions At least on Windows, point sizes for fonts are based on user configuration, not the actual physical size of the monitor. So I don't think you should be using display-mm-* for calculating sizes you expect to be relative to fonts anyway. Why not use the pixel size of the font? Surely that will be more accurate for the purpose you want.