我正在尝试将 Linux Libertine 用作数学中的字母字体(以及更多),以及 unicode-math 和 luaLaTeX。
调整一些细节应该会很好,我希望能够使用 .fea 文件来做到这一点,但不幸的是它并不完全有效。有人有这方面的经验吗?下面的测试文件。
%!TEX TS-program = lualatex
% !TEX encoding = UTF-8 Unicode
\documentclass[draft,10pt]{article}
\begin{filecontents*}{libertine-math.fea}
# Script and language coverage
languagesystem DFLT dflt;
languagesystem math dflt;
languagesystem latn dflt;
feature mb01 {
substitute v by v.alt;
} mb01;
feature mb02 {
position j <200 0 200 0>;
} mb02;
\end{filecontents*}
\usepackage{libertine}
\usepackage{unicode-math} \unimathsetup{math-style=TeX}
\AtBeginDocument{
\setmathfont[range=\mathup/{num,latin,Latin,greek,Greek}]{Linux Libertine O}
\setmathfont[range=\mathbfup/{num,latin,Latin,greek,Greek}]
{Linux Libertine O Bold}
\setmathfont[range=\mathit/{num,latin,Latin,greek,Greek}]
{Linux Libertine O Italic}
\setmathfont[range=\mathbfit/{num,latin,Latin,greek,Greek}]
{Linux Libertine O Bold Italic}
\setmathfont[range=\mathpunct]{Linux Libertine O}
\setmathfont[range=\mathrel]{Linux Libertine O}
\setmathfont[range=\mathbin]{Linux Libertine O}
\setmathfont[range=\mathop]{xits-math.otf}
\setmathfont[range=\mathdelim]{xits-math.otf}
\setmathfont[range=\mathaccent]{xits-math.otf}
}
\setmathfont{xits-math.otf}
\defaultfontfeatures[Linux Libertine O Italic]
{FeatureFile=libertine-math.fea,RawFeature=+mb01;+mb02}
\begin{document}
The letter v substitution in math mode :
\begin{itemize}
\item italic tex mode : \textit{v}
\item math mode : $v$
\end{itemize}
But unfortunately, I found no way to adjust the left sidebearing of j in math mode!
\[(j)\]
\end{document}