Contact Us


Initiative B@bel

WSI Guidelines


















Type Design


Design Tools



Font Downloads










Font FAQ



NRSI: Computers & Writing Systems


You are here: Rendering > Technologies > Graphite
Short URL: http://scripts.sil.org/GraphiteFAQ

Graphite: Frequently Asked Questions

Sharon Correll, 2003-04-30


The Graphite web site has been moved. Please  click here for the new site.

Click here to go to the Graphite home page.

What is Graphite?

Graphite is a package that can be used to create “smart fonts” capable of displaying writing systems with various complex behaviors, such as:

  • contextual shaping
  • ligatures
  • reordering
  • split glyphs
  • bidirectionality
  • stacking diacritics
  • complex positioning

Click here for examples of scripts with complex rendering.

The Graphite system consists of:

  • a rule-based programming language Graphite Description Language (GDL) that can be used to describe the behavior of a writing system
  • a compiler for that language
  • a rendering engine that can serve as the back end of a text processing application.

Graphite renders TrueType fonts that have been extended by means of compiling a GDL program.

Graphite System Architecture

What is a “smart font”?

A “smart font” is a font with accompanying data that contains instructions describing how the glyphs are to be selected and laid out on the screen or display device. This is in contrast to a “dumb font,” where there is a direct correspondence between the data characters and the displayed glyphs, and the glyphs are laid out simply in a straight line, side by side.

Typically the smart font data is in the form of tables inside the font file itself. Some sort of engine or driver software is required to read the tables from the font and use them appropriately in the rendering process.

In other words, a smart font can be thought of as a font with a small computer program built into it. The engine is the interpreter that runs the program.

Why was Graphite developed?

SIL International is a non-profit organization that performs linguistic research, literacy development, and translation work among ethnic minorities around the world. Our members are currently working with approximately a thousand language groups on six continents, and increasingly, many of the areas in which we work use scripts that require complex rendering.

Traditionally, much of our work has been with preliterate groups, or those that are literate only in a national or trade language. In cases where there is no written form for the target language, orthography development is a significant part of our field workers’ literacy promotion efforts. There are a variety of linguistic, sociological, cultural, and political factors that play into the orthography issue, and often it is necessary to adapt the script of the national language for use with minority languages.

The minority languages are usually quite distinct from the national language, much less closely related in a linguistic sense than what one might think of as a “dialect.” Therefore it is common to find linguistic phenomena in the minority language that are not present in the national language and which considerably complicate the issue of orthography development. For example, it may be the case that a minority language is tonal, while the national language is not, and the orthographic solution involves using the standard writing system with some extra diacritics to indicate tone. Or the minority language might have a set of sounds characterized by a certain linguistic feature, such as aspiration or breathiness, that are not present in the national language, and the desire is to add to the standard orthography a set of variant characters to represent these variant sounds.

So computer implementations of writing systems for many minority languages require processing that is not supported in implementations developed for the better-known languages. Some languages use scripts that have not been implemented at all, and must be represented entirely using the Unicode Private Use Area characters. Others require a handful of special characters with complex behaviors, or have special rules about how diacritics are positioned, or how existing characters combine.

To handle the needs of the wide variety of linguistic communities where SIL works, then, we need an extensible mechanism adequate to handle any orthographic phenomenon we might encounter in any writing system based on any modern script. The only other modern extensible smart font technology adequate to handle all the world’s writing systems is Apple's AAT, and the Macintosh is not appropriate for use in many of the communities in which SIL works. So Graphite was developed specifically to meet this need on Windows, the platform used by most of our field workers.

How is Graphite different from OpenType and other complex script technologies?

 OpenType is a widely accepted and powerful smart font technology developed jointly by Adobe and Microsoft. The fundamental difference between Graphite and OpenType is that OpenType was not developed as a full writing system implementation system. Rather the assumption is that script-specific knowledge--such as the fact that certain Devanagari vowels are written before the preceding consonant, or that certain Arabic letters have four distinct forms--is incorporated at the application level or in an operating system module such as Uniscribe. For this reason, OpenType does not include the capability to handle some complex behaviors such as Indic reordering.

 Uniscribe is a module for handling complex-scripts that is built into recent versions of the Windows operating system. It is a layer built on top of OpenType font techology, and contains knowledge of script behaviors of most scripts that are part of the Unicode standard. However, its behavior cannot be extended, as is often needed for minority language groups, and it provides no support for characters in Unicode’s Private Use Area ranges.

Apple has for years provided truly extensible smart font support for potentially all known writing systems, through their earlier GX and more recent  AAT technologies. However, their solutions are proprietary and available only on the Macintosh. Graphite has been implemented on Windows and is open-sourced. Graphite also includes a rule-based programming language (GDL) to facilitate font development, while AAT development requires more direct construction of the font tables.

 Pango is a open-source framework to handle internationalized text and complex scripts, developed on the Linux platform. Unlike Graphite, it is not a smart font technology, but rather a system in which script behaviors are coded directly in a high-level programming language. Currently work is underway to integrate Pango and Graphite in such a way that Pango wil call the Graphite engine if the font being used is Graphite-enabled.

On what platforms is Graphite available?

Graphite currently exists on the Windows platform (Windows 98 and later) and has been ported to Linux.

What applications support Graphite?

OpenOffice and XeTeX (e.g.,  XeTeX-DEV for W32, 0.997) that include Graphite support.

WorldPad is a basic text editor developed by SIL that can render text using Graphite. Click here to download WorldPad.

Graphite-enabled versions of  Firefox and Thunderbird are available for Windows and Linux. However, we do not really recommend the Windows version as they are quite out-of-date and have significant security concerns for Windows users.

SIL is developing a suite of linguistic and anthropological research tools called  FieldWorks. Graphite support is available in version 2.0 (and later) of these tools.

Can I use Graphite with Microsoft Word or another favorite commercial program?

Applications must be specifically written to take advantage of Graphite’s rendering API, so Graphite cannot be used directly within most commercial applications.

On the Linux system, Graphite is available via Pango. So any application that uses Pango or the GTK package will be able to render using Graphite.

How can I use Graphite in a text-processing application I have developed?

As mentioned above, applications must be specifically written to interact with Graphite’s API. Documentation of the Graphite API is available on the main Graphite page. There is also an application programmer's guide that should be helpful.

The source code is currently written in C++, with wrappers available in Perl and C.

The source code for the Graphite engine, and samples of related classes that you may use in your application, can be downloaded from our Subversion server: http://scripts.sil.org/svn/graphite.

Under what license is the Graphite engine released?

The source code for the Graphite engine is released under two open-source licenses:

  • the Common Public License, version 0.5 or later
  • the GNU Lesser General Public License, version 2.1 or later

This means you can redistribute and/or modify it under the terms of either license, whichever you choose.

What Graphite fonts exist?

A Roman/Cyrillic font with support for IPA and stacking diacritics is available as an official release. There are implementations of Burmese and Ethiopic, beta versions of fonts for Khmer and N'Ko, and some work has been done on Thai and Arabic . A font to display Neo-Sumerian Cuneiform is under development by Karljürgen Feuerherm. Also a few “toy” fonts are available to be used for testing or demonstrating Graphite.

Click here to download Graphite fonts. If the font you are interested in is not available on that page, send email to graphite_nrsi @ sil.org.

How do I make my own Graphite font?

The following is the process you go through to create a Graphite-enabled font:

  1. Download the Graphite compiler and the WorldPad application which will be used to test your font. The WorldPad package includes the Graphite rendering engine.
  2. Locate the font containing the glyphs for your writing system. You will need a font whose license allows you to modify it (see below). It may be helpful to make some initial modification to the font, although this is rarely absolutely necessary. Such modifications might include adding attachment points to the glyph curves, or assigning postscript names to the glyphs.
  3. Write a program using the Graphite Description Language (GDL), describing the smart behavior you want in your font.
  4. Compile the GDL program and the font together, using the Graphite compiler. The output is the Graphite-enabled version of the font.
  5. Test the font using WorldPad. You may also need to find or develop an appropriate keyboard to use to input your data (see below). Fix any bugs in your GDL program and recompile.

What kind of license do I need to make a Graphite font?

All the software to create and test a Graphite-enabled version of a font is freely available on this web site. However, to put the Graphite tables into the font, you will need to have a license permitting you to modify the font. To share your font with others, you will need a license permitting you to distribute the font.

How do I input data to be displayed with Graphite?

Graphite deals solely with output: rendering of data on the screen or display device. Some other process must handle getting the data into the computer in the first place.

Keyboards have a different role when used with smart font technology than with dumb fonts. In the days before the availability of smart fonts, keyboards were often very complex in order to generate a “presentation form encoding” that could be rendered easily with dumb font technology. When using a smart font, the keyboard can often be much more straightforward, since all that is necessary is to be able to type the basic repertoire of characters. In effect, much of the complexity is transferred from the keyboard to the font.

It is often possible to use a keyboard that is provided with the operating system to enter your characters; many such are available on Windows. In other situations it might be necessary to develop a smart keyboard that can process a user's keystrokes in complex ways to generate the correct sequence of characters. Tavultesoft’s  Keyman is a useful package for creation of custom keyboards on the Windows platform. See Keyboard Installation and Use for more discussion on keyboards for complex writing systems.

© 2003-2017 SIL International, all rights reserved, unless otherwise noted elsewhere on this page.
Provided by SIL's Non-Roman Script Initiative. Contact us here.