我想在 Sharelatex 的文档中使用 Arial 字体。
我在其他帖子中发现我应该使用XeLatex
或LuaLatex
:
\usepackage{fontspec}
\setmainfont{Arial}
Xelatex
由于超时而出错。并LuaLatex
返回错误:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! fontspec error: "font-not-found"
!
! The font "Arial" cannot be found.
!
! See the fontspec documentation for further information.
!
! For immediate help type H <return>.
!...............................................
l.24 \setmainfont{Arial}
|'''''''''''''''''''''''''''''''''''''''''''''''
| A font might not be found for many reasons.
| Check the spelling, where the font is installed etc. etc.
|
| When in doubt, ask someone for help!
|...............................................
有人有一个清晰简单的方法来解决我的问题吗?
答案1
感谢 Merijn 的评论和这一页,我找到了一个解决方案:
应该将其.ttf
添加到项目中。然后在主文件中指定用途:
例子 :
\documentclass[12pt]{article}
\usepackage{fontspec}
\setmainfont[Ligatures=TeX]{Arial.ttf}
\begin{document}
This is the document text;
\end{document}