From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Problems with display-pixels-per-inch variable Date: Mon, 15 Aug 2005 17:03:07 +0200 Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1124118738 29328 80.91.229.2 (15 Aug 2005 15:12:18 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 15 Aug 2005 15:12:18 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 15 17:12:07 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1E4gbN-000744-AK for ged-emacs-devel@m.gmane.org; Mon, 15 Aug 2005 17:10:13 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E4gek-0005Ml-AO for ged-emacs-devel@m.gmane.org; Mon, 15 Aug 2005 11:13:42 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1E4gcP-0004ZR-2Q for emacs-devel@gnu.org; Mon, 15 Aug 2005 11:11:19 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1E4gcI-0004VA-Np for emacs-devel@gnu.org; Mon, 15 Aug 2005 11:11:15 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E4gcI-0004PS-1A for emacs-devel@gnu.org; Mon, 15 Aug 2005 11:11:10 -0400 Original-Received: from [195.41.46.235] (helo=pfepa.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.34) id 1E4gk0-00077y-TJ for emacs-devel@gnu.org; Mon, 15 Aug 2005 11:19:09 -0400 Original-Received: from kfs-l.imdomain.dk.cua.dk (unknown [80.165.4.124]) by pfepa.post.tele.dk (Postfix) with SMTP id 6FDB747FEE6 for ; Mon, 15 Aug 2005 17:03:20 +0200 (CEST) Original-To: emacs-devel@gnu.org 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:42070 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:42070 In the C code, we have this variable, which can be used by the calculation of strech glyph width and height: DEFVAR_LISP ("display-pixels-per-inch", &Vdisplay_pixels_per_inch, doc: /* Pixels per inch on current display. Value is a number or a cons (WIDTH-DPI . HEIGHT-DPI). */); Vdisplay_pixels_per_inch = make_float (72.0); There are two problems with this: 1) It is a fixed value, so if it is not correct, the user must set it to the proper value (possible, but not nice). 2) There is only one common value for all displays. Re. 1, I would imagine that - at least for some setups - it is possible to get the proper value from the X-Server or OS. Does anyone know how to do that? Re. 2, I guess the proper thing would be store this in the display structure of each display, and use a function to set the values for a specific display (if the values cannot be determined automatically). I can do item 2, but if someone would like to fix item 1, I would appreciate if you would fix item 2 as well... -- Kim F. Storm http://www.cua.dk