The Mathematica® Journal
The typesetting system of Version 3 incorporates several new mathematical symbol fonts. This is the story of their design and development, by the manager of Wolfram Research's font project.
One of the main features of Mathematica Version 3 is the math typesetting system. A major component of the system is the mathematical font set that provides all the symbols and components displayed when an expression is formatted. The Mathematica fonts are the result of more than three years of design and development completed under my direction, with design and manufacturing contributions from Galapagos Design Group, Type Solutions, Y&Y Inc., Glenda de Guzman, Stephen Wolfram, Gregg Snyder, Carl Rohrs, and Andrew Hunt.
Before Wolfram Research committed to designing specific Mathematica fonts in 1993, we tried working with the mathematical symbol fonts that already existed: Symbol, Mathematical Pi family, Computer Modern, Euler, and the Lucida family. Symbol was immediately ruled out because it offers no italic lowercase Greek alphabet, established as the most important of our design criteria in order to properly typeset variables. Adobe's Mathematical Pi was rendered from a Linotype font. (See sidebar for a brief history of font technologies.) It's a bit of mish-mash, and the operators tend to be overly large, so it was not an ideal candidate. Licensing issues between Adobe and Linotype made it an impossible choice. The public-domain Computer Modern TeX fonts were restricted to the resolution-limited bitmaps produced by the Metafont program. Type 1 versions became available at no cost only recently, a generous decision by Blue Sky Research and Y&Y, Inc. Because many of the Wolfram Research staff were not fond of TeX's Computer Modern font designs, it was not worthwhile to pursue licensing negotiations with Blue Sky for the Type 1 versions. Zapf's calligraphic Euler design was deemed too much of a departure from standard text. Finally, we considered Bigelow and Holmes' Lucida family, which is probably the most extensive collection of consistently designed mathematical symbols in existence. It's an excellent font, but was not quite to our taste. Our first goal was to arrive at a traditional-looking font, and Lucida strays outside of that flavor with its squarish, almost slab-serif (and very modern) design. (See Figure 2 for an explanation of font elements and design styles.) Because of technical, legal, and stylistic reasons, we set our course on creating our own design.
Figure 1. A comparison of the different math fonts Wolfram Research considered before developing Mathematica fonts: Mathematical Pi, Symbol, Computer Modern, and Lucida, from top to bottom.
Figure 2. A quick tour of the characteristics of type. Times-Roman is in the left-hand column. Note how the italic version employs a cursive lowercase letter a. The bold version is thicker than that of most standard text fonts. The center column shows Helvetica, a classic sans-serif face. Close examination of the counters and bowls shows subtle contouring in the stroke of the characters. There is no comparable contour in Courier, as shown in the right-hand column. Simple lines are typical of monospaced fonts, which usually emulate typewriter type. Courier can be considered a slab-serif design sice it shows pronounced serifs with the same stroke as the rest of the characters.
The initial goal of the Mathematica font project was relatively humble: a custom set of mathematical symbols in Type 1 format. (See sidebar for an explanation of computer font formats and related technical issues.) It was clear, given our one-year deadline, that we would design an extension to an existing font family. While this goal was indeed accomplished in about a year, it was naive to consider it final and proved to be only the tip of the iceberg of what was to come!
Since licensing became a difficult issue, the choices for the "base" fonts (the standard Latin alphabet) were extremely limited. The three fonts typically available on all computer platforms are Courier, Helvetica, and Times (short for Times-Roman). There are all sorts of stories about why the computing world was burdened with these three choices. They were the standard fonts on the first laser printers equipped with PostScript and they have been the standards ever since. When laser printers were developed, there weren't many monospaced fonts available, so Courier was a plausible choice, and Helvetica was extremely popular as the generic industrial font of the 1970s. Times was an odd choice, however. It was designed by Stanley Morison in the 1920s for the London Times, but was never any more popular than all the different Garamond-based families, or such classics as Baskerville, Bembo, or Caslon. Times sets very tightly, more so than most other serif fonts, which is good for newspapers but bad for 8.5x11-inch printouts with wide text measures. The bold looks like a completely different family (which it may have been originally, according to some histories). On the up side, Adobe's rendering is very clean and symmetrical, creating a feeling of precision. Times was our only possible choice for a base font, since our initial goal was traditional mathematical typesetting, which requires a classic serif text font.
The Greek alphabet is the core of any mathematical symbol set. The rest of the symbols are created to match in scale and stroke, which involves far fewer subtle design decisions. Greek characters are unlike their Latin counterparts in that they share fewer strokes between each other and employ a greater number of axes. Our first challenge was to create a design for this core set that is compatible with Times, but also usable with other fonts. The x-height to cap-height and descender ratios were not negotiable features, but character width, contour, and stroke allowed some creative alternatives.
Figure 3 shows the Greek character set from the first Mathematica font family. Figure 4 shows some of the characters that share attributes of Times-Roman characters, as well as others that have no such correlation. It may seem confusing for one font to share roman and italic attributes, but a mathematical symbol set includes all sorts of operators and bracketing characters that are never italicized. Greek is traditionally set with lowercase in italics, and mathematical typesetting follows this convention for notation of variables. It was clear that we should design our Greek alphabet in this traditional way. We saved a lot of time and effort by combining roman and italic characters, instead of creating a separate italic font.
The design for italics is usually the most challenging part of a font family, so a lot of time was spent working and reworking the Greek alphabet. A stack of hardcopy produced by some of these revision cycles stands about three feet tall. (The paper output we produced is ironic in this age of electronic communication.) Hardcopy was invaluable for eyeballing the character shapes at different sizes as well as upside down and sideways (to test for balance), and for making notes. Since Greek is not a familiar language to me, it was handy to have handwritten samples of the Greek alphabet from various people, most notably Stephen Wolfram. There are plenty of Greek fonts that can provide inspiration, but it's important to know the skeleton of each character, as based on the written form, to avoid being distracted by other designers' embellishments.
Once the Greek alphabet was completed in the regular (roman) weight, the bold followed. A bold font is required by the Mathematica convention of using boldface input and regular output, and for mathematical elements in publication section heads and titles, which are typically bold. Our boldface was based solely on the roman Mathematica font design, not on an extrapolation of Times-Bold, which is proportionally heavier than most other bold versions of text fonts. It looks a bit ungainly and doesn't match Times-Roman very well. Linotype-Hell, the owners of the Times-Roman trademark, offer a medium weight Times that works much better as a typical bold variation, but it is not part of the computing world's standardized font set. The Mathematica fonts are less bold than Times-Bold, but bold enough to blend in with it. This compromise makes them blend well with the bold versions of other font families.
Figure 3. Greek characters from the first Mathematica font, Math1.
Figure 4. A comparison of Times and Math1 characters. Times characters are grouped with Math1 characters that have similar features. The highlighted characters have few attributes to compare to any Latin characters.
The initial plan was for the Mathematica typesetting system to draw all the bracketing characters on the fly in PostScript, enabling them to adjust to match any two-dimensional expression. This idea was impractical to implement (though we may return to it in the future, as display technology advances). Therefore, we had to expand the character set to include various sizes of bracketing characters, as well as components that can be assembled into symbols of any height. Similar characters were required for the large operator symbols like the sum and integral. This approach of using both a range of fixed character sizes and extensible character components is similar to TeX, and it requires multiple fonts.
Type 1 fonts are limited to 256 characters. In most encodings, 32 are control characters, one is usually left undefined, and two are space characters that many applications refuse to display as anything but a blank space. We had hoped to use almost all of the 256 character positions, which worked on Macintosh and Windows systems, but proved impossible on Unix. That left 221 usable character positions. They fill up quickly when a font has to reserve one spot for every glyph, including components of characters like extensible brackets and operators.
The character layouts in the various fonts were influenced by a number of technical criteria that were juggled at different development stages (hence the lack of precise or consistent groupings seen when scrutinizing the Mathematica font contents). A limitation in Windows would not allow us to combine large characters with regular-height characters without forcing text line spacing apart. Other platforms let us modify the font's leading values to control line spacing, but the Mathematica fonts need to be consistent across all platforms and font types, so a limitation in any operating system affects them all. Tests showed it was important to put the most commonly used characters into the least number of fonts for efficiency reasons. We packed these characters into Math1 and Math2. For portability reasons, the encoding of Math1 is almost identical to that of the Symbol font. Among the Mathematica-specific characters in Math1 that differ from the corresponding Symbol characters are a handful that turn out to be used less frequently than we had expected. In the next major release, we may restore some of the more obscure Symbol characters that were bumped to make room for others.
The Mathematica font development process expanded greatly after we completed the initial pass of Greek characters, operators, and bracketing characters. While Type 1 technology was clearly the standard at the time the design was started, it became evident that TrueType was gaining momentum and would have to be considered. We eventually decided it was most important to produce TrueType versions of the fonts, since it is the native format for the most popular operating systems, while Type 1 requires additional software for Macintosh and Windows. Though it is similar to Type 1, TrueType has its own design requirements, resulting in a doubling of effort. In particular, TrueType hinting takes more time and work than for Type 1, it costs considerably more, and is more difficult to schedule with the available hinting vendors.
The TraditionalForm format was orginally planned to be the exclusive Mathematica typesetting mode, displayed as a form of output only. About a year after the Times-compatible font family was started, we made the important decision to implement StandardForm as the default Mathematica input form. StandardForm combines aspects of traditional mathematical typesetting with the old ASCII-based Mathematica input format. It required a font designed to expand on Courier, the default monospaced, terminal-style font for math input and output.
Producing a platform-independent extension to Courier was extremely difficult because the name is in the public domain. The Courier font on one platform is not necessarily the same as that on another. In fact, Apple's TrueType Courier is radically different from the Type 1 version on most Unix systems. Even the Type 1 versions vary depending on age and are different on various PostScript printers. Courier was originally a stroke-based PostScript font, which means its lines were drawn as vectors limited to one pixel in thickness. This might have been acceptable for 300-dpi laser printers, but it looks terribly skinny on higher-resolution devices. Newer versions of Courier are drawn as outlines (like any other Type 1 or TrueType font), but they still vary in thickness depending on the printer manufacturer. Reconciling these differences has been challenging, to say the least. We opted for outlines that were drawn to match the printer fonts most common at the time (1994-95), and hints for the screen that matched Courier on various operating systems. On Macintosh and Unix, we indulged in the luxury of tuned bitmaps to enhance our hinted results.
Figure 5 compares MathMono and the original Math fonts. MathMono maintains a simple straight-line typewriter style through all characters, including the integral, sum, and the script and gothic characters. At first, this design may seem a little strange, but it's consistent with Courier and makes it easy to distinguish StandardForm from TraditionalForm.
In addition to the Courier-compatible math fonts, we needed a more condensed monospaced font family that would be more practical for printing The Mathematica Book. Wide characters on screen offer legibility at no cost, while printing requires some amount of paper conservation and offers plenty of resolution for condensed but legible font designs. Previous editions of The Mathematica Book used the CMTT (Computer Modern Typewriter) mono fonts available to TeX users. This font is heavy (the regular form is almost as heavy as a typical bold font), yet very compact. We decided to continue using it, and added an extension of CMTT to the growing Mathematica font family.
Figure 5. A comparison of characters from Math1, Math1Mono, and Math1CMTT. In MathMono, the integral is a straight vertical stroke, so it renders cleanly on screen, which is important for the default StandardForm font. In the other two fonts, this character has a slight tilt, which tends to appear jagged at low screen resolutions. We chose to design the gothic alphabet so that all the characters are clearly discernible, which breaks from tradition. The script and gothic alphabets are also rendered with simple lines to maintain the distinct look of StandardForm.
All the Mathematica fonts must have the same character layout (encoding) in all formats to maintain compatibility both across platforms and between StandardForm and TraditionalForm. Our original, modest goal of one font design, therefore, evolved into three font designs for two competing font formats and four display systems (Windows, Mac, X Windows, NEXTSTEP), each with its own quirks and obscure technical requirements.
Another challenge was using Mathematica to document itself while it and its fonts were being developed and to simultaneously produce a 1500-page book that describes almost every feature of the Mathematica system! Many of us in the Wolfram Research Publications department are still recovering from that ambitious effort. The Math CMTT fonts are also recovering, in that they were left behind when the character layouts were being shuffled for the reasons outlined earlier. They are currently being updated for release with the other Mathematica fonts in a stand-alone font kit. This font kit will also include virtual TeX fonts so TeX users can exploit all of Mathematica's characters.
Because of the priority given the Math CMTT font development process, our plans to design a sans-serif (Helvetica) compatible math font have been delayed with a future release anticipated. Our long-term goals include development of a Mathematica font family, including the Latin alphabet, designed from scratch for StandardForm, TraditionalForm, and sans-serif TraditionalForm. The idea would be for all these families to work together seamlessly, sharing the same color, axes, and general dimensions. Charles Bigelow has been making headway with this idea for Lucida, and Sumner Stone completed such a matched set for the Latin alphabet with his Stone family. Mathematica deserves similar treatment.
My next article will discuss details of font technology related to the Mathematica font design process. I will also look at future font formats and describe details of how the fonts work with Mathematica.
Gutenberg's movable type was refined into a mainstream technology beginning in 1450. Individual letters were cast into pieces of type and arranged by hand into lines of text. This technology lasted hundreds of years and much of typesetting terminology dervives from it.
Linecasting was invented in 1889 as Linotype and expanded upon by Monotype. Individual letters were cast into entire lines as they were entered on a keyboard. The success of this technology put these two companies in the forefront of the typesetting industry and their type design libraries have been maintained through later technologies.
Photon and Intertype's Fotosetter introduced photocomposition to the typesetting industry in 1944. Individual letters were exposed on film to create lines of type. This became popular in the fifties and spurred the development of interesting new headline faces.
Digital type appeared in the 1973. It began as a hybrid of digitally controlled phototypesetting. Full digital systems followed, using CRTs and other technologies to expose film. The type formats are unique to each manufacturer's system. PostScript arrived in the mid-eighties, allowing for type which can be scaled, rotated, and manipulated in any fashion, and a format that was eventually made available to all type manufacturers.
Bitmap. Individual pixels representing letters are hand placed for pleasing optical results. Every different point size of a font requires its own bitmap rendering. This was the original technique for displaying fonts on computer screens and is still in use by Macintosh and X Windows systems.
PostScript Type 3. This scalable outline is rendered using Bezier curves for each character of a font. This outline determines the activation of pixels on a computer screen or print device. Type 3 fonts do not include hints, so results may be irregular. This format is not usually encrypted and offers all the functionality of PostScript.
PostScript Type 1. This scalable outline font format is similar to Type 3, except that it is encrypted into a binary format and includes hinting. Hinting allows for special instructions to help guide the display device's placement of pixels, which helps to control symmetry. Adobe kept this as their own proprietary format, but released the specification for it after Apple and Microsoft released TrueType.
TrueType. This scalable outline font format uses quadratic B-spline curves and resolution-programmable hinting. Apple developed this format in league with Microsoft in order to escae Adobe's licensing fees for Type 1 technology. Resolution-programmable hinting allows more precise control of bitmap rendering than the more generalized hinting in Type 1 fonts, but it also requires a greater amount of work to implement.