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.

This code:

\documentclass{scrartcl}

\usepackage{tgschola}
\usepackage[T1]{fontenc}

\usepackage{scrpage2}
\pagestyle{scrheadings}

\begin{document}
a
\end{document}

gives this warning

LaTeX Font Warning: Font shape `T1/qcs/m/sl' in size <10.95> not available
(Font)              Font shape `T1/qcs/m/it' tried instead on input line 11.

Apparently some text was changed from slanted to italic, but there's no output of slanted or itcalic text in the document at all. There's only a roman "a". The warning is also only triggered if theres something (at least one letter) in the document (regular text or math), it does not trigger in an empty document.

Why is a font warning written to the log when no text is affected at all?

Is this a bug of scrpage2?

share|improve this question
1  
Yes, there is such text in eventual headings. –  Gonzalo Medina Apr 19 '13 at 20:45
3  
The headings in the default scrheadings style are typeset in slanted shape. So the \fontshape{sl}\selectfont instruction is (implicitly) issued and this causes LaTeX to look for the font in the .fd file; this ends in the warning, as explained in my other answer to your similar question. –  egreg Apr 19 '13 at 20:47
    
@egreg So the warning is thrown even if there's no heading printed, because it's enough that the package could maybe request a specific font shape? Did I get this right? –  Foo Bar Apr 19 '13 at 20:50
2  
That font shape is requested because the heading is printed even if it's empty: TeX must be ready to print something, so it sets the current font before finding characters to typeset. –  egreg Apr 19 '13 at 20:55
    
@egreg Ah, now I got it. Didn't know that empty headings get printed, I thought it gets skipped. If you write your comment as an answer I'll accept it. :) –  Foo Bar Apr 19 '13 at 20:57

1 Answer 1

up vote 7 down vote accepted

The default scrheadings style uses slanted shape, so LaTeX sees the request for this font. Since the default font family is qcs and the encoding is T1, something equivalent to

\fontencoding{T1}\fontfamily{qcs}\fontseries{m}\fontshape{sl}\selectfont

is issued. Actually probably only \slshape is found in the code, but this is sufficient.

It's important to know that TeX first sets the current font before starting to typeset characters. The fact that the headings are empty doesn't matter.

You get the same message from the simple file

\documentclass{article}
\usepackage[T1]{fontenc}
\fontfamily{qcs}\fontshape{sl}\selectfont
\stop

because the request for a font makes TeX read the file t1qcs.fd and search for T1/qcs/m/sl finding the (non silent) substitution rule.

share|improve this answer
    
Thank you very much. :) –  Foo Bar Apr 19 '13 at 21:06

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.