
Estou tentando instalar uma família de fontes personalizada, chamada Agenda, em meu documento Latex. Eu uso XeLatex, então tentei carregar a fonte com \fontspec:
Usando este código, a fonte funciona muito bem:
\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}
Adicionando uma palavra com um "trema" ao texto, como "Änderung" ou ""Anderung", recebo o erro: Type2 Charstring Parser: Parsing charstring failed: (stataus=-1, stack=5).
Quando altero a fonte para uma fonte do sistema Windows como Arial:
\newfontfamily\bodyfont[]{Arial}
\defaultfontfeatures{Mapping=tex-text}
\setmainfont[Mapping=tex-text, Color=textcolor]{Arial Regular}
... recebo este erro:
! fontspec error: "font-not-found"
! The font "Arial Regular" cannot be found.
Responder1
\newfontfamily
é usado apenas para fontes adicionais, não para a principal.
\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}