4

I'm using urxvt with DejaVu Sans Mono as font:

urxvt.font:     xft:DejaVu Sans Mono

But I'm not possible to see Unicode characters like '⌚'.

Why that ? Is urxvt able to display these symbols?

Thank You

  • xterm on OpenBSD can display that using the Noto Emoji font (at the cost of making all the other characters tofu). – thrig Nov 16 '16 at 20:48
3

The manual page is the place to go, for options:

-fn fontlist
Select the fonts to be used. This is a comma separated list of font names that are checked in order when trying to find glyphs for characters. The first font defines the cell size for characters; other fonts might be smaller, but not (in general) larger. A (hopefully) reasonable default font list is always appended to it. See resource font for more details.

and resource settings:

font: fontlist
Select the fonts to be used. This is a comma separated list of font names that are checked in order when trying to find glyphs for characters. The first font defines the cell size for characters; other fonts might be smaller, but not (in general) larger. A (hopefully) reasonable default font list is always appended to it; option -fn.

Each font can either be a standard X11 core font ( XLFD ) name, with optional prefix "x:" or a Xft font (Compile xft), prefixed with "xft:".

Given the comment by @thrig, you should be able to do this:

urxvt.font:     xft:DejaVu Sans Mono, xft:Noto Emoji

(if you have those fonts installed).

However, the package google-noto-emoji-fonts in Fedora24 appears to be a mixed-width font, which urxvt doesn't handle, giving this message:

$ urxvt -fn 'xft:DejaVu Sans Mono,xft:Noto Emoji'                               
urxvt: unable to calculate font width for 'Noto Emoji:slant=0:weight=100:pixelsize=19:minspace=True', ignoring.

According to a Font-Awesome bug report Cannot be used with urxvt #3681, urxvt doesn't check the widths for glyphs in the private use area (i.e., non-standardized). That applies to any of the Emoji fonts.

If you only care about Emoji, urxvt runs with just that font (and uses double-width cells for everything):

urxvt -fn 'xft:Noto Emoji'

urxvt in the background

  • Sorry didn't worked, I installed these fonts. KWrite with Noto Emoji is able to display the symbols, but in urxvt I just get the ugly squres. I already tried just to use Noto Emoji in urxvt but the symbols are not shown as well.. – dudas Nov 17 '16 at 12:21
  • urxvt does not need several fonts to be specified, it will do font substitution even if you only specify one font. – njsg Sep 6 '17 at 12:17
1

Do you change your letter spacing:

  -letsp number
       Compile frills: Amount to adjust the computed character width by to
       control overall letter spacing. Negative values will tighten up the
       letter spacing, positive values will space letters out more. Useful
       to work around odd font metrics; resource letterSpace.

If you use a negative value to improve readability, letters that are too wide cannot be printed. This is the case for many Unicode characters.

  • This turned out to be an indication of the problem for me, though you don't actually need to widen your letter spacing; you can instead force the fallback font to a smaller size: xft:Source Code Pro:size=10,xft:Source Han Sans,xft:DejaVu Serif:size=9. Note that if you don't specify a size for the fallback font the problem may or may not appear depending on the size of the main font; e.g., for me letterspacing of -0.5 worked with size=9 but not size=10 with some fonts. – Curt J. Sampson Jan 10 '18 at 12:12

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.