Font problem in migration 2.6.8 to 2.7.0 [solved]

As just posted I have just updated a laptop from (X)ubuntu 22.04 to 24.04 and this
resulted in an update of fvwm from 2.6.8 to 2.7.0

I am experiencing a problem with the fonts of the buttons of a FvwmButtons.

My configuration (described, with screenshots and sample .fvwmrc in Me and windows) has a button box called MyBox in the top-right side if the screen.

As it works on my 20.04 desktop and worked on the 22.04 laptop, it has buttons (the ones labelled “task bar on/off”, the date, “1/2H/2V/2X”, “Pager on/off” etc.). These buttons appear in a bold font.

Now on Ubuntu 24/04 with fvwm 2.7.0 these buttons appear empty. They do work (when clicked). I see no errors in .xsession-errors.

If I remove (comment out) the *MyBox: Font line in .fvwm2rc (so that it uses the default font), the button text appears, in a smaller and not bold font.

BTW, xlsfonts shows the laptop has all the same fonts than the 20.04 desktop (plus others).

The font definitions (inherited from previous installations, I suspect some of them might be emulated) are such that *MyBox: Font is the same as *MyTaskBar: Font and the latter (another FvwmButton containing an FvwmIconMan) displays the bold font correctly

What can be the cause of all this, and is there a way out ?

Fonts are most likely drawn by xft and font config. These fonts due to dpi settings and the likes can be different sizes on different machines. FvwmButtons are a fixed size, if for some reason the font makes what you want to put into the button too big, it just won’t be seen. You should be able to get it to work by either increasing the size of the buttons that contain the text, or decreasing the font/text size you want to contain.

Thanks. Increasing *MyBox: ButtonGeometry from 150x25 to 150x26 did it. 1 pixel !
At the same time I had to adjust by trial and error *MyBox: Geometry.

The curious thing is/was that *MyTaskBar used an height of 24 and there the same bold font was always displayed.

I suppose the new Xubuntu release somehow altered the font characteristics (on the same machine!), and that there is a subtle interaction between Geometry and ButtonGeometry !

Most likely it was due to fontconfig, upstream fontconfig switched from DejaVu to Noto as its default sans and sans-seirf fronts (partly due to Noto having better support for utf-8 as it is supported by google). Anyways, this change would have slightly altered font appearances and sizes.

Fvwm and FvwmModules in particular are fairly static in that they won’t automatically adjust to fit content, so configurations may need adjusted between machines that have different fonts, dpi, etc.

After about 1 month I did the migration from (X)Ubuntu 20 to 24 also on my desktop. Contextually I migrated fvwm to fvwm3 and propagated (successfully) the config I prepared when I id the laptop (the stuff above in this thread).
Now, maybe because the desktop is using a larger screen, I see another eye-annoying effect with the fonts. This seems to affect the fonts in fvwm menus (and a similar effect happens in the Pale Moon browser (GTK2 version)), namely it looks like that the line spacing is larger (while the font size seems rhe same).

I am unable to post the snapshots I prepared, but for instance 9 menu items now occupy the space of 10 items in the old arrangement.

I tried to install fonts-ubuntu-classic and droid-sans-fallback, but I am not familiar enough with font handling. I tried xfd -fa on some font names, it looks like for instance that the “sans serif” or “droid sans” or “Helvetica Bold 12” (the gtk2 one used by the browser) is mapped to Noto Sans-12.

I could ask on an Ubuntu forum, but they seem to dislike who works in non-default desktop environments, so I prefer to ask here on the fvwm forum.

This really isn’t an fvwm issue, but as I mentioned fontconfig switched from DejaVu to Noto as the default fonts. You either have to remove all Noto fonts and install DejaVU fonts, or write a custom fontconfig configuration file to let it know to choose DejaVu over Noto.

Thanks. I already started looking on the net for tutorials about fontconfig (which I am not at all familiar with).
I hoped to find here (or elsewhere) a suggestion like
(a) a choice of a particular font existing in ubuntu 24 which has the desired graphical appearance; (b) a parameter in existing fonts which controls the graphical appearance (I do not know the typographical terminology, but Noto has excessive vertical spacing between lines); (c) an Xresources solution (are font-related items in fvwm config related to that ?).

Concerning (c) since ages I use an editor (THE) which I customized in its Xresource file with things like the.normalFont: --Terminal-Bold-R-Narrow–-140---C-*-ISO8859-1 where the pcf files of those fonts are privately installed in a directory under my home, which I use with xset +fp ~lucio/MyFont

But maybe fontconfig and Xresources are unrelated and I am simply too old :-) ?

BTW, I have a full backup of the previous system on an offline disk.

Apparently I found the simplest solution.
Since the dejavu fonts are already installed, for fvwm menu it was enough to refer to it explicitly in MenuStyle * Font "StringEncoding=UTF-8:xft:dejavu sans …

For my browser, it was enough in its preferences to replace the generic “serif” and “sans serif” (defaulting to whatever “system default”) with their explicit dejavu version.

Issue closed !