Skip to content

Instantly share code, notes, and snippets.

@cmtsij
Forked from mrjohannchang/20-noto-cjk.conf
Last active August 29, 2015 14:10
Show Gist options
  • Save cmtsij/35742a3939d16f053bbb to your computer and use it in GitHub Desktop.
Save cmtsij/35742a3939d16f053bbb to your computer and use it in GitHub Desktop.
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="pattern">
<test name="lang">
<string>zh-tw</string>
</test>
<test name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend">
<string>Noto Sans CJK TC</string>
<string>Noto Sans CJK SC</string>
<string>Noto Sans CJK JP</string>
<string>Noto Sans CJK KR</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>zh-tw</string>
</test>
<test name="family">
<string>monospace</string>
</test>
<edit name="family" mode="prepend">
<string>Noto Sans CJK TC</string>
<string>Noto Sans CJK SC</string>
<string>Noto Sans CJK JP</string>
<string>Noto Sans CJK KR</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>zh-hk</string>
</test>
<test name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend">
<string>Noto Sans CJK TC</string>
<string>Noto Sans CJK SC</string>
<string>Noto Sans CJK JP</string>
<string>Noto Sans CJK KR</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>zh-hk</string>
</test>
<test name="family">
<string>monospace</string>
</test>
<edit name="family" mode="prepend">
<string>Noto Sans CJK TC</string>
<string>Noto Sans CJK SC</string>
<string>Noto Sans CJK JP</string>
<string>Noto Sans CJK KR</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>zh-mo</string>
</test>
<test name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend">
<string>Noto Sans CJK TC</string>
<string>Noto Sans CJK SC</string>
<string>Noto Sans CJK JP</string>
<string>Noto Sans CJK KR</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>zh-mo</string>
</test>
<test name="family">
<string>monospace</string>
</test>
<edit name="family" mode="prepend">
<string>Noto Sans CJK TC</string>
<string>Noto Sans CJK SC</string>
<string>Noto Sans CJK JP</string>
<string>Noto Sans CJK KR</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>zh-cn</string>
</test>
<test name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend">
<string>Noto Sans CJK SC</string>
<string>Noto Sans CJK TC</string>
<string>Noto Sans CJK JP</string>
<string>Noto Sans CJK KR</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>zh-cn</string>
</test>
<test name="family">
<string>monospace</string>
</test>
<edit name="family" mode="prepend">
<string>Noto Sans CJK SC</string>
<string>Noto Sans CJK TC</string>
<string>Noto Sans CJK JP</string>
<string>Noto Sans CJK KR</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>zh-sg</string>
</test>
<test name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend">
<string>Noto Sans CJK SC</string>
<string>Noto Sans CJK TC</string>
<string>Noto Sans CJK JP</string>
<string>Noto Sans CJK KR</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>zh-sg</string>
</test>
<test name="family">
<string>monospace</string>
</test>
<edit name="family" mode="prepend">
<string>Noto Sans CJK SC</string>
<string>Noto Sans CJK TC</string>
<string>Noto Sans CJK JP</string>
<string>Noto Sans CJK KR</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>ja</string>
</test>
<test name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend">
<string>Noto Sans CJK JP</string>
<string>Noto Sans CJK SC</string>
<string>Noto Sans CJK TC</string>
<string>Noto Sans CJK KR</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>ja</string>
</test>
<test name="family">
<string>monospace</string>
</test>
<edit name="family" mode="prepend">
<string>Noto Sans CJK JP</string>
<string>Noto Sans CJK SC</string>
<string>Noto Sans CJK TC</string>
<string>Noto Sans CJK KR</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>ko</string>
</test>
<test name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend">
<string>Noto Sans CJK KR</string>
<string>Noto Sans CJK JP</string>
<string>Noto Sans CJK SC</string>
<string>Noto Sans CJK TC</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>ko</string>
</test>
<test name="family">
<string>monospace</string>
</test>
<edit name="family" mode="prepend">
<string>Noto Sans CJK KR</string>
<string>Noto Sans CJK JP</string>
<string>Noto Sans CJK SC</string>
<string>Noto Sans CJK TC</string>
</edit>
</match>
<match target="pattern">
<test name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend">
<string>Noto Sans CJK TC</string>
<string>Noto Sans CJK SC</string>
<string>Noto Sans CJK JP</string>
<string>Noto Sans CJK KR</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>zh-tw</string>
</test>
<test name="family">
<string>monospace</string>
</test>
<edit name="family" mode="prepend">
<string>Noto Sans CJK TC</string>
<string>Noto Sans CJK SC</string>
<string>Noto Sans CJK JP</string>
<string>Noto Sans CJK KR</string>
</edit>
</match>
</fontconfig>
From changyuheng of PTT:
前幾天也在調整這個,順手回一下:
https://gist.github.com/d5ac039a66d02fb7411b
若是 GNOME 3,將這份 fontconfig 放在
.config/fontconfig/conf.d/20-noto-cjk.conf 即可。
當然 Noto Sans CJK (Source Han Sans、思源黑體) 字型也要裝好才會有效。
這份檔案在 Ubuntu GNOME 14.04 enUS 下測試過沒問題,
英文會採用 GNOME 3 預設的字型,正、簡體中文、日、韓文則是 Noto Sans CJK。
中文的桌面環境下,這份設定檔搶不過預設的文泉驛,
可能要設定 strong binding 才行,
不過因為我自己沒有用中文的介面也就沒有再研究了。
出處:
http://ingramchen.io/blog/2014/07/ubuntu-noto-font.html
http://bit.ly/1BQNQ1Y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment