centos 7 添加windows 字体

环境:windows

centos 7centos

mono 5.2  Asp.net MVC5缓存

问题:网络

在生成验证码时报,验证码没法显示,字体集找不到字体

 

解决:spa

到windows 系统中,拷贝字体到centos中。.net

windows 字体集在“C:\Windows\Fonts”。验证码

centos字体集在“/usr/share/fonts”class

 

步骤:权限

一、mkdir /usr/share/fonts/windows

二、先从你本机 C:\Windows\Fonts 拷贝或者网络上下载你想要安装的字体文件(*.ttf文件)到/usr/share/fonts/windows目录下

三、修改字体文件的权限,使root用户之外的用户也能够使用

 cd /usr/share/fonts/windows

 chmod 755 *.ttf

三、创建字体缓存

 mkfontscale (若是提示 mkfontscale: command not found,需自行安装 # yum install mkfontscale )

 mkfontdir

 fc-cache -fv (若是提示 fc-cache: command not found,则须要安装# yum install fontconfig )

四、重启计算机

reboot

相关文章
相关标签/搜索