在大多数开发过程中,都会遇到linux服务器字体缺失的情况,今天我在SuSe操作系统中也遇到了,在此记录处理过程备忘。
SuSe查询当前系统支持的字体
fc-list | less
/usr/share/fonts/100dpi/courB18.pcf.gz: Adobe Courier:style=Bold
/usr/share/fonts/100dpi/helvBO18.pcf.gz: Adobe Helvetica:style=Bold Oblique
/usr/share/fonts/100dpi/UTRG__12.pcf.gz: Adobe Utopia:style=Regular
/usr/share/fonts/100dpi/timB12-ISO8859-1.pcf.gz: Adobe Times:style=Bold
/usr/share/fonts/100dpi/luBIS19-ISO8859-1.pcf.gz: B&H Lucida:style=Sans Bold Italic
/usr/share/fonts/100dpi/luIS18-ISO8859-1.pcf.gz: B&H Lucida:style=Sans Italic
/usr/share/fonts/misc/b10_bi.pcf.gz: Efont Biwidth:style=Bold Italic
/usr/share/fonts/75dpi/courBO14.pcf.gz: Adobe Courier:style=Bold Oblique
/usr/share/fonts/75dpi/timB18-ISO8859-1.pcf.gz: Adobe Times:style=Bold
...
注: 通过方向键,查询当前系统中是否有你需要的字体。
获取字体
一般字体的获取,都可以在大多数的Windows机器上找到,我的开发机器就是windows。
具体的目录:C:\Windows\Fonts 下,找到对应的字体包文件即可。
配置SuSe新字体
上传字体文件到SuSe服务器上,具体目录:/usr/share/fonts/truetype
重新加载新添加的字体
fc-cache -fv
注:该命令加载新字体,再次执行fc-list | less查看是否存在新加的字体,希望能帮到有需要的人。