[Tex/LaTex] the font name for Source Sans Pro


When using multiple sans-serif fonts in one document, it is necessary to know the internal name of a font to use it, as described here: How do I use a particular font for a small section of text in my document?

Unfortunately, I was not able to determine the internal name for the Source Sans Pro font (package: sourcesanspro). So my question is: what is the internal name for this font?

To be more precise:

  1. I use pdflatex.

  2. I would like to do something like:


    where I need to know, what "xyz" would be.

Best Answer

The font family can be derived without analyzing the source code. LaTeX stores the current family name in macro \f@family. Thus, generate a short test document that uses the font as you need it. Check the package options of sourcesanspro. Then the value of \f@family is output:

\textsf{Family of Source Sans Pro: \textcolor{red}{\f@family}}