23

I've noticed that the fonts in URxvt look a little bit low-res compared to fonts that I see in my browser, for example.

I was wondering how could I fix my .Xdefaults file to make the fonts have a little bit more detail and be sharper.

It might not be visible in this picture, but I can definitely notice the difference when looking myself:

enter image description here

Here is my current .Xdefaults:

URxvt*background: Black
URxvt*foreground: White
URxvt*geometry: 80x30
URxvt*scrollBar: false

"URxvt.font: 9x15

!-- Xft settings -- !
Xft.dpi:        96
Xft.antialias:  true
Xft.rgba:       rgb
Xft.hinting:    true
Xft.hintstyle:  hintfull

! -- Fonts -- !
URxvt.font:xft:Monospace:pixelsize=15
URxvt.boldfont:xft:Monospace-Bold:pixelsize=15
3
  • 1
    have you tried comparing a black on white terminal with the browser? Commented Jul 4, 2013 at 12:43
  • No, is a difference expected? I'll compare it soon I guess.
    – jcora
    Commented Jul 4, 2013 at 13:49
  • I also see now that you are comparing two different fonts. Maybe you should switch the font. Commented Jul 4, 2013 at 14:24

2 Answers 2

23

In ~/.Xresources, put, for example, the below config. (There are some other configurations of urxvt that might interest you here (note that this is a plain text file, posted on the web; you may want to use "View Source" to read it).  There you also find another color scheme, that might be better if you ever experience eye problems because of too bright lights emitting from a monitor.  More colors stuff.)

Then, in ~/.xinitrc, put xrdb ~/.Xresources.

For testing, an alias like alias xup="xrdb ~/.Xresources" could be useful, then simply start a new instance of urxvt.

URxvt.font:     xft:bitstream vera sans mono:size=16:antialias=true
URxvt.boldFont: xft:bitstream vera sans mono:bold:size=16:antialias=true

URxvt*color0:  #000000 // black
URxvt*color1:  #B40000 // red
URxvt*color2:  #00AA00 // green
URxvt*color3:  #AAAA00 // yellow
URxvt*color4:  #5555AA // blue
URxvt*color5:  #AA00AA // magenta
URxvt*color6:  #00AAAA // cyan
URxvt*color7:  #AAAAAA // white
URxvt*color8:  #555555 // black (now and below: bright)
URxvt*color9:  #FF0000 // red
URxvt*color10: #00FF00 // green
URxvt*color11: #FFFF00 // yellow
URxvt*color12: #6464FF // blue
URxvt*color13: #FF00FF // magenta
URxvt*color14: #00FFFF // cyan
URxvt*color15: #FFFFFF // white

Here is what it looks like:

Gnus

urxvt:

7
  • 7
    The OP was specifically asking about font configuration, not colors...
    – jasonwryan
    Commented Jul 4, 2013 at 19:53
  • @jasonwryan: Yeah, there are font stuff in my answer as well, even if you don't include colors as part of font. Commented Jul 4, 2013 at 19:55
  • 1
    Um, no. Your font lines just replicate the settings (antialias) that the OP is already using and use a different font...
    – jasonwryan
    Commented Jul 4, 2013 at 20:15
  • 4
    OP is asking for font configuration help: you haven't provided any...
    – jasonwryan
    Commented Jul 4, 2013 at 20:52
  • 1
    Maybe OP was asking about font config but this answer offers font config AND the likely next question which is color schemes and general urxvt config setup. I found this answer extremely helpful. Commented Mar 23, 2016 at 20:08
10

There are a couple of good resources available for font configuration. The first I would recommend is the Arch wiki page, it has details on how to manually configure your fonts.conf or how to install and use the various patchsets (like infinality—which are distro agnostic).

There is also a long thread on the Gentoo boards that has a lot of good tips, but requires some wading through.

Ultimately, font appearance is quite subjective.

The settings that you have in your .Xresources look fine, but if you are dissatisfied with how your fonts appear, you will have to configure the settings you are after in your files in$XDG_CONFIG_HOME/fontconfig/conf.d until you achieve what you are looking for.

You are also setting your DPI at 96: check what your monitor's optimum DPI is and set it accordingly.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .