我正在尝试使用 polyglossia 包和 xelatex 来编译一些阿拉伯语文本。xelatex 似乎无法识别我安装的字体。
\documentclass{article}
\usepackage{geometry}
\geometry{letterpaper}
\usepackage{setspace}
\usepackage{fontspec}
\usepackage{polyglossia}
\setmainlanguage{english}
\setotherlanguage{arabic}
\newfontfamily\arabicfont[Script = Arabic]{Scheherazade}
\begin{document}
\begin{Arabic}
انطلقت الثورة الليبية منذ أكثر من سنة متوازية مع ثورات الربيع العربي الأخرى التي
\end{Arabic}
\end{document}
当我尝试使用 xelatex 编译它时,出现以下错误:
kpathsea: Running mktextfm Scheherazade/ICU
/usr/local/texlive/2012/texmf/web2c/mktexnam: Could not map source abbreviation I for ICU.
/usr/local/texlive/2012/texmf/web2c/mktexnam: Need to update /usr/local/texlive/2012/texmf-dist/fonts/map/fontname/special.map?
mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input ICU
This is METAFONT, Version 2.718281 (TeX Live 2012)
kpathsea: Running mktexmf ICU
! I can't find file `ICU'.
<*> \mode:=ljfour; mag:=1; nonstopmode; input ICU
Please type another input file name
! Emergency stop.
<*> \mode:=ljfour; mag:=1; nonstopmode; input ICU
Transcript written on mfput.log.
grep: ICU.log: No such file or directory
mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input ICU' failed to make ICU.tfm.
kpathsea: Appending font creation commands to missfont.log.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! fontspec error: "font-not-found"
!
! The font "Scheherazade" cannot be found.
!
! See the fontspec documentation for further information.
!
! For immediate help type H <return>.
!...............................................
l.13 ...\arabicfont[Script = Arabic]{Scheherazade}
我在 Mac 上,我试图寻找这个问题的答案。我已确保在我的计算机上安装了 Scheherazade 字体(它出现在 FontBook 中)。我试过做
\newfontfamily\arabicfont[Script = Arabic]{Scheherazade-R.ttf}
也无济于事。有什么建议么?即使它安装在我的系统上,它似乎也无法识别字体。