bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#3319: 23.0.93; Default font


From: Kenichi Handa
Subject: bug#3319: 23.0.93; Default font
Date: Tue, 19 May 2009 14:42:14 +0900

In article <4A1227C1.2010503@gnu.org>, Jason Rumney <jasonr@gnu.org> writes:

> Kenichi Handa wrote:
> > I think what you intend by :family "outline-lucida sans
> > typewriter" is actually :foundry "outline" :family "lucida
> > sans typewriter", right.  If so, I've just installed a fix.
> > Please try again.

> Please ensure your fix does not break cases like :family "MingLiU-ExtB", 
> where the hyphen really is part of the family name.

We can't handle that kind of family name without breaking a
backward compatibility.  We discussed this matter a while
ago, but didn't reach a conclusion.  I'll put the last mail
on that thread at the tail.

Anyway, my change is just this.

-         (setq foundry (match-string 2 family)))
-       (setq family (match-string 1 family)))
+         (setq foundry (match-string 1 family)))
+       (setq family (match-string 2 family)))

and it is a fix of a bug introduced by this change.

2008-10-14  Chong Yidong  <cyd@stupidchicken.com>

        * faces.el (set-face-attribute): Set family and foundry before
        other attributes.

---
Kenichi Handa
handa@m17n.org

------------------------------------------------------------
From: Kenichi Handa <handa@m17n.org>
To: Miles Bader <miles@gnu.org>
In-reply-to: <buo7icb1fnp.fsf@dhapc248.dev.necel.com> (message from Miles
        Bader on Fri, 27 Jun 2008 16:49:14 +0900)
References: <87hcbi9vbg.fsf@catnip.gol.com>
        <je1w2loom0.fsf@sykes.suse.de>  <buohcbh6es9.fsf@dhapc248.dev.necel.com>
        <4862198F.4060305@gnu.org>      <E1KBTIl-0006en-Nc@etlken.m17n.org>     
<jwviqvxk4bq.fsf-monnier+emacs@gnu.org> <E1KC8Gs-0006kZ-PQ@etlken.m17n.org>
        <buo7icb1fnp.fsf@dhapc248.dev.necel.com>
Content-Type: text/plain; charset=US-ASCII
Message-Id: <E1KC94K-0007dY-At@etlken.m17n.org>
Date: Fri, 27 Jun 2008 17:12:32 +0900
Cc: schwab@suse.de, jasonr@gnu.org, monnier@iro.umontreal.ca,
        emacs-devel@gnu.org
Subject: Re: sans-serif name change

In article <buo7icb1fnp.fsf@dhapc248.dev.necel.com>, Miles Bader 
<miles.bader@necel.com> writes:

> Kenichi Handa <handa@m17n.org> 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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]