unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Robert Pluim <rpluim@gmail.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Jesse Sheidlower <jester@panix.com>, 51277@debbugs.gnu.org
Subject: bug#51277: 27.1; menu-set-font not loading correct font
Date: Thu, 21 Oct 2021 09:40:19 +0200	[thread overview]
Message-ID: <87wnm625cs.fsf@gmail.com> (raw)
In-Reply-To: <87ee8fktxv.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 21 Oct 2021 04:11:56 +0200")

>>>>> On Thu, 21 Oct 2021 04:11:56 +0200, Lars Ingebrigtsen <larsi@gnus.org> 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 are
    Lars> totally out of whack with the spec in pango-font.h.  So I'm wondering
    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.  It 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=book"

    Lars> then I get something that looks very wrong indeed.  Anybody know a
    Lars> program that understands these things?

    FC_DEBUG=1 xfce4-terminal --font "Operator Mono SSm:weight=book"

will get you fontconfig debug telling you which actual font is
used.

   Lars> Well,

    Lars>   PANGO_WEIGHT_THIN = 100,

    Lars> and

    Lars>   PANGO_WEIGHT_ULTRAHEAVY = 1000

    Lars> so it kinda sounds like <=, not >= is the intended semantic (which is
    Lars> what Emacs does).

gedit rounds down to the nearest multiple of 100, which equates to >=

I guess the root cause of all of this is that weʼre mapping
PangoWeights to symbolic constants, which we then pass to
fontconfig. Perhaps we could arrange to pass the weights directly?

    >> [2]  Iʼll note that 'w32_to_fc_weight' uses the various FW_* constants
    >> as the start of the respective range, not the end

    Lars> Hm...

Didnʼt I say itʼs a mess? ;-)

Robert
-- 





  reply	other threads:[~2021-10-21  7:40 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-18 22:08 bug#51277: 27.1; menu-set-font not loading correct font Jesse Sheidlower
2021-10-19 11:08 ` Eli Zaretskii
     [not found]   ` <YW64Fi5/BIFRQ0R5@panix.com>
2021-10-19 12:43     ` Eli Zaretskii
2021-10-19 13:08       ` Jesse Sheidlower
2021-10-19 15:58         ` Eli Zaretskii
2021-10-19 16:47           ` Jesse Sheidlower
2021-10-19 17:29             ` Eli Zaretskii
2021-10-19 18:08               ` Jesse Sheidlower
2021-10-19 18:14                 ` Eli Zaretskii
2021-10-19 18:17                   ` Jesse Sheidlower
2021-10-20  8:50                     ` Robert Pluim
2021-10-20 11:30                       ` Jesse Sheidlower
2021-10-20 12:36                         ` Eli Zaretskii
2021-10-20 15:02                           ` Robert Pluim
2021-10-20 15:12                             ` Lars Ingebrigtsen
2021-10-20 15:20                               ` Robert Pluim
2021-10-20 16:22                               ` Eli Zaretskii
2021-10-21  2:13                                 ` Lars Ingebrigtsen
2021-10-21  2:11                             ` Lars Ingebrigtsen
2021-10-21  7:40                               ` Robert Pluim [this message]
2021-10-21 12:59                                 ` Lars Ingebrigtsen
2021-10-21 15:37                                   ` Robert Pluim
2021-10-22 14:27                                     ` Lars Ingebrigtsen
2021-10-20 12:31                       ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wnm625cs.fsf@gmail.com \
    --to=rpluim@gmail.com \
    --cc=51277@debbugs.gnu.org \
    --cc=jester@panix.com \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).