Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am trying to emulate the font below:

enter image description here

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:

enter image description here

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:

enter image description here

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

share|improve this question
2  
Isn't it \fontseries{bx}\selectfont? –  cgnieder 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. –  user815423426 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. –  cgnieder Feb 4 '12 at 20:46
    
@intrpc I don't understand. Your edit show that \fontseries{bx}\selectfont works if I'm not mistaken? –  cgnieder Feb 4 '12 at 20:52

3 Answers 3

up vote 5 down vote accepted

Use lmss instead of cmss:

result of lmss vs. result 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}
share|improve this answer

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

enter image description here

share|improve this answer
    
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} 

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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