TrueType

[Someone have URLs for what TrueType is, etc.? Google suggests http://www.truetype.demon.co.uk/ as one possible site - appears to have a history and other information about the technology. Note that Microsoft no longer provides their set of TrueType web fonts for people to download.

RS: Name of a company (later bought by Microsoft) which produced scalable vector fonts of good quality for Macintosh, later also for Windows. TrueType fonts typically have the extension .ttf. The format is sort of portable so that TTF fonts from large Windows desktops also work well on PocketPCs. I like most the quick reaction: you can resize a font in a Tk widget e.g. with a scale and have it react in about real time.

KPV: Microsoft TrueType page is http://www.microsoft.com/typography/users.htm .


BR: TrueType fonts were made popular by their support in Microsoft Windows since 3.1 (?) and on Apple's MacOS.

Since the creation of the FreeType library TrueType fonts are supported by X11-based system in various forms. Currently the font server in XFree86 and its derivates can use TrueType files through this library. More sophisticated support on X11 is possible with the Xft library (there is a compile-time switch for Tk to use this, see Xft support).

TrueType fonts are not only scalable (as opposed to the bitmapped fonts that are still the basis of X11 text rendering) TrueType is also an extensible format, which means that vendors can add new data if they need that for more complicated scripts.

There are currently two major such extension systems on the market, OpenType [L1 ], [L2 ], by Adobe and Microsoft, and AAT [L3 ], by Apple (both the Microsoft and Apple sites also have the base specifications). Both extension systems define the format of information to add into fonts about ligatures, shaping and bidi. Both extensions can coexist in the same font file.

OpenType is supported by Microsoft Windows and on X11 by Pango (part of GTK), AAT is supported by MacOS X. It is planned to get better support for OpenType on Unix systems, see the "FreeType Layout" link [L4 ] on the FreeType site.

Curiously, while Adobe has co-authored OpenType, and PostScript does have basic TrueType support, PostScript does not seem to use the OpenType extensions yet automatically. Unless somebody can point me to some better information on that question?

Lars H: As I recall it, the main difference between TrueType and OpenType is that the latter adds support for CFF outlines, where the font is defined in terms of Postscript-style cubic Bezier curves, whereas the original TrueType outline format sfnt is based on the same type of quadratic splines that one gets from a canvas polygon item with -smooth true. There may certainly be other things that were added to the standard at the same time, but this is the big difference. Fonts with sfnt outlines generally carry a .ttf suffix, whereas fonts with CFF outlines generally carry an .otf suffix.

As for more advanced typographic information in the font and its relation to Postscript, I think these are meant to live on different levels. Remember that PS doesn't even have any built-in mechanism for kerning (beyond some variants of the show operator that allows you to give the string to print intermingled with metric adjustments). Presumably it is instead the responsibility of the program generating the PS to make use of more advanced typographic information, when there is any. (Presumably the program is furthermore expected to work through the OS when retrieving this information, rather than directly reading the font file. This could be a major show-stopper for cross-platform functionality.)

BR: Re: "main difference" - I guess the emphasis depends on one's needs. For me the typographical stuff is much more important, because it is required for a number of languages that don't work at all without this kind of information (e.g. Arabic, Hindi).

Re: PostScript - I was just wondering. With ASCII/Latin-1 there are a number of plain text formatting programs written in plain PostScript, it's a much used PostScript programming example. With other languages like Arabic this can not be handled in PostScript anymore without a lot of work (or at all). This especially gives Unix/X11 a disadvantage, because here applications speak plain PostScript for printing. And apps on Unix/X11 do not have a common abstraction available for screen and printers, where graphics drivers could handle this.


An alternative for scalable fonts, but less widely used on displays, are Postscript fonts.


LV 2009-Jan-21 Tk 8.5 began offering some degree of support for FreeType/fontconfig/xft as a portable font engine that provides support for a variety of fonts, including TrueType and OpenType.