Use custom font in newest Europass CV layout

I'm using XeLaTeX to make my Europass CV, because I want to use a custom system font.

I've used the package europecv without any problem before understanding it gets me the old CV layout.

\documentclass{europecv}
\usepackage[a4paper,top=1.27cm,left=1cm,right=1cm,bottom=2cm]{geometry}
\usepackage{fontspec}
\setmainfont{Ubuntu}

\begin{document}
\begin{europecv}

\ecvpersonalinfo[20pt]

\end{europecv}
\end{document}


But, trying to use the class europasscv, which gives the new 2013- layout, something goes wrong

\documentclass[a4paper]{europasscv}
\usepackage{fontspec}
\setmainfont{Ubuntu}

\begin{document}
\begin{europasscv}

\ecvpersonalinfo

\end{europasscv}
\end{document}


LaTeX Font Warning: Font shape EU1/phv/m/n' undefined

(Font) using EU1/lmr/m/n' instead on input line 6.

LaTeX Font Warning: Some font shapes were not available, defaults substituted.

Line 6 being the one corresponding to \begin{europasscv}. As a side note, even if irrelevant, the font I'm trying to use is, as can be read from the source code I've posted, Ubuntu Regular. I'm on Arch Linux and I've installed it using the distro's package ttf-ubuntu-font-family. Anyway, works with no problem on the old class. Something in the new one's title isn't compatible with the font, or any custom one, as I've tried with others as well.

In the class file Helvetica (phv) is hardcoded all over the class, so we ask fontspec to use Ubuntu everywhere phv is requested with \newfontfamily\myfont[NFSSFamily=phv]{Ubuntu}:

\documentclass[a4paper]{europasscv}
\usepackage{fontspec}
\setmainfont{Ubuntu}
\newfontfamily\myfont[NFSSFamily=phv]{Ubuntu}

\begin{document}
\begin{europasscv}

\ecvpersonalinfo

\end{europasscv}
\end{document}

• This only changed the"Curriculum vitae" writing. I looked into the class file for any other command in which Helvetica is hardcoded and renewed all those commands removign the selectfont part like you did, but that didn't change anything either. Jan 21, 2017 at 14:30
• @JeffreyLebowski updated. Now works. Jan 23, 2017 at 15:26
• Sorry for the delay, busy as hell. Thanks a lot, it now works! Jan 24, 2017 at 9:56