安裝的字型不起作用

安裝的字型不起作用

我從哈佛大學下載了一篇論文的乳膠模板。

目前我正在使用 Linux Mint Nadia 14。

模板的說明告訴您使用以下命令安裝所需的字體(包含在​​內):sudo cp fonts/* /usr/local/share/fonts/ 我已經這樣做了,但我必須在命令中添加標誌-r才能正常工作。當我嘗試編譯 tex(使用也包含使用 xelatex 的編譯腳本)時,出現以下錯誤:

! fontspec error: "font-not-found"
! 
! The font "EB Garamond" cannot be found.
! 
! See the fontspec documentation for further information.

EB Garamond 是上一個指令已安裝的字型之一。我也嘗試過從sudo fc-cache -fsvcl 執行。我得到了輸出 /usr/local/share/fonts/EB Garamond: caching, new cache contents: 10 fonts, 0 dirs

但問題仍然存在。顯然這是權限問題,因為它適用於sudo.但將字體資料夾和檔案的權限更改為644也沒有解決問題。

透過這個小例子:

\fontfamily{EB Garamond}
\documentclass{article}
\begin{document}
hi
\end{document}

我得到以下內容記錄檔

任何想法?

答案1

這是一個範例文件:

\documentclass{article}
\usepackage{fontspec}
\setmainfont{EB Garamond}
\begin{document}
foo
\end{document}

運行它xelatex,如果失敗則顯示日誌檔案。和

pdffonts testfile.pdf我明白了

name                         type        encoding    emb sub uni object ID
---------------------------- ----------- ----------- --- --- --- ---------
ZXTLQL+EBGaramond-Identity-H CID Type 0C Identity-H  yes yes yes      5  0

相關內容