CentOS安装中文字体

yum install -y fontconfig
mkdir  /usr/share/fonts/chinese
上传windows 电脑 c:\Windows\Fonts下面的字体库到服务器/usr/share/fonts/chinese/ 目录下
chmod -R 755 /usr/share/fonts/chinese
yum -y install ttmkfdir
ttmkfdir -e /usr/share/X11/fonts/encodings/encodings.dir
vi /etc/fonts/fonts.conf
<!-- Font directory list -->

      <dir>/usr/share/fonts</dir>
      <dir>/usr/share/X11/fonts/Type1</dir> <dir>/usr/share/X11/fonts/TTF</dir> <dir>/usr/local/share/fonts</dir>
      <dir>/user/share/fonts/chinese</dir> 增长这一行
      <dir prefix="xdg">fonts</dir>
      <!-- the following element will be removed in the future -->
      <dir>~/.fonts</dir>

fc-cache 刷新内存中的字体库缓存
执行fc-list 查看字体库列表若是有出现咱们上传的字体表示安装成功windows

相关文章
相关标签/搜索