2018/3/14
fc-list|grep IPAフォントが足りないだけでなく、ティレクトリの構造が違うぞ・・・
開発環境 Debian Jessie | 実行環境 CentOS 7.4 |
---|---|
/usr/share/fonts/opentype/ipafont-mincho/ipam.ttf: IPA明朝,IPAMincho:style=Regular /usr/share/fonts/opentype/ipaexfont-gothic/ipaexg.ttf: IPAexゴシック,IPAexGothic:style=Regular /usr/share/fonts/opentype/ipafont-gothic/ipagp.ttf: IPA Pゴシック,IPAPGothic:style=Regular /usr/share/fonts/opentype/ipaexfont-mincho/ipaexm.ttf: IPAex明朝,IPAexMincho:style=Regular /usr/share/fonts/opentype/ipafont-mincho/ipamp.ttf: IPA P明朝,IPAPMincho:style=Regular /usr/share/fonts/opentype/ipafont-gothic/ipag.ttf: IPAゴシック,IPAGothic:style=Regular |
/usr/share/fonts/ipa-pgothic/ipagp.ttf: IPA Pゴシック,IPAPGothic:style=Regular /usr/share/fonts/ipa-pmincho/ipamp.ttf: IPA P明朝,IPAPMincho:style=Regularr /usr/share/fonts/ipa-gothic/ipag.ttf: IPAゴシック,IPAGothic:style=Regularr /usr/share/fonts/ipa-mincho/ipam.ttf: IPA明朝,IPAMincho:style=Regularr |
$ tree /usr/share/fonts/opentype/ /usr/share/fonts/opentype/ ├── ipaexfont-gothic │ └── ipaexg.ttf ├── ipaexfont-mincho │ └── ipaexm.ttf ├── ipafont-gothic │ ├── ipag.ttf │ └── ipagp.ttf └── ipafont-mincho ├── ipam.ttf └── ipamp.ttf $ ls -l /usr/share/fonts/truetype/font* /etc/alternatives/fonts* lrwxrwxrwx 1 root root 53 5月 15 2015 /etc/alternatives/fonts-japanese-gothic.ttf -> /usr/share/fonts/opentype/ipaexfont-gothic/ipaexg.ttf lrwxrwxrwx 1 root root 53 5月 15 2015 /etc/alternatives/fonts-japanese-mincho.ttf -> /usr/share/fonts/opentype/ipaexfont-mincho/ipaexm.ttf lrwxrwxrwx 1 root root 43 5月 15 2015 /usr/share/fonts/truetype/fonts-japanese-gothic.ttf -> /etc/alternatives/fonts-japanese-gothic.ttf lrwxrwxrwx 1 root root 43 5月 15 2015 /usr/share/fonts/truetype/fonts-japanese-mincho.ttf -> /etc/alternatives/fonts-japanese-mincho.ttf |
# tree /usr/share/fonts/ /usr/share/fonts/ ├── abattis-cantarell (途中省略) ├── ipa-gothic │ └── ipag.ttf ├── ipa-mincho │ └── ipam.ttf ├── ipa-pgothic │ └── ipagp.ttf ├── ipa-pmincho │ └── ipamp.ttf |
chromium https://ipafont.ipa.go.jp/ & cd Downloads wget https://oscdl.ipa.go.jp/IPAexfont/IPAexfont00301.zip mkdir -p /usr/share/fonts/opentype/ipaexfont-gothic/ mkdir -p /usr/share/fonts/opentype/ipaexfont-mincho/ # #CentOSのディレクトリ構造から考えると/usr/share/fonts/ipaexfont-gothic/ipaexg.ttfが正しいように見える cp ~/Downloads/IPAexfont00301/ipaexg.ttf /usr/share/fonts/opentype/ipaexfont-gothic/ cp ~/Downloads/IPAexfont00301/ipaexm.ttf /usr/share/fonts/opentype/ipaexfont-mincho/ fc-cache -vr fc-list|grep ipaこれでIPAexゴシックフォントがみえているなら大丈夫だと思う。
/usr/share/fonts/ipa-pgothic/ipagp.ttf: IPA Pゴシック,IPAPGothic:style=Regular /usr/share/fonts/opentype/ipaexfont-gothic/ipaexg.ttf: IPAexゴシック,IPAexGothic:style=Regular /usr/share/fonts/ipa-pmincho/ipamp.ttf: IPA P明朝,IPAPMincho:style=Regular /usr/share/fonts/ipa-gothic/ipag.ttf: IPAゴシック,IPAGothic:style=Regular /usr/share/fonts/opentype/ipaexfont-mincho/ipaexm.ttf: IPAex明朝,IPAexMincho:style=Regular /usr/share/fonts/ipa-mincho/ipam.ttf: IPA明朝,IPAMincho:style=Regular
開発環境 Debian Jessie | 実行環境 CentOS 7.4 |
---|---|
[変更前] fonts-japanese-mincho.ttfはいろいろリンクされている /usr/share/fonts/truetype/fonts-japanese-mincho.ttf → /etc/alternatives/fonts-japanese-gothic.ttf → /usr/share/fonts/opentype/ipaexfont-gothic/ipaexg.ttf |
[変更前] 存在しない |
[変更後] ソースコート中の記述を修正 protected String FontGothic="/usr/share/fonts/truetype/fonts-japanese-gothic.ttf"; → protected String FontGothic="/usr/share/fonts/opentype/ipaexfont-gothic/ipaexg.ttf"; |
[変更後] /usr/share/fonts/opentype/ipaexfont-gothic/ipaexg.ttf |