You are not logged in.

#1 2014-06-01 12:04:56

brianbaligad
Member
Registered: 2013-08-12
Posts: 22

[SOLVED] Symbols with URxvt and Terminus

I want to use .bash-git-prompt which makes use of symbols like ✚ and ✔. While these symbols work in Chromium, they do not work in my terminal. I'm seeing boxes instead of symbols:
6yBbJVA.png
Any advice?

So far I've tried switching from Terminus to Monospace, DroidSansMono, LiberationMono, and LiberationSans (the font I use in Chromium).  Google searches result in similar cases with Powerline, where the problem was resolved by using a hacked font.  Searches on this bbs bring up similar threads that never received answers.  My .Xresources:

URxvt.font: xft:terminus:size=10:antialias=false
URxvt.scrollBar: false
URxvt.transparent: true
URxvt.shading: 25
URxvt.locale: true              ! utf-8
URxvt.saveLines: 4096           ! buffer size
URxvt.perl-ext-common: default,clipboard,vtwheel
URxvt.clipboard.autocopy: true  ! sync primary and clipboard buffers
URxvt.metaSendsEscape: true     ! fix alt key

I'm guessing that this is a fancy feature of more bloated terminals running on other distros or Macs. I like URxvt the way it is, lean and mean, so if I have to find some bash prompt alternative, that's no big deal. It'd just be nice to know if there is actually a solution to this.

Last edited by brianbaligad (2014-06-02 11:27:35)

Offline

#2 2014-06-01 15:36:04

elken
Member
From: Emacs
Registered: 2013-10-17
Posts: 67

Re: [SOLVED] Symbols with URxvt and Terminus

Output of locale?


Useless shit wot I do | "A very witty and relatable quote." -- A wise man

Offline

#3 2014-06-01 18:59:53

brianbaligad
Member
Registered: 2013-08-12
Posts: 22

Re: [SOLVED] Symbols with URxvt and Terminus

Sure,

$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

Offline

#4 2014-06-01 19:08:56

elken
Member
From: Emacs
Registered: 2013-10-17
Posts: 67

Re: [SOLVED] Symbols with URxvt and Terminus

Try one of the patched fonts in ttf-powerline-fonts-git?

Syntax


Useless shit wot I do | "A very witty and relatable quote." -- A wise man

Offline

#5 2014-06-02 00:02:26

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

Re: [SOLVED] Symbols with URxvt and Terminus

The square blocks are due to the characters not being found by urxvt.  You simply have to add a font containing the wanted characters to your configuration.  For an example, here's my font setup:

urxvt*skipBuiltinGlyphs: true
urxvt*font: xft:DejaVu Sans Mono:style=Book:antialias=false:size=8, \
            xft:WenQuanYi Bitmap Song:size=8, \
            xft:FreeSerif:style=Regular, \
            xft:unifont:style=Medium:antialias=false

urxvt*boldFont: xft:DejaVu Sans Mono:style=Book:antialias=false:size=8, \
                xft:WenQuanYi Bitmap Song:size=8, \
                xft:unifont:style=Medium:antialias=false

urxvt*italicFont: xft:DejaVu Sans Mono:style=Book:antialias=false:size=8, \
                  xft:WenQuanYi Bitmap Song:size=8, \
                  xft:unifont:style=Medium:antialias=false

urxvt*boldItalicFont: xft:DejaVu Sans Mono:style=Book:antialias=false:size=8, \
                      xft:WenQuanYi Bitmap Song:size=8, \
                      xft:unifont:style=Medium:antialias=false

urxvt*geometry: 90x38
urxvt*colorIT: rgb:e4/e4/e4
urxvt*colorBD: rgb:82/a4/d3
urxvt*colorUL: rgb:e4/e4/e4
urxvt*underlineColor: rgb:58/58/58

As you might be able to tell, I don't care for bolded or oblique fonts in my terminal emulators.  Instead, I use color for the emphasized text.

Offline

#6 2014-06-02 11:27:21

brianbaligad
Member
Registered: 2013-08-12
Posts: 22

Re: [SOLVED] Symbols with URxvt and Terminus

Brilliant!  I was oblivious and did not know you could reference more than one font.  I fixed this, keeping Terminus as my main font simply by adding DejaVu as you suggested. Update: after some testing, I think Chromium is rendering these characters using "Sans" which I already had installed:

URxvt.font: xft:terminus:size=10:antialias=false, \
        xft:Sans:size=10:antialias=false

Thank you, thisoldman!

Last edited by brianbaligad (2014-06-02 11:54:22)

Offline

#7 2014-06-03 07:32:00

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

Re: [SOLVED] Symbols with URxvt and Terminus

I'm happy to help you find the solution.

"Sans" is an alias set up by your font configuration.  It probably refers to DejaVu Sans.

$ fc-match Sans
DejaVuSans.ttf: "DejaVu Sans" "Book"

Offline

Board footer

Powered by FluxBB