Here I introduce \xshlongvec
that takes an optional and mandatory argument. The mandatory is the text over which to lay the \vec
. The optional is a number which represents the rightward kern (in points) applied to the vec arrow, since as the OP points out, the kerning of \vec
is not the best.
In this MWE, I use the kpfonts
mentioned by the OP. I first give the unaltered \vec
followed by two instances of \xshlongvec
. The one flaw that I note is that the left end of the arrow is not slanted like \vec
, but is square as the result of being created by a \rule
.
Thanks to Phillipe for pointing out a deficiency in the original answer, since repaired.
\documentclass[12pt]{scrartcl}
\usepackage{kpfonts}
\usepackage{stackengine}
\usepackage{calc}
\newlength\shlength
\newcommand\xshlongvec[2][0]{\setlength\shlength{#1pt}%
\stackengine{-5.6pt}{$#2$}{\smash{$\kern\shlength%
\stackengine{7.55pt}{$\mathchar"017E$}%
{\rule{\widthof{$#2$}}{.57pt}\kern.4pt}{O}{r}{F}{F}{L}\kern-\shlength$}}%
{O}{c}{F}{T}{S}}
\begin{document}
\centering
\[ \vec{A} \quad \xshlongvec[1]{ABC} \quad \xshlongvec[1]{xyz} \]
\end{document}

This EDITED solution below works across math styles, by using the scalerel
package.
\documentclass[12pt]{scrartcl}
\usepackage{kpfonts}
\usepackage{stackengine,scalerel}
\usepackage{calc}
\newlength\shlength
\newcommand\xshlongvec[2][0]{\ThisStyle{\setlength\shlength{#1\LMpt}%
\stackengine{-5.6\LMpt}{$\SavedStyle#2$}{\smash{$\kern\shlength%
\stackengine{\dimexpr 1.3pt+6.25\LMpt}{$\SavedStyle\mathchar"017E$}%
{\rule{\widthof{$\SavedStyle#2$}}{\dimexpr.1pt+.5\LMpt}\kern.4\LMpt}{O}{r}{F}{F}{L}\kern-\shlength$}}%
{O}{c}{F}{T}{S}}}
\begin{document}
\centering
\[ \vec{A} \quad \xshlongvec[1]{ABC} \quad \xshlongvec[1]{xyz} \quad \xshlongvec{\Omega M} \]
\[ \scriptstyle \vec{A} \quad \xshlongvec[1]{ABC} \quad \xshlongvec[1]{xyz} \quad \xshlongvec{\Omega M}\]
\[ \scriptscriptstyle \vec{A} \quad \xshlongvec[1]{ABC} \quad \xshlongvec[1]{xyz} \quad \xshlongvec{\Omega M} \]
\end{document}

Best Answer
You could change the definition of
vec
in your preamble: