I would like to define an “Example” environment, numbered within chapters, and that this environment also used a different font than the rest of the text. I know how to create the environment, but I can't figure out how to make the environment use the Libertinus font.
My definition, so far, looks like this:
\newcounter{example}
\counterwithin{example}{chapter}
\newenvironment{argument}[1][\unskip]{%
\par
\noindent
\def\temp{#1}\ifx\temp\empty
\textbf{Example~\theexample:}
\else
\textbf{Example~\theexample (#1):}
\fi
\noindent}
{\vspace*{2em}}
\begingroupand\endgroup. Presumably if you are using Libertinus you are using LuaTeX or XeTeX, so everything in the best answer there should work for you. – Dec 31 '16 at 19:45