You are not logged in.

#1 2012-03-31 20:22:46

yamad
Member
Registered: 2010-12-06
Posts: 8

[SOLVED] urxvt and emacs font rendering differences

I am using Xft for font rendering in the emacs GUI and rxvt-unicode. Using DejaVu Sans Mono at the same font size in both programs, the glyphs are rendered quite differently in the two programs. To my eyes, the emacs rendering looks far worse. I have set the font and sizes in ~/.Xresources:

!~/.Xresources
Emacs.font: DejaVu Sans Mono:pixelsize=13
Emacs.FontBackend: xft
URxvt.font: xft:DejaVu Sans Mono:pixelsize=13

The emacs rendering looks less even. The glyphs look wider and more curved, giving the appearance of some letters running together. The lowercase "s" is a particularly good example of the differences. In a full screen of text, the different rendering makes a big difference to my eye. I think some hidden hinting setting is causing the problem.

Here is an example of some code from git rendered in emacs:
3cWi0.png

Here is the same code rendered open in emacs -nw under urxvt:
ITVlS.png

Is there a way I can get emacs to look the same as urxvt?

Last edited by yamad (2012-04-01 18:50:14)

Offline

#2 2012-03-31 21:01:05

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,726
Website

Re: [SOLVED] urxvt and emacs font rendering differences

Can't answer your question but the emacs sample looks 100 % better on my monitor.  The one with the black background looks like shit.

Offline

#3 2012-04-01 05:29:05

karljs
Member
Registered: 2009-07-22
Posts: 10

Re: [SOLVED] urxvt and emacs font rendering differences

If you look closely on an LCD screen you'll see that the urxvt screenshot shows subpixel rendering while the Emacs one does not. If the color fringing doesn't bother you, try adding a few lines to your .Xresources:

Xft.hinting: true 
Xft.hintstyle: hintfull 
Xft.antialias: rgba 
Xft.rgba: rgb

Last edited by karljs (2012-04-01 05:29:56)

Offline

#4 2012-04-01 18:49:34

yamad
Member
Registered: 2010-12-06
Posts: 8

Re: [SOLVED] urxvt and emacs font rendering differences

The Xft settings in .Xresources made a huge difference. Thanks so much.

Offline

Board footer

Powered by FluxBB