From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: handa Newsgroups: gmane.emacs.bugs Subject: bug#49797: 28.0.50; Setting face to custom fontset doesn't work Date: Mon, 02 Aug 2021 20:57:48 +0900 Message-ID: <87y29k2h4z.fsf@gnu.org> References: <79E99CB7-5D9E-4222-899B-5D05C9B84AF3@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26935"; mail-complaints-to="usenet@ciao.gmane.io" Cc: casouri@gmail.com, 49797@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 02 14:06:18 2021 Return-path: Envelope-to: geb-bug-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 1mAWi1-0006nB-Uu for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 02 Aug 2021 14:06:17 +0200 Original-Received: from localhost ([::1]:33856 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mAWi0-0006Cn-SB for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 02 Aug 2021 08:06:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50194) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mAWb0-0002gD-C7 for bug-gnu-emacs@gnu.org; Mon, 02 Aug 2021 07:59:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54508) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mAWb0-0003mz-44 for bug-gnu-emacs@gnu.org; Mon, 02 Aug 2021 07:59:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mAWb0-0007R5-4Q for bug-gnu-emacs@gnu.org; Mon, 02 Aug 2021 07:59:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: handa Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 02 Aug 2021 11:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49797 X-GNU-PR-Package: emacs Original-Received: via spool by 49797-submit@debbugs.gnu.org id=B49797.162790548328517 (code B ref 49797); Mon, 02 Aug 2021 11:59:02 +0000 Original-Received: (at 49797) by debbugs.gnu.org; 2 Aug 2021 11:58:03 +0000 Original-Received: from localhost ([127.0.0.1]:37821 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mAWa2-0007Ps-Ng for submit@debbugs.gnu.org; Mon, 02 Aug 2021 07:58:03 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:51988) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mAWa0-0007PH-91 for 49797@debbugs.gnu.org; Mon, 02 Aug 2021 07:58:01 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:41542) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mAWZu-0003LL-Pq; Mon, 02 Aug 2021 07:57:54 -0400 Original-Received: from fl1-119-240-89-42.iba.mesh.ad.jp ([119.240.89.42]:49975 helo=shatin) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mAWZu-0006Tx-LR; Mon, 02 Aug 2021 07:57:54 -0400 Original-Received: from handa by shatin with local (Exim 4.93) (envelope-from ) id 1mAWZo-000OYl-Ig; Mon, 02 Aug 2021 20:57:48 +0900 In-Reply-To: <83eebdog5o.fsf@gnu.org> (message from Eli Zaretskii on Sun, 01 Aug 2021 09:03:31 +0300) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:211069 Archived-At: > > From: Yuan Fu > > Date: Sat, 31 Jul 2021 17:37:05 -0400 > >=20 > > If I evaluate the following: > >=20 > > (progn > > (create-fontset-from-fontset-spec > > (font-xlfd-name > > (font-spec :registry "fontset-lunamono"))) > > (set-fontset-font "fontset-lunamono" 'latin (font-spec :family "SF Mo= no")) > > (set-face-attribute 'default nil :fontset "fontset-lunamono=E2=80=9D)) > >=20 > > I expect Latin characters to be shown in SF Mono font, but that=E2=80= =99s not what happened. If I instead set font for the default fontset, the = characters in the buffer are correctly displayed in SF Mono font. I tried t= his code snippet with Emacs 26, 27 and 28, and all of them have this proble= m. > >=20 Please try (set-face-attribute 'default nil :font "fontset-lunamono"). The docstring of set-face-attribute says: ------------------------------------------------------------ ... =E2=80=98:font=E2=80=99 Set font-related face attributes from VALUE. VALUE must be a valid font name or font object. It can also be a fontset name. Setting this attribute will also set ^^^^^^^^^^^^^^^^^ the =E2=80=98:family=E2=80=99, =E2=80=98:foundry=E2=80=99, =E2=80=98:width= =E2=80=99, =E2=80=98:height=E2=80=99, =E2=80=98:weight=E2=80=99, and =E2=80=98:slant=E2=80=99 attributes. ------------------------------------------------------------ > Personally, I lack a clear understanding of how user-defined fontsets > are supposed to be used instead of the standard fontsets. Is that > only by using the :font attribute of a face? In article <83v94pm80c.fsf@gnu.org>, Eli Zaretskii writes: [...] > I think the :fontset attribute isn't supposed to be set by Lisp > programs. It's for internal use. I don't remember well, but I tend to agree. RMS's request was to make fontset acceptable at any places where a font is accepted. --- K. Handa handa@gnu.org