![Fandol 字体无法在 TeXworks PDF 查看器中呈现](https://linux22.com/image/384801/Fandol%20%E5%AD%97%E4%BD%93%E6%97%A0%E6%B3%95%E5%9C%A8%20TeXworks%20PDF%20%E6%9F%A5%E7%9C%8B%E5%99%A8%E4%B8%AD%E5%91%88%E7%8E%B0.png)
我正在使用 MiKTeX 发行版中捆绑的 TeXworks 和Fandol 简体中文字体系列(可在 TeX Live 和 MiKTeX 中使用)。但是,Fandol 字体不会在 TeXworks PDF 查看器中呈现。
我的操作系统是 Windows 8,目前最新版本poppler-data
是:
另一方面,Adobe Acrobat Reader DC是能够呈现生成的 PDF 文件。
以下是 MWE:
% !TeX program = XeLaTeX
\documentclass{article}
\usepackage{fontspec}
\setmainfont{FandolSong-Regular}
\begin{document}
\textsf{English} English 中文 English \textsf{English}
\end{document}
以下是日志文件的内容
This is XeTeX, Version 3.14159265-2.6-0.99999 (MiKTeX 2.9.6840 64-bit) (preloaded format=xelatex 2018.10.24) ...
entering extended mode
**./FandolTest.tex
(FandolTest.tex
LaTeX2e <2018-04-01> patch level 5
("C:\Program Files\MiKTeX 2.9\tex\latex\base\article.cls"
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
("C:\Program Files\MiKTeX 2.9\tex\latex\base\size10.clo"
File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
...
% Irrelevant information regarding counters and dimensions
...
("C:\Program Files\MiKTeX 2.9\tex\latex\fontspec\fontspec.sty"
("C:\Program Files\MiKTeX 2.9\tex\latex\l3packages\xparse\xparse.sty"
("C:\Program Files\MiKTeX 2.9\tex\latex\l3kernel\expl3.sty"
Package: expl3 2018-10-19 L3 programming layer (loader)
("C:\Program Files\MiKTeX 2.9\tex\latex\l3kernel\expl3-code.tex"
Package: expl3 2018-10-19 L3 programming layer (code)
...
% Irrelevant information regarding counters, dimensions, skips and boxes
...
Package: fontspec 2018/07/30 vv2.6h Font selection for XeLaTeX and LuaLaTeX
("C:\Program Files\MiKTeX 2.9\tex\latex\fontspec\fontspec-xetex.sty"
Package: fontspec-xetex 2018/07/30 vv2.6h Font selection for XeLaTeX and LuaLaT
eX
...
% Irrelevant information regarding counters and dimensions
...
("C:\Program Files\MiKTeX 2.9\tex\latex\base\fontenc.sty"
Package: fontenc 2017/04/05 v2.0i Standard LaTeX package
("C:\Program Files\MiKTeX 2.9\tex\latex\base\tuenc.def"
File: tuenc.def 2017/04/05 v2.0i Standard LaTeX file
LaTeX Font Info: Redeclaring font encoding TU on input line 82.
))
("C:\Program Files\MiKTeX 2.9\tex\latex\fontspec\fontspec.cfg")
LaTeX Info: Redefining \itshape on input line 3910.
LaTeX Info: Redefining \slshape on input line 3915.
LaTeX Info: Redefining \scshape on input line 3920.
LaTeX Info: Redefining \upshape on input line 3925.
LaTeX Info: Redefining \em on input line 3955.
LaTeX Info: Redefining \emph on input line 3980.
LaTeX Info: Redefining \- on input line 4034.
))
Package fontspec Info: Font "FandolSong-Regular" does not contain any OpenType
(fontspec) `Script' information.
Package fontspec Info: Could not resolve font "FandolSong-Regular/I" (it
(fontspec) probably doesn't exist).
Package fontspec Info: Font family 'FandolSong-Regular(0)' created for font
(fontspec) 'FandolSong-Regular' with options [Ligatures=TeX].
(fontspec)
(fontspec) This font family consists of the following NFSS
(fontspec) series/shapes:
(fontspec)
(fontspec) - 'normal' (m/n) with NFSS spec.:
(fontspec) <->"FandolSong-Regular/OT:mapping=tex-text;"
(fontspec) - 'small caps' (m/sc) with NFSS spec.:
(fontspec) - 'bold' (bx/n) with NFSS spec.:
(fontspec) <->"FandolSong-Regular/B/OT:mapping=tex-text;"
(fontspec) - 'bold small caps' (bx/sc) with NFSS spec.:
(fontspec) - 'bold italic' (bx/it) with NFSS spec.:
(fontspec) <->"FandolSong-Regular/BI/OT:mapping=tex-text;"
(fontspec) - 'bold italic small caps' (bx/itsc) with NFSS spec.:
LaTeX Info: Redefining \rmfamily on input line 5.
(FandolTest.aux)
\openout1 = `FandolTest.aux'.
...
% Irrelevant information regarding math font setup
...
Here is how much of TeX's memory you used:
11269 strings out of 427792
249161 string characters out of 3151723
315042 words of memory out of 3000000
15305 multiletter control sequences out of 15000+200000
532402 words of font info for 32 fonts, out of 3000000 for 9000
1328 hyphenation exceptions out of 8191
39i,4n,67p,355b,443s stack positions out of 5000i,500n,10000p,200000b,50000s
Output written on FandolTest.pdf (1 page).
答案1
MiKTeX 编译 TeXworks 内置副本与标准版和 TeX Live 副本的方式似乎有所不同,尽管它们都使用相同版本的源代码,但它们各自倾向于使用不同的 QT 版本作为图形引擎。
在这种情况下我建议,除非您有其他原因需要切换编辑器或查看器(我建议您用 SumatraPDF 替换内部查看器,这是解决此错误的好方法),否则请暂时使用独立版 TeXworks,直到 MiKTeX 解决查看器字体问题。
为了与其他用户兼容,我建议使用主发布页面上的 0.6.2 版本https://github.com/TeXworks/texworks/releases
我个人会使用并重新配置 zip(便携版),因为一旦 MiKTeX 版本更新,删除它会更容易,但是这需要您将 MiKTeX 所需的“设置”添加到排版首选项中(您可以将条目从一个剪切并粘贴到另一个)另一种方法是使用安装程序设置并让它完成大部分工作,然后只需检查两者之间是否存在细微的差别。