1

Consider the following code which is run with XeLaTeX:

\documentclass[a5paper,12pt,onecolumn,openany,final]{book}
\usepackage[hmargin=0.7in,vmargin=0.75in]{geometry}
\usepackage{pstricks,psvectorian}
\usepackage{scalerel} % For Vertical Stretch of Letters
\usepackage{scalefnt}
\usepackage{fontspec}
\setmainfont{Cabin}

% % Use Xelatex to compile \begin{document} \thispagestyle{empty}

\XeTeXinterchartokenstate=1 \newXeTeXintercharclass\aposclass \newXeTeXintercharclass\letterclass \XeTeXcharclass\'=\aposclass \count0=a \loop \XeTeXcharclass\count0=\letterclass \advance\count0 1 \ifnum\count0<`z \repeat \count0=1

\XeTeXinterchartoks\aposclass\letterclass{\kern.1em} % Adjusts space to the right of the apostrophe.

\begin{pspicture}(-5,-5)(5,12)% \rput(-.12,3.92){\Large\selectfont\scalefont{1.28} \vstretch{3.05}{\textbf{T h e , R u n n e r's , G u i d e}}} \end{pspicture} \end{document}

The code makes use of a David Carlisle macro taken from Cabin font doesn't render properly apostrophe to adjust the kerning to the right of the apostrophe.

The output of the above code is

enter image description here

QUESTION: How may I modify the said macro in order to adjust (increase) the kerning to the immediate left of the apostrophe in the displayed output?

Thank you.

DDS
  • 8,816
  • 4
  • 9
  • 36

1 Answers1

2

Since you are anyway adding \, spacing by hand you could just do that, but to answer the question just specify something for the character classes in the opposite order, so adding

\XeTeXinterchartoks\letterclass\aposclass{\kern5em} % Adjusts space to the left of the apostrophe.

produces

enter image description here

David Carlisle
  • 757,742
  • Many thanks @David Carlisle. – DDS Feb 01 '22 at 15:52
  • @mlchristians although the input here seems very odd: you are letter spacing by hand by literally putting a space between each letter, yet you use r's with no input space so naturally it looks too close??? – David Carlisle Feb 01 '22 at 16:02
  • why not R u n n e r ' s ? – David Carlisle Feb 01 '22 at 16:10
  • I am sure I tried that the other day and it didn't look quite the way I wanted. With most fonts, I have found, the default is fine for me. But there are others, such as Cabin in which some tuning seems to be in order with regards to apostrophes. In any case, your answer helps me to make fine the tuning if I so wish. Thank you again for a very helpful answer. – DDS Feb 01 '22 at 16:17
  • @mlchristians fontspec can letter space fonts with normal input without having to space the letters by hand. – David Carlisle Feb 01 '22 at 16:19
  • Thank you. I must look into that when I come back later today, because that sounds exactly like what I would like to know how to do. I am hoping to learn how to have more control over the spacing between letters within a certain pspicture environment I often use without resorting to simply adding an extra space between them. – DDS Feb 01 '22 at 16:24