
我在 Windows 上使用 texlive 2016 (TeXStudio/latexmk/lualatex)。以下 MWE 一直為我工作,直到最後一次 texlive 2016 更新(tlmgr update --all;於 2017 年 1 月 26 日執行)。
\documentclass[12pt]{article}
\usepackage{fontspec}
\setmainfont{EB Garamond}[%
Extension = .otf ,
Path= C:/Users/me/Documents/MWEs/fonts/EBGaramond-0.016/otf/ , %<-- does not work anymore
%Path= fonts/EBGaramond-0.016/otf/ , %<-- relative path works fine
Numbers = {OldStyle,Monospaced},
UprightFont = {EBGaramond08-Regular},
ItalicFont = {EBGaramond08-Italic},
UprightFeatures = {%
SizeFeatures={%
{Size={-9.99},Font={EBGaramond08-Regular}},
{Size={10-},Font={EBGaramond12-Regular}},
},
},
ItalicFeatures = {%
SizeFeatures={%
{Size={-9.99},Font={EBGaramond08-Italic}},
{Size={10-},Font={EBGaramond12-Italic}},
},
},
]
\usepackage{polyglossia}
\setdefaultlanguage{english}
\begin{document}
Hello World!
\end{document}
在上述更新之後,luaotfload 不再載入(找到)otf 檔案。從日誌中:
luaotfload | db :重新載入已啟動(格式:otf、ttf、ttc);原因:「未找到文件:C.」。
只是猜測:“C”。我看起來很奇怪 - 也許是解析問題?
如果我消除前導「C:/.../...」並使用相對路徑,luaotfload 會找到該檔案並且一切正常。
注意:字體 EB Garamond 可免費使用,僅用於演示目的。可以在這裡下載:http://www.georgduffner.at/ebgaramond/download.html
是否不再支援絕對路徑(至少在 Windows 上)?
答案1
該問題是由 fontspec 套件中的錯誤/回歸引起的。它已在 fontspec v2.5e (2017/02/10) 中修復。
來自變更日誌:“修復無法使用 Windows 中的 C:...檔案路徑的回歸。”