8

Inspired by An example of changing kerning of a font in LuaLaTeX I decided to try to change the kerning for some letter combinations together with parentheses which have been bothering me in my favorite font. However, what to me seemed like the obvious approach did not work. Further testing made me realize that the font did not matter my approach did not work no matter what font. So, my guess is that the \( is not the right way but what is?

bonum.fea

languagesystem DFLT dflt;
languagesystem latn dflt;
feature kern {
pos \( \j 1000;
} kern;

example.tex

\documentclass[11pt,article,oneside]{article}

\usepackage{fontspec}
\begin{document}
\setmainfont[FeatureFile=bonum.fea]{TeX Gyre Bonum}
(j)
\end{document}

Result: enter image description here

  • 2
    It works for me if I use pos parenleft j 500;. I think (the specification is a bit vage adobe.com/devnet/opentype/afdko/topic_feature_file_syntax.html) the backslash is only needed/allowed if the glyph name can clash with some keyword. (It worked with the backslash in the answer you linked to, so something has changed in the meantime). – Ulrike Fischer Jun 14 '13 at 16:07
  • @UlrikeFischer: you can always use the backslash, but it has to be followed still by glyph name not char so \parenleft or parenleft are fine, but not \( since there is no glyph named ( (and can’t be, it is an illegal character in glyph names). – Khaled Hosny Jun 15 '13 at 0:09
7

It works for me if I use pos parenleft j 500;. I think the backslash is only needed/allowed if the glyph name can clash with some keyword (the specification is a bit vague). (It worked with the backslash in the answer you linked to, so something has changed in the meantime).

Clarification by Khaled: you can always use the backslash, but it has to be followed still by glyph name not char so \parenleft or parenleft are fine, but not \( since there is no glyph named ( (and can’t be, it is an illegal character in glyph names).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.