If you think of a font as being arranged in a table, then the font encoding is nothing else than the way the font's symbols (the “glyphs”) are arranged in the table. If you think of the table as being fixed, then different font encodings arrange the same or different glyphs in different ways in the table's cells. If you mentally number all table cells sequentially, then for each table cell you have a number and a glyph. The number is the font's internal representation (the “encoding”) of the glyph.
Fonts are always encoded in some encoding - that's the nature of a font, being just a table of glyphs. Thus, in order to use a font that contains the glyphs (letters, symbols,...) you need, you must tell pdfjadetex and jadetex which encoding to use. For example, to use the T1 font encoding, the jadetex.cfg file must contain the line
\usepackage[T1]{fontenc}
|
To use the OT1 encoding, you must have:
\usepackage[OT1]{fontenc}
|
There are some factors that affect the choice of font encoding:
Your language. More precisely, the glyphs you want to present in your document (if you find the word “glyphs” confusing, just read “letters” or “symbols”). If your language is english, then you can use both the T1 and the OT1 font encoding. If your language is french, then you have to use the T1 encoding. The same is true for many european languages. FIXME: encodings for other languages.
Mathematics. If you don't display any Mathematics, you can choose from a wider choice of fonts and font encodings. But if you use Mathematics, your document will look better if you choose a font family that contains mathematical symbols as well. A font family that contains excellent mathematical fonts is Computer Modern. Computer Codern came originally only in the OT1 encoding. This is fine, as long as you use only english. For european languages, you have to use the T1 encoding. Now, if you have Mathematics and write in some european language (e.g. french, where you need accented letters and the like), then your choice is becoming narrower: you need a good Mathematics font, say Computer Modern, but you also need T1 encoding. This leads to the use of virtual EC fonts with the ae and aecompl packages, as discussed in Section 7.2.3.
The symbols you want to use. Some symbols are available in one encoding, but not in another. For example,
is missing from the OT1 encoded Computer Modern fonts,
but you can still get it in the PDF and PS if you enter math mode in Lyx and type the two
there. However,if your purpose is to get the french quotes
(“guillemets”), then you might just as well choose the T1 encoding and the aeguill package:
\usepackage[T1]{fontenc}
\usepackage{aeguill}
|
Quality. You might not want to use the aeguill package, because the fonts it defines are not as perfect as the original Computer Modern fonts, leading to (maybe imperceptible, but nonetheless
existent) inaccuracies and inconveniences in the resulting PDF. So you might decide to use the OT1 font encoding and the original Computer Modern fonts, entering your
and
always in math mode in LyX. Note that the HTML versions of your document will then contain small images in place of those symbols, since
lyxtox will treat them as mathematical “ inline equations” (see Chapter 10).
Note that today other solutions to the font quality problem exist as well: instead of using virtual Type 1 fonts (which is what you do when you use the ae, aecompl and aeguill packages), you may choose to use “true” Type 1 fonts by installing one of the new CM-super, CM-LGC or Latin Modern fonts, see Section 7.2.3.
| Last updated Mon Sep 24 01:19:25 CEST 2007 | Permalink: http://www.karakas-online.de/mySGML/explain-font-encoding.html | All contents © 2002-2007 Chris Karakas |