10

Consider the following MWE:

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

\begin{document}

\textbf{\textsf{Some text}}

\end{document}

The output of the above code is

enter image description here

and doesn't change if I uncomment the line

%\usepackage[T1]{fontenc}

Consider now the following MWE with scrartcl class instead of article:

\documentclass{scrartcl}
%\usepackage[T1]{fontenc}

\begin{document}

\section{A section}
\textsf{Some text}
\end{document} 

enter image description here

Uncommenting the line

%\usepackage[T1]{fontenc}

you get

enter image description here

As you can see, the sans serif font of the title is less bold than without fontenc, while the normal text is not changed.

Does fontenc, combined with a KOMA-script class, load a different sans serif font, but only for bold face?

Sterry
  • 865
  • 1
    Without it, the sans serif of CM is loaded, with T1 SFSS (cm-super) is loaded. So yes, there are different sets loaded. Package lmodern is quite similar and gives you excellent support for latin scripts including many extended accented letters. – Johannes_B Feb 07 '15 at 18:41
  • @Johannes_B Why the different behavior with article class? – Sterry Feb 07 '15 at 18:56

2 Answers2

9

It's normal. When the T1 font encoding is active, the cm-super fonts are loaded by default, which do not have exactly the same design as their Computer Modern counterparts. In particular, the cm-super fonts (or rather the EC fonts of which they are a vectorization) have much more "optical sizes" than Computer Modern, especially the sans serif family. See this discussion.

If you want to keep to the T1 encoding but with the same design as the Computer Modern, load the Latin Modern fonts:

\documentclass{scrartcl}
\usepackage[T1]{fontenc}
\usepackage{lmodern}

\begin{document}

\section{A section}
\textsf{Some text}
\end{document} 

enter image description here

Franck Pastor
  • 18,756
  • Thanks for your answer. Why doesn't this happen with article class? – Sterry Feb 07 '15 at 18:50
  • And is there a way to know which fonts are loaded? (Windows) – Sterry Feb 07 '15 at 18:51
  • The Koma-script classes such as scrartcl uses sans serif characters by default for the titles, contrary to the standard classes. And the sans serif fonts of cm-super, as said before, are very different in their design than their computer modern counterparts. – Franck Pastor Feb 07 '15 at 18:55
  • To know which fonts are actually loaded, you may look at the messages in the console or the log files, where they are all duly mentioned. Or open the resulting PDF file with Adobe Reader, and look at the font section of the properties menu. – Franck Pastor Feb 07 '15 at 18:59
  • I know that KOMA classes uses sans serif characters by default for the titles. But, as you can see in my first MWE, this doesn't happen with sans serif bold with article. Any idea why? – Sterry Feb 07 '15 at 19:01
  • @Sterry KOMA sets the default font size to 11pt, article uses 10pt. There is a bit scaling involved. – Johannes_B Feb 07 '15 at 19:04
  • @Sterry It does happen with sans serif bold, but not at the general text size, or at least it is not much visible at this font size. It is much more visible at bigger font sizes, like the sizes used for titles in Koma-script classes. Please read the link about the optical sizes I mentioned in my answer. – Franck Pastor Feb 07 '15 at 19:06
  • @fpast You're right. If I add \Large in my first MWE, it can be noticed with article class, too. Thanks. – Sterry Feb 07 '15 at 19:11
7

The source of the difference is not the different design but the the available font sizes:

Without fontenc, in OT1 encoding, for the section title a 10pt font (cmssbx10.pfb) is used which is scaled to 14.4pt. This gives a rather bold looking font. With T1-encoding a font designed for 14.4pt is used (sfsx1440.pfb).

If you like the bolder look then you can either load the fix-cm package which will suppress the use of the larger optical sizes. The document will then use sfsx1000.pfb scaled up, or as already suggested use the lmodern package which doesn't have the larger optical sizes.

Ulrike Fischer
  • 327,261
  • 1
    For me the available optical sizes of the fonts are part of their "design", by that meaning their general conception rather than their outlines. By the way, I am French and "design" may not retain the same sense in my native language than it has in English. – Franck Pastor Feb 07 '15 at 19:46