Installing Japanese Fonts So They Display In All Programs?

Hi everyone. I’m having a bit of trouble with trying to get Japanese text to appear properly in non-KDE programs.For example, 日本語 appears exactly as expected in programs like Kate, Dolphin and Konsole, but in programs like Firefox, Libre, and Audacity, it just appears as boxes that usually containing (what I assume are) Unicode codepoints.

A few days ago, I did a fresh install of openSuse Leap 16, upgrading from openSuse Leap 15.3. I can’t remember what I did (if anything at all) to have Firefox display Japanese text correctly, but my first thought after installing Leap 16, was to go straight to YaST and install a language pack or fonts or whatever from there, but YaST doesn’t seem to exist any more.

So how do I go about acquiring and installing Japanese fonts for openSuse Leap 16, so that the fonts are available to all programs running under any user account?

The following packages might be relevant?

~> zypper search --details '*japanese*font*'
Loading repository data...
Reading installed packages...

S  | Name                                | Type    | Version          | Arch   | Repository
---+-------------------------------------+---------+------------------+--------+----------------
   | intlfonts-japanese-big-bitmap-fonts | package | 1.4.2-160000.2.2 | noarch | repo-oss (16.0)
   | intlfonts-japanese-bitmap-fonts     | package | 1.4.2-160000.2.2 | noarch | repo-oss (16.0)

    Note: For an extended search including not yet activated remote resources please use 'zypper
    search-packages'.
~> zypper search --details '*cjk*font*'
Loading repository data...
Reading installed packages...

S  | Name                       | Type    | Version          | Arch   | Repository
---+----------------------------+---------+------------------+--------+----------------
   | google-noto-sans-cjk-fonts | package | 2.004-160000.3.2 | noarch | repo-oss (16.0)

    Note: For an extended search including not yet activated remote resources please use 'zypper
    search-packages'.
~>
2 Likes

YaST isn’t required for this. Myrlyn can be used to search for and install the font package(s). After that run fc-cache -f, and restart Firefox, LO etc.

You can do sudo fc-cache -f for systemwide font cache rebuild.

hehehe

knurpht@Lenovo-P16:/etc/grub.d> zypper se jp | grep fonts
   | adobe-sourcehansans-jp-fonts       | Source Han Sans variation for Japanese                                  | pakket
   | adobe-sourcehanserif-jp-fonts      | Source Han Serif variation for Japanese                                 | pakket
   | gnu-unifont-jp-otf-fonts           | GNU Unifont Japanese (OpenType Format)                                  | pakket
   | google-noto-sans-jp-fonts          | Noto Sans Japanese Font                                                 | pakket
   | google-noto-sans-jp-mono-fonts     | Noto Sans Japanese Font - Monospace                                     | pakket
   | google-noto-serif-jp-fonts         | Noto Serif Japanese Font                                                | pakket
   | texlive-convert-jpfonts            | Convert half-width Japanese to full-width beautifully                   | pakket
   | texlive-convert-jpfonts-doc        | Documentation for texlive-convert-jpfonts                               | pakket
knurpht@Lenovo-P16:/etc/grub.d> 
1 Like

Thanks Gertjan. I think google-noto-sans-jp-fonts is probably the most appropriate choice here. The Adobe fonts are alternatives, and the TeX Live packages aren’t needed just to get Japanese text displaying in normal desktop applications.

Fully agreed. I’ve always been very charmed by the Noto fonts. They are very complete and readable.

1 Like

Actually, I found that installing the font package was all that was required, and the characters displayed correctly in Firefox immediately.

~> fc-match :lang=ja
NotoSansCJKjp-VF.otf: "Noto Sans CJK JP" "Regular"

Awesome. Thanks for the help guys. I went primarily for vector format fonts, so that when I’m using them in things like GIMP, where the fonts may need to sit at some fraction of a standard font size, or be deformed along a path, they can still look clean and clear.

1 Like

Thanks for the zypper trick! I didn’t know it was possible to search packages like that. Cool stuff.

I actually ran into that font issue earlier myself (noticed it with Spotify first), but installing google-noto-sans-cjk-fonts cleared it up system-wide for me too.

3 Likes

Yeah. I was wondered how people were supposed to find packages if they didn’t know exactly what they were looking for after YaST and its package search feature had been taken 'round the back of the shed.

YuGE relief!

1 Like

Thanks Deano. Although I’m not sure I need it now that you’ve shown us how to search on the CLI.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.