3

I am using Source Sans Pro as my main sans serif font, like so:

\usepackage[semibold]{sourcesanspro}

Using the semibold option works as intended, but it affects all other fonts as well. When I later use another font that does not have semibold characters (case in point: Gentium), supposedly "bold" text is shown plain. If, however, I simply use

\usepackage{sourcesanspro}

everything works fine. How can I restore \textbf{} to use real bold again for all fonts other than Source Sans?

MWE added:

\documentclass[fontsize=12pt,paper=a4,headings=big]{scrartcl}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english,ngerman]{babel}

\usepackage{lipsum}
\usepackage{fixltx2e,microtype,leading} 

\usepackage[oldstyle,semibold]{sourcesanspro}
\usepackage{gentium}

\raggedbottom
\leading{14pt}

\begin{document}

\section{Look at my semi-bold title!}
\lipsum[1]

Oh, no, \textbf{this} should be bold!

\end{document}

Yes, I do get a warning:

LaTeX Font Warning: Font shape `T1/gentium/sb/n' undefined(Font)
using `T1/gentium/m/n' instead on input line 21.

I'd rather LaTeX used the bold variant in this case.

  • Please provide a minimal working example (MWE). This package loads mweights.sty exactly to avoid such a problem. – Andrew Swann Nov 13 '13 at 11:36
  • MWE added, I hope this makes it a little clearer. – Ingmar Nov 13 '13 at 11:57
  • I think you have an old style file, try updating to sourcesanspro [2013/09/23] - then the gentium will be attempted to be loaded at bx but on my system it does find that and substitues with b - which is still bold. – Andrew Swann Nov 13 '13 at 12:04
  • Who would've thought it? Seems there was an issue with [2013/04/26]. Using [2013/09/23] now and everything is working as expected. Thank you! If you'd like to provide that as an answer, I'll be happy to make it the official one. – Ingmar Nov 13 '13 at 12:12
3

The latest version [2013/09/23] of sourcesanspro.sty loads the mweights.sty to exactly cope with such issues. mweights.sty provides means for specifying e.g. different bold weights for roman, typewriter and sans serif fonts. Compiling your code with this newer package gives:

Sample output

Note that the log contains the information

LaTeX Font Info:    Font shape `T1/gentium/bx/n' in size <12> not available
(Font)              Font shape `T1/gentium/b/n' tried instead on input line 22.

Showing that an attempt has been made to load it at weight bx, but this was not found and b was used instead.

  • Thanks, Andrew, the outdated file really was the culprit ... – Ingmar Nov 13 '13 at 12:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.