76

I have the following LaTeX-document:

\documentclass[a4paper,11pt]{article}
\usepackage[utf8x]{inputenc}
\usepackage[ngerman]{babel}

\usepackage[T1]{fontenc}

\title{Sample}
\author{Litb}

\begin{document}

\maketitle

\begin{abstract}
 This is a report about my praxis phase at the company foo bar which I enjoyed.
\end{abstract}

\end{document}

Much to my frustration, compiling with pdflatex creates a document with Bitmap-fonts. The reader's font-list shows that it uses Type3 fonts.

If I remove the fontenc loading, then I get a PDF using vector-fonts, but I heard that I should keep it, for having native German Umlauts working.

Does anyone know how I can get vector fonts with T1, and why it keeps using bitmap fonts if I have that package-load line in it?

Stephen
  • 14,890

5 Answers5

92

The standard Computer Modern fonts are in OT1 encoding, so when you request T1 font encoding bitmap fonts are used. Install the package cm-super to get Computer Modern fonts with T1 support.

There's no change in your document needed. Just install cm-super using the MiKTeX Package Manager or the TeX Live Manager. The package manager will update the font map files for you. Then recompile.

While this is a solution for fixing the default look, consider using a T1 supporting font, such as Latin Modern, which has been designed as successor to Computer Modern and thus is very similar but intended to be better. For the decision, this may help:

And for trying yourself, just add:

\usepackage{lmodern}
Stefan Kottwitz
  • 231,401
  • 2
    You could try updating the font map files by sudo updmap-sys --syncwithtrees, see http://linux.die.net/man/1/updmap-sys. – Stefan Kottwitz Aug 07 '10 at 18:50
  • 1
    @Stefan ohh i see now. I found the cause of the issue: The updmap's config file was were broken - apparently there was an entry of a mapfile "ams-bsr-interpolated.map" that wasn't existing at all. I first tried to run updmap --syncwithtrees but then i found i need to use updmap-sys since it was the global configfile that was broken. Now it works like a charm, and with the latin-modern fonts, all fonts referenced in my other files are vector fonts. – Johannes Schaub - litb Aug 07 '10 at 18:57
  • Haha yes the problem was with the map files. Thanks again :) Finally i can use the microtype package =) – Johannes Schaub - litb Aug 07 '10 at 18:58
  • I compiled a simple document with the lmodern package. If i open the pdf in illustrator and look at the font, its all LMRoman10 Regular, LMMathItalic10 Bold, LMMathSymbols10 Regular - so i wonder if thats really is vector fonts? as of why are the font size included in the font ? – Poul K. Sørensen Jun 29 '12 at 14:17
20

The default fonts for T1 are bitmaps, as has been mentioned, and the most straightforward solution is to use cm-super, like Stefan said. Alternatively, you could use the Latin Modern fonts (package lmodern). It is based on Computer Modern and supports a lot of languages written in the Latin alphabet.

Arthur Reutenauer
  • 2,920
  • 19
  • 17
  • Using latin-modern fonts work nicely. I wonder what's up with cm-super not working on my system. I have installed it (i have a couple of cm-super files on my system including /usr/share/texmf-dist/fonts/enc/dvips/cm-super/cm-super-t1.enc. I have no idea what could be wrong – Johannes Schaub - litb Aug 07 '10 at 18:19
  • That's not the font, it's an encoding file. And since it's not straightforward to know which font file is the default, you're really better off with Latin Modern. – Arthur Reutenauer Aug 07 '10 at 18:42
  • Ohh i see now. I guess i will use latin modern in my future files. It looks sweet :) – Johannes Schaub - litb Aug 07 '10 at 19:00
3

Use

\usepackage[T1]{fontenc}
\usepackage{ae,aecompl}

Both cm-super and lmodern used look worse than the real type 1 Computer Modern fonts (depending on your PDF viewer, zoom level, etc.). The ae package is an ugly kludge, but at least it looks ok, and you will get vectors instead of bitmaps. Copy-paste is another story...

Jukka Suomela
  • 20,795
  • 13
  • 74
  • 91
  • 3
    Could you give an example where lmodern looks worse than computer modern? – Mateus Araújo Sep 28 '10 at 15:52
  • Here is a pair of old screenshots: ae, lmodern. I'm sure both lmodern and PDF viewers have improved since then, but at least it serves as a good example that one shouldn't assume that lmodern always looks as good as CM. – Jukka Suomela Sep 28 '10 at 16:45
  • 2
    Well, compiling the text now produces identical output, except by the positioning of the umlauts ¨; where lmodern and CM agree and ae do not. – Mateus Araújo Oct 06 '10 at 02:10
  • 2
    What are these "real type 1 Computer Modern fonts" you speak of? Computer Modern was originally done in METAFONT, which apparently cannot be accurately rendered in Type 1 outlines. According to MetaFog: Converting METAFONT Shapes to Contours, this is because the METAFONT outlines would have to be described using sopmething like a 6th degree polynomial whereas Type1 only uses 3rd degree polynomials – SamB Nov 30 '10 at 04:02
  • 1
    @SamB: See http://www.ams.org/publications/type1-fonts – yes, they are reimplementations of the original CM fonts, but they are very high-quality reimplementations, with proper hinting. – Jukka Suomela Nov 30 '10 at 09:52
  • @Jukka: oh, I forgot about that version, even though I believe it's the one I'm using now. I wonder why CM-super doesn't use these "BlueSky" fonts for the basic stuff? – SamB Nov 30 '10 at 17:12
  • 1
    On my system, the output produced by ae is slightly *worse* kerning-wise than that produced by default (with cm-super installed) (which is virtually identical to lmodern). – ShreevatsaR May 02 '11 at 14:32
  • @JukkaSuomela The files are 404. Maybe, you can add screenshots to your answer? – koppor Aug 21 '23 at 09:11
0

As for explicitly setting fontenc, I usually just set an inputenc, and write away. On TeXlive 2008 and 2009, this has been doing exactly what I expect so far; and I use both Swedish and German umlauts.

  • 3
    Breaks hyphenation. – Jukka Suomela Aug 08 '10 at 15:00
  • 6
    More specifically, if you just need some Swedish or German umlauts occasionally in an English text, it's ok, but if you are writing in Swedish or German (i.e., lots of words with umlauts), you will need to change fontenc to get the correct hyphenation. For more details, see http://tex.stackexchange.com/questions/664/why-should-i-use-usepackaget1fontenc and http://tex.stackexchange.com/questions/725/why-words-with-accented-characters-cant-be-automatic-hyphenated-with-the-default – Jukka Suomela Aug 08 '10 at 15:18
0

If you do not want to change the font (e.g. defined by a template).

Install cm-super as written earlier: (do not edit the tex-file) MikTeX cm-super