centos7安装SourceCodePro字体

1. 下载SourceCodePro字体,后缀应为.ttf。

2. 将字体文件复制到fonts(/usr/share/fonts)文件夹下:

[root@centos fonts]# mv /home/seif/Downloads/SourceCodePro .

3. 修改字体文件的权限,使root用户以外的用户也可以使用:

[root@centos fonts]# cd SourceCodePro/

[root@centos SourceCodePro]# chmod 755 *.ttf

[root@centos SourceCodePro]# ls -l

总用量 624

-rwxr-xr-x. 1 seif seif 103764 9月 30 2012 SourceCodePro-Black.ttf

-rwxr-xr-x. 1 seif seif 103512 9月 30 2012 SourceCodePro-Bold.ttf

-rwxr-xr-x. 1 seif seif 104760 9月 30 2012 SourceCodePro-ExtraLight.ttf

-rwxr-xr-x. 1 seif seif 104408 9月 30 2012 SourceCodePro-Light.ttf

-rwxr-xr-x. 1 seif seif 103820 9月 30 2012 SourceCodePro-Regular.ttf

-rwxr-xr-x. 1 seif seif 103500 9月 30 2012 SourceCodePro-Semibold.ttf

4. 建立字体缓存:

[root@centos SourceCodePro]# mkfontscale

[root@centos SourceCodePro]# mkfontdir

[root@centos SourceCodePro]# fc-cache -fv

参考:http://blog.csdn.net/u012724167/article/details/53510589