# Using \fontseries{b}\selectfont does not give me a bold face

I am trying to emulate the font below:

Apparently it can be done with:

\renewcommand*{\firstnamefont}{\fontsize{34}{36}\sffamily\mdseries\upshape}


This is from the moderncv package, more specifically the file moderncvstyleclassic.sty

In my case, I thought I could get it with:

{\fontencoding{T1}\fontfamily{cmss}\fontseries{b}\selectfont This is a test}


But it doesn't work. Instead I get:

which by the way is also what I get with:

{\fontencoding{T1}\fontfamily{cmss}\fontseries{m}\selectfont This is a test}


Notice that the difference between both code snippets is using \fontseries{b} instead of \fontseries{m}

With this:

• How can I get the font in the first image?
• Why is it that \fontseries{b} and \fontseries{m} yield the same result above?

# Update 1:

If I use

{\fontencoding{T1}\fontfamily{cmss}\fontseries{bx}\selectfont This is a test}


I get:

which is still different from what I show in the top image.

-
Isn't it \fontseries{bx}\selectfont? –  clemens Feb 4 '12 at 20:38
@cgnieder: I think this can be an answer if elaborated. –  Andrey Vihrov Feb 4 '12 at 20:39
@cgnieder, I have updated my post. Using \fontseries{bx}\selectfont is not doing the trick. –  Amelio Vazquez-Reina Feb 4 '12 at 20:45
@AndreyVihrov I actually don't know enough about fonts to elaborate much on this. A quick look into the fntguide told me that b also is a common font series. –  clemens Feb 4 '12 at 20:46
@intrpc I don't understand. Your edit show that \fontseries{bx}\selectfont works if I'm not mistaken? –  clemens Feb 4 '12 at 20:52

Use lmss instead of cmss:

\documentclass{article}

\usepackage{xcolor}

\begin{document}

{\color{red}\tiny\ttfamily lmss}\smallbreak
{\fontsize{34}{36}\fontencoding{T1}\fontfamily{lmss}\fontseries{m}\selectfont This is a test}

{\color{red}\tiny\ttfamily cmss}\smallbreak
{\fontsize{34}{36}\fontencoding{T1}\fontfamily{cmss}\fontseries{m}\selectfont This is a test}

\end{document}

-

b isn't that common, bold fonts are normally extended, which would be bx although some font packages define b to alias to bx so either work. cmss does have another bold font in addition to the usual extended one but it is condensed compared to the normal weight font.

The Standard LaTeX fd files declare this variant as sbc although in my (texlive 2010) setup the font only seems to be available as metafont rather than as a scalable font, however

\documentclass{article}
\usepackage[T1]{fontenc}

\begin{document}

\sf

This is a Test

\fontseries{bx}\selectfont

This is a Test

\fontseries{sbc}\selectfont

This is a Test

\end{document}


produces

-
If you look close, the semibold condensed variant still isn't what is pictured on the first image (note that sbc has round edges). Latin Modern's equivalent also won't do. So I am at loss in telling what is on the image, although it is a Computer Modern variant for sure. –  Andrey Vihrov Feb 5 '12 at 8:44
Yes true, The original didn't look condensed either. My main intention was to explain why b did nothing is that it's not in the fd file, and for cmss the only bold variants declared in the fd are bx and sbc. –  David Carlisle Feb 5 '12 at 10:57

You should tell us which font you are using. However, not all sans serif fonts have a bold version. Try this:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{mathdesign}
\begin{document}
\Huge
This is a test

\sffamily\bfseries
This is a test

\end{document}


-