From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Fixed-pitch and variable-pitch faces Date: Sat, 07 Jun 2008 14:56:34 -0400 Message-ID: References: <871w39mcx5.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1212865013 4681 80.91.229.12 (7 Jun 2008 18:56:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 7 Jun 2008 18:56:53 +0000 (UTC) Cc: emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jun 07 20:57:36 2008 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 1K53bb-0005yQ-0z for ged-emacs-devel@m.gmane.org; Sat, 07 Jun 2008 20:57:35 +0200 Original-Received: from localhost ([127.0.0.1]:60645 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K53ao-0000uf-73 for ged-emacs-devel@m.gmane.org; Sat, 07 Jun 2008 14:56:46 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K53ag-0000sA-AN for emacs-devel@gnu.org; Sat, 07 Jun 2008 14:56:38 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K53ae-0000rP-Kv for emacs-devel@gnu.org; Sat, 07 Jun 2008 14:56:37 -0400 Original-Received: from [199.232.76.173] (port=51072 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K53ae-0000rK-GN for emacs-devel@gnu.org; Sat, 07 Jun 2008 14:56:36 -0400 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]:21867 helo=ironport2-out.teksavvy.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K53ae-0007hn-FR for emacs-devel@gnu.org; Sat, 07 Jun 2008 14:56:36 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvABAOx1SkjO+ISodGdsb2JhbACBVpAyASecQg X-IronPort-AV: E=Sophos;i="4.27,605,1204520400"; d="scan'208";a="22259830" Original-Received: from smtp.pppoe.ca (HELO smtp.teksavvy.com) ([65.39.196.238]) by ironport2-out.teksavvy.com with ESMTP; 07 Jun 2008 14:56:34 -0400 Original-Received: from pastel.home ([206.248.132.168]) by smtp.teksavvy.com (Internet Mail Server v1.0) with ESMTP id NYL00035; Sat, 07 Jun 2008 14:56:35 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 7EA608864; Sat, 7 Jun 2008 14:56:34 -0400 (EDT) In-Reply-To: <871w39mcx5.fsf@stupidchicken.com> (Chong Yidong's message of "Sat, 07 Jun 2008 12:23:50 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: 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:98602 Archived-At: > '((t :family "courier")) [...] > '((t :family "helv")) [..] > I think the font backend is matching these to non-fontconfig fonts. Yes, I see that here too. The problem appears to be that "courier" and "helvetica" are proprietary/trademarked fonts and/or font names (I don't know exactly, just guessing), so most GNU/Linux distributions don't come with them. Instead, they have things like "arial" and "courier new". The old-way to solve it is to add those mapping to face-font-family-alternatives. But as it turns out, this is not enough: face-font-family-alternatives already maps "helv" to "arial" which I do have anti-aliased, but I also happen to have the standard set of adobe-helvetica bitmapped fonts distributed with Xorg and this is given precedence in the list because, well, we asked for "helvetica" rather than "arial". I would actually expect fontconfig to be able to provide such mappings as well (tho it appears not to do it), so maybe there's a way to let fontconfig solve this problem. As for solving it within Emacs, I'm not sure what we should do. Maybe rather than do (dolist (names face-font-family-alternatives) (dolist (backend font-backends) (try-font))) we should just do (dolist (backend font-backends) (dolist (names face-font-family-alternatives) (try-font))) -- Stefan