6

With the font Palatino Linotype, when typing the character ê, the spacing around it is quite compact (see the picture below). Does this mean that I have to change my font?

(This font was distributed by my university and I've been using it for quite a long time, so I'd really appreciate any suggestion on how to correct this behavior within LaTeX :)

enter image description here

\documentclass{article}

\usepackage{fontspec} \setmainfont{Palatino Linotype}

\begin{document}

revetement

revêtement

\end{document}

Jinwen
  • 8,518
  • 1
    If using luatex, see Ulrike Fischer’s answer at https://tex.stackexchange.com/a/312160. (TeX Gyre Pagella behaves better here.) – Thérèse Jun 02 '22 at 19:42
  • Just replace ["A"] = { ["V"] = -200 }, in Ulrike Fischer's code with ["v"] = { ["ê"] = 190 }, if you want to be kerned the same as ve. – Mico Jun 02 '22 at 19:49
  • Did you try with TeX Gyre Pagella, which is a free Palatino clone? – Bernard Jun 02 '22 at 20:21
  • @Bernard In fact in my document class TeXGyrePagellaX (the one used by newpxtext) is the backup font when Palatino Linotype is not found. It's just that I prefer Palatino Linotype, possibly due to the better sounded name :) – Jinwen Jun 02 '22 at 20:35

1 Answers1

3

Based on Ulrike Fischer's code, here is a fix for using with LuaLaTeX.

enter image description here

\documentclass{article}
\usepackage{fontspec}
\directlua
  {
    fonts.handlers.otf.addfeature
      {
        name = "palatino-linotype-adjust",
        type = "kern",
        data =
          {
            ["r"] = { ["ê"] = 120 },
            ["v"] = { ["ê"] = 180 },
            ["w"] = { ["ê"] = 180 },
            ["y"] = { ["ê"] = 180 },
          },
      }
  }
\setmainfont{Palatino Linotype}[RawFeature=+palatino-linotype-adjust]
\setsansfont{Palatino Linotype}

\begin{document} rê vê wê yê (after)

re ve we ye (comparison)

\sffamily rê vê wê yê (before) \end{document}

Jinwen
  • 8,518