TrueType

TrueType is an outline font standard originally developed by Apple Computer in the late 1980s as a competitor to Adobe's Type 1 fonts used in PostScript. The primary strength of TrueType was originally that it offered font developers a high degree of control over precisely how their fonts are displayed, right down to particular pixels, at various font heights. (With widely varying rendering technologies in use today, pixel-level control is no longer certain.)

Apple
On the Macintosh, fonts were originally stored in hand-tuned bitmap font files that specified individual pixel locations for a font at a particular size. If the user wanted to see a font at another size, the Font Manager found the closest match and applied a basic scaling algorithm. When scaled to large sizes the effect was comical—since these fonts were bitmapped, they would scale the same way any raster graphics image does, becoming blocky.

In contrast, printer fonts for the popular Apple LaserWriter were based on PostScript Type 1 outlines, resulting in excellent output at any size. Outline fonts have a set of equations for drawing lines and curves to create a shape for each character (a "glyph"). By following the equations, the computer draws an "outline" shape at a specific size, and then "fills" it with ink (e.g., black) to create the character. The equations scale to any size, and are independent of the resolution of the screen or printer. It produces the same quality whether it's printing to film, drawing on a screen, or printing a billboard. This technology was the key invention that the founders of Adobe engineered and marketed as PostScript. Making matters difficult was the fact that Type 1 fonts were encrypted, and Adobe made a considerable amount of their income from licensing the format to interested parties. They were not about to simply allow Apple to include the software for free.

Instead Sampo Kaasila at Apple decided to write an entirely new format, which he worked on under the name Bass (because it was a scalable font format, and you can scale a fish, and perhaps as in Bass-o-matic from the Saturday Night Live sketch) and later Royal. The system developed and was eventually released as TrueType with the launch of Mac OS System 7 in May 1991. The fonts, four-weight families of Times Roman, Helvetica, Courier, and a handful of others, replaced the older bitmap fonts that previous Macintosh System versions had used. For compatibility with older systems, Apple also shipped a TrueType Extension and a TrueType aware version of Font/DA Mover for System Software 6.

One huge drawback of the TrueType system is that it could not use Type 1 fonts on-screen—not surprising given its genesis. However this meant that the system was in fact not used by the very people it was intended to help, desktop publishing software users. They had already invested considerable money in commercial Type 1 fonts, which they were not interested in replacing, and therefore had to continue using Adobe Type Manager (see below). Adding to the problem was that there were very few fonts available in TrueType format, so even if one wanted to start fresh there was no real way to do so.

As part of Apple's new tactic of distancing itself from Adobe, Apple licensed TrueType to Microsoft, in exchange for a license for TrueImage, a Microsoft-developed PostScript-compatible printer control language that Apple planned to use in their laser printers. This printer language was never actually included in any Apple products.

Part of Adobe's response to learning that TrueType was being developed was to pre-emptively create the Adobe Type Manager software to scale Type 1 fonts on-screen and for output to any printer, much like TrueType fonts. Although ATM initially cost money, rather than coming free with the operating system, it became a de facto standard for anyone involved in desktop publishing.

When TrueType was announced, John Warnock of Adobe gave an impassioned speech in which he claimed Apple and Microsoft were selling snake oil, and then instantly released the Type 1 format as a published standard for anyone to use. This put even more pressure on TrueType. Apple eventually renewed agreements with Adobe for the use of PostScript in its printers; it is speculated that Apple's tactics resulted in lower royalty payments to Adobe as part of its new licensing agreements.

Apple extended TrueType with the launch of TrueType GX in 1994, a smartfont technology that was part of QuickDraw GX. This offered powerful extensions in two main areas. First was font axes (morphing), for example allowing fonts to be smoothly adjusted from light to bold or from narrow to extended—competition for Adobe's "multiple master" technology. Second was substitution, where particular sequences of characters can be coded to flip to different designs in certain circumstances, useful for example to offer ligatures for "fi", "ffi", "ct", etc. while maintaining the backing store of characters necessary for spell-checkers and text searching. However, the lack of user-friendly tools for making TrueType GX fonts meant there were no more than a handful of GX fonts. Much of the technology in TrueType GX, including morphing and substitution, lives on as AAT (Apple Advanced Typography) in Mac OS X. Few font developers outside Apple attempt to make AAT fonts; instead, OpenType has become the dominant "smart font" technology, despite its lack of support for axes or multiple masters.

Microsoft
By 1991 Microsoft added TrueType into the Windows 3.1 operating system. In partnership with their contractors, Monotype Corporation, Microsoft spent much effort creating a set of high quality TrueType fonts that were compatible with the core fonts being bundled with PostScript equipment at the time. This included the fonts that are standard with Windows to this day: Times New Roman (compatible with Times Roman), Arial (compatible with Helvetica) and Courier New (compatible with Courier). One should understand "compatible" to mean two things: first, that the fonts are similar to look at, and second, very importantly, the fonts have the same character widths so can be used to typeset the same documents without reflowing the text. (The disjunction of the names, particularly between Arial and Helvetica, led some to believe there was a general problem of having to determine an "equivalent" Apple or PostScript font whenever a particular Windows font was called for, or vice versa. However, while the character outlines themselves are different, the styles and weights have been made similar enough that the average user is unable to tell the fonts apart.)

Microsoft and Monotype technicians used TrueType's hinting technology to ensure that these fonts did not suffer from the problem of illegibility at low resolutions which had previously forced the use of bitmapped fonts for screen display. Subsequent advances in technology have introduced first anti-aliasing, which smoothes the edges of fonts at the expense of a slight blurring, and more recently subpixel rendering (the Microsoft implementation goes by the name ClearType), which exploits the pixel structure of TFT LCD based displays to increase the apparent resolution of text. Microsoft has marketed these technologies particularly heavily, and they are now widely used on all platforms.

Microsoft also developed a "smart font" technology, named TrueType Open in 1994, later renamed to OpenType when it merged support of the Adobe Type 1 technology.

TrueType Collections (TTC) allow combining multiple fonts into a single file, creating substantial space savings for collection of fonts that only use different glyphs on some characters. They were first available in Chinese, Japanese, and Korean versions of Windows, and supported for all regions in Windows 2000 and later.

Macintosh and Windows
TrueType has long been the most common format for fonts on Mac OS and Windows, although both also include native support for Adobe's Type 1 format and the OpenType extension to TrueType (since Mac OS X 10.0 and Windows 2000). While some fonts provided with the new operating systems are now in the OpenType format, most free or inexpensive third-party fonts use plain TrueType.

Increasingly, new approaches to screen rendering have reduced the importance of extensive TrueType hinting. Apple's rendering approach on Mac OS X ignores almost all the hints in a TrueType font, while Microsoft's ClearType ignores many hints, and works best with "lightly hinted" fonts.

Linux and other platforms
The FreeType project of David Turner attempts to create an independent implementation of the TrueType standard (as well as other font standards in Freetype 2). FreeType is included in many Linux distributions.

There are potential patent infringements in FreeType because parts of the TrueType hinting virtual machine were patented by Apple, a fact not mentioned in the TrueType standards. (Patent holders who contribute to standards not published by a major standards body such as ISO are not required to disclose the scope of their patents.) FreeType 2 includes an automatic hinter that analyzes glyph shapes and attempts to generate hints automatically, thus avoiding the patented technology. The automatic hinter generally improves the appearance of free or cheap fonts, for which hinting is often either nonexistent or automatically generated anyway, but it can degrade the appearance of professional hand-hinted fonts, and does not work well (or at all) for non-Western text that requires a different approach to hinting. As a result, many people prefer to enable the patented hinting technology.

Outlines
The outlines of the characters (or glyphs) in TrueType fonts are made of straight line segments and quadratic Bézier curves. These mathematically simpler curves are slightly more efficient to process than the cubic Bézier curves prevalent in the PostScript-centered world of graphic design, and also used in Type 1 fonts. However, most shapes require more points to describe with quadratic curves than cubics. This difference also means that it is not possible to convert Type 1 losslessly to the TrueType format, although in practice it is often possible to do a lossless conversion from TrueType to Type 1.

Hinting language
TrueType systems include a virtual machine that executes programs inside the font, processing the "hints" of the glyphs. These distort the control points which define the outline, with the intention that the rasterizer produces fewer undesirable features on the glyph. Each glyph's hinting program takes account of the size (in pixels) at which the glyph is to be displayed, as well as other less important factors of the display environment.

Although incapable of receiving input and producing output as normally understood in programming, the TrueType hinting language does offer the other prerequisites of programming languages: conditional branching (IF statements), looping an arbitrary number of times (FOR- and WHILE-type statements), variables (although these are simply numbered slots in an area of memory reserved by the font), and encapsulation of code into functions. Special instructions called delta hints are the lowest level control, moving a control point at just one pixel size.

Good TrueType glyph programming techniques are meant to do as much as possible using variables defined just once in the whole font (e.g., stem widths, cap height, x-height). This means avoiding delta instructions as much as possible. This helps the font developer to make major changes (e.g., the point at which the entire font's main stems jump from 1 to 2 pixels wide) most of the way through development.

Making a very well-hinted TrueType font remains a significant amount of work, despite the increased user-friendliness of programs for adding hints to fonts compared with the early 1990s. Many TrueType fonts therefore have only rudimentary hints, or have hinting automatically applied by the font editor, with variable end results.

Limitations
A TrueType font can contain no more than 64K (65,536) glyphs.