Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I found out that there are cmbtt10 and cmttb10 fonts available. Unfortunately they are not used until I activate them with the \font macro, so just searching for those fonts is not possible.

The cmbtt10 seems too thick. The cmttb10 looks quite what I need, but its characters are too wide. Both seems to be a low resolution font.

I also learned that these fonts are created with METAFONT the first time they are activated, but need the Typewriter Type font source. Are there other fonts that are created in the same manner from Typewriter Type? Is it possible to create a better resolution (like 600~1200 DPI)? How difficult is to define my own modification?

share|improve this question
add comment

2 Answers

up vote 12 down vote accepted

I suggest Latin Modern Mono Light family. In Plain TeX:

\font\tt=rm-lmtl10
\font\itt=rm-lmtlo10
\font\btt=rm-lmtk10
\font\bitt=rm-lmtko10
\tt   Hello\par
\itt  Hello\par
\btt  Hello\par
\bitt Hello\par
\bye

enter image description here

In LaTeX, it is lmtt family in OT1 font encoding. See ot1lmtt.fd for more information.


Latin Modern fonts are available in Type1 and OpenType. Usually we use the Type1 fonts with pdfTeX, dvipdfm(x) and Dvips engine/driver, and they are installed for pdfTeX, dvipdfm(x) and Dvips, respectively. Type1 fonts are vector fonts, they can be freely scaled with out loss of quality.

If you use a font made by MetaFont, you can specify the resolution when calling pdfTeX, dvipdfm(x) or Dvips.

Use \pdfpkresolution to specify the PK font resolution for pdfTeX. For example,

\pdfpkresolution=1200

Use -r command line option to specify the PK font resolution for dvipdfm(x). For example,

dvipdfmx -r 1200 foo.dvi

And use -D command line option to specify the PK font resolution for Dvips. For example,

dvips -D 1200 foo.dvi
share|improve this answer
1  
Note: Latin Modern fonts are very similar to Computer Modern. –  Leo Liu Feb 19 '11 at 11:42
    
Also, LM is available in other encodings -- T1 of course, but also QX and others. –  Will Robertson Feb 19 '11 at 13:43
    
Actually I don't need the document to be in a fixed DPI, I was only curious on how to manipulate that kind of font generation. But this Latin Modern, if it is really close to Computer Modern, will be perfect for me. Thanks! –  Adam L. S. Dec 12 '12 at 9:32
add comment

You could use the typewriter font of the Bera family:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{beramono}

\begin{document}
\texttt{This is just a \textbf{test}.}
\end{document}
share|improve this answer
    
How to do this in plain TeX? \font\ttbf=beramonob? I don't quite like the font face though: It's another font, not the cmtt font. –  Adam L. S. Feb 19 '11 at 11:16
    
Sorry, @AdamLS, I am not familiar with fonts in plain TeX. And true, it is another font. –  domwass Feb 19 '11 at 11:35
    
Bera Mono in Plain TeX: fvmr8t, fvmro8t, fvmb8t and fvmbo8t. (see beramono.sty and then t1fvm.fd) –  Leo Liu Feb 19 '11 at 11:51
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.