Closed B4rb3rouss closed 3 years ago
It occurs because (1) there are two types of font specification in X, the old X Logical Font Description and the modern Fontconfig, xmenu uses the modern fontconfig; and (2), xmenu gives preference to the configuration in .Xresources
over config.h
.
So if you are using the old-style X Logical Font Description in your .Xresources
, xmenu will try to use that and fail, because it'll not understand the font description.
The solution is to add the following line to your .Xresources
:
xmenu.font: DejaVuSansMono:pixelsize=12:antialias=true
A specific xmenu.font
will override the more general *font
in your .Xresources
.
There's no need to change the code.
I get it why my diff isn't appropriate. However, if xmenu find in Xresources this string "-misc-dejavu sans mono-medium-r-normal--17------iso10646-1", I guess it should fallback to fonts defined in config.h. That's not what's happening in my case.
The solution is to add the following line to your .Xresources:
It might be written somewhere in README (maybe I missed it).
btw, thank you for xmenu, it was missing :)
It might be written somewhere in README (maybe I missed it).
That's in the manpage, sorry :/
However, if xmenu find in Xresources this string
-misc-dejavu sans mono-medium-r-normal-*-17-*-*-*-*-*-iso10646-1
, I guess it should fallback to fonts defined in config.h. That's not what's happening in my case.
If I do it for the font
X resource I would have to do it for all X resources, and that would add some overhead to xmenu initialization.
The font defined in config.h is not loaded. It seems to be only "sans". Actually, only a font found in ~/.Xresources is used, but is not suitable for xmenu. i.e. :
I didn't manage to make xmenu.c handle config.h properly. Instead, I changed the Resource used and now, the font is the good one.
in ~/.Xresources :
And applied this diff:
It is more like a workaround than a real fix... sorry for that.