How can I get smooth fonts in LyX?

5,623

Solution 1

To solve the same problem I resorted to install the package cm-super.

Maybe it could be preferable, because you don't need to always remember to put those lines in the preamble.

Solution 2

Insert this into the LaTeX preamble (there's a section for that in the document settings):

% set fonts for nicer pdf view
\IfFileExists{lmodern.sty}{\usepackage{lmodern}}{}

Solution 3

By default the fonts in LyX are bitmap (very long story, don't ask). To avoid this you simply need to select a different set of fonts in Doc > Settings > Fonts. The Latin Modern family should give the same look and feel as CM, only using vector fonts. I like Palatino with Optima (see this rant), but feel free to choose what works best for you.

The LyX FAQ might have some information that you can use.

Share:
5,623

Related videos on Youtube

detly
Author by

detly

Updated on September 18, 2022

Comments

  • detly
    detly over 1 year

    I opened the introduction in LyX and used Ctrl+R to view it in evince. The fonts appear nice and smooth. If I copy and paste the first couple of paragraphs into a new document and render that, the fonts have jagged, pixellated edges (especially visible upon zooming).

    This is with no customisation to LyX at all — a fresh installation via Synaptic. I can't see any differences between the document settings for the new documents (although there are probably some differences due to autodetection).

    How can I make the fonts look smooth in my own documents? Particularly of the article class and beamer presentations?

    Jagged fonts from my own document Smooth fonts from the introduction

  • detly
    detly over 12 years
    I feel like an idiot: seconds after posting this question, I realised I hadn't checked the preamble in the introduction. There is was, plain as anything: set fonts for nicer pdf view. Duh. But here's the answer, to save others the time.
  • detly
    detly over 12 years
    Nice! I agree, it is preferable.
  • waspinator
    waspinator over 11 years
    strange that this isn't the default setting. I can't imagine a use case where someone wants ugly fonts.
  • landroni
    landroni about 9 years
    @becko Given the default font encoding in LyX, LaTeX defaults to bitmap fonts. LyX merely follows LaTeX. There were countless discussions on this topic, and the consensus is that LyX cannot assume as default any font other than what LaTeX considers as default fonts. And LyX policy is to change as little as possible in the way of LaTeX defaults. Hence the awkward status-quo...