9 Selección de fuentes y codificaciones

In this chapter we describe the font selection and encoding models of LaTEX, known as NFSS (New Font Selection Scheme) and the packages and commands to deal with encoding issues. Given that NFSS was first introduced about thirty years ago, it is, of course, no longer really new. The last decade, however, showed a number of exciting new developments, so this chapter, compared to the one in the previous edition of the book, nevertheless contains a lot of new and changed material.

We start with a short introduction to the history of font usage in different TEX engines. This is then followed by a section discussing font characteristics in general and introducing the major attributes used in LaTEX for orthogonal font switching. We then describe the use of the high-level interface — that is, the commands a user normally has to deal with. This includes commands used in normal text (Section 9.3), special features for use in mathematical formulae (Section 9.4), and an overview of basic support packages for NFSS — those being distributed together with LaTEX (Section 9.5).

Section 9.6 is solely devoted to the details of the fontspec package, the frontend to NFSS for use in the Unicode engines X TE EX and LuaTEX.

The final sections then describe the low-level interfaces that are useful when defining complex new commands and that are important when new fonts are to be made available in LaTEX. Here you find low-level commands for changing individual font attributes (Section 9.7), commands for setting up new fonts with LaTEX (Section 9.8), and a discussion of LaTEX’s encoding models for text and math (Section 9.9).