You are not logged in.

#1 2019-10-30 16:00:29

THX1342
Member
Registered: 2019-10-30
Posts: 6

[SOLVED] Urxvt not loading secondary (fallback) fonts

I can get my secondary font to work if I put it first on the list, but no matter how I try to format the URxvt*font line, I can't get it to load any other font as a fallback/secondary.

I also tested all fonts I am trying to use with urxvt -fn and they work fine when loaded individually.

This is my .Xresources:

!! URxvt Appearance
URxvt*font:	xft:ShureTechMono Nerd Font:size=12, \
			xft:Symbola:size=12
!!URxvt*depth: 32
!!URxvt*letterSpace: 0
!!URxvt*lineSpace: 0
!!URxvt*geometry: 92x24
URxvt*internalBorder: 20
URxvt*cursorBlink: true
URxvt*cursorUnderline: false
!!URxvt*saveline: 2048
URxvt*scrollBar: false
URxvt*scrollBar_right: false
URxvt*urgentOnBell: true
!!URxvt*iso14755: false
URxvt*transparent: true 
URxvt*shading: 10
!!URxvt*blurRadius: 3

! special
*.foreground:   #a9a79f
*.background:   #20201d
*.cursorColor:  #a6a28c

! black
*.color0:       #20201d
*.color8:       #7a7971

! red
*.color1:       #d73737
*.color9:       #d73737

! green
*.color2:       #60ac39
*.color10:      #60ac39

! yellow
*.color3:       #cfb017
*.color11:      #cfb017

! blue
*.color4:       #6684e1
*.color12:      #6684e1

! magenta
*.color5:       #b854d4
*.color13:      #b854d4

! cyan
*.color6:       #1fad83
*.color14:      #1fad83

! white
*.color7:       #a6a28c
*.color15:      #fefbec


!! Xft
Xft.dpi: 96
Xft.antialias: true
Xft.hinting: true
Xft.hintful: true

!! Common Keybinds for Navigation
URxvt.keysym.Shift-Up: command:\033]720;1\007
URxvt.keysym.Shift-Down: command:\033]721;1\007
URxvt.keysym.Control-Up: command:\033[1;5A
URxvt.keysym.Control-Down: command:\033[1;5B
URxvt.keysym.Control-Right: command:\033[1;5C
URxvt.keysym.Control-Left: command:\033[1;5D

!! Copy/Paste & Other Extensions
URxvt.perl-ext-common: default,clipboard,url-select,keyboard-select,resize-font
URxvt.copyCommand: xclip -i -selection clipboard
URxvt.pasteCommand: xclip -o -selection clipboard
URxvt.keysym.M-c: perl:clipboard:copy
URxvt.keysym.M-v: perl:clipboard:paste
URxvt.keysym.M-C-v: perl:clipboard:paste_escaped
URxvt.keysym.M-Escape: perl:keyboard-select:active
URxvt.keysym.M-s: perl:keyboard-select:search
URxvt.keysym.M-u: perl:url-select:select_next
URxvt.url-select.launcher: torb 
URxvt.url-select.button: 1
URxvt.url-select.underline: true

This is locale -a:

C
en_US.utf8
POSIX

locale:

LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

$TERM

rxvt-unicode-256color

I use urxvtd -q -o -f as a daemon and launch urxvt simply with urxvt, no additional commands.

What am I missing here?

Last edited by THX1342 (2019-11-06 03:25:47)

Offline

#2 2019-10-30 16:16:22

THX1342
Member
Registered: 2019-10-30
Posts: 6

Re: [SOLVED] Urxvt not loading secondary (fallback) fonts

I started urxvt inside another terminal (manually) and when I try the following command:

printf "\u27a4\n"

I get the following error:

urxvt: unable to calculate font width for 'Bitstream Vera Sans Mono:slant=0:weight=100:pixelsize=19:antialias=False:autohint=True:minspace=True', ignoring.
urxvt: unable to calculate font width for 'Courier New:slant=0:weight=100:pixelsize=19:antialias=False:autohint=True:minspace=True', ignoring.
urxvt: unable to calculate font width for 'Andale Mono:slant=0:weight=100:pixelsize=19:antialias=False:autohint=False:minspace=True', ignoring.
urxvt: unable to calculate font width for 'FreeMono:slant=0:weight=100:pixelsize=19:autohint=True:minspace=True', ignoring.

I don't understand where it is getting those fonts from since they are not in my .Xresources. I have looked in my home folder for any other relevant .X* files but found none.

Offline

#3 2019-10-30 16:20:30

seth
Member
Registered: 2012-09-03
Posts: 12,895

Re: [SOLVED] Urxvt not loading secondary (fallback) fonts

xrdb -q | grep -i urxvt

I don't think urxvt will like the space in the definition (after the comma)

Offline

#4 2019-10-30 16:22:07

THX1342
Member
Registered: 2019-10-30
Posts: 6

Re: [SOLVED] Urxvt not loading secondary (fallback) fonts

I've tried removing the comma, also tried breaking the line with \

Offline

#5 2019-10-30 23:03:06

seth
Member
Registered: 2012-09-03
Posts: 12,895

Re: [SOLVED] Urxvt not loading secondary (fallback) fonts

The main question was actually what ended up in the xrdb (ie. the output of the command)

Offline

#6 2019-10-31 20:40:24

THX1342
Member
Registered: 2019-10-30
Posts: 6

Re: [SOLVED] Urxvt not loading secondary (fallback) fonts

seth wrote:

The main question was actually what ended up in the xrdb (ie. the output of the command)

Oh, I misunderstood you. The output is as follows (a bit different from my initial setup, but the issue remains):

URxvt*background:	[100]#070C0C
URxvt*borderColor:	[100]#070C0C
URxvt*cursorBlink:	true
URxvt*cursorColor:	#ccdcd1
URxvt*cursorUnderline:	false
URxvt*depth:	32
URxvt*font:	xft:ShureTechMono Nerd Font:size=12, xft:Symbola:style=Regular:size=10
URxvt*foreground:	#ccdcd1
URxvt*internalBorder:	20
URxvt*scrollBar:	false
URxvt*scrollBar_right:	false
URxvt*shading:	10
URxvt*transparent:	true
URxvt*urgentOnBell:	true
URxvt.copyCommand:	xclip -i -selection clipboard
URxvt.keysym.Control-Down:	command:\033[1;5B
URxvt.keysym.Control-Left:	command:\033[1;5D
URxvt.keysym.Control-Right:	command:\033[1;5C
URxvt.keysym.Control-Up:	command:\033[1;5A
URxvt.keysym.M-C-v:	perl:clipboard:paste_escaped
URxvt.keysym.M-Escape:	perl:keyboard-select:active
URxvt.keysym.M-c:	perl:clipboard:copy
URxvt.keysym.M-s:	perl:keyboard-select:search
URxvt.keysym.M-u:	perl:url-select:select_next
URxvt.keysym.M-v:	perl:clipboard:paste
URxvt.keysym.Shift-Down:	command:\033]721;1\007
URxvt.keysym.Shift-Up:	command:\033]720;1\007
URxvt.pasteCommand:	xclip -o -selection clipboard
URxvt.perl-ext-common:	default,clipboard,url-select,keyboard-select,resize-font
URxvt.url-select.button:	1
URxvt.url-select.launcher:	torb
URxvt.url-select.underline:	true

Offline

#7 2019-10-31 21:29:22

seth
Member
Registered: 2012-09-03
Posts: 12,895

Re: [SOLVED] Urxvt not loading secondary (fallback) fonts

Yeah, I worried about the blank, not the comma (that's required):

URxvt*font:	xft:ShureTechMono Nerd Font:size=12,xft:Symbola:size=12

Don't forget to "xrdb -m ~/.Xresources" (the rdb slightly differs from your last posted resource file)

What exactly is "ShureTechMono Nerd Font"? (File source, there seems no AUR)

Offline

#8 2019-11-04 10:16:16

THX1342
Member
Registered: 2019-10-30
Posts: 6

Re: [SOLVED] Urxvt not loading secondary (fallback) fonts

Yes I've been using `xrdb` to reload settings.

Nerd fonts is a patched font package: https://aur.archlinux.org/packages/nerd-fonts-complete/

Offline

#9 2019-11-04 15:25:40

seth
Member
Registered: 2012-09-03
Posts: 12,895

Re: [SOLVED] Urxvt not loading secondary (fallback) fonts

It's not the blank, but you're probably running into the glyph box problem - try "xft:Symbola:size=8" (ie. a smaller font) - if that works, increase the size of the secondary font as long as possible.

Offline

#10 2019-11-05 05:35:14

THX1342
Member
Registered: 2019-10-30
Posts: 6

Re: [SOLVED] Urxvt not loading secondary (fallback) fonts

seth wrote:

It's not the blank, but you're probably running into the glyph box problem - try "xft:Symbola:size=8" (ie. a smaller font) - if that works, increase the size of the secondary font as long as possible.

Awesome, that did the trick. smile I think I tried changing the size, but increasing it and not decreasing! Thank you for the help. Is there a way for me to close this thread?

Offline

#11 2019-11-05 08:02:43

seth
Member
Registered: 2012-09-03
Posts: 12,895

Re: [SOLVED] Urxvt not loading secondary (fallback) fonts

You can alter the subject by editing your initial post, just prepare [SOLVED], closing is for mods to lock a thread.

Offline

Board footer

Powered by FluxBB