You are not logged in.

#1 2012-04-16 03:25:45

djb
Member
Registered: 2012-04-15
Posts: 3

[SOLVED] Can't get DejaVu Sans Mono to work with urxvt

Hi all,

I'm trying to use DejaVu Sans Mono (through the ttf-dejavu package) with rxvt-unicode — specifically rxvt-unicode-patched from AUR. When I run urxvt I simply get the following error:

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

Here's the contents of my .Xresources:

URxvt.scrollBar: off
URxvt.font: xft:DejaVu Sans Mono:pixelsize=11

And here's my .xinitrc:

xset +fp /usr/share/fonts/TTF
xset fp rehash
fc-cache -fv
xrdb -load ~/.Xresources
urxvt &
xmonad

Any help on this issue would be much appreciated. Let me know if there's any other information which might be useful.

Last edited by djb (2012-04-16 18:51:37)

Offline

#2 2012-04-16 04:13:12

swanson
Member
From: Sweden
Registered: 2011-02-05
Posts: 759

Re: [SOLVED] Can't get DejaVu Sans Mono to work with urxvt

This works for me;
urxvt*font: xft:DejaVu Sans Mono:size=28

A bit different.

Offline

#3 2012-04-16 07:47:29

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: [SOLVED] Can't get DejaVu Sans Mono to work with urxvt

I use this:

URxvt.font: xft:Monospace:pixelsize=14.5

P.s., this part shouldn't be necessary:

xset +fp /usr/share/fonts/TTF
xset fp rehash
fc-cache -fv

It repopulates the font database each time you start x, which is quite a heavy operation.


ᶘ ᵒᴥᵒᶅ

Offline

#4 2012-04-16 08:41:33

Alber
Member
From: Spain - España
Registered: 2011-11-11
Posts: 227

Re: [SOLVED] Can't get DejaVu Sans Mono to work with urxvt

In my .Xresources I have this, and it works.

urxvt.font:     xft:DejavuSansMono:pixelsize=20

The name without spaces.

Last edited by Alber (2012-04-16 08:42:10)


Because not all of us are native English speakers, try no to use slang or abbreviations, thank you.

Offline

#5 2012-04-16 10:03:59

bohoomil
Member
Registered: 2010-09-04
Posts: 2,376
Website

Re: [SOLVED] Can't get DejaVu Sans Mono to work with urxvt

A line taken from urxvt man page:

urxvt -fn "xft:Bitstream Vera Sans Mono:pixelsize=15"

Your Xdefaults config seems OK and it should work. You can clean your xinitrc as litemotiv pointed out because you don't need to rebuild your font db before every X session. However, if you use 'Monospace' instead of the font name, be sure you have a proper alias in your fontconfig directory, i.e. your system knows which font to use as Monospace; you can check it by issuing

fc-match Monospace

which in my case outputs

Consolas.ttf: "Consolas" "Regular"

The problem you're experiencing in most cases means that the application cannot read font parameters properly. To get rid of it, you may clean your font cache (/var/cache/fontconfig, $HOME/.fontconfig) and re-run (as user)

fc-cache -f -v

After restarting your X environment, things would probably work as expected.


:: Registered Linux User No. 223384

:: github
:: infinality-bundle+fonts: good looking fonts made easy

Offline

#6 2012-04-16 16:53:05

djb
Member
Registered: 2012-04-15
Posts: 3

Re: [SOLVED] Can't get DejaVu Sans Mono to work with urxvt

Thanks for the replies everyone.

Unfortunately I'm still unable to get things to work. I deleted all the files in ~/.fontconfig and /var/cache/fontconfig, ran fc-cache -f -v as user and cleaned my .xinitrc as per litemotiv's suggestion.

Here's the current state of things:

.xinitrc:

xrdb -load ~/.Xresources
urxvt &
xmonad

.Xresources (unchanged):

URxvt.scrollBar: off
URxvt.font: xft:DejaVu Sans Mono:pixelsize=11

Output of "fc-match Monospace":

DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"

I was unable to get things working by trying "xft:Monospace:pixelsize=11" in my .Xresources.

I installed ttf-bitstream-vera and tried verbatim the urxvt -fn invocation from the man page (in boohomil's post) but received the same error.

Any ideas, anyone?

Offline

#7 2012-04-16 16:57:55

matse
Member
Registered: 2011-04-27
Posts: 299

Re: [SOLVED] Can't get DejaVu Sans Mono to work with urxvt

Try the urxvt from the official repos.

Offline

#8 2012-04-16 17:41:01

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,802

Re: [SOLVED] Can't get DejaVu Sans Mono to work with urxvt

Just a sanity check, what is the output of:
pacman -Qs dejavu
??
tongue


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#9 2012-04-16 17:43:45

spark666
Member
Registered: 2011-05-23
Posts: 137

Re: [SOLVED] Can't get DejaVu Sans Mono to work with urxvt

do you have libxft installed?maybe you need it smile

Offline

#10 2012-04-16 18:51:01

djb
Member
Registered: 2012-04-15
Posts: 3

Re: [SOLVED] Can't get DejaVu Sans Mono to work with urxvt

Problem solved! Much thanks to everyone for your suggestions!

I tried the official rxvt-unicode, as matse suggested, and things are working beautifully now.

I'll look into filing a bug report for rxvt-unicode-patched in AUR.

Offline

Board footer

Powered by FluxBB