Latin Modern Fonts: How Less Means More
Total Page:16
File Type:pdf, Size:1020Kb
Latin Modern fonts: how less means more Bogusław Jackowski BOP s.c., Gdańsk, Poland [email protected] Janusz M. Nowacki Foto-Alfa, Grudziądz, Poland [email protected] Streszczenie Rzecz będzie o najświeższej wersji rodziny fontów Latin Modern. Aktualnie w skład rodziny wchodzi 57 fontów zawierających średnio ok. 665 znaków, głów- nie diakrytyków. Nowością jest udostępnienie źródeł (fonty LM zostały przygo- towane za pomocą pakietu METAType1, bazującego na systemie METAPOST). Dlaczego mniej to więcej postaramy się wyjaśnić w trakcie referatu. 1. Introduction approach, but going further: the aim was to com- The Latin Modern project was launched during the prise all existing Latin-based alphabets, not nec- th th essarily European. We were invited to lead the 13 European and 10 Polish TEX Conference, May 2002, Bachotek, Poland. The aim was to pre- project, which we gladly accepted. pare a family of outline fonts, compatible with Com- 2. The initial stage of the LM project puter Modern fonts ([8]), but, unlike CMs, equipped with a rich collection of diacritical characters. Like Engebretsen, we decided to make use of the At that time, two solutions to the problem ex- Computer Modern fonts in the PostScript Type 1 isted: (1) Lars Engebretsen’s AE (Almost EC, [3]) format, released by AMS. But being bent on working family of virtual fonts, based on Computer Mod- with human readable sources, we decided to employ ern fonts in PostScript Type 1 format released our (anyway favourite) METAPOST-based program, by AMS; (2) Vladimir Volovich’s collection of Post- METAType1 ([6], [7]). One of the modules of the Script Type 1 fonts, CM-Super ([15]). Engebretsen’s METAType1 package is a converter from PostScript approach has an important drawback — virtual fonts fonts to METAPOST sources. So, the first step was can be used only with TEX. From this point of the conversion of PostScript Type 1 fonts to META- view, Volovich’s CM-Super fonts would be a better POST sources that were to be manually adjusted. choice. The fonts were produced by P´eter Szabó’s The decision was not obvious at all. The main T Xtrace ([12]) which, in turn, is based on Martin E disadvantage of such an approach is the “freezing” of Weber’s Autotrace ([16]). Volovich’s achievement is parameterization. As an alternative, we considered really impressive, nevertheless we would cast doubt a conversion of METAFONT CM sources into META- upon the quality of the outlines of glyphs. This is Type1-conforming ones. It turned out, however, perhaps the intrinsic drawback of the autotracing that this method, although practicable, would be approach. Moreover, there is a problem with the time-consuming. Taking into account that our main size of the CM-Super package. It contains more than goal was the extension of the standard TEX fonts four hundred fonts; the size of the PFB files is almost with diacritical characters, we abandoned eventu- 60 MB. Finally, it is not easy to to repeat the pro- ally the idea of working with METAFONT sources, cess of the font generation if changes are needed, although access to the CM parameterization is pro- as manual tuning was involved. (A comprehensive vided (see section 4.1). discussion of alternative approaches can be found in [5], [6], and particularly [11].) 3. Interim stages of the LM project Finding the situation unsatisfactory, some rep- resentatives of European TEX Users groups decided The LM family of fonts has been developing evolu- to prepare yet another family of fonts, Latin Mod- tionary. Our main concern, as already mentioned, ern, being in a way a continuation of Engebretsen’s was the enhancement of the character set, but, as XIII Ogólnopolska Konferencja Polskiej Grupy Użytkowników Systemu TEX 33 Polska Grupa Użytkowników Systemu TEX, 2005 (http://www.GUST.org.pl) Bogusław Jackowski and Janusz M. Nowacki a result of pressure from users, the number of fonts also increased. 3.1. Serious matters and trifles The number of glyphs per font grew from less than two hundred to more than six hundred. Also, the number of fonts grew. We started with 50 fonts (following Engebretsen); currently, the LM family contains 57 fonts. Among them are fonts that do not belong to the “Knuthian canon,” for example, the bold companion for cmssq8 and cmssqi8 (pre- pared by Pierre A. MacKay)—see [5], p. 67, for the complete list of LM fonts. The increase of the num- ber of glyphs resulted of course in the rapid growth of the number of kern pairs. The augmentation of the LM family of fonts was certainly the most important part of the whole en- terprise. We wrote several tools (mostly awk scripts) that helped to control the herd of glyphs and in- terdependences between them — it is unimaginably difficult to fiddle with dozens of thousands of glyphs Figure 1: A seemingly innocuous asymmetry and hundreds of thousands of kern pairs by hand. of double quotes turned out to be fairly bothersome; PostScript names of the glyphs have been used As we pointed out in [5], the lion share of our for the description. time was spent on the struggle against tiny details and exceptions. We were not expected to come up with brand-new concepts. On the contrary, we had figure 1) in their variant of CM fonts. In conse- to comply with the established practice. This, as it quence, the character quotedblbase (used as an open- turned out, necessitated looking closely into lots of ing quote, for example, in Czech, German, and Pol- various aspects. ish) also inherited the asymmetry1. One can call most of these problems trifles, but The proliferation of glyphs caused by the asym- their amount, relating of course to the size of the metry of quotedblleft and quotedblright is of course project, created a real problem. Such “trifles” had a disadvantage because fonts needlessly swell. We to be carefully analysed and even if the result of decided, however, to inflate them even more: sym- the analysis was simply “let’s do nothing,” it took metric quotes were provided as an alternative. We time. Listing all details would be impracticable, but believe that only the latter ones should be used, but we cannot resist to mention just a few in order to because of the remnants of history, the problem can- demonstrate how seemingly less important things not be resolved once forever—asymmetric quotes may cause more trouble. should be retained. 3.2. Detail 1: asymmetry of double quotes 3.3. Detail 2: non-uniform width of accents One of such problems turned out to be, somewhat Typically, accents should have the same width. This unexpectedly, the asymmetry of double quotes (see is, however, not the case with CM fonts: cedilla, figure 1). Observe that single quotes are positioned dotaccent and ring have widths different from the symmetrically, while double ones are not. This is remaining accents, that is, acute, breve, caron, the CM fonts heritage: the glyphs quoteleft (reverse circumflex, dieresis (umlaut), grave, Hungarian um- apostrophe), quoteright (apostrophe), quotedblleft laut, macron, and tilde, all of which have the same (opening quotes), and quotedblright (closing quotes) width of 1/2 em. We cannot say why cedilla and were designed by Donald E. Knuth ([8], p. 140 – 141 dotaccent are an exception. The idea behind the and p. 280 – 281), who decided to introduce asymme- extraordinary width of ring can be easily under- try. But the glyph looking like an English opening stood if one inspects the code of the plain T X ([9]) quote is used in some languages, for example, Czech E and German, as a closing one. Therefore, Czech 1 For historical reasons, the glyphs quotedblbase and TEX users introduced a special glyph with differ- quotedblbase.cs slightly differ; the latter is placed asymmet- ently asymmetric sidebearings (quotedblright.cs in rically also in typewriter fonts. 34 Bachotek, 30 kwietnia – 3 maja 2005 Polska Grupa Użytkowników Systemu TEX, 2005 (http://www.GUST.org.pl) Latin Modern fonts: how less means more macro \AA which typesets the symbol A˚ (Aring). The glyph ring is designed to align with the top of the letter A: \def\AA{\leavevmode\setbox0\hbox{!}% \dimen@\ht0\advance\dimen@-1ex% \rlap{\raise.67\dimen@\hbox{\char’27}}A} It is tempting to have a unique width for all ac- cents. But this would mean upward incompatibility, as the \AA macro would cease to work. On the other hand, it is not urgently needed, as Aring obviously belongs to the repertoire of LM glyphs. Perhaps the cure would be to introduce alternative accents and Figure 2: The lowercase letters in CM caps and use the odd-sized ones only with TEX, and only when small caps fonts, that is, cmcsc10 (top) and cmtcsc10 compatibility is needed, for example, if the LM fonts (bottom), are higher than the nominal x-height; this are to be used as a replacement for CMs (see section may befool some typesetting programs which may 4.2). But, as we complained already in section 3.2, assume that lowercase letters should be accented a supererogatory increase of the number of glyphs without an additional vertical shift of the accent — the potential disastrous results are shown to the right; would be an obvious disadvantage. TEX rises an accent by the difference between The plain TEX macro \AA is not the only one the ex unit and the actual height of an accentee. that heavily exploits the metric properties of CMs. The macros \l and \L (which define glyphs lslash and Lslash, respectively) also are defined in a CM- to this riddle is simple: all roman fonts of the CM dependent manner.