1

I use Helvetica as the font for my document (helvet package). Now I need some parts to be printed in typwriter face, e.g. via \ttfamily. However, as long as I use the fontenc package with the T1 option the text generated turns out to be pixelated (upper text normal, lower \ttfamily).

With \usepackage[T1]{fontenc}: using T1 fonts

Without \usepackage[T1]{fontenc}: not using T1 fonts

MWE:

\documentclass{article}
\usepackage{lipsum}

\usepackage[scaled=0.95]{helvet}
% required to use sans-serif in normal text
\renewcommand{\familydefault}{\sfdefault} 
\usepackage[T1]{fontenc} & <-- comment/uncomment this line

\begin{document}
\noindent
normal: {I'm Batman and Superman} \\
ttfamily: {\ttfamily I'm Batman and Superman}
\end{document}

I assume it's related to the fact that helvet has no serif-fonts, but \ttfamily tries to select one. Is there any way around this? I thought about redefining \ttfamily with (another?) monospace font, but couldn't yet figure out how exactly to do this properly.

Timm
  • 803
  • Add \usepackage{lmodern} to the mix, before \usepackage[scaled=0.95]{helvet}. – Steven B. Segletes Apr 03 '17 at 15:16
  • 1
    I don't see pixels on Adobe Reader (Linux version) even up to 6400% magnification, regardless whether fontenc is used or not –  Apr 03 '17 at 15:17
  • 1
    Let me guess: you're using MiKTeX. If so, look at http://tex.stackexchange.com/questions/1291/why-are-bitmap-fonts-used-automatically This has nothing to do with Helvetica. – egreg Apr 03 '17 at 15:36
  • @Christian: Maybe egreg's comment solved that, I get pixels in Adobe Reader (Windows), Sumatra (Windows) and Okular (Linux). I am indeed using MiKTeX and just installed this package, so far nothing improved. But Stevens comment helped, and I figured I could use any T1 font. Regarding the duplicate, I found that question, but figured it didn't help me with my problem. – Timm Apr 03 '17 at 15:45
  • 1
    @Timm: Hm, well, I can't test this with MikTeX, but I get no pixels as well in Okular under Linux. –  Apr 03 '17 at 15:50
  • @egreg: I installed it, updated all formats in the settings manager, but nothing changed. I would answer this question with Stevens suggestion now, or you (all) could decide it's a duplicate after all. – Timm Apr 03 '17 at 15:52
  • 1
    After the installation of cm-super you need to activate the map files, run updmap on a command line. – Ulrike Fischer Apr 03 '17 at 16:16
  • @ChristianHupfer: you get pixels if cm-super is not installed (which is the case of a basic miktex). – Ulrike Fischer Apr 03 '17 at 16:17
  • @UlrikeFischer: I see... but I won't uninstall cm-super just for this purpose now ;-) –  Apr 03 '17 at 16:18
  • @ChristianHupfer: You could simply disable its map file \pdfmapfile{-cm-super-t1.map}. – Ulrike Fischer Apr 03 '17 at 16:24

0 Answers0