4

What I tried: Create (the usually missing) custom kerning pair "QV" for Latin.

What I expected: custom kerning pairs to work with all languages.

What I got instead: kerning does not change at all when using polyglossia with Latin language enabled.

Any ideas how to fix this?

MWE:

\documentclass{article}

% Set language to Latin.
\usepackage{polyglossia}
%\setdefaultlanguage{french} % Works for German, English, French etc.
\setdefaultlanguage{latin} % DOES NOT work for Latin.

\XeTeXinterchartokenstate = 1
\newXeTeXintercharclass \mycharclassq
\XeTeXcharclass `\Q \mycharclassq
\newXeTeXintercharclass \mycharclassv
\XeTeXcharclass `\V \mycharclassv
\XeTeXinterchartoks\mycharclassq\mycharclassv={\kern-4pt } % Exaggerated for this example.

\begin{document}

\huge\centering
QVINQVAGINTA

\end{document}

1 Answer 1

3

The latin module for polyglossia sets \XeTeXinterchartokenstate to 0 unless variant=ecclesiastic is called, because the interchar feature is used to change punctuation spacing.

You can set yourself the state to 1 when entering the Latin language.

\documentclass{article}

% Set language to Latin.
\usepackage{polyglossia}
\setdefaultlanguage{latin}

\XeTeXinterchartokenstate = 1
\newXeTeXintercharclass \mycharclassq
\XeTeXcharclass `\Q \mycharclassq
\newXeTeXintercharclass \mycharclassv
\XeTeXcharclass `\V \mycharclassv
\XeTeXinterchartoks\mycharclassq\mycharclassv={\kern-4pt } % Exaggerated for this example.

\makeatletter
\gappto\blockextras@latin{\XeTeXinterchartokenstate = 1 }
\gappto\inlineextras@latin{\XeTeXinterchartokenstate = 1 }
\makeatother

\begin{document}

\huge\centering
QVINQVAGINTA

\end{document}

enter image description here

1
  • Thanks! Makes sense now. Too many moving parts in these uncharted parts of XeTeXland. Dec 18, 2021 at 22:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .