From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Custom font sets doesn't fully work Date: Sat, 31 Jul 2021 09:42:24 +0300 Message-ID: <83lf5nougf.fsf@gnu.org> References: <04E9C637-B795-4E1D-9B6B-044B66F8D375@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13162"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jul 31 08:43:01 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m9ii5-0003GR-Fv for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 31 Jul 2021 08:43:01 +0200 Original-Received: from localhost ([::1]:42694 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m9ii3-00022q-O3 for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 31 Jul 2021 02:42:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50962) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m9ihk-00022h-8f for help-gnu-emacs@gnu.org; Sat, 31 Jul 2021 02:42:40 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:42750) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m9ihk-00053l-1c for help-gnu-emacs@gnu.org; Sat, 31 Jul 2021 02:42:40 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1997 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m9ihj-0004Uj-Hf for help-gnu-emacs@gnu.org; Sat, 31 Jul 2021 02:42:39 -0400 In-Reply-To: <04E9C637-B795-4E1D-9B6B-044B66F8D375@gmail.com> (message from Yuan Fu on Fri, 30 Jul 2021 21:14:23 -0400) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:132210 Archived-At: > From: Yuan Fu > 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)?