emacs-devel
[Top][All Lists]
Advanced

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

Re: sans-serif name change


From: Stefan Monnier
Subject: Re: sans-serif name change
Date: Wed, 25 Jun 2008 10:00:38 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

>> My guess is that the `-' in Sans-Serif is being treated as a separator
>> character, and causes Emacs to look for a font called Serif with the
>> foundry Sans, or something similar.

> Yes.  I didn't change that behaviour for backward
> compatibility, but as face has the attribute :foundy now, it
> may be ok to break that compatibility.

> The parsing of XXX-YYY as FOUNDRY-FAMILY is now done in
> the function set-face-attribute as this:

>       (if (and (eq (car args) :family)
>                (stringp (cadr args))
>                (string-match "\\([^-]*\\)-\\([^-]*\\)" (cadr args)))
>           (let ((foundry (match-string 1 (cadr args)))
>                 (family (match-string 2 (cadr args))))
>             (internal-set-lisp-face-attribute face :foundry
>                                               (purecopy foundry)
>                                               where)
>             (internal-set-lisp-face-attribute face :family
>                                               (purecopy family)
>                                               where))
>         (internal-set-lisp-face-attribute face (car args)
>                                           (purecopy (cadr args))
>                                           where)))

Maybe this "FOUNDRY-FAMILY" fallback code could be moved to the same
code that handles face-font-family-alternatives?


        Stefan




reply via email to

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