You are not logged in.

#1 2014-07-11 01:32:11

decryptedepsilon
Member
Registered: 2014-03-17
Posts: 9

[Solved]urxvt does not search the font for emojis while gnome-terminal

Hi, I'm using urxvt and am having some problems setting up fonts. These are my URxvt parameters specifying the fonts

URxvt*font:                           xft:Inconsolata-dz for Powerline:style=Semibold:pixelsize=14:antialias=true:hinting=slight, \
                                      xft:PowerlineSymbols:pixelsize=14:antialias=true:hinting=slight, \
                                      xft:Symbola:pixelsize=14:antialias=true:hinting=slight

Now, the emojis from Symbola does not appear and it only appears as a box
Urxvt with above settings

The same thing when opened in Gnome-terminal properly displays the emojis
Gnome-terminal with default

Also, I have tried starting urxvt with the following options

urxvt -fn "xft:Symbola"

and it works but as you see Symbola is not a font for your terminal.
Urxvt with Symbola only

What am I doing wrong here? I've check my previous lines and it is right. Do you guys have any ideas? Much appreciated. I have also tried with other posts stating that Urxvt cannot display symbols properly and have tried them all. If I've missed any please let me know. The strange thing is that it works for Gnome-terminal and Urxvt with only Symbola fonts hmm

Last edited by decryptedepsilon (2014-07-12 02:40:24)

Offline

#2 2014-07-12 02:01:06

bch24
Member
Registered: 2011-11-20
Posts: 27

Re: [Solved]urxvt does not search the font for emojis while gnome-terminal

Try the following:

$ localectl status
   System Locale: LANG=en_US.UTF-8
       VC Keymap: n/a
      X11 Layout: n/a

Make sure the System Locale is set to utf-8 locale.

This sometimes is the issue.

Last edited by bch24 (2014-07-12 02:02:14)

Offline

#3 2014-07-12 02:39:06

decryptedepsilon
Member
Registered: 2014-03-17
Posts: 9

Re: [Solved]urxvt does not search the font for emojis while gnome-terminal

bch24 wrote:

Make sure the System Locale is set to utf-8 locale.

This sometimes is the issue.

Many thanks for your reply, I've checked the system locale is proper. I think I have found the solution.

I think the official rxvt-unicode faq and documentation here states that rxvt-unicode drops pixels while showing some fonts because different fonts use different height and width. In this particular case, Symbola font is too wide and the default letterSpace does not allow it to display correct. If -letsp parameter is set to 4, it is displaying but with about a half pixel missing

The specific parameters for .Xresources

URxvt*font: xft:Inconsolata-dz for Powerline,xft:Symbola
URxvt*letterSpace: 4

And this gives this which technically solves the issue smile
letterspace 4 example

The documentation clearly states the following

All of this requires that fonts do not lie about character sizes, however: Xft fonts often draw glyphs larger than their acclaimed bounding box, and rxvt-unicode has no way of detecting this (the correct way is to ask for the character bounding box, which unfortunately is wrong in these cases).

I guess the first thing one should do is to check the documentation thoroughly of the official project page rather than searching countless forums where people have discussed stuff based on trial and error. I guess that's a classic rookie mistake and I feel very good that I'm moving past the rookie phase cool

Offline

#4 2014-07-12 03:37:51

bch24
Member
Registered: 2011-11-20
Posts: 27

Re: [Solved]urxvt does not search the font for emojis while gnome-terminal

Glad you found the problem! And a workaround

Last edited by bch24 (2014-07-12 03:38:05)

Offline

Board footer

Powered by FluxBB