this post was submitted on 02 Jan 2024
26 points (93.3% liked)

Linux

48067 readers
780 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

I just installed Fedora and I'm trying to figure out how to make it display Japanese fonts, by default it displays kanji as Chinese characters, I installed some fonts but still no change, how do I change this?

top 13 comments
sorted by: hot top controversial new old
[–] [email protected] 10 points 10 months ago (1 children)

Most cases will be solved with these settings (but some applications may need additional tweeks):

  1. Use ja_JP.UTF-8locale, or
  2. Use ~/.config/fontconfig/fonts.conf
[–] [email protected] 1 points 10 months ago (1 children)

I was trying to do that but I'm unsure what to edit to do that, since most tutorials are using either a Debian based or Arch distro.

I was using a similar guide, and it also talked about the locale.gen, but that file was never to be found, I just searched a bit more into that and this popped up. So it seems Fedora handles things differently, but now I'm unsure what commands to execute since I'm not sure the ones in that thread are also valid for me.

[–] [email protected] 2 points 10 months ago* (last edited 10 months ago)

You can use localectl to change the locale on Fedora. Here's what you need to do:

  • See if you have Japanese locale installed. Something like ja_JP.UTF-8 should be in the output of localectl list-locales.
  • If it's not, you should install it using the following command: sudo dnf install langpacks-ja (I'm not 100 % sure about this and I don't have a Fedora system to test it on.)
  • Set the locale: sudo localectl set-locale LANG=ja_JP.UTF-8
  • Reboot your system. Everything should be in Japanese now.

This will (probably) change everything to Japanese – texts in menus, error messages in the terminal, and also the font rendering. This answer on Stack Overflow suggests to do something with your fonts.conf. This way your UI would be in English (or your preferred language) and kanji would render as the Japanese variants.

[–] [email protected] 8 points 10 months ago (1 children)

A. I don't know much about CJK fonts. I'm just spitballing. I am also half asleep.

B. It depends where the font is displayed. As you probably know, different Japanese, Korean and Chinese characters, which share history and look similar, share one unicode codepoint, see this Wikipedia article. Which specific glyph is shown is decided by some variable that specifies in what language the text is written:

  • If the text is somewhere in the GUI (the title bar, the panel, some menu), it is probably decided by your default language and locale. This can be changed somewhere in settings. Changing this would also probably change everything to Japanese.
  • If the text is somewhere on the web, this is decided by the lang parameter of the website. You can't change this easily.
[–] [email protected] 1 points 10 months ago

Well, in Firefox's settings there's an option to use my own fonts instead of the web site, so I don't think it's related to anything like that, but rather some setting within the OS, related to locale config files.

[–] [email protected] 4 points 10 months ago

If japanese kanji show as their Chinese variant make sure you are using the proper font variant. My recommendation is noto-sans-cjk-jp.

Fedora does allow you to set the locale, it doesn't mention generating them so they might very well already be present You can use https://docs.fedoraproject.org/en-US/fedora/latest/system-administrators-guide/basic-system-configuration/System_Locale_and_Keyboard_Configuration/ to read more than I can tell you here.

[–] [email protected] 4 points 10 months ago* (last edited 10 months ago) (1 children)

There's a guide here to show Japanese fonts by default and also how to configure your browser to show Japanese fonts by default.

[–] [email protected] 1 points 10 months ago* (last edited 10 months ago)

I was using a similar guide, and it also talked about the locale.gen, but that file was never to be found, I just searched a bit more into that and this popped up. So it seems Fedora handles things differently, but now I'm unsure what commands to execute since I'm not sure the ones in that thread are also valid for me.

[–] [email protected] 3 points 10 months ago* (last edited 10 months ago) (1 children)

"By default it displays kanji as Chinese characters" Not quite sure what you mean by that
Edit: my bad, I read the other comment's link and had not encountered the issue yet. Wish you luck to solve this

[–] [email protected] 1 points 10 months ago (1 children)

I think it's pure luck what font does your OS prefer, I was using Pop_OS and it defaulted to Japanese, but I think it's more common to default to Chinese because of the population size.

[–] [email protected] 1 points 10 months ago (1 children)

I think it defaults to Japanese every time in my experience

[–] [email protected] 1 points 10 months ago

Not this time it seems.

[–] [email protected] 2 points 10 months ago

you can you this as a reference https://wiki.archlinux.org/title/Localization/Simplified_Chinese#Chinese_characters_displayed_as_variant_(Japanese)_glyphs . although it is for chinese, but you can take the font config of it and reorder it (put Noto Sans CJK JP at first)