在 XeLaTeX/LuaLaTeX 中替代字体使用

在 XeLaTeX/LuaLaTeX 中替代字体使用

我已经使用过LuaLaTeX,如果字体缺少字形,有什么办法可以告诉 XeLaTeX/LuaLaTeX 进行自动替换?

我的 LaTeX MWE:

\documentclass{article}
\usepackage[no-math]{fontspec}
\usepackage{unicode-math,luacode} 
\defaultfontfeatures{Ligatures=TeX}
\setmainfont[Scale=1.0]{Times LT StdX}
\setsansfont{Helvetica LT Std}
\setmonofont{Helvetica LT Std}
\setmathfont{Stix Two Math}
\setmathrm{TimesLTStdX-Roman.otf}
\setmathfont[range={up}]{TimesLTStdX-Roman.otf}
\setmathfont[range={it}]{TimesLTStdX-Italic.otf}
\setmathfont[range=\mathup/{num}]{TimesLTStdX-Roman.otf}
\setmathfont[range=\mathit/{latin}]{TimesLTStdX-Italic.otf}
\setmathfont[range={bfup}]{Stix Two Math}
\setmathfont[range={bfit}]{Stix Two Math}
\makeatletter
\renewcommand\section{\@startsection {section}{1}{\z@}%
           {18\p@ \@plus 6\p@ \@minus 3\p@}%
           {12\p@ \@plus 6\p@ \@minus 3\p@}%
           {\fontspec{Helvetica LT Std Bold}\fontsize{10}{12}\selectfont}}
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
           {12\p@ \@plus 6\p@ \@minus 3\p@}%
           {6\p@ \@plus 6\p@ \@minus 3\p@}%
           {\fontspec{Helvetica LT Std}\fontsize{9}{11}\selectfont\itshape}}
\makeatother
\begin{document}
\title{Cylindrical systems in general relativity}
\author{Author Here}
\maketitle
\section{Introduction\label{sec:1}}
\noindent{The investigations of cylindrically symmetric spacetimes can be traced back as far as to 1919 when Levi-Civita (LC) discovered a class of solutions of Einstein’s vacuum field equations, corresponding to static cylindrical spacetimes have been extensively investigated with various motivations.}
\subsection{Main properties of LT solutions with Λ > 0\label{sec:1_1}}
\noindent{The investigations of cylindrically symmetric spacetimes can be traced back as far as to 1919 when Levi-Civita (LC) discovered a class of solutions of Einstein’s vacuum field equations, corresponding to static cylindrical spacetimes have been extensively investigated with various motivations.}
\end{document}

因此,例如,它会使用一种字体作为主要字体,如果缺少某种字体,则会恢复为另一种替代字体,或者至少恢复为具有正确字形的非等宽字体?

相关内容