# Reduce number of fonts used (from default settings)

Why does the default LaTeX setting of \usepackage[T1]{fontenc} use so many different fonts (e.g. \mathrm{} uses a different font than \textrm{})? At least the Adobe Acrobat Reader shows me a list that contains:

• CMBX10,
• CMEX10,
• CMMI...,
• CMR...,
• CMSY...,
• F108,
• F109,
• SFBX...,
• SFRM...,
• SFSL1000,
• SFTT1000

Can I reduce the number of fonts used in a document? Why are there so many fonts (even of the same family)?

• The first group (CM...) derives from math formulas in which you apparently used also \mathrm and \mathbf. The F... group can mean anything, so you should be more precise. The SF... group is for the text fonts. What's the problem? – egreg Dec 30 '13 at 17:21
• @egreg: I thought it would be reasonable to reduce the number of fonts involved in the document - as using same font for \textrm and \mathrm etc. – strpeter Dec 31 '13 at 8:24
• I still can't see how to answer this question. There are no fonts from the same family, as far as I can see. – egreg May 17 '14 at 18:07
• Sorry, but you are saying that and you should explain what you mean. Apparently our notion of “same family” are different. – egreg May 17 '14 at 18:11
• The F... group is added by the package bbm which provides the command \mathbbm{1}. I understand that this font can not be neglected if I want to use this command. About your last comment: I am using in a file the font CMBX10 with encoding built-in and once with encoding custom. Do you have an explanation for that? (This is what I mean by "same family".) – strpeter May 17 '14 at 18:57

\documentclass{article}
\usepackage[T1]{fontenc}
%\usepackage{kpfonts}
\begin{document}
Some math:
$\int\limits_1^\infty \frac1{x^2} \mathrm{d}x = 1$

\end{document}

has 6 fonts, always embedded as a subset. The file is 39kB big.

With an uncommented \usepackage{kpfonts} it has 4 fonts embedded and the file is 26 kB.

• So am I right that kpfonts sets the font of the math environment and the ones of the standard text to kpfonts? I did not wanted to change my fonts but I thought to use the same font in default and math mode. – strpeter May 17 '14 at 19:02
• @strpeter - If the kpfonts package is loaded, there will still be different fonts in use for the text-upright and math-upright portions, and for the text-italic and math-italic portions, of the document. Of course, a symbol font (for the integral symbol and the fraction bar) will also be needed. – Mico May 17 '14 at 20:03
• @Mico: As I wrote, with kpfonts you'll have four fonts embedded: one text and three math fonts. – user2478 May 17 '14 at 20:08
• @Herbert - I know that's what you wrote. :-) I was mainly trying to address the OP's follow-up question, which seemed to indicate some uncertainty as to whether the kpfonts package uses the same font for text and math; it does not. – Mico May 17 '14 at 20:13