xelatex使用从windows拷过来的系统字体
2013-10-12 17:23
288 查看
版本:texlive2011 ubuntu11.04
以root身份执行:
#cp -r /media/Windows/Fonts/* /usr/share/fonts
#fc-cache
#fc-list
#exit
$less test.tex
1 \documentclass{article}
2 \usepackage{fontspec}
3 \setmainfont{SimSun}
4
5 \begin{document}
6 好啊!hello world
7 \end{document}
$xelatex test.tex
出现如下错误:
kpathsea: Running mktexmf SimSun
! I can't find file `SimSun'.
<*> ...:=ljfour; mag:=1;nonstopmode; input SimSun
Please type another input file name
! Emergency stop.
<*> ...:=ljfour; mag:=1;nonstopmode; input SimSun
Transcript written on mfput.log.
grep: SimSun.log: No such file or directory
mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1;nonstopmode; input SimSun' failed to make SimSun.tfm.
kpathsea: Appending font creation commands tomissfont.log.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! fontspec error: "font-not-found"
!
! The font "SimSun" cannot be found.
!
! See the fontspec documentation for furtherinformation.
!
! For immediate help type H<return>.
!...............................................
l.3 \setmainfont{SimSun}
?
出现错误的原因是:用root拷过来的字体文件的权限是600,使得xelatex无法正常访问字体,出现字体找不到错误。
执行:
sudo chmod 755 /usr/share/fonts/*#此处要注意,文件夹一定要赋予x权限,否则你的系统就会全是框框了。
接下来写一个文件测试下:
vim test.tex
写入如下内容:
\usepackage{CJKutf8}
\begin{document}
\begin{CJK}{UTF8}{gkai}
我是楷体
\end{CJK}
\begin{CJK}{UTF8}{gbsn}
我是宋体
\end{CJK}
\end{document}
用xelatex编译下:
xelatex test.tex
以root身份执行:
#cp -r /media/Windows/Fonts/* /usr/share/fonts
#fc-cache
#fc-list
#exit
$less test.tex
1 \documentclass{article}
2 \usepackage{fontspec}
3 \setmainfont{SimSun}
4
5 \begin{document}
6 好啊!hello world
7 \end{document}
$xelatex test.tex
出现如下错误:
kpathsea: Running mktexmf SimSun
! I can't find file `SimSun'.
<*> ...:=ljfour; mag:=1;nonstopmode; input SimSun
Please type another input file name
! Emergency stop.
<*> ...:=ljfour; mag:=1;nonstopmode; input SimSun
Transcript written on mfput.log.
grep: SimSun.log: No such file or directory
mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1;nonstopmode; input SimSun' failed to make SimSun.tfm.
kpathsea: Appending font creation commands tomissfont.log.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! fontspec error: "font-not-found"
!
! The font "SimSun" cannot be found.
!
! See the fontspec documentation for furtherinformation.
!
! For immediate help type H<return>.
!...............................................
l.3 \setmainfont{SimSun}
?
出现错误的原因是:用root拷过来的字体文件的权限是600,使得xelatex无法正常访问字体,出现字体找不到错误。
执行:
sudo chmod 755 /usr/share/fonts/*#此处要注意,文件夹一定要赋予x权限,否则你的系统就会全是框框了。
接下来写一个文件测试下:
vim test.tex
写入如下内容:
\usepackage{CJKutf8}
\begin{document}
\begin{CJK}{UTF8}{gkai}
我是楷体
\end{CJK}
\begin{CJK}{UTF8}{gbsn}
我是宋体
\end{CJK}
\end{document}
用xelatex编译下:
xelatex test.tex
相关文章推荐
- Linux系统使用Windows系统字体的方法
- 关于TeXLive在Windows下无法使用系统字体解决方案
- 关于TeXLive在Windows下无法使用系统字体解决方案
- python画图包seaborn和matplotlib中文字体显示(针对windows系统,,使用ipython notebook)
- Ubuntu安装texlive2012以及xelatex下使用Windows自带字体
- Windows系统下使用C语言编写单线程的文件备份程序
- Android NDK r5 windows系统上安装与使用
- Windows系统下,使用Emacs+Putty操作远程机器
- 使用windows文件系统和字符I/O记录
- Windows 2008非服务器使用系统设置
- 使用windows 7系统的System帐户
- 使用Java Service Wrapper 把Java程序作为Windows系统服务
- windows下用cmd命令netstat查看系统端口使用情况
- windows系统 windows7 windows10系统下安装和配置以及使用redis
- 更改Windows系统默认字体的方法
- Windows Store apps开发[56]使用外部字体
- linux使用Windows中的ttf字体
- Linux下使用hydra获取linux和windows系统用户名和密码的教程
- 使用WSW将Nginx创建为Windows系统服务
- 使用PHP往Windows系统中添加用户