You are not logged in.

#1 2021-01-30 06:31:07

riazufila
Member
Registered: 2019-09-30
Posts: 16

Unicode Symbol Appears As Squares

How do I make this unicode appear properly? Which font do I need? This output appears after I do:

quasar dev

https://imgur.com/a/WAbMwt6

I searched up a bit and the symbol seems to be something like the one below:

i 「wds」: Project is running at http://0.0.0.0:8080/

Offline

#2 2021-01-30 07:29:38

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: Unicode Symbol Appears As Squares

Those missing characters are inside Japanese fonts.

The "ttf-droid" package might be the smallest way to get those two characters you are missing. The package has a file DroidSansFallback.ttf that can do Japanese.

Last edited by Ropid (2021-01-30 07:30:52)

Offline

#3 2021-01-30 14:28:25

riazufila
Member
Registered: 2019-09-30
Posts: 16

Re: Unicode Symbol Appears As Squares

Ropid wrote:

Those missing characters are inside Japanese fonts.

The "ttf-droid" package might be the smallest way to get those two characters you are missing. The package has a file DroidSansFallback.ttf that can do Japanese.

Even after installing ttf-droid the characters still appear as squares. Am I doing something wrong?

Offline

#4 2021-01-30 15:17:50

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: Unicode Symbol Appears As Squares

Is the problem only in your terminal? Do you see the characters correctly here in the web browser? I mean you showed them here in your first post:

riazufila wrote:

[...]

I searched up a bit and the symbol seems to be something like the one below:

i 「wds」: Project is running at http://0.0.0.0:8080/

Are you perhaps using urxvt as your terminal emulator? I remember in urxvt I had to battle with manually configuring a list of fonts for fallback for missing characters.

Last edited by Ropid (2021-01-30 15:18:55)

Offline

#5 2021-01-30 15:19:50

ugjka
Member
From: Latvia
Registered: 2014-04-01
Posts: 1,886
Website

Re: Unicode Symbol Appears As Squares

[ugjka@archee tmp]$ pacman -Qss noto
local/noto-fonts 20201226-1
    Google Noto TTF fonts
local/noto-fonts-cjk 20201206-1
    Google Noto CJK fonts
local/noto-fonts-emoji 20200916-1
    Google Noto emoji fonts
local/noto-fonts-extra 20201226-1
    Google Noto TTF fonts - additional variants

https://ugjka.net
"It is easier to fool people, than to convince them that they've been fooled" ~ Dr. Andrea Love

Offline

#6 2021-01-31 01:43:43

riazufila
Member
Registered: 2019-09-30
Posts: 16

Re: Unicode Symbol Appears As Squares

Ropid wrote:

Is the problem only in your terminal? Do you see the characters correctly here in the web browser? I mean you showed them here in your first post:

riazufila wrote:

[...]

I searched up a bit and the symbol seems to be something like the one below:

i 「wds」: Project is running at http://0.0.0.0:8080/

Are you perhaps using urxvt as your terminal emulator? I remember in urxvt I had to battle with manually configuring a list of fonts for fallback for missing characters.

Yes I am using urxvt.. Hmm, how did you solve it? I tried installing Alacritty and the unicode was rendered correctly. But I don't wanna change terminals.. urxvt uses way less RAM.

Last edited by riazufila (2021-01-31 03:22:04)

Offline

#7 2021-01-31 01:44:27

riazufila
Member
Registered: 2019-09-30
Posts: 16

Re: Unicode Symbol Appears As Squares

ugjka wrote:
[ugjka@archee tmp]$ pacman -Qss noto
local/noto-fonts 20201226-1
    Google Noto TTF fonts
local/noto-fonts-cjk 20201206-1
    Google Noto CJK fonts
local/noto-fonts-emoji 20200916-1
    Google Noto emoji fonts
local/noto-fonts-extra 20201226-1
    Google Noto TTF fonts - additional variants

Already have all these installed. but the problem still persists.

Offline

#8 2021-01-31 07:13:06

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: Unicode Symbol Appears As Squares

riazufila wrote:
Ropid wrote:

[...] I remember in urxvt I had to battle with manually configuring a list of fonts for fallback for missing characters.

Yes I am using urxvt.. Hmm, how did you solve it? I tried installing Alacritty and the unicode was rendered correctly. But I don't wanna change terminals.. urxvt uses way less RAM.

In your .Xresources in the "Urxvt.font" setting, you can use a list of fonts instead of a single font. Here is an example on how this looks like, you use a "," comma between the fonts and you can use a "\" if you want to add line-breaks:

URxvt.font: xft:DejaVu Sans Mono:size=10,\
            xft:IPAGothic,\
            xft:Symbola

urxvt will go through the list to search for missing characters in your first font.

You can use the urxvt command line "-fn" argument to experiment with the fonts before putting them in your .Xresources file, like this:

urxvt -fn 'xft:DejaVu Sans Mono:size=10, xft:IPAGothic'

I just experimented a little with urxvt and I can't seem to get it to use the Japanese from the ttf-droid package that I recommended earlier. It renders a bad looking bitmap font here for me. I guess the ttf-droid package isn't good for urxvt.

The "IPAGothic" font I used in the examples of this post here seems to render well. It is in the "otf-ipafont" package. The "otf-ipafont" package isn't a super large package (noto-fonts-cjk is much larger) so it should be a good recommendation.

Offline

#9 2021-01-31 09:28:00

seth
Member
Registered: 2012-09-03
Posts: 61,810

Re: Unicode Symbol Appears As Squares

Also consider using https://aur.archlinux.org/packages/rxvt … ideglyphs/ which has a more relaxed position toward out-of-bounds glyphs.

Offline

Board footer

Powered by FluxBB