4

The Open Sans Condensed fonts only have Bold and not Bold italic, so when I use

\setmainfont{Open Sans Condensed Bold}

and then try to use \textit{Foo}, it doesn't render it in italic, since there isn't a font for it. However, I've noticed that for some purposes, I can use Open Sans Condensed Light Italic with a \textbf applied to it.

Is there a way to either

  • change font midway (cumbersome if I need to do it in several places)
  • tell XeTeX to "smartly" substitute all occurrences of \textit for the above main font with my preferred alternative (convenient to use)?

1 Answer 1

3

I don't have an Open Sans Condensed Bold font, but the theory is just the same:

\documentclass{article}
\usepackage{fontspec}
\setmainfont[Ligatures=TeX,
  ItalicFont={Open Sans Condensed Light Italic},
  ItalicFeatures={FakeBold=6}]
  {Open Sans Semibold}

\begin{document}
This is normal text and \emph{this should be slanted}
\end{document}

I used Open Sans Semibold as the main font, so the result is not nice, but should be self-explanatory.

enter image description here

You must log in to answer this question.

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