Zsh icons broke in urxvt

First of all, there is a significant difference between the terminals types rxvt and unicode-rxvt (often abbreviated to urxvt). You have indicated that the terminal you are using is "URXVT Version 9.22", so to avoid confusion, please use the correct name which is not rxvt but urxvt.

As Mikel has pointed out, the Xresources file is telling urxvt to use the 9x15 font which is (a) the old style X11 server provided font method and (b) a limited capability bitmap font.

The oh-my-zsh Github README file explains

many themes require installing the Powerline Fonts in order to render properly

So in order to show the correct arrow shape you need to have the terminal using the appropriate font. Perhaps your update which broke the feature was an update which reset the font usage by urxvt?

As you state that sterminal displays the prompt correctly, check which font that is using, then change the .Xresources in your ${HOME} directory to use that font after verifying that it works with the manual test urxvt -font "font_name". (For the newer method of Xft supplied fonts, font_name is preceeded by "xft:" and followed by ":size=12" for font size).

Having checked in my urxvt, it seems quite a number of well known truetype and opentype monospace fonts do not provide the "right arrow" glyph and just show an empty box. However one readily available standard font that does work (and should be installed on your system) is Deja Vu Sans Mono.

So try firing up a urxvt with

urxvt -font "xft:Deja Vu Sans Mono:size=12" &

and see if your prompt is correctly displayed.

Take a look at https://bbs.archlinux.org/viewtopic.php?id=173477 for discussion on modifying font resource specification for urxvt in an Xresources/Xdefaults file.

PS Do not forget that you can use multiple urxvt terminals more efficiently if you first start the urxvtd daemon and then fire up terminals with urxvtc.

ADDENDUM

Thanks for confirming that you are using urxvt and you have DejaVu Sans Mono installed.

Confirm that there is no font substitution happening with the command entered in terminal at the prompt

   fc-match  "DejaVu Sans Mono"

producing the output

   DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"

The actual font file location and styles available for the font can be verified with

    fc-list | grep --color 'DejaVu Sans Mono'

Now assuming that is all okay, you need to check by firing up a urxvt from the command line of a terminal (sorry for not making that absolutely clear above and I had space between Deja and Vu which might have caused a problem)

    urxvt -font "xft:DejaVu Sans Mono:size=12" &   

that you can cut'n'paste the right-arrow character (from here) "➜" into that urxvt and that it displays correctly which I have checked does work.

I can also confirm that putting the following into an Xresources file

 URxvt.font:                     xft:DejaVu Sans Mono:autohint=true:size=12
 URxvt.boldFont:                 xft:DejaVu Sans Mono:autohint=true:bold:size=12
 URxvt.italicFont:               xft:DejaVu Sans Mono:autohint=true:italic:size=12
 URxvt.boldItalicFont:           xft:DejaVu Sans Mono:autohint=true:bold:italic:size=12

and loading into the Xorg server resource database with xrdb -merge Xresource_file_name to be 100% certain those values will be used and then firing up a terminal with just urxvt at the command line results in a terminal in which the font correctly shows the right arrow character. (you should also notice that characteristic of this font, the l characters are curly and that there is a dot in the center of the zero characters).

The font I normally use in urxvt "Luxi Mono" (easier to read, easy on the eyes IMHO) does not display the right arrow correctly even though the "font-manager" program reveals that "Luxi Mono" does have the glyph. Similarly xterm is also broken but a test in lxterminal, mate-terminal, and xfce4-terminal (checked in preferences that font is set to Luxi Mono) all display the right-arrow correctly. So it does appear that something is broken for some fonts in urxvt and xterm (which if I understand correctly share some code origins) just as the others which work similarly share some common code viz libvte.


I too am using the i3wm community edition of Manjaro Linux (18.0.4 Illyria) and URXVT Version 9.22. I had exactly the same problem on installing Oh My Zsh.

Following J G Miller's comprehensive and useful advice I edited my ~/.Xresources file as suggested, and it worked. Fantastic!

Until I opened Manjaro's pre-installed file manager - ranger (terminal based with vi keybindings). The change to ~/.Xresources now malformed the icons in this application.

Finding a similar stack overflow question I (after reverting the above change) amended my ~/.Xresources file from:

URxvt.font:      9x15,xft:TerminessTTFNerdFontMono

to:

URxvt.font:      9x15,xft:TerminessTTFNerdFontMono,xft:DejaVu Sans Mono:autohint=true:size=12

My understanding is that the above means the Manjaro i3 default fonts are used for ranger, but then when a non-recognised glyph is encountered (such as the ones in Oh My Zsh) DejaVu Sans Mono is used instead. Both applications now display correctly.

Thanks to J G Miller however for the right direction to follow.