| 1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
| 2 |
"http://www.w3.org/TR/html4/loose.dtd"> |
| 3 |
|
| 4 |
<html lang="en"> |
| 5 |
|
| 6 |
<head> |
| 7 |
<meta http-equiv="Content-Type" |
| 8 |
content="text/html; charset=utf-8"> |
| 9 |
<meta http-equiv="Content-Style-Type" |
| 10 |
content="text/css"> |
| 11 |
<meta http-equiv="Content-Script-Type" |
| 12 |
content="text/javascript"> |
| 13 |
<meta name="description" |
| 14 |
content="FreeType Documentation - Design - Introduction"> |
| 15 |
<meta name="Author" |
| 16 |
content="David Turner"> |
| 17 |
|
| 18 |
<link rel="icon" |
| 19 |
href="../image/favicon_-90.ico"> |
| 20 |
<link rel="shortcut icon" |
| 21 |
href="../image/favicon_-90.ico"> |
| 22 |
<link rel="stylesheet" |
| 23 |
type="text/css" |
| 24 |
href="../css/freetype2_-90.css"> |
| 25 |
|
| 26 |
<script type="text/javascript" |
| 27 |
src="../../../js/freetype2.js"> |
| 28 |
</script> |
| 29 |
|
| 30 |
<title>FreeType Design | Introduction</title> |
| 31 |
</head> |
| 32 |
|
| 33 |
|
| 34 |
<body> |
| 35 |
|
| 36 |
<div id="top" |
| 37 |
class="bar"> |
| 38 |
<h1><a href="http://freetype.org/index.html">FreeType</a> Design</h1> |
| 39 |
</div> |
| 40 |
|
| 41 |
|
| 42 |
<div id="wrapper"> |
| 43 |
|
| 44 |
<div class="colmask leftmenu"> |
| 45 |
<div class="colright"> |
| 46 |
<div class="col1wrap"> |
| 47 |
<div class="col1"> |
| 48 |
|
| 49 |
|
| 50 |
<!-- ************************************************** --> |
| 51 |
|
| 52 |
<div id="introduction"> |
| 53 |
<h2>Introduction</h2> |
| 54 |
|
| 55 |
<p>This document provides details on the design and |
| 56 |
implementation of the FreeType 2 library. Its goal |
| 57 |
is to help developers better understand how |
| 58 |
FreeType 2 is organized, in order to let them extend, |
| 59 |
customize, and debug it.</p> |
| 60 |
|
| 61 |
<p>Before anything else, it is important to understand the |
| 62 |
<em>purpose</em> of this library, i.e., why it has been |
| 63 |
written.</p> |
| 64 |
|
| 65 |
<ul> |
| 66 |
<li> |
| 67 |
<p>It allows client applications to <em>access font |
| 68 |
files easily</em>, wherever they could be stored, and |
| 69 |
as independently of the font format as possible.</p> |
| 70 |
</li> |
| 71 |
<li> |
| 72 |
<p>Easy <em>retrieval of global font data</em> most |
| 73 |
commonly found in normal font formats (i.e., global |
| 74 |
metrics, encoding/charmaps, etc.).</p> |
| 75 |
</li> |
| 76 |
<li> |
| 77 |
<p>It allows easy <em>retrieval of individual glyph |
| 78 |
data</em> (metrics, images, name, anything else).</p> |
| 79 |
</li> |
| 80 |
<li> |
| 81 |
<p><em>Access to font format-specific |
| 82 |
‘features’</em> whenever possible (e.g., |
| 83 |
SFNT tables, Multiple Masters, OpenType layout tables, |
| 84 |
font variations, etc.).</p> |
| 85 |
</li> |
| 86 |
</ul> |
| 87 |
|
| 88 |
<p>Its design has also severely been influenced by the |
| 89 |
following requirements.</p> |
| 90 |
|
| 91 |
<ul> |
| 92 |
<li> |
| 93 |
<p><em>High portability</em>. The library must be able |
| 94 |
to run on any kind of environment. This requirement |
| 95 |
introduces a few drastic choices that are part of |
| 96 |
FreeType 2's low-level system interface.</p> |
| 97 |
</li> |
| 98 |
<li> |
| 99 |
<p><em>Extendability</em>. New features should be added |
| 100 |
with the least modifications in the library's code |
| 101 |
base. This requirement induces an extremely simple |
| 102 |
design where nearly all operations are provided by |
| 103 |
modules or services.</p> |
| 104 |
</li> |
| 105 |
<li> |
| 106 |
<p><em>Customization</em>. It should be easy to build a |
| 107 |
version of the library that only contains the features |
| 108 |
needed by a specific project. This really is |
| 109 |
important when you need to integrate it into a font |
| 110 |
server for embedded graphics libraries, say.</p> |
| 111 |
</li> |
| 112 |
<li> |
| 113 |
<p><em>Compactness</em> and <em>efficiency</em>. The |
| 114 |
primary target for this library originally were |
| 115 |
embedded systems with low CPU and memory resources. |
| 116 |
Today, however, memory constraints are much less |
| 117 |
strict, and the focus of development shifted to |
| 118 |
support as much font features as possible.</p> |
| 119 |
</li> |
| 120 |
</ul> |
| 121 |
|
| 122 |
<p>The rest of this document is divided in several sections. |
| 123 |
First, a few chapters will present the library's basic |
| 124 |
design as well as the objects and data managed internally |
| 125 |
by FreeType 2.</p> |
| 126 |
|
| 127 |
<p>It is intended to eventually add sections that cover |
| 128 |
library customization, relating to topics as |
| 129 |
system-specific interfaces, how to write your own modules |
| 130 |
or services and how to tailor library initialization and |
| 131 |
compilation to your needs. Those sections are not written |
| 132 |
yet, however.</p> |
| 133 |
</div> |
| 134 |
|
| 135 |
<!-- ************************************************** --> |
| 136 |
|
| 137 |
<div class="updated"> |
| 138 |
<p>Last update: 13-Feb-2018</p> |
| 139 |
</div> |
| 140 |
</div> |
| 141 |
</div> |
| 142 |
|
| 143 |
|
| 144 |
<!-- ************************************************** --> |
| 145 |
|
| 146 |
<div class="col2"> |
| 147 |
</div> |
| 148 |
</div> |
| 149 |
</div> |
| 150 |
|
| 151 |
|
| 152 |
<!-- ************************************************** --> |
| 153 |
|
| 154 |
<div id="TOC"> |
| 155 |
<ul> |
| 156 |
<li class="funding"> |
| 157 |
<form action="https://www.paypal.com/cgi-bin/webscr" |
| 158 |
method="post" |
| 159 |
target="_top"> |
| 160 |
<input type="hidden" |
| 161 |
name="cmd" |
| 162 |
value="_s-xclick"> |
| 163 |
<input type="hidden" |
| 164 |
name="hosted_button_id" |
| 165 |
value="SK827YKEALMT4"> |
| •166 |
<input type="submit" |
| 167 |
value="Donate" |
| 168 |
name="submit" |
| 169 |
alt="PayPal - The safer, easier way to pay online!"> |
| 170 |
</form> |
| 171 |
</li> |
| 172 |
<li class="primary"> |
| 173 |
<a href="http://freetype.org/index.html">Home</a> |
| 174 |
</li> |
| 175 |
<li class="primary"> |
| 176 |
<a href="http://freetype.org/index.html#news">News</a> |
| 177 |
</li> |
| 178 |
<li class="primary"> |
| 179 |
<a href="../index.html">Overview</a> |
| 180 |
</li> |
| 181 |
<li class="primary"> |
| 182 |
<a href="../documentation.html">Documentation</a> |
| 183 |
</li> |
| 184 |
<li class="primary"> |
| 185 |
<a href="http://freetype.org/developer.html">Development</a> |
| 186 |
</li> |
| 187 |
<li class="primary"> |
| 188 |
<a href="http://freetype.org/contact.html" |
| 189 |
class="emphasis">Contact</a> |
| 190 |
</li> |
| 191 |
|
| 192 |
<li> |
| 193 |
<!-- separate primary from secondary entries --> |
| 194 |
</li> |
| 195 |
|
| 196 |
<li class="secondary"> |
| 197 |
<a href="index.html">FreeType Design</a> |
| 198 |
</li> |
| 199 |
<li class="tertiary"> |
| 200 |
<a href="design-1.html" class="current">Introduction</a> |
| 201 |
</li> |
| 202 |
<li class="tertiary"> |
| 203 |
<a href="design-2.html">Components and APIs</a> |
| 204 |
</li> |
| 205 |
<li class="tertiary"> |
| 206 |
<a href="design-3.html">Public Objects and Classes</a> |
| 207 |
</li> |
| 208 |
<li class="tertiary"> |
| 209 |
<a href="design-4.html">Internal Objects and Classes</a> |
| 210 |
</li> |
| 211 |
<li class="tertiary"> |
| 212 |
<a href="design-5.html">Module Classes</a> |
| 213 |
</li> |
| 214 |
<li class="tertiary"> |
| 215 |
<a href="design-6.html">Interfaces and Services</a> |
| 216 |
</li> |
| 217 |
</ul> |
| 218 |
</div> |
| 219 |
|
| 220 |
</div> <!-- id="wrapper" --> |
| 221 |
|
| 222 |
<div id="TOC-bottom"> |
| 223 |
</div> |
| 224 |
|
| 225 |
</body> |
| 226 |
</html> |