[Tex/LaTex] An example of changing kerning of a font in LuaLaTeX

fontspeckerningluatex

LuaLaTeX, through the luaotfload package, is able to dynamically add and modify features and properties of a font. This is performed by using the FeatureFile option in fontspec when loading a font; e.g.,

\setmainfont[FeatureFile=times-nr.fea]{Times New Roman}

where times-nr.fea is given as a listing in the fontspec manual (see §11). The syntax of these feature files is given by Adobe. Unfortunately, I haven't had the chance to look into this myself and I'm not sure what's possible nor how to do it.

I'd like to add some more examples to the fontspec manual, especially for adjusting the side-bearings around single glyphs and adjusting the kerning between adjacent glyphs and so on. The ability to define custom kerning for your fonts would truly make LuaLaTeX a world-class typesetting engine—no other TeX program is able to do this sort of thing so easily.

I'd like to perform an experiment: the source for fontspec is on GitHub. I'll offer a bounty on this question for the best patch to the fontspec manual adding more documentation for the FeatureFile option, specifically for sidebearing and/or kerning but hopefully for anything else that you also might happen to see that's fun.

So, can anyone help?


P.S. If you're stuck on the fact that to compile fontspec.pdf requires a whole bunch of pre-built PDFs for the examples, you can grab them from CTAN.

Best Answer

I did not want to interfere with this experiment, but since nobody posted an answer so far, I just pushed an update to the feature file section of the documentation on github. It is not the most clear way to document it, but I tried my best (as far as my English permits :) )

Related Question