4

Manipulating fonts is somewhat daunting, and usually too much for me, so I restrict myself to a few things. I use Duffner's EB Garamond -- his original version from his website. I'm a bit puzzled by the following output:

\documentclass{scrartcl}
\usepackage{fontspec}

\directlua
  {fonts.handlers.otf.addfeature 
    {
    name = "ktest",
    type = "kern",
    data = {
    ["t"] = { ["«"] = -80},
    ["f_t"] = { ["«"] = -100},
    ["i"] = { ["«"] = -120},
    ["f_i"] = { ["«"] = -300},
    ["f"] = { ["«"] = -300},
    ["ı"] = { ["«"] = -300},                                           
    }
  }
}

\setmainfont{EBGaramond}
[
Path=./EBGaramond-0.016/otf/,
UprightFont=*12-Regular,
RawFeature=+calt;+ktest,
]

\begin{document}
t« fft« ft« i« fi« f« ff«
\end{document}

enter image description here

Duffner's EB Garamond has nice ligatures ft and fft, but somehow they don't react to manipulation via font features; the ff ligature changes simply by adding a font-feature to f, but not the same case with ft and fi. Trying to reach the glyph directly via f_t as it is called when looking for it in FontForge doesn’t do anything.

What is happening here, and how can I kern fft« and ft«?

1 Answer 1

7

ft and fft may look like ligatures, but they are not: in this font they are actually f/ff followed by a special t. So you will have to set up the kerning for this t variant:

\documentclass{scrartcl}
\usepackage{fontspec}


\directlua
  {fonts.handlers.otf.addfeature
    {
    name = "ktest",
    type = "kern",
    data = {
    ["t.f_"] = { ["«"] = -300},
    ["f_t"] = { ["«"] = 1000}, %to demonstrate the f_t ligature
    }
  }
}

\setmainfont{EBGaramond}
[
Path=./EBGaramond-0.016/otf/,
UprightFont=*12-Regular,
RawFeature={+calt;+ktest;}
]

\begin{document}\pagestyle{empty}
 ft« fft« 

\char983114 «  % this is the real ft ligature, 

\end{document}

enter image description here

2
  • 1
    Oh, fft! I is only a small step to pfft. ;-)
    – user194703
    Apr 8, 2020 at 8:51
  • The other glyphs in this font are: i_dotless, f_short, f._f and f._i (just to save the trouble of having to look them up when stumbling upon this answer and for the sake of completeness ...)
    – Kubo
    Feb 25 at 9:08

You must log in to answer this question.

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