You are not logged in.

#1 2018-01-10 22:21:31

lukasz1996
Member
Registered: 2018-01-10
Posts: 3

[SOLVED] urxvt: unable to load base fontset

Hello, I am trying to change font in urxvt but I get error mentioned in title. When I am trying to set font from file /usr/share/fonts/misc/fonts.alias everything works fine. Using xtf results in same font. no matter which one I choose.

.xinitrc:

xrdb -merge ~/.Xresources
exec i3

.Xresources:

URxvt*background: #BBBBBB

Commands I've used and output:
in:

fc-list -v | grep -i "fullname: \"dejavu sans\"" -B 5 -A 10

out:

Pattern has 23 elts (size 32)
	family: "DejaVu Sans"(s)
	familylang: "en"(s)
	style: "Book"(s)
	stylelang: "en"(s)
	fullname: "DejaVu Sans"(s)
	fullnamelang: "en"(s)
	slant: 0(i)(s)
	weight: 80(i)(s)
	width: 100(i)(s)
	foundry: "PfEd"(s)
	file: "/usr/share/fonts/TTF/DejaVuSans.ttf"(s)
	index: 0(i)(s)
	outline: True(s)
	scalable: True(s)
	charset: 

in:

urxvt -fn "DejaVu Sans"

out:

urxvt: unable to load base fontset, please specify a valid one using -fn, aborting.

in:

fc-match "DejaVu Sans"

out:

DejaVuSans.ttf: "DejaVu Sans" "Book"

in:

pacman -Qs dejavu

out:

local/ttf-dejavu 2.37-1
    Font family based on the Bitstream Vera Fonts with a wider range of characters

Last edited by lukasz1996 (2018-01-11 00:01:03)

Offline

#2 2018-01-10 22:30:19

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED] urxvt: unable to load base fontset

man urxvt | less -p fontlist
urxvt -fn "xft:DejaVu Sans Mono"

Also, your .xinitrc is broken: read the wiki page.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2018-01-10 22:34:25

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,543
Website

Re: [SOLVED] urxvt: unable to load base fontset

Please also post the output of `pacman -Qi rxvt-unicode`.

Edit: That is if the above doesn't work.  I first tested here, and indeed I got the same error.  Then I added the "xft:" and fontsize bits which seemed to be obvious errors.  But I still got the same error ... because I have a recompiled urxvt without xft.  So I just assumed the OP might to without going back to the far more parsimonious explanation that they just need "xft:"

Last edited by Trilby (2018-01-10 22:36:41)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#4 2018-01-10 23:03:23

lukasz1996
Member
Registered: 2018-01-10
Posts: 3

Re: [SOLVED] urxvt: unable to load base fontset

Font works now, but I don't fully understand what is wrong with my xinitrc file, I guess it should look something like that:

#!/bin/sh

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then
    xrdb -merge $sysresources
fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f "$userresources" ]; then
    xrdb -merge "$userresources"
fi

if [ -f "$usermodmap" ]; then
    xmodmap "$usermodmap"
fi

# start some nice programs

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
 for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
  [ -x "$f" ] && . "$f"
 done
 unset f
fi

exec i3

Am I right?

Offline

#5 2018-01-10 23:24:37

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED] urxvt: unable to load base fontset

Yes.

Please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#6 2018-01-11 00:00:49

lukasz1996
Member
Registered: 2018-01-10
Posts: 3

Re: [SOLVED] urxvt: unable to load base fontset

Thanks for help.

Offline

Board footer

Powered by FluxBB