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 10:36:21 +0200 Message-ID: <4A545A85.2060803@swipnet.se> References: <4A539AB0.3010605@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 1247042366 14025 80.91.229.12 (8 Jul 2009 08:39:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 8 Jul 2009 08:39:26 +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 10:39:19 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 1MOSf6-0006xH-HN for ged-emacs-devel@m.gmane.org; Wed, 08 Jul 2009 10:37:56 +0200 Original-Received: from localhost ([127.0.0.1]:43372 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MOSf5-0001Cc-T0 for ged-emacs-devel@m.gmane.org; Wed, 08 Jul 2009 04:37:55 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MOSdi-0000dC-Rc for emacs-devel@gnu.org; Wed, 08 Jul 2009 04:36:30 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MOSdd-0000Ym-8I for emacs-devel@gnu.org; Wed, 08 Jul 2009 04:36:30 -0400 Original-Received: from [199.232.76.173] (port=55969 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MOSdd-0000YY-4Z for emacs-devel@gnu.org; Wed, 08 Jul 2009 04:36:25 -0400 Original-Received: from proxy1.bredband.net ([195.54.101.71]:34871) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MOSdc-0001bM-MN for emacs-devel@gnu.org; Wed, 08 Jul 2009 04:36:24 -0400 Original-Received: from iph1.telenor.se (195.54.127.132) by proxy1.bredband.net (7.3.140.3) id 49F5A1520179ECC6 for emacs-devel@gnu.org; Wed, 8 Jul 2009 10:36:23 +0200 X-SMTPAUTH-B2: X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkewAIv3U0pV4S1uPGdsb2JhbACBUYgcjxcBAQEBN7YjhAgF X-IronPort-AV: E=Sophos;i="4.42,367,1243807200"; d="scan'208";a="27358976" Original-Received: from c-6e2de155.25-1-64736c10.cust.bredbandsbolaget.se (HELO coolsville.localdomain) ([85.225.45.110]) by iph1.telenor.se with ESMTP; 08 Jul 2009 10:36:22 +0200 Original-Received: from [172.20.199.2] (gaffa [172.20.199.2]) by coolsville.localdomain (Postfix) with ESMTP id 1CCC97FA07B; Wed, 8 Jul 2009 10:36:22 +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:112164 Archived-At: Kenichi Handa skrev: > In article <4A539AB0.3010605@swipnet.se>, =?UTF-8?B?SmFuIERqw6Rydg==?= writes: > >> I'm in the process of getting Emacs to use GConf defaults for font, >> antialiasing, hints and dpi. > >> The parser in Emacs does not accept "Monospace 8:dpi=96.0". >> First float values for dpi is not accepted, even they are floats in fontconfig. >> Secondly spaces before the size isn't accepted either, it is assumed to be in >> Gtk+-format when a space is there. > >> But fc-match do accept that type of font specification, as do all applications >> I tried that has xft. Admittedly, the docs (the user manual) seem to indicate >> that a '-' is required before the size. > > At least fc-match doesn't treat this kind of format > correctly; "Monospace 8". But, I agree that > font_parse_fcname in font.c should be improved. > The problem is that in Gnome the default monospaced font has the format, i.e. space instead of -. But it isn't that important, I was just playing around with different dpi values. It isn't required for the GConf stuff to work. >> Ideally I wouldn't like to put stuff like dpi in the font string, but instead >> have the appropriate backend use the GConf value if no other value is >> specified. Where would it be appropriate to insert that information? In the >> xft-backend or in Ffont-spec, or perhaps somewhere else? > > I think it should be done in xft-backend. That makes sense. > > By the way, a spec for searching for a font, and a spec for > using the found font should be different. I think > antialiasing and hints are specs of the latter category. > Currently Emacs doesn't distinguish them. This should be > fixed somehow. I don't quite follow. Isn't it plausable that a user wants to search for fonts that are antialiased? > > And, I don't know what dpi is for. That information should > be available via X server. Is it a way to pretend that you > are using a screen of the different DPI? Yes. Gnome has 96 dpi as default (settable in a user desktop settings dialog), fontconfig seems to have 75. My monitor is actually 84 dpi. Other applications in Gnome, like gnome-terminal, uses the 96 dpi value, but Emacs uses the default. That makes Emacs and gnome-terminal look different even though they both use monospace-8. So I'd like Emacs to react to changes in the user desktop settings for these values. This would enable Emacs to use the same default monospaced font as other applications, and also change font, dpi, etc. on the fly, as Gnome-applications do, when the user changes it in the desktop settings. Jan D.