查看系统的中文字体库
$ sudo fc-list :lang-zh
安装中文字体
第一步 建立一个字体目录:
$ sudo mkdir /usr/share/fonts/WinFonts
第二步 把中文字体复制到上述目录中,然后进行如下操作:
$ sudo chmod 644 # 赋予执行权限
$ sudo mkfontscale # 刷新字体缓存
$ sudo mkfontdir # 刷新字体缓存
$ sudo fc-cache -fsv # 刷新字体缓存
第三步 配置环境变量,在 ~/.bashrc 和 ~/.profile 文件结尾添加如下代码:
#自己为texlive配置的环境变量
PATH=/usr/local/texlive/2016/bin/x86_64-linux:$PATH;
export PATH
MANPATH=/usr/local/texlive/2016/texmf-dist/doc/man:
$MANPATH; export MANPATH
INFOPATH=/usr/local/texlive/2016/texmf-dist/doc/info:
$INFOPATH; export INFOPATH
配置全局的环境变量,可在 /etc/manpath.config 文件的 # set up PATH to MANPATH mapping. 下添加:
MANPATH_MAP
/usr/local/texlive/2016/bin/x86_64-linux
/usr/local/texlive/2016/texmf-dist/doc/man
第四步 测试安装是否成功
askuyue@malegbasy:~$ tex --version
TeX 3.14159265 (TeX Live 2016)
kpathsea version 6.2.2
Copyright 2016 D.E. Knuth.
There is NO warranty. Redistribution of this software is
covered by the terms of both the TeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the TeX source.
Primary author of TeX: D.E. Knuth.
第五步 XeTEX 和 LuaTEX 的系统字体配置
-
texlive-fontconfig.conf 文件复制到 /etc/fonts/conf.d/09-texlive.conf:
$ sudo cp
/usr/local/texlive/2016/texmf-var/fonts/conf/texlive-fontconfig.conf
/etc/fonts/conf.d/09-texlive.conf -
刷新字体缓存
$ sudo fc-cache -fv
网友评论