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#51704: 29.0.50; set-fontset-font do not work well with :weight 'normal of font-spec Date: Wed, 10 Nov 2021 20:22:00 +0200 Message-ID: <83ilwz3m7r.fsf@gnu.org> References: <54b63b0b.37ad.17d03710b0b.Coremail.tumashu@163.com> <87a6idq00p.fsf@gnus.org> <1374ad7e.4032.17d0399bbc1.Coremail.tumashu@163.com> <87tuglokb3.fsf@gnus.org> <83ilx15vvw.fsf@gnu.org> <87o86snbar.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6635"; mail-complaints-to="usenet@ciao.gmane.io" Cc: tumashu@163.com, 51704@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 10 19:23:15 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 1mksFa-0001LO-1V for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 10 Nov 2021 19:23:10 +0100 Original-Received: from localhost ([::1]:37982 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mksFZ-0005lU-2N for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 10 Nov 2021 13:23:09 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:57864) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mksFS-0005jd-Io for bug-gnu-emacs@gnu.org; Wed, 10 Nov 2021 13:23:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55873) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mksFS-00054m-9v for bug-gnu-emacs@gnu.org; Wed, 10 Nov 2021 13:23:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mksFS-0003qj-5V for bug-gnu-emacs@gnu.org; Wed, 10 Nov 2021 13:23:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 10 Nov 2021 18:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51704 X-GNU-PR-Package: emacs Original-Received: via spool by 51704-submit@debbugs.gnu.org id=B51704.163656853214711 (code B ref 51704); Wed, 10 Nov 2021 18:23:02 +0000 Original-Received: (at 51704) by debbugs.gnu.org; 10 Nov 2021 18:22:12 +0000 Original-Received: from localhost ([127.0.0.1]:39181 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mksEe-0003pB-4o for submit@debbugs.gnu.org; Wed, 10 Nov 2021 13:22:12 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:56916) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mksEc-0003ot-6D for 51704@debbugs.gnu.org; Wed, 10 Nov 2021 13:22:11 -0500 Original-Received: from [2001:470:142:3::e] (port=44614 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mksEW-0004v7-QV; Wed, 10 Nov 2021 13:22:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=e0/3s8aRdMnFgKlWRrpnhGzPkbXXVF6zNFBScFaIznY=; b=R/Z520Wlw2Eb m4Kz02sY/YdmCvoOt5heUj4eDCM5XwMAwZ6Z58E0/DNGD66s3JZI6sRMrmG/Osdw+gf5rlhQfBHp1 +aNNM5OwnQTKMZWGcQ8g/spqsjFYu1M3Qld28/8Mbksm6KqKTNLUPKPMukbet3hFFu7pPRRLemAyW 74Y+iS8XUkeyD15UuU1WGSQi8UdF3AkqLUkgJFjl+J0Hp8qSH/Cv8RDBBv/f5sAT5CNEx4Y5QjLSI l6GdFTkROUZdF1dxPKGWkelIQCa/TBn5D/tySTM8sGAmzJi5WKb+fmK7y1hpcDwQ5f4q8OFxgzSNg yS+N0PrILba8kejo7WcI/w==; Original-Received: from [87.69.77.57] (port=1209 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 1mksEW-00040z-CU; Wed, 10 Nov 2021 13:22:04 -0500 In-Reply-To: <87o86snbar.fsf@gnus.org> (message from Lars Ingebrigtsen on Wed, 10 Nov 2021 00:45:16 +0100) 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:219559 Archived-At: > From: Lars Ingebrigtsen > Cc: tumashu@163.com, 51704@debbugs.gnu.org > Date: Wed, 10 Nov 2021 00:45:16 +0100 > > Eli Zaretskii writes: > > > Can we rethink this incompatible change? Isn't there a way of > > achieving the same goal without breaking people's font customizations? > > Why was there a need to make 'normal' and 'medium' be different? > > Because (some) fonts define both a `normal' and `medium' weight, and > they are different weights. Previously Emacs couldn't use both. > > The basic problem is in the font selection mechanism we choose -- if > we're asking for `normal' (weight 80) and the font doesn't have a weight > in the area of 78-82 (I think it was; it's been a couple of weeks since > I looked at this), it'll just give up and say "I can't find the font" > instead of choosing the closest weight the font does have. Which would > improve the situation significantly for users. But the problem I saw was that w32font.c didn't have both medium and normal, it had only one of them. So I now readjusted the conversion between Fontconfig values and MS-Windows values in a way that supports both normal and medium. Feng, could you please try the latest master branch, with your original fontset customizations, and see if there is any change (hopefully, for the better)?