0

I've just zoomed in on a document in order to take a screenshot. However, the fonts don't look like vector fonts, and are pixelated somewhat. There are clear interpolation artifacts when zoomed in enough.

Why does it do this, and how can I avoid it?

I've heard that I should use the cm-super package, but it seems that I have it installed.

Technical info:
I'm running Pop!_OS 20.10, which is a Linux distribution based on Ubuntu, which in turn is based on Debian
I have a full TeX Live installation made using the Perl install script

Output of pdffonts:

┌[17:55:16] [<><] anselmschueler /home/anselmschueler [0]
└$ pdffonts /home/anselmschueler/Code/latex/minimal-example.pdf 
name                                 type              encoding         emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
XSGNUP+CMMI12                        Type 1            Builtin          yes yes no       4  0
NHSTJF+CMR12                         Type 1            Builtin          yes yes no       5  0

Here's an image with the PDF viewer's controls for context:
Crop of LaTeX PDF reading "f(x) (small)", "f(x) (large)". The text is an anti-aliased rendering of pixelated fonts.

Here's my tlmgr --gui window showing cm-super:
The TeX Live manager GUI showing the user searching for "cm-super". That package is shown to be at revision 15878.

Here's the source for the image:

\documentclass[12pt]{article}
\usepackage{amsmath}
\setlength{\parindent}{0em}
\begin{document}
\( f(x) \) (small) \\ \( f\left(x\right) \) (large)
\end{document}

Note: this also happens when I don't import amsmath

8
  • What does pdffonts show for your document? Are the fonts Type 1 or Type 3?
    – Davislor
    Mar 3, 2021 at 16:50
  • @Davislor I've added it to the question. Mar 3, 2021 at 16:57
  • 1
    Type 1 fonts are outline, not bitmap.
    – Davislor
    Mar 3, 2021 at 17:03
  • 1
    bitmap fonts would be listed as Type 3 not Type 1. Mar 3, 2021 at 17:37
  • 1
    @schuelermine That's a viewer problem. Your PDF viewer doesn't render the characters again after zooming but only scales the pre-renderered glyphs. Mar 3, 2021 at 22:21

2 Answers 2

6

You are using Firefox's PDF viewer. It's based on pdf.js is is known to have significant issues when it comes to rendering quality. Especially zooming in will always show zooming artifacts because it basically prerenders to a image and then zooms the image...

For the same reason, you should never print a PDF file from Firefox's PDF viewer. If you try, you will print a image rendered by pdf.js which has much worse quality than a normal PDF print.

The good news is that it isn't caused by your PDF file, so if you send the file to someone with a decent PDF viewer than they will see a decent PDF. You just have to remember to download the file and open it in another program before making any screenshots / zooming / printing. (This affects all PDF files, not just LaTeX generated ones)

1

This is a problem with your PDF viewer (you're using pdf.js, which is used by Firefox). By using a different one with sufficiently high maximum zoom (such as Okular), you can see that the fonts are in fact vector fonts.enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .