unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Custom font sets doesn't fully work
@ 2021-07-31  1:14 Yuan Fu
  2021-07-31  6:42 ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Yuan Fu @ 2021-07-31  1:14 UTC (permalink / raw)
  To: help-gnu-emacs

This is what I did (in emacs -q)

(create-fontset-from-fontset-spec
 (font-xlfd-name
  (font-spec :registry "fontset-lunamono")))

(set-fontset-font "fontset-lunamono"
                  'latin (font-spec :family "SF Mono"))
(set-fontset-font "fontset-lunamono"
                  'han (font-spec :family "Source Han Sans"))

(set-face-attribute 'default nil :font "fontset-lunamono" :height 130)

Now I expect Latin characters show in SF Mono, and Han characters show in Source Han Sans. However, only Latin characters work right, Han characters doesn’t use Source Han Sans.

If I use fontset-default instead:

(set-fontset-font "fontset-default"
                  'latin (font-spec :family "SF Mono"))
(set-fontset-font "fontset-default"
                  'han (font-spec :family "Source Han Sans”))

Both Latin and Han characters show in the right fonts. What gives?

Yuan


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-08-01  6:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-31  1:14 Custom font sets doesn't fully work Yuan Fu
2021-07-31  6:42 ` Eli Zaretskii
2021-07-31 17:19   ` Yuan Fu
2021-07-31 17:26     ` Eli Zaretskii
2021-07-31 21:41       ` Yuan Fu
2021-08-01  6:04         ` Eli Zaretskii
2021-07-31 17:29     ` Yuan Fu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).