Subject: Re: bug#33019: 26.1; can not set fontset as frame font by set-frame-font

From: [email-masked]
Date: Sat, 13 Oct 2018 10:00:32 +0900

Eli Zaretskii <[email-masked]> writes:

>> From: [email-masked]
>> Cc: [email-masked]
>> 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.