Graphite: Smart font technology comes to FOSS

558

Author: Bruce Byfield

Smart font technology, which automatically inserts advanced typographical features in the right context, has existed for a decade, but it is still only partly implemented in most operating systems and programs. Now, a project called Graphite is not only introducing smart font technology to GNU/Linux, but offering it in a form more advanced than any previous implementations. For typographically straightforward languages like English, Graphite delivers a higher level of sophistication in document design without any effort by the user. However, for non-European languages, Graphite’s smart font technology is even more important, because it simplifies their use on computers.

The best-known examples of smart font technologies are the proprietary OpenType, developed by Microsoft and Adobe, and Advanced Apple Technology. Recently, they have been joined by SIL International’s Graphite. Graphite is available for Windows and GNU/Linux, and dual-licensed under the GNU General Public License (GPL) and Lesser General Public License (LGPL). Although Graphite started behind other implementations of smart font technology, it just may make GNU/Linux the first operating system to offer full internationalization.

When used with compatible fonts, smart font technology has several advantages. In English, its main advantage is to give document design greater polish by automatically replacing combinations such as “ff” or “fi” in which the letters are close together with ligatures — letterforms in which the separate letters are transformed into a separate unit. The technology does the same thing for other languages, but, especially with non-European ones or ones that use non-Latin alphabets, the need is often far more pressing than in English. For instance, smart font technology controls such elements as:

  • Stacked diacritical marks: The placing of more than one accent mark above a letter.
  • Context shaping: The changing of a letter’s shape depending on its position in a word or on the characters around it.
  • Reordering and splitting: The changing of vowels’ positioning and shapes depending on the consonants around them. This element is especially common in Indian languages such as Bengali.
  • Bidirectionality: The inclusion of different directions for writing. In Arabic, for example, letters are written from right to left, but numerals are written from left to right.
  • In addition, smart font technology also makes the inclusion of different languages in the same line or paragraph easier.

Without smart font technology, such elements must be added manually by the user. Often, the only way to input them is by making selections from a character map, or by assigning them to keyboard shortcuts. Such alternatives slow and complicate using many languages on the computer. For many users, they mean that using the Internet or conducting business and education on a computer in their own languages is difficult or even impossible. For this reason, support for smart font technologies becomes an issue of computer access, and even of survival for non-European languages.

The origins of Graphite

According to project leader Sharon Correll, Graphite began in the mid-1990s as a means of supporting SIL’s work. “The project moved a little slowly at first,” Correll remembers, “because the team kept hoping that a standard operating system-based solution would present itself.” At that time, the only operating system that came close to offering the extensible support that SIL needed for working with minority languages was the Macintosh OS, and that support was not being used by many programs. Nor were Macintoshes widely available in some of the non-industrialized regions where SIL works.

Similarly, Uniscribe, Windows’ implementation of OpenType, was neither extensible nor capable of all the behaviors SIL needed. Unable to find any other alternative, SIL began developing a tool for Windows under the name WinRend in 1998, changing the name to Graphite in 2000.

In the first years of the millennium, SIL became aware of GNU/Linux. “We began to perceive a match between the open source model and Graphite’s target audience,” Correll says, “especially minority language groups without enough economic clout to motivate support from major software developers, and those whose writing systems have not been incorporated into standards such as Unicode.” Accordingly, SIL ported Graphite to GNU/Linux, and has recently begun to use free licenses, with the exception of some of the sample Graphite-enabled fonts available on the project’s home page.

Most of the work on Graphite is done by a small group of developers, many of them SIL members. Besides Correll, the main maintainer, the project includes Martin Hosken, a member of SIL working in Southeast Asia who defined many of the conceptual ideas behind Graphite; Daniel Glassey, the project lead in developing the GNU/Linux support and making Graphite compatible with Pango; and Tim Eves, who added Graphite support into the SIL OpenOffice.org project. Non-SIL contributors include Frank Tang, the former Internationalization Lead at Netscape, who first added Graphite support to Mozilla, and Keith Stribley, who is continuing the work Tang began by incorporating Graphite into Firefox and Thunderbird, and assisted with SIL OpenOffice.org.

Graphite has advantages over other smart font technologies. Graphite is extensible, it works at the font level rather than the program level, and it is available as free software. For SIL International (SIL), the non-government organization behind Graphite, these features make the technology especially useful for linguistic studies and literacy programs worldwide.

Graphite is only one of SIL’s series of overlapping free software projects. SIL has produced the SIL Open Font License, Keyboard Mapping for Linux, and smart font-enabled, Unicode-supporting TrueType fonts such as Charis SIL and Doulos SIL.

Using Graphite

Graphite consists of three parts. The Graphite Description Language describes the behavior needed for a writing system, such as whether it uses ligatures or bidirectional text. This Graphite compiler uses Graphite Description Language to add rendering tables to a font’s TrueType file; needless to say, you must either have permission to alter the font or use a free font to be able to produce a Graphite-enabled font legally. Finally, Graphite includes a rendering engine that must be added to an application or operating system in order to use Graphite. You can follow the development of these tools on the project’s SourceForge site.

To test Graphite, you need to have at least one Graphite-enabled font installed for your system or for an application. The projects’ Web pages include a number of sample fonts for different languages. For English-speakers, the best choices are probably SIL’s own Charis SIL and Doulos SIL.

Only a handful of Graphite-enabled programs exist. WorldPad is a Windows text editor intended to be used mainly for testing the compilation of fonts. SILA, a project for adding Graphite to Windows and GNU/Linux Mozilla applications, is in beta, and Fieldworks, SIL’s suite of linguistic and anthropological research tools for Windows, is in the alpha stage of development.

For English-speakers, the best tool for seeing Graphite in action is SIL OpenOffice.org, which includes Graphite as part of the program. Available for GNU/Linux and Windows, SIL OpenOffice.org can be installed without overwriting other versions of OpenOffice.org on the system. However, be aware that the program only detects one Graphite-enabled font installed under the system font server. To install more than one Graphite-enabled font, you have to add all of them to the .sil.openoffice.org2/user/fonts folder in your home directory, which is created after you have used SIL OpenOffice.org for the first time.

Future plans for Graphite

The Graphite project is only now starting to move beyond the initial development work. “The package itself is fairly complete as far as features and capabilities,” says Sharon Correll, Graphite’s project leader. “The main outstanding behavior is advanced paragraph justification capabilities that are needed for high-end typesetting.” The project is also discussing the possibility of adding support for Signwriting, a system for writing signed languages developed by Valerie Sutton. Yet, increasingly, the project is concentrating on ways of spreading the use of Graphite.

One of the key goals for encouraging the use of Graphite is to improve the availability of fonts that support it. Although SIL’s own first Graphite-enabled fonts focus mostly on Latin and Cyrillic characters, Correll would like to see more focus on fonts for other writing systems. “There is a more pressing need for Graphite support for some scripts than others,” she says, “depending on the level of standard support and the complexity of special needs. Given our limited resources, Graphite support may not be included in some fonts if the need is not urgent.”

The project is concentrating on lobbying existing proprietary applications, freeware, and free software to include Graphite in their next releases. The project is also developing a plugin for Adobe’s InDesign and an ActiveX control for Windows. On GNU/Linux, Graphite is working with Pango, the GTK library for international text rendering, and XeTeX, a freeware combination of TeX and OS X font-rendering capabilities that was recently ported to GNU/Linux by Jonathan Kew. Since Graphite is available under the LGPL, it can be integrated easily in a variety of applications without concern about how the projects themselves are licensed.

In the long term, Correll notes, instead of lobbying to have Graphite included in for individual applications, “A more strategic approach is to get Graphite integrated at the operating system level.” The project hopes to have the Graphite-enabled version of Pango included in an upcoming version of Ubuntu. The project narrowly missed having its work included in the Dapper Drake release, scheduled for release this spring, but hopes to see it in the next Ubuntu release in fall 2006.

Ultimately, Correll says, “Our goal is for Graphite — or something like Graphite — to be ubiquitous on any system that is intended to be truly multilingual and multinational.” This goal, she suggests, is unlikely to be realized on Windows, due to Microsoft’s “policy of tightly controlling system components to ensure security and stability.” Instead, the first operating system to provide full support for the users of all languages seems likely to be some variant of GNU/Linux.

Multilingual accessibility may not be part of the the letter of the Free Software Foundation’s four freedoms. All the same, it’s a cause that fits very well with their spirit.

Bruce Byfield is a course designer and instructor, and a computer journalist who writes regularly for NewsForge, Linux.com and IT Manager’s Journal.