当我使用 moderncv 和 xelatex 或 lulatex 时,我收到一串非常烦人的错误消息,指出 Myriad Pro 字体丢失:
\setmainfont{Myriad Pro}
\setsansfont{Myriad Pro}
整个错误信息如下:
line 90: fontspec error: "font-not-found"! The font "Myriad Pro" cannot be found. ^^I\setmainfont{Myriad Pro}
line 90: fontspec error: "font-not-found"! The font "Myriad Pro" cannot be found. ^^I\setmainfont{Myriad Pro}
line 90: Font EU1/MyriadPro(0)/m/n/10.95="Myriad Pro:" at 10.95pt not loadable: Metric (TFM) file or installed font not found. ^^I\setmainfont{Myriad Pro}
line 91: fontspec error: "font-not-found"! The font "Myriad Pro" cannot be found. ^^I\setsansfont{Myriad Pro}
line 94: Font EU1/MyriadPro(0)/m/n/10="Myriad Pro:" at 10.0pt not loadable: Metric (TFM) file or installed font not found. ^^I\vspace
line 94: Font EU1/MyriadPro(0)/m/n/34="Myriad Pro:" at 34.0pt not loadable: Metric (TFM) file or installed font not found. ^^I\vspace
line 94: Font EU1/MyriadPro(0)/m/n/17.28="Myriad Pro:" at 17.28pt not loadable: Metric (TFM) file or installed font not found. ^^I\vspace
line 96: Font EU1/MyriadPro(0)/m/n/14.4="Myriad Pro:" at 14.4pt not loadable: Metric (TFM) file or installed font not found. ^^I\section{Objetivo}
line 119: Font EU1/MyriadPro(0)/bx/n/10.95="Myriad Pro:" at 10.95pt not loadable: Metric (TFM) file or installed font not found. ^^I^^I\end{itemize}}
line 131: Font EU1/MyriadPro(0)/m/n/7="Myriad Pro:" at 7.0pt not loadable: Metric (TFM) file or installed font not found. ^^I^^I\end{itemize}}
line 136: Font EU1/MyriadPro(0)/m/it/10="Myriad Pro:" at 10.0pt not loadable: Metric (TFM) file or installed font not found. ...in, central Peruvian convergent margin"}}
line 136: Font EU1/MyriadPro(0)/m/it/10.95="Myriad Pro:" at 10.95pt not loadable: Metric (TFM) file or installed font not found. ...in, central Peruvian convergent margin"}}
line 155: Font EU1/MyriadPro(0)/m/n/8="Myriad Pro:" at 8.0pt not loadable: Metric (TFM) file or installed font not found. ...#}, SQL, \LaTeX, JavaScript, PHP, Python}
: Over-specification in `h'-direction.
: Over-specification in `v'-direction.
: You have requested package `moderncvstylefork', but the package provides `moderncvstyleclassic'.
: Font `EU1/MyriadPro(0)/m/n/10.95' does not specify its(microtype) \fontdimen 6 (width of an `em')! Therefore,(microtype) protrusion will not work with this font.
: Font `EU1/MyriadPro(0)/m/n/10' does not specify its(microtype) \fontdimen 6 (width of an `em')! Therefore,(microtype) protrusion will not work with this font.
: Font `EU1/MyriadPro(0)/m/n/34' does not specify its(microtype) \fontdimen 6 (width of an `em')! Therefore,(microtype) protrusion will not work with this font.
: Font `EU1/MyriadPro(0)/m/n/17.28' does not specify its(microtype) \fontdimen 6 (width of an `em')! Therefore,(microtype) protrusion will not work with this font.
line 94: Overfull \vbox (117.07455pt too high) detected
line 94: Font shape `EU1/MyriadPro(0)/m/sl' undefined(Font) using `EU1/MyriadPro(0)/m/n' instead
line 94: Underfull \hbox (badness 10000) in paragraph
line 96: Token not allowed in a PDF string (Unicode):(hyperref) removing `\BooleanFalse'
: Font `EU1/MyriadPro(0)/m/n/14.4' does not specify its(microtype) \fontdimen 6 (width of an `em')! Therefore,(microtype) protrusion will not work with this font.
line 99: Token not allowed in a PDF string (Unicode):(hyperref) removing `\BooleanFalse'
line 102: Token not allowed in a PDF string (Unicode):(hyperref) removing `\BooleanFalse'
line 111: Font shape `EU1/MyriadPro(0)/bx/n' undefined(Font) using `EU1/MyriadPro(0)/m/n' instead
line 111: Font shape `EU1/MyriadPro(0)/m/it' undefined(Font) using `EU1/MyriadPro(0)/m/n' instead
: Font `EU1/MyriadPro(0)/bx/n/10.95' does not specify its(microtype) \fontdimen 6 (width of an `em')! Therefore,(microtype) protrusion will not work with this font.
: Font `EU1/MyriadPro(0)/m/n/7' does not specify its(microtype) \fontdimen 6 (width of an `em')! Therefore,(microtype) protrusion will not work with this font.
line 133: Token not allowed in a PDF string (Unicode):(hyperref) removing `\BooleanFalse'
: Font `EU1/MyriadPro(0)/m/it/10' does not specify its
: Font `EU1/MyriadPro(0)/m/it/10.95' does not specify its(microtype) \fontdimen 6 (width of an `em')! Therefore,(microtype) protrusion will not work with this font.
line 149: Token not allowed in a PDF string (Unicode):(hyperref) removing `\BooleanFalse'
line 154: Token not allowed in a PDF string (Unicode):(hyperref) removing `\BooleanFalse'
: Font `EU1/MyriadPro(0)/m/n/8' does not specify its(microtype) \fontdimen 6 (width of an `em')! Therefore,(microtype) protrusion will not work with this font.
line 160: Token not allowed in a PDF string (Unicode):(hyperref) removing `\BooleanFalse'
line 164: Token not allowed in a PDF string (Unicode):(hyperref) removing `\BooleanFalse'
line 167: Token not allowed in a PDF string (Unicode):(hyperref) removing `\BooleanFalse'
line 170: Token not allowed in a PDF string (Unicode):(hyperref) removing `\BooleanFalse'
: Some font shapes were not available, defaults substituted.
我在 Windows 中重新安装了 MikTek 2.9 以及 TexStudio 2.8.8。此错误在 TexStudio 2.8.6 中出现过一次,在 2.8.4 中从未出现过。这是什么问题?我知道 Myriad Pro 附带 MikTek,这是因为我在过去一年左右只升级过 TexStudio。
非常感谢您的支持,提前致谢,
编辑:
安装 Adobe Reader 并重新启动即可解决问题,这是因为路径需要根据以下内容进行更新:
--- /cygdrive/c/Users/Gery/AppData/Roaming/MiKTeX/2.9/fontconfig/config/localfonts.conf 2015-01-09 12:54:02.749021900 -0500
+++ /cygdrive/c/ProgramData/MiKTeX/2.9/fontconfig/config/localfonts.conf 2015-01-09 11:42:05.469025600 -0500
@@ -8,9 +8,6 @@
<fontconfig>
<include>localfonts2.conf</include>
<dir>C:\Windows\Fonts</dir>
-<dir>C:\Program Files (x86)\Adobe\Reader 11.0\Resource\Font</dir>
-<dir>C:\Users\Gery\AppData\Roaming\MiKTeX\2.9\fonts\type1</dir>
-<dir>C:\Users\Gery\AppData\Roaming\MiKTeX\2.9\fonts\truetype</dir>
<dir>C:\Program Files (x86)\MiKTeX 2.9\fonts\type1</dir>
<dir>C:\Program Files (x86)\MiKTeX 2.9\fonts\opentype</dir>
</fontconfig>