STIX Two Math 字体在某些字符对(例如“dp”或“df”)之间留有较大的间隙。Lua otf 字体处理程序能够减少某些字符对(例如“ab”或“ad”)之间的间隙,但似乎无法减少字母 d 和字母 f 后面的空格(例如“dp”和“fa”)。
我的代码如下,并附有结果截图。我定义了一个具有减小的字距的数学版本(version=changekern
)。对于中的有序对,可以使用调用的字体功能\teststringone
减小字距。对于中的有序对,该功能对字符分隔没有影响。特别是,d 或 f 后面的空格无法减小。(调整设置得相当大,以使其明显。)kerntest
version=changekern
\textstringtwo
这是 STIX Two Math 字体的问题吗——或者是其他问题?
我正在使用 STIX Two Math 版本 2.13 b171(STIXTwoMath-Regular-3.otf)。
% !TEX TS-program = Lualatex
\documentclass[10pt]{article}
\usepackage{luacode}
\begin{luacode}
fonts.handlers.otf.addfeature {
name = "kerntest",
type = "kern",
data = {
[0x1d44e] = { [0x1d44f] = -100, -- mathematical italic small a and b
[0x1d450] = -100, -- mathematical italic small a and c
[0x1d451] = -100, -- mathematical italic small a and d
[0x1d453] = -150, -- mathematical italic small a and f
[0x1d45d] = -150}, -- mathematical italic small a and p
[0x1d451] = { [0x1d44e] = -200, -- mathematical italic small d and a
[0x1d44f] = -200, -- mathematical italic small d and b
[0x1d453] = -250, -- mathematical italic small d and f
[0x1d45d] = -250}, -- mathematical italic small d and p
[0x1d453] = { [0x1d44e] = -250, -- mathematical italic small f and a
[0x1d45d] = -250}, -- mathematical italic small f and p
[0x1d45d] = { [0x1d451] = -50}, -- mathematical italic small p and d
}
}
\end{luacode}
\def\teststringone{$ab$ $ac$ $ad$ $af$ $ap$ $pd$}
\def\teststringtwo{$da$ $db$ $df$ $dp$ $fa$ $fd$}
\usepackage{unicode-math}
\setmainfont{STIX Two Text}[RawFeature={kerntest}]
\setmathfont[Scale=MatchUppercase]{STIX Two Math}
\setmathfont[version=changekern,Scale=MatchUppercase,RawFeature={kerntest}]{STIX Two Math}
\begin{document}
\teststringone
\teststringtwo
\mathversion{changekern}
\teststringone
\teststringtwo
\end{document}