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

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

bug#29630: 25.3; Unable to change fontset using :family face attribute


From: Eli Zaretskii
Subject: bug#29630: 25.3; Unable to change fontset using :family face attribute
Date: Sun, 10 Dec 2017 19:24:26 +0200

> From: Thomas Morgan <tlm@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.  I'll make another report about that.
> 
> I think the documentation for the :family attribute should be 
> changed to explain how to refer to a fontset if it's possible
> to do that.  If it's not possible to specify a fontset with the
> :family attribute, the text about fontsets should be removed.

Thanks, I've updated the documentation to match what the code does.

I'm CC'ing Handa-san, who might know more about this, and maybe
explain how to fix the code to accept fontsets as value of :family.
Currently, it doesn't seem to work, and I don't know enough about this
to figure out whether it ever did or was supposed to.  This whole area
of Emacs is awfully under-documented.





reply via email to

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