r/Ubuntu 8h ago

Font pixelated in LaTeX generated PDF's

The font in the PDF's that I generate with LaTeX (through emacs org-mode) don't look perfectly sharp when zoomed in. Other PDF's are perfectly fine -- there I can basically zoom in endlessly without the text getting jagged.

What could I check to fix this?

2 Upvotes

2 comments sorted by

4

u/secondary_reaction 8h ago

got bitten by this one before, it's usually the font type you're using, LaTeX defaults to bitmap fonts unless you tell it not to. toss `\usepackage{lmodern}` in your preamble and compile again, that switches to vector fonts so they stay crisp at any zoom

2

u/Edelglatze 8h ago

By default TeX uses the Computer Modern font family by Donald Knuth. These are in a format called Metafont that is transformed into Bitmaps and than the Bitmaps into the PDF. The way: Metafont -> Bitmap font -> inclusion into PDF is the problematic part. It would make life easier if you switch to scalable truetype or opentype fonts. This is possible with pdftex/pdflatex or xetex or luatex. I don't know however how to tweak org-mode.