10

When rendered the text in my pdf is not anti alised. Anyone knows how to do this?

The following example shows my text output compared with output from google docs pdf

enter image description here

Is it even possible with pdflatex?

Header file:

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{amsmath}
%\usepackage{icomma}
%\usepackage{units}
\usepackage{graphicx}
\usepackage{epstopdf}
\usepackage{color}
\usepackage[hyphens]{url}
\usepackage[breaklinks,pdfpagelabels=false]{hyperref}
%\usepackage{lettrine}
\usepackage[sort]{natbib}
\usepackage{caption}
\usepackage[final]{pdfpages}

%\usepackage{fancyhdr}
%\usepackage{fncychap}


\newcommand{\degC}{\ensuremath{\,\unit{^\circ C}}}
\newcommand{\mail}[1]{\href{mailto:#1}{\nolinkurl{#1}}}

Thanks!

Martin Scharrer
  • 262,582
Richard
  • 211
  • it would help if you add the header of your tex file to the post, and tell us how exactly you compile the tex file. I use pdflatex using the pdftex script of TeXShop, and I get nice looking text. – thundersteele May 09 '12 at 15:10
  • Is the text rasterized or using a bitmap font? I don't know anything about pdflatex, but those are the only reasons I can think of that would cause aliased text in a PDF. –  May 09 '12 at 15:55
  • 1
    When you add \usepackage[T1]{fontenc} you should also load a vector font, for example \usepackage{lmodern} – matth May 09 '12 at 16:37
  • related: http://tex.stackexchange.com/questions/44694/fontenc-vs-inputenc – matth May 09 '12 at 16:39
  • 3
    possible duplicate: http://tex.stackexchange.com/questions/1291/why-are-bitmap-fonts-used-automatically – matth May 09 '12 at 16:41
  • Welcome to TeX.sx! Your question was migrated here from [so]. Please register on this site, too, and make sure that both accounts are associated with each other (by using the same OpenID), otherwise you won't be able to comment on or accept answers or edit your question. – Werner May 09 '12 at 16:56
  • @Richard: I assume you're encountering the problem described in the second question matth linked to. Is this so? Then we'd close this question as a duplicate. – doncherry May 09 '12 at 17:09
  • To clarify terminology: what you're seeing in the images question is not antialiasing (at least, not obviously), but simply fonts in a higher resolution (because of using outline fonts and letting the renderer do the rasterization). Anti-aliasing refers to using pixels that are not just black-or-white but can be (certain) shades of grey. While it is true that this can give a smoother image (though it's a matter of preference: some people prefer sharp jagged images as in your first image, over blurry edges at the same resolution), it is not true that "smoother" = "anti-aliased". – ShreevatsaR Mar 24 '17 at 00:32
  • related: https://tex.stackexchange.com/questions/1390/latin-modern-vs-cm-super – matth Jul 13 '17 at 07:12

2 Answers2

14

There are no "official" outline fonts for TeXs native Computer Modern Roman fonts in T1 (also called EC) encoding.

For the old OT1 encoding there are the Blue Sky fonts, a free set of Type1 fonts which were hand-outlined. You'll see these in the log as follows if you leave out \usepackage[T1]{fontenc}:

</usr/local/texlive/2011/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb>

For EC encoding there are for instance the CM Super fonts, which are also outline fonts, but they are autotraced and the package is huge, so they seem to be missing on some systems. They seem to be included in a full TeXLive install nowadays, so with \usepackage[T1]{fontenc} I get:

</usr/local/texlive/2011/texmf-dist/fonts/type1/public/cm-super/sfrm1000.pfb>

If you don't have the cm-super package installed, you'll get bitmap fonts generated from the original Metafont sources of the EC fonts, which gives the pixelated effect you are seeing.

Another alternative for T1 encoding is to load the Latin Modern fonts with

\usepackage{lmodern}

as mentioned in the comment by matth. They are a hand-outlined replacement for Computer Modern, but they look different from the EC fonts in some places.

11

Adding \usepackage[T1]{fontenc} to your preamble is a good thing, but sadly it will load a bitmap font by default. So in order to hace a nice looking font, you need to load one. Adding microtype makes the type face even nicer. Here is an example of what I put in my preamble:

\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage[babel=true]{microtype}
matth
  • 12,381