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.bugs Subject: bug#32210: Support medium weighted fonts Date: Thu, 21 Oct 2021 10:01:20 +0300 Message-ID: <83bl3iamkf.fsf@gnu.org> References: <87v9riaofa.fsf@gnus.org> <83pnhq5w92.fsf@gnu.org> <87lfse5t5g.fsf@gnus.org> <835zji5qyn.fsf@gnu.org> <87k17xqxzy.fsf@gnus.org> <87eey5qxeh.fsf@gnus.org> <835zjh4243.fsf@gnu.org> <871ru5qf2w.fsf@gnus.org> <83muct2izq.fsf@gnu.org> <87r224nukh.fsf@gnus.org> <87lf2nn997.fsf@gnus.org> <838rync04b.fsf@gnu.org> <87h7dbn886.fsf@gnus.org> <834k9bbwz4.fsf@gnu.org> <87a6j3n52u.fsf@gnus.org> <875ytrn4fq.fsf@gnus.org> <8335ovbrp1.fsf@gnu.org> <875ytrksxe.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32910"; mail-complaints-to="usenet@ciao.gmane.io" Cc: carlosjosepita@gmail.com, 32210@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 21 09:02:40 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 1mdS63-0008JQ-5D for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 21 Oct 2021 09:02:39 +0200 Original-Received: from localhost ([::1]:35846 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdS61-0001wT-4u for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 21 Oct 2021 03:02:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49242) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdS5X-0001s3-Se for bug-gnu-emacs@gnu.org; Thu, 21 Oct 2021 03:02:10 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44628) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mdS5S-0008RE-Fo for bug-gnu-emacs@gnu.org; Thu, 21 Oct 2021 03:02:07 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mdS5S-000206-3t for bug-gnu-emacs@gnu.org; Thu, 21 Oct 2021 03:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 21 Oct 2021 07:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32210 X-GNU-PR-Package: emacs Original-Received: via spool by 32210-submit@debbugs.gnu.org id=B32210.16347996777637 (code B ref 32210); Thu, 21 Oct 2021 07:02:02 +0000 Original-Received: (at 32210) by debbugs.gnu.org; 21 Oct 2021 07:01:17 +0000 Original-Received: from localhost ([127.0.0.1]:56174 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mdS4i-0001z6-My for submit@debbugs.gnu.org; Thu, 21 Oct 2021 03:01:16 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:47206) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mdS4g-0001ys-F8 for 32210@debbugs.gnu.org; Thu, 21 Oct 2021 03:01:15 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:41446) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdS4a-0005H6-Ju; Thu, 21 Oct 2021 03:01:09 -0400 Original-Received: from [87.69.77.57] (port=3792 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 1mdS4Z-0005PI-M1; Thu, 21 Oct 2021 03:01:08 -0400 In-Reply-To: <875ytrksxe.fsf@gnus.org> (message from Lars Ingebrigtsen on Thu, 21 Oct 2021 04:33:49 +0200) 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:217754 Archived-At: > From: Lars Ingebrigtsen > Cc: carlosjosepita@gmail.com, 32210@debbugs.gnu.org > Date: Thu, 21 Oct 2021 04:33:49 +0200 > > I've now gone through all the fonts I have here that have different > weights for medium and regular, and with the adjustments in the weights > and Pango weights, I can now select both of them. (And the other > weights for Noto and DejaVu, which are the main fonts that I've tested > with, also work.) > > So I've pushed the changes now to the trunk. If these changes don't > work with other fonts, please let me know. Hmm... bother: > static const struct table_entry weight_table[] = > { > { 0, { "thin" }}, > - { 20, { "ultra-light", "ultralight" }}, > - { 40, { "extra-light", "extralight" }}, > + { 40, { "ultra-light", "ultralight", "extra-light", "extralight" }}, This loses the distinction between ultra-light and extra-light. Are these two really indistinguishable in all supported font backends? > static Lisp_Object > w32_to_fc_weight (int n) > { > - if (n >= FW_HEAVY) return intern ("black"); > + if (n >= FW_HEAVY) return Qbold; > if (n >= FW_EXTRABOLD) return Qextra_bold; This doesn't look right. Should that Qbold be Qblack?