| Current Path : /home/emeraadmin/public_html/4d695/ |
| Current File : /home/emeraadmin/public_html/4d695/freetype-devel.tar |
design/basic-design.png 0000644 00000003650 15170676640 0011073 0 ustar 00 �PNG
IHDR � 9 |z� PLTE��� �� � � ��� 5IDATx��kr�:��w��d�;H��[�����I6�z�J�L}z"4�DX,��b�X,�eB���(HS���0�)La
S���0�)La
S����Ђ2�k�^H!C����}�GS���y>�@ B���Z���1f�cQ(�N�@�=�A��`�q�]S�lW��!�P �@�j]����S���RtO�w��-M�W
�"բPʶiQlzE�*��f��!(PF$)B��a���Bu���a��,�"��b�8�;sS���0�)La
S���0�)La
S|�G�E�0>ALa
S���0�)La
S����_��������)�R`"e��B�)�b�
߫)$�}H�E�t��z��KUC"��PMOq�^SwV,&ё�C{S�b���~�w�^�\G2�goN],�G�@nP�R���ԩޱ���E
E�m]D23.�v�� �[
6y�!��cS��*�L�E1��t "D(��t�1�m�B_xgV�*�����k���S����z0q��z/S����;��vma]��tp��L\k�\���.��ԃ�kYUqv�Ri4�`��Q)�T�18��vX
�.q��Q)�O
���o��tQ�/��l�@ݕ?����K���(�ӯX˛��c��+�WW(�؞b�e��躟J��R��Xf�I���)ϟrSb�;q����2E~n��ũ(�%az9�y��a���Y�#�La
S�b0�{�|8��#&��(�@�V�q�g�SP$�K�+Z�)ғ���',�(�%YK�YoE��?d�G�x�I�E��2��V�f�Q7ܐ"-3��ߊۈ�ܟ��hW+)�
*�^��,�A�R(�T���w~�oŭZ��n��"";r����Q̎0�[w�n*�@��>Y�
E]�������}�q����h���/�BjP3u�e�k)~���S���$�K�fūY=K��b�Yo��^�ޣ�z�0�)La
S��8�����(�~����A������sP�vt?����q��u?���u��S�F��M�o�W�i��Ԁ���
��e�}h�}���\�����)�B��[R�dZ0�Y(p�t���m
S���X!#G$�x_����زc���a��܀�[�SST�j�&C=ؗ\����]�v�� 7?��B�c�]��x?ů2P��ON���F�g�@|E���0�)La
S���8
���3�L���b���}}],چ�<Pِb��3�HN<�T��XQ��@D �%�|"�*OR�)��4ɭ[(�l�Ȝʳ��q&��k�Ȭ�6��q.���P2��iYVلb�30��,�iT���[1�H�/�]"��rYe�Q1.e��h�/MU���+�q.�p]\O
,^s��Μ�&�Ÿ��C�G�(F�Ӛ��0�)La
S���0�)La��(�m����ݦ�+(��E��b�X,��b�X�+�@�p2!�W�W����6��|��Yh��� z<�}h��xD�Q���e��g�e��s��1���3�a����W,"X�7'K�`)*�f
�)X��+-�酒z�&P�V~���R4q�sp3�O�
g
��t�~��+GL�)ZX3�\ܥ.r�?������K9�^
���(�f�ؼ!&���5b![�>N{
<��Ȇ�!�l���)��z�9�}��~�Eil)���1
���5'�����a��&�lZX�P�w�r����"��;HL�#�(U>`
I��i�bVd꼁�E����~�%}��r��O����zGOl>��M�S�-
orX,��b�X,�S��ٱ˯�� tEXtAuthor David Turner�� IEND�B`� design/design-1.html 0000644 00000016570 15170676640 0010337 0 ustar 00 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type"
content="text/css">
<meta http-equiv="Content-Script-Type"
content="text/javascript">
<meta name="description"
content="FreeType Documentation">
<meta name="Author"
content="David Turner">
<link rel="icon"
href="../image/favicon_-90.ico">
<link rel="shortcut icon"
href="../image/favicon_-90.ico">
<link rel="stylesheet"
type="text/css"
href="../css/freetype2_-90.css">
<script type="text/javascript"
src="../../../js/jquery-1.11.0.min.js">
</script>
<script type="text/javascript"
src="../../../js/jquery.ba-resize.min.js">
</script>
<script type="text/javascript"
src="../../../js/freetype2.js">
</script>
<title>FreeType Design</title>
</head>
<body>
<div id="top"
class="bar">
<h1><a href="http://freetype.org/index.html">FreeType</a> Design</h1>
</div>
<div id="wrapper">
<div class="colmask leftmenu">
<div class="colright">
<div class="col1wrap">
<div class="col1">
<!-- ************************************************** -->
<div id="introduction">
<h2>Introduction</h2>
<p>This document provides details on the design and
implementation of the FreeType 2 library. Its goal
is to help developers better understand 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,
font variations, 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 or services.</p>
</li>
<li>
<p><em>Customization</em>. 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 into a font
server for embedded graphics libraries, say.</p>
</li>
<li>
<p><em>Compactness</em> and <em>efficiency</em>. The
primary target for this library originally were
embedded systems with low CPU and memory resources.
Today, however, memory constraints are much less
strict, and the focus of development shifted to
support as much font features as possible.</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 and data managed internally
by FreeType 2.</p>
<p>It is intended to eventually add sections that cover
library customization, relating to topics as
system-specific interfaces, how to write your own modules
or services and how to tailor library initialization and
compilation to your needs. Those sections are not written
yet, however.</p>
</div>
<!-- ************************************************** -->
<div class="updated">
<p>Last update: 13-Feb-2018</p>
</div>
</div>
</div>
<!-- ************************************************** -->
<div class="col2">
</div>
</div>
</div>
<!-- ************************************************** -->
<div id="TOC">
<ul>
<li class="funding">
<form action="https://www.paypal.com/cgi-bin/webscr"
method="post"
target="_top">
<input type="hidden"
name="cmd"
value="_s-xclick">
<input type="hidden"
name="hosted_button_id"
value="SK827YKEALMT4">
<input type="image"
src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif"
name="submit"
alt="PayPal - The safer, easier way to pay online!">
<img alt=""
border="0"
src="https://www.paypalobjects.com/de_DE/i/scr/pixel.gif"
width="1"
height="1">
</form>
</li>
<li class="primary">
<a href="http://freetype.org/index.html">Home</a>
</li>
<li class="primary">
<a href="http://freetype.org/index.html#news">News</a>
</li>
<li class="primary">
<a href="../index.html">Overview</a>
</li>
<li class="primary">
<a href="../documentation.html">Documentation</a>
</li>
<li class="primary">
<a href="http://freetype.org/developer.html">Development</a>
</li>
<li class="primary">
<a href="http://freetype.org/contact.html"
class="emphasis">Contact</a>
</li>
<li>
<!-- separate primary from secondary entries -->
</li>
<li class="secondary">
<a href="index.html">FreeType Design</a>
</li>
<li class="tertiary">
<a href="design-1.html" class="current">Introduction</a>
</li>
<li class="tertiary">
<a href="design-2.html">Components and APIs</a>
</li>
<li class="tertiary">
<a href="design-3.html">Public Objects and Classes</a>
</li>
<li class="tertiary">
<a href="design-4.html">Internal Objects and Classes</a>
</li>
<li class="tertiary">
<a href="design-5.html">Module Classes</a>
</li>
<li class="tertiary">
<a href="design-6.html">Interfaces and Services</a>
</li>
</ul>
</div>
</div> <!-- id="wrapper" -->
<div id="TOC-bottom">
</div>
</body>
</html>
design/design-2.html 0000644 00000023264 15170676640 0010336 0 ustar 00 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type"
content="text/css">
<meta http-equiv="Content-Script-Type"
content="text/javascript">
<meta name="description"
content="FreeType Documentation">
<meta name="Author"
content="David Turner">
<link rel="icon"
href="../image/favicon_-90.ico">
<link rel="shortcut icon"
href="../image/favicon_-90.ico">
<link rel="stylesheet"
type="text/css"
href="../css/freetype2_-90.css">
<script type="text/javascript"
src="../../../js/jquery-1.11.0.min.js">
</script>
<script type="text/javascript"
src="../../../js/jquery.ba-resize.min.js">
</script>
<script type="text/javascript"
src="../../../js/freetype2.js">
</script>
<title>FreeType Design / I</title>
</head>
<body>
<div id="top"
class="bar">
<h1><a href="http://freetype.org/index.html">FreeType</a>
Design / I</h1>
</div>
<div id="wrapper">
<div class="colmask leftmenu">
<div class="colright">
<div class="col1wrap">
<div class="col1">
<!-- ************************************************** -->
<div id="components-and-apis">
<h2>I. Components and APIs</h2>
<p>It is better to describe FreeType 2 as a collection
of <em>components</em>. Each one of them is a more or
less abstract part of the library that is in charge of one
specific task. We will now explain the connections and
relationships between them.</p>
<p>A first brief description of this system of components
could be as follows.</p>
<ul>
<li>
<p>Client applications typically call the
FreeType 2 <b>high-level API</b>, whose functions
are implemented in a single component called
the <em>Base Layer</em>.</p>
</li>
<li>
<p>Depending on the context or the task, the base layer
then calls one or more <em>module</em> components to
perform the work. In most cases, the client
application doesn't need to know which module was
called.</p>
</li>
<li>
<p>The base layer also contains a set of routines that
are used for generic things like memory allocation,
list processing, I/O stream parsing, fixed-point
computation, etc. These functions can also be called
by a module at any time, and they form what is called
the <b>low-level base API</b>.</p>
</li>
</ul>
<p>This is illustrated by the following graphics (note that
component entry points are represented as colored
triangles).</p>
<center>
<img src="basic-design.png"
width="394"
height="313"
alt="Basic FreeType design">
</center>
<p>A few additional things must be added to complete this
picture.</p>
<ul>
<li>
<p>Some parts of the base layer can be replaced for
specific builds of the library, and can thus be
considered as components themselves. This is the case
for the <tt>ftsystem</tt> component, which is in
charge of implementing memory management and input
stream access, as well as <tt>ftinit</tt>, which is in
charge of library initialization (i.e., implementing
the <a href="../reference/ft2-base_interface.html#FT_Init_FreeType"><code>FT_Init_FreeType</code></a>
function).</p>
</li>
<li>
<p>FreeType 2 comes also with a set of <em>optional
components</em>, which can be used either as a
convenience layer for client applications (e.g.,
the <tt>ftglyph</tt> component, used to provide a
simple API to manage glyph images independently of
their internal representation), or to access
format-specific features (e.g., the
<tt>ftmm</tt> component used to access and manage
Multiple Masters and OpenType variations fonts).</p>
</li>
<li>
<p>A module is capable of calling functions provided by
another module. This is very useful to share code and
tables between several font driver modules (for
example, the <tt>truetype</tt> and <tt>cff</tt>
modules both use the routines provided by
the <tt>sfnt</tt> module).</p>
</li>
<li>
<p>Finally, FreeType provides <em>services</em>, which
are a more light-weight way to access certain features
across multiple modules, or to access some
functionality provided by a single module.</p>
<p>Services are internal to FreeType; similar to
modules, it is necessary to ‘load’ a
service, which can fail if the service's module is not
available.</p>
<p>An example for a service provided by a single module
is ‘winfonts’ (see
file <tt>svwinfnt.h</tt>), which allows access to the
header of Windows bitmap fonts. An example for a
service provided by multiple modules is
‘multi-masters’ (see file <tt>svmm.h</tt>)
to manage the abovementioned <tt>ftmm</tt> component
across the <tt>truetype</tt>, <tt>type1</tt>,
and <tt>cff</tt> modules.</p>
</li>
</ul>
<p>The following graphics shows the additional components
(without services).</p>
<center>
<img src="detailed-design.png"
width="390"
height="429"
alt="Detailed FreeType design">
</center>
<p>Please take note of the following important points.</p>
<ul>
<li>
<p>An optional component can use either the high-level
or base API. This is the case of <tt>ftglyph</tt> in
the above picture.</p>
</li>
<li>
<p>Some optional components can use module-specific
interfaces or services ignored by the base layer. In
the above example, <tt>ftmm</tt> directly accesses the
Type 1 and TrueType modules to set and query
data.</p>
</li>
<li>
<p>A replaceable component can provide a function of the
high-level API. For example, <tt>ftinit</tt> provides
<tt>FT_Init_FreeType</tt> to client applications.</p>
</li>
</ul>
</div>
<!-- ************************************************** -->
<div class="updated">
<p>Last update: 13-Feb-2018</p>
</div>
</div>
</div>
<!-- ************************************************** -->
<div class="col2">
</div>
</div>
</div>
<!-- ************************************************** -->
<div id="TOC">
<ul>
<li class="funding">
<form action="https://www.paypal.com/cgi-bin/webscr"
method="post"
target="_top">
<input type="hidden"
name="cmd"
value="_s-xclick">
<input type="hidden"
name="hosted_button_id"
value="SK827YKEALMT4">
<input type="image"
src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif"
name="submit"
alt="PayPal - The safer, easier way to pay online!">
<img alt=""
border="0"
src="https://www.paypalobjects.com/de_DE/i/scr/pixel.gif"
width="1"
height="1">
</form>
</li>
<li class="primary">
<a href="http://freetype.org/index.html">Home</a>
</li>
<li class="primary">
<a href="http://freetype.org/index.html#news">News</a>
</li>
<li class="primary">
<a href="../index.html">Overview</a>
</li>
<li class="primary">
<a href="../documentation.html">Documentation</a>
</li>
<li class="primary">
<a href="http://freetype.org/developer.html">Development</a>
</li>
<li class="primary">
<a href="http://freetype.org/contact.html"
class="emphasis">Contact</a>
</li>
<li>
<!-- separate primary from secondary entries -->
</li>
<li class="secondary">
<a href="index.html">FreeType Design</a>
</li>
<li class="tertiary">
<a href="design-1.html">Introduction</a>
</li>
<li class="tertiary">
<a href="design-2.html" class="current">Components and APIs</a>
</li>
<li class="tertiary">
<a href="design-3.html">Public Objects and Classes</a>
</li>
<li class="tertiary">
<a href="design-4.html">Internal Objects and Classes</a>
</li>
<li class="tertiary">
<a href="design-5.html">Module Classes</a>
</li>
<li class="tertiary">
<a href="design-6.html">Interfaces and Services</a>
</li>
</ul>
</div>
</div> <!-- id="wrapper" -->
<div id="TOC-bottom">
</div>
</body>
</html>
design/design-3.html 0000644 00000041725 15170676640 0010341 0 ustar 00 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type"
content="text/css">
<meta http-equiv="Content-Script-Type"
content="text/javascript">
<meta name="description"
content="FreeType Documentation">
<meta name="Author"
content="David Turner">
<link rel="icon"
href="../image/favicon_-90.ico">
<link rel="shortcut icon"
href="../image/favicon_-90.ico">
<link rel="stylesheet"
type="text/css"
href="../css/freetype2_-90.css">
<script type="text/javascript"
src="../../../js/jquery-1.11.0.min.js">
</script>
<script type="text/javascript"
src="../../../js/jquery.ba-resize.min.js">
</script>
<script type="text/javascript"
src="../../../js/freetype2.js">
</script>
<title>FreeType Design / II</title>
</head>
<body>
<div id="top"
class="bar">
<h1><a href="http://freetype.org/index.html">FreeType</a>
Design / II</h1>
</div>
<div id="wrapper">
<div class="colmask leftmenu">
<div class="colright">
<div class="col1wrap">
<div class="col1">
<!-- ************************************************** -->
<div id="public-objects">
<h2>II. Public Objects and Classes</h2>
<p>We will now explain the abstractions provided by
FreeType 2 to client applications to manage font
files and data. As you would normally expect, these are
implemented through objects and classes.</p>
<h3 id="section-1">1. Object Orientation in
FreeType 2</h3>
<p>Though written in ANSI C, the library employs a few
techniques, inherited from object-oriented programming, to
make it easy to extend. Hence, the following conventions
apply in the FreeType 2 source code.</p>
<ol>
<li>
<p>Almost all object types or classes have a
corresponding <em>structure type</em> <b>and</b> a
corresponding <em>structure pointer type</em>. The
latter is called the <em>handle type</em> for the type
or class.</p>
<p>Consider that we need to manage objects of type
‘foo’ in FreeType 2. We would define
the following structure and handle types as
follows.</p>
<pre>
typedef struct FT_FooRec_* FT_Foo;
typedef struct FT_FooRec_
{
/* fields for the 'foo' class */
...
} FT_FooRec;</pre>
<p>As a convention, handle types use simple but
meaningful identifiers beginning with <tt>FT_</tt>, as
in <tt>FT_Foo</tt>, while structures use the same name
with a <tt>Rec</tt> suffix appended to it
(‘Rec’ is short for
‘record’).</p>
</li>
<li>
<p>Class derivation is achieved internally by wrapping
base class structures into new ones. As an example,
we define a ‘foobar’ class that is derived
from ‘foo’. We would do something
like this.</p>
<pre>
typedef struct FT_FooBarRec_* FT_FooBar;
typedef struct FT_FooBarRec_
{
/* the base 'foo' class fields */
FT_FooRec root;
/* fields proper to the 'foobar' class */
...
} FT_FooBarRec;</pre>
<p>As you can see, we ensure that a ‘foobar’
object is also a ‘foo’ object by placing
a <tt>FT_FooRec</tt> at the start of the
<tt>FT_FooBarRec</tt> definition. It is
called <b>root</b> by convention.</p>
<p>Note that an <tt>FT_FooBar</tt> handle also points to
a ‘foo’ object and can be typecast
to <tt>FT_Foo</tt>. Similarly, when the library
returns an <tt>FT_Foo</tt> handle to client
applications, the object can be really implemented as
<tt>FT_FooBar</tt> or any derived class from
‘foo’.</p>
</li>
</ol>
<p>In the following sections of this chapter, we will refer
to ‘the <tt>FT_Foo</tt> class’ to indicate the
type of objects handled through <tt>FT_Foo</tt> pointers,
be they implemented as ‘foo’ or
‘foobar’.</p>
<h3 id="section-2">2. The <tt>FT_Library</tt> class</h3>
<p>This type corresponds to a handle to a single instance of
the library. Note that the corresponding
structure <tt>FT_LibraryRec</tt> is not defined in public
header files, making client applications unable to access
its internal fields.</p>
<p>The library object is the <em>parent</em> of all other
objects in FreeType 2. You need to create a new
library instance before doing anything else with the
library. Similarly, destroying it will automatically
destroy all its children (i.e., faces and modules).</p>
<p>Typical client applications should
call <a href="../reference/ft2-base_interface.html#FT_Init_FreeType"><code>FT_Init_FreeType</code></a>
in order to create a new library object, ready to be used
for further actions.</p>
<p>Another alternative is to create a fresh new library
instance by calling the function
<a href="../reference/ft2-module_management.html#FT_New_Library"><code>FT_New_Library</code></a>,
defined in the
<tt>ftmodule.h</tt> public header file. This function
will however return an ‘empty’ library
instance with no module registered in it. You can
‘install’ modules in the instance by calling
<a href="../reference/ft2-module_management.html#FT_Add_Module"><code>FT_Add_Module</code></a>
manually.</p>
<p>Calling <tt>FT_Init_FreeType</tt> is a lot more
convenient, because this function basically registers a
set of default modules into each new library instance.
The way this list is accessed or computed is determined at
build time, and depends on the content of
the <tt>ftinit</tt> component. This process is explained
in details later in this document.</p>
<p>For now, one should consider that library objects are
created with <tt>FT_Init_FreeType</tt>, and destroyed
along with all children
with <a href="../reference/ft2-base_interface.html#FT_Done_FreeType"><code>FT_Done_FreeType</code></a>.</p>
<h3 id="section-3">3. The <tt>FT_Face</tt> class</h3>
<p>A face object corresponds to a single <em>font face</em>,
i.e., a specific typeface with a specific style. For
example, ‘Arial’ and ‘Arial
Italic’ correspond to two distinct faces.</p>
<p>A face object is normally created
through <a href="../reference/ft2-base_interface.html#FT_New_Face"><code>FT_New_Face</code></a>.
This function takes the following parameters:
an <tt>FT_Library</tt> handle, a C file pathname used to
indicate which font file to open, an index used to decide
which face to load from the file (a single file may
contain several faces in certain cases), and the address
of an <tt>FT_Face</tt> handle. It returns an error
code.</p>
<pre>
FT_Error FT_New_Face( FT_Library library,
const char* filepathname,
FT_Long face_index,
FT_Face* face );</pre>
<p>In case of success, the function
returns <tt>FT_Err_Ok</tt> (which is value 0), and
the handle pointed to by the <tt>face</tt> parameter is
set to a non-NULL value.</p>
<p>Note that the face object contains several fields used to
describe global font data that can be accessed directly by
client applications, for example, the total number of
glyphs in the face, the face's family name, style name,
the EM size for scalable formats, etc. For more details,
look at
the <a href="../reference/ft2-base_interface.html#FT_FaceRec"><code>FT_FaceRec</code></a>
definition in the FreeType 2 API Reference.</p>
<h3 id="section-4">4. The <tt>FT_Size</tt> class</h3>
<p>Each <tt>FT_Face</tt> object has one or more
<tt>FT_Size</tt> objects. A <em>size object</em> stores
data specific to a given character width and height. Each
newly created face object has one size, which is directly
accessible as <tt>face->size</tt>.</p>
<p>The contents of a size object can be changed by calling
<a href="../reference/ft2-base_interface.html#FT_Request_Size"><code>FT_Request_Size</code></a>, <a href="../reference/ft2-base_interface.html#FT_Set_Pixel_Sizes"><code>FT_Set_Pixel_Sizes</code></a>,
or <a href="../reference/ft2-base_interface.html#FT_Set_Char_Size"><code>FT_Set_Char_Size</code></a>.</p>
<p>A new size object can be created
with <a href="../reference/ft2-sizes_management.html#FT_New_Size"><code>FT_New_Size</code></a>,
and destroyed manually
with <a href="../reference/ft2-sizes_management.html#FT_Done_Size"><code>FT_Done_Size</code></a>.
Note that typical applications don't need to do this
normally: usually it is fully sufficient to use the
default size object provided with
each <tt>FT_Face</tt>.</p>
<p>The public fields of <tt>FT_Size</tt> objects are defined
in a very small structure
named <a href="../reference/ft2-base_interface.html#FT_SizeRec"><code>FT_SizeRec</code></a>.
However, it is important to understand that some font
drivers define their own derivatives of <tt>FT_Size</tt>
to store important internal data that is re-computed each
time the character size changes. Most of the time, these
are size-specific <em>font hints</em>.</p>
<p>For example, the TrueType driver stores the scaled CVT
(Control Value Table) data that results from the execution
of the ‘prep’ program in a <tt>TT_Size</tt>
structure, while the Type 1 driver stores scaled
global metrics (like blue zones) in a <tt>T1_Size</tt>
object. Don't worry if you don't understand the current
paragraph; most of this stuff is highly font format
specific and doesn't need to be explained to client
developers :-)</p>
<h3 id="section-5">5. The <tt>FT_GlyphSlot</tt> class</h3>
<p>The purpose of a <em>glyph slot</em> is to provide a
place where glyph images can be loaded one by one easily,
independently of the glyph image format (bitmap, vector
outline, or anything else).</p>
<p>Ideally, once a glyph slot is created, any glyph image
can be loaded into it without additional memory
allocation. In practice, this is only possible with
certain formats like TrueType which explicitly provide
data to compute a slot's maximum size.</p>
<p>Another reason for glyph slots is that they are also used
to hold format-specific hints for a given glyphs as well
as all other data necessary to correctly load the
glyph.</p>
<p>The
base <a href="../reference/ft2-base_interface.html#FT_GlyphSlotRec"><code>FT_GlyphSlotRec</code></a>
structure only presents glyph metrics and images to client
applications, while the actual implementation may contain
more sophisticated data.</p>
<p>As an example, the
TrueType-specific <tt>TT_GlyphSlotRec</tt> structure
contains additional fields to hold glyph-specific
bytecode, transient outlines used during the hinting
process, and a few other things. The
Type 1-specific <tt>T1_GlyphSlotRec</tt> structure
holds glyph hints during glyph loading, as well as
additional logic used to properly hint the glyphs when a
native Type 1 hinter is used.</p>
<p>Each face object has a single glyph slot that is directly
accessible as <tt>face->glyph</tt>.</p>
<h3 id="section-6">6. The <tt>FT_CharMap</tt> class</h3>
<p>The <tt>FT_CharMap</tt> type is a handle to character map
objects, or <em>charmaps</em>. A charmap is simply some
sort of table or dictionary to translate character codes
in a given encoding into glyph indices for the font.</p>
<p>A single face may contain several charmaps. Each one of
them corresponds to a given character repertoire, like
Unicode, Apple Roman, Windows codepages, and other
encodings.</p>
<p>Each <tt>FT_CharMap</tt> object contains a
‘platform’ and an ‘encoding’ field
to precisely identify the character repertoire
corresponding to it.</p>
<p>Each font format provides its own derivative of
<a href="../reference/ft2-base_interface.html#FT_CharMapRec"><code>FT_CharMapRec</code></a>
and thus needs to implement these objects.</p>
<h3 id="section-7">7. Objects Relationship</h3>
<p>The following diagram summarizes what we have just said
regarding the public objects managed by the library; it
also describes their relationship.</p>
<center>
<img src="simple-model.png"
width="453"
height="378"
alt="Simple library model">
</center>
<p>Note that this picture will be updated at the end of the
next chapter, related to <em>internal objects</em>.</p>
</div>
<!-- ************************************************** -->
<div class="updated">
<p>Last update: 13-Feb-2018</p>
</div>
</div>
</div>
<!-- ************************************************** -->
<div class="col2">
</div>
</div>
</div>
<!-- ************************************************** -->
<div id="TOC">
<ul>
<li class="funding">
<form action="https://www.paypal.com/cgi-bin/webscr"
method="post"
target="_top">
<input type="hidden"
name="cmd"
value="_s-xclick">
<input type="hidden"
name="hosted_button_id"
value="SK827YKEALMT4">
<input type="image"
src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif"
name="submit"
alt="PayPal - The safer, easier way to pay online!">
<img alt=""
border="0"
src="https://www.paypalobjects.com/de_DE/i/scr/pixel.gif"
width="1"
height="1">
</form>
</li>
<li class="primary">
<a href="http://freetype.org/index.html">Home</a>
</li>
<li class="primary">
<a href="http://freetype.org/index.html#news">News</a>
</li>
<li class="primary">
<a href="../index.html">Overview</a>
</li>
<li class="primary">
<a href="../documentation.html">Documentation</a>
</li>
<li class="primary">
<a href="http://freetype.org/developer.html">Development</a>
</li>
<li class="primary">
<a href="http://freetype.org/contact.html"
class="emphasis">Contact</a>
</li>
<li>
<!-- separate primary from secondary entries -->
</li>
<li class="secondary">
<a href="index.html">FreeType Design</a>
</li>
<li class="tertiary">
<a href="design-1.html">Introduction</a>
</li>
<li class="tertiary">
<a href="design-2.html">Components and APIs</a>
</li>
<li class="tertiary">
<a href="design-3.html" class="current">Public Objects and Classes</a>
</li>
<li class="tertiary">
<a href="design-4.html">Internal Objects and Classes</a>
</li>
<li class="tertiary">
<a href="design-5.html">Module Classes</a>
</li>
<li class="tertiary">
<a href="design-6.html">Interfaces and Services</a>
</li>
</ul>
</div>
</div> <!-- id="wrapper" -->
<div id="TOC-bottom">
</div>
</body>
</html>
design/design-4.html 0000644 00000036657 15170676640 0010352 0 ustar 00 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type"
content="text/css">
<meta http-equiv="Content-Script-Type"
content="text/javascript">
<meta name="description"
content="FreeType Documentation">
<meta name="Author"
content="David Turner">
<link rel="icon"
href="../image/favicon_-90.ico">
<link rel="shortcut icon"
href="../image/favicon_-90.ico">
<link rel="stylesheet"
type="text/css"
href="../css/freetype2_-90.css">
<script type="text/javascript"
src="../../../js/jquery-1.11.0.min.js">
</script>
<script type="text/javascript"
src="../../../js/jquery.ba-resize.min.js">
</script>
<script type="text/javascript"
src="../../../js/freetype2.js">
</script>
<title>FreeType Design / III</title>
</head>
<body>
<div id="top"
class="bar">
<h1><a href="http://freetype.org/index.html">FreeType</a>
Design / III</h1>
</div>
<div id="wrapper">
<div class="colmask leftmenu">
<div class="colright">
<div class="col1wrap">
<div class="col1">
<!-- ************************************************** -->
<div id="internal-objects">
<h2>III. Internal Objects and Classes</h2>
<p>Let us have a look now at the <em>internal</em> objects
that FreeType 2 uses, i.e., those not directly
available to client applications, and see how they fit
into the picture.</p>
<h3 id="section-1">1. Memory Management</h3>
<p>Most memory management operations are performed through
three specific routines of the base
layer: <tt>FT_Alloc</tt>, <tt>FT_Realloc</tt>,
and <tt>FT_Free</tt>. Each one of these functions expects
a <tt>FT_Memory</tt> handle as its first parameter. Note,
however, that there exist more, similar variants for
specific purposes which we skip here for simplicity.</p>
<p><tt>FT_Memory</tt> is a pointer to a simple object that
describes the current memory pool or manager. It contains
a small table of alloc, realloc, and free functions. A
memory manager is created at library initialization time
by <tt>FT_Init_FreeType</tt>, calling the (internal)
function <tt>FT_New_Memory</tt> provided by
the <tt>ftsystem</tt> component.</p>
<p>By default, this manager uses the ANSI functions <tt>malloc</tt>,
<tt>realloc</tt>, and <tt>free</tt>. However,
as <tt>ftsystem</tt> is a replaceable part of the base
layer, a specific build of the library could provide a
different default memory manager.</p>
<p>Even with a default build, client applications are still
able to provide their own memory manager by not calling
<tt>FT_Init_FreeType</tt> but follow these simple
steps.</p>
<ol>
<li>
<p>Create a new <tt>FT_Memory</tt> object by hand. The
definition
of <a href="../reference/ft2-system_interface.html#FT_MemoryRec"><code>FT_MemoryRec</code></a>
is located in the public header
file <tt>ftsystem.h</tt>.</p>
</li>
<li>
<p>Call <a href="../reference/ft2-module_management.html#FT_New_Library"><code>FT_New_Library</code></a>
to create a new library instance using your custom
memory manager. This new library doesn't yet contain
any registered modules.</p>
</li>
<li>
<p>Register the set of default modules by calling the
function <a href="../reference/ft2-module_management.html#FT_Add_Default_Modules"><code>FT_Add_Default_Modules</code></a>
provided by the <tt>ftinit</tt> component, or manually
register your drivers by repeatedly
calling <a href="../reference/ft2-module_management.html#FT_Add_Module"><code>FT_Add_Module</code></a>.</p>
</li>
</ol>
<h3 id="section-2">2. Input Streams</h3>
<p>Font files are always read through <tt>FT_Stream</tt>
objects. The definition
of <a href="../reference/ft2-system_interface.html#FT_StreamRec"><code>FT_StreamRec</code></a>
is located in the public header file <tt>ftsystem.h</tt>,
which allows client developers to provide their own
implementation of streams if they wish so.</p>
<p>The
function <a href="../reference/ft2-base_interface.html#FT_New_Face"><code>FT_New_Face</code></a>
always automatically creates a new stream object from the
C pathname given as its second argument. This is
achieved by calling the (internal) function
<tt>FT_New_Stream</tt> provided by the <tt>ftsystem</tt>
component. As the latter is replaceable, the
implementation of streams may vary greatly between
platforms.</p>
<p>As an example, the default implementation of streams is
located in the file <tt>src/base/ftsystem.c</tt> and uses
the ANSI functions <tt>fopen</tt>, <tt>fseek</tt>,
and <tt>fread</tt>. However, the Unix build of
FreeType 2 provides an alternative implementation
that uses memory-mapped files, when available on the host
platform, resulting in a significant access speed-up.</p>
<p>FreeType distinguishes between memory-based and
disk-based streams. In the first case, all data is
directly accessed in memory (e.g., ROM-based, write-only
static data, and memory-mapped files), while in the
second, portions of the font files are read in chunks
called <em>frames</em>, and temporarily buffered similarly
through typical seek and read operations.</p>
<p>The FreeType stream sub-system also implements extremely
efficient algorithms to very quickly load structures from
font files while ensuring complete safety in the case of a
‘broken file’.</p>
<p>The
function <a href="../reference/ft2-base_interface.html#FT_New_Memory_Face"><code>FT_New_Memory_Face</code></a>
can be used to directly create and open
an <tt>FT_Face</tt> object from data that is readily
available in memory (including ROM-based fonts).</p>
<p>Finally, in the case where a custom input stream is
needed, client applications can use the
function <a href="../reference/ft2-base_interface.html#FT_Open_Face"><code>FT_Open_Face</code></a>,
which can accept custom input streams. This may be useful
in the case of compressed or remote font files, or even
embedded font files that need to be extracted from certain
documents.</p>
<p>Note that each face owns a single stream, which is also
destroyed
by <a href="../reference/ft2-base_interface.html#FT_Done_Face"><code>FT_Done_Face</code></a>.</p>
<h3 id="section-3">3. Modules</h3>
<p>A FreeType 2 module is itself a piece of code.
However, the library creates a single <tt>FT_Module</tt>
object for each module that is registered
when <tt>FT_Add_Module</tt> is called.</p>
<p>The definition of <tt>FT_ModuleRec</tt> is not publicly
available to client applications. However,
each <em>module type</em> is described by a simple public
structure
named <a href="../reference/ft2-module_management.html#FT_Module_Class"><code>FT_Module_Class</code></a>,
defined in header file
<tt>ftmodule.h</tt>, and is described later in this
document.</p>
<p>You need a pointer to an <tt>FT_Module_Class</tt>
structure when
calling <a href="../reference/ft2-module_management.html#FT_Add_Module"><code>FT_Add_Module</code></a>.</p>
<pre>
FT_Error
FT_Add_Module( FT_Library library,
const FT_Module_Class* clazz );</pre>
<p>This function does the following tasks.</p>
<ul>
<li>
<p>Check whether the library already holds a module
object corresponding to the same module name as the
one found in <tt>FT_Module_Class</tt>.</p>
</li>
<li>
<p>If this is the case, compare the module version
number to see whether it is possible
to <em>upgrade</em> the module to a new version. If
the module class's version number is smaller than the
already installed one, return immediately. Similarly,
check that the version of FreeType 2 that is
running is correct compared to the one required by the
module.</p>
</li>
<li>
<p>Create a new <tt>FT_Module</tt> object, using data
and flags of the module class to determine its byte
size and how to properly initialize it.</p>
</li>
<li>
<p>If a module initializer is present in the module
class, call it to complete the module object's
initialization.</p>
</li>
<li>
<p>Add the new module to the library's list of
‘registered’ modules. In case of an
upgrade, destroy the previous module object.</p>
</li>
</ul>
<p>Note that this function doesn't return
an <tt>FT_Module</tt> handle, given that module objects
are completely internal to the library (and client
applications shouldn't normally mess with
them :-)</p>
<p>Finally, it is important to understand that
FreeType 2 recognizes and manages several kinds of
modules. These will be explained later on in this
document.</p>
<ul>
<li>
<p><em>Renderer</em> modules are used to convert native
glyph images to bitmaps or pixmaps. FreeType 2
comes with two renderer modules by default: one to
generate monochrome bitmaps, the other to generate
anti-aliased pixmaps.</p>
</li>
<li>
<p><em>Font driver</em> modules are used to support one
or more font formats. Typically, each font driver
provides a specific implementation or derivative
of <tt>FT_Face</tt>, <tt>FT_Size</tt>,
<tt>FT_GlyphSlot</tt>, as well
as <tt>FT_CharMap</tt>.</p>
</li>
<li>
<p><em>Helper</em> modules are shared by several font
drivers. For example, the <tt>sfnt</tt> module parses
and manages tables found in SFNT-based font formats;
it is then used by both the TrueType font and CFF
drivers.</p>
</li>
<li>
<p>Finally, the <em>auto-hinter</em> module has a
specific place in the library's design, as its role is
to process vectorial glyph outlines, independently of
their native font format, to produce optimal results
at small pixel sizes.</p>
</li>
</ul>
<p>Note that every <tt>FT_Face</tt> object is <em>owned</em>
by the corresponding font driver, depending on the
original font file's format. This means that all face
objects are destroyed when a module is removed or
unregistered from a library instance (typically by calling
the <a href="../reference/ft2-module_management.html#FT_Remove_Module"><code>FT_Remove_Module</code></a>
function). Because of this, you should always take care
that no <tt>FT_Face</tt> object is opened when you upgrade
or remove a module from a library, as this could cause
unexpected object deletion!</p>
<h3 id="section-4">4. Summary</h3>
<p>Finally, the following picture illustrates what has been
said in this section, as well as the previous, by
presenting the complete object graph of FreeType 2's
base design.</p>
<center>
<img src="library-model.png"
width="411"
height="405"
alt="Complete library model">
</center>
</div>
<!-- ************************************************** -->
<div class="updated">
<p>Last update: 13-Feb-2018</p>
</div>
</div>
</div>
<!-- ************************************************** -->
<div class="col2">
</div>
</div>
</div>
<!-- ************************************************** -->
<div id="TOC">
<ul>
<li class="funding">
<form action="https://www.paypal.com/cgi-bin/webscr"
method="post"
target="_top">
<input type="hidden"
name="cmd"
value="_s-xclick">
<input type="hidden"
name="hosted_button_id"
value="SK827YKEALMT4">
<input type="image"
src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif"
name="submit"
alt="PayPal - The safer, easier way to pay online!">
<img alt=""
border="0"
src="https://www.paypalobjects.com/de_DE/i/scr/pixel.gif"
width="1"
height="1">
</form>
</li>
<li class="primary">
<a href="http://freetype.org/index.html">Home</a>
</li>
<li class="primary">
<a href="http://freetype.org/index.html#news">News</a>
</li>
<li class="primary">
<a href="../index.html">Overview</a>
</li>
<li class="primary">
<a href="../documentation.html">Documentation</a>
</li>
<li class="primary">
<a href="http://freetype.org/developer.html">Development</a>
</li>
<li class="primary">
<a href="http://freetype.org/contact.html"
class="emphasis">Contact</a>
</li>
<li>
<!-- separate primary from secondary entries -->
</li>
<li class="secondary">
<a href="index.html">FreeType Design</a>
</li>
<li class="tertiary">
<a href="design-1.html">Introduction</a>
</li>
<li class="tertiary">
<a href="design-2.html">Components and APIs</a>
</li>
<li class="tertiary">
<a href="design-3.html">Public Objects and Classes</a>
</li>
<li class="tertiary">
<a href="design-4.html" class="current">Internal Objects and Classes</a>
</li>
<li class="tertiary">
<a href="design-5.html">Module Classes</a>
</li>
<li class="tertiary">
<a href="design-6.html">Interfaces and Services</a>
</li>
</ul>
</div>
</div> <!-- id="wrapper" -->
<div id="TOC-bottom">
</div>
</body>
</html>
design/design-5.html 0000644 00000045352 15170676640 0010343 0 ustar 00 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type"
content="text/css">
<meta http-equiv="Content-Script-Type"
content="text/javascript">
<meta name="description"
content="FreeType Documentation">
<meta name="Author"
content="David Turner">
<link rel="icon"
href="../image/favicon_-90.ico">
<link rel="shortcut icon"
href="../image/favicon_-90.ico">
<link rel="stylesheet"
type="text/css"
href="../css/freetype2_-90.css">
<script type="text/javascript"
src="../../../js/jquery-1.11.0.min.js">
</script>
<script type="text/javascript"
src="../../../js/jquery.ba-resize.min.js">
</script>
<script type="text/javascript"
src="../../../js/freetype2.js">
</script>
<title>FreeType Design / IV</title>
</head>
<body>
<div id="top"
class="bar">
<h1><a href="http://freetype.org/index.html">FreeType</a>
Design / IV</h1>
</div>
<div id="wrapper">
<div class="colmask leftmenu">
<div class="colright">
<div class="col1wrap">
<div class="col1">
<!-- ************************************************** -->
<div id="module-classes">
<h2>IV. Module Classes</h2>
<p>We will now try to explain more precisely
the <em>types</em> of modules that FreeType 2 is
capable of managing.</p>
<ul>
<li>
<p><em>Renderer</em> modules manage scalable glyph
images. This means <em>transforming</em> them,
computing their <em>bounding box</em>,
and <em>converting</em> them to
either <em>monochrome</em> or <em>anti-aliased</em>
bitmaps.</p>
<p>Note that FreeType 2 is capable of dealing
with <em>any</em> kind of glyph images, as long as a
renderer module is provided for it. The library comes
by default with two renderers.</p>
<table>
<tr valign=top>
<td>
<p><tt>raster</tt></p>
</td>
<td>
<p>Supports the conversion of vectorial outlines
(described by
an <a href="../reference/ft2-outline_processing.html#FT_Outline"><code>FT_Outline</code></a>
object) to <em>monochrome</em> bitmaps.</p>
</td>
</tr>
<tr valign=top>
<td>
<p><tt>smooth</tt></p>
</td>
<td>
<p>Supports the conversion of the same outlines to
<em>anti-aliased</em> pixmaps (using 256 levels of
gray). Note that this renderer also supports
direct span generation, this is, it provides a
hook into the engine so that the application can
manipulate the rendering results itself, instead
of letting the rasterizer fill a pixmap.
See <a href="../tutorial/example4.cpp">this
tutorial demo file</a> for an example.</p>
</td>
</tr>
</table>
</li>
<li>
<p><em>Font driver</em> modules support one or more
specific font formats. Here is a list with the most
important ones.</p>
<table>
<tr valign=top>
<td>
<p><tt>truetype</tt></p>
</td>
<td>
<p>TrueType fonts.</p>
</td>
</tr>
<tr valign=top>
<td>
<p><tt>type1</tt></p>
</td>
<td>
<p>Postscript Type 1 fonts, both in binary
(<tt>.pfb</tt>) or ASCII (<tt>.pfa</tt>)
formats, including Multiple Master fonts.</p>
</td>
</tr>
<tr valign=top>
<td>
<p><tt>cid</tt></p>
</td>
<td>
<p>Postscript CID-keyed fonts.</p>
</td>
</tr>
<tr valign=top>
<td>
<p><tt>cff</tt></p>
</td>
<td>
<p>OpenType CFF and CFF2, bare CFF, and CEF fonts
(CEF is a derivative of CFF used by Adobe in its
SVG viewer).</p>
</td>
</tr>
<tr valign=top>
<td>
<p><tt>winfonts</tt></p>
</td>
<td>
<p>Windows bitmap fonts (i.e., <tt>.fon</tt> and
<tt>.fnt</tt>).</p>
</td>
</tr>
</table>
<p>Note that font drivers can support bitmapped or
scalable glyph images. A given font driver that
supports Bézier outlines
through <tt>FT_Outline</tt> can also provide its own
hinter, or rely on FreeType's <tt>autofit</tt>
module for auto-hinting.</p>
</li>
<li>
<p><em>Helper</em> modules are used to hold shared code
that is often used by several font drivers, or even
other modules. The most important are as follows.</p>
<table>
<tr valign=top>
<td>
<p><tt>sfnt</tt></p>
</td>
<td>
<p>Support for font formats based on
the <tt>SFNT</tt> storage scheme: TrueType,
OpenType, as well as other variants (like
TrueType fonts that only contain embedded
bitmaps).</p>
</td>
</tr>
<tr valign=top>
<td>
<p><tt>psnames</tt></p>
</td>
<td>
<p>Various useful functions related to glyph name
ordering and Postscript encodings and charsets.
For example, this module is capable of
automatically synthetizing a Unicode charmap
from a Type 1 glyph name dictionary.</p>
</td>
</tr>
<tr valign=top>
<td>
<p><tt>psaux</tt></p>
</td>
<td>
<p>Auxiliary functions related to Postscript
charstring decoding, as needed by
the <tt>type1</tt>, <tt>cid</tt>,
and <tt>cff</tt> drivers.</p>
</td>
</tr>
</table>
</li>
<li>
<p>Finally, the <em>auto-hinter</em> module
(<tt>autofit</tt>) has a specific role in
FreeType 2, as it can be used automatically
during glyph loading to process individual glyph
outlines when a font driver doesn't provide its own
hinting engine.</p>
<p>A paper published in the EuroTeX 2003 proceedings,
titled <a href="http://www.tug.org/TUGboat/tb24-3/lemberg.pdf"><em>Real-Time
Grid Fitting of Typographic Outlines</em></a>, gives
further insight into the auto-hinting system's inner
workings.</p>
</li>
</ul>
<p>We will now study how modules are described, then managed
by the library.</p>
<h3 id="section-1">1. The <tt>FT_Module_Class</tt>
Structure</h3>
<p>Here is the definition of <tt>FT_Module_Class</tt>, with
some explanations. The following code is taken from
<tt>ftmodapi.h</tt>.</p>
<pre>
typedef struct FT_Module_Class_
{
FT_ULong module_flags;
FT_Int module_size;
const FT_String* module_name;
FT_Fixed module_version;
FT_Fixed module_requires;
const void* module_interface;
FT_Module_Constructor module_init;
FT_Module_Destructor module_done;
FT_Module_Requester get_interface;
} FT_Module_Class;</pre>
<p>A description of its fields.</p>
<table>
<tr valign=top>
<td>
<p><tt>module_flags</tt></p>
</td>
<td>
<p>A set of bit flags to describe the module's
category. Valid values are listed below.</p>
<ul>
<li>
<tt>FT_MODULE_FONT_DRIVER</tt> if the module is a
font driver
</li>
<li>
<tt>FT_MODULE_RENDERER</tt> if the module is a
renderer
</li>
<li>
<tt>FT_MODULE_HINTER</tt> if the module is an
auto-hinter
</li>
<li>
<tt>FT_MODULE_DRIVER_SCALABLE</tt> if the module
is a font driver supporting scalable glyph formats
</li>
<li>
<tt>FT_MODULE_DRIVER_NO_OUTLINES</tt> if the
module is a font driver supporting scalable glyph
formats that <em>cannot</em> be described by
an <tt>FT_Outline</tt> object
</li>
<li>
<tt>FT_MODULE_DRIVER_HAS_HINTER</tt> if the module
is a font driver that provides its own hinting
scheme/algorithm
</li>
<li>
<tt>FT_MODULE_DRIVER_HINTS_LIGHTLY</tt> if the
module is a font driver that generates
‘light’ hints (this is, only along the
vertical axis).
</li>
</ul>
</td>
</tr>
<tr valign=top>
<td>
<p><tt>module_size</tt></p>
</td>
<td>
<p>An integer that gives the size in <em>bytes</em> of
a given module object. This should <em>never</em>
be less than <tt>sizeof(FT_ModuleRec)</tt>, but can
be more if the module needs to sub-class the
base <tt>FT_ModuleRec</tt> class.</p>
</td>
</tr>
<tr valign=top>
<td>
<p><tt>module_name</tt></p>
</td>
<td>
<p>The module's internal name, coded as a simple ASCII
C string. There can't be two modules with the
same name registered in a given <tt>FT_Library</tt>
object. However, <tt>FT_Add_Module</tt> uses
the <tt>module_version</tt> field to detect module
upgrades and perform them cleanly, even at
run-time.</p>
</td>
</tr>
<tr valign=top>
<td>
<p><tt>module_version</tt></p>
</td>
<td>
<p>A 16.16 fixed-point number giving the module's
major and minor version numbers. It is used to
determine whether a module needs to be upgraded when
calling <tt>FT_Add_Module</tt>.</p>
</td>
</tr>
<tr valign=top>
<td>
<p><tt>module_requires</tt></p>
</td>
<td>
<p>A 16.16 fixed-point number giving the version of
FreeType 2 that is required to install this
module. The default value is 0x20000 for FreeType
version 2.x</p>
</td>
</tr>
<tr valign=top>
<td>
<p><tt>module_interface</tt></p>
</td>
<td>
<p>Most modules support one or more
‘interfaces’, i.e., tables of function
pointers. This field points to the module's main
interface, if there is one. It is a short-cut that
prevents users of the module to
call <tt>get_interface</tt> each time they need to
access one of the object's common entry points.</p>
<p>Note that it is optional, and can be set to NULL.
Other interfaces can also be accessed through
the <tt>get_interface</tt> field.</p>
</td>
</tr>
<tr valign=top>
<td>
<p><tt>module_init</tt></p>
</td>
<td>
<p>A pointer to a function to initialize the fields of
a fresh new <tt>FT_Module</tt> object. It is
called <em>after</em> the module's base fields have
been set by the library, and is generally used to
initialize the fields of <tt>FT_ModuleRec</tt>
subclasses.</p>
<p>Most module classes set it to NULL to indicate that
no extra initialization is necessary.</p>
</td>
</tr>
<tr valign=top>
<td>
<p><tt>module_done</tt></p>
</td>
<td>
<p>A pointer to a function to finalize the fields of a
given <tt>FT_Module</tt> object. Note that it is
called <em>before</em> the library unsets the
module's base fields, and is generally used to
finalize the fields of <tt>FT_ModuleRec</tt>
subclasses.</p>
<p>Most module classes set it to NULL to indicate that
no extra finalization is necessary</p>
</td>
</tr>
<tr valign=top>
<td>
<p><tt>get_interface</tt></p>
</td>
<td>
<p>A pointer to a function to request the address of a
given module interface. Set it to NULL if you don't
need to support additional interfaces but the main
one.</p>
</td>
</tr>
</table>
<h3 id="section-2">2. The <tt>FT_Module</tt> Type</h3>
<p>The <tt>FT_Module</tt> type is a handle (i.e., a pointer)
to a given module object or instance, whose base structure
is given by the internal <tt>FT_ModuleRec</tt> type. We
will intentionally <em>not</em> describe this structure
here, as there is no point to look so far into the
library's design.</p>
<p>When <tt>FT_Add_Module</tt> is called, it first allocates
a new module instance, using the <tt>module_size</tt>
class field to determine its byte size. The function
initializes the root <tt>FT_ModuleRec</tt> field, then
calls the class-specific initializer <tt>module_init</tt>
when this field is not set to NULL.</p>
<p>Note that the library defines several sub-classes of
<tt>FT_ModuleRec</tt>.</p>
<ul>
<li>
<p><tt>FT_Renderer</tt> for renderer modules</p>
</li>
<li>
<p><tt>FT_Driver</tt> for font driver modules</p>
</li>
<li>
<p><tt>FT_AutoHinter</tt> for the auto-hinter</p>
</li>
</ul>
<p>Helper modules use the base <tt>FT_ModuleRec</tt>
type.</p>
</div>
<!-- ************************************************** -->
<div class="updated">
<p>Last update: 13-Feb-2018</p>
</div>
</div>
</div>
<!-- ************************************************** -->
<div class="col2">
</div>
</div>
</div>
<!-- ************************************************** -->
<div id="TOC">
<ul>
<li class="funding">
<form action="https://www.paypal.com/cgi-bin/webscr"
method="post"
target="_top">
<input type="hidden"
name="cmd"
value="_s-xclick">
<input type="hidden"
name="hosted_button_id"
value="SK827YKEALMT4">
<input type="image"
src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif"
name="submit"
alt="PayPal - The safer, easier way to pay online!">
<img alt=""
border="0"
src="https://www.paypalobjects.com/de_DE/i/scr/pixel.gif"
width="1"
height="1">
</form>
</li>
<li class="primary">
<a href="http://freetype.org/index.html">Home</a>
</li>
<li class="primary">
<a href="http://freetype.org/index.html#news">News</a>
</li>
<li class="primary">
<a href="../index.html">Overview</a>
</li>
<li class="primary">
<a href="../documentation.html">Documentation</a>
</li>
<li class="primary">
<a href="http://freetype.org/developer.html">Development</a>
</li>
<li class="primary">
<a href="http://freetype.org/contact.html"
class="emphasis">Contact</a>
</li>
<li>
<!-- separate primary from secondary entries -->
</li>
<li class="secondary">
<a href="index.html">FreeType Design</a>
</li>
<li class="tertiary">
<a href="design-1.html">Introduction</a>
</li>
<li class="tertiary">
<a href="design-2.html">Components and APIs</a>
</li>
<li class="tertiary">
<a href="design-3.html">Public Objects and Classes</a>
</li>
<li class="tertiary">
<a href="design-4.html">Internal Objects and Classes</a>
</li>
<li class="tertiary">
<a href="design-5.html" class="current">Module Classes</a>
</li>
<li class="tertiary">
<a href="design-6.html">Interfaces and Services</a>
</li>
</ul>
</div>
</div> <!-- id="wrapper" -->
<div id="TOC-bottom">
</div>
</body>
</html>
design/design-6.html 0000644 00000027712 15170676640 0010344 0 ustar 00 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type"
content="text/css">
<meta http-equiv="Content-Script-Type"
content="text/javascript">
<meta name="description"
content="FreeType Documentation">
<meta name="Author"
content="David Turner">
<link rel="icon"
href="../image/favicon_-90.ico">
<link rel="shortcut icon"
href="../image/favicon_-90.ico">
<link rel="stylesheet"
type="text/css"
href="../css/freetype2_-90.css">
<script type="text/javascript"
src="../../../js/jquery-1.11.0.min.js">
</script>
<script type="text/javascript"
src="../../../js/jquery.ba-resize.min.js">
</script>
<script type="text/javascript"
src="../../../js/freetype2.js">
</script>
<title>FreeType Design / V</title>
</head>
<body>
<div id="top"
class="bar">
<h1><a href="http://freetype.org/index.html">FreeType</a>
Design / V</h1>
</div>
<div id="wrapper">
<div class="colmask leftmenu">
<div class="colright">
<div class="col1wrap">
<div class="col1">
<!-- ************************************************** -->
<div id="module-classes">
<h2>V. Interfaces and Services</h2>
<p>We shall now go into detail about interfaces and services
in FreeType.</p>
<p><em>Interfaces</em> in FreeType are analogous to those
found in object-oriented programming. They can be thought
of as internal public APIs, and are essentially tables of
function pointers.</p>
<p>Interfaces only describe the form and functionality, but
the actual function body may be implemented elsewhere.
The module that is implementing the interface will then
pass the required function pointers to the table. This
gives modularity and easy extendability.</p>
<p>There are two main kinds of interfaces: <em>module</em>
interfaces, and <em>services</em>.</p>
<p>Module interfaces are defined for each module. For
example, every font driver provides its own set of
procedures for use in the base layer, which are registered
in an <tt>FT_Driver</tt>. This way, very different font
drivers can be used in the same way in the base layer.</p>
<p>Services are cross-module interfaces. These provide
functionality needed in several font drivers. </p>
<p>Services are created when code from one module needs to
be used in another. Rather than include files from
another module, a service is created instead. Now, the
other module just needs to include the header defining the
interface.</p>
<p>Helper modules are an extreme example of this; all their
public functionality is made for use in other font drivers
and hence are in a single service.</p>
<h3>In-depth guide: Creating a service</h3>
<p>This section will teach you how to write your own
service.</p>
<ol>
<li>
<p>Make the service interface header.</p>
<p>We will be calling our service demo for demonstration
purposes. First, create the header file, which goes
in <tt>include/freetype/internal/services</tt>, and
add the boilerplate.</p>
<pre>
#include FT_INTERNAL_SERVICE_H
FT_BEGIN_HEADER
#define FT_SERVICE_ID_DEMO "demo"
/* ... */
FT_END_HEADER</pre>
<p>This line in particular is required to register the
new service later on.</p>
<pre>
#define <em>service-id service-tag</em></pre>
</li>
<li>
<p>We will have identified some functions that are
needed in another module. Extract the function
signatures of these and place them in the header.</p>
<pre>
[typedef <em>return-type</em>
(*<em>type-name</em>)(<em>function-signature</em>);]+</pre>
<p>Example:</p>
<pre>
typedef FT_Error
(*SampleDoSomethingFunc)( int foo );
typedef void
(*SampleDoAnotherFunc)( int foo,
float bar );</pre>
</li>
<li>
<p>Define the service interface.</p>
<p>Use the <tt>FT_DEFINE_SERVICE</tt> macro to do
this.</p>
<pre>
FT_DEFINE_SERVICE( <em>service-name</em> )
{
[<em>type-name interface-entry</em>;]+
}</pre>
<p>Example:</p>
<pre>
FT_DEFINE_SERVICE( Demo )
{
SampleDoSomethingFunc doSomething;
SampleDoAnotherFunc doAnother;
};</pre>
<p>Here is the definition of the above macro
(in <tt>ftserv.h</tt>).</p>
<pre>
#define FT_DEFINE_SERVICE( name ) \
typedef struct FT_Service_ ## name ## Rec_ \
FT_Service_ ## name ## Rec ; \
typedef struct FT_Service_ ## name ## Rec_ \
const * FT_Service_ ## name ; \
struct FT_Service_ ## name ## Rec_</pre>
<p>This defines a new struct
called <tt>FT_Service_DemoRec</tt>, along with a
handle type for the
struct, <tt>FT_Service_Demo</tt>.</p>
</li>
<li>
<p>Register (and/or implement) the functions for the
newly created interface.</p>
<p>In the module implementing the interface, add a
definition like the following</p>
<pre>
static const <em>service-record table-name</em> =
{
<em>function-name</em>
[,<em>function-name2</em> [,...]]
}</pre>
<p>which corresponds to the interface defined in
step 3. Example:</p>
<pre>
static const FT_Service_DemoRec demo_service_rec =
{
function1,
function2
};</pre>
<p>This initializes the function pointers table. In
this example, <tt>function1</tt> has the function
signature of <tt>SampleDoSomethingFunc</tt> and
implements the <tt>doSomething</tt> functionality, and
so on.</p>
</li>
<li>
<p>Register the new service.</p>
<p>Next, add this code to define the service list in
this module, or append the new service to an existing
list.</p>
<pre>
static const FT_ServiceDescRec <em>service-list-name</em>[] =
{
{ <em>service-id</em>, &<em>table-name</em> },
[{ <em>service-id2</em>, &<em>table-name2</em> }, [...]]
{ NULL, NULL }
}</pre>
<p>Example:</p>
<pre>
static const FT_ServiceDescRec demo_services[] =
{
{ FT_SERVICE_ID_DEMO, &demo_service_rec },
{ NULL, NULL }
};</pre>
<p><em>service-id</em> is what we <tt>#define</tt>'d in
the service header file in step 1. Note that
the <tt>{NULL, NULL}</tt> sentinel value at the
end is required.</p>
<p>Now we need a way for other modules to find this
service. First, we need to implement
the <tt>get_interface</tt> function in
<tt>FT_Module_Class</tt>. Here is a minimal example
that does not do any validation.</p>
<pre>
FT_CALLBACK_DEF( FT_Module_Interface )
<em>get-interface-name</em>( FT_Module module,
const char* module_interface )
{
return ft_service_list_lookup( <em>service-list-name</em>,
module_interface );
}</pre>
<p>Then, pass it into the <tt>FT_DEFINE_MODULE</tt>
macro for this module.</p>
<pre>
(FT_Module_Requester) <em>get-interface-name</em></pre>
<p>The last step is optional but recommended, which is
to register the new service header
in <tt>ftserv.h</tt>.
<pre>
#define FT_SERVICE_DEMO_H <freetype/internal/services/svdemo.h></pre>
</li>
<li>
<p>Use the new service.</p>
<p>Now, in the file that wants to use the service, add
the following code to get the service.</p>
<pre>
<em>service-record-handle</em> service;
FT_FACE_FIND_GLOBAL_SERVICE( face,
service,
<em>service-id-tail</em> );</pre>
<p><tt>face</tt> should be of type <tt>FT_Face</tt>,
which is usually the current face instance being used
in the driver, and FreeType tries to find the service
in the driver of this face first, before searching all
other modules.</p>
<p><em>service-id-tail</em> is the part
of <em>service-id</em>
following <tt>FT_SERVICE_ID_</tt>.
<p>Now to call some function in the service.</p>
<pre>
service-><em>interface-entry</em>( <em>params</em> );</pre>
<p>Example:</p>
<pre>
FT_Service_Demo demo;
FT_Error error;
FT_FACE_FIND_GLOBAL_SERVICE( face, demo, DEMO );
error = demo->doSomething(0);
</pre>
</li>
</ol>
</div>
<!-- ************************************************** -->
<div class="updated">
<p>Last update: 13-Feb-2018</p>
</div>
</div>
</div>
<!-- ************************************************** -->
<div class="col2">
</div>
</div>
</div>
<!-- ************************************************** -->
<div id="TOC">
<ul>
<li class="funding">
<form action="https://www.paypal.com/cgi-bin/webscr"
method="post"
target="_top">
<input type="hidden"
name="cmd"
value="_s-xclick">
<input type="hidden"
name="hosted_button_id"
value="SK827YKEALMT4">
<input type="image"
src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif"
name="submit"
alt="PayPal - The safer, easier way to pay online!">
<img alt=""
border="0"
src="https://www.paypalobjects.com/de_DE/i/scr/pixel.gif"
width="1"
height="1">
</form>
</li>
<li class="primary">
<a href="http://freetype.org/index.html">Home</a>
</li>
<li class="primary">
<a href="http://freetype.org/index.html#news">News</a>
</li>
<li class="primary">
<a href="../index.html">Overview</a>
</li>
<li class="primary">
<a href="../documentation.html">Documentation</a>
</li>
<li class="primary">
<a href="http://freetype.org/developer.html">Development</a>
</li>
<li class="primary">
<a href="http://freetype.org/contact.html"
class="emphasis">Contact</a>
</li>
<li>
<!-- separate primary from secondary entries -->
</li>
<li class="secondary">
<a href="index.html">FreeType Design</a>
</li>
<li class="tertiary">
<a href="design-1.html">Introduction</a>
</li>
<li class="tertiary">
<a href="design-2.html">Components and APIs</a>
</li>
<li class="tertiary">
<a href="design-3.html">Public Objects and Classes</a>
</li>
<li class="tertiary">
<a href="design-4.html">Internal Objects and Classes</a>
</li>
<li class="tertiary">
<a href="design-5.html">Module Classes</a>
</li>
<li class="tertiary">
<a href="design-6.html" class="current">Interfaces and
Services</a>
</li>
</ul>
</div>
</div> <!-- id="wrapper" -->
<div id="TOC-bottom">
</div>
</body>
</html>
design/detailed-design.png 0000644 00000004362 15170676640 0011566 0 ustar 00 �PNG
IHDR � � ���# PLTE��� �� � � ��� IDATx���q�0�o;ص�@Gd�ה ��S�(��U"�Aظ�xS8 ²,˲,˲��
*A|���;i3��f0��`3��f0Ò���2$b#C�g@1M�в�9�6�@ B������b,�A�@(~���>��D���@6�c�-r�+�ARϐ�А!����!:��M�Xp> ۄAY�6����}�Dž(�A���"�H���B����0^��F��(����f0��`3��f0��`��~��ʝفd)O�L3��f0��`3��f0��`3��f0��`3���J(KG�4�~n�t�����4��0ÕP�M�}4
g/�ߊa���_��2`_Q*�!>h���$��U1�/g3Q�u�뱳�n��Ү3p��E3��� ������Pm����-#�g�x;�*�����452 m>��Px��v�n�R Ĕ��-���RN䬨t̗53@Lc���[<��\��iϧ�`3���t%��$>�VZ>�l3��f0��`3��f��[~0���o�xҎv/eز�l�M����
l��YW0l�h�kڥMݶ^�l,KK~am���Uo�-W��o왵a���
���ꉅ����G�4|�v/<So��o[��usx�9�|h��v���Y���i�c�k7�}�Ix�9�[���8���ſ4
� ���p>�7��M���:�G�S���_�±P]V�$�C�����|�p>�s���u���<ƀ
�1��a��XLJ'�_������O�q����yf��!���@���������1�V���������v)@�WT�.�5^��a��UU������0�FY�H�2�^� �{��}�0yhu�[�S�ã�� 3<u�V!O�4(�S�?*F��5�Q����>1"��3�X �E���x)��V�C�8��!�Tn�� E�!������ �Q�|9C��0����Sy�=(��CRH��8����?<f;N�����d��3������P�q!^f̕غɿ���4R��>�i�*���fl' ��Ъ�!C6Ъ�!�����F��H�v�
�,0��P�B��C�i�h�������H��4c~�؛�3��i��`85`��;>�K�w@ƀϛ�B-3� ��1��:��2�ϛ6K�k�}V�}����:tL��sjY��գ�P+e�?�y��#�P�1ܛ�
����:��a�uz���'k��I<��y�è*gx�u<ב�W3�m5���+aX�Z��f0��`3<:�_bn�U8C��k�͔%����G3��]Zfp�"�8�P�|zc�.��/�����C����5.s�|�����ЁM��glڻ���!��?��3�s:�h>��M2���F]��!�|��2`�:LC�����fo�.0,�7ó;6�������`3��f0��`3���3$?2��K����`K�/j8x?�aO2Gm�?�|Þd����'�0�H�M�)������'3�&sԦi���KV�9j� >��aC����{��9j�z|��I2Gm�ϔc����v2Gm���_xU}�N�M�$���O/��V�9j��|f0��`3��f0��`3��f0��`�·cw2�dY�eY�eY�eY�eY�eY���JrG��qW8i5�Y�x��new{��6��0#�F��PL��&U� "��z�H�,����dA�bD>�"��S�;o�|4h�Q�@�Ġ���tئޞ/� [���c�%��6NwPe �R��c�Gn%�S�(�����d�1Cw�,�|�TE0`p|�>t/tǶ��C��>N����.1����b�}|
���U}k�����T��)�˲*���E�Iޕ->����afu�;�9�q~
��\�E0�{�:D�)vzH�&>��`�Hq�j9A�<u�F�U�@)v��.ҕ��n��g@lG�ݥ�E)�V`0
d �\"C�20�C�)��|��9 ���fw�E����H�c@?�`_�ŭgP.d��+�����4�P�( ?�
�"Wd
yg���E��!��}��27[_˲,˲,˲,˲,���?�s�� tEXtAuthor David Turner�� IEND�B`� design/index.html 0000644 00000015024 15170676640 0010030 0 ustar 00 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type"
content="text/css">
<meta http-equiv="Content-Script-Type"
content="text/javascript">
<meta name="description"
content="FreeType Documentation">
<meta name="Author"
content="David Turner">
<link rel="icon"
href="../image/favicon_-90.ico">
<link rel="shortcut icon"
href="../image/favicon_-90.ico">
<link rel="stylesheet"
type="text/css"
href="../css/freetype2_-90.css">
<script type="text/javascript"
src="../../../js/jquery-1.11.0.min.js">
</script>
<script type="text/javascript"
src="../../../js/jquery.ba-resize.min.js">
</script>
<script type="text/javascript"
src="../../../js/freetype2.js">
</script>
<title>FreeType Design</title>
</head>
<body>
<div id="top"
class="bar">
<h1><a href="http://freetype.org/index.html">FreeType</a> Design</h1>
</div>
<div id="wrapper">
<div class="colmask leftmenu">
<div class="colright">
<div class="col1wrap">
<div class="col1">
<!-- ************************************************** -->
<div id="introduction">
<p>This document gives an overview of some FreeType 2
internals. Read this carefully if you want to understand
the innards of the library in order to hack or extend
it.</p>
<p>Note that many, quite important details are still
missing, which are hopefully addressed in the not too
distant future. Volunteers to help with this task are
highly welcomed!</p>
</div>
<!-- ************************************************** -->
<div id="contents">
<h3><a href="design-1.html">Introduction</a></h3>
<h3><a href="design-2.html">I. Components and APIs</a></h3>
<h3><a href="design-3.html">II. Public Objects and
Classes</a></h3>
<ul>
<li>
<a href="design-3.html#section-1">1. Object Orientation
in FreeType 2</a>
</li>
<li>
<a href="design-3.html#section-2">2. The <tt>FT_Library</tt>
class</a>
</li>
<li>
<a href="design-3.html#section-3">3. The <tt>FT_Face</tt>
class</a>
</li>
<li>
<a href="design-3.html#section-4">4. The <tt>FT_Size</tt>
class</a>
</li>
<li>
<a href="design-3.html#section-5">5. The <tt>FT_GlyphSlot</tt>
class</a>
</li>
<li>
<a href="design-3.html#section-6">6. The <tt>FT_CharMap</tt>
class</a>
</li>
<li>
<a href="design-3.html#section-7">7. Objects
Relationship</a>
</li>
</ul>
<h3><a href="design-4.html">III. Internal Objects and
Classes</a></h3>
<ul>
<li>
<a href="design-4.html#section-1">1. Memory Management</a>
</li>
<li>
<a href="design-4.html#section-2">2. Input Streams</a>
</li>
<li>
<a href="design-4.html#section-3">3. Modules</a>
</li>
<li>
<a href="design-4.html#section-4">4. Summary</a>
</li>
</ul>
<h3><a href="design-5.html">IV. Module Classes</a></h3>
<ul>
<li>
<a href="design-5.html#section-1">1. The <tt>FT_Module_Class</tt>
Structure</a>
</li>
<li>
<a href="design-5.html#section-2">2. The <tt>FT_Module</tt>
Type</a>
</li>
</ul>
<h3><a href="design-6.html">V. Interfaces and
Services</a></h3>
</div>
<!-- ************************************************** -->
<div class="updated">
<p>Last update: 13-Feb-2018</p>
</div>
</div>
</div>
<!-- ************************************************** -->
<div class="col2">
</div>
</div>
</div>
<!-- ************************************************** -->
<div id="TOC">
<ul>
<li class="funding">
<form action="https://www.paypal.com/cgi-bin/webscr"
method="post"
target="_top">
<input type="hidden"
name="cmd"
value="_s-xclick">
<input type="hidden"
name="hosted_button_id"
value="SK827YKEALMT4">
<input type="image"
src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif"
name="submit"
alt="PayPal - The safer, easier way to pay online!">
<img alt=""
border="0"
src="https://www.paypalobjects.com/de_DE/i/scr/pixel.gif"
width="1"
height="1">
</form>
</li>
<li class="primary">
<a href="http://freetype.org/index.html">Home</a>
</li>
<li class="primary">
<a href="http://freetype.org/index.html#news">News</a>
</li>
<li class="primary">
<a href="../index.html">Overview</a>
</li>
<li class="primary">
<a href="../documentation.html">Documentation</a>
</li>
<li class="primary">
<a href="http://freetype.org/developer.html">Development</a>
</li>
<li class="primary">
<a href="http://freetype.org/contact.html"
class="emphasis">Contact</a>
</li>
<li>
<!-- separate primary from secondary entries -->
</li>
<li class="secondary">
<a href="index.html" class="current">FreeType Design</a>
</li>
<li class="tertiary">
<a href="design-1.html">Introduction</a>
</li>
<li class="tertiary">
<a href="design-2.html">Components and APIs</a>
</li>
<li class="tertiary">
<a href="design-3.html">Public Objects and Classes</a>
</li>
<li class="tertiary">
<a href="design-4.html">Internal Objects and Classes</a>
</li>
<li class="tertiary">
<a href="design-5.html">Module Classes</a>
</li>
<li class="tertiary">
<a href="design-6.html">Interfaces and Services</a>
</li>
</ul>
</div>
</div> <!-- id="wrapper" -->
<div id="TOC-bottom">
</div>
</body>
</html>
design/library-model.png 0000644 00000003220 15170676640 0011276 0 ustar 00 �PNG
IHDR � � U�� PLTE��� t���T #IDATx����n�< p9��#�ͩڧp$�����9�cT{�x���08ߖ�/��)�qD `aaaaaaa�o��C��CC�9�<r�E9��Ë�l�9�s�XF ARv@ ����1
-u���I- �.�? �P,v���|-�W�(�w4c|�S{���w�N7
`C u����ӂ~#vA<����#{�!/r�e���I�:��y�o�����\'z
��S�>:~NN��y�����;Ng:����N��;��#V��1ǜ��<��>&�D�h̙��eS���gsu��1�s^t���F��;�ط��N{x���pPw�<��V�=�!{�L�Y�C
���UuH�oU�~P�Y���%r���������뺮�\� N4*��g.ˈ��|��%��h�'�v�ۓU)��=}۵JN��Y_r��z�8Ͱ�u]��3�=t�>/u�;*:Uvמ'�g���s����|����W��I�|Y�9��s˜��s��s���G{�u�{��T��w���o?�����;��J��y�����^��Z�q~|tU�B�C�����q���m[�[��3xщ1 �ikਲ਼��cy�q�gً� @�p���B�A{8~d�q����<N#�v�s\{MGNr��~�k-)�����/����m>5�s�1�s�^*:��_X
�&Rm��[s$��(�Ɯ9ᶶc�9.��s@6�Ll
('_Y��:�6��Ɯ���~o�)94��F^��� d=G�5�3�9>��������G<���=���K
�R0���?"@��N: @�Ô*;����0kA&O:��CM�s0���ϩ=,5 �<�'>��� �%��н�,�����t�]���������`C�j��~%�F��]���q��+ǏL�cWF=$iO�J��t0�q���on�SN_��rhlq3�����$���ײ���\tI]�g"�z�A� )���I<u}g�q���;����v�%%r��Kh�_���8� ]!x��d����"��g'�(
�b���zW����o��g���� RBS_��|���N����ۥ�㤼�u�l�x�t"0@�1A{\����o[�s�պ��r�.��C`���s��qB"g�mW���i�8>�#+>�v�:Ҷ��:^�՜�����E������-���5�kSbF�>�9Nʼné��\��ud�㴝�;�3���&.�w�,w���!��S��
WW}������N�DJ������99�}u��*�շOM;r~�W���I�� ����Nf:�wdo���
���#-��b�H����X��w�:Ŵ�j&,�\���=��K� `}��:�����[^�Aط��$k���D�5g`���N�z���9��z�5qa]���1���uKz9-�9�c�9�N�Ħ���À�K`It��w �y��� � �N��Q������C��ߢz�%�;x��'���c�9�l�y⺘�������v�]�����J� tEXtAuthor David Turner�� IEND�B`� design/simple-model.png 0000644 00000003116 15170676640 0011127 0 ustar 00 �PNG
IHDR � z 3�� PLTE��� t���T �IDATx���An�:�ߖ#Y��-F(�p�.���X!Vu���7��6�Ks�3A��|�9vL�(((((((((((((((((((((^>���v
r���C��#n���?�#��k݅R�$��>dl��KYwyIH����r��e���Y}d��'�{��Ndr���.#�o~{k�ߞ� Y����|� `��d�n
�fLF�[��"��e{�R((�����
+TaM��dy~�R)�YBj
�r�8~�/������H���7#��uw����{չ���&�~��}^���dL_ކYL~��H2a�{ٿ�|I�Eer~YKD�0�k=T���ld7�>|#�ﭗG����A�X����W�:�Zv
�����E�>�| ��?v����7 H��qx�'ε�2y�q�%�e��,�������;_�&�\�e"� v��yf�E���@&�I�y_"'y�0�V o�I�H���Qdw~Zw드}y~�e&���E� �@��GR��2G_J��}9�����V}@��K�I���]�� ����r/��Ye�p�|@� ��;Ɋ%9G�8v�@���_��$�?�|�ޗǰ/��Q��P�.��|_s/�n������=�Q|��<�G6I�}��%P{/��h�y���\L�Ar ���Nr.�wRx��A \H����場��/�r�^�� 'ɡ��Qw����@��DI$�DI$ �Y�%�����Y�Y�����ِ+d��d�0U^R�>�1�%�@�B(�"/
�*8��a��7Oҗ�Ѱ��F������I�LGm~�9�d�/)���Ź,D��OAT�N�Er�933b�Kݓn�$�wf���u^I1xLe"JA�4۸�S$l�g�5k,�*Mf��z��Y���$l��]�6a����ȏ���K>�;�5���d���e���>�����4'�(���M�q��U�u��{�3q-4��v�t�v��f9]�*;1��}����V&�]���UL�L�{�K��F��G�ĝ�lz����{tL�T;C^�%��3�5��:"��yI3��Y��n,m�BF�e�*qd���"_&���cYdc�~���9���Tٛ���~r���F���4�#GO���P\�4�I$�D�Zdպ���P]�+�
�QiT.�
vcL[�#�U[4l�,+� �lÄP��e�{wp�d�d��B(��4Ç��p�`�I�&�R&)���n��ێ�Xkފ�d#�vÔi�Q�RF �TeL[,�K3�Bm�Bæ�� ��%K�Z��T5F2g���J�)3�%C2�a8��H_�-�C�t��w���6��3 �2y��a��|@��!�H"�|�vs4fw�X�M"�$r1�,��K
1���*�#��D�{^*���K䟔��Lb�H"�$�H"�|Er�!����]��d��������^�/-P0�l�%����L}�|A��/�/Oú�#�1�}�t��N$�DI$�D�K�ߏ������������x��?ٕ���� tEXtAuthor David Turner�� IEND�B`� glyphs/bbox1.png 0000644 00000002667 15170676640 0007622 0 ustar 00 �PNG
IHDR � 2ȰS PLTE��� �����U��i GIDATh��Y��#7&�"��o �H�8m,\�5��5�ԤO��}��[�!�q �gH���zFi��Ůe�ď�H�U�r�7#ҍ�n��ެ�8t!5�>����ѷ�(b���l�;����2�߲�
:���iv�/(�F�s"���N����>�ͅ<�Н�ݙ�e<���l��A����<��b�Љ���B�e�v�K�):��N������ġn�������N�S�у
Q!k�̍��`Y'*�^*�~����v��������������X�PJD����H9A�"�) l!_��m|rh�gH��n�fZ8�x���!�V=�]y����ޗw�{���\��|VU>�VYA���İ�%WU���d��g�a�z����lO-D��˅�yd�w���\k�êm�:N��\�dM�!�Oސ�s�<�(+����<+\�M�"���g���g�s�ۧ`�}��H#�DK�9>�a�D!em�A��f��N~����i�Zض�*���>˛����H9�?�f$���`�ˆJ�3��
�ﺑߞ�vC�r^[��>v��~h6n��P+����V'��2r���j�Ϣ�j�&�ݟ�#�N�C�}8{6�(���!U��<4\��|�.��U�p���w6W'4�T�b#Y�R�z|q)�*�R�z���CX#���2|�1�V��5�=}V�?�JI��,ֻH.*���3�T�����ݖ^�l�])�,�"�H����w�X?�W�\��e>dVv@�~�u^±q�ij;���hW��H
D&�ʬ�G��|ɗ�%�~��Ta�U[�י��#k��b|�U�sy�I��<_�������<a���+Ճ1>���#��g'�/��f��̷�l:��l��ͬ��Ϸ[���Y/��7k2ב�?we^g��u��s^�*W���ȩ��f�B7��oFm�q�H��GR�I�ԁ�p��0&IrAF��Qk{}��eG=>f��SH�ēH QQ����Nz�z( Y1-34!��n�8%5��G3� n�����$�$���Y#6NG�01�+L�� ^M0�XXifx(k
��>>~���.�� ��$�0Ër�ZG[��x"R8!-�.���ʁ����S�i�Q�IS"�)iq�c4��IS�����F�qr�iv�"���a�89
DD�4�g{\:���� R�d�����~�q�t#����8��'��q#;��dFAE3<ĉ3$h��yG�<)��b�J{���Ci�ѓS�,@�*m�����y�V
�" xrʒE�'k��<<et%�S�42"n�D��$�5Ә��)ۨ��w���U���_N�}�F�c tEXtAuthor David Turner�� IEND�B`� glyphs/bbox2.png 0000644 00000002342 15170676640 0007611 0 ustar 00 �PNG
IHDR � � �h�3 PLTE��� �����U��i rIDATh��ZA��6%�����~P�t
���=[���t?�&]8��ز-��(�,$~&E>Rc�K.���oo�c8��
� �A3�T <UN*9"�IЧ� @<�.J �$Ҁ��Y��*z�r%�~z��ДV8ܢޯ~���~����������n�~�����p�k}ljju��eG ��)`]���N�YծKޖ�)�����Ǽ��Jsߗ�OV.�^���,]�l�˖_xu3�����ʚz�?nX���]u�mor�{ߟ}K�2���[w�\aӟ�����v����Nxl;�?��~����n�����pDB��8��>�W7IW��M #�y��r��oͮ[��څC}���,p��#/��;q�huor2�y�WZ��a~����p�_��}O��'����K/?i��uz�,�`�gP�uP�3�8�e���x�7��hu����6Kk�S���z��.�5���㕗V�sp��?�=øI"?�y�{�1r̕o��6po�$�--�n�B��O�\}�����v���w47��%՝֭�/[Q�6l���
��q��Bǹ}P
��}���0jOq��I��s��� ���M� \����
Z��s�4Gy��Gcn����M{�z�5�\r�%�\r�%�\r�%�/�ۡlv��o���s8�\�T`�N�$�ۉL� ���3�h��@�\�Y���|��x ��(P�V�� ��h� 2m����7�ʩ(S��dd�C�ৌ��3�J]��!Д"�$r)B�D�$!�(1��Iv�
�F�G1$�q!�D�x�
�8��7�B")4�CB�����6� �-X��j��Y�9Z�&8G"�
n�;"|7�F� �9k�����7���K� W���U�c���3L٢7ϩ�%�o���Ɏ ��$��%dG�H��肄��h�%��)�K����HW���āJ �㠩�s6�5�XG�XI,g�3{K`�GГ��".%XYe'w<�*Q��_+�i}���Ź���N깖R=s�K�[[�'���A�$$Q3!Eq�og.B L�T1F�e��P�B�$G���p�K�
G����|�s��9�^����\yp����N��Ɍ�>