Use Bodoni Italic (non-default font)

fonts

This is the gfsbodoni.sty file. I don't know how to italicise the text. The text is only for a section in the document.
Using Overleaf, pdflatex.

What I tried and they produce non-italicised text:

  • \textit{{\fontfamily{gfs}\selectfont Bodoni Italic. \lipsum[2-4]}}
  • \fontfamily{gfs}\selectfont \itshape Bodoni Italic. \lipsum[2-4]}

The font is non-default. So I use some fonts using specific commands (\fibrabook is an example), and some using these 3 letters. The fonts all work, because I read that I can find info in the .sty file. However, I am confused on how to italicise it now that I have it

EDIT: Complete shortcode

\documentclass[a5paper,pagesize,10pt,bibtotoc,pointlessnumbers,
normalheadings,DIV=9,twoside=false]{scrbook}

\KOMAoptions{DIV=last}
\usepackage{gfsbodoni}
\usepackage{tgadventor}
\usepackage[scaled]{berasans}
\usepackage[bitstream-charter]{mathdesign}
\usepackage{scholax}
\usepackage{palatino}

\usepackage[T1]{fontenc}

\begin{document}
\newpage
\poiretonefamily
PoiretOne. \lipsum[2-4]
\newpage
\textbf{\textit{Times. \lipsum[2-4]}}
\newpage
\textit{{\fontfamily{gfs}\selectfont Bodoni Italic. \lipsum[2-4]} }
\end{document}

I probably didn't include everything necessary, but I don't see how the problem is not clear, so please give me details of why the problem is not clear. I imagine \textit or \itshape would italicise a font, but they don't. The font shows normally.

Best Answer

According to the package documentation of gfsbodoni the package defines the command \textbodoni{} for short texts and the environment \begin{bodoni}\end{bodoni} for longer texts.

Both indeed work (note that I removed some deprecated options for scrbook):

\documentclass[DIV=9,twoside=false]{scrbook}

\KOMAoptions{DIV=last}
\usepackage{gfsbodoni}
\usepackage{tgadventor}
\usepackage[scaled]{berasans}
\usepackage[bitstream-charter]{mathdesign}
\usepackage{scholax}
\usepackage{palatino}

\usepackage[T1]{fontenc}
\usepackage{lipsum}

\begin{document}
Default font \lipsum[1]

\textbodoni{Bodoni Regular \lipsum[2]}

\begin{bodoni}
\textit{Bodoni Italic. \lipsum[3]}
\end{bodoni}
\end{document}

enter image description here

Font properties of the PDF:

enter image description here

Related Question