shithub: freetype+ttf2subf

ref: 205fc3faf29159a86c4f838edc587952afbb74aa
dir: /docs/design/design-1.html/

View raw version
<html>
<head><title>The Design of FreeType 2 - Introduction</title>
<basefont face="Georgia, Arial, Helvetica, Geneva">
<style content="text/css">
  P { text-align=justify }
  H1 { text-align=center }
  H2 { text-align=center }
  LI { text-align=justify }
</style>
</head>
<body text=#000000 bgcolor=#ffffff>

<center><table width="500"><tr><td>

<center><h1>The Design of FreeType 2</h1></center>

<table width="100%" cellpadding=5><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 FT2 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>first of all, to allow client applications to <em>access font files
         easily</em>, wherever they could be stored, and as independently
         of font format as possible.</p></li>

  <li><p>to allow 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>to allow easy <em>retrieval of individual glyph data</em>
         (metrics, images, name, anything else)</p></li>

  <li><p>to allow <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><b>high portability</b>, as 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><b>extendibility</b>, as new features should be added with
      the least modifications in the library's code base. this
      requirements induces an extremely simple design where nearly
      all operations are provided by modules.
      </p></li>

  <li><p><b>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><b>compactness</b> and <b>efficiency</b>, given that the
      primary target for this library is 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 initialisation & compilation
   to your needs.</p>

</td></tr></table></center>
</body>
</html>