In article <jwvy75nrn8b.fsf-monnier+emacs gnu.org>, Stefan Monnier <monnier iro.umontreal.ca> writes:
>>> The current code for `set-frame-font' doesn't
support font
>>> aliases - for example, these sexps don't work:
>>> (set-frame-font "5x7") ;; error:
"Font `5x7' is not defined"
>>> (set-frame-font "fixed") ;; uses
some unexpected font
> > I've just installed a fix to check also an alias
name in X
> > font-backend. But, as Emacs accepts a
fontconfig-style font
> > name too, for instance, "fixed" is
parsed as a font of
> > family "fixed" which may match with many
fonts.
> > Is keeping backward compatibility of
(set-frame-font
> > "fixed") important enough to drop the
support of
> > fontconfig-style name?
> Can you recover the Emacs-22 behavior by restricting
the backends to
> just `x'?
No, because the font-name parser is independent of font
backends; i.e. even if you use only x font-backend, you can
specify a font name as, for instance,
"fixed-12:foundry=misc".
It is possible to implement a new method
`resolve_alias_name' for a font-backend, and add a new
function font-resolve-alias-name.
Then one can do:
(set-frame-font (font-resolve-alias-name
"fixed")).
Another idea is to do:
(set-frame-font (font-spec :alias "fixed)).
or
(set-frame-font ":alias=fixed")
---
Kenichi Handa
handa ni.aist.go.jp
|