두 개의 특정 문자 사이의 커닝을 변경하여 합자를 생성하려면 어떻게 해야 합니까?

두 개의 특정 문자 사이의 커닝을 변경하여 합자를 생성하려면 어떻게 해야 합니까?

저는 'oo' 합자가 없는 Minion Pro 글꼴을 사용하여 문서를 만들고 있습니다(예: U+A74F: ꝏ). 따라서 문자 쌍 'oo' 사이의 간격을 자동으로 줄여 이 합자를 인위적으로 만들고 싶습니다. 이 작업을 수동으로 수행하고 명령(예: \oo)을 생성할 수 있지만 이는 다른 합자의 용이성에 비해 꽤 짜증날 것입니다.

아래는 비록 번거롭기는 하지만 내가 원하는 효과입니다.

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Minion Pro}

\begin{document}
    \Huge
    Bo\hspace{-.15em}ok\par Book
\end{document}

여기에 이미지 설명을 입력하세요

답변1

여기에서는 o일반적으로 원하지 않는 것을 활성화하여 제공 \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@Therese의 답변을 보완하는 솔루션 :LuaTeXInterchartoks

\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}

합자 텍스트

관련 정보