I don't have e.g. Helvetica, yet would like to use its clone that can be used with pdflatex
, but instead use it with xelatex
. I have tried
\usepackage{fontspec}
\usepackage{helvet}
\newfontfamily{\phv}{Helvetica}
Which tells me fontspec can't find Helvetica.
\usepackage{fontspec}
\newfontfamily{\arial}{Arial}
\usepackage{sectsty}
\allsectionsfont{\arial}
Which works, since I'm on a windows machine and arial is installed.
%\usepackage{fontspec}
\usepackage{helvet}
\newfontfamily{\phv}{Helvetica}
Which works with pdflatex
. Switching back
\documentclass{article}
\usepackage{fontspec}
\setmainfont{Libertinus Serif}
\usepackage{helvet}
\setsansfont{Helvetica} % <-- doesn't work, since I don't have the font installed on my system
%\newfontfamily{\phv}{Helvetica}
\renewcommand{\familydefault}{\sfdefault}
\section{first section}
some text which should be in helvetica
\end{document}
MWE that I wish to be working:
\documentclass{article}
\usepackage{fontspec}
\usepackage{helvet}
\newfontfamily{\phv}{Helvetica}
\usepackage{sectsty}
\allsectionsfont{\phv}
\begin{document}
\section{first section}
some text which should not be in helvetica
\end{document}
I'm sorry, but I won't take the time to get into LuaTeX atm. I'm at a loss as to what I should try, and how, and in which order.