
答案1
在這裡,我將其設為o
active,而您通常不希望這樣做,因此我提供\myligON
並\myligOFF
限制其使用。
\documentclass{article}
\let\svO o
\newcommand\OOkern{\hspace{-.15em}}
\newcommand\myligON{\catcode`o=\active }
\newcommand\myligOFF{\catcode`o=11 }
{\catcode`o=\active \gdefo#1{\svO\ifxo#1\expandafter\OOkern\fi#1}}
\begin{document}
Book
\myligON Book hop \myligOFF
versus Book hop
\end{document}
答案2
我不會在任何地方都這樣做,只是為了在顯示尺寸的標題中產生特殊效果。但 Ulrike Fischer 解釋了字距調整法如何調整LuaTeX中的字型特性?做的工作:
% compile with lualatex
\documentclass{article}
\usepackage{fontspec}
\directlua{
fonts.handlers.otf.addfeature{
name = "oooh",
type = "kern",
data =
{
["o"] = { ["o"] = -175 },
},
}
}
\setmainfont{Minion Pro}[RawFeature=+oooh]
\begin{document}
Look at the old book in the nook.
\end{document}
答案3
一個XeTeX
補充@ThereseLuaTeX
答案的解決方案,利用該Interchartoks
功能:
\documentclass{article}
\XeTeXinterchartokenstate = 1
\newXeTeXintercharclass \mycharclasso
\XeTeXcharclass `\o \mycharclasso
% between "o" and "o":
\XeTeXinterchartoks\mycharclasso\mycharclasso={\kern-2.5pt }
\usepackage{fontspec}
\setmainfont{Minion Pro}
\begin{document}
\huge\centering Look at the old book in the nook.
\end{document}