Is it possible to tell (La)TeX to adjust the kerning of a specific character combination? For example, suppose I want !! to be typeset as !\kern 1.2pt!, just like ff is automatically turned into a ligature, or -- is converted to an en-dash. I know I could create a command for this combination—I am asking for a way to just type !! and have it use my desired kerning.
|
|
|||
| show 1 more comment |
Adjusting font kerningIf you need to adjust the kerning within a font, the short answers are:
I've only experience in options 1 and 4. XeTeX's interchartoksXeTeX offers a feature known as ‘interchartoks’ that allows tokens to be inserted automatically between characters of different ‘class’. This feature was added to facilitate, say, automatic font and language switching between two different scripts (e.g., Japanese to Arabic). This feature can be used to add kerning between characters, as shown in Philipp's answer. (As well as between |
|||||||||||
|
|
With LuaTeX, you can patch fonts on the fly in arbitrary ways:
With XeTeX, you can use inter-character tokens:
|
|||||||||||||||
|
ffor the en-dash (or em-dash,fi,fl,ffi) aren't multiple characters whose kerning/s were adjusted. They have their own separate places in the font tables. – Kit Feb 7 '11 at 5:16tfm(TeX font metric) files. There you find, e.g.,(LABEL C f) (LIG C i O 14), meaning thatfiis mapped to the ligature in slot 14 (octal number). – Hendrik Vogt Feb 7 '11 at 13:54