Ubuntu – How to change CJK fallback font

fontsgoogle-chromelanguagelanguage-support

I recently upgraded to Ubuntu 16.04 LTS from 14.04 LTS. All worked pretty fine except for an issue on Chinese fonts which I've been unable to resolve.

While the font is mostly OK in system applications, it doesn't work well in Chrome: It seems that Chrome automatically uses Noto Sans font as the fallback font, which for some reason is only installed in its "thin" variant in 16.04 LTS and thus looks very ugly. In Firefox and many other applications, the font Wenquanyi Zenhei is correctly used as the fallback font and it looks much better. If I delete Noto Sans from the system, Chrome just gives me blank squares instead of trying to use Wenquanyi Zenhei.

I'm not sure why that's happening. Is this something specific to Chrome, that Google intends it to use its own Noto Sans font for fallback? Or is it something about system configuration? Or is there some setting in Chrome that I can change? How can I change the fallback font for CJK?(systemwide or just for Chrome)

Best Answer

There was a bug in the fontconfig package (I reported the bug, which has since been fixed in fonts-noto-cjk - 1:1.004+repack2-1~ubuntu1) which somehow let Chrome believe that "thin" is the correct weight to use. I removed the package and downloaded NotoSansCJK directly from Google, which contains fonts of different weights in separate files. After installing the fonts manually this issue seems to be fixed, and Chrome is able to render CJK correctly even though my default font is still unchanged (Liberation Sans).

Related Question