If I write $\bar{X}$
or $\overline{X}$
the bar (or the rule) over X is smaller or longer than the width of X.
Is there any way to adjust the width?
Thank you in advance.
MWE
\documentclass{article}
\usepackage{amsmath,amsfonts,mathtools}
\begin{document}
$\bar{X}$ $\overline{X}$
\end{document}