all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Custom font sets doesn't fully work
Date: Sat, 31 Jul 2021 09:42:24 +0300	[thread overview]
Message-ID: <83lf5nougf.fsf@gnu.org> (raw)
In-Reply-To: <04E9C637-B795-4E1D-9B6B-044B66F8D375@gmail.com> (message from Yuan Fu on Fri, 30 Jul 2021 21:14:23 -0400)

> From: Yuan Fu <casouri@gmail.com>
> Date: Fri, 30 Jul 2021 21:14:23 -0400
> 
> (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?

I don't know the answer, but did you try "M-x describe-fontset" and
compare the results in both cases regarding the 'han' characters?

Also, which Han characters didn't show in the right font, and what is
the script of those characters (see char-script-table)?



  reply	other threads:[~2021-07-31  6:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-31  1:14 Custom font sets doesn't fully work Yuan Fu
2021-07-31  6:42 ` Eli Zaretskii [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83lf5nougf.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.