将texlive带的字体安装进linux系统字体库

装机之后装系统,装完系统就装texlive,然后又遇一坑,编译以前的文档竟然找不到某字体;

kpathsea:make_tex: Invalid fontname `FontAwesome Regular', contains ' '

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! fontspec error: "font-not-found"
!
! The font "FontAwesome Regular" cannot be found.
!
! See the fontspec documentation for further information.
!
! For immediate help type H <return>.
!...............................................  

这个FontAwesom是确实安装好了的;在texlive安装路径下能找到;

好在StackExchange上找到相同的问题(https://tex.stackexchange.com/questions/132888/fontawesome-font-not-found),沿着下面人的回答,找到了tug的用户文档:

https://www.tug.org/texlive/doc/texlive-en/texlive-en.html#x1-340003.4.4

按上面的说法,做将TEXMFSYSVAR/fonts/conf/texlive-fontconfig.conf放到/etc/fonts/conf.d/09-texlive.conf,然后执行fc-cache -fsv重建系统字体库信息就可以了。

(其实这篇用户文档就在texlive的安装镜像里,texlive-doc/texlive-en/,可能这个坑我12年的时候就踩过,但没记下来)

原文地址:https://www.cnblogs.com/ZisZ/p/8855303.html