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.devel Subject: Re: [PATCH] Use fontconfig spec for parsing font-weight. Date: Mon, 17 May 2021 12:54:26 +0300 Message-ID: <83mtstu1m5.fsf@gnu.org> References: <1b6ef436-2f32-bfed-f0a8-f55aa4852ccd@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8060"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Yukio Siraichi Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon May 17 11:58:34 2021 Return-path: Envelope-to: ged-emacs-devel@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 1lia1B-0001uc-LT for ged-emacs-devel@m.gmane-mx.org; Mon, 17 May 2021 11:58:33 +0200 Original-Received: from localhost ([::1]:40978 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lia1A-0008Cm-JO for ged-emacs-devel@m.gmane-mx.org; Mon, 17 May 2021 05:58:32 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40582) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1liZx8-0003BE-Jq for emacs-devel@gnu.org; Mon, 17 May 2021 05:54:22 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:33454) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1liZx8-0003Kp-Av; Mon, 17 May 2021 05:54:22 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2884 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 1liZx7-0004ys-Tz; Mon, 17 May 2021 05:54:22 -0400 In-Reply-To: <1b6ef436-2f32-bfed-f0a8-f55aa4852ccd@gmail.com> (message from Yukio Siraichi on Mon, 17 May 2021 17:26:48 +0900) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:269397 Archived-At: [Please use Reply All to repy, so that the list is CC'ed.] > From: Yukio Siraichi > Date: Mon, 17 May 2021 17:26:48 +0900 > > > Use those fonts how and in what situations? IOW, could you please > > describe a complete use scenario where having these fonts in the list > > would be beneficial? > > Sure. It happened to me yesterday, where I was trying to use "Cascadia Code SemiLight" as the default > font. So, I tried adding: > > (set-face-attribute 'default nil :family "Cascadia Code" :weight 'semilight) > > to my "init.el". After restarting emacs, I noticed it wasn't using that font. Specifically, I ran "describe-char" on > some characters that were using the default face, and noticed the font used was "normal": > > -SAJA-Cascadia Code-light-normal-normal-*-13-*-*-*-m-0- > > Running "describe-font" on that, I found that it was using the "Cascadia Code-Light.otf" font (not the > semilight I wanted). In fact, no matter what I tried, I couldn't use that semilight font. But 'semi-light' is already supported by Emacs, so why did you need to add the 'book' attribute? What happens if you do the above separately, that is with 2 calls instead of just one: (set-face-attribute 'default nil :family "Cascadia Code") (set-face-attribute 'default nil :weight 'semi-light) Does this work?