[Tex/LaTex] Fontfamily with XeLaTeX

fontsfontspecxetex

I'm trying to install a custom fontfamily, named Agenda, in my Latex document.
I use XeLatex, so i tried to load the font with \fontspec:

Using this code, the font works great:

\documentclass{scrartcl}

\usepackage[utf8]{inputenc} 
\usepackage[T1]{fontenc} 
\usepackage[german]{babel} 
\usepackage[a4paper]{geometry} 
\geometry{verbose,tmargin=10mm,bmargin=10mm,lmargin=10mm,rmargin=5mm} 

\usepackage{fontspec}

\begin{document}
\newfontfamily\bodyfont[]{Agenda}
\defaultfontfeatures{Mapping=tex-text}
\setmainfont[Mapping=tex-text, Color=textcolor]{Agenda Medium}
 hello \textbf{world}
\end{document}

Adding a word with an "umlaut" to the text, like "Ă„nderung" or " "Anderung", I get the error :
Type2 Charstring Parser: Parsing charstring failed: (stataus=-1, stack=5).

When I change the font to a windows system font font like Arial:

\newfontfamily\bodyfont[]{Arial}
\defaultfontfeatures{Mapping=tex-text}
\setmainfont[Mapping=tex-text, Color=textcolor]{Arial Regular}

…I get this error:

! fontspec error: "font-not-found"
! The font "Arial Regular" cannot be found.

Best Answer

\newfontfamily is only used for additional fonts, not for the main one.

\documentclass{scrartcl}
\usepackage{fontspec}
\setmainfont[Mapping=tex-text]{Arial}
\newfontfamily\TGPagella[Mapping=tex-text]{TeX Gyre Pagella}
\newfontfamily\Agenda[Mapping=tex-text]{Agenda-Medium}

\begin{document}
hello \textbf{world}

\TGPagella
hello \textbf{world}

\Agenda
hello \textbf{world}
\end{document}

enter image description here