GNU bug report logs - #29630
25.3; Unable to change fontset using :family face attribute

Previous Next

Package: emacs;

Reported by: Thomas Morgan <tlm <at> ziiuu.com>

Date: Sat, 9 Dec 2017 21:41:01 UTC

Severity: normal

Found in version 25.3

Full log


View this message in rfc822 format

From: handa <handa <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 29630 <at> debbugs.gnu.org, tlm <at> ziiuu.com
Subject: bug#29630: 25.3; Unable to change fontset using :family face attribute
Date: Fri, 22 Dec 2017 00:19:16 +0900
> > From: Thomas Morgan <tlm <at> ziiuu.com>
> > Date: Sat, 09 Dec 2017 16:26:48 -0500
> > 
> > The documentation for the :font attribute doesn't say that it can 
> > be a fontset.  But (elisp)Font and Color Parameters says the `font'
> > frame parameter can be the name of a fontset and the frame parameter 
> > is "equivalent to the `font' attribute of the `default' face".  So 
> > one can infer that the :font attribute of a face can be a fontset 
> > name.  I tested this:
> > 
> >   (progn
> >     (set-face-attribute 'default nil :font
> >                         "-*-liberation mono-normal-normal-normal-*-*-*-*-*-m-0-fontset-liberation")
> >     (font-at 0 nil "a"))
> > 
> > This changes the font to Liberation Mono as expected:
> > 
> >   #<font-object "-1ASC-Liberation Mono-normal-normal-normal-*-15-*-*-*-m-0-iso10646-1">
> > 
> > I also tried equivalent expressions with set-face-font and
> > using the fontset alias, all of which succeeded.
> > 
> > The font is correct but the fontset is actually fontset-auto1, 
> > not fontset-liberation.

Here, fontset works as just a provider of font-related properties
(family, weight, size, etc), and then, based on the selected font, a new
fontset is automatically created.  This roundabout behavior was not to
break (Emacs-internal) backward compatibility by introducing the concept
of fontset.

At least, calling set-fontset-font for the fontset of the current frame
should work... and worked as far as I rememnber... but I've just found
that this does not work with the latest Emacs?!?

(set-fontset-font nil 'unicode-bmp "dejavu sans mono")
(set-fontset-font nil 'unicode-bmp "Freemono" nil 'append)

I'm now checking what is wrong.

---
K. Handa
handa <at> gnu.org




This bug report was last modified 7 years and 179 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.