1

Here is my starting point: Raspberry Pi 4, Manjaro - Raspberry Pi 4 KDE Plasma

Unicode special symbols fall into two big categories: the ones showing properly, and the ones displaying just boxes with some pips inside. The trouble is to be seen consistently in Konsole, LXTerminal, and in the i3 status line.

For example (Python, console output):

print("\U0001F53B \U0001f321 \U00002728")

Just \U0001f321 ("Thermometer") is rendered successfully. I tried different fonts, including [Nerd] DejaVu Sans Mono; nothing seems to make any difference.

It beats me guessing what is the visual difference between the two classes of characters. Certainly none of the wide and colorful is successful :)

UPD:

The solution courtesy of Dmitry Grigoryev: make sure that the noto-fonts and noto-fonts-emoji packages are installed.

2 Answers 2

2

Try "No Tofu" fonts ("Tofu" is a slang for the unicode ".notdef" glyph 􏿾, which looks like a box reminiscent of a tofu cube). These fonts aim to include as many glyphs as possible.

sudo apt-get install fonts-noto

Be prepared to sacrifice some space for this, the installation size is as large as 670 MB on Raspbian.

There is a handy tool, gucharmap which allows you to browse available glyphs in installed fonts without the need to output them in Python.

6
  • 1
    Not exactly my problem, maybe. noto fonts don't make any difference. Thank you very much anyway, @Dmitry! I learned a lot from your couple of lines; now I can google a lot better. I have a vague doubt about "glyphs" being my problem. \U0001F53B is "Red triangle", \U00002728 is "Sparkle"; they are just monolithic decorative elements, and I see Tofus with tiny digits inside instead of a triangle or a star. Besides, the same Manjaro KDE on a laptop runs fine and never required any tinkering with fonts. It's just a little something the Raspberry distribution is lacking. Sep 8, 2021 at 13:40
  • @AlexeyOrlov You may also try fonts-symbola package, AFAIK that's an emoji collection but your triangles might just be part of it. Sep 8, 2021 at 14:16
  • 1
    (1) There is no package like fonts-symbola for Manjaro/Arch (2) Laptop/Desktop Manjaro KDE runs fine without any fancy fonts. The console font is just Monospace Regular, and I see all the stars, triangles, and headsets without any problem :) Sep 8, 2021 at 14:24
  • @AlexeyOrlov Also, two stupid questions: (1) did you get fonts-noto-color-emoji as part of the installation (it's a soft dependency of fonts-noto) and (2) did you apply the new fonts in your LXTerminal settings? Sep 8, 2021 at 14:24
  • 1
    Thanks again, @Dmitry! The essential Manjaro/Arch packages are indeed noto-fonts and noto-fonts-emoji :) Sep 8, 2021 at 17:15
0

This "Question" is too vague.

python3 and modern Linux have full support for Unicode (although this is somewhat dependent on proper configuration).

Whether Unicode characters actually display as expected is dependent on the font used. All (most) support all Unicode characters, but the ability to display these depends on the glyphs included. Some fonts only have glyphs for a few hundred characters. Most modern fonts have much more. Any unsupported character will display the default glyph.

An additional complication is some (mainly Asian) characters which require support for composite/multi glyphs.

There are a number of tools to display supported glyphs for a font, and it is a trivial task to write a test program.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.