ref: 9fe338bfb45c06ed5818e47707f98114340211d8
dir: /docs/design/design-1.html/
<!doctype html public "-//w3c//dtd html 4.0 transitional//en" "http://www.w3.org/TR/REC-html40/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="Author" content="David Turner"> <title>The design of FreeType 2</title> </head> <body text="#000000" bgcolor="#FFFFFF" link="#0000EF" vlink="#51188E" alink="#FF0000"> <h1 align=center> The design of FreeType 2 </h1> <h3 align=center> Copyright 1998-2000 David Turner (<a href="mailto:[email protected]">[email protected]</a>)<br> Copyright 2000 The FreeType Development Team (<a href="mailto:[email protected]">[email protected]</a>) </h3> <center> <table width="65%"> <tr><td> <center> <table width="100%" border=0 cellpadding=5> <tr bgcolor="#CCFFCC" valign=center> <td align=center width="30%"> </td> <td align=center width="30%"> <a href="index.html">Contents</a> </td> <td align=center width="30%"> <a href="design-2.html">Next</a> </td> </tr> </table> </center> <p><hr></p> <table width="100%"> <tr bgcolor="#ccccee"><td> <h1> Introduction </h1> </td></tr> </table> <p>This document provides details on the design and implementation of the FreeType 2 library. Its goal is to allow developers to better understand the way how FreeType 2 is organized, in order to let them extend, customize, and debug it.</p> <p>Before anything else, it is important to understand the <em>purpose</em> of this library, i.e., why it has been written:</p> <ul> <li> <p>It allows client applications to <em>access font files easily</em>, wherever they could be stored, and as independently of the font format as possible.</p> </li> <li> <p>Easy <em>retrieval of global font data</em> most commonly found in normal font formats (i.e. global metrics, encoding/charmaps, etc.).</p> </li> <li> <p>It allows easy <em>retrieval of individual glyph data</em> (metrics, images, name, anything else).</p> </li> <li> <p><em>Access to font format-specific "features"</em> whenever possible (e.g. SFNT tables, Multiple Masters, OpenType Layout tables, etc.).</p> </li> </ul> <p>Its design has also severely been influenced by the following requirements:</p> <ul> <li> <p><em>High portability</em>. The library must be able to run on any kind of environment. This requirement introduces a few drastic choices that are part of FreeType 2's low-level system interface.</p> </li> <li> <p><em>Extendability</em>. New features should be added with the least modifications in the library's code base. This requirement induces an extremely simple design where nearly all operations are provided by modules.</p> </li> <li> <p><em>Customization</b>. It should be easy to build a version of the library that only contains the features needed by a specific project. This really is important when you need to integrate it in a font server for embedded graphics libraries.</p> </li> <li> <p><em>Compactness</em> and <em>efficiency</em>. The primary target for this library are embedded systems with low cpu and memory resources.</p> </li> </ul> <p>The rest of this document is divided in several sections. First, a few chapters will present the library's basic design as well as the objects/data managed internally by FreeType 2.</p> <p>A later section is then dedicated to library customization, relating such topics as system-specific interfaces, how to write your own module and how to tailor library initialization & compilation to your needs.</p> <p><hr></p> <center> <table width="100%" border=0 cellpadding=5> <tr bgcolor="#CCFFCC" valign=center> <td align=center width="30%"> </td> <td align=center width="30%"> <a href="index.html">Contents</a> </td> <td align=center width="30%"> <a href="design-3.html">Next</a> </td> </tr> </table> </center> </td></tr> </table> </center> </body> </html>