From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#51277: 27.1; menu-set-font not loading correct font Date: Thu, 21 Oct 2021 04:11:56 +0200 Message-ID: <87ee8fktxv.fsf@gnus.org> 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> 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="10679"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Jesse Sheidlower , 51277@debbugs.gnu.org To: Robert Pluim Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 21 04:13:36 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 1mdNaI-0002a7-H3 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 21 Oct 2021 04:13:34 +0200 Original-Received: from localhost ([::1]:36374 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdNaH-0007k6-5f for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 20 Oct 2021 22:13:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52374) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdNZm-0007iu-7E for bug-gnu-emacs@gnu.org; Wed, 20 Oct 2021 22:13:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44239) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mdNZl-0004jS-UH for bug-gnu-emacs@gnu.org; Wed, 20 Oct 2021 22:13:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mdNZl-0004e9-Ie for bug-gnu-emacs@gnu.org; Wed, 20 Oct 2021 22:13:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 21 Oct 2021 02:13: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.163478233017800 (code B ref 51277); Thu, 21 Oct 2021 02:13:01 +0000 Original-Received: (at 51277) by debbugs.gnu.org; 21 Oct 2021 02:12:10 +0000 Original-Received: from localhost ([127.0.0.1]:55785 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mdNYv-0004d2-QP for submit@debbugs.gnu.org; Wed, 20 Oct 2021 22:12:10 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:53546) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mdNYt-0004cn-Bq for 51277@debbugs.gnu.org; Wed, 20 Oct 2021 22:12:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=yqDExI9zBsAC9C/YD/kMy2LF3d70emtjtWV+W2lGtH8=; b=XNkRhf3RV7PvDpukaeYGX58z5r 9nnEemilh07F9JJt3L3AU8VWg6X+SWw+M9ly5iH43eeYh0mm12LLahRlYPkt/RKHaWZ5i8tmFE4Ij uP6FIQcZDtDDFGp4JZTs94gS9/4Ptc+R7O2PRZkboKq6Q8ZdwKQ5jF+czUz+NcYpM1JQ=; Original-Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mdNYj-0004vg-W2; Thu, 21 Oct 2021 04:12:00 +0200 X-Now-Playing: The Lounge Lizards's _Voice of Chunk_: "Uncle Jerry" In-Reply-To: <87ee8f3fk0.fsf@gmail.com> (Robert Pluim's message of "Wed, 20 Oct 2021 17:02:23 +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:217729 Archived-At: Robert Pluim writes: > I=CA=BCve installed the fonts in question, and I can reproduce the > issue. What I see: > > - the GTK font selector lets us choose 'Operator Mono Book' > - the resulting weight according to Pango is '330', which we map to > 'normal' [1] Selecting Operator Mono Light reports back a weight of 300 (which is according to spec). Book reports 330 (but should be 380). Medium reports 350 (but should be 500). Bold reports 400 (but should be 700). So for this font, the PangoWeights returned by the Gtk selector are totally out of whack with the spec in pango-font.h. So I'm wondering whether this font is just buggy. I'm trying to compare with what other programs are displaying. It would be convenient to test with a program that understands fonts on the command line, but if I say xfce4-terminal --font "Operator Mono SSm:weight=3Dbook" then I get something that looks very wrong indeed. Anybody know a program that understands these things? > I then cavalierly hardcoded the weight we request to '200', which > results in us asking for 'light', and then we correctly use the 'Book' > version of the font. > > This means we should adjust XG_WEIGHT_TO_SYMBOL. It currently assigns > anything in the range <100-200] to 'light', which just seems wrong. It > all depends whether the fixed values are the start or the end of the > range, but would it not make more sense to have 'light' be used for > the range [300-350> which corresponds to > [PANGO_WEIGHT_LIGHT-PANGO_WEIGHT_SEMILIGHT> ? [2] Well, PANGO_WEIGHT_THIN =3D 100, and PANGO_WEIGHT_ULTRAHEAVY =3D 1000 so it kinda sounds like <=3D, not >=3D is the intended semantic (which is what Emacs does). > [2] I=CA=BCll note that 'w32_to_fc_weight' uses the various FW_* constan= ts > as the start of the respective range, not the end Hm... --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no