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.devel Subject: Re: [PATCH] Fix placement of toggle and radio button in Lucid menu. Date: Sat, 26 Feb 2022 10:53:20 +0200 Message-ID: <83lexyovpb.fsf@gnu.org> References: <87sfs87i5o.fsf@elite.giraud> <87pmnc7f5c.fsf@yahoo.com> <87k0dk7ejd.fsf@yahoo.com> <878rtzb3hr.fsf@elite.giraud> <83h78nqguu.fsf@gnu.org> <87wnhj152u.fsf@elite.giraud> <83a6efqepd.fsf@gnu.org> <87sfs75a99.fsf@yahoo.com> <837d9jqbpd.fsf@gnu.org> <87mtie5vil.fsf@yahoo.com> <83tucmp2lp.fsf@gnu.org> <874k4m5bfv.fsf@yahoo.com> <83o82uoykc.fsf@gnu.org> <87mtie3tzs.fsf@yahoo.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29953"; mail-complaints-to="usenet@ciao.gmane.io" Cc: manuel@ledu-giraud.fr, emacs-devel@gnu.org To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Feb 26 10:00:01 2022 Return-path: Envelope-to: ged-emacs-devel@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 1nNsvp-0007bg-62 for ged-emacs-devel@m.gmane-mx.org; Sat, 26 Feb 2022 10:00:01 +0100 Original-Received: from localhost ([::1]:50318 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nNsvn-0003Vy-FP for ged-emacs-devel@m.gmane-mx.org; Sat, 26 Feb 2022 03:59:59 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:58422) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nNspe-0000a1-Jr for emacs-devel@gnu.org; Sat, 26 Feb 2022 03:53:38 -0500 Original-Received: from [2001:470:142:3::e] (port=45446 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 1nNspd-0000Z8-J2; Sat, 26 Feb 2022 03:53:37 -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=sRtS3W7oIzBphUwhN3cBYOYv39XDIwSv/VWuS4mRiBY=; b=JFw3PeZbZVdy 8vtyOaBcTaayJnA+dC9J7jPm4FCN+BLmwXfJYCdfo24edEq3mUo56DD3Nja5U+IlGLSAV95SEDqiY 6jpi8CZ+tYj+ZIxm+LnRIGyAXhAeNw11eZ4vB5iP/P/NEu47UV2dtmXEF3RxPp3+KXylpf6xU1cfS 0ufkCpTo3Ym9qRiOBtsAoGVdGPB0BLi3TCGiLvIuUJFE1mKP2haQPxt2ZNkwuOwCG9TwNUKzIp8T5 iXnhibpY/53uSZwuuv+vKu07kkI7MjKPccHFACN0SzpmrqF9M2L6n4hlZCtgAg2UmGDi/zu2rrd0s VZX3VlR10Ng+zvzHSQk8tA==; Original-Received: from [87.69.77.57] (port=1136 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 1nNspc-0007VG-Hv; Sat, 26 Feb 2022 03:53:37 -0500 In-Reply-To: <87mtie3tzs.fsf@yahoo.com> (message from Po Lu on Sat, 26 Feb 2022 16:35:51 +0800) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:286700 Archived-At: > From: Po Lu > Cc: manuel@ledu-giraud.fr, emacs-devel@gnu.org > Date: Sat, 26 Feb 2022 16:35:51 +0800 > > Eli Zaretskii writes: > > > That's not the impression I get when I look at the definition of > > MENU_FONT_HEIGHT in xlwmenu.c: it does use the font attributes used by > > the "usual" font backends, at least in the case of XFT and Cairo. Am > > I missing something? > > They are the same attributes, but I think they're computed differently. > > AFAIK the font backends calculate ascent and descent on a per-glyph > basis, while the Lucid menu bar widget uses the maximum ascent and > descent values for the entire font. Are you sure? We have the font's "global" ascent, descent, and height values in the font backends as well. See, for example, ftfont.c around line 1390. We do also use per-character glyph metrics as well, in gui_produce_glyphs, which is why I suggested to compare those for the font used in the Lucid menus. But we use the font's global values as fallback.