Centos 7 にフォントを手動でインストールする

● Noto Sans CJK JP

wget https://noto-website-2.storage.googleapis.com/pkgs/NotoSansCJKjp-hinted.zip
unzip NotoSansCJKjp-hinted.zip
rm -f NotoSansCJKjp-hinted.zip
sudo mkdir /usr/share/fonts/NotoSansCJKjp
sudo mv NotoSans* /usr/share/fonts/NotoSansCJKjp/

● Noto Serif CJK JP

wget https://noto-website-2.storage.googleapis.com/pkgs/NotoSerifCJKjp-hinted.zip
unzip NotoSerifCJKjp-hinted.zip
rm -f NotoSerifCJKjp-hinted.zip
sudo mkdir /usr/share/fonts/NotoSerifCJKjp
sudo mv NotoSerif* /usr/share/fonts/NotoSerifCJKjp/

● 源柔ゴシック (げんじゅうゴシック)

wget https://osdn.jp/downloads/users/8/8642/genjyuugothic-20150607.zip
unzip genjyuugothic-20150607.zip
rm -f genjyuugothic-20150607.zip
sudo mkdir /usr/share/fonts/GenJyuuGothic
sudo mv GenJyuuGothic* /usr/share/fonts/GenJyuuGothic/

● Centos 7 に手動でインストールしたフォントを使用する

fc-list -v

で一覧を表示して、 "Noto Serif CJK JP" の項目を見てみます。

Pattern has 24 elts (size 32)
        family: "Noto Serif CJK JP"(s)
        familylang: "en"(s)
        style: "Regular"(s)
        stylelang: "en"(s)
        fullname: "Noto Serif CJK JP"(s)
        fullnamelang: "en"(s)
        slant: 0(i)(s)
        weight: 80(f)(s)
        width: 100(f)(s)
        foundry: "GOOG"(s)
        file: "/usr/share/fonts/NotoSerifCJKjp/NotoSerifCJKjp-Regular.otf"(s)
        index: 0(i)(s)
        outline: True(s)
        scalable: True(s)
        charset: 
        .... 続く .....

とあるので family に指定されている "Noto Serif CJK JP" を CSS で指定すれば使用できます。

body {
    font-family: "Noto Serif CJK JP";
    font-weight: bold;
}
body {
    font-family: "Gen Jyuu Gothic P";
No.1689
02/04 14:46

edit