emacs-devel
[Top][All Lists]
Advanced

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

Re: sans-serif name change


From: Kenichi Handa
Subject: Re: sans-serif name change
Date: Fri, 27 Jun 2008 17:12:32 +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)

In article <address@hidden>, Miles Bader <address@hidden> writes:

> Kenichi Handa <address@hidden> 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
address@hidden




reply via email to

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