From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Jan_Dj=E4rv?= Newsgroups: gmane.emacs.devel Subject: Re: Parsing of fontconfig font names and other font related stuff. Date: Wed, 08 Jul 2009 16:07:02 +0200 Message-ID: <4A54A806.3070906@swipnet.se> References: <4A539AB0.3010605@swipnet.se> <4A545A85.2060803@swipnet.se> <4A548C7A.5020309@swipnet.se> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1247062184 12674 80.91.229.12 (8 Jul 2009 14:09:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 8 Jul 2009 14:09:44 +0000 (UTC) Cc: emacs-devel@gnu.org To: Kenichi Handa Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 08 16:09:36 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MOXq3-0007v9-LT for ged-emacs-devel@m.gmane.org; Wed, 08 Jul 2009 16:09:35 +0200 Original-Received: from localhost ([127.0.0.1]:58515 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MOXq2-0001Sf-Rn for ged-emacs-devel@m.gmane.org; Wed, 08 Jul 2009 10:09:34 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MOXni-0000Dl-D3 for emacs-devel@gnu.org; Wed, 08 Jul 2009 10:07:10 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MOXnd-0000AN-NJ for emacs-devel@gnu.org; Wed, 08 Jul 2009 10:07:10 -0400 Original-Received: from [199.232.76.173] (port=52339 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MOXnd-0000AE-Gy for emacs-devel@gnu.org; Wed, 08 Jul 2009 10:07:05 -0400 Original-Received: from proxy3.bredband.net ([195.54.101.73]:64881) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MOXnd-0007ZK-0m for emacs-devel@gnu.org; Wed, 08 Jul 2009 10:07:05 -0400 Original-Received: from iph2.telenor.se (195.54.127.133) by proxy3.bredband.net (7.3.140.3) id 49F597CD016F47E7 for emacs-devel@gnu.org; Wed, 8 Jul 2009 16:07:03 +0200 X-SMTPAUTH-B2: X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkewACBFVEpV4S1uPGdsb2JhbACBUYgcjxcBAQEBN7gFhAgF X-IronPort-AV: E=Sophos;i="4.42,368,1243807200"; d="scan'208";a="26376585" Original-Received: from c-6e2de155.25-1-64736c10.cust.bredbandsbolaget.se (HELO coolsville.localdomain) ([85.225.45.110]) by iph2.telenor.se with ESMTP; 08 Jul 2009 16:07:03 +0200 Original-Received: from [172.20.199.2] (gaffa [172.20.199.2]) by coolsville.localdomain (Postfix) with ESMTP id D21147FA07B; Wed, 8 Jul 2009 16:07:02 +0200 (CEST) User-Agent: Thunderbird 2.0.0.22 (X11/20090608) In-Reply-To: X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. 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:112180 Archived-At: Kenichi Handa skrev: > In article <4A548C7A.5020309@swipnet.se>, =?ISO-8859-1?Q?Jan_Dj=E4rv?= writes: >> It would be nice to be able to use XftDefaultSubstitute to pick up the GConf >> settings from the X database (GConf puts them there). But by the time the Xft >> driver has been choosen, the pixel size for the font has already been >> calculated, using another dpi-value. > >> How can we fix this? Can we choose driver without calculating a pixel size? > > I think it's not that difficult of modify the current code > to do that, but... > >> The fast but kind of ugly way would be to add the defaults from >> XftDefaultSubstitute to the name if it is an fcname and Xft is present. > > shouldn't the DPI value from GConf be reflected to (struct > x_display_info).resy or (struct frame).resy? > I don't know. Xft picks up its specific values from X defaults, and GConf puts them there. So if we could use XftDefaultSubstitute we would get the GConf values without using GConf directly. Also, those values only makes sense for Xft fonts, so it isn't a general DPI-value for everything X does. Then again, it seems to be used mostly for fonts in Emacs, I found one instance where it is used to calculate the size of an image. I'll look in to it some more. Jan D.