LukeSmithxyz/dwm

Xresources loading fonts unsupported?

Closed this issue · 1 comments

I can see pretty clearly that config.h does not include something like
{ "font", STRING, &fonts[0] },
{ "font1", STRING, &fonts[1] },
to load a font from xresources. I've added that myself but when dwm tries to start it gets to my background and then crashes. Is there some way to use xresources to set the fonts for this build of dwm? My fonts are set exactly the same in both xresources and dwm:
xresources
*.font: FantasqueSansMono Nerd Font Mono:size=14:antialias=true:autohint=true
*.font1: JoyPixels:pixelsize=12:antialias=true:autohint=true'
config.h
static char *fonts[] = {
"FantasqueSansMono Nerd Font Mono:size=14:antialias=true:autohint=true",
"JoyPixels:pixelsize=12:antialias=true:autohint=true"
};
I get no errors when building dwm with the above addition but it still crashes. Maybe I'm going about this in a dumb way, if so please let me know what I'm doing wrong and the orthodox way of getting dwm to load fonts from xresources.

Check out the font2(?) patch on Suckless's site. I'm not sure if it can read multiple alternative fonts. I'm not too interested in this myself, since I use fontconfig to order fonts and just have dwm look to the defaults set their, which minimizes the need for font complexity in dwm.