centos610安装libreoffice缺失字体

1.安装libreoffice

2.安装fontconfig

  yum -y install fontconfig

3.安装ttmkfdir

  yum -y install ttmkfdir

4.检查已有字体库

  fc-list

5.新建字体目录

  mkdir /usr/share/fonts/chinese

6.上传Win字体

  把Windows系统的字体C:\Windows\Fonts复制进去

  具体可通过ftp的方式把.fon,.ttf字体文件上传至linux

7.复制Win字体

  假定ftp上传至/home/ftptest/fonts目录

  待ftp上传完成后,开始复制字体

  cp -r /home/ftptest/fonts/.   /usr/share/fonts/chinese

  修改字体权限

  chmod -R 644 /usr/share/fonts/chinese

8.汇总生成fonts.scale文件

  ttmkfdir -e /usr/share/X11/fonts/encodings/encodings.dir

9.修改字体配置

  vim /etc/fonts/fonts.conf 

<fontconfig>
  ....
  <dir>....
  <dir>/usr/share/fonts/chinese</dir>
  ....
</fontconfig>

10.更新字体缓存

  fc-cache -fv

至此 libreoffice 缺失字体,大部分字体也有。

猜你喜欢

转载自www.cnblogs.com/oumi/p/11296768.html