User Tools

Site Tools


texcmfonts

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

texcmfonts [2008/02/12 14:17] (current)
kleiner created
Line 1: Line 1:
 +====== Different Versions of the Computer Modern Fonts ======
 +This article discusses the difference between OT1 and T1 encodings in LaTeX and the different available versions of the Computer Modern font.
  
 +
 +===== Font Encodings: OT1 and T1 =====
 +==== Computer Modern and the OT1 Encoding ====
 +
 +Originally, the only fonts that existed for LaTeX were the //Computer Modern// fonts, designed by Donald Knuth himself. These fonts were created using MetaFont and thus were only available as bitmap fonts.
 +
 +The font encoding used by Knuth, i.e., the mapping between the "​number"​ of a character and it position in the font file, was OT1. This encoding uses only 7 bits per character, thus an OT1 encoded font can only contain up to 128 characters; there is no room in a font for special characters such as accented characters. As a consequence,​ when using the OT1 encoding, a character with an accent (e.g. ''​\'​e''​) is composed of the letter e and an accent sign. This method has several drawbacks:
 +
 +    * A word containing such an accented character cannot by hyphenated.
 +    * The position of the accent over the character is often inaccurate, since TeX does not know the exact shape of the character.
 +    * Final documents such as DVI or PDF files do not allow you to search for a word containing accents. ​
 +
 +As of 2005, OT1 is still the default encoding used in TeX and LaTeX.
 +
 +==== The T1 Encoding ====
 +
 +At the TeX conference in 1989 in Cork, the TeX user community defined a new encoding called T1. T1 uses 8 bits per character and therefore allows accented characters and other special characters to be stored as separate glyphs.
 +
 +To take advantage of this new encoding, the //European Computer Modern// fonts (or "EC fonts"​),​ an implementation of the Computer Modern fonts with the addition of new characters (such as accents) were created using the T1 encoding. Just like the original Computer Modern fonts, the EC fonts were implemented using MetaFont and thus are bitmap fonts.
 +
 +Both Computer Modern and the EC fonts are now considered standard in LaTeX and must be available in any installation.
 +
 +
 +==== The TS1 Encoding ====
 +
 +At the Cork conference it was decided that the T1 encoding should omit many standard text symbols and instead include as many composite glyphs (mainly accented characters) as possible. The extra symbols have been collected in a companion encoding called TS1.
 +
 +==== How To Select an Encoding ====
 +
 +To change the font encoding of a LaTeX document from the default (OT1) to T1, load the package ''​fontenc''​ with the option ''​T1''​.
 +  \usepackage[T1]{fontenc}
 +By default, LaTeX uses the bitmap versions of the EC modern fonts. Use the lmodern package to use their PostScript Type1 version (see below).
 +
 +If you use the lmodern package, you also need to load the textcomp package if you use any symbols to make the TS1 encoding available.
 +
 +
 +===== Type1 (PostScript) Implementations =====
 +
 +Although both the Computer Modern and the EC fonts were developped with MetaFont and hence bitmap fonts, there are now free Type1 PostScript replacements as well. For Computer Modern, these were developped by Blue Sky Research and Y&Y; they are available [[http://​www.ams.org/​tex/​type1-fonts.html|here]]. Usually though, they are contained by default in a standard LaTeX installation (e.g. teTeX). (If the PDF or PS documents you produce using latex/dvips or pdflatex do not look ugly on screen, i.e., the fonts have no jagged edges, this usually means that the fonts are installed.)
 +
 +As for the EC fonts, they have been recently converted from MetaFont sources to Type1 PostScript. Although a sophisticated algorithm was used for this conversion, according to The LaTeX Companion (2nd Ed.) you cannot expect exactly the same quality as could be achieved by a manual conversion process. The Type1 PostScript EC fonts are available as the ''​cm-super''​ package, available at CTAN under ''/​fonts/​ps-type1/​cm-super/''​.
 +
 +** Update:** Use the ''​lmodern''​ package to have Type1 PostScript fonts of Computer Modern available for the T1 encoding. These Latin Modern fonts are carefully handicrafted PostScript fonts based on the designs of Knuth'​s original Computer Modern families; they contain all the glyphs needed to typeset Latin-based European languages. At the moment the T1 and TS1 encodings are supported.
 +
 +Source: The LaTeX Companion, 2nd Ed. (Mittelbach et al., 2004) 
texcmfonts.txt ยท Last modified: 2008/02/12 14:17 by kleiner