
在下面的範例中,我為預設的 LaTeX 字體添加了一些功能並由\addfontfeatures
編譯XeLatex
,但所有這些功能都不起作用。為什麼以及如何讓它們發揮作用?
\documentclass{article}
\usepackage{fontspec}
\begin{document}
\addfontfeatures{Color=123456,Opacity=0.3,Scale=5}
ABCD
\end{document}
答案1
正如評論中所提到的:\setmainfont{Latin Modern Roman}
在文件開頭添加是有效的。
\documentclass{article}
\usepackage{fontspec}
\begin{document}
\setmainfont{Latin Modern Roman}
\addfontfeatures{Color=123456,Opacity=0.3,Scale=5}
ABCD
\end{document}
一些額外的信息。
預設字體是拉丁現代羅馬。
這個答案解釋了
.fd
文件的作用。字型在 LaTeX 中如何運作?\fontname\font
不一定給出姓氏。引用 fontspec 文件:實驗上,它看起來
\fontname
會給出你傳遞給\font
命令的任何輸入。\documentclass{article} \usepackage{fontspec} \begin{document} \font\abc=[[[lmroman9-regular\relax \abc \fontname\font \font\deg={Latin Modern Roman}\relax \deg \fontname\font \end{document}
我不知道為什麼 fontspec 和 LaTeX 核心不能開箱即用。