GNU bug report logs - #33019
26.1; can not set fontset as frame font by set-frame-font

Previous Next

Package: emacs;

Reported by: ynyaaa <at> gmail.com

Date: Thu, 11 Oct 2018 15:06:02 UTC

Severity: normal

Found in version 26.1

Full log


View this message in rfc822 format

From: ynyaaa <at> gmail.com
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 33019 <at> debbugs.gnu.org
Subject: bug#33019: 26.1; can not set fontset as frame font by set-frame-font
Date: Sat, 13 Oct 2018 10:00:32 +0900
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: ynyaaa <at> gmail.com
>> Cc: 33019 <at> debbugs.gnu.org
>> Date: Sat, 13 Oct 2018 03:53:26 +0900
>> 
>> I want to display European characters with "Noto Mono" and
>> CJK characters with "Noto Sans CJK JP Regular".
>> (And other scripts with other Noto fonts.)
>
> Did you try to customize fontest-default, instead of introducing new
> fontsets?  There are quire a few examples of using set-fontset-font in
> fontset.el and some more in the Emacs manual.
>
> I don't see why would you need to use more than fontset-default.  Just
> customize it so that the CJK characters are displayed by Noto Sans CJK
> JP, and make Noto Mono your default font.

When a font family is specified for some range of "fontset-default",
:family specification of text face is ignored in the range.

(insert (propertize "ABC" 'face '(:family "Noto Serif")))
shows characters with "Noto Serif".

(progn (set-fontset-font "fontset-default" '(#x4E00 . #x9FFF)
                         "Noto Sans CJK JP Regular")
       (insert (propertize "\x4E00" 'face '(:family "Noto Serif CJK JP"))))
shows the character with "Noto Sans CJK JP Regular",
not "Noto Serif CJK JP".

Perhaps defining "fontset-serif" and specify '(:fontset "fontset-serif")
is required.




This bug report was last modified 3 years and 86 days ago.

Previous Next


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