Fontspec doesn't find Tex Gyre Pagella Italic
The Pagella family uses "TeX Gyre Pagella" as family name. The italic shape is called "TeXGyrePagella-Italic". In addition, you are not setting a font family but a single font, so it makes more sense to use \newfontface
. Overall, the following works for me using TeXLive 2019 on Debian Linux:
\documentclass[english,a4paper,12pt]{article}
\usepackage[bold-style=ISO]{unicode-math}
\newfontface\headingfont{TeXGyrePagella-Italic}
\begin{document}
\headingfont XX
\end{document}
The problem is, that xelatex
dosen't find the font by name. To fix that, you have to specify the font file:
\documentclass[a4paper,12pt]{article}
\usepackage{libertine}
\usepackage[bold-style=ISO]{unicode-math}
\newfontfamily\headingfont{texgyrepagella-italic.otf}
\begin{document}
\headingfont XX
\end{document}
If you run pdffonts
you can see, that the right font is used:
name type encoding emb sub uni object ID
---------------------------------------- ----------------- ---------------- --- --- --- ---------
SLTSXB+TeXGyrePagella-Italic-Identity-H CID Type 0C Identity-H yes yes yes 5 0
LJPSEU+LinLibertineO-Identity-H CID Type 0C Identity-H yes yes yes 7 0