I'd like to have some code to set, document wide, a specific character variant for the letter "v" only if it is the first in the word. The solution in the MWE is not a solution because I have a document of several hundreds of pages. Any suggestion? Thanks.
\documentclass[a4paper,14pt,openright,twoside]{memoir}
\usepackage[T1]{fontenc}
\usepackage[scale=1,osf,nf,lf]{ebgaramond}
\usepackage{fontspec}
\usepackage{microtype}
\usepackage{csquotes}
\usepackage{realscripts}
\begin{document}
Normal set:
{\fontshape{it}
\addfontfeature{RawFeature=+hlig}
\addfontfeature{CharacterVariant=5:2}
\addfontfeature{RawFeature=+liga}
\addfontfeature{RawFeature=+dlig}
\addfontfeature{RawFeature=+swsh}
\addfontfeature{Numbers=OldStyle}
\selectfont
Ha visto un valvassore vivere come un valvassino invidioso che gridava evviva!}
Nice to have:
{\fontshape{it}
\addfontfeature{RawFeature=+hlig}
\addfontfeature{CharacterVariant=5:1}
\addfontfeature{RawFeature=+liga}
\addfontfeature{RawFeature=+dlig}
\addfontfeature{RawFeature=+swsh}
\addfontfeature{Numbers=OldStyle}
\selectfont
Ha {\addfontfeature{CharacterVariant=5:2}v}isto un {\addfontfeature{CharacterVariant=5:2}v}alvassore {\addfontfeature{CharacterVariant=5:2}v}ivere come un {\addfontfeature{CharacterVariant=5:2}v}alvassino invidioso che gridava evviva!}
\end{document}