8

There are a number of digital versions of Palatino: Palatino LT Pro, Book Antiqua, TeX Gyre Pagella, Domitian and FPL Neu. In a number of these (which include the version I am using) there is a problem with the following combination of characters: “A. It can be quite an eye-sore:

Bad Kerning?

The issue persists after adding the option Kerning = On in fontspec; the use of the package microtype does not help either.

Both Palatino LT Pro, the commercial version, and Domitian, a recent free version, have this issue. So am I mistaken in perceiving this as a problem? Or did this escape everyone’s attention?

Is there a way of fixing this? I can not switch to a version of the font which does not have this issue.

I am running LuaLaTeX with the following code:

\documentclass[letterpaper, 12pt, extrafontsizes, oneside]{memoir} 
\settypeblocksize{9in}{6.5in}{*} 
\setlrmarginsandblock{1in}{1in}{*} 
\setulmarginsandblock{1in}{1in}{*} 
\checkandfixthelayout

\usepackage[protrusion = true]{microtype} 
\usepackage[no-math]{fontspec} 
\setmainfont[Kerning = On]{Domitian}

\title{} 
\author{} 
\date{}

\begin{document}

“H

“A

“E

\end{document}
3
  • Welcome! Can you show your code? I get this with TeXGyre Pagella.
    – mickep
    Commented Sep 6, 2023 at 18:53
  • TeX Gyre Pagella is one of the versions that does not have this issue. However Book Antiqua, Palatino LT Pro and Domitian all have this issue.
    – user303684
    Commented Sep 6, 2023 at 18:56
  • @mickep I added my code to the post.
    – user303684
    Commented Sep 6, 2023 at 19:05

3 Answers 3

10

You can add a kern manually in lua. Something like this:

\documentclass{article}
\usepackage{fontspec}

\directlua{fonts.handlers.otf.addfeature
  {
    name = "doublequotekern",
    type = "kern",
    data = {
      [0x201C] = {
        ["A"] = -150,
      },
    }
  }
}

\setmainfont[RawFeature=+doublequotekern]{Domitian Roman}

\begin{document}
“H

“A

“E
\end{document}

Output:

output

5
  • Thanks, this certainly answers my second question. But where does the -150 figure come from? Is this a mistake in digitization? What was the original kerning in metal typesetting?
    – user303684
    Commented Sep 7, 2023 at 0:39
  • 1
    Not directly related to the original question, but I’ve been looking for a way to do this for ages! Thanks so much!
    – bradrn
    Commented Sep 7, 2023 at 3:02
  • 1
    @habba082 Can’t speak for mickep, but I presume that there’s no special meaning behind -150 specifically, and it’s just a value which makes this letter combination look good.
    – bradrn
    Commented Sep 7, 2023 at 3:04
  • 3
    I could have mentioned that the -150 was just something I tested with. You need to choose a value that fits you, probably by looking at more text than just this combination. Just a warning: don't kern too much!
    – mickep
    Commented Sep 7, 2023 at 5:31
  • Thanks for the clarification. Palatino was originally set in metal and was one of the most used and well-know typefaces of the 20th century. So there must be an amount that corresponds to the original design. Is there a way to find out? What is the kerning value in TeX Gyre Pagella or FPL Neu? Do those come from the original?
    – user303684
    Commented Sep 8, 2023 at 4:20
3

[EDIT: Just noticed that @habba082 already mentioned in a comment that this issue does not occur with TeX Gyre Pagella, which is what is used by newpxtext. However I will still leave this answer here as a reference.]

I just tested with newpxtext, and it doesn’t have this kerning issue:

1

\documentclass{article}

\usepackage{newpxtext}

\begin{document}

“H

“A

“E

\end{document}

Additionally, it has excellent math support in the form of newpxmath (or eulerpx if you prefer). Thus, I would recommend using newpxtext if you would like to use Palatino in LaTeX.

3

It seems to be a "feature" of the font: I also see this in Windows 10 using "Palatino Linotype" version 5.03 and different programs (like BabelPad or LibreOffice). I guess the kerning table between double-quotes and A is simply wrong or absent.

Example: Kerning issues of Palatino Linotype shown for BabelPad

Out of curiosity I tried different fonts, and it seems they all use rather "little aggressive" kerning for A following ", so I might even guess that it's some design principle unknown to me.

I also tried manual interactive kerning in Inkscape 1.2 (left column is original kerning, right column is "my taste"):

Kerning issues of Palatino Linotype and manual kerning shown for Inkscape 1.2

Metrics and Kerning

I could not find the actual font on Linux, but TrueType font "URW Palladio" should be another Palatino clone. First, for the letter "A" the "left top" is about 370 units "away" from the "start of the character":

Details of letter A

And the left side of the left double-quote is about 50 units away from the "end of the character":

Details of left double-quote

So the total spacing at the top of the "A" is about 420 units, almost the total visual width of the double-quotes.

Looking at the kerning table for that font, you see the kerning correction for the pair is -134, or less than half of the visual distance. For comparison I added the popular "VA" example which has a kerning correction of -145.

Kerning table for selected characters of "URW Palladio"

It would be interesting to see the exact numbers for the actual font being used, and how the TeX programs and algorithms use those when rendering text.

2
  • Interesting to see that the original in Inkscape is much less offensive than what OP showed coming out of LuaLaTeX. This could actually be how it was designed, meaning your version of the font does have a kerning table entry for “A. (Talking only about the open quotes, not the straight ones.)
    – Thomas
    Commented Sep 7, 2023 at 11:07
  • In what you show as "original kerning" (bottom left among the four) there is definitely kerning, the left most part of A is well below the first of the two quotation marks. This is not the case in my example above.
    – user303684
    Commented Sep 8, 2023 at 4:28

You must log in to answer this question.