0

I am running an Arch Linux server which I connect to from a few Windows machines using VcXsrv so I can run graphical applications (and more customized terminals than what I can get with PuTTY etc). However, I am having some trouble with urxvt and UTF-8 characters from the UTF-8 Dingbats section, namely, they don't render. I use Dingbats to show git status in my shell prompt, and also to display the exit status of commands.

locale.conf:

LANG=en_US.UTF-8

locale output:

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=

urxvt configuration (~/.Xdefaults):

URxvt*scrollTtyOutput: false
URxvt*scrollWithBuffer: true
URxvt*scrollTtyKeypress: true
URxvt*scrollBar: false
URxvt*cursorBlink: true
URxvt*background: black
URxvt*foreground: green
URxvt*font: xft:Hack:size=10, xft:Unifont:size=10
URxvt*locale: true
URxvt*skipBuiltinGlyphs: true
URxvt*xftAntialias: true
URxvt*saveLines: 10000
URxvt*eightBitInput: false

urxvt version information:

rxvt-unicode (urxvt) v9.22 - released: 2016-01-23
options: perl,xft,styles,combining,blink,iso14755,unicode3,encodings=eu+vn+jp+jp-ext+kr+zh+zh-ext,
         fade,transparent,tint,XIM,frills,selectionscrolling,wheel,slipwheel,cursorBlink,
         pointerBlank,scrollbars=plain+rxvt+NeXT+xterm

I can see all Latin, Katakana, Hiragana, Hangul, Chinese (traditional, simplified), Cyrillic, Persian (most), Georgian characters, etc. But Dingbats look like this when I print them:

Dingbats not rendering

I am using zsh in vim-mode if that matters.
Looking on google the only advice I can find is to make sure my locale is set to being UTF-8 and that the fonts have the necessary glyphs. Both I believe I have ensured.

Where could I have gone wrong?

  • Do note that the fonts must be available on the client, not on the server. (unless you're running a terminal from the server with X server redirection, that is) – Paul Stelian May 27 '17 at 20:17
  • Connecting using ssh -X with PuTTY. I installed the fonts on my Arch machine, then copied them and placed them in the correct locations of the VcXsrv installations. Maybe that wasn't the correct way to do that? – Warepire May 27 '17 at 21:27
  • The place where PuTTY is running on needs to have the fonts (that is, the Windows console). And that usually isn't the case. You can run gnome-terminal through ssh -X though, and that should render correctly, with the server fonts (I actually use such a configuration!) – Paul Stelian May 27 '17 at 22:16
  • @Paul Stelian The problem is with my urxvt terminals, the PuTTY terminal renders as I expect. From the PuTTY session, I spawn the urxvt terminals, and those are the ones that wont render correctly. I'm sorry if I wasn't clear with that. (I just wanted to show how I was forwarding X in my previous comment) – Warepire May 28 '17 at 6:16
  • I believe urxvt doesn't actually take all fonts into consideration. Are you aware on how to change which font it uses? (it doesn't do it automatically, that's for sure) Also, be sure that the chosen font has those characters (maybe a Noto Mono or similar font?) – Paul Stelian May 28 '17 at 8:29
0

The problem comes from using characters which are in the Private Use plane of Unicode, which is not guaranteed to have anything particular in that. Windows XP systems could explicitly edit the fonts there with the eudcedit command, Macs have an Apple logo in one of the 6400 characters in that plane and, simply put, you are using the wrong dingbats.

The correct dingbats are from 9985 to 10175 decimal (2701 to 27bf hex).

  • 1
    That was a really stupid failure in my test, but, it didn't quite resolve my problem 100%, results with Noto Mono and Unifont (in that order): Imgur: results – Warepire May 28 '17 at 11:04
  • Hmm, now the problem does get interesting... – Paul Stelian May 28 '17 at 11:22
  • On my Windows Console, only 3 fonts worked: NSimSun, MS Gothic, SimSun-ExtB – Paul Stelian May 28 '17 at 11:25
  • 1
    Wouldn't it be up to my X-server (VcXsrv) to render the fonts through? Since it's an urxvt console. – Warepire May 28 '17 at 12:18
  • 2
    You put me on the correct path there. I started digging deeper in my X-server (VcXsrv), both code and log, and managed to get this line out of it during startup: Warning: Locale not supported by X, falling back to 'C' locale.. – Warepire May 28 '17 at 16:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.