You are not logged in.

#1 2024-08-10 14:03:08

average_scout
Member
Registered: 2024-06-14
Posts: 114

[SOLVED] How to check which installed fonts support Chinese?

I've noticed that some Chinese characters on my system have a different font compared to others. I want to delete all but one Chinese font. So how do I see which fonts on my system have Chinese character support? Or is there a better way to fix the inconsistent fonts?

Last edited by average_scout (2024-08-10 20:09:53)

Offline

#2 2024-08-10 17:24:05

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,336

Re: [SOLVED] How to check which installed fonts support Chinese?

Fonts don't support languages, but unicode blocks - you'd have to query fro all relevant character ranges, it's much easier/faster to test for some concerned glyphs, eg.

fc-list :charset=6e6f # https://www.compart.com/en/unicode/U+6E6F

Offline

#3 2024-08-10 19:11:31

average_scout
Member
Registered: 2024-06-14
Posts: 114

Re: [SOLVED] How to check which installed fonts support Chinese?

seth wrote:

Fonts don't support languages, but unicode blocks - you'd have to query fro all relevant character ranges, it's much easier/faster to test for some concerned glyphs, eg.

fc-list :charset=6e6f # https://www.compart.com/en/unicode/U+6E6F

Terminal output after removing all fonts listed and installing Google's Noto Sans JP:

[eclipse@sleepless ~]$ fc-list :charset=6e6f # https://www.compart.com/en/unicode/U+6E6F
/home/eclipse/.fonts/Noto_Sans_JP/static/NotoSansJP-Black.ttf: Noto Sans JP,Noto Sans JP Black:style=Black,Regular
/home/eclipse/.fonts/Noto_Sans_JP/static/NotoSansJP-Thin.ttf: Noto Sans JP,Noto Sans JP Thin:style=Thin,Regular
/home/eclipse/.fonts/Noto_Sans_JP/static/NotoSansJP-Medium.ttf: Noto Sans JP,Noto Sans JP Medium:style=Medium,Regular
/home/eclipse/.fonts/Noto_Sans_JP/static/NotoSansJP-ExtraBold.ttf: Noto Sans JP,Noto Sans JP ExtraBold:style=ExtraBold,Regular
/home/eclipse/.fonts/Noto_Sans_JP/static/NotoSansJP-SemiBold.ttf: Noto Sans JP,Noto Sans JP SemiBold:style=SemiBold,Regular
/home/eclipse/.fonts/Noto_Sans_JP/static/NotoSansJP-Regular.ttf: Noto Sans JP:style=Regular
/home/eclipse/.fonts/Noto_Sans_JP/static/NotoSansJP-ExtraLight.ttf: Noto Sans JP,Noto Sans JP ExtraLight:style=ExtraLight,Regular
/home/eclipse/.fonts/Noto_Sans_JP/static/NotoSansJP-Bold.ttf: Noto Sans JP:style=Bold
/home/eclipse/.fonts/Noto_Sans_JP/static/NotoSansJP-Light.ttf: Noto Sans JP,Noto Sans JP Light:style=Light,Regular
[eclipse@sleepless ~]$ 

However, the same characters still look the same, i.e. inconsistent. Take a look: https://imgur.com/a/L7QFuN3

Offline

#4 2024-08-10 19:29:23

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,336

Re: [SOLVED] How to check which installed fonts support Chinese?

I'm pretty sure none of that is U+6E6F - also the titlebar doesn't look any different? (It's pretty small)
Also I don't see how you determine the first two glyphs to be a different font. Different from what?

What is your testcase scenario and what are the desired utf8 codepoints?

I'll point out that Noto Sans JP predominantly covers japanese glyphs and some Hangul, there's the massive noto cjk or alternatively adobe-source-han has a more fine grained split.

Offline

#5 2024-08-10 19:56:13

average_scout
Member
Registered: 2024-06-14
Posts: 114

Re: [SOLVED] How to check which installed fonts support Chinese?

seth wrote:

I'm pretty sure none of that is U+6E6F - also the titlebar doesn't look any different? (It's pretty small)
Also I don't see how you determine the first two glyphs to be a different font. Different from what?

What is your testcase scenario and what are the desired utf8 codepoints?

I'll point out that Noto Sans JP predominantly covers japanese glyphs and some Hangul, there's the massive noto cjk or alternatively adobe-source-han has a more fine grained split.

I test using Gnome Text Editor. The screenshot shows that. The first one was U+4F53 and the last one was U+904A.
Installed Noto CJK, same thing.

Offline

#6 2024-08-10 20:03:19

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,336

Re: [SOLVED] How to check which installed fonts support Chinese?

https://www.compart.com/de/unicode/U+4F53
I'm not sure what you think is wrong w/ that? (Though I don't have the noto fonts installed and resolved them from osaka mono)
But either way

fc-list :charset=4F53
fc-list :charset=904A

You can also test

FC_DEBUG=4 pango-view --font="sans" -t "体" | grep family:

to see the resolution cascade.

The hyphen looks strange-ish, but that depends on the actual codepoint you've tested.

Offline

#7 2024-08-10 20:08:09

average_scout
Member
Registered: 2024-06-14
Posts: 114

Re: [SOLVED] How to check which installed fonts support Chinese?

seth wrote:

https://www.compart.com/de/unicode/U+4F53
I'm not sure what you think is wrong w/ that? (Though I don't have the noto fonts installed and resolved them from osaka mono)
But either way

fc-list :charset=4F53
fc-list :charset=904A

You can also test

FC_DEBUG=4 pango-view --font="sans" -t "体" | grep family:

to see the resolution cascade.

The hyphen looks strange-ish, but that depends on the actual codepoint you've tested.

Found it. There was a

/usr/share/fonts/noto/NotoSerifTangut-Regular.ttf

which I removed, fixing the issue. Your command actually pointed towards the only serif font that had that character. Thanks for the help.

Last edited by average_scout (2024-08-10 20:09:04)

Offline

Board footer

Powered by FluxBB