来源 : https://blog.csdn.net/ranweizheng/article/details/82993222
第一步:从 Windows 7 系统下字体文件夹(C:\Windows\Fonts) ,拷贝如下文件到当前Ubuntu用户目录 /usr/software/fonts/Fonts
宋体:simsunb.ttf 和 simsun.ttc微软雅黑:msyhbd.ttfCourier New:courbd.ttf、courbi.ttf、couri.ttf 和 cour.ttfWPS Office 所需字体:wingding.ttf、webdings.ttf、symbol.ttf、WINGDNG3.TTF、WINGDNG2.TTF、MTExtra.ttf
第二步:新建字体存放目录 windows-font
sudo mkdir /usr/share/fonts/truetype/windows-font
第三步:拷贝字体到wiondow-font目录下
sudo cp /usr/software/fonts/Fonts/* /usr/share/fonts/truetype/windows-font第二个路径可以随意[root@localhost windows-font]# lscourbd.ttf courbi.ttf couri.ttf cour.ttf fonts.dir fonts.scale msyhbd.ttf simsunb.ttf simsun.ttf[root@localhost windows-font]# pwd/usr/share/fonts/windows-font
安装mkfontscale mkfontdir和fc-cache命令
# 使mkfontscale和mkfontdir命令正常运行sudo apt-get install ttf-mscorefonts-installer# 使fc-cache命令正常运行sudo apt-get install fontconfigcentos# 使mkfontscale和mkfontdir命令正常运行yum install mkfontscale# 使fc-cache命令正常运行。如果提示 fc-cache: command not foundyum install fontconfig
第四步:修改权限,并更新字体缓存
1. sudo chmod -R 777 /usr/share/fonts/truetype/windows-font2. cd /usr/share/fonts/truetype/windows-font3. sudo mkfontscale4. sudo mkfontdir5. sudo fc-cache -fv
第五步:重启下系统吧!
sudo reboot
