![使用 fontspec 的特定字體時如何設定字間距?](https://rvso.com/image/330751/%E4%BD%BF%E7%94%A8%20fontspec%20%E7%9A%84%E7%89%B9%E5%AE%9A%E5%AD%97%E9%AB%94%E6%99%82%E5%A6%82%E4%BD%95%E8%A8%AD%E5%AE%9A%E5%AD%97%E9%96%93%E8%B7%9D%EF%BC%9F.png)
我使用了自訂字體,但單字總是靠得太近。我可以解決這個問題,以便每當使用此字體時,間距都是相同的嗎?類似的東西em
會很棒。我目前正在~~
需要時插入......不太理想!
下面是一個 MWE,而MYFONT
不是我使用的字體。我無法分享,抱歉!
\documentclass{memoir}
\usepackage{fontspec,xunicode}
\usepackage[T1]{fontenc}
\begin{document}
\fontspec{MYFONT} kerning AV fi Ri fi fl fj
\end{document}
答案1
該命令\fontspec
絕對不能直接在文件正文中使用;最好預先定義所有字體。
不相關,但xunicode
不應與fontspec
; 一起加載fontenc
通常與 一起沒用fontspec
。
您可以使用該WordSpace
功能。對該因素進行實驗,在下面的範例中,效果被誇大以顯示它。
\documentclass{memoir}
\usepackage{fontspec}
\setmainfont{EB Garamond} % just for testing
\newfontfamily{\myfont}{TeX Gyre Adventor}[
Scale=MatchUppercase,
WordSpace={10},
]
\DeclareTextFontCommand{\textmy}{\myfont}
\begin{document}
This is the standard font
\textmy{kerning AV fi Ri fi fl fj}
This is the standard font again
\end{document}
您也可以使用開關(類似於和\myfont
之間的關係)。\textsf
\sffamily