From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#51277: 27.1; menu-set-font not loading correct font Date: Thu, 21 Oct 2021 09:40:19 +0200 Message-ID: <87wnm625cs.fsf@gmail.com> References: <83a6j5chh9.fsf@gnu.org> <837de9c8hf.fsf@gnu.org> <83y26oc491.fsf@gnu.org> <83v91sc25x.fsf@gnu.org> <87zgr42i78.fsf@gmail.com> <83cznzc1p8.fsf@gnu.org> <87ee8f3fk0.fsf@gmail.com> <87ee8fktxv.fsf@gnus.org> 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="26990"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Jesse Sheidlower , 51277@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:42:04 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 1mdSi8-0006e9-IK for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 21 Oct 2021 09:42:00 +0200 Original-Received: from localhost ([::1]:53566 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdSi7-0000WB-5M for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 21 Oct 2021 03:41:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57128) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdShC-0000Un-C7 for bug-gnu-emacs@gnu.org; Thu, 21 Oct 2021 03:41:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44653) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mdShC-0002dj-42 for bug-gnu-emacs@gnu.org; Thu, 21 Oct 2021 03:41:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mdShB-0002zZ-Pe for bug-gnu-emacs@gnu.org; Thu, 21 Oct 2021 03:41:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 21 Oct 2021 07:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51277 X-GNU-PR-Package: emacs Original-Received: via spool by 51277-submit@debbugs.gnu.org id=B51277.163480202911455 (code B ref 51277); Thu, 21 Oct 2021 07:41:01 +0000 Original-Received: (at 51277) by debbugs.gnu.org; 21 Oct 2021 07:40:29 +0000 Original-Received: from localhost ([127.0.0.1]:56199 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mdSgf-0002yh-2s for submit@debbugs.gnu.org; Thu, 21 Oct 2021 03:40:29 -0400 Original-Received: from mail-wm1-f47.google.com ([209.85.128.47]:38622) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mdSgd-0002yU-ED for 51277@debbugs.gnu.org; Thu, 21 Oct 2021 03:40:27 -0400 Original-Received: by mail-wm1-f47.google.com with SMTP id a20-20020a1c7f14000000b003231d13ee3cso2667250wmd.3 for <51277@debbugs.gnu.org>; Thu, 21 Oct 2021 00:40:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-transfer-encoding; bh=LGhxgBE94AVmYavqyDMh8jbpGf22AqGR9+rU/HgTTLk=; b=RJDshLKi+h2os5UsKV6Z6+KVSldcapSXW13vdjuGBcAvJ8W+8hEaZzThM2xk4fhJiP ZYEbMzmaJBPjQ5dPu4HNB0c8ha7r536xWFBcSXxNkhYlHLpMxJGye4WXopbCdD9rRyVi mjqslF25rH1QqvYEdsnH1pZoQmVJqlsny9evqHbcDcHmL1Qap4vRoJY2uMqMGnPtCgNS 9Rsn53fx+litN6TN1Y8pzmaBA6hHWkvVAC4lm6+39ko0ZbHX6Uu3pkjyopbCe54urfeI 2yhn5ZKwg/3+mg8GkaI/Gv22rt1aisel6wL4SaMmPDolwtTVpW3xtdqSLJIaYRzEA9T0 Ri4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=LGhxgBE94AVmYavqyDMh8jbpGf22AqGR9+rU/HgTTLk=; b=F3XHDdypAJtjPVVU2q6TodAMf6bf5Q1HifVs35G9+FU2JbFyfCLMVJu39FLlWe0rRK 2Xz9HqS+taZToDZ4vecpUL6dduI57j796yxTYNyyjKUp1ZE73KYejehTgNTJzCbz8GCc w+um0KsUMgVrYyLiJctuFX1II0+E+VLFdlNSTqKkudz9aeeMuEMBK0VpCO75R7DvrPwt jldavxZNtsGGdHbCoCV/BI3PjzSTrbgxB60TOrygnTeVHuwd7SD23crgEtuywo19Q3kn 1/Ms/nqhr1VyDl4IMxUZZWLLfFLp6o/ZH+6wHJIpOzilbipHmYNq7TLNMx/NOdru4mI6 jV+A== X-Gm-Message-State: AOAM531PofuNtjwgp1xANaHspTR2OAX0uiilFHHGf2GyhGF6ct/pLpm7 jazk0MXYUnrOtk/hqpQXwgpok9X3apo= X-Google-Smtp-Source: ABdhPJz0BA64frMjlLQd6b+XoVXFvh0tBW2KwyoKWb/cBhNMvCDHx7wEqcAHDIRiViwD3iVnjppQbg== X-Received: by 2002:a05:600c:4f53:: with SMTP id m19mr4792373wmq.118.1634802020992; Thu, 21 Oct 2021 00:40:20 -0700 (PDT) Original-Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id i8sm4076576wrv.47.2021.10.21.00.40.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Oct 2021 00:40:20 -0700 (PDT) In-Reply-To: <87ee8fktxv.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 21 Oct 2021 04:11:56 +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:217757 Archived-At: >>>>> On Thu, 21 Oct 2021 04:11:56 +0200, Lars Ingebrigtsen said: Lars> Selecting Operator Mono Light reports back a weight of 300 (which= is Lars> according to spec). Lars> Book reports 330 (but should be 380). Lars> Medium reports 350 (but should be 500). Lars> Bold reports 400 (but should be 700). Lars> So for this font, the PangoWeights returned by the Gtk selector a= re Lars> totally out of whack with the spec in pango-font.h. So I'm wonde= ring Lars> whether this font is just buggy. I think this kind of mismatch is not uncommon. All the 'book' fonts that I have report a weight of 400, which is 'normal', although all the 'light' fonts that I have report '300'. Lars> I'm trying to compare with what other programs are displaying. I= t would Lars> be convenient to test with a program that understands fonts on the Lars> command line, but if I say Lars> xfce4-terminal --font "Operator Mono SSm:weight=3Dbook" Lars> then I get something that looks very wrong indeed. Anybody know a Lars> program that understands these things? FC_DEBUG=3D1 xfce4-terminal --font "Operator Mono SSm:weight=3Dbook" will get you fontconfig debug telling you which actual font is used. Lars> Well, Lars> PANGO_WEIGHT_THIN =3D 100, Lars> and Lars> PANGO_WEIGHT_ULTRAHEAVY =3D 1000 Lars> so it kinda sounds like <=3D, not >=3D is the intended semantic (= which is Lars> what Emacs does). gedit rounds down to the nearest multiple of 100, which equates to >=3D I guess the root cause of all of this is that we=CA=BCre mapping PangoWeights to symbolic constants, which we then pass to fontconfig. Perhaps we could arrange to pass the weights directly? >> [2] I=CA=BCll note that 'w32_to_fc_weight' uses the various FW_* co= nstants >> as the start of the respective range, not the end Lars> Hm... Didn=CA=BCt I say it=CA=BCs a mess? ;-) Robert --=20