1

I'm trying to change fonts in URxvt.

$ fc-match "FuraCode Nerd Font Mono"
Fura_Code_Regular_Nerd_Font_Complete_Mono.otf: "FuraCode Nerd Font Mono" "Regular"

But when changing ~/.Xresources like this

URxvt.font:  xft:FuraCode Nerd Font Mono:pixelsize=12

and running

xrdb -merge  ~/.Xresources

The next session uses the same font as i3. Tried the same with xterm and it is working.

What am i doing wrong?

edit:

urxvt -fn "xft:FuraCode Nerd Font Mono:pixelsize=15"

is working too.

In ~/xsession-errors: urxvt: unable to load base fontset, please specify a valid one using -fn, aborting

closed as off-topic by mosvy, Shadur, JigglyNaga, Jeff Schaller, intelfx Jan 12 at 14:44

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – mosvy, Shadur, JigglyNaga, intelfx
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 3
    don't you need a colon (:) after URxvt.font? – mosvy Dec 31 '18 at 19:40
  • yes (and since resource-names can have blanks, the setting is misleading) – Thomas Dickey Dec 31 '18 at 22:17
  • @mosvy that was a typo in my post, in the Xresourses it is correct – JDizzle Jan 1 at 14:37
  • 2
    Cannot reproduce your problem. Running echo 'URxvt.font: xft:FuraCode Nerd Font Mono:pixelsize=12' | xrdb -override will cause urxvt to use that font on my system. You have something else; I highly doubt that the resources were added correctly; please add the output of xprop -root | egrep -o 'URxvt([^\\]|\\t)*' to your question. – mosvy Jan 3 at 13:00
0

According to Xsession(5):

"X resources are merged. run-parts is again used, this time to identify files in the /etc/X11/Xresources directory that should be processed with ‘xrdb -merge’. Next, if the line ‘allow-user-resources’ is present in Xsession.options, the user's $HOME/.Xresources file is merged in the same way."

So you should make sure your "/etc/X11/Xsession.options" certainly have the correct entry.

I am not much an X(7) user but for those cases I run Xorg I use the old method to personalize urxvt with "/home/user/.Xdefaults" but the format it's a bit different than the one you explains.

If you need here you have the correct way to set the font:

: cat .Xdefaults 
!rxvt
rxvt*foreground:        white
rxvt*background:        black
rxvt*cursorColor:       white
rxvt*pointerColor:      white
rxvt*borderColor:       black
rxvt*font:  -xos4-terminus-medium-r-normal-*-16-*-72-72-c-80-*-*
etcetera...

To get the correct name for your font you can use xfontsel(1)

P.S.: You could try to put rxvt instead of urxvt in your ~/.Xresources.

  • My setup does not use Xsession, but merging is done the correct. Using rxvt broke URxvt. Xdefault with Fure Code font broke too. in ~/.xsession-errors there is urxvt: unable to load base fontset, please specify a valid one using -fn, aborting – JDizzle Jan 1 at 15:03
0

Solved by hard coding in i3 config:

# start a terminal
bindsym $mod+Return exec urxvt -fn "xft:FuraCode Nerd Font Mono:style=Light:pixelsize=12" 

Not the answer you're looking for? Browse other questions tagged or ask your own question.