You are not logged in.

#1 2015-02-02 08:52:13

easysid
Member
From: India
Registered: 2013-01-01
Posts: 256

Unable to use bitmap fonts with urxvt

I am having trouble using bitmap fonts with urxvt.
The fonts are not displayed properly and it seems to lag while scrolling. The output comes quite slowly line by line.
There is no such problem with xft fonts. xft fonts are displayed fine and scrolling is smooth.

Screenshot: http://i.imgur.com/WGC4ez5.png
The font used is tewi. It renders fine in bar and dzen2, but has problems in urxvt

I am using compton and infnality repo. Disabling compton has no effect.


EDIT 1: The render issue was resolved. It was a matter of letter spacing.

EDIT 2: Only tewi and uushi produce the lag. Seems an issue with the fonts themselves.

EDIT 3:  webm showing lag issue

.Xresources

!----------------------------------------------------
! color settings
!----------------------------------------------------

#include "/home/siddharth/.config/termcolors/solarized_light"

!---------------------------------------------------
! urxvt config settings
!---------------------------------------------------

URxvt*geometry:         80x21

! xft fonts
!URxvt*font:             xft:dejavu sans mono for powerline:size=9:antialias=false:hinting=false:autohint=false
!URxvt*boldFont:         xft:dejavu sans mono for powerline:bold:size=9:antialias=false:hinting=false:autohint=false

URxvt*font:             -lucy-tewi-medium-r-normal--11-90-75-75-p-58-iso10646-1
URxvt*boldFont:         -lucy-tewi-bold-r-normal--11-90-75-75-p-58-iso10646-1

URxvt*letterSpace: -1
URxvt.savelines:        500
URxvt*scrollBar:        false

! do not scroll with output
URxvt*scrollTtyOutput:  false

! scroll in relation to buffer (with mouse scroll or Shift+Page Up)
URxvt*scrollWithBuffer: true

! scroll back to the bottom on keypress
URxvt*scrollTtyKeypress: true

! clipboard management
URxvt.perl-ext-common:  default,clipboard
URxvt.keysym.M-c:   perl:clipboard:copy
URxvt.keysym.M-v:   perl:clipboard:paste

!---------------------------------------------------
! Font Rendering
!---------------------------------------------------
Xft.dpi: 96
Xft.antialias: 1
Xft.rgba: rgb
Xft.autohint: 0
Xft.lcdfilter: lcddefault
Xft.hinting: 1
Xft.hintstyle: hintfull

! dzen2
dzen2.font:      -*-tamsynmod-medium-r-normal--*-*-*-*-*-*-*-*
dzen2.foreground: #dddddd
dzen2.background: #989898

Last edited by easysid (2015-02-08 08:50:15)

Offline

#2 2015-02-02 18:11:44

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: Unable to use bitmap fonts with urxvt

I use terminus and have no lag -- does yours lag with that font?

URxvt.font: 		 	-*-terminus-medium-r-*-*-12-*-*-*-*-*-*-*

Jin, Jîyan, Azadî

Offline

#3 2015-02-03 06:48:41

easysid
Member
From: India
Registered: 2013-01-01
Posts: 256

Re: Unable to use bitmap fonts with urxvt

I do not have terminus specifically, but have the terminus12 mod and the terminess powerline font. I tried them, but the issue remains.

URxvt.font:    -beastie-terminus12-medium-r-normal--12-120-72-72-c-60-iso8859-1

OR

 URxvt.font:    -xos4-terminesspowerline-medium-r-normal--12-120-72-72-c-60-iso10646-1

Both lag and distortion are present.

Offline

#4 2015-02-03 08:04:39

flannelhead
Member
From: Finland
Registered: 2014-03-30
Posts: 55
Website

Re: Unable to use bitmap fonts with urxvt

I'm not sure if this matters, but you're missing an asterisk in the font description. So you should rather have:

URxvt*font:             -lucy-tewi-medium-r-normal-*-11-90-75-75-p-58-iso10646-1
URxvt*boldFont:         -lucy-tewi-bold-r-normal-*-11-90-75-75-p-58-iso10646-1

Notice the asterisk added between two adjacent dashes. It acts as a wildcard. You can use xfontsel to select fonts – it builds the appropriate XLFD string. For me, URxvt refuses to even start if I remove those asterisks.

Offline

#5 2015-02-03 08:41:21

easysid
Member
From: India
Registered: 2013-01-01
Posts: 256

Re: Unable to use bitmap fonts with urxvt

flannelhead wrote:

I'm not sure if this matters, but you're missing an asterisk in the font description. So you should rather have:

URxvt*font:             -lucy-tewi-medium-r-normal-*-11-90-75-75-p-58-iso10646-1
URxvt*boldFont:         -lucy-tewi-bold-r-normal-*-11-90-75-75-p-58-iso10646-1

Notice the asterisk added between two adjacent dashes. It acts as a wildcard. You can use xfontsel to select fonts – it builds the appropriate XLFD string. For me, URxvt refuses to even start if I remove those asterisks.

This is the font I get from xlsfonts. Adding the asterix leads to urxvt not even starting.

$: xlsfonts | grep tewi
-lucy-tewi-bold-r-normal--0-0-75-75-p-0-iso10646-1
-lucy-tewi-bold-r-normal--11-90-75-75-p-58-iso10646-1
-lucy-tewi-medium-r-normal--0-0-75-75-p-0-iso10646-1
-lucy-tewi-medium-r-normal--11-90-75-75-p-58-iso10646-1

Offline

#6 2015-02-03 10:31:16

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: Unable to use bitmap fonts with urxvt

Are you declaring $TERM in any of your shell profiles?

EDIT: How did you install these bitmap fonts?

If you installed them manually, then try terminus:

# pacman -Syu terminus-font

Last edited by Head_on_a_Stick (2015-02-03 10:32:37)


Jin, Jîyan, Azadî

Offline

#7 2015-02-04 07:02:42

easysid
Member
From: India
Registered: 2013-01-01
Posts: 256

Re: Unable to use bitmap fonts with urxvt

Yes, I installed them manually. All my bitmap fonts are in ~/.fonts/bitmap/ directory.
They do work fine, except for this rxvt-unicode thing.

I'll try and install the required font packages from repos and aur.

Offline

#8 2015-02-05 16:47:20

easysid
Member
From: India
Registered: 2013-01-01
Posts: 256

Re: Unable to use bitmap fonts with urxvt

The culprit was this line

URxvt*letterSpace: -1

Got it from this thread.

Removing it makes the font render fine. However there is still the issue of lag with some fonts.

Terminus (and derivatives) work fine. Tewi, on the other hand, does not.

I deleted all the manually installed fonts and installed the packages from repos and aur.
Fonts still show up with a -- (double hyphen) in them (?)

┌─(siddharth@lucy)─(~)
└──╼  xlsfonts | grep -E 'terminus.*-12-'
-xos4-terminus-bold-r-normal--12-120-72-72-c-60-iso10646-1
-xos4-terminus-bold-r-normal--12-120-72-72-c-60-iso8859-1
-xos4-terminus-bold-r-normal--12-120-72-72-c-60-iso8859-13
-xos4-terminus-bold-r-normal--12-120-72-72-c-60-iso8859-15
:
-xos4-terminus-medium-r-normal--12-120-72-72-c-60-iso10646-1
-xos4-terminus-medium-r-normal--12-120-72-72-c-60-iso8859-1
-xos4-terminus-medium-r-normal--12-120-72-72-c-60-iso8859-13
-xos4-terminus-medium-r-normal--12-120-72-72-c-60-iso8859-15
:

Offline

#9 2015-02-05 17:13:08

flannelhead
Member
From: Finland
Registered: 2014-03-30
Posts: 55
Website

Re: Unable to use bitmap fonts with urxvt

easysid wrote:

The culprit was this line

URxvt*letterSpace: -1

Got it from this thread.

Removing it makes the font render fine. However there is still the issue of lag with some fonts.

Terminus (and derivatives) work fine. Tewi, on the other hand, does not.

I deleted all the manually installed fonts and installed the packages from repos and aur.
Fonts still show up with a -- (double hyphen) in them (?)

The double hyphen is ok – that was my mistake. Have you rebooted after removing the fonts? The X font cache probably needs to be refreshed. If the fonts still show up even though you have removed them, you could check every directory in your font path for any leftover font files.

xset q

will tell you the font path, among other information.

Offline

#10 2015-02-05 17:27:05

easysid
Member
From: India
Registered: 2013-01-01
Posts: 256

Re: Unable to use bitmap fonts with urxvt

Ah, OK.
I did not reboot, but restarted the X server, which found the new fonts.

I'll test if any other common fonts show the lag issue.

Offline

#11 2015-02-07 17:52:53

easysid
Member
From: India
Registered: 2013-01-01
Posts: 256

Re: Unable to use bitmap fonts with urxvt

I tested quite a few fonts, all of them work fine except for tewi and uushi. These fonts produce lag in urxvt. I can see line by line drawing of the output, even when I switch desktops.
Anyone using these fonts successfully?

Last edited by easysid (2015-02-07 17:56:08)

Offline

#12 2015-02-07 18:09:15

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: Unable to use bitmap fonts with urxvt

Why don't you try installing tewi from the AUR?
https://aur.archlinux.org/packages/bdf-tewi-git/


Jin, Jîyan, Azadî

Offline

#13 2015-02-07 18:23:26

easysid
Member
From: India
Registered: 2013-01-01
Posts: 256

Re: Unable to use bitmap fonts with urxvt

Head_on_a_Stick wrote:

Why don't you try installing tewi from the AUR?
https://aur.archlinux.org/packages/bdf-tewi-git/

I did install tewi and all other available fonts from aur and repos (post #8). The issue remains.

Last edited by easysid (2015-02-07 18:24:47)

Offline

#14 2015-02-07 23:06:47

thisoldman
Member
From: Pittsburgh
Registered: 2009-04-25
Posts: 1,172

Re: Unable to use bitmap fonts with urxvt

I first tested the tewi fonts with urxvt and I did not notice any lag.  The font is very tiny but legible with my hardware. It's also a proportional font; proportional fonts are not often used in terminal emulators.

I also tried easysid's .Xresources urxvt configuration: the lines from 'URxvt*geometry: 80x21' through 'URxvt*scrollTtyKeypress: true '. I still did not experience any lag.

I do not have the perl clipboard extension installed. You might try launching urxvt after commenting out the perl extension lines.

It is troubling that using the XLFD font name with an asterisk caused urxvt to abort.  The asterisk is a wildcard that should return nothing for this font. The font name can be checked using 'xlsfonts'. The returned name is what will be used by apps where that font name is specified.

$ xlsfonts -fn "-lucy-tewi-medium-r-normal-*-11-90-75-75-p-58-iso10646-1"
-lucy-tewi-medium-r-normal--11-90-75-75-p-58-iso10646-1

Offline

#15 2015-02-07 23:32:02

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

Re: Unable to use bitmap fonts with urxvt

Still waiting for an answer to this...

Head_on_a_Stick wrote:

Are you declaring $TERM in any of your shell profiles?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#16 2015-02-08 08:01:21

easysid
Member
From: India
Registered: 2013-01-01
Posts: 256

Re: Unable to use bitmap fonts with urxvt

jasonwryan wrote:

Still waiting for an answer to this...

Head_on_a_Stick wrote:

Are you declaring $TERM in any of your shell profiles?

Sorry, I forgot to answer that. No. I am not declaring TERM in any of the shell files. I checked in $HOME as well as in /etc

$: echo $TERM
rxvt-unicode-256color

I launched urxvt using a new .Xrerources, containing just the font declarations. I still had the issue with tewi and uushi.

I have added this webm to better show the lag issue. You can see that the output seems to be redrawn when I swap desktops.

Last edited by easysid (2015-02-08 10:47:47)

Offline

#17 2015-02-08 10:28:30

thisoldman
Member
From: Pittsburgh
Registered: 2009-04-25
Posts: 1,172

Re: Unable to use bitmap fonts with urxvt

Are you trying to comment lines in your .Xresources file using C-style comments – /* ... */ ? That's what I see on the last screenshot.  This will not work and could cause all sorts of buggy behavior.  Comments in X resource file begin with an exclamation point.  Other lines, including lines with C-style comment markers, will still be parsed, or an attempt will be made to parse them.

I would be surprised if xrdb did not issue warnings when (if) you attempted to load or merge any changed settings.

To answer jasonwryan's question, please report the return from the command echo $TERM from within urxvt.

Offline

#18 2015-02-08 10:53:43

easysid
Member
From: India
Registered: 2013-01-01
Posts: 256

Re: Unable to use bitmap fonts with urxvt

thisoldman wrote:

Are you trying to comment lines in your .Xresources file using C-style comments – /* ... */ ? That's what I see on the last screenshot.

For the purpose of this screencast, yes, that is how vim commented them out (I changed my commentry plugin). Before that, I was using ! to comment out. Also tried a barebones file with just the font defs, didn't work. There were no errors when I merged the file and changes were applied. But the video achieves the purpose of demoing the issue.

thisoldman wrote:

To answer jasonwryan's question, please report the return from the command echo $TERM from within urxvt.

Sorry didn't know that. Here it is

$: echo $TERM
rxvt-unicode-256color

Offline

Board footer

Powered by FluxBB