Since I would like a \widehat that is wider than \hat for a single letter, I searched and found this answer. However, when I was trying to compile with LuaLaTeX, I got the following result:
Is there some way to fix this?
Below is a MWE.
\documentclass{amsart}
\usepackage{kpfonts}
\usepackage{scalerel,stackengine}
\stackMath
\newcommand\reallywidehat[1]{%
\savestack{\tmpbox}{\stretchto{%
\scaleto{%
\scalerel*[\widthof{\ensuremath{#1}}]{\kern.1pt\mathchar"0362\kern.1pt}%
{\rule{0ex}{\textheight}}%WIDTH-LIMITED CIRCUMFLEX
}{\textheight}%
}{2.4ex}}%
\stackon[-8.5pt]{#1}{\tmpbox}%
}
\begin{document}
Kepler fonts
$\sigma, \hat{\sigma}, \widehat{\sigma},
\reallywidehat{\sigma}, \reallywidehat{\sigma\sigma\sigma}$
$\varepsilon, \hat{\varepsilon}, \widehat{\varepsilon},
\reallywidehat{\varepsilon},
\reallywidehat{\varepsilon\varepsilon\varepsilon}$
$a, \hat{a}, \widehat{a},
\reallywidehat{a}, \reallywidehat{aaa}$
$c, \hat{c}, \widehat{c},
\reallywidehat{c}, \reallywidehat{ccc}$
\end{document}
