emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Fix placement of toggle and radio button in Lucid menu.


From: Eli Zaretskii
Subject: Re: [PATCH] Fix placement of toggle and radio button in Lucid menu.
Date: Sat, 26 Feb 2022 10:53:20 +0200

> From: Po Lu <luangruo@yahoo.com>
> Cc: manuel@ledu-giraud.fr,  emacs-devel@gnu.org
> Date: Sat, 26 Feb 2022 16:35:51 +0800
> 
> Eli Zaretskii <eliz@gnu.org> 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]