You are not logged in.

#1 2018-12-19 12:03:13

pablo1
Member
Registered: 2018-06-07
Posts: 11

No Symbols in Urxvt (tried setting fonts that have that glyphs)

Hello

I have read through all the urxvt posts I could find regarding this issue, but I can't get it to work.
My problem is that characters like  '☰' don't get displayed.

Here is a comparison with urxvt on the left and termite (displays correctly) on the right. If you look at the bar, you can see urxvt shows a little box where the symbol is supposed to be.

I'm running urxvt from the community repos (community/rxvt-unicode 9.22-7) and have also installed urxvt-perls. The rest of my system is up-to-date.

Among others hsese fonts are installed:
- extra/ttf-dejavu 2.37-2
- community/ttf-font-awesome 5.5.0-1
- community/ttf-inconsolata 1:2.0.0.1-3
- community/ttf-liberation 2.00.1-8
- community/ttf-ubuntu-font-family 0.83-4

Finally this is my .Xresources:

~/.Xresources

Xft*dpi:                141
Xft*antialias:          true
Xft*hinting:            full

! 256 color space

rofi.color-enabled: true
rofi.bg: #ff0000
rofi.modi: run,ssh,window
rofi.fullscreen: true
rofi.lines: 3
rofi.padding: 400
rofi.eh: 2
!rofi.fg: white
!rofi.fuzzy: true
!rofi.hlbg: #104a58
#include ".Xresources.d/colors"
#include ".Xresources.d/urxvt"

~/.Xresources.d/colors

! vi: ft=xdefaults


! Colors
*background:   #1e1f29
*foreground:   #e2e4e5
*cursorColor:  #e2e4e5

*color0:       #1e1f29
*color8:       #4f4b58

*color1:       #ff5c57
*color9:       #ff5c57

*color2:       #5af78e
*color10:      #5af78e

*color3:       #f3f99d
*color11:      #f3f99d

*color4:       #57c7ff
*color12:      #57c7ff

*color5:       #ff6ac1
*color13:      #ff6ac1

*color6:       #9aedfe
*color14:      #9aedfe

*color7:       #eff0eb
*color15:      #eff0eb

!*background:   #282a36
!*color0:       #33303

~/.Xresources.d/urxvt

! vi: ft=xdefaults


! General settings
URxvt.saveLines:              2000
URxvt.scrollstyle:            rxvt
!URxvt.termName:               xterm-256color
URxvt*termName:              rxvt-256color
!URxvt*loginShell:            true
URxvt.urgentOnBell:           True
URxvt.cursorBlink:            True
! Disable that stupid ISO mode
URxvt.iso14755:               false
URxvt.iso14755_52:            false


!Scrolling
! 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
! Disable the scrollback buffer for the secondary screen (e.g. less)
URxvt.secondaryScreen:        1
URxvt.secondaryScroll:        0


! Appearance
!Xft.dpi:                     109
URxvt.font:                   xft:DejaVu Sans Mono:size=9
!URxvt.font:                   xft:monospace:pixelsize=15
!URxvt.letterSpace:            -3
!URxvt*lineSpace:             1
URxvt.internalBorder:         10
URxvt.scrollBar:              False


! Clipboard
URxvt.keysym.Shift-Control-C: perl:clipboard:copy
URxvt.keysym.Shift-Control-V: perl:clipboard:paste
URxvt.clipboard.autocopy:     true
URxvt.copyCommand:            xclip -i -selection clipboard
URxvt.pasteCommand:           xclip -o -selection clipboard


! Extensions
URxvt.perl-ext-common:        default,matcher,clipboard,keyboard-select,url-select
URxvt.matcher.button:         1
URxvt.urlLauncher:            xdg-open
URxvt.urlButton:              1
URxvt.underlineURLs:          True

Offline

#2 2018-12-19 19:48:33

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,697

Re: No Symbols in Urxvt (tried setting fonts that have that glyphs)

"☰" isn't available in DejaVus Sans Mono, pango will resolve it from DejaVu Sans - but that's not a monospace font and urxvt doesn't auto-substitute glyphs.
Try

URxvt.font:                   xft:DejaVu Sans Mono:size=9,xft:DejaVu Sans:size=9

but the glyph will most likely set off column alignment.

Offline

#3 2018-12-19 20:37:52

pablo1
Member
Registered: 2018-06-07
Posts: 11

Re: No Symbols in Urxvt (tried setting fonts that have that glyphs)

I tried the setting you suggested, but the glyph is still not shown. Any other ideas? I just want a nice looking monospace font and the glyphs to show.
I'm open for other suggestions!

Last edited by pablo1 (2018-12-19 20:38:47)

Offline

#4 2018-12-19 21:29:32

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,531
Website

Re: No Symbols in Urxvt (tried setting fonts that have that glyphs)

Terminus has that glyph.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2018-12-19 21:45:42

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,697

Re: No Symbols in Urxvt (tried setting fonts that have that glyphs)

The repo package?
This one https://www.compart.com/de/unicode/U+2630 ?

Are you sure?

fontforge /usr/share/fonts/misc/ter-x14n.pcf.gz

View/Goto/u+2630

Offline

#6 2018-12-19 21:53:42

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,531
Website

Re: No Symbols in Urxvt (tried setting fonts that have that glyphs)

I use terminus in st and it displays that glyph.  Perhaps it uses fontconfig to fallback to some other font, but I don't specify anything other than terminus.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#7 2018-12-20 00:28:26

pablo1
Member
Registered: 2018-06-07
Posts: 11

Re: No Symbols in Urxvt (tried setting fonts that have that glyphs)

Strange, I have installed community/terminus-font, but the glyph is not shown. Also a lot of other glyphs are missing.
I set it with

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

Offline

#8 2018-12-20 03:53:48

Kirill Bugaev
Member
Registered: 2018-08-03
Posts: 173

Re: No Symbols in Urxvt (tried setting fonts that have that glyphs)

pablo1, I have a dumb question. Don't you forget reload .Xresources with `$ xrdb ~/.Xresources` after changing?
I use bitstream vera sans mono for default font (it has '☰') and Roboto Mono for Powerline (from AUR) for glyphs.

URxvt.font: xft:bitstream vera sans mono:size=8:antialias=true,xft:Roboto Mono for Powerline:size=8:antialias=true
URxvt.boldFont: xft:bitstream vera sans mono:bold:size=8:antialias=true,xft:Roboto Mono for Powerline:size=8:antialias=true
URxvt*italicFont: xft:bitstream vera sans mono:italic:pixelsize=8:antialias=true,xft:Roboto Mono for Powerline:size=8:antialias=true
URxvt*boldItalicFont: xft:bitstream vera sans mono:bold:italic:pixelsize=8:antialias=true,xft:Roboto Mono for Powerline:size=8:antialias=true
pablo1 wrote:
URxvt.font: -xos4-terminus-medium-r-normal--12-120-72-72-c-60-iso10646-1

I have tried your solution on my system. It works and shows all used glyphs.

Last edited by Kirill Bugaev (2018-12-20 04:49:14)

Offline

#9 2018-12-20 07:18:32

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,697

Re: No Symbols in Urxvt (tried setting fonts that have that glyphs)

@Kirill, You're most likely getting it from the powerline font or some other patched font.

@Trilby, strace reveals that st loads the glyph from DejaVu Sans

Offline

#10 2018-12-20 08:01:27

Kirill Bugaev
Member
Registered: 2018-08-03
Posts: 173

Re: No Symbols in Urxvt (tried setting fonts that have that glyphs)

seth wrote:

@Kirill, You're most likely getting it from the powerline font or some other patched font.

Probably not. Because when I set font `URxvt.font: xft:bitstream vera sans mono:size=8:antialias=true` e.g. arrow glyph doesn't get displayed. But with `URxvt.font: -xos4-terminus-medium-r-normal--12-120-72-72-c-60-iso10646-1` all glyphs are displayed correct way. However, '☰' symbol is displayed in both cases.

Offline

#11 2018-12-20 08:08:45

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,697

Re: No Symbols in Urxvt (tried setting fonts that have that glyphs)

The glyph is not in https://www.archlinux.org/packages/comm … inus-font/ so it cannot come from there - either you've some patched terminus or the glyph is resolved from another font.
I've also downloaded ttf-bitstream-vera-1.10-12-any.pkg.tar.xz and checked VeraMono.ttf - the glyph is not in that font either, so it cannot come from there.

Offline

#12 2018-12-20 08:23:40

Kirill Bugaev
Member
Registered: 2018-08-03
Posts: 173

Re: No Symbols in Urxvt (tried setting fonts that have that glyphs)

@seth, thanks for explanation.
EDIT: Although, it seems strange, cause I use terminus-font from Community repo.

Last edited by Kirill Bugaev (2018-12-20 09:03:12)

Offline

#13 2018-12-20 11:56:28

pablo1
Member
Registered: 2018-06-07
Posts: 11

Re: No Symbols in Urxvt (tried setting fonts that have that glyphs)

Ok, this is strange. After trying a ton of different fonts and switching settings back and forth, this configuration works on one machine:

! Appearance
Xft.dpi:                     144
!! regular
URxvt*.font: \
        xft:DejaVu Sans Mono:size=8, \
        xft:Unifont:size=8
!! bold
URxvt*.boldfont: \
        xft:DejaVu Sans Mono:size=8:style=bold, \
        xft:Unifont:size=8:style=bold
!! italic
URxvt*.italicfont: \
        xft:DejaVu Sans Mono:size=8:style=italic, \
        xft:Unifont:size=8:style=italic

On my laptop though, the glyph is missing, even though dejavu and unifont are installed on both. Where could this be configured? I don't understand why it works on only one computer.


Screenshot

Last edited by pablo1 (2018-12-20 13:05:45)

Offline

#14 2018-12-20 12:31:39

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,697

Re: No Symbols in Urxvt (tried setting fonts that have that glyphs)

Please replace the oversize image w/ a link.

Stracing urxvt, it actually opens the entire substitution list (down to DejaVu Sans) when I insert the char - it just renders an empty box (even if I inject unifont)
The key is in "man 7 urxvt"

The only limitation is that none of the fonts may be larger than the base font, as the base font defines the terminal character cell size, which must be the same due to the way terminals work.

And lo and behold,

URxvt*font: xft:Source Code Pro:size=8:hinting=true,xft:Consolas:size=9:hinting=true,xft:DejaVu Sans:size=6:hinting=true

works.

URxvt*font: xft:Source Code Pro:size=8:hinting=true,xft:Consolas:size=9:hinting=true,xft:DejaVu Sans:size=8:hinting=true

doesn't …
(Consolas 9 is <= SCP, but DejaVu is bigger)

Offline

Board footer

Powered by FluxBB