![XeLaTeX 无法关闭小型大写字母](https://linux22.com/image/325982/XeLaTeX%20%E6%97%A0%E6%B3%95%E5%85%B3%E9%97%AD%E5%B0%8F%E5%9E%8B%E5%A4%A7%E5%86%99%E5%AD%97%E6%AF%8D.png)
我在使用免费字体时发现了一个奇怪的问题丰廷。
\documentclass{article} % Default font size and paper size
\usepackage{fontspec} % For loading fonts
\setmainfont{Fontin}
\begin{document}
Here is some text.
\textnormal{Here is some text.}
\textup{Here is some text.}
\textrm{Here is some text.}
\textsf{Here is some text.}
\textsl{Here is some text.}
\textsc{Here is some text.}
\uppercase{Here is some text.}
\lowercase{Here is some text.}
\textbf{Here is some text.}
\textmd{Here is some text.}
\end{document}
当我使用 XeLaTeX 进行编译时,大多数文本都以小型大写字母的形式显示:
但是,如果我使用 LuaLaTeX,则所有内容都会按预期呈现 - 除了小型大写字母行:
我只在使用 Fontin 时遇到过这个问题;其他字体似乎都可以正常工作。我使用的是 Arch Linux。
答案1
\documentclass{article} % Default font size and paper size
\usepackage{fontspec} % For loading fonts
\setmainfont[SmallCapsFont=Fontin]{Fontin-Regular}
\begin{document}
Here is some text.\par
\textnormal{Here is some text.} normal\par
\textup{Here is some text.} up\par
\textrm{Here is some text.} rm\par
\textsf{Here is some text.} sf\par
\textsl{Here is some text.} sl\par
\textsc{Here is some text.} sc\par
\uppercase{Here is some text.} uppercase\par
\lowercase{Here is some text.} lowercase\par
\textbf{Here is some text.} bf\par
\textmd{Here is some text.} md
\end{document}
答案2
\documentclass{article}
\usepackage{fontspec}
\renewcommand{\familydefault}{\sfdefault}
\setmainfont{Fontin}
\begin{document}
Here is some text.
\textnormal{Here is some text.}
\textup{Here is some text.}
\textrm{Here is some text.}
\textsf{Here is some text.}
\textsl{Here is some text.}
\textsc{Here is some text.}
\uppercase{Here is some text.}
\lowercase{Here is some text.}
\textbf{Here is some text.}
\textmd{Here is some text.}
\end{document}
\end{document}
生产