1

As shown in the following MWE, with PDFLaTeX, combining XCharter.sty with roboto.sty and selecting the "light" option in Roboto somehow suppresses the Charter italics.

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{XCharter}
\usepackage[light]{roboto}
\begin{document}
Hello world.  \textit{This should be in italics!}
\end{document}

The output has the second sentence in Charter upright. Removing the "light" option in roboto.sty fixes the problem (as does compiling with LuaLaTeX)

Would prefer PDFLaTeX for speed (large document).

Thanks - Nathaniel

1
  • Sorry, should have added, this is with texlive 2022, didn't check other versions. Commented Mar 5, 2023 at 20:33

1 Answer 1

2

latex does warn you

LaTeX Font Warning: Font shape `T1/XCharter-TLF/l/n' undefined
(Font)              using `T1/XCharter-TLF/m/n' instead on input line 112.

so there is no light Xcharter normal shape, so it is using medium.

Then

LaTeX Font Warning: Font shape `T1/XCharter-TLF/l/it' undefined
(Font)              using `T1/XCharter-TLF/l/n' instead on input line 6.

No light italic.

Both packages are designed to set all the document fonts but I guess you want:

enter image description here

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{XCharter}
\usepackage[light]{roboto}
%\showoutput
\begin{document}
\fontseries{m}\selectfont
Hello world.  \textit{This should be in italics!}

{\fontseries{l}\sffamily Abc}

\end{document}
1
  • Thanks so much David, that makes sense (though I guess LauLaTeX/fontspec have a different interpretation of things). I use the sf family in well-defined places, so I can sprinkle \fontseries{l}'s in those places. Commented Mar 6, 2023 at 1:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .