12

I'd like to use a truetype font in xterm/uxterm (version 278) but I get problems with unicode symbols (é for example displays fine, so I guess it's not a disabled utf8 or a locale issue):

$ echo -e "\xE2\x98\xA0"

gives me a square instead of ☠ with following config:

UXTerm*faceName: Liberation Mono
UXTerm*faceSize: 9
XTerm*faceName: Liberation Mono
XTerm*faceSize: 9

When I disable truetype fonts using the ctrl right click menu, the symbol displays fine using the default fonts which isn't nice at all. I tried uxrvt and got the same problem when I don't have enough letter spacing, but it works fine when I increase it. However, uxrvt gave me a lot of other problems, just like all the other terminal emulators I tried. Does anybody have an idea?

  • Do you have any reason to believe that that glyph exists in Liberation Mono? – HalosGhost Jul 4 '14 at 16:45
  • I tried it out in LibreOffice Writer and it's there. It does also work in uxrvt after increasing the letter spacing. My problem is not specific to this one font, I couldn't find any truetype font where I don't have this problem. – Sebastian Blask Jul 4 '14 at 16:52
  • Weird. I tried reproducing the LibreOffice Writer problem and it worked. Maybe LO-Writer does switch to another font, if a given unicode is not supported by the current one? Also how can increasing the letter spacing result in Liberation Mono suddenly supporting an unsupported unicode character? How do you increase the letter spacing? – polym Jul 5 '14 at 1:10
  • Answer to the first question of mine above: vinc17 found out that LibreOffice is silently changing the font! – polym Jul 5 '14 at 19:33
  • 1
    In rxvt-unicode, you can see which font a glyph belongs to by left clicking it while holding control and shift. The details should appear in the bottom left of the terminal window. Also, for inspecting a ttf font, check out the fontforge font editor. It's amazing how complicated a font can be. – etherfish Jul 8 '14 at 1:35
8
+100

The Liberation font doesn't seem to have this symbol. But using XTerm*faceName: DejaVu Sans Mono (which is also a truetype font) allows ☠ to be displayed.

EDIT: Do not use LibreOffice or OpenOffice to determine whether a glyph is supported in a font, as it silently falls back to another font: OpenOffice bug 45128.

  • wow cool nice find. Seems like my suspicion was right haha :D! Upvote! – polym Jul 5 '14 at 19:31
  • I was pretty sure Deja Vu was in the list of fonts I tried, but apparently not. Kind of embarrassing that this was so simple :-S Let me just try this out on my work computer tomorrow... – Sebastian Blask Jul 6 '14 at 10:18
5

vinc17 is correct:

The glyph ☠, also called SKULL AND CROSSBONES, is not supported by Liberation Mono font as you can see here and here.

You have to change to a font that covers this unicode (range).

Fonts that support this particular glyph ☠ are listed here.

To find the name and various other information of a unicode character by text, use this tool.

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.