14

I'm using TeX Gyre Termes as text font. On 2nd level enumerations, in the label corresponding to the letter f, the upper loop of the letter touches the upper tip of the right parenthesis, as illustrated. enter image description here

How can I globally add kerning between the letter f and the right parenthesis in order to avoid this effect? I would favor a solution that could be used with standard latex or pdflatex.

Edit: here's code that reproduces the situation.


\documentclass{article}
\usepackage{tgtermes}
\begin{document}
\begin{enumerate}
\item This is level 1.
\begin{enumerate}
\item This is level 2.
\item B
\item C
\item D
\item E
\item F
\end{enumerate}
\end{enumerate}
\end{document}
3
  • Welcome to TeX.SX! Just a suggestion: you could make it easier for potential answerers by editing your post to include a small but complete code sample to save the effort of creating a test document. May 24, 2015 at 20:40
  • 2
    Welcome to TeX.SX! This is surely a bad bug in the font metrics.
    – egreg
    May 24, 2015 at 20:48
  • @egreg, I have tested Adobe Times and Nimbus, these other fonts also exhibit the issue, so I'm not sure if it's really a bug or a "feature" of this kind of font. Maybe editing the font metrics can help, but I'm not sure which files I should edit. May 24, 2015 at 20:53

2 Answers 2

14

It's a bad bug indeed in the metrics for TeX Gyre Termes. Note that the same happens with the OpenType version. And also with newtxtext (that uses a different clone of Times New Roman)

You can at least obviate to the problem by redefining \labelitemii:

\documentclass{article}
\usepackage{tgtermes}

\renewcommand{\labelenumii}{(\theenumii\/)} % add the italic correction

\begin{document}
\begin{enumerate}
\item \begin{enumerate}% go to the second level
\setcounter{enumii}{5}% print just the f item
\item x
\end{enumerate}
\end{enumerate}

\end{document}

enter image description here

It's a fact that all clones of Times New Roman available in TeX distributions exhibit the same problem. In the TFM files for Computer Modern we find (abridged version)

(LIGTABLE
   (LABEL C f)
   (KRN O 51 R 0.077779)

which means that Computer Modern applies a small kerning between an “f” and a closed parenthesis (ASCII octal '51).

The rm-qtmr font (TeX Gyre Termes under OT1 encoding, but it's the same for ec-qtmr, used for the T1 encoding) has an extensive kerning table for “f”, but misses the closed parenthesis.

The same happens with the fonts used by newtxtext and by mathptmx.

This bug should be made known to the maintainers of the font packages. In the case of Computer Modern the kerning is small, because the drop of the “f” is not so much outside the bounding box. A larger kerning is needed with Times New Roman, where the drop protrudes more, but the fonts define none.

3
  • Your solution by redefining labelenumii works well and it's probably the easiest, but later on I found that the left parenthesis also gets too close to the top of the letter h, and I was able to use your comment on the TFM file for CMR to modify the TFM for TeX Gyre and solve both issues. Thanks! Remark: I said above that the same issue happens with Adobe Times, but I later found that I wasn't actually using Adobe Version, but the default Nimbus implementation. I don't know if the issue is present in the Adobe implementation. May 24, 2015 at 23:30
  • Would adjusting the property list file manually and converting to tfm again be a good or a bad idea?
    – 1010011010
    May 26, 2015 at 22:29
  • @1010011010 An update to the distribution would cancel the change, unless you save the modified TFM files in a different location ($TEXMFLOCAL, for instance).
    – egreg
    May 26, 2015 at 22:36
1

Here is something that is rather a comment, which I am though not allowed to post as I have no reputation points. I am writing as a proxy to the developers, who take the following position in regard to the suggestion that the problem discussed is a bug in TeX Gyre Termes (quoting):

TeX Gyre Termes is an extension and substitution for the Times font. Neither Adobe Times nor Times New Roman have a kern between ‘f’ and ‘parenright’. In many fonts (and all Times-like) these characters touch each other. Only a few fonts, e.g., Computer Modern or Lucida Bright, have a kern between ‘f’ and ‘parenright’. So it is rather a font feature than a bug.

1
  • Yes, thank you. I suspected it was a feature, like I said in the original post. I've since tried Adobe Times and realized it didn't have the kern either. Nevertheless, since I prefer these characters not to touch (and this also applies to some other combinations of letters and parentheses, as I found out later), I edited the tfm and am now satisfied with the result. May 30, 2015 at 21:28

You must log in to answer this question.

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