From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: sans-serif name change Date: Fri, 27 Jun 2008 17:12:32 +0900 Message-ID: References: <87hcbi9vbg.fsf@catnip.gol.com> <4862198F.4060305@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: ger.gmane.org 1214554501 906 80.91.229.12 (27 Jun 2008 08:15:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 27 Jun 2008 08:15:01 +0000 (UTC) Cc: schwab@suse.de, jasonr@gnu.org, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Miles Bader Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 27 10:15:46 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 1KC97R-0007mT-F7 for ged-emacs-devel@m.gmane.org; Fri, 27 Jun 2008 10:15:45 +0200 Original-Received: from localhost ([127.0.0.1]:51881 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KC96b-0004mT-02 for ged-emacs-devel@m.gmane.org; Fri, 27 Jun 2008 04:14:53 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KC94v-0003Nw-FX for emacs-devel@gnu.org; Fri, 27 Jun 2008 04:13:09 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KC94r-0003KS-D8 for emacs-devel@gnu.org; Fri, 27 Jun 2008 04:13:07 -0400 Original-Received: from [199.232.76.173] (port=39118 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KC94r-0003K9-6G for emacs-devel@gnu.org; Fri, 27 Jun 2008 04:13:05 -0400 Original-Received: from mx1.aist.go.jp ([150.29.246.133]:45651) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KC94a-0006Yi-Kl; Fri, 27 Jun 2008 04:12:49 -0400 Original-Received: from rqsmtp2.aist.go.jp (rqsmtp2.aist.go.jp [150.29.254.123]) by mx1.aist.go.jp with ESMTP id m5R8ChJG023234; Fri, 27 Jun 2008 17:12:43 +0900 (JST) env-from (handa@m17n.org) Original-Received: from smtp2.aist.go.jp by rqsmtp2.aist.go.jp with ESMTP id m5R8Ch3i011426; Fri, 27 Jun 2008 17:12:43 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp2.aist.go.jp with ESMTP id m5R8CWLP002117; Fri, 27 Jun 2008 17:12:32 +0900 (JST) env-from (handa@m17n.org) Original-Received: from handa by etlken.m17n.org with local (Exim 4.69) (envelope-from ) id 1KC94K-0007dY-At; Fri, 27 Jun 2008 17:12:32 +0900 In-reply-to: (message from Miles Bader on Fri, 27 Jun 2008 16:49:14 +0900) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/23.0.60 (i686-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) X-detected-kernel: by monty-python.gnu.org: Solaris 9 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:100006 Archived-At: In article , Miles Bader writes: > Kenichi Handa writes: > > And, fontconfig requires `-' in a family name to be escaped > > by `\': .. > > So, how about using the same rule for Emacs? > > > > (set-face-attribute 'variable-pitch nil :family "sans\\-serif") > But currently other places, such as `set-frame-font' seem to work > properly if passed "Sans-Serif" without escaping the "-". Perhaps some > part of emacs is already adding the backslash? No. In ftfont.c, these names: "mono", "monospace", "sans-serif", "sans serif", "sans", "serif" are specially recognized as generic family names. In addition, fontconfig accepts the literal "sans-serif" when used in the function FcPatternAddString (pat, FC_FAMILY, ...). Fontconfig requires escaping only on parsing a font name, and adds escaping on generating a font name. > I think _if_ there are fonts with "-" in their name, requiring the dash > to be escaped will annoy and confuse users, and lead to bug reports. > I don't know how many such fonts there are, of course. > [I'd say just get rid of the old-style foundry-family names; do we > really care?] As I wrote before, I tend to agree with breaking the backward compatibility here. --- Kenichi Handa handa@ni.aist.go.jp