I don’t like the spacing of \textperiodcentered
= U+00B7 in the OpenType cut of Latin Modern. Different from Computer Modern—and in fact, from just about any font I have on my system—LM gives the character fairly wide sidebearings. I think it’s a bug, anyway, and have so reported it to the Bogusław Jackowski et al. at GUST.
But while I wait for Jacko to fix this, can LuaTeX font patching (see, e.g., non-invasive kerning/spacing modification: what options are there?) be used to adjust the sidebearings of this character at run-time? How would such patching be implemented?
(By experimentation, I determined that a kern of −0.25em on either side of the dot gives it the same spacing as the period “.”, so that’s the amount I’d want to shave off the glyph’s bounding box.)
The code below illustrates the issue. In my actual code, I’m using the Unicode MIDDLE DOT (U+00B7) “·”, and its use is within a macro whose definition is copied (via \cs_set_eq:
) to another, so neither redefining \textperiodcentered
nor \newunicodechar
can directly help. (This is a problem with my code, and one which I’ll be fixing; the question above is still interesting to me.)
\documentclass{article}
\newif\ifot\ottrue
\ifot
\usepackage{fontspec} % uses LM OpenType
\fi
\begin{document}
\ifot LMRoman OTF: \else Computer Modern: \fi
800\textperiodcentered 555\textperiodcentered 1212
\end{document}
The results from two separate runs (first with \ottrue
, next with \otfalse
) are these:
The Computer Modern version is typographically correct, or at least is similar to the result using any other font. Try to render the text “800·555·1212” (using U+00B7 “·”) in any application, comparing LMRoman to other fonts; rarely does it have such wide sidebearings. (The Lucida fonts, e.g., the one used on this website, are the others where I’ve seen this.)
\setmainfont
instruction?