freetype2/docs/design/design-1.html

103 lines
3.2 KiB
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 - Introduction</title>
</head>
<body text="#000000"
bgcolor="#ffffff">
<h1 align=center>
The Design of FreeType&nbsp;2
</h1>
<center>
<table width="75%">
<tr><td>
<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&nbsp;2 library. Its goal is to allow developers to better
understand the way how FreeType&nbsp;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&nbsp;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&nbsp;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>
</td></tr>
</table>
</center>
</body>
</html>