Consider the following example, to be compiled with lualatex:
\documentclass{article}
\RequirePackage{unicode-math}
\setmathfont{texgyrepagella-math.otf}
\begin{document}
( f \overline{f} f )
( i \overline{i} i )
( j \overline{j} j )
( l \overline{l} l )
\end{document}
The result is:
As you can see, the placement of \overline is not very appropriate for these letters (but for other letters or longer things \overline seems fine). Is there some LuaTeX magic that can somehow improve this behavior?



\overlineshould be\bar. – egreg Jun 05 '22 at 08:47\overline,\barwould be too short if the content is not a single letter. – Jinwen Jun 05 '22 at 08:51\widebar, which is to\baras\widetildeis to\tilde. – Mico Jun 05 '22 at 09:12\overline, the result is still not good under LuaLaTeX. – Jinwen Jun 05 '22 at 09:18\wideoverbaris your friend. – egreg Jun 05 '22 at 09:29f \wideoverbar{f}and\wideoverbar{f} fhas different whitespace between the two letters, 2) is it safe to redefine\overlineto be\wideoverbar? Though\wideoverbaris not perfect, it certainly looks a lot better than\overlineunder LuaLaTeX. – Jinwen Jun 05 '22 at 09:47