Your IP : 216.73.216.86


Current Path : /home/emeraadmin/public_html/4d695/
Upload File :
Current File : /home/emeraadmin/public_html/4d695/freetype-devel.tar

design/basic-design.png000064400000003650151706766400011073 0ustar00�PNG


IHDR�9|z�PLTE����������5IDATx��kr�:��w��d�;H��[�����I6�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��ٱ˯��tEXtAuthorDavid Turner��IEND�B`�design/design-1.html000064400000016570151706766400010337 0ustar00<!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&nbsp;2 library.  Its goal
            is to help developers better understand 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
                &lsquo;features&rsquo;</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&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 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&nbsp;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>
      &nbsp; <!-- 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.html000064400000023264151706766400010336 0ustar00<!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&nbsp;/&nbsp;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&nbsp;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&nbsp;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&nbsp;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 &lsquo;load&rsquo; 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 &lsquo;winfonts&rsquo; (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
                &lsquo;multi-masters&rsquo; (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&nbsp;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>
      &nbsp; <!-- 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.html000064400000041725151706766400010341 0ustar00<!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&nbsp;/&nbsp;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&nbsp;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&nbsp;2</h3>

          <p>Though written in ANSI&nbsp;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&nbsp;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
                &lsquo;foo&rsquo; in FreeType&nbsp;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
                (&lsquo;Rec&rsquo; is short for
                &lsquo;record&rsquo;).</p>
            </li>
            <li>
              <p>Class derivation is achieved internally by wrapping
                base class structures into new ones.  As an example,
                we define a &lsquo;foobar&rsquo; class that is derived
                from &lsquo;foo&rsquo;.  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 &lsquo;foobar&rsquo;
                object is also a &lsquo;foo&rsquo; 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 &lsquo;foo&rsquo; 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
                &lsquo;foo&rsquo;.</p>
            </li>
          </ol>

          <p>In the following sections of this chapter, we will refer
            to &lsquo;the <tt>FT_Foo</tt> class&rsquo; to indicate the
            type of objects handled through <tt>FT_Foo</tt> pointers,
            be they implemented as &lsquo;foo&rsquo; or
            &lsquo;foobar&rsquo;.</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&nbsp;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 &lsquo;empty&rsquo; library
            instance with no module registered in it.  You can
            &lsquo;install&rsquo; 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, &lsquo;Arial&rsquo; and &lsquo;Arial
            Italic&rsquo; 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&nbsp;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&nbsp;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-&gt;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 &lsquo;prep&rsquo; program in a <tt>TT_Size</tt>
            structure, while the Type&nbsp;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&nbsp;:-)</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&nbsp;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&nbsp;1 hinter is used.</p>

          <p>Each face object has a single glyph slot that is directly
            accessible as <tt>face-&gt;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
            &lsquo;platform&rsquo; and an &lsquo;encoding&rsquo; 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>
      &nbsp; <!-- 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.html000064400000036657151706766400010352 0ustar00<!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&nbsp;/&nbsp;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&nbsp;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&nbsp;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&nbsp;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
            &lsquo;broken file&rsquo;.</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&nbsp;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&nbsp;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
                &lsquo;registered&rsquo; 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&nbsp;:-)</p>

          <p>Finally, it is important to understand that
            FreeType&nbsp;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&nbsp;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&nbsp;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>
      &nbsp; <!-- 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.html000064400000045352151706766400010343 0ustar00<!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&nbsp;/&nbsp;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&nbsp;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&nbsp;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&nbsp;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&eacute;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&nbsp;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&nbsp;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
                    &lsquo;light&rsquo; 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&nbsp;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&nbsp;2 that is required to install this
                  module.  The default value is 0x20000 for FreeType
                  version&nbsp;2.x</p>
              </td>
            </tr>
            <tr valign=top>
              <td>
                <p><tt>module_interface</tt></p>
              </td>
              <td>
                <p>Most modules support one or more
                  &lsquo;interfaces&rsquo;, 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>
      &nbsp; <!-- 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.html000064400000027712151706766400010344 0ustar00<!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&nbsp;/&nbsp;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&nbsp;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>, &amp;<em>table-name</em> },
  [{ <em>service-id2</em>, &amp;<em>table-name2</em> }, [...]]
  { NULL, NULL }
}</pre>

              <p>Example:</p>

              <pre>
static const FT_ServiceDescRec demo_services[] =
{
  { FT_SERVICE_ID_DEMO, &amp;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&nbsp;1. Note that
                the <tt>{NULL,&nbsp;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  &lt;freetype/internal/services/svdemo.h&gt;</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>
      &nbsp; <!-- 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.png000064400000004362151706766400011566 0ustar00�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����Sy�=(��CRH��8����?<f;N�����d��3������P�q!^f̕غɿ���4R��>�i�*���fl' ��Ъ�!C6Ъ�!�����F��H�v�
�,0��P�B��C�i�h�������H��4c~�؛�3��i��`85`��;>�K�w@ƀϛ�B-3���1��:��2�ϛ6׬K�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��tEXtAuthorDavid Turner��IEND�B`�design/index.html000064400000015024151706766400010030 0ustar00<!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&nbsp;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&nbsp;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>
      &nbsp; <!-- 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.png000064400000003220151706766400011276 0ustar00�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�XFARv@����1
-u���I-�.�? �P,v���|-�W�(�w4c|�S{���w�N7
`Cu����ӂ~#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�tEXtAuthorDavid Turner��IEND�B`�design/simple-model.png000064400000003116151706766400011127 0ustar00�PNG


IHDR�z3��	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.�
vcL[�#�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��?ٕ����tEXtAuthorDavid Turner��IEND�B`�glyphs/bbox1.png000064400000002667151706766400007622 0ustar00�PNG


IHDR�2ȰSPLTE��������U��iGIDATh��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����Nz�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�ctEXtAuthorDavid Turner��IEND�B`�glyphs/bbox2.png000064400000002342151706766400007611 0ustar00�PNG


IHDR���h�3PLTE��������U��irIDATh��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��Ɍ�>tEXtAuthorDavid Turner��IEND�B`�glyphs/body_comparison.png000064400000002366151706766400011772 0ustar00�PNG


IHDRD(�g�aPLTE������mmU��U���mm�����|��zIDATh��r�6�?q�t���]C=�K�c�tx%j��C��]�c��N�v�0����I:�f͚5k֬Y�f͚���5���s�N������{�&����$i��3WG��޻X���eD��J�	��,�����d�}�uݗ=�u{�87���e��e�x��
D.b}�mΏ'`A'��O���K���e��@p~K�o�GU�&kh�n�,䎦-���J��
����E-OR��GY9c�*�	���D�������tQ#��6����B�U(�a�FjA����uқ�DY-����>�5�^b���B����]\7!r�*R��X������:'��ZU��(�M�峯�S8�n�]NԱ�(���PtJ��;O@�	�X��Q	��q�QI8�S� �	���B�H
���L��U����V
�Xq��y�O���7��B�w�	�E����˩��X�J�wD�qk������8l��f2���ʁ��N8��~���zs�.�"�����: hTX�C��l5-R�7�5����]*Ö%	 po� :ʒæ	C�|X�g���!
c��}��$_�3Ru@��Q�H��=AdX��D9½�)�Z�|�h']@dP��M��eD�Q�P)�֜C�/ ����}����$h���q���T-�pр4�:�hl�Qo�
�7%U!� P�����/��$��X��"O� vC�è�\��ҙ��l��U�-��kunC�SD9!�oGm�����yB�{��H��Kr��(UG��h���+�k���#��g*�!�0E4�EӍ�È�O��ԯw���#u��ֺ5N�;)�����A�J�^�Di���䝒YR!j��NeXj�}\WU�J����;�h6�J
M+�M�ۡ��ф�]��RR@rJ;_�H�:��?��3<�K08����[�6l��m��9Uzyx!���Q���'��:�z� ��э��/2	)((X�
a�3����r�$S����c|�FML\�h��u�q�@P}4����v�ً�aD�<tP�� ����	��2�/|3�:r�2��^3�ή��e�jD:	����W{r�Z�w~�22�Y�f͚5k֬Y�f�_��6�k���,tEXtAuthorDavid Turner��IEND�B`�glyphs/bravo_kerned.png000064400000000726151706766400011242 0ustar00�PNG


IHDRk%��
#PLTE���������mmU��U���mm��_ZIDAT8��1R1E���fh����\`��?���t�D�5��e��p�k�$iS�y��3)B�xҘ�9S%�&(у-A؍x+mO�-8A՝��+�#�MXB��h�;m �t�*-�z�u�;�p���q���yk���s���
��[��k��б��]L�ɱ�%Ύ*��0�a:�N�$y)a`�`k��lUAR�n
x�T鸂a	D�*l�.y���X�a^u/I��d�+��]`>A��c8p��X�6o,��t�~�;�o����5V?
WK���;��吘��US�e��<���N8O��4f:IA����~����f`��4 >h�tEXtAuthorDavid Turner��IEND�B`�glyphs/bravo_unkerned.png000064400000000737151706766400011607 0ustar00�PNG


IHDRt%af�FPLTE���mmU��������U�۪mm�|7��cIDATH��Mr�0�?	l�����w�[r���@��Er�M���V�E��
���?x�C���$��+���>d)B�����XS!�&�эuy,�<¡0�k���*��<m�G;B.@M;Pjr�y'"@_�b��\������g�ٟ7Y������\�d���-4�vgǓ[�ނ��@C��0���'�i�A%)�!��c��|^T@Rtb�;w��j��%覵1�/�aa�I�ƵO��ڴ�a|�u3��a��pV�Ӽl�,�ec��4>gjTT���X����ꯇpJ;��^`V����L���!y8櫤~���� ��0I�=X�=��<���d%��0�tEXtAuthorDavid Turner��IEND�B`�glyphs/clipping.png000064400000002715151706766400010406 0ustar00�PNG


IHDR�N�PLTE���������mmU��Umm��^a�TIDATx��1v�0�	I݁��,7mg�mw���4���CY�H*
�!���C�?A A�2F�R�T*�J�R�T*�J�R�T�7ć���!��ZGJ�4J*��A)qP�,�Ӆ��T8=RPn(�Z�iIh@q�4Lq(š8��P�Cq(š8��P�� �a�(K���Hs�Aq(š8��P�Cq(š8��ǟD���C[a��;��|�T�Cdh#;;�˲6pW�!�	���펷BD�/�Ch����p��L4L&���!�sc��OsF�.*�c6LCN���,
M��J�� ��0
98pJ&�=���er�!`r�t�y�V�A2�$DZ�!�F>�vyV��9U4��!`��,X�0�16X������1���E�ٓ��0
�S:$�a��C8h�c�@D��8�z�X�!t�~v���h��08,,�u=(_J;HKi'ˎ��C���(<��h���kd��R�F�Je#��kÁo��zd*�1�G�A��Yig�y�}�R�k=
�Ead��j�G����p�8;���3J~P�c�[�p(��z��
�,t��3� ;�&iX���$�qYӐ���a��4�.��f���0����0����'G�հ�0
y�a�b)o��y�#kC!s�
�8��0�9=x8��^h3�,8Ć�0�߅{\63�p�/BCN��z�h���ȱ))4��D;��"�������t��O��#���+���8����c���d(� Y��ml^WC�8�e�0֫��6��P$�>xV�^mEG��8�9︋��B�k���R���0�=Cq8�������|�b bM���9�V���p��„8(�{,��ys��y-���v�W�
��Wy��m��W@qviv�����7�IG`�b�n.����#����������ù 2�O[� ���tټ	��
Á���!��Jg���h�}\��V�z�t��|�+ڥk��������[���.���I��K�c��7����Gғ�6c�uϓt�q��1�5p-�\zb�b��]Ц0�xC�p�ő�P���6mQ�?�/[J�0��!�!��8J���
G_��
�y~�b<N��C���Rj=�n�PJ��f�u���_*l�)bK�Q����\����8�Y:9
j��,��
�]�ΔUYC
�C�R�T(=��LD�?���Ne�:�7���(n�v��OojPaC��oD��T�
�T*�J�R�T*�J�R��#��r�z,L�UtEXtAuthorDavid Turner��IEND�B`�glyphs/down_flow.png000064400000001516151706766400010575 0ustar00�PNG


IHDR�u��	PLTE�����=�-�IDATx���j�0�?�B'-$w�Ӡ��!�o�h�)�)�����n�-eS[r趝���ɇ$Kج
X,ˮ���@�s#3�*m�iz��m�Lx>M_��iگ<�i�<!�a��а$a��0m�t�Cx:w*C�B@�rYLo�Ң��'��7L_&�4��iF7��[��%��
9Hq�NRP���۸l���^x�׷)#F�U28�NE�Cܠ���x���r��&���(1�~%��o�د8 t*;δ)�����2��(
�t��
�emST_W��AY=/KrJ�겺Ң�ª���_�4�E��i�f�Qԃ�G��}3Z�E5y^U�*�]���w�?|����䘮�#��i,�t�kW��zD�5)�t�묥�
�X.O$��&����;�
'��U�Q<�\r]ƖsD�k�%��k�cA����2V�x* iU��qQ<�g��3�e�c����s-H}-Ň�]��2�U\��Q��;>[]SL1�Z�SL����2�S��L1�S��L���Z�kd-�Y3w����}
�\~�Lq���+N~R��s`C���ʯ�N���3C�yI)Ǽ�v��f�
��ZY)���[��0�*~�̪���_�&��+��r�_.3��3�N����0'V�PZO�����I������Hz���b֏�����#��G�R�3b.FH�%����)M������q@D�S��~�v�ŰX,��|�W/p���tEXtAuthorDavid Turner��IEND�B`�glyphs/glyphs-1.html000064400000023404151706766400010423 0ustar00<!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 Glyph Conventions / I</title>
</head>


<body>

<div id="top"
     class="bar">
  <h1><a href="http://freetype.org/index.html">FreeType</a> Glyph
    Conventions&nbsp;/&nbsp;I</h1>
</div>


<div id="wrapper">

<div class="colmask leftmenu">
  <div class="colright">
    <div class="col1wrap">
      <div class="col1">


        <!-- ************************************************** -->

        <div id="basic-typographic-concepts">
          <h2>I. Basic Typographic Concepts</h2>

          <h3 id="section-1">1. Font files, format and
            information</h3>

          <p>A <em>font</em> is a collection of various character
            images that can be used to display or print text.  The
            images in a single font share some common properties,
            including look, style, serifs, etc.  Typographically
            speaking, one has to distinguish between a <em>font
            family</em> and its multiple <em>font faces</em>, which
            usually differ in style though coming from the same
            template.</p>

          <p>For example, &lsquo;Palatino Regular&rsquo; and
            &lsquo;Palatino Italic&rsquo; are two distinct
            <em>faces</em> from the same <em>family</em>, called
            &lsquo;Palatino&rsquo; itself.</p>

          <p>The single term &lsquo;font&rsquo; is nearly always used
            in ambiguous ways to refer to either a given family or
            given face, depending on the context.  For example, most
            users of word-processors use &lsquo;font&rsquo; to
            describe a font family (e.g., &lsquo;Courier&rsquo;,
            &lsquo;Palatino&rsquo;, etc.); however, most of these
            families are implemented through several data files
            depending on the file format: For TrueType, this is
            usually one per face (i.e. <tt>arial.ttf</tt> for
            &lsquo;Arial Regular&rsquo;, <tt>ariali.ttf</tt> for
            &lsquo;Arial Italic&rsquo;, etc.).  The file is also
            called a &lsquo;font&rsquo; but really contains a font
            face.</p>

          <p>A <em>digital font</em> is thus a data file that may
            contain <em>one or more font faces</em>.  For each of
            these, it contains character images, character metrics, as
            well as other kind of information important to the layout
            of text and the processing of specific character
            encodings.  In some formats, like Adobe's Type&nbsp;1, a
            single font face is described through several files (i.e.,
            one contains the character images, another one the
            character metrics).  We will ignore this implementation
            issue in most parts of this document and consider digital
            fonts as single files, though FreeType&nbsp;2 is able to
            support multiple-files fonts correctly.</p>

          <p>As a convenience, a font file containing more than one
            face is called a <em>font collection</em>.  This case is
            rather rare but can be seen in many Asian fonts, which
            contain images for two or more representation forms of a
            given scripts (usually for horizontal and vertical
            layout).</p>


          <h3 id="section-2">2. Character images and
          mappings</h3>

          <p>The character images are called <em>glyphs</em>.  A
            single character can have several distinct images, i.e.,
            several glyphs, depending on script, usage or context.
            Several characters can also take a single glyph (good
            examples are Roman ligatures like &lsquo;fi&rsquo; and
            &lsquo;fl&rsquo; which can be represented by a single
            glyph).  The relationship between characters and glyphs
            can be very complex but won't be discussed in this
            document.  Moreover, some formats use more or less
            complicated schemes to store and access glyphs.  For the
            sake of clarity, we only retain the following notions when
            working with FreeType:</p>

          <ul>
            <li>
              <p>A font file contains a set of glyphs; each one can be
                stored as a bitmap, a vector representation, or any
                other scheme (most scalable formats use a combination
                of mathematical representation and control
                data/programs).  These glyphs can be stored in any
                order in the font file, and are typically accessed
                through a simple glyph index.</p>
            </li>
            <li>
              <p>The font file contains one or more tables, called
                <em>character maps</em> (also called
                &lsquo;charmaps&rsquo; or &lsquo;cmaps&rsquo; for
                short), which are used to convert character codes for
                a given encoding (e.g., ASCII, Unicode, Big5, ShiftJIS,
                etc.) into glyph indices relative to the font file.  A
                single font face may contain several charmaps.  For
                example, many OpenType fonts contain an Apple-specific
                charmap as well as a Unicode charmap, which makes them
                usable on both Mac and Windows platforms.</p>
            </li>
          </ul>


          <h3 id="section-3">3. Character and font metrics</h3>

          <p>Each glyph image is associated with various metrics which
            describe how to place and manage it when rendering text;
            see <a href="glyphs-3.html">section&nbsp;III</a> for more.
            Metrics relate to glyph placement, cursor advances, as
            well as text layout.  They are extremely important to
            compute the flow of text when rendering a string of
            text.</p>

          <p>Each scalable format also contains some global metrics,
            expressed in notional (i.e. font) units, to describe some
            properties of all glyphs in the same face.  Examples for
            global metrics are the maximum glyph bounding box, the
            ascender, descender, and text height of the font.</p>

          <p>Non-scalable formats contain metrics also.  However, they
            only apply to a set of given character dimensions and
            resolutions, and are usually expressed in pixels then.</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>
      &nbsp; <!-- separate primary from secondary entries -->
    </li>

    <li class="secondary">
      <a href="index.html">FreeType Glyph Conventions</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-1.html" class="current">Basic Typographic Concepts</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-2.html">Glyph Outlines</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-3.html">Glyph Metrics</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-4.html">Kerning</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-5.html">Text Processing</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-6.html">FreeType Outlines</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-7.html">FreeType Bitmaps</a>
    </li>
  </ul>
</div>

</div> <!-- id="wrapper" -->

<div id="TOC-bottom">
</div>

</body>
</html>
glyphs/glyphs-2.html000064400000044314151706766400010427 0ustar00<!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 Glyph Conventions / II</title>
</head>


<body>

<div id="top"
     class="bar">
  <h1><a href="http://freetype.org/index.html">FreeType</a> Glyph
    Conventions&nbsp;/&nbsp;II</h1>
</div>


<div id="wrapper">

<div class="colmask leftmenu">
  <div class="colright">
    <div class="col1wrap">
      <div class="col1">


        <!-- ************************************************** -->

        <div id="glyph-outlines">
          <h2>II. Glyph Outlines</h2>

          <p>This section describes the way scalable representations
            of glyph images, called outlines, are used by FreeType as
            well as client applications.</p>

          <h3 id="section-1">1. Pixels, points, and device
            resolutions</h3>

          <p>Though it is a very common assumption when dealing with
            computer graphics programs, the physical dimensions of a
            given pixel (be it for screens or printers) are not
            squared.  Often, the output device exhibits varying
            resolutions in both horizontal and vertical directions,
            and this must be taken care of when rendering text.</p>

          <p>It is thus common to define a device's characteristics
            through two numbers expressed in <em>dpi</em> (dots per
            inch).  For example, a printer with a resolution of
            300&times;600&nbsp;dpi has 300&nbsp;pixels per inch in the
            horizontal direction, and 600 in the vertical one.  The
            resolution of a typical computer monitor varies with its
            size (10&Prime;&nbsp;and 25&Prime;&nbsp;monitors don't
            have the same pixel sizes at 1024&times;768), and of
            course the graphics mode resolution.</p>

          <p>As a consequence, the size of text is usually given in
            <em>points</em>, rather than device-specific pixels.
            Points are a <em>physical</em> unit, where 1&nbsp;point
            equals 1/72th of an inch in digital typography.  As an
            example, most books using the Latin script are printed
            with a body text size somewhere between 10 and
            14&nbsp;points.</p>

          <p>It is thus possible to compute the size of text in pixels
            from the size in points with the following formula:</p>

          <center>
            <code>pixel_size = point_size * resolution / 72</code>
          </center>

          <p>The resolution is expressed in <em>dpi</em>.  Since
            horizontal and vertical resolutions may differ, a single
            point size usually defines a different text width and
            height in pixels.</p>

          <p><em>Unlike what is often thought, the &lsquo;size of text
              in pixels&rsquo; is not directly related to the real
              dimensions of characters when they are displayed or
              printed.  The relationship between these two concepts is
              a bit more complex and depends on some design choices
              made by the font designer.  This is described in more
              detail in the next sub-section (see the explanations on
              the EM square).</em></p>


          <h3 id="section-2">2. Vectorial representation</h3>

          <p>The source format of outlines is a collection of closed paths called
            <em>contours</em>.  Each contour delimits an outer or
            inner <em>region</em> of the glyph, and can be made of
            either <em>line segments</em> or <em>B&eacute;zier
            arcs</em>.</p>

          <p>The arcs are defined through <em>control points</em>, and
            can be either second-order (these are <em>conic</em>
            B&eacute;ziers) or third-order (<em>cubic</em>
            B&eacute;ziers) polynomials, depending on the font format.
            Note that conic B&eacute;ziers are usually called
            <em>quadratic</em> B&eacute;ziers in the literature.
            Hence, FreeType associates each point of the outline with
            flags to indicate its type (normal or control point).  As
            a consequence, scaling the points will scale the whole
            outline.</p>

          <p>Each glyph's original outline points are located on a
            grid of indivisible units.  The points are usually stored
            in a font file as 16-bit integer grid coordinates, with
            the grid's origin being at (0,0); they thus range from
            -32768 to&nbsp;32767.  (Even though point coordinates can
            be floats in other formats such as Type&nbsp;1, we will
            restrict our analysis to integer values for
            simplicity).</p>

          <p><em>The grid is always oriented like the traditional
              mathematical two-dimensional plane, i.e.,
              the <i>X</i>&nbsp;axis goes from the left to the right,
              and the <i>Y</i>&nbsp;axis from bottom to top.</em></p>
        
          <p>In creating the glyph outlines, a type designer uses an
            imaginary square called the <em>EM square</em>.
            Typically, the EM square can be thought of as a tablet on
            which the characters are drawn.  The square's size, i.e.,
            the number of grid units on its sides, is very important
            for two reasons:</p>

          <ul>
            <li>
              <p>It is the reference size used to scale the outlines
                to a given text dimension.  For example, a size of
                12pt at 300&times;300&nbsp;dpi corresponds to
                12*300/72&nbsp;=&nbsp;50&nbsp;pixels.  This is the
                size the EM square would appear on the output device
                if it was rendered directly.  In other words, scaling
                from grid units to pixels uses the formula:</p>

              <p align="center">
                <code>pixel_size = point_size * resolution / 72</code><br>
                <code>pixel_coord = grid_coord * pixel_size / EM_size</code>
              </p>

              <p>Another acronym used for the pixel size
              is <em>ppem</em> (pixel per EM); this value can be
              fractional also.  Note that fractional ppem values are
              not supported everywhere.</p>
            </li>
            <li>
              <p>The greater the EM size is, the larger resolution the
                designer can use when digitizing outlines.  For
                example, in the extreme example of an EM size of
                4&nbsp;units, there are only 25&nbsp;point positions
                available within the EM square which is clearly not
                enough.  Typical TrueType fonts use an EM size of
                2048&nbsp;units; Type&nbsp;1 or CFF PostScript fonts
                traditionally use an EM size of 1000&nbsp;grid units
                (but point coordinates can be expressed as floating
                values).</p>
            </li>
          </ul>

          <p>Note that glyphs can freely extend beyond the EM square
            if the font designer wants so.  The EM square is thus just
            a convention in traditional typography.</p>

          <p>Grid units are very often called <em>font units</em>
            or <em>EM units</em>.</p>

          <p><em>As said before, <code>pixel_size</code> computed in
              the above formula does not directly relate to the size
              of characters on the screen.  It simply is the size of
              the EM square if it was to be displayed.  Each font
              designer is free to place its glyphs as it pleases him
              within the square.  This explains why the letters of the
              following text have not the same height, even though
              they are displayed at the same point size with distinct
              fonts:</em></p>

          <p align="center">
            <img src="body_comparison.png"
                 height="40"
                 width="580"
                 alt="Comparison of font heights">
          </p>

          <p>As one can see, the glyphs of the Courier family are
            smaller than those of Times New Roman, which themselves
            are slightly smaller than those of Arial, even though
            everything is displayed or printed at a size of
            16&nbsp;points.  This only reflects design choices.</p>


          <h3 id="section-3">3. Hinting and Bitmap rendering</h3>

          <p>The outline as stored in a font file is called the
            &lsquo;master&rsquo; outline, as its point coordinates are
            expressed in font units.  Before it can be converted into
            a bitmap, it must be scaled to a given size and
            resolution.  This is done with a very simple
            transformation, but especially at small sizes undesirable
            artifacts can appear, in particular stems of different
            width or height in letters like &lsquo;E&rsquo; or
            &lsquo;H&rsquo; can occur.</p>

          <p>As a consequence, proper glyph rendering needs the scaled
            points to be aligned along the target device pixel grid,
            through an operation called <em>grid-fitting</em> (often
            called <em>hinting</em>).  One of its main purposes is to
            ensure that important widths and heights are respected
            throughout the whole font (for example, it is very often
            desirable that the &lsquo;I&rsquo; and the &lsquo;T&rsquo;
            glyphs have their central vertical line of the same pixel
            width), as well as to manage features like stems and
            overshoots, which can cause problems at small pixel
            sizes.</p>

          <p>There are several ways to perform grid-fitting properly;
            most scalable formats associate some control data or
            programs with each glyph outline.  Here is an
            overview:</p>

          <ul>
            <li class="emph">
              <p>explicit grid-fitting</p>

              <p>The TrueType format defines a stack-based virtual
                machine, for which programs (also
                called <em>bytecode</em>) can be written with the help
                of more than 200&nbsp;operators, most of them related
                to geometrical operations.  Each glyph is thus made of
                both an outline and a control program to perform the
                actual grid-fitting in the way defined by the font
                designer.</p>
            </li>
            <li class="emph">
              <p>implicit grid-fitting (also called hinting)</p>

              <p>The Type&nbsp;1, CFF, and CFF2 formats take a much
                simpler approach: Each glyph is made of an outline as
                well as several pieces called <em>hints</em> which are
                used to describe some important features of the glyph,
                like the presence of stems, some width regularities,
                and the like.  There aren't a lot of hint types, and
                it is up to the final renderer to interpret the hints
                in order to produce a fitted outline.</p>
            </li>
            <li class="emph">
              <p>automatic grid-fitting</p>

              <p>Some formats include no control information with each
                glyph outline, apart from font metrics like the
                advance width and height.  It is then up to the
                renderer to &lsquo;guess&rsquo; the more interesting
                features of the outline in order to perform some
                decent grid-fitting.</p>
            </li>
          </ul>

          <p>The following table summarizes the pros and cons of each
            scheme.</p>

          <table class="vertical-space">
            <thead>
              <tr>
                <th align="center">
                  <b>grid-fitting scheme</b>
                </th>
                <th align="center">
                  <b>advantages</b>
                </th>
                <th align="center">
                  <b>disadvantages</b>
                </th>
              </tr>
            </thead>

            <tbody>
              <tr>
                <td valign="top" align="center">
                  <p><b>explicit</b></p>
                </td>

                <td valign="top">
                  <p><b>Quality.</b>  Excellent results at small sizes
                    are possible.  This is very important for screen
                    display.</p>

                  <p><b>Consistency.</b>  All renderers produce the
                    same glyph bitmaps (at least in theory).</p>
                </td>

                <td valign="top">
                  <p><b>Speed.</b>  Interpreting bytecode can be slow
                    if the glyph programs are complex.</p>

                  <p><b>Size.</b>  Glyph programs can be long.</p>
                
                  <p><b>Technical difficulty.</b>  It is extremely
                    difficult to write good hinting programs.  Very
                    few tools available.</p>
                </td>
              </tr>
              <tr>
                <td valign="top" align="center">
                  <p><b>implicit</b></p>
                </td>

                <td valign="top">
                  <p><b>Size.</b>  Hints are usually much smaller than
                    explicit glyph programs.</p>

                  <p><b>Speed.</b>  Grid-fitting is usually a fast
                    process.</p>
                </td>
                
                <td valign="top">
                  <p><b>Quality.</b>  Often questionable at small
                    sizes.  Better with anti-aliasing though.</p>

                  <p><b>Inconsistency.</b>  Results can vary between
                    different renderers, or even distinct versions of
                    the same engine.</p>
                </td>
              </tr>
        
              <tr>
                <td valign="top" align="center">
                  <p><b>automatic</b></p>
                </td>
                
                <td valign="top">
                  <p><b>Size.</b>  No need for control information,
                    resulting in smaller font files.</p>
                
                  <p><b>Speed.</b>  Depends on the grid-fitting
                    algorithm.  Usually faster than explicit
                    grid-fitting.</p>
                </td>

                <td valign="top">
                  <p><b>Quality.</b>  Often questionable at small
                    sizes.  Better with anti-aliasing though.</p>

                  <p><b>Speed.</b>  Depends on the grid-fitting
                    algorithm.</p>
        
                  <p><b>Inconsistency.</b>  Results can vary between
                    different renderers, or even distinct versions
                    of the same engine.</p>
                </td>
              </tr>
            </tbody>
          </table>
        </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>
      &nbsp; <!-- separate primary from secondary entries -->
    </li>

    <li class="secondary">
      <a href="index.html">FreeType Glyph Conventions</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-1.html">Basic Typographic Concepts</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-2.html" class="current">Glyph Outlines</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-3.html">Glyph Metrics</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-4.html">Kerning</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-5.html">Text Processing</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-6.html">FreeType Outlines</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-7.html">FreeType Bitmaps</a>
    </li>
  </ul>
</div>

</div> <!-- id="wrapper" -->

<div id="TOC-bottom">
</div>

</body>
</html>
glyphs/glyphs-3.html000064400000037630151706766400010433 0ustar00<!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 Glyph Conventions / III</title>
</head>


<body>

<div id="top"
     class="bar">
  <h1><a href="http://freetype.org/index.html">FreeType</a> Glyph
    Conventions&nbsp;/&nbsp;III</h1>
</div>


<div id="wrapper">

<div class="colmask leftmenu">
  <div class="colright">
    <div class="col1wrap">
      <div class="col1">


        <!-- ************************************************** -->

	<div id="glyph-metrics">
	  <h2>III. Glyph Metrics</h2>

	  <h3 id="section-1">1. Baseline, pens and layouts</h3>

	  <p>The baseline is an imaginary line that is used to
	    &lsquo;guide&rsquo; glyphs when rendering text.  It can be
	    horizontal (e.g., Latin, Cyrillic, Arabic) or vertical
	    (e.g., Chinese, Japanese, Mongolian).  Moreover, to render
	    text, a virtual point, located on the baseline, called
	    the <em>pen position</em> or <em>origin</em>, is used to
	    locate glyphs.</p>

	  <p>Each layout uses a different convention for glyph
	  placement:</p>

	  <ul>
	    <li>
              <p>With horizontal layout, glyphs simply
		&lsquo;rest&rsquo; on the baseline.  Text is rendered
		by incrementing the pen position, either to the right
		or to the left.</p>

              <p>The distance between two successive pen positions is
		glyph-specific and is called the <em>advance
		width</em>.  Note that its value is <em>always</em>
		positive, even for right-to-left oriented scripts like
		Arabic.  This introduces some differences in the way
		text is rendered.</p>

              <p><em>The pen position is always placed on the
		  baseline.</em></p>

              <p align="center">
		<img src="layout.png"
		     height="179"
		     width="458"
		     alt="horizontal layout">
	      </p>
	    </li>
	    <li>
              <p>With a vertical layout, glyphs are centered around
		the baseline:</p>

              <p align="center">
		<img src="layout2.png"
		     height="275"
		     width="162"
		     alt="vertical layout">
              </p>
	    </li>
	  </ul>


	  <h3 id="section-2">2. Typographic metrics and bounding
	    boxes</h3>

	  <p>A various number of face metrics are defined for all
	    glyphs in a given font.</p>

	  <ul>
	    <li class="emph">
              <p>Ascent</p>

              <p>The distance from the baseline to the highest or
		upper grid coordinate used to place an outline point.
		It is a positive value, due to the grid's orientation
		with the <i>Y</i>&nbsp;axis upwards.</p>
	    </li>
	    <li class="emph">
              <p>Descent</p>

              <p>The distance from the baseline to the lowest grid
		coordinate used to place an outline point.  In
		FreeType, this is a negative value, due to the grid's
		orientation.  Note that in some font formats this is a
		positive value.</p>
	    </li>
	    <li class="emph">
              <p>Linegap</p>

              <p>The distance that must be placed between two lines of
		text.  The baseline-to-baseline distance should be
		computed as

	      <p align="center">
		<code>linespace = ascent - descent + linegap</code>
	      </p>

              <p>if you use the typographic values.</p>
	    </li>
	  </ul>

	  <p>Other, simpler metrics are:</p>

	  <ul>
	    <li class="emph">
              <p>Bounding box</p>

              <p>This is an imaginary box that encloses all glyphs
		from the font, usually as tightly as possible.  It is
		represented by four parameters,
		namely <code>xMin</code>, <code>yMin</code>,
                <code>xMax</code>, and <code>yMax</code>, that can be
		computed for any outline.  Their values can be in font
		units if measured in the original outline, or in
		integer (or fractional) pixel units when measured on
		scaled outlines.</p>

	      <p>A common shorthand for the bounding box is
		&lsquo;bbox&rsquo;.</p>
	    </li>
	    <li class="emph">
              <p>Internal leading</p>

              <p>This concept comes directly from the world of traditional
		typography.  It represents the amount of space within the
		<em>leading</em> which is reserved for glyph features
		that lay outside of the EM square (like accentuation).
		It usually can be computed as</p>

              <p align="center">
		<code>internal leading = ascent - descent - EM_size</code>
              </p>
	    </li>
	    <li class="emph">
              <p>External leading</p>

              <p>This is another name for the line gap.</p>
	    </li>
	  </ul>


	  <h3 id="section-3">3. Bearings and Advances</h3>

	  <p>Each glyph has also distances called <em>bearings</em> and
	    <em>advances</em>.  The actual values depend on the
	    layout, as the same glyph can be used to render text
	    either horizontally or vertically:</p>

	  <ul>
	    <li class="emph">
              <p>Left side bearing</p>

              <p>The horizontal distance from the current pen position
		to the glyph's left bbox edge.  It is positive for
		horizontal layouts, and in most cases negative for
		vertical ones.</p>

              <p>In the FreeType API, this is also called
		<code>bearingX</code>.  Another shorthand is
		&lsquo;lsb&rsquo;.</p>
	    </li>
	    <li class="emph">
              <p>Top side bearing</p>
	
              <p>The vertical distance from the baseline to the top of
		the glyph's bbox.  It is usually positive for
		horizontal layouts, and negative for vertical
		ones.</p>

              <p>In the FreeType API, this is also called
		<code>bearingY</code>.</p>
	    </li>
	    <li class="emph">
              <p>Advance width</p>

              <p>The horizontal distance to increment (for
		left-to-right writing) or decrement (for right-to-left
		writing) the pen position after a glyph has been
		rendered when processing text.  It is always positive
		for horizontal layouts, and zero for vertical
		ones.</p>

              <p>In the FreeType API, this is also called
		<code>advanceX</code>.</p>
	    </li>
	    <li class="emph">
              <p>Advance height</p>

              <p>The vertical distance to decrement the pen position
		after a glyph has been rendered.  It is always zero
		for horizontal layouts, and positive for vertical
		layouts.</p>
	
              <p>In the FreeType API, this is also called
		<code>advanceY</code>.</p>
	    </li>
	    <li class="emph">
              <p>Glyph width</p>

              <p>The glyph's horizontal extent.  For unscaled font
		coordinates, it is</p>

	      <p align="center">
		<code>glyph width = bbox.xMax - bbox.xMin</code>
	      </p>

	      <p>For scaled glyphs, its computation requests specific
		care, described in the grid-fitting chapter below.</p>
	    </li>
	    <li class="emph">
              <p>Glyph height</p>

              <p>The glyph's vertical extent. For unscaled font
		coordinates, it is</p>

	      <p align="center">
		<code>glyph height = bbox.yMax - bbox.yMin</code>
	      </p>

	      <p>For scaled glyphs, its computation requests specific
		care, described in the grid-fitting chapter below.</p>
	    </li>
	    <li class="emph">
              <p>Right side bearing</p>

              <p>Only used for horizontal layouts to describe the
		distance from the bbox's right edge to the advance
		width.  In most cases it is a non-negative number:</p>

              <p align="center">
		<tt>right side bearing = advance_width -
		  left_side_bearing - (xMax-xMin)</tt>
              </p>

	      <p>A common shorthand for this value is
		&lsquo;rsb&rsquo;.</p>
	    </li>
	  </ul>

	  <p>Here is a picture giving all the details for horizontal metrics:

	  <p align="center">
	    <img src="metrics.png"
		 height="253"
		 width="388"
		 alt="horizontal glyph metrics">
	  </p>

	  <p>And here is another one for the vertical metrics:</p>

	  <p align="center">
	    <img src="metrics2.png"
		 height="278"
		 width="294"
		 alt="vertical glyph metrics">
	  </p>


	  <h3 id="section-4">4. The effects of grid-fitting</h3>

	  <p>Because hinting aligns the glyph's control points to the
	    pixel grid, this process slightly modifies the dimensions
	    of character images in ways that differ from simple
	    scaling.</p>

	  <p>For example, the image of the lowercase &lsquo;m&rsquo;
	    letter sometimes fits a square in the master grid.
	    However, to make it readable at small pixel sizes, hinting
	    tends to enlarge its scaled outline horizontally in order
	    to keep its three legs distinctly visible, resulting in a
	    wider character bitmap.</p>

	  <p>The glyph metrics are also influenced by the grid-fitting
	    process:</p>

	  <ul>
	    <li>
              <p>The image's width and height are altered.  Even if
		this is only by one pixel, it can make a big
		difference at small pixel sizes.</p>
	    </li>
	    <li>
              <p>The image's bounding box is modified, thus modifying
		the bearings.</p>
	    </li>
	    <li>
              <p>The advances must be updated.  For example, the
		advance width must be incremented if the hinted bitmap
		is larger than the scaled one, to reflect the
		augmented glyph width.</p>
	    </li>
	  </ul>

	  <p>This has some implications:</p>

	  <ul>
	    <li>
              <p>Because of hinting, simply scaling the font ascent or
		descent might not give correct results.  A possible
		solution is to keep the ceiling of the scaled ascent,
		and floor of the scaled descent.</p>
	    </li>
	    <li>
              <p>There is no easy way to get the hinted glyph and
		advance widths of a range of glyphs, as hinting works
		differently on each outline.  The only solution is to
		hint each glyph separately and record the returned
		values (for example in a cache).  Some formats, like
		TrueType, even include a table of pre-computed values
		for a small set of common character pixel sizes.</p>
	    </li>
	    <li>
              <p>Hinting depends on the final character width and
		height in pixels, which means that it is highly
		resolution-dependent.  This property makes correct
		WYSIWYG layouts difficult to implement.</p>
	    </li>
	  </ul>

	  <p>Performing 2D transformations on glyph outlines is very
	    easy with FreeType.  However, when using translation on
	    hinted outlines, one should always take care
	    of <b>exclusively using integer pixel distances</b> (which
	    means that the parameters to the
	    <code>FT_Outline_Translate</code> API function should all
	    be multiples of&nbsp;64, as the point coordinates are in
	    26.6&nbsp;fixed-point format).  Otherwise, the translation
	    will simply <em>ruin the hinter's work</em>, resulting in
	    very low quality bitmaps!</p>

          <p>Note, however, that the restriction to integer pixel
            distances mentioned in the previous paragraph has become
            weaker; today, it is quite common to do <em>no</em>
            hinting along the horizontal axis, only adjusting the
            glyphs vertically.  Typical examples are Microsoft's
            ClearType implementation, FreeType's new CFF engine
            (contributed by Adobe), or the &lsquo;light&rsquo;
            auto-hinting mode.  For such modes you get best rendering
            results if you do sub-pixel glyph positioning.</p>


	  <h3 id="section-5">5. Text widths and bounding box</h3>

	  <p>As seen before, the &lsquo;origin&rsquo; of a given glyph
	    corresponds to the position of the pen on the baseline.
	    It is not necessarily located on one of the glyph's
	    bounding box corners, unlike many typical bitmapped font
	    formats.  In some cases, the origin can be out of the
	    bounding box, in others, it can be within it, depending on
	    the shape of the given glyph.</p>

	  <p>Likewise, the glyph's &lsquo;advance width&rsquo; is the
	    increment to apply to the pen position during layout, and
	    is not related to the glyph's &lsquo;width&rsquo;, which
	    really is the glyph's bounding box width.</p>

	  <p>The same conventions apply to strings of text, with the
	  following consequences.</p>

	  <ul>
	    <li>
              <p>The bounding box of a given string of text doesn't
		necessarily contain the text cursor, nor is the latter
		located on one of its corners.</p>
	    </li>
	    <li>
              <p>The string's advance width isn't related to its
		bounding box dimensions.  Especially if it contains
		leading and trailing spaces or tabs.</p>
	    </li>
	    <li>
              <p>Finally, additional processing like kerning creates
		strings of text whose dimensions are not directly
		related to the simple juxtaposition of individual
		glyph metrics.  For example, the advance width of
		&lsquo;VA&rsquo; isn't the sum of the advances of
		&lsquo;V&rsquo; and &lsquo;A&rsquo; taken
		separately.</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>
      &nbsp; <!-- separate primary from secondary entries -->
    </li>

    <li class="secondary">
      <a href="index.html">FreeType Glyph Conventions</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-1.html">Basic Typographic Concepts</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-2.html">Glyph Outlines</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-3.html" class="current">Glyph Metrics</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-4.html">Kerning</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-5.html">Text Processing</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-6.html">FreeType Outlines</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-7.html">FreeType Bitmaps</a>
    </li>
  </ul>
</div>

</div> <!-- id="wrapper" -->

<div id="TOC-bottom">
</div>

</body>
</html>
glyphs/glyphs-4.html000064400000021115151706766400010423 0ustar00<!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 Glyph Conventions / IV</title>
</head>


<body>

<div id="top"
     class="bar">
  <h1><a href="http://freetype.org/index.html">FreeType</a> Glyph
    Conventions&nbsp;/&nbsp;IV</h1>
</div>


<div id="wrapper">

<div class="colmask leftmenu">
  <div class="colright">
    <div class="col1wrap">
      <div class="col1">


        <!-- ************************************************** -->

	<div id="kerning">
	  <h2>IV. Kerning</h2>

	  <p>The term <em>kerning</em> refers to specific information
	    used to adjust the relative positions of successive glyphs
	    in a string of text.  This section describes several types
	    of kerning information, as well as the way to process them
	    when performing text layout.</p>


	  <h3 id="section-1">1. Kerning pairs</h3>

	  <p>Kerning consists of modifying the spacing between two
	    successive glyphs according to their outlines.  For
	    example, a &lsquo;T&rsquo; and a &lsquo;y&rsquo; can be
	    easily moved closer, as the top of the &lsquo;y&rsquo;
	    fits nicely under the upper right bar of the
	    &lsquo;T&rsquo;.</p>

	  <p>When laying out text with only their standard widths,
	    some consecutive glyphs seem a bit too close or too
	    distant.  For example, the space between the
	    &lsquo;A&rsquo; and the &lsquo;V&rsquo; in the following
	    word seems a little wider than needed.</p>

	  <p align="center">
	    <img src="bravo_unkerned.png"
		 height="37"
		 width="116"
		 alt="the word 'bravo' unkerned">
	  </p>

	  <p>Compare this to the same word, where the distance between
	    these two letters has been slightly reduced:</p>

	  <p align="center">
	    <img src="bravo_kerned.png"
		 height="37"
		 width="107"
		 alt="the word 'bravo' with kerning">
	  </p>

	  <p>As you can see, this adjustment can make a great
	    difference.  Some font faces thus include a table
	    containing kerning distances for a set of given glyph
	    pairs for text layout.</p>

	  <ul>
	    <li>
              <p>The pairs are ordered, i.e., the space for pair
		&lsquo;(A,V)&rsquo; isn't necessarily the space for
		pair &lsquo;(V,A)&rsquo;.  They also use glyph
		indices, not character codes.</p>
	    </li>
	    <li>
              <p>Kerning distances can be expressed in horizontal or
		vertical directions, depending on the layout and/or
		the script.  For example, some horizontal layouts like
		Arabic can make use of vertical kerning adjustments
		between successive glyphs.  A vertical script can have
		vertical kerning distances.</p>
	    </li>
	    <li>
              <p>Kerning distances are expressed in grid units.  They
		are usually oriented in the <i>X</i>&nbsp;axis, which
		means that a negative value indicates that two glyphs
		must be set closer in a horizontal layout.</p>
	    </li>
	  </ul>

	  <p>Note that OpenType fonts (OTF) provide two distinct
	    mechanisms for kerning, using the &lsquo;kern&rsquo; and
	    &lsquo;GPOS&rsquo; tables, respectively, which are part of
	    the OTF files.  Older fonts only contain the former, while
	    recent fonts contain both tables or even
	    &lsquo;GPOS&rsquo; data only.  FreeType only supports
	    kerning via the (rather simple) &lsquo;kern&rsquo; table.
	    For the interpretation of kerning data in the (highly
	    sophisticated) &lsquo;GPOS&rsquo; table you need a
	    higher-level library
	    like <a href="http://icu-project.org/">ICU</a> or
	    <a href="http://harfbuzz.org">HarfBuzz</a> since it can be
	    context dependent (this is, the kerning may vary depending
	    on the position within a text string, for example).</p>


	  <h3 id="section-2">2. Applying kerning</h3>

	  <p>Applying kerning when rendering text is a rather easy
	    process.  It merely consists of adding the scaled kern
	    distance to the pen position before rendering the next
	    glyph.  However, the typographically correct renderer must
	    take a few more details in consideration.</p>

	  <p>The &lsquo;sliding dot&rsquo; problem is a good example:
	    Many font faces include a kerning distance between capital
	    letters like &lsquo;T&rsquo; or &lsquo;F&rsquo; and a
	    following dot (&lsquo;.&rsquo;), in order to slide the
	    latter glyph just right to their main leg.</p>

	  <p align="center">
	    <img src="twlewis1.png"
		 height="38"
		 width="314"
		 alt="example for sliding dots">
	  </p>

	  <p>This sometimes requires additional adjustments between
	    the dot and the letter following it, depending on the
	    shapes of the enclosing letters.  When applying
	    &lsquo;standard&rsquo; kerning adjustments, the previous
	    sentence would become</p>

	  <p align="center">
	    <img src="twlewis2.png"
		 height="36"
		 width="115"
		 alt="example for too much kerning">
	  </p>

	  <p>This is clearly too contracted.  The solution here, as
	    exhibited in the first example, is to only slide the dots
	    if the conditions fit.  Of course, this requires a certain
	    knowledge of the text's meaning, and this is exactly what
	    &lsquo;GPOS&rsquo; kerning is good for: Depending on the
	    context, different kerning values can be applied to get a
	    typographically correct result.</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>
      &nbsp; <!-- separate primary from secondary entries -->
    </li>

    <li class="secondary">
      <a href="index.html">FreeType Glyph Conventions</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-1.html">Basic Typographic Concepts</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-2.html">Glyph Outlines</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-3.html">Glyph Metrics</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-4.html" class="current">Kerning</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-5.html">Text Processing</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-6.html">FreeType Outlines</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-7.html">FreeType Bitmaps</a>
    </li>
  </ul>
</div>

</div> <!-- id="wrapper" -->

<div id="TOC-bottom">
</div>

</body>
</html>
glyphs/glyphs-5.html000064400000033022151706766400010424 0ustar00<!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 Glyph Conventions / V</title>
</head>


<body>

<div id="top"
     class="bar">
  <h1><a href="http://freetype.org/index.html">FreeType</a> Glyph
    Conventions&nbsp;/&nbsp;V</h1>
</div>


<div id="wrapper">

<div class="colmask leftmenu">
  <div class="colright">
    <div class="col1wrap">
      <div class="col1">


        <!-- ************************************************** -->

        <div id="text-processing">
          <h2>V. Text Processing</h2>

          <p>This section demonstrate algorithms which use the
            concepts previously defined to render text, whatever
            layout you use.  It assumes <em>simple</em> text handling
            suitable for scripts like Latin or Cyrillic, using a
            one-to-one relationship between input character codes and
            output glyphs indices.  Scripts like Arabic or Khmer,
            which need a &lsquo;shaping engine&rsquo; to do the
            character code to glyph index conversion, are beyond the
            scope (and should be done by proper layout engines
            like <a href="http://www.pango.org/">Pango</a>
            anyway).</p>


          <h3 id="section-1">1. Writing simple text strings</h3>

          <p>In this first example, we will generate a simple string
            of text in the Latin script, i.e., with a horizontal
            left-to-right layout.  Using exclusively pixel metrics,
            the process looks like:

            <ol class="algorithm">
              <li>
                Convert the character string into a series of glyph
                indices.
              </li>
              <li>
                Place the pen to the cursor position.
              </li>
              <li>
                Get or load the glyph image.
              </li>
              <li>
                Translate the glyph so that its &lsquo;origin&rsquo;
                matches the pen position.
              </li>
              <li>
                Render the glyph to the target device.
              </li>
              <li>
                Increment the pen position by the glyph's advance
                width (in pixels).
              </li>
              <li>
                Start over at step&nbsp;3 for each of the remaining
                glyphs.
              </li>
              <li>
                When all glyphs are done, set the text cursor to the
                new pen position.
              </li>
            </ol>

          <p>Note that kerning isn't part of this algorithm.</p>


          <h3 id="section-2">2. Subpixel positioning</h3>

          <p>This algorithm can be used for hinting modes that don't
            apply horizontal hinting.  It essentially provides WYSIWYG
            text layout.  Text rendering is very similar to the
            algorithm described in subsection&nbsp;1, with the
            following few differences:</p>

          <ul>
            <li>
              <p>The pen position is expressed in fractional
                pixels.</p>
            </li>
            <li>
              <p>The hinted outline must be shifted horizontally to
                the proper sub-pixel position.</p>
            </li>
            <li>
              <p>The advance width is expressed in fractional pixels,
                and isn't necessarily an integer.</p>
            </li>
          </ul>

          <p>Here an improved version of the algorithm:</p>

          <ol class="algorithm">
            <li>
              Convert the character string into a series of glyph
              indices.
            </li>
            <li>
              Place the pen to the cursor position.  This can be a
              non-integer point.
            </li>
            <li>
              Get or load the glyph image.
            </li>
            <li>
              Translate the glyph by &lsquo;pen_pos -
              floor(pen_pos)&rsquo;.
            </li>
            <li>
              Render the glyph to the target device at
              &lsquo;floor(pen_pos)&rsquo;.
            </li>
            <li>
              Increment the pen position by the glyph's advance width
              in fractional pixels.
            </li>
            <li>
              Start over at step&nbsp;3 for each of the remaining
              glyphs.
            </li>
            <li>
              When all glyphs are done, set the text cursor to the new
              pen position.
            </li>
          </ol>


          <h3 id="section-3">3. Simple kerning</h3>

          <p>Adding kerning to the basic text rendering algorithm is
            easy: When a kerning pair is found, simply add the scaled
            kerning distance to the pen position before step&nbsp;4.
            Of course, the distance should be rounded in the case of
            algorithm&nbsp;1, though it doesn't need to for
            algorithm&nbsp;2.  This gives us:</p>

          <p>Algorithm&nbsp;1 with kerning:</p>

          <ol class="algorithm">
            <li>
              Convert the character string into a series of glyph
              indices.
            </li>
            <li>
              Place the pen to the cursor position.
            </li>
            <li>
              Get or load the glyph image.
            </li>
            <li>
              Add the rounded scaled kerning distance, if any, to the
              pen position.
            </li>
            <li>
              Translate the glyph so that its &lsquo;origin&rsquo;
              matches the pen position.
            </li>
            <li>
              Render the glyph to the target device.
            </li>
            <li>
              Increment the pen position by the glyph's advance width
              in pixels.
            </li>
            <li>
              Start over at step&nbsp;3 for each of the remaining
              glyphs.
            </li>
          </ol>

          <p>Algorithm&nbsp;2 with kerning:</p>

          <ol class="algorithm">
            <li>
              Convert the character string into a series of glyph
              indices.
            </li>
            <li>
              Place the pen to the cursor position.
            </li>
            <li>
              Get or load the glyph image.
            </li>
            <li>
              Add the scaled unrounded kerning distance, if any, to
              the pen position.
            </li>
            <li>
              Translate the glyph by &lsquo;pen_pos -
              int(pen_pos)&rsquo;.
            </li>
            <li>
              Render the glyph to the target device at
              &lsquo;int(pen_pos)&rsquo;.
            </li>
            <li>
              Increment the pen position by the glyph's advance width
              in fractional pixels.
            </li>
            <li>
              Start over at step&nbsp;3 for each of the remaining
              glyphs.
            </li>
          </ol>


          <h3 id="section-4">4. Right-to-left layout</h3>

          <p>The process of laying out right-to-left scripts like
            (modern) Hebrew text is very similar.  The only difference
            is that the pen position must be decremented before the
            glyph rendering (remember: the advance width is always
            positive, even for Hebrew glyphs).</p>

          <p>Right-to-left algorithm&nbsp;1:</p>

          <ol class="algorithm">
            <li>
              Convert the character string into a series of glyph
              indices.
            </li>
            <li>
              Place the pen to the cursor position.
            </li>
            <li>
              Get or load the glyph image.
            </li>
            <li>
              Decrement the pen position by the glyph's advance
              width in pixels.
            </li>
            <li>
              Translate the glyph so that its &lsquo;origin&rsquo;
              matches the pen position.
            </li>
            <li>
              Render the glyph to the target device.
            </li>
            <li>
              Start over at step&nbsp;3 for each of the remaining
              glyphs.
            </li>
          </ol>

          <p>The changes to algorithm&nbsp;2, as well as the inclusion
            of kerning are left as an exercise to the reader.</p>


          <h3 id="section-5">5. Vertical layouts</h3>

          <p>Laying out vertical text uses exactly the same processes,
            with the following significant differences:</p>

          <ul>
            <li>
              <p>The baseline is vertical, and the vertical metrics
                must be used instead of the horizontal one.</p>
            </li>
            <li>
              <p>The left bearing is usually negative, but this
                doesn't change the fact that the glyph origin must be
                located on the baseline.</p>
            </li>
            <li>
              <p>The advance height is always positive, so the pen
                position must be decremented if one wants to write top
                to bottom (assuming the <i>Y</i>&nbsp;axis is oriented
                upwards).</p>
            </li>
          </ul>

          <p>Here the algorithm:</p>

          <ol class="algorithm">
            <li>
              Convert the character string into a series of glyph
              indices.
            </li>
            <li>
              Place the pen to the cursor position.
            </li>
            <li>
              Get or load the glyph image.
            </li>
            <li>
              Translate the glyph so that its &lsquo;origin&rsquo;
              matches the pen position.
            </li>
            <li>
              Render the glyph to the target device.
            </li>
            <li>
              Decrement the vertical pen position by the glyph's
              advance height in pixels.
            </li>
            <li>
              Start over at step&nbsp;3 for each of the remaining
              glyphs.
            </li>
            <li>
              When all glyphs are done, set the text cursor to the new
              pen position.
            </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>
      &nbsp; <!-- separate primary from secondary entries -->
    </li>

    <li class="secondary">
      <a href="index.html">FreeType Glyph Conventions</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-1.html">Basic Typographic Concepts</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-2.html">Glyph Outlines</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-3.html">Glyph Metrics</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-4.html">Kerning</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-5.html" class="current">Text Processing</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-6.html">FreeType Outlines</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-7.html">FreeType Bitmaps</a>
    </li>
  </ul>
</div>

</div> <!-- id="wrapper" -->

<div id="TOC-bottom">
</div>

</body>
</html>
glyphs/glyphs-6.html000064400000046206151706766400010435 0ustar00<!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 Glyph Conventions / VI</title>
</head>


<body>

<div id="top"
     class="bar">
  <h1><a href="http://freetype.org/index.html">FreeType</a> Glyph
    Conventions&nbsp;/&nbsp;VI</h1>
</div>


<div id="wrapper">

<div class="colmask leftmenu">
  <div class="colright">
    <div class="col1wrap">
      <div class="col1">


        <!-- ************************************************** -->

        <div id="freetype-outlines">
          <h2>VI. FreeType outlines</h2>

          <p>The purpose of this section is to present the way
            FreeType manages vectorial outlines, as well as the most
            common operations that can be applied on them.</p>

          <h3 id="section-1">1. FreeType outline description and
            structure</h3>

          <h4>a. Outline curve decomposition</h4>

          <p>An outline is described as a series of closed contours in
            the 2D plane.  Each contour is made of a series of line
            segments and B&eacute;zier arcs.  Depending on the file
            format, these can be second-order or third-order
            polynomials.  The former are also called quadratic or
            conic arcs, and they are used in the TrueType format.  The
            latter are called cubic arcs and are mostly used in the
            PostScript Type&nbsp;1, CFF, and CFF2 formats.</p>

          <p>Each arc is described through a series of start, end, and
            control points.  Each point of the outline has a specific
            tag which indicates whether it is describes a line segment
            or an arc.  The tags can take the following values:</p>

          <table>
            <tr>
              <td valign="top">
                <p><code>FT_CURVE_TAG_ON</code></p>
              </td>
              <td valign="top">
                <p>Used when the point is &lsquo;on&rsquo; the curve.
                  This corresponds to start and end points of segments
                  and arcs.  The other tags specify what is called an
                  &lsquo;off&rsquo; point, i.e., a point which isn't
                  located on the contour itself, but serves as a
                  control point for a B&eacute;zier arc.</p>
              </td>
            </tr>
            <tr>
              <td valign="top">
                <p><code>FT_CURVE_TAG_CONIC</code></p>
              </td>
              <td valign="top">
                <p>Used for an &lsquo;off&rsquo; point used to control
                  a conic B&eacute;zier arc.</p>
              </td>
            </tr>
            <tr>
              <td valign="top">
                <p><code>FT_CURVE_TAG_CUBIC</code></p>
              </td>
              <td valign="top">
                <p>Used for an &lsquo;off&rsquo; point used to control
                  a cubic B&eacute;zier arc.</p>
              </td>
            </tr>
          </table>

          <p>Use the <code>FT_CURVE_TAG(tag)</code> macro to filter out
            other, internally used flags.

          <p>The following rules are applied to decompose the
            contour's points into segments and arcs:</p>

          <ul>
            <li>
              <p>Two successive &lsquo;on&rsquo; points indicate a
                line segment joining them.</p>
            </li>
            <li>
              <p>One conic &lsquo;off&rsquo; point between two
                &lsquo;on&rsquo; points indicates a conic
                B&eacute;zier arc, the &lsquo;off&rsquo; point being
                the control point, and the &lsquo;on&rsquo; ones the
                start and end points.</p>
            </li>
            <li>
              <p>Two successive cubic &lsquo;off&rsquo; points between
                two &lsquo;on&rsquo; points indicate a cubic
                B&eacute;zier arc.  There must be exactly two cubic
                control points and two &lsquo;on&rsquo; points for
                each cubic arc (using a single cubic &lsquo;off&rsquo;
                point between two &lsquo;on&rsquo; points is
                forbidden, for example).</p>
            </li>
            <li>
              <p>Two successive conic &lsquo;off&rsquo; points force
                the rasterizer to create (during the scan-line
                conversion process exclusively) a virtual
                &lsquo;on&rsquo; point inbetween, at their exact
                middle.  This greatly facilitates the definition of
                successive conic B&eacute;zier arcs.  Moreover, it is
                the way outlines are described in the TrueType
                specification.</p>
            </li>
            <li>
              <p>The last point in a contour uses the first as an end
                point to create a closed contour.  For example, if the
                last two points of a contour were an &lsquo;on&rsquo;
                point followed by a conic &lsquo;off&rsquo; point, the
                first point in the contour would be used as final
                point to create an &lsquo;on&rsquo; &ndash;
                &lsquo;off&rsquo; &ndash; &lsquo;on&rsquo; sequence as
                described above.
            </li>
            <li>
              <p>The first point in a contour can be a conic
                &lsquo;off&rsquo; point itself; in that case, use the
                last point of the contour as the contour's starting
                point.  If the last point is a conic &lsquo;off&rsquo;
                point itself, start the contour with the virtual
                &lsquo;on&rsquo; point between the last and first
                point of the contour.
            </li>
          </ul>

          <p>Note that it is possible to mix conic and cubic arcs in a
            single contour, however, no font driver of FreeType
            produces such outlines currently.</p>

          <table class="vertical-space">
            <tr>
              <td>
                <img src="points_segment.png"
                     height="166"
                     width="221"
                     alt="segment example">
              </td>
              <td>
                <img src="points_conic.png"
                     height="183"
                     width="236"
                     alt="conic arc example">
              </td>
            </tr>
            <tr>
              <td>
                <img src="points_cubic.png"
                     height="162"
                     width="214"
                     alt="cubic arc example">
              </td>
              <td>
                <img src="points_conic2.png"
                     height="204"
                     width="225"
                     alt="cubic arc with virtual 'on' point">
              </td>
            </tr>
          </table>


          <h4>b. The <code>FT_Outline</code> descriptor</h4>
        
          <p>A FreeType outline is described through a simple
            structure
            called <a href="../reference/ft2-outline_processing.html#FT_Outline"><code>FT_Outline</code></a>.
            Right now, the following fields are of interest:</p>

          <table class="vertical-space">
            <caption>
              <b><code>FT_Outline</code></b>
            </caption>
            <tbody>
              <tr>
                <td>
                  <code>n_points</code>
                </td>
                <td>
                  the number of points in the outline
                </td>
              </tr>
              <tr>
                <td>
                  <code>n_contours</code>
                </td>
                <td>
                  the number of contours in the outline
                </td>
              </tr>
              <tr>
                <td>
                  <code>points</code>
                </td>
                <td>
                  array of point coordinates
                </td>
              </tr>
              <tr>
                <td>
                  <code>contours</code>
                </td>
                <td>
                  array of contour end indices
                </td>
              </tr>
              <tr>
                <td>
                  <code>tags</code>
                </td>
                <td>
                  array of point flags
                </td>
              </tr>
            </tbody>
          </table>
        
          <p>Here, <code>points</code> is a pointer to an array of
            <a href="../reference/ft2-basic_types.html#FT_Vector"><code>FT_Vector</code></a>
            records, used to store the vectorial coordinates of each
            outline point.  These are expressed in 1/64th of a pixel,
            which is also known as the <em>26.6&nbsp;fixed-point
            format</em>.</p>

          <p><code>contours</code> is an array of point indices to
            delimit contours in the outline.  For example, the first
            contour always starts at point&nbsp;0, and ends at
            point <code>contours[0]</code>.  The second contour starts
            at point <code>contours[0]+1</code> and ends at
            <code>contours[1]</code>, etc.  To traverse these points in a
            callback based manner,
            use <a href="../reference/ft2-outline_processing.html#FT_Outline_Decompose"><code>FT_Outline_Decompose</code></a>.</p>

          <p>Note that each contour is closed, and that the value
            of <code>n_points</code> should be equal
            to <code>contours[n_contours-1]+1</code> for a valid
            outline.</p>

          <p>Finally, <code>tags</code> is an array of bytes, used to
            store each outline point's tag.</p>


          <h3 id="section-2">2. Bounding and control box
            computations</h3>

          <p>As described earlier, a <em>bounding box</em> (also
            called <em>bbox</em>) is simply a rectangle that
            completely encloses the shape of a given outline.  The
            interesting case is the smallest bounding box possible,
            and in the following we subsume this under the term
            &lsquo;bounding box&rsquo;.  Because of the way arcs are
            defined, B&eacute;zier control points are not necessarily
            contained within an outline's (smallest) bounding box.</p>

          <p>Such a situation happens if one B&eacute;zier arc is, for
            example, the upper edge of an outline and an
            &lsquo;off&rsquo; point happens to be above the bbox.
            However, it is very rare in the case of character outlines
            because most font designers and creation tools always
            place &lsquo;on&rsquo; points at the extrema of each
            curved edges (as both the TrueType and PostScript
            specifications recommend), making hinting much easier.</p>

          <p>We thus define the <em>control box</em> (also
            called <em>cbox</em>) as the smallest possible rectangle
            that encloses all points of a given outline (including its
            &lsquo;off&rsquo; points).  Clearly, it always includes
            the bbox, and the two boxes are identical in most
            cases.</p>

          <p>Unlike the bbox, the cbox is much faster to compute.</p>

          <table class="vertical-space">
            <tr>
              <td>
                <img src="bbox1.png"
                     height="264"
                     width="228"
                     alt="a glyph with different bbox and cbox">
              </td>
              <td>
                <img src="bbox2.png"
                     height="229"
                     width="217"
                     alt="a glyph with identical bbox and cbox">
              </td>
            </tr>
          </table>

          <p>Control and bounding boxes can be computed automatically
            using the
            functions <a href="../reference/ft2-outline_processing.html#FT_Outline_Get_CBox"><code>FT_Outline_Get_CBox</code></a>
            and
            <a href="../reference/ft2-outline_processing.html#FT_Outline_Get_BBox"><code>FT_Outline_Get_BBox</code></a>.
            The former function is always very fast, while the
            latter <em>may</em> be slow in the case of
            &lsquo;outside&rsquo; control points (as it needs to find
            the extreme of conic and cubic arcs for
            &lsquo;perfect&rsquo; computations).  If this isn't the
            case, it is as fast as computing the control box.

          <p>Note also that even though most glyph outlines have equal
            cbox and bbox values to ease hinting, this is not
            necessarily the case if a transformation like rotation is
            applied to them.</p>


          <h3 id="section-3">3. Coordinates, scaling and
            grid-fitting</h3>

          <p>An outline point's vectorial coordinates are expressed in
            the 26.6&nbsp;format, i.e., in 1/64th of a pixel, hence the
            coordinates &lsquo;(1.0,-2.5)&rsquo; is stored as the
            integer pair &lsquo;(64,-192)&rsquo;, to name an
            example.</p>

          <p>After a glyph outline is scaled from the EM grid (in font
            units) to the current character dimensions, the hinter or
            grid-fitter is in charge of aligning important outline
            points (mainly edge delimiters) to the pixel grid.  Even
            though this process is much too complex to be described in
            a few lines, its purpose is mainly to round point
            positions while trying to preserve important properties
            like widths, stems, etc.</p>

          <p>The following operations can be used to round vectorial
            distances in the 26.6&nbsp;format to the grid:</p>

          <pre>
round( x )   == ( x + 32 ) &amp; -64
floor( x )   ==          x &amp; -64
ceiling( x ) == ( x + 63 ) &amp; -64</pre>

          <p>Once a glyph outline is grid-fitted or transformed, it
            often is interesting to compute the glyph image's pixel
            dimensions before rendering it.  To do so, one has to
            consider the following:</p>

          <p>The scan-line converter draws all the pixels
            whose <em>centers</em> fall inside the glyph shape.  In
            B/W rendering mode, it can also detect <em>drop-outs</em>,
            i.e., discontinuities coming from extremely thin shape
            fragments, in order to draw the &lsquo;missing&rsquo;
            pixels.  These new pixels are always located at a distance
            less than half of a pixel but it is not easy to predict
            where they will appear before rendering.</p>

          <p>This leads to the following computations:</p>

          <ul>
            <li>
              <p>compute the bbox</p>
            </li>
            <li>
              <p>grid-fit the bounding box with the following:</p>

              <pre>
xmin = floor( bbox.xMin )
xmax = ceiling( bbox.xMax )
ymin = floor( bbox.yMin )
ymax = ceiling( bbox.yMax )</pre>
            </li>
            <li>
              <p>return pixel dimensions, i.e.,</p>

              <pre>
width = (xmax - xmin)/64</pre>

              <p>and</p>

              <pre>
height = (ymax - ymin)/64</pre>
            </li>
          </ul>

          <p>By grid-fitting the bounding box, it is guaranteed that
            all the pixel centers that are to be drawn, <em>including
            those coming from drop-out control</em>, will
            be <em>within</em> the adjusted box.  Then the box's
            dimensions in pixels can be computed.</p>

          <p>Note also that, when translating a grid-fitted outline, one should
            <em>always use integer distances</em> to move an outline
            in the 2D plane.  Otherwise, glyph edges won't be aligned
            on the pixel grid anymore, and the hinter's work will be
            lost, producing <em>very low quality</em> bitmaps and
            pixmaps.</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>
      &nbsp; <!-- separate primary from secondary entries -->
    </li>

    <li class="secondary">
      <a href="index.html">FreeType Glyph Conventions</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-1.html">Basic Typographic Concepts</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-2.html">Glyph Outlines</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-3.html">Glyph Metrics</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-4.html">Kerning</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-5.html">Text Processing</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-6.html" class="current">FreeType Outlines</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-7.html">FreeType Bitmaps</a>
    </li>
  </ul>
</div>

</div> <!-- id="wrapper" -->

<div id="TOC-bottom">
</div>

</body>
</html>
glyphs/glyphs-7.html000064400000031516151706766400010434 0ustar00<!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 Glyph Conventions / VII</title>
</head>


<body>

<div id="top"
     class="bar">
  <h1><a href="http://freetype.org/index.html">FreeType</a> Glyph
    Conventions&nbsp;/&nbsp;VII</h1>
</div>


<div id="wrapper">

<div class="colmask leftmenu">
  <div class="colright">
    <div class="col1wrap">
      <div class="col1">


        <!-- ************************************************** -->

        <div id="freetype-bitmaps">
	  <h2>VII. FreeType Bitmaps</h2>

	  <p>The purpose of this section is to present the way
	    FreeType manages bitmaps and pixmaps, and how they relate
	    to the concepts previously defined.  The relationship
	    between vectorial and pixel coordinates is explained.</p>


	  <h3 id="section-1">1. Vectorial versus pixel
	    coordinates</h3>

	  <p>This sub-section explains the difference between
	    vectorial and pixel coordinates.  To make things clear,
	    brackets will be used to describe pixel coordinates,
	    e.g. &lsquo;[3,5]&rsquo;, while parentheses will be used
	    for vectorial ones, e.g. &lsquo;(-2,&nbsp;3.5)&rsquo;.</p>

	  <p>In the pixel case, as we use the <em>Y&nbsp;upwards</em>
	    convention; the coordinate [0,&nbsp;0] always refers to
	    the <em>lower left pixel</em> of a bitmap, while
	    coordinate [width-1,&nbsp;rows-1] to its <em>upper right
	    pixel</em>.</p>

	  <p>In the vectorial case, point coordinates are expressed in
	    floating units, like (1.25,&nbsp;-2.3).  Such a position
	    doesn't refer to a given pixel, but simply to an
	    immaterial point in the 2D plane.</p>

	  <p>The pixels themselves are indeed <em>square boxes</em> of
	    the 2D plane, whose centers lie in half pixel coordinates.
	    For example, the lower left pixel of a bitmap is delimited
	    by the square (0,&nbsp;0)-(1,&nbsp;1), its center being at
	    location (0.5,&nbsp;0.5).</p>

	  <p>This introduces some differences when computing
	    distances.  For example, the <em>length</em> in pixels of
	    the line [0,&nbsp;0]-[10,&nbsp;0] is&nbsp;11.  However,
	    the vectorial distance between (0,&nbsp;0)-(10,&nbsp;0)
	    covers exactly 10&nbsp;pixel centers, hence its length
	    is&nbsp;10.</p>

	  <p align="center">
	    <img src="grid_1.png"
		 height="390"
		 width="402"
		 alt="bitmap and vector grid">
	  </p>


	  <h3 id="section-2">2. The <code>FT_Bitmap</code> descriptor</h3>

	  <p>In FreeType, a bitmap or pixmap is described through a
	  single structure
	  called <a href="../reference/ft2-basic_types.html#FT_Bitmap"><code>FT_Bitmap</code></a>.
	  The fields we are interested in are:</p>

	  <table class="vertical-space">
	    <caption>
	      <b><code>FT_Bitmap</code></b>
	    </caption>

	    <tr>
	      <td valign="top">
		<code>rows</code>
	      </td>
	      <td valign="top">
		the number of rows, i.e., lines, in the bitmap
	      </td>
	    </tr>
	    <tr>
	      <td valign="top">
		<code>width</code>
	      </td>
	      <td valign="top">
		the number of horizontal pixels in the bitmap
	      </td>
	    </tr>
	    <tr>
	      <td valign="top">
		<code>pitch</code>
	      </td>
	      <td valign="top">
		its absolute value is the number of bytes per bitmap
		line; it can be either positive or negative depending
		on the bitmap's vertical orientation
	      </td>
	    </tr>
	    <tr>
	      <td valign="top">
		<code>buffer</code>
	      </td>
	      <td valign="top">
		a typeless pointer to the bitmap pixel buffer
	      </td>
	    </tr>
	    <tr>
	      <td valign="top">
		<code>pixel_mode</code>
	      </td>
	      <td valign="top">
		an enumeration used to describe the pixel format of
		the bitmap; examples
		are <code>ft_pixel_mode_mono</code> for 1-bit
		monochrome bitmaps
		and <code>ft_pixel_mode_grays</code> for 8-bit
		anti-aliased &lsquo;gray&rsquo; values
	      </td>
	    </tr>
	    <tr>
	      <td valign="top">
		<code>num_grays</code>
	      </td>
	      <td valign="top">
		this is only used for &lsquo;gray&rsquo; pixel modes,
		it gives the number of gray levels used to describe
		the anti-aliased gray levels (256&nbsp;by default with
		FreeType&nbsp;2)
	      </td>
	    </tr>
	  </table>

	  <p>Note that the sign of the <code>pitch</code> field
	    determines whether the rows in the pixel buffer are stored
	    in ascending or descending order.</p>

	  <p>Remember that FreeType uses the <em>Y&nbsp;upwards</em>
	    convention in the 2D plane, which means that a coordinate
	    of (0,&nbsp;0) always refer to the <em>lower-left
	    corner</em> of a bitmap.</p>

	  <p>If the pitch is positive, the rows are stored in
	    decreasing vertical position; the first bytes of the pixel
	    buffer are part of the <em>upper</em> bitmap row.</p>

	  <p>On the opposite, if the pitch is negative, the first
	    bytes of the pixel buffer are part of the <em>lower</em>
	    bitmap row.</p>

	  <p>In all cases, one can see the pitch as the byte increment
	    needed to skip to the <em>next lower scanline</em> in a
	    given bitmap buffer.</p>

	  <table class="vertical-space">
	    <tr>
	      <td>
		<img src="up_flow.png"
		     height="261"
		     width="275"
		     alt="negative 'pitch'">
	      </td>
	      <td>
		<img src="down_flow.png"
		     height="263"
		     width="273"
		     alt="positive 'pitch'">
	      </td>
	    </tr>
	  </table>

	  <p>The &lsquo;positive pitch&rsquo; convention is very often
	    used, though some systems might need the other.</p>

          <p>To speed up memory access, <code>pitch</code> is in most
            cases a multiple of 16bit, 32bit, or even 64bit.  It often
            happens that the pitch is thus larger than the necessary
            bits (or bytes) for a bitmap or pixmap row; in such cases,
            unused bits (or bytes) are at the very right (i.e., the
            end) of a row.</p>


	  <h3 id="section-3">3. Converting outlines into bitmaps and
	    pixmaps</h3>

	  <p>Generating a bitmap or pixmap image from a vectorial
	    image is easy with FreeType.  However, one must understand
	    a few points regarding the positioning of the outline in
	    the 2D plane before converting it to a bitmap:</p>

	  <ul>
	    <li>
              <p>The glyph loader and hinter always places the outline
		in the 2D plane so that (0,&nbsp;0) matches its
		character origin.  This means that the glyph's outline
		(and corresponding bounding box), can be placed
		anywhere in the 2D plane (see the graphics in
		section&nbsp;III).</p>
	    </li>
	    <li>
              <p>The target bitmap's area is mapped to the 2D plane,
		with its lower left corner at (0,&nbsp;0).  This means
		that a bitmap or pixmap of dimensions
		[<tt>w</tt>,&nbsp;<tt>h</tt>] will be mapped to a 2D
		rectangle window delimited by
		(0,&nbsp;0)-(<tt>w</tt>,&nbsp;<tt>h</tt>).</p>
	    </li>
	    <li>
              <p>When scan-converting the outline, everything that
		falls within the bitmap window is rendered, the rest
		is ignored.</p>
	    </li>

	    <p>A common mistake made by many developers when they
	      begin using FreeType is believing that a loaded outline
	      can be directly rendered in a bitmap of adequate
	      dimensions.  The following images illustrate why this is
	      a problem.</p>

	    <ul>
              <li>
		The first image shows a loaded outline in the 2D
		plane.
              </li>
              <li>
		The second one shows the target window for a bitmap of
		arbitrary dimensions [<tt>w</tt>,&nbsp;<tt>h</tt>].
              </li>
              <li>
		The third one shows the juxtaposition of the outline
		and window in the 2D plane.
              </li>
              <li>
		The last image shows what will really be rendered in
		the bitmap.
              </li>
	    </ul>

	    <p align="center">
              <img src="clipping.png"
		   height="151"
		   width="539"
		   alt="clipping algorithm">
	    </p>
	  </ul>

	  <p>Indeed, in nearly all cases, the loaded or transformed
	    outline must be translated before it is rendered into a
	    target bitmap, in order to adjust its position relative to
	    the target window.</p>

	  <p>For example, the correct way of creating
	    a <em>stand-alone</em> glyph bitmap is as follows:</p>

	  <ul>
	    <li>
              <p>Get the size of the glyph bitmap.  It can be computed
		directly from the glyph metrics, or by computing its
		bounding box (this is useful when a transformation has
		been applied to the outline after loading it, as the
		glyph metrics are not valid anymore).</p>
	    </li>
	    <li>
              <p>Create the bitmap with the computed dimensions.
		Don't forget to fill the pixel buffer with the
		background color.</p>
	    </li>
	    <li>
              <p>Translate the outline so that its lower left corner
		matches (0,&nbsp;0).  Don't forget that in order to
		preserve hinting, one should use integer, i.e.,
		rounded distances (of course, this isn't required if
		preserving hinting information doesn't matter, like
		with rotated text).  Usually, this means translating
		with a vector
		(<tt>-ROUND(xMin)</tt>,&nbsp;<tt>-ROUND(yMin)</tt>).</p>
	    </li>
	    <li>
              <p>Call the rendering function (it can be
		<a href="../reference/ft2-outline_processing.html#FT_Outline_Render"><code>FT_Outline_Render</code></a>,
		for example).</p>
	    </li>
	  </ul>

	  <p>In the case where one wants to write glyph images
	    directly into a large bitmap, the outlines must be
	    translated so that their vectorial position corresponds to
	    the current text cursor or character origin.</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>
      &nbsp; <!-- separate primary from secondary entries -->
    </li>

    <li class="secondary">
      <a href="index.html">FreeType Glyph Conventions</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-1.html">Basic Typographic Concepts</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-2.html">Glyph Outlines</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-3.html">Glyph Metrics</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-4.html">Kerning</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-5.html">Text Processing</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-6.html">FreeType Outlines</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-7.html" class="current">FreeType Bitmaps</a>
    </li>
  </ul>
</div>

</div> <!-- id="wrapper" -->

<div id="TOC-bottom">
</div>

</body>
</html>
glyphs/grid_1.png000064400000003164151706766400007745 0ustar00�PNG


IHDR��y�:�IDATx��]hWǃ�)}	��J_mJ�Gq^J�>�[(yq���[�lF���5�v�B}�H�eW{[gK�K�v)�&2;uIW���c:�����N&�I�wܻ]�|X���?g��=��ۅ��x�˸��<1�ꀑ09�]�L�m
s�i
�b�q��g�E�9�Yl`����n���?t`#�t���t�n�P'8�x2��g�d:c���՛d:9)�!�9.ߒ	udSg�Pg$s>��df2Ä�g��g&z ��R�	C���%�Q-%��c���Ɛ��YG'�U��G�;������i���(s�Kc6a�i��������p�-n��x�nl�~�<���6��Y����0p�n����k���x�<ho�:�Q�z�xA0�	@XD��M!�������J-�4fx��p�#��h����MR�_�M�7'����8�*�>z!+M�6����y�:��]�\���:�u<	-�I���N`<]�Ui,n�w�|�xZ]W!��fMï�l�i�c<���Cqd�Nh3Ks?�����YW��Ϲ��9�uU����}�rY��h�ܺʝ?-��yv �R^�����l�,�<�xJu�|츇<�)x�*��L�ChS��q�''��ͷ�����9eUѦS��w�|Y�|O�Q��-�!:�>�*}�Z��07��;�V�UL9�%AHR[*�~j�B��c�!L�����$��U�����Ϲ��Q񴮮Zc��օ�7j�B���O�/xV����/�������U��n�uZ<���L���ބ0�t���v]�!��u�}�q�'_Z��L�w��o~�/��>yx��U�;���UOc�it4f�پF��z��:W�xW����
����~U<�2����o:�~Ē�, e��LJBFC�R���9�$ed'���F����S�3?L�'=��`Q#ed)�2*fR�P,Q��c�.�b���t�%����5�$S@�i5����5�3u�n1���#�f�=��{�:f�;w1��?��\��U]��}�����Gճ����7���Te��#��
��T�s-�`(�3���xc�ɰײ�Vb�k1��a�W����?���`h�U�\"�7�3v�z�9c�˅�Hr�'���^��n ���R]>J�I���?����LQ�;!.��+키ڌY����F�5'��N�u��?N)��v2�er���Gf����%o������3�5ʃ��/g�V�6�o�#���Z��/�yNN	pD�
���&L��Wd8��>���b��C>>���[�U�x�+�j>�Q��~���X���bb��ͼ0��D�<Хj9�\�ܒT�O�Z�si��c,++`{)��C�u������|��W&=���r_Z�"?��{o�6�z���8>t��6/<����3o�.���
���+�W�0��H�L��B9
(�X=/<(�ϖ]�y/�Bv�{��ɽ{&�3�[7�<�x؇��s���\��*�@r�*�q�q�F�Rच�x~}tEXtAuthorDavid Turner��IEND�B`�glyphs/index.html000064400000020265151706766400010070 0ustar00<!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 Glyph Conventions</title>
</head>


<body>

<div id="top"
     class="bar">
  <h1><a href="http://freetype.org/index.html">FreeType</a> Glyph Conventions</h1>
</div>


<div id="wrapper">

<div class="colmask leftmenu">
  <div class="colright">
    <div class="col1wrap">
      <div class="col1">


        <!-- ************************************************** -->

        <div id="introduction">
          <p>This document presents the core conventions used within
            the FreeType library to manage font and glyph data.  It is
            a <em>must-read</em> for all developers who need to
            understand digital typography, especially if you want to
            use the FreeType&nbsp;2 library in your projects.</p>
        </div>

        <!-- ************************************************** -->

        <div id="contents">
          <h3><a href="glyphs-1.html">I. Basic Typographic
              Concepts</a></h3>
          <ul>
            <li>
              <a href="glyphs-1.html#section-1">1. Font files, format
                and information</a>
            </li>
            <li>
              <a href="glyphs-1.html#section-2">2. Character images
                and mappings</a>
            </li>
            <li>
              <a href="glyphs-1.html#section-3">3. Character and font
                metrics</a>
            </li>
          </ul>

          <h3><a href="glyphs-2.html">II. Glyph Outlines</a></h3>
          <ul>
            <li>
              <a href="glyphs-2.html#section-1">1. Pixels, points and
                device resolutions</a>
            </li>
            <li>
              <a href="glyphs-2.html#section-2">2. Vectorial
                representation</a>
            </li>
            <li>
              <a href="glyphs-2.html#section-3">3. Hinting and bitmap
                rendering</a>
            </li>
          </ul>

          <h3><a href="glyphs-3.html">III. Glyph Metrics</a></h3>
          <ul>
            <li>
              <a href="glyphs-3.html#section-1">1. Baseline, pens and
                layouts</a>
            </li>
            <li>
              <a href="glyphs-3.html#section-2">2. Typographic metrics
                and bounding boxes</a>
            </li>
            <li>
              <a href="glyphs-3.html#section-3">3. Bearings and
              advances</a>
            </li>
            <li>
              <a href="glyphs-3.html#section-4">4. The effects of
                grid-fitting</a>
            </li>
            <li>
              <a href="glyphs-3.html#section-5">5. Text widths and
                bounding box</a>
            </li>
          </ul>

          <h3><a href="glyphs-4.html">IV. Kerning</a></h3>
          <ul>
            <li>
              <a href="glyphs-4.html#section-1">1. Kerning pairs</a>
            </li>
            <li>
              <a href="glyphs-4.html#section-2">2. Applying
                kerning</a>
            </li>
          </ul>

          <h3><a href="glyphs-5.html">V. Text Processing</a></h3>
          <ul>
            <li>
              <a href="glyphs-5.html#section-1">1. Writing simple text
                strings</a>
            </li>
            <li>
              <a href="glyphs-5.html#section-2">2. Sub-pixel
                positioning</a>
            </li>
            <li>
              <a href="glyphs-5.html#section-3">3. Simple kerning</a>
            </li>
            <li>
              <a href="glyphs-5.html#section-4">4. Right-to-left
                layouts</a>
            </li>
            <li>
              <a href="glyphs-5.html#section-5">5. Vertical
                layouts</a>
            </li>
          </ul>

          <h3><a href="glyphs-6.html">VI. FreeType Outlines</a></h3>
          <ul>
            <li>
              <a href="glyphs-6.html#section-1">1. FreeType outline
                description and structure</a>
            </li>
            <li>
              <a href="glyphs-6.html#section-2">2. Bounding and
                control box computations</a>
            </li>
            <li>
              <a href="glyphs-6.html#section-3">3. Coordinates,
                scaling, and grid-fitting</a>
            </li>
          </ul>

          <h3><a href="glyphs-7.html">VII. FreeType Bitmaps</a></h3>
          <ul>
            <li>
              <a href="glyphs-7.html#section-1">1. Vectorial versus
                pixel coordinates</a>
            </li>
            <li>
              <a href="glyphs-7.html#section-2">2. The <tt>FT_Bitmap</tt>
                descriptor</a>
            </li>
            <li>
              <a href="glyphs-7.html#section-3">3. Converting outlines
                into bitmaps and pixmaps</a>
              </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>
      &nbsp; <!-- separate primary from secondary entries -->
    </li>

    <li class="secondary">
      <a href="glyphs-1.html" class="current">FreeType Glyph Conventions</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-1.html">Basic Typographic Concepts</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-2.html">Glyph Outlines</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-3.html">Glyph Metrics</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-4.html">Kerning</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-5.html">Text Processing</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-6.html">FreeType Outlines</a>
    </li>
    <li class="tertiary">
      <a href="glyphs-7.html">FreeType Bitmaps</a>
    </li>
  </ul>
</div>

</div> <!-- id="wrapper" -->

<div id="TOC-bottom">
</div>

</body>
</html>
glyphs/layout.png000064400000004244151706766400010115 0ustar00�PNG


IHDR��3�"PLTE���
��:IDATh����k���9����=0�]�
栠4-(`�9'\�q��s��>��AZ�:�Ҹ}��µG�8i���K�Ї����׾�Ah���!i%�v-��d��Y�~�;?v��e�,�� $M��j����U��hs�������U���c�,���;6ŽP>�ѷZ{C���A%UӯO�!"
(�p-��K)�p�Rq�L�e1j�ןD�$�c�!���祼�z/_��OJ:=���������O�=:v�_,�O�eO�^>�\�g��?��i��+����_���@���K;��oM��оRݼS\��uL�^���!e���Y���꒵`~�@%���?��bqA��&j��R����y��:]9�G@����_��ڤ�X�/R�5�B�Wȶ�����l��b�t�P�m�L���@�Z^�:�����o�$�'��Y��6�{!�%v���a�6��]a�I�Y@�Q]��D8o������D#a��;>]e�Z.PL}��5m��U��zHs����6�A�"G��_�M;W��kWK�ӻ�����^l���"�X��E�|�8�p�|�&�1�ç/e��xǑ��ꆣ�~�l����S��5g��-��vN����m4�n�X���^�uF:l�Jl���+f�R������*&��P4F�z���̱��d�`��n���Tj�%z9����E
6�x��G�Hޓr�AI4:�3D�<�7�U�^�V�C*|���mWyR�E��/���;����j�W��_�ni����H6��?_}���Uk�A��PZ�3�`���4*Y�՜6ϨE;�+��
�l/�Bڼ�"٢۬�NJi�P}�Y�urO���S��g'�i�#]�X��b��K5x&��h:k�t�S�y�?$'֯
�5�5�]K��Ba���w|��;�m�3��6���GNRh�*y�|c_g?���q�:��?v�t��7���Y�<{?�f�U�m���+|�rX��<{��3Q���L1���{��讘�f�]�К��f��Q{��2#��TNN�P�٬$R�"ԎQe�&O��h+N'�����n91j��J�$U�Ӊ�jM�nLt�H���x��S�P�U���;0���a�S�����|���/)�;��A���C�%��O�9ty�=���*��r��L��&*��Q�5|ʟ߃�*n˙B=ŧ�8Tҕ=���_r�"B������".��8��`As-�M�m D2u�{������_ZNL��
��iCdCj��"����L����]���M��!�ES�?8��U��S�O{H�B��4-�w�ROuB��<%L�M!U=�"�xJ��A_	�RG�D�H�i��z(%Lɀ�SXɊƧJH�i��0!
�P�*��:|��ܕ�;�ʹ(}6�ƛ4��G��і��z��ņ�R)�w"����U���D�p�(�Q̽�V %��T
!R��m�R�O$FA�F/��tꈝ�U#�E��sJ�Tq��HH�π�~��}�Dj��Þ�gH�l�ԥC���/�TZ�=}��8�i��ɏQqΥDj���`Π6*'��jF��0���M��-`+Hz�DoHa\���Њ�p�NI�L$�V*޲�ΤM��b|�i�Ƃn�v���$�e�mgl�w��s��g|�BUe���VP��3猟nDX���Y�AAw��*��
�C��"5�E����_���4x����r��&,gP��G~R���������	�we���~S�q�g�����t�R��Q�x���]8*Ä�])���*��Oo�:�Z�RlO��ן�k=ٮ,e�n�|
%����i4��ȵf����h|� �ZG�3=o��M��#�5T�v�=s���s��{�����$G>�Û�`�2�Z�[�[�����7���dp.(N�
�A��1��Y#�RD�kF8�w��!��i�e�d�I@���e�����]]�����5J=�r�0��OG~�<�|���7�d��#!�Q�”�� ��V�-S�%��Gt#jgG�e�p�=��3FX�N;�m�1�2˦�8�d�0:OE�g���,�zY.����xO.�atEXtAuthorDavid Turner��IEND�B`�glyphs/layout2.png000064400000001240151706766400010170 0ustar00�PNG


IHDR���O<PLTE���
��6IDATX���1��@��A[�}D��`��0V �iTk�-\�!e�
)����� �
œB�K�ی���k?�0z3�IH��J����^�u���f""�����橪F��Mx�S�#HG�9�%��Z:�%j�*V���j��#u��!u�jP/��q\Xk��s�j4ߒ�H�YE��aM�@����j�U�WO�TP�1��>�XԴ�i ʷ�H�_�z}MEy۞&�\֪��!u�:�n)�u2&W��2&k�+Q�~�.�"Q�ٛ��3%��ԢdM9�����m�3����W�o4@�H���G}Yۏ '��4�H���P
�;Rs���T'��b:@}��^�禅�����^�.��x��!��JP�h��wɠܙ\��嚴Ik;m2��MZWVJ�|ڄ�믛��_��M@=���AH)�4=��Z3EO�Bͱ��^�5�o;��릤ʩg�y_�YM��W������ZS�%+�;�,o�w�FDD>�3j�N���O�W�k��XXe��G��g��*@ǡ�z3MzC���������P�=�_�o�e`'�l�tEXtAuthorDavid Turner��IEND�B`�glyphs/metrics.png000064400000004250151706766400010243 0ustar00�PNG


IHDR���)�-PLTE���
��>IDATh���Kl���GHJ��eXrHQ������*���B� ��M�e�i�T�CF�Rؔ6C���.4H�"1��Zd)	J�C�G�NQ����y��gg���c���i������q��Ka�i垖&!�
+���!l/��	V����(в/�}��'�Z���C��+���{��#�&�����1��/��+�wpnjd����De�H@�!�X��9u$���	�+5&%�,��6q.�X:���&�b>bT._9K"J�G�U��6�V�H-����UxMG�����k͝�}��?�(#����="���
�h����_�g`�ޟ�Mcd[;z��v������E#�Sވ��xK�(Ƶ�m�oz�Z:TNJ!�h[�z�ce\
�j��sUk��mE��,��4����݆���0N��{C-�i�o��w�v!E�t/�%J�ϐ�g���I-TO
M���aH/5���ғ��E�6M�"��毚��R4|�d����g��ӧ:W�Rד\�9Qix��3��a�7rJ�5�m�*�6qꏖ�Gd�8^�����kl��\�Ql]�[H�8BG���`V/-��}�K�g���f�C U,�f���[/d�J��;�{�/����\�I�^�s����`��W�T�UD�W�8z���*�+�Q��Kb�c`�e�{<�8�����M���a��_)!zO�&e�w|�h�sDe�s�R�'��T�e�G$����������g�~�S�BA��n�����?���D|E�<J8̫��ߤ|,�VV]b=��3~��BB,|u⫅��~"�ջ�@ym��n�H`V�N�&r-��葥�gH�	6n�@y}����sI�)�����#|��anC
^�9���a��:��	IǶ�h�!��$b�Q("��e�(�ϛo�	x�
EH]"L$�m3q!d�,&"CD�-N(����B�����C���[�JM}q㜮#��"�|f�O�sK��C�h[�;��z��tmQ�.�Q�آ��/V����ӊGd�7ƒrf�G{���ٌxDaqngo%�EV�w'���(�{���]-���!.lD6�^Q��M�[�p{�ń��ѳZĿ��r��g^O-���Vow��qA��/��mA�*Q�ÄP"z���0j=BR����-�hr��,L���l�B��0E�81���Z
@hn�c�2^v8VN(�"�,Ps�J�C�))f����J�:�	؄��"/���HwMT�}�p]�	��vt�E1(�n����c�벅�k��4�#KH_����No�0�*�څ�E�h����ުф�r����^���.!O�^L��*f���;k�R��"�Zݠ�s�%~���J�}�B���D����5=Bh�W��7r���GH�C\>���&�hs�.G]�,� I
��R�Ơ0����C��$�UYXTt��W�[d�"���CE�M�(�z��7T��d�qؓÆ��u�&���`���y�!�PD��Z� @��C#�Ȇ����D���K푳^����Q�B$3���.՞r=4>��"BƠSPGT��� �
�b!PHDĜ�!�=�(�D���V�9[\b��'ڬ�bE.�X#���.���*�%*l�ma}ɘ��ʜ�ZW]ku��̑�G>��"tbCy�8�X�.F�{��;V��bUڀG�Օ/��q�x�J3�s�M���ΔRMj���Ƈ��E6����;>�8ӟZ/N�;Wgס&J�w��.�f���<28>�UF�����$�;>�u�����	��3����yYX�N��ɹ��=���w�9��vM|���A��]���&>�ݪ����[0�,L�z���9��?�qu�����3�N�߹��յi>�yw5P8��WG%.��OK&!R'� �s����E�׼~�"�Hr�(]�<�v��<�8��j������en�#��D/eX�o�8z�~�r��
7�Ns�I>�p�N��!"��R[�#7k���&G'~p��ޚ�!�����&�w9�ؘ:;���qz�i�e^Z\�P�tEXtAuthorDavid Turner��IEND�B`�glyphs/metrics2.png000064400000003475151706766400010335 0ustar00�PNG


IHDR&�p�4PLTE���
���IDATh���MlE��o�%�i�\ajDZ�	9�H9T��q��U���4-q �޴�r���H-�Z� .�8�?JD�pv)'$��R�evg׻뙝��T��'�n�O;�7o�;<��=$�|��`3�d�2�R5�B1DT���澺R�r����'?��"lՕ����[OG�R���펏��Y��+�-L�0d���s+]���}9u�d2��N9/�~�0��DT�$�bhS(cs�vO)opU�+�~��o��*z���q�#��S,a���\��#�J�>��O�l��,f/�)�V���`�o�۽G	�?�:�-��A��p_��;�`�_���_D����eNMDA�ⶔ,�"�-�$�ײ�E���@�T
R�#�~�lV'��A��N���NNb���/����kX��6�w�Z�q��X��$ {��}BA�j�3�B�ٙ#�.��#�e+�i�A�jW_�8_�������n%q�����پ̯�^��`���}W�ݯ�leX��S��+������/���bA��>��5Ir�p)���US�
��j���V)Gf�mF��*��ꠐB�ϫ���~���|dq��OSK�C�I�2̟Y�#�ŅK��{��ڋЭ��ҩVy��>�K�TSA�Z���f"�㲩�|�0P$�m��[YS%���]U}��ϱ���M%��
j�(7�~>�!B�3�5��{PT��P%T$SYw#ؑ}�{H
�Q��dͶ�*�T~�LU6V�VM�*�k;���j*�U
SՙJz�!�Bz�ڪ�cJz��[
nK��%�:����Pe�\��:�T�9-�B%B1J�T_�Pc+4�68
-[Ÿ���"��o�Vt��x*�o��0��|�q�kb�vB)�Ŀ�&SM��X6�.X�?%�:g�0G��Ҷ�}8�[�]m�ǫ��Ǝ���3�h�CK�7�t���Hl�j���5�Z�ˋQ�,tT!�s2J��e�Q�.���x�����Yi�R�-}m���S5�B?�|*Sݥ��e+��(Z���2����B[5�T�S����U+f��Mv]��.��Sq��T9e{���D���I�
��s����P����Jb�sXA�ڲ~�1�U��_MS
��Y�J����r�c��`��"��l��"
2�n�^r���o�k�U�
9
��[��Q�؇��8�/�K�}�K�f;��`�P�b!�Q-��.�Y�V�=JǪ�T����/WU�•�U�z���鹱����>H�*�T�{��i�j��q�Y������B�hͲw�y�Jn�/M���J��=Z��!��!
߷���HH�tɮ�Q�O �#;u���)�/�Ɇ����g��n��`�P���+���y�3�L��<A���&T,v��E��U_�п@yfաҳ#)��4����դ���UE��S�>�_��3���NE�&�@g��`��6��j'{��߱_������*kn��e�4�)*���]���{�F헤7���g�2�~�z=Q�����w(�����;�SޱBY����C��6�c���z����:K!"�Dl5�P}b�n���#��J��Y
5��7�r��2�R�*0�)��R��Pc!�1�,)95|�B�R�2��ЎB|�B
��|Q�6�A`��Pc�U��8ܬ��g�,���[��2����g)��}�ﳕ=��z�F^(��Bj/x�Y��cW��ExtEXtAuthorDavid Turner��IEND�B`�glyphs/points_conic.png000064400000001300151706766400011255 0ustar00�PNG


IHDR��9ᏍhIDATX����kA�ORz+�M��"�"�Ѓ!����=��B��'s)��^j��@M�P�=(�Ҳ�']�A"J��g!��M����A�����۝}3�f�h%b�9�
��$y/��f2J�9���LafMC�̄F�ES�Yķ�fz��Bi����Tx4��5�1��=��a\��B󃌕P0����Ĥ����5	�����h}p�J�d���=��8|�M�h�GI;Te����q���"�C[��;"L	
3���F"�;"�`�`n�l�L�ؙ$�Wa�a�`Fd/s-��r������C����ғ�.�ă�-�Q`�f�e�7�2sO�_]1έ_��g�3ͬ�$�~��,fq��Z�q�>�>O���;��;ůK��'5[Ϳ2{N�m���ZS͛>Ʋ����sŮ⚩�h���g�/�9=33-�ncc!�s��/;.AYk"�?r��t����`A#�e�W��o��n6��S3_��ƃ�����V�nyį�S2QW�
6��{����2�}�H�M��n��'�c�ⱁ{������o����ll��,Ê�i�N/�}yi���Fcwz���؁����x����}�ݘp�FtEXtAuthorDavid Turner��IEND�B`�glyphs/points_conic2.png000064400000002007151706766400011344 0ustar00�PNG


IHDR�����?�IDATX���KhApA� �B<�z����Ră�G�E�KY��%MG𠢵�+
���A��I�V�H<XM��QZ�nV�&�ή�}dw6�h[,"Y�!��fg�3�3�4�s~^C�І���Y�>�'NG�HM�*�z�����'�1Pg�>C�T����dj�R������-'g����g��D�U�x�6�ucvj?Չ���ovz����sUs�vѻ��
z+�S�
��k5��3�36F���;��J�Qc�7H2ɀ'H[��ȞY��	����g¬Y���Uk���ɨ,�{�dF�_��}2�^ ð�C���Cv����l����hN�9�4[�����^"���p-��} �U��y�k7��'N��2U%��ȍ�Y��V�����Lkej-�ݹ�R�L�ſi̼W%j��״ԸO6�Wk˫�+\5��B�7Uv���y7�z-0��R_�Ў��w+�����w�����۠�'q"72�á����,��'��L���mQ~~J8!gc���ʿ`'�n����BH�����g$��r�X�,�]['ZY�hy��6��n�V�9�d��b�ᖁ���ݠNVELK�Uo��w�z_�5�I���Ni�
f�"�x�U�R^{�镺�9�v+�~�}<��9�#���mx�i�]G�=��;��PX�?��ΉJP�Ȕ¯��6f���(

�����|l�:�81��g�G��weK�(����e��}���5Y��$骀�݃H�s��'%�k���h��l�8D�ۦh)�կ�R�k�\����c�y�^��t>`j��c�1{"<�(/m�Y>��ٗ4U���E�8�9��bd�	c4G�f"����I=�2�?�+��om
'�c����R�z��6�{�����G�zY%�IR�}�����-vr-	Z��P���“�3t������-(�tEXtAuthorDavid Turner��IEND�B`�glyphs/points_cubic.png000064400000001426151706766400011260 0ustar00�PNG


IHDR��+T�IDATX���Oh�P��o^vLփ�IO�	�Et��
��.��&��E�<Ha`���f��g{�e��;T,b�BӬ}/��i�^�.biI��K��}I��n��Ԧ6I3�I`���Z]���c�Z�?t:��y"�1�N�lR�i���(n֟�$NQtwo|�3n�q��~���x˻��X��=�ZP(�q��"uG������KX��? nV,vh�X��1�Qp��@ql��>gG�FE��t?>RIe
8e*�0�0p���ͤ

��3�׵��d��͊f:��p`�Hf�����e=�>k6�6Y�ln�m��r��E߰�7�7��	K`�����|�߰��!���f
lM`e��s&k�Ԧ�o��
��vm̚�\0Y���F3�1����k����Ƀ�l�1S���[~v�Rm��J�7C6單��ח
-�d�#���^��m�C��[��Z{;�E3����U��}�㱙�W$U:T7>h�W��k���;�<����J���U����R[=v^$ȝ��5�ٙ��rD���N�k����;��Ў>�(�(꘮Un��<�s�Ņd���b�y!�d�Hz�^#��s��S(ɭ���~�[���I>#�$��F�����:~̝mb�9��%�v��n`[&IN��Lb��%5+�ݎs�I���k�=�<�-����T�J&x(�����ߨyy�f�=>tEXtAuthorDavid Turner��IEND�B`�glyphs/points_segment.png000064400000001010151706766400011622 0ustar00�PNG


IHDR��vZ���IDATX��տK�@p��]���]��M����:(�Ppp�B7�C&�V5�V[��,�����H��%sF#���;8�d���]޽{7�>��FB1��<�S|AXCH��8ڭ��"$9����"$9:�&B	��h�N�J����6�>��g�~�Q�+	@�.���"$9��B���h`)@��ѐ�J{;�m4u���%;h�a��"��1|?C���|]To�%;����]i�s�֑2ݜ�')�=��?+�
�G��d����x:��/;��r��Kf�����͚��Νb"��x�8+9F&�O^}���2��K�6--#��n��f���T�����X�]�.U�*TF�摹@��z��x�÷n�n1-;Ba�BD��~(
{�`̻qE(
@/mY�[ɠ_���݅ڪ6�Bר|+�L��lS��U>tEXtAuthorDavid Turner��IEND�B`�glyphs/twlewis1.png000064400000001234151706766400010353 0ustar00�PNG


IHDR:&�J;PLTE������mmU���mm���U���H��3 IDATX��Mn�0F5l״d�>��ø[&l��p��.(�Vb6⮪OZP��'�i`֬Y�f��V��;��a133SpfZ͔j�u�Ŕ��羞�l�u1�P�g�6\)��p	�<�����p]K_��
�
���|����q��5�ܔro+֦k�bwK�ٝ�Y��<�K�[@�ixH~�3��`�3Q����U�.�%��T�&��+�����;�b������R|B��Ix
���m����t�?�N�]
�R�n�Z�p;S��G��S�Z�bp8m'\)��.��=L)�!;�/ ��ԺAPİC���z��N4�O)+�bH�t�̪���9^f*��}��s�_�x^>�v�>%�U����|�ݭ��w7��y��I�'�c�+k��{?��_�r�y�[�|,��h�Ě�%3�=��X &,��u���q��|,=F���uϙ�l;�wf[��ƭ�_�0�@�`���c[�6ٳbbb���=\#���o�ĬY�f͚5��|wn��C^�tEXtAuthorDavid Turner��IEND�B`�glyphs/twlewis2.png000064400000000705151706766400010356 0ustar00�PNG


IHDRs$H��PLTE���mmU������mm���U�VULIDATH�픱Nc1EO<��)��'r�z�k�6X驨��a��@@�-ʭ��9��h�p�O�ƿ&IR)K"K���{,8F�D�æ�h�<�:�8�}���K�	�X��pӖ�#�Fs�pw��41+f5�~$�cE0*�gS�LY��Qp����ي��p�����w�Ut8�x:Cg��x֔=���-G���E���4–[��6�jrkO��֒�#X�UWQd=տ��@��tS����hْ���3?��t�p7�Y^��ɕR��Z���gt4�K��8�e�I���)JE�����_���"6(�o�_��k��[W��Y�2�c�1tEXtAuthorDavid Turner��IEND�B`�glyphs/up_flow.png000064400000001434151706766400010251 0ustar00�PNG


IHDR�H�	PLTE�����=�-�IDATx���͊"1�S!
!�4�>��RO�Z̾��\��<E�J|�Y��
5�UI�qf�Y)�G�<h�d�@h�:T*�(�R��K؅�ޅp��w��v����<څy�Y�0�ۧ���څa�P�o!�k�:��(a�{Ф|����R���]8�p`��ݾb,���
7tQ��H$�����N�1O����jV.���_x����Q)�ܪD�@�7*
�
Şn`�x�x�Jy���iW<`��|��v��B���3-�)�9u�yf��.o���ɀ����O�"oR����F��dS>�3�x�B%Q�J"J�\��6eLDSauFND��K<W)��)c����h�Bd#8[k�޼����{�V�W������V����G�=EZJQD����EQ��DEQ��DEi)Y]Q�G���������?�ţ�*���ņr��KJ1'cL��F�(T��t@%�1�J1%Y{�83�ɪŵ
2��bQ=�|��(��U9�b�%a�M����]������R�KKMܣ��Ʋh��~��R
3ʍ3Z��bi)i��¦����Jյ���R��Z�,Dzh��r]-U�|n����Z*�h)�����]��s~���-uw_�0�sDY��|����C�ރW�&J�b�O�����.Ip��6~cH$�?���+�2tEXtAuthorDavid Turner��IEND�B`�reference/ft2-glyph_variants.html000064400000033652151706766400013140 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF;
         width: 87%;
         margin: auto; }

  div.section { width: 75%;
                margin: auto; }
  div.section hr { margin: 4ex 0 1ex 0; }
  div.section h4 { background-color: #EEEEFF;
                   font-size: medium;
                   font-style: oblique;
                   font-weight: bold;
                   margin: 3ex 0 1.5ex 9%;
                   padding: 0.3ex 0 0.3ex 1%; }
  div.section p { margin: 1.5ex 0 1.5ex 10%; }
  div.section pre { margin: 3ex 0 3ex 9%;
                    background-color: #D6E8FF;
                    padding: 2ex 0 2ex 1%; }
  div.section table.fields { width: 90%;
                             margin: 1.5ex 0 1.5ex 10%; }
  div.section table.toc { width: 95%;
                          margin: 1.5ex 0 1.5ex 5%; }
  div.timestamp { text-align: center;
                  font-size: 69%;
                  margin: 1.5ex 0 1.5ex 0; }

  h1 { text-align: center; }
  h3 { font-size: medium;
       margin: 4ex 0 1.5ex 0; }

  p { text-align: justify; }

  pre.colored { color: blue; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  table.fields td.val { font-weight: bold;
                        text-align: right;
                        width: 30%;
                        vertical-align: baseline;
                        padding: 1ex 1em 1ex 0; }
  table.fields td.desc { vertical-align: baseline;
                         padding: 1ex 0 1ex 1em; }
  table.fields td.desc p:first-child { margin: 0; }
  table.fields td.desc p { margin: 1.5ex 0 0 0; }
  table.index { margin: 6ex auto 6ex auto;
                border: 0;
                border-collapse: separate;
                border-spacing: 1em 0.3ex; }
  table.index tr { padding: 0; }
  table.index td { padding: 0; }
  table.index-toc-link { width: 100%;
                         border: 0;
                         border-spacing: 0;
                         margin: 1ex 0 1ex 0; }
  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
                                 font-size: 83%;
                                 text-align: left; }
  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
                                   font-size: 83%;
                                   text-align: center; }
  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
                                  font-size: 83%;
                                  text-align: right; }
  table.synopsis { margin: 6ex auto 6ex auto;
                   border: 0;
                   border-collapse: separate;
                   border-spacing: 2em 0.6ex; }
  table.synopsis tr { padding: 0; }
  table.synopsis td { padding: 0; }
  table.toc td.link { width: 30%;
                      text-align: right;
                      vertical-align: baseline;
                      padding: 1ex 1em 1ex 0; }
  table.toc td.desc { vertical-align: baseline;
                      padding: 1ex 0 1ex 1em;
                      text-align: left; }
  table.toc td.desc p:first-child { margin: 0;
                                    text-align: left; }
  table.toc td.desc p { margin: 1.5ex 0 0 0;
                        text-align: left; }

</style>
</head>
<body>

<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
<h1>FreeType-2.9.1 API Reference</h1>

<h1 id="glyph_variants">Unicode Variation Sequences</h1>
<h2>Synopsis</h2>
<table class="synopsis">
<tr><td><a href="#FT_Face_GetCharVariantIndex">FT_Face_GetCharVariantIndex</a></td><td><a href="#FT_Face_GetVariantsOfChar">FT_Face_GetVariantsOfChar</a></td></tr>
<tr><td><a href="#FT_Face_GetCharVariantIsDefault">FT_Face_GetCharVariantIsDefault</a></td><td><a href="#FT_Face_GetCharsOfVariant">FT_Face_GetCharsOfVariant</a></td></tr>
<tr><td><a href="#FT_Face_GetVariantSelectors">FT_Face_GetVariantSelectors</a></td><td></td></tr>
</table>


<p>Many characters, especially for CJK scripts, have variant forms. They are a sort of grey area somewhere between being totally irrelevant and semantically distinct; for this reason, the Unicode consortium decided to introduce Variation Sequences (VS), consisting of a Unicode base character and a variation selector instead of further extending the already huge number of characters.</p>
<p>Unicode maintains two different sets, namely &lsquo;Standardized Variation Sequences&rsquo; and registered &lsquo;Ideographic Variation Sequences&rsquo; (IVS), collected in the &lsquo;Ideographic Variation Database&rsquo; (IVD).</p>
<p><a href="https://unicode.org/Public/UCD/latest/ucd/StandardizedVariants.txt">https://unicode.org/Public/UCD/latest/ucd/StandardizedVariants.txt</a> <a href="https://unicode.org/reports/tr37/">https://unicode.org/reports/tr37/</a> <a href="https://unicode.org/ivd/">https://unicode.org/ivd/</a></p>
<p>To date (January 2017), the character with the most ideographic variations is U+9089, having 32 such IVS.</p>
<p>Three Mongolian Variation Selectors have the values U+180B-U+180D; 256 generic Variation Selectors are encoded in the ranges U+FE00-U+FE0F and U+E0100-U+E01EF. IVS currently use Variation Selectors from the range U+E0100-U+E01EF only.</p>
<p>A VS consists of the base character value followed by a single Variation Selector. For example, to get the first variation of U+9089, you have to write the character sequence &lsquo;U+9089 U+E0100&rsquo;.</p>
<p>Adobe and MS decided to support both standardized and ideographic VS with a new cmap subtable (format&nbsp;14). It is an odd subtable because it is not a mapping of input code points to glyphs, but contains lists of all variations supported by the font.</p>
<p>A variation may be either &lsquo;default&rsquo; or &lsquo;non-default&rsquo; for a given font. A default variation is the one you will get for that code point if you look it up in the standard Unicode cmap. A non-default variation is a different glyph.</p>

<div class="section">
<h3 id="FT_Face_GetCharVariantIndex">FT_Face_GetCharVariantIndex</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> )
  <b>FT_Face_GetCharVariantIndex</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>   face,
                               <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>  charcode,
                               <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>  variantSelector );
</pre>

<p>Return the glyph index of a given character code as modified by the variation selector.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the source face object.</p>
</td></tr>
<tr><td class="val" id="charcode">charcode</td><td class="desc">
<p>The character code point in Unicode.</p>
</td></tr>
<tr><td class="val" id="variantSelector">variantSelector</td><td class="desc">
<p>The Unicode code point of the variation selector.</p>
</td></tr>
</table>

<h4>return</h4>
<p>The glyph index. 0&nbsp;means either &lsquo;undefined character code&rsquo;, or &lsquo;undefined selector code&rsquo;, or &lsquo;no variation selector cmap subtable&rsquo;, or &lsquo;current CharMap is not Unicode&rsquo;.</p>

<h4>note</h4>
<p>If you use FreeType to manipulate the contents of font files directly, be aware that the glyph index returned by this function doesn't always correspond to the internal indices used within the file. This is done to ensure that value&nbsp;0 always corresponds to the &lsquo;missing glyph&rsquo;.</p>
<p>This function is only meaningful if a) the font has a variation selector cmap sub table, and b) the current charmap has a Unicode encoding.</p>

<h4>since</h4>
<p>2.3.6</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Face_GetCharVariantIsDefault">FT_Face_GetCharVariantIsDefault</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Int">FT_Int</a> )
  <b>FT_Face_GetCharVariantIsDefault</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>   face,
                                   <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>  charcode,
                                   <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>  variantSelector );
</pre>

<p>Check whether this variation of this Unicode character is the one to be found in the &lsquo;cmap&rsquo;.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the source face object.</p>
</td></tr>
<tr><td class="val" id="charcode">charcode</td><td class="desc">
<p>The character codepoint in Unicode.</p>
</td></tr>
<tr><td class="val" id="variantSelector">variantSelector</td><td class="desc">
<p>The Unicode codepoint of the variation selector.</p>
</td></tr>
</table>

<h4>return</h4>
<p>1&nbsp;if found in the standard (Unicode) cmap, 0&nbsp;if found in the variation selector cmap, or -1 if it is not a variation.</p>

<h4>note</h4>
<p>This function is only meaningful if the font has a variation selector cmap subtable.</p>

<h4>since</h4>
<p>2.3.6</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Face_GetVariantSelectors">FT_Face_GetVariantSelectors</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_UInt32">FT_UInt32</a>* )
  <b>FT_Face_GetVariantSelectors</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>  face );
</pre>

<p>Return a zero-terminated list of Unicode variation selectors found in the font.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the source face object.</p>
</td></tr>
</table>

<h4>return</h4>
<p>A pointer to an array of selector code points, or NULL if there is no valid variation selector cmap subtable.</p>

<h4>note</h4>
<p>The last item in the array is&nbsp;0; the array is owned by the <a href="ft2-base_interface.html#FT_Face">FT_Face</a> object but can be overwritten or released on the next call to a FreeType function.</p>

<h4>since</h4>
<p>2.3.6</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Face_GetVariantsOfChar">FT_Face_GetVariantsOfChar</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_UInt32">FT_UInt32</a>* )
  <b>FT_Face_GetVariantsOfChar</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>   face,
                             <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>  charcode );
</pre>

<p>Return a zero-terminated list of Unicode variation selectors found for the specified character code.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the source face object.</p>
</td></tr>
<tr><td class="val" id="charcode">charcode</td><td class="desc">
<p>The character codepoint in Unicode.</p>
</td></tr>
</table>

<h4>return</h4>
<p>A pointer to an array of variation selector code points that are active for the given character, or NULL if the corresponding list is empty.</p>

<h4>note</h4>
<p>The last item in the array is&nbsp;0; the array is owned by the <a href="ft2-base_interface.html#FT_Face">FT_Face</a> object but can be overwritten or released on the next call to a FreeType function.</p>

<h4>since</h4>
<p>2.3.6</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Face_GetCharsOfVariant">FT_Face_GetCharsOfVariant</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_UInt32">FT_UInt32</a>* )
  <b>FT_Face_GetCharsOfVariant</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>   face,
                             <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>  variantSelector );
</pre>

<p>Return a zero-terminated list of Unicode character codes found for the specified variation selector.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the source face object.</p>
</td></tr>
<tr><td class="val" id="variantSelector">variantSelector</td><td class="desc">
<p>The variation selector code point in Unicode.</p>
</td></tr>
</table>

<h4>return</h4>
<p>A list of all the code points that are specified by this selector (both default and non-default codes are returned) or NULL if there is no valid cmap or the variation selector is invalid.</p>

<h4>note</h4>
<p>The last item in the array is&nbsp;0; the array is owned by the <a href="ft2-base_interface.html#FT_Face">FT_Face</a> object but can be overwritten or released on the next call to a FreeType function.</p>

<h4>since</h4>
<p>2.3.6</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

</body>
</html>
reference/ft2-gx_validation.html000064400000044161151706766400012733 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF;
         width: 87%;
         margin: auto; }

  div.section { width: 75%;
                margin: auto; }
  div.section hr { margin: 4ex 0 1ex 0; }
  div.section h4 { background-color: #EEEEFF;
                   font-size: medium;
                   font-style: oblique;
                   font-weight: bold;
                   margin: 3ex 0 1.5ex 9%;
                   padding: 0.3ex 0 0.3ex 1%; }
  div.section p { margin: 1.5ex 0 1.5ex 10%; }
  div.section pre { margin: 3ex 0 3ex 9%;
                    background-color: #D6E8FF;
                    padding: 2ex 0 2ex 1%; }
  div.section table.fields { width: 90%;
                             margin: 1.5ex 0 1.5ex 10%; }
  div.section table.toc { width: 95%;
                          margin: 1.5ex 0 1.5ex 5%; }
  div.timestamp { text-align: center;
                  font-size: 69%;
                  margin: 1.5ex 0 1.5ex 0; }

  h1 { text-align: center; }
  h3 { font-size: medium;
       margin: 4ex 0 1.5ex 0; }

  p { text-align: justify; }

  pre.colored { color: blue; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  table.fields td.val { font-weight: bold;
                        text-align: right;
                        width: 30%;
                        vertical-align: baseline;
                        padding: 1ex 1em 1ex 0; }
  table.fields td.desc { vertical-align: baseline;
                         padding: 1ex 0 1ex 1em; }
  table.fields td.desc p:first-child { margin: 0; }
  table.fields td.desc p { margin: 1.5ex 0 0 0; }
  table.index { margin: 6ex auto 6ex auto;
                border: 0;
                border-collapse: separate;
                border-spacing: 1em 0.3ex; }
  table.index tr { padding: 0; }
  table.index td { padding: 0; }
  table.index-toc-link { width: 100%;
                         border: 0;
                         border-spacing: 0;
                         margin: 1ex 0 1ex 0; }
  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
                                 font-size: 83%;
                                 text-align: left; }
  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
                                   font-size: 83%;
                                   text-align: center; }
  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
                                  font-size: 83%;
                                  text-align: right; }
  table.synopsis { margin: 6ex auto 6ex auto;
                   border: 0;
                   border-collapse: separate;
                   border-spacing: 2em 0.6ex; }
  table.synopsis tr { padding: 0; }
  table.synopsis td { padding: 0; }
  table.toc td.link { width: 30%;
                      text-align: right;
                      vertical-align: baseline;
                      padding: 1ex 1em 1ex 0; }
  table.toc td.desc { vertical-align: baseline;
                      padding: 1ex 0 1ex 1em;
                      text-align: left; }
  table.toc td.desc p:first-child { margin: 0;
                                    text-align: left; }
  table.toc td.desc p { margin: 1.5ex 0 0 0;
                        text-align: left; }

</style>
</head>
<body>

<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
<h1>FreeType-2.9.1 API Reference</h1>

<h1 id="gx_validation">TrueTypeGX/AAT Validation</h1>
<h2>Synopsis</h2>
<table class="synopsis">
<tr><td><a href="#FT_TrueTypeGX_Validate">FT_TrueTypeGX_Validate</a></td><td><a href="#FT_ClassicKern_Validate">FT_ClassicKern_Validate</a></td><td><a href="#FT_VALIDATE_GX_LENGTH">FT_VALIDATE_GX_LENGTH</a></td></tr>
<tr><td><a href="#FT_TrueTypeGX_Free">FT_TrueTypeGX_Free</a></td><td><a href="#FT_ClassicKern_Free">FT_ClassicKern_Free</a></td><td><a href="#FT_VALIDATE_GXXXX">FT_VALIDATE_GXXXX</a></td></tr>
<tr><td>&nbsp;</td><td>&nbsp;</td><td><a href="#FT_VALIDATE_CKERNXXX">FT_VALIDATE_CKERNXXX</a></td></tr>
</table>


<p>This section contains the declaration of functions to validate some TrueTypeGX tables (feat, mort, morx, bsln, just, kern, opbd, trak, prop, lcar).</p>

<div class="section">
<h3 id="FT_TrueTypeGX_Validate">FT_TrueTypeGX_Validate</h3>
<p>Defined in FT_GX_VALIDATE_H (freetype/ftgxval.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_TrueTypeGX_Validate</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>   face,
                          <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>   validation_flags,
                          <a href="ft2-basic_types.html#FT_Bytes">FT_Bytes</a>  tables[<a href="ft2-gx_validation.html#FT_VALIDATE_GX_LENGTH">FT_VALIDATE_GX_LENGTH</a>],
                          <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>   table_length );
</pre>

<p>Validate various TrueTypeGX tables to assure that all offsets and indices are valid. The idea is that a higher-level library that actually does the text layout can access those tables without error checking (which can be quite time consuming).</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the input face.</p>
</td></tr>
<tr><td class="val" id="validation_flags">validation_flags</td><td class="desc">
<p>A bit field that specifies the tables to be validated. See <a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_GXXXX</a> for possible values.</p>
</td></tr>
<tr><td class="val" id="table_length">table_length</td><td class="desc">
<p>The size of the &lsquo;tables&rsquo; array. Normally, <a href="ft2-gx_validation.html#FT_VALIDATE_GX_LENGTH">FT_VALIDATE_GX_LENGTH</a> should be passed.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="tables">tables</td><td class="desc">
<p>The array where all validated sfnt tables are stored. The array itself must be allocated by a client.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>This function only works with TrueTypeGX fonts, returning an error otherwise.</p>
<p>After use, the application should deallocate the buffers pointed to by each &lsquo;tables&rsquo; element, by calling <a href="ft2-gx_validation.html#FT_TrueTypeGX_Free">FT_TrueTypeGX_Free</a>. A NULL value indicates that the table either doesn't exist in the font, the application hasn't asked for validation, or the validator doesn't have the ability to validate the sfnt table.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_TrueTypeGX_Free">FT_TrueTypeGX_Free</h3>
<p>Defined in FT_GX_VALIDATE_H (freetype/ftgxval.h).</p>
<pre>
  FT_EXPORT( <span class="keyword">void</span> )
  <b>FT_TrueTypeGX_Free</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>   face,
                      <a href="ft2-basic_types.html#FT_Bytes">FT_Bytes</a>  table );
</pre>

<p>Free the buffer allocated by TrueTypeGX validator.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the input face.</p>
</td></tr>
<tr><td class="val" id="table">table</td><td class="desc">
<p>The pointer to the buffer allocated by <a href="ft2-gx_validation.html#FT_TrueTypeGX_Validate">FT_TrueTypeGX_Validate</a>.</p>
</td></tr>
</table>

<h4>note</h4>
<p>This function must be used to free the buffer allocated by <a href="ft2-gx_validation.html#FT_TrueTypeGX_Validate">FT_TrueTypeGX_Validate</a> only.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_ClassicKern_Validate">FT_ClassicKern_Validate</h3>
<p>Defined in FT_GX_VALIDATE_H (freetype/ftgxval.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_ClassicKern_Validate</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>    face,
                           <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>    validation_flags,
                           <a href="ft2-basic_types.html#FT_Bytes">FT_Bytes</a>  *ckern_table );
</pre>

<p>Validate classic (16-bit format) kern table to assure that the offsets and indices are valid. The idea is that a higher-level library that actually does the text layout can access those tables without error checking (which can be quite time consuming).</p>
<p>The &lsquo;kern&rsquo; table validator in <a href="ft2-gx_validation.html#FT_TrueTypeGX_Validate">FT_TrueTypeGX_Validate</a> deals with both the new 32-bit format and the classic 16-bit format, while FT_ClassicKern_Validate only supports the classic 16-bit format.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the input face.</p>
</td></tr>
<tr><td class="val" id="validation_flags">validation_flags</td><td class="desc">
<p>A bit field that specifies the dialect to be validated. See <a href="ft2-gx_validation.html#FT_VALIDATE_CKERNXXX">FT_VALIDATE_CKERNXXX</a> for possible values.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="ckern_table">ckern_table</td><td class="desc">
<p>A pointer to the kern table.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>After use, the application should deallocate the buffers pointed to by &lsquo;ckern_table&rsquo;, by calling <a href="ft2-gx_validation.html#FT_ClassicKern_Free">FT_ClassicKern_Free</a>. A NULL value indicates that the table doesn't exist in the font.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_ClassicKern_Free">FT_ClassicKern_Free</h3>
<p>Defined in FT_GX_VALIDATE_H (freetype/ftgxval.h).</p>
<pre>
  FT_EXPORT( <span class="keyword">void</span> )
  <b>FT_ClassicKern_Free</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>   face,
                       <a href="ft2-basic_types.html#FT_Bytes">FT_Bytes</a>  table );
</pre>

<p>Free the buffer allocated by classic Kern validator.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the input face.</p>
</td></tr>
<tr><td class="val" id="table">table</td><td class="desc">
<p>The pointer to the buffer that is allocated by <a href="ft2-gx_validation.html#FT_ClassicKern_Validate">FT_ClassicKern_Validate</a>.</p>
</td></tr>
</table>

<h4>note</h4>
<p>This function must be used to free the buffer allocated by <a href="ft2-gx_validation.html#FT_ClassicKern_Validate">FT_ClassicKern_Validate</a> only.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_VALIDATE_GX_LENGTH">FT_VALIDATE_GX_LENGTH</h3>
<p>Defined in FT_GX_VALIDATE_H (freetype/ftgxval.h).</p>
<pre>
#define <b>FT_VALIDATE_GX_LENGTH</b>  ( FT_VALIDATE_GX_LAST_INDEX + 1 )
</pre>

<p>The number of tables checked in this module. Use it as a parameter for the &lsquo;table-length&rsquo; argument of function <a href="ft2-gx_validation.html#FT_TrueTypeGX_Validate">FT_TrueTypeGX_Validate</a>.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_VALIDATE_GXXXX">FT_VALIDATE_GXXXX</h3>
<p>Defined in FT_GX_VALIDATE_H (freetype/ftgxval.h).</p>
<pre>
#define <a href="ft2-gx_validation.html#FT_VALIDATE_feat">FT_VALIDATE_feat</a>  FT_VALIDATE_GX_BITFIELD( feat )
#define <a href="ft2-gx_validation.html#FT_VALIDATE_mort">FT_VALIDATE_mort</a>  FT_VALIDATE_GX_BITFIELD( mort )
#define <a href="ft2-gx_validation.html#FT_VALIDATE_morx">FT_VALIDATE_morx</a>  FT_VALIDATE_GX_BITFIELD( morx )
#define <a href="ft2-gx_validation.html#FT_VALIDATE_bsln">FT_VALIDATE_bsln</a>  FT_VALIDATE_GX_BITFIELD( bsln )
#define <a href="ft2-gx_validation.html#FT_VALIDATE_just">FT_VALIDATE_just</a>  FT_VALIDATE_GX_BITFIELD( just )
#define <a href="ft2-gx_validation.html#FT_VALIDATE_kern">FT_VALIDATE_kern</a>  FT_VALIDATE_GX_BITFIELD( kern )
#define <a href="ft2-gx_validation.html#FT_VALIDATE_opbd">FT_VALIDATE_opbd</a>  FT_VALIDATE_GX_BITFIELD( opbd )
#define <a href="ft2-gx_validation.html#FT_VALIDATE_trak">FT_VALIDATE_trak</a>  FT_VALIDATE_GX_BITFIELD( trak )
#define <a href="ft2-gx_validation.html#FT_VALIDATE_prop">FT_VALIDATE_prop</a>  FT_VALIDATE_GX_BITFIELD( prop )
#define <a href="ft2-gx_validation.html#FT_VALIDATE_lcar">FT_VALIDATE_lcar</a>  FT_VALIDATE_GX_BITFIELD( lcar )

#define <a href="ft2-gx_validation.html#FT_VALIDATE_GX">FT_VALIDATE_GX</a>  ( <a href="ft2-gx_validation.html#FT_VALIDATE_feat">FT_VALIDATE_feat</a> | \
                          <a href="ft2-gx_validation.html#FT_VALIDATE_mort">FT_VALIDATE_mort</a> | \
                          <a href="ft2-gx_validation.html#FT_VALIDATE_morx">FT_VALIDATE_morx</a> | \
                          <a href="ft2-gx_validation.html#FT_VALIDATE_bsln">FT_VALIDATE_bsln</a> | \
                          <a href="ft2-gx_validation.html#FT_VALIDATE_just">FT_VALIDATE_just</a> | \
                          <a href="ft2-gx_validation.html#FT_VALIDATE_kern">FT_VALIDATE_kern</a> | \
                          <a href="ft2-gx_validation.html#FT_VALIDATE_opbd">FT_VALIDATE_opbd</a> | \
                          <a href="ft2-gx_validation.html#FT_VALIDATE_trak">FT_VALIDATE_trak</a> | \
                          <a href="ft2-gx_validation.html#FT_VALIDATE_prop">FT_VALIDATE_prop</a> | \
                          <a href="ft2-gx_validation.html#FT_VALIDATE_lcar">FT_VALIDATE_lcar</a> )
</pre>

<p>A list of bit-field constants used with <a href="ft2-gx_validation.html#FT_TrueTypeGX_Validate">FT_TrueTypeGX_Validate</a> to indicate which TrueTypeGX/AAT Type tables should be validated.</p>

<h4>values</h4>
<table class="fields">
<tr><td class="val" id="FT_VALIDATE_feat">FT_VALIDATE_feat</td><td class="desc">
<p>Validate &lsquo;feat&rsquo; table.</p>
</td></tr>
<tr><td class="val" id="FT_VALIDATE_mort">FT_VALIDATE_mort</td><td class="desc">
<p>Validate &lsquo;mort&rsquo; table.</p>
</td></tr>
<tr><td class="val" id="FT_VALIDATE_morx">FT_VALIDATE_morx</td><td class="desc">
<p>Validate &lsquo;morx&rsquo; table.</p>
</td></tr>
<tr><td class="val" id="FT_VALIDATE_bsln">FT_VALIDATE_bsln</td><td class="desc">
<p>Validate &lsquo;bsln&rsquo; table.</p>
</td></tr>
<tr><td class="val" id="FT_VALIDATE_just">FT_VALIDATE_just</td><td class="desc">
<p>Validate &lsquo;just&rsquo; table.</p>
</td></tr>
<tr><td class="val" id="FT_VALIDATE_kern">FT_VALIDATE_kern</td><td class="desc">
<p>Validate &lsquo;kern&rsquo; table.</p>
</td></tr>
<tr><td class="val" id="FT_VALIDATE_opbd">FT_VALIDATE_opbd</td><td class="desc">
<p>Validate &lsquo;opbd&rsquo; table.</p>
</td></tr>
<tr><td class="val" id="FT_VALIDATE_trak">FT_VALIDATE_trak</td><td class="desc">
<p>Validate &lsquo;trak&rsquo; table.</p>
</td></tr>
<tr><td class="val" id="FT_VALIDATE_prop">FT_VALIDATE_prop</td><td class="desc">
<p>Validate &lsquo;prop&rsquo; table.</p>
</td></tr>
<tr><td class="val" id="FT_VALIDATE_lcar">FT_VALIDATE_lcar</td><td class="desc">
<p>Validate &lsquo;lcar&rsquo; table.</p>
</td></tr>
<tr><td class="val" id="FT_VALIDATE_GX">FT_VALIDATE_GX</td><td class="desc">
<p>Validate all TrueTypeGX tables (feat, mort, morx, bsln, just, kern, opbd, trak, prop and lcar).</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_VALIDATE_CKERNXXX">FT_VALIDATE_CKERNXXX</h3>
<p>Defined in FT_GX_VALIDATE_H (freetype/ftgxval.h).</p>
<pre>
#define <a href="ft2-gx_validation.html#FT_VALIDATE_MS">FT_VALIDATE_MS</a>     ( FT_VALIDATE_GX_START &lt;&lt; 0 )
#define <a href="ft2-gx_validation.html#FT_VALIDATE_APPLE">FT_VALIDATE_APPLE</a>  ( FT_VALIDATE_GX_START &lt;&lt; 1 )

#define <a href="ft2-gx_validation.html#FT_VALIDATE_CKERN">FT_VALIDATE_CKERN</a>  ( <a href="ft2-gx_validation.html#FT_VALIDATE_MS">FT_VALIDATE_MS</a> | <a href="ft2-gx_validation.html#FT_VALIDATE_APPLE">FT_VALIDATE_APPLE</a> )
</pre>

<p>A list of bit-field constants used with <a href="ft2-gx_validation.html#FT_ClassicKern_Validate">FT_ClassicKern_Validate</a> to indicate the classic kern dialect or dialects. If the selected type doesn't fit, <a href="ft2-gx_validation.html#FT_ClassicKern_Validate">FT_ClassicKern_Validate</a> regards the table as invalid.</p>

<h4>values</h4>
<table class="fields">
<tr><td class="val" id="FT_VALIDATE_MS">FT_VALIDATE_MS</td><td class="desc">
<p>Handle the &lsquo;kern&rsquo; table as a classic Microsoft kern table.</p>
</td></tr>
<tr><td class="val" id="FT_VALIDATE_APPLE">FT_VALIDATE_APPLE</td><td class="desc">
<p>Handle the &lsquo;kern&rsquo; table as a classic Apple kern table.</p>
</td></tr>
<tr><td class="val" id="FT_VALIDATE_CKERN">FT_VALIDATE_CKERN</td><td class="desc">
<p>Handle the &lsquo;kern&rsquo; as either classic Apple or Microsoft kern table.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

</body>
</html>
reference/ft2-gzip.html000064400000020627151706766400011055 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF;
         width: 87%;
         margin: auto; }

  div.section { width: 75%;
                margin: auto; }
  div.section hr { margin: 4ex 0 1ex 0; }
  div.section h4 { background-color: #EEEEFF;
                   font-size: medium;
                   font-style: oblique;
                   font-weight: bold;
                   margin: 3ex 0 1.5ex 9%;
                   padding: 0.3ex 0 0.3ex 1%; }
  div.section p { margin: 1.5ex 0 1.5ex 10%; }
  div.section pre { margin: 3ex 0 3ex 9%;
                    background-color: #D6E8FF;
                    padding: 2ex 0 2ex 1%; }
  div.section table.fields { width: 90%;
                             margin: 1.5ex 0 1.5ex 10%; }
  div.section table.toc { width: 95%;
                          margin: 1.5ex 0 1.5ex 5%; }
  div.timestamp { text-align: center;
                  font-size: 69%;
                  margin: 1.5ex 0 1.5ex 0; }

  h1 { text-align: center; }
  h3 { font-size: medium;
       margin: 4ex 0 1.5ex 0; }

  p { text-align: justify; }

  pre.colored { color: blue; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  table.fields td.val { font-weight: bold;
                        text-align: right;
                        width: 30%;
                        vertical-align: baseline;
                        padding: 1ex 1em 1ex 0; }
  table.fields td.desc { vertical-align: baseline;
                         padding: 1ex 0 1ex 1em; }
  table.fields td.desc p:first-child { margin: 0; }
  table.fields td.desc p { margin: 1.5ex 0 0 0; }
  table.index { margin: 6ex auto 6ex auto;
                border: 0;
                border-collapse: separate;
                border-spacing: 1em 0.3ex; }
  table.index tr { padding: 0; }
  table.index td { padding: 0; }
  table.index-toc-link { width: 100%;
                         border: 0;
                         border-spacing: 0;
                         margin: 1ex 0 1ex 0; }
  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
                                 font-size: 83%;
                                 text-align: left; }
  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
                                   font-size: 83%;
                                   text-align: center; }
  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
                                  font-size: 83%;
                                  text-align: right; }
  table.synopsis { margin: 6ex auto 6ex auto;
                   border: 0;
                   border-collapse: separate;
                   border-spacing: 2em 0.6ex; }
  table.synopsis tr { padding: 0; }
  table.synopsis td { padding: 0; }
  table.toc td.link { width: 30%;
                      text-align: right;
                      vertical-align: baseline;
                      padding: 1ex 1em 1ex 0; }
  table.toc td.desc { vertical-align: baseline;
                      padding: 1ex 0 1ex 1em;
                      text-align: left; }
  table.toc td.desc p:first-child { margin: 0;
                                    text-align: left; }
  table.toc td.desc p { margin: 1.5ex 0 0 0;
                        text-align: left; }

</style>
</head>
<body>

<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
<h1>FreeType-2.9.1 API Reference</h1>

<h1 id="gzip">GZIP Streams</h1>
<h2>Synopsis</h2>
<table class="synopsis">
<tr><td><a href="#FT_Stream_OpenGzip">FT_Stream_OpenGzip</a></td><td><a href="#FT_Gzip_Uncompress">FT_Gzip_Uncompress</a></td><td></td></tr>
</table>


<p>This section contains the declaration of Gzip-specific functions.</p>

<div class="section">
<h3 id="FT_Stream_OpenGzip">FT_Stream_OpenGzip</h3>
<p>Defined in FT_GZIP_H (freetype/ftgzip.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Stream_OpenGzip</b>( <a href="ft2-system_interface.html#FT_Stream">FT_Stream</a>  stream,
                      <a href="ft2-system_interface.html#FT_Stream">FT_Stream</a>  source );
</pre>

<p>Open a new stream to parse gzip-compressed font files. This is mainly used to support the compressed &lsquo;*.pcf.gz&rsquo; fonts that come with XFree86.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="stream">stream</td><td class="desc">
<p>The target embedding stream.</p>
</td></tr>
<tr><td class="val" id="source">source</td><td class="desc">
<p>The source stream.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>The source stream must be opened <i>before</i> calling this function.</p>
<p>Calling the internal function &lsquo;FT_Stream_Close&rsquo; on the new stream will <b>not</b> call &lsquo;FT_Stream_Close&rsquo; on the source stream. None of the stream objects will be released to the heap.</p>
<p>The stream implementation is very basic and resets the decompression process each time seeking backwards is needed within the stream.</p>
<p>In certain builds of the library, gzip compression recognition is automatically handled when calling <a href="ft2-base_interface.html#FT_New_Face">FT_New_Face</a> or <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a>. This means that if no font driver is capable of handling the raw compressed file, the library will try to open a gzipped stream from it and re-open the face with it.</p>
<p>This function may return &lsquo;FT_Err_Unimplemented_Feature&rsquo; if your build of FreeType was not compiled with zlib support.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Gzip_Uncompress">FT_Gzip_Uncompress</h3>
<p>Defined in FT_GZIP_H (freetype/ftgzip.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Gzip_Uncompress</b>( <a href="ft2-system_interface.html#FT_Memory">FT_Memory</a>       memory,
                      <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>*        output,
                      <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>*       output_len,
                      <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>*  input,
                      <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>        input_len );
</pre>

<p>Decompress a zipped input buffer into an output buffer. This function is modeled after zlib's &lsquo;uncompress&rsquo; function.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="memory">memory</td><td class="desc">
<p>A FreeType memory handle.</p>
</td></tr>
<tr><td class="val" id="input">input</td><td class="desc">
<p>The input buffer.</p>
</td></tr>
<tr><td class="val" id="input_len">input_len</td><td class="desc">
<p>The length of the input buffer.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="output">output</td><td class="desc">
<p>The output buffer.</p>
</td></tr>
</table>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="output_len">output_len</td><td class="desc">
<p>Before calling the function, this is the total size of the output buffer, which must be large enough to hold the entire uncompressed data (so the size of the uncompressed data must be known in advance). After calling the function, &lsquo;output_len&rsquo; is the size of the used data in &lsquo;output&rsquo;.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>This function may return &lsquo;FT_Err_Unimplemented_Feature&rsquo; if your build of FreeType was not compiled with zlib support.</p>

<h4>since</h4>
<p>2.5.1</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

</body>
</html>
reference/ft2-header_file_macros.html000064400000100471151706766400013673 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF;
         width: 87%;
         margin: auto; }

  div.section { width: 75%;
                margin: auto; }
  div.section hr { margin: 4ex 0 1ex 0; }
  div.section h4 { background-color: #EEEEFF;
                   font-size: medium;
                   font-style: oblique;
                   font-weight: bold;
                   margin: 3ex 0 1.5ex 9%;
                   padding: 0.3ex 0 0.3ex 1%; }
  div.section p { margin: 1.5ex 0 1.5ex 10%; }
  div.section pre { margin: 3ex 0 3ex 9%;
                    background-color: #D6E8FF;
                    padding: 2ex 0 2ex 1%; }
  div.section table.fields { width: 90%;
                             margin: 1.5ex 0 1.5ex 10%; }
  div.section table.toc { width: 95%;
                          margin: 1.5ex 0 1.5ex 5%; }
  div.timestamp { text-align: center;
                  font-size: 69%;
                  margin: 1.5ex 0 1.5ex 0; }

  h1 { text-align: center; }
  h3 { font-size: medium;
       margin: 4ex 0 1.5ex 0; }

  p { text-align: justify; }

  pre.colored { color: blue; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  table.fields td.val { font-weight: bold;
                        text-align: right;
                        width: 30%;
                        vertical-align: baseline;
                        padding: 1ex 1em 1ex 0; }
  table.fields td.desc { vertical-align: baseline;
                         padding: 1ex 0 1ex 1em; }
  table.fields td.desc p:first-child { margin: 0; }
  table.fields td.desc p { margin: 1.5ex 0 0 0; }
  table.index { margin: 6ex auto 6ex auto;
                border: 0;
                border-collapse: separate;
                border-spacing: 1em 0.3ex; }
  table.index tr { padding: 0; }
  table.index td { padding: 0; }
  table.index-toc-link { width: 100%;
                         border: 0;
                         border-spacing: 0;
                         margin: 1ex 0 1ex 0; }
  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
                                 font-size: 83%;
                                 text-align: left; }
  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
                                   font-size: 83%;
                                   text-align: center; }
  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
                                  font-size: 83%;
                                  text-align: right; }
  table.synopsis { margin: 6ex auto 6ex auto;
                   border: 0;
                   border-collapse: separate;
                   border-spacing: 2em 0.6ex; }
  table.synopsis tr { padding: 0; }
  table.synopsis td { padding: 0; }
  table.toc td.link { width: 30%;
                      text-align: right;
                      vertical-align: baseline;
                      padding: 1ex 1em 1ex 0; }
  table.toc td.desc { vertical-align: baseline;
                      padding: 1ex 0 1ex 1em;
                      text-align: left; }
  table.toc td.desc p:first-child { margin: 0;
                                    text-align: left; }
  table.toc td.desc p { margin: 1.5ex 0 0 0;
                        text-align: left; }

</style>
</head>
<body>

<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
<h1>FreeType-2.9.1 API Reference</h1>

<h1 id="header_file_macros">Header File Macros</h1>
<h2>Synopsis</h2>
<table class="synopsis">
<tr><td><a href="#FT_CONFIG_CONFIG_H">FT_CONFIG_CONFIG_H</a></td><td><a href="#FT_BDF_H">FT_BDF_H</a></td></tr>
<tr><td><a href="#FT_CONFIG_STANDARD_LIBRARY_H">FT_CONFIG_STANDARD_LIBRARY_H</a></td><td><a href="#FT_CID_H">FT_CID_H</a></td></tr>
<tr><td><a href="#FT_CONFIG_OPTIONS_H">FT_CONFIG_OPTIONS_H</a></td><td><a href="#FT_GZIP_H">FT_GZIP_H</a></td></tr>
<tr><td><a href="#FT_CONFIG_MODULES_H">FT_CONFIG_MODULES_H</a></td><td><a href="#FT_LZW_H">FT_LZW_H</a></td></tr>
<tr><td><a href="#FT_FREETYPE_H">FT_FREETYPE_H</a></td><td><a href="#FT_BZIP2_H">FT_BZIP2_H</a></td></tr>
<tr><td><a href="#FT_ERRORS_H">FT_ERRORS_H</a></td><td><a href="#FT_WINFONTS_H">FT_WINFONTS_H</a></td></tr>
<tr><td><a href="#FT_MODULE_ERRORS_H">FT_MODULE_ERRORS_H</a></td><td><a href="#FT_GLYPH_H">FT_GLYPH_H</a></td></tr>
<tr><td><a href="#FT_SYSTEM_H">FT_SYSTEM_H</a></td><td><a href="#FT_BITMAP_H">FT_BITMAP_H</a></td></tr>
<tr><td><a href="#FT_IMAGE_H">FT_IMAGE_H</a></td><td><a href="#FT_BBOX_H">FT_BBOX_H</a></td></tr>
<tr><td><a href="#FT_TYPES_H">FT_TYPES_H</a></td><td><a href="#FT_CACHE_H">FT_CACHE_H</a></td></tr>
<tr><td><a href="#FT_LIST_H">FT_LIST_H</a></td><td><a href="#FT_MAC_H">FT_MAC_H</a></td></tr>
<tr><td><a href="#FT_OUTLINE_H">FT_OUTLINE_H</a></td><td><a href="#FT_MULTIPLE_MASTERS_H">FT_MULTIPLE_MASTERS_H</a></td></tr>
<tr><td><a href="#FT_SIZES_H">FT_SIZES_H</a></td><td><a href="#FT_SFNT_NAMES_H">FT_SFNT_NAMES_H</a></td></tr>
<tr><td><a href="#FT_MODULE_H">FT_MODULE_H</a></td><td><a href="#FT_OPENTYPE_VALIDATE_H">FT_OPENTYPE_VALIDATE_H</a></td></tr>
<tr><td><a href="#FT_RENDER_H">FT_RENDER_H</a></td><td><a href="#FT_GX_VALIDATE_H">FT_GX_VALIDATE_H</a></td></tr>
<tr><td><a href="#FT_DRIVER_H">FT_DRIVER_H</a></td><td><a href="#FT_PFR_H">FT_PFR_H</a></td></tr>
<tr><td><a href="#FT_AUTOHINTER_H">FT_AUTOHINTER_H</a></td><td><a href="#FT_STROKER_H">FT_STROKER_H</a></td></tr>
<tr><td><a href="#FT_CFF_DRIVER_H">FT_CFF_DRIVER_H</a></td><td><a href="#FT_SYNTHESIS_H">FT_SYNTHESIS_H</a></td></tr>
<tr><td><a href="#FT_TRUETYPE_DRIVER_H">FT_TRUETYPE_DRIVER_H</a></td><td><a href="#FT_FONT_FORMATS_H">FT_FONT_FORMATS_H</a></td></tr>
<tr><td><a href="#FT_PCF_DRIVER_H">FT_PCF_DRIVER_H</a></td><td><a href="#FT_TRIGONOMETRY_H">FT_TRIGONOMETRY_H</a></td></tr>
<tr><td><a href="#FT_TYPE1_TABLES_H">FT_TYPE1_TABLES_H</a></td><td><a href="#FT_LCD_FILTER_H">FT_LCD_FILTER_H</a></td></tr>
<tr><td><a href="#FT_TRUETYPE_IDS_H">FT_TRUETYPE_IDS_H</a></td><td><a href="#FT_INCREMENTAL_H">FT_INCREMENTAL_H</a></td></tr>
<tr><td><a href="#FT_TRUETYPE_TABLES_H">FT_TRUETYPE_TABLES_H</a></td><td><a href="#FT_GASP_H">FT_GASP_H</a></td></tr>
<tr><td><a href="#FT_TRUETYPE_TAGS_H">FT_TRUETYPE_TAGS_H</a></td><td><a href="#FT_ADVANCES_H">FT_ADVANCES_H</a></td></tr>
</table>


<p>The following macros are defined to the name of specific FreeType&nbsp;2 header files. They can be used directly in #include statements as in:</p>
<pre class="colored">
  #include FT_FREETYPE_H
  #include FT_MULTIPLE_MASTERS_H
  #include FT_GLYPH_H
</pre>
<p>There are several reasons why we are now using macros to name public header files. The first one is that such macros are not limited to the infamous 8.3&nbsp;naming rule required by DOS (and &lsquo;FT_MULTIPLE_MASTERS_H&rsquo; is a lot more meaningful than &lsquo;ftmm.h&rsquo;).</p>
<p>The second reason is that it allows for more flexibility in the way FreeType&nbsp;2 is installed on a given system.</p>

<div class="section">
<h3 id="FT_CONFIG_CONFIG_H">FT_CONFIG_CONFIG_H</h3>
<pre>
#ifndef <b>FT_CONFIG_CONFIG_H</b>
#define <b>FT_CONFIG_CONFIG_H</b>  &lt;freetype/config/ftconfig.h&gt;
#endif
</pre>

<p>A macro used in #include statements to name the file containing FreeType&nbsp;2 configuration data.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_CONFIG_STANDARD_LIBRARY_H">FT_CONFIG_STANDARD_LIBRARY_H</h3>
<pre>
#ifndef <b>FT_CONFIG_STANDARD_LIBRARY_H</b>
#define <b>FT_CONFIG_STANDARD_LIBRARY_H</b>  &lt;freetype/config/ftstdlib.h&gt;
#endif
</pre>

<p>A macro used in #include statements to name the file containing FreeType&nbsp;2 interface to the standard C library functions.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_CONFIG_OPTIONS_H">FT_CONFIG_OPTIONS_H</h3>
<pre>
#ifndef <b>FT_CONFIG_OPTIONS_H</b>
#define <b>FT_CONFIG_OPTIONS_H</b>  &lt;freetype/config/ftoption.h&gt;
#endif
</pre>

<p>A macro used in #include statements to name the file containing FreeType&nbsp;2 project-specific configuration options.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_CONFIG_MODULES_H">FT_CONFIG_MODULES_H</h3>
<pre>
#ifndef <b>FT_CONFIG_MODULES_H</b>
#define <b>FT_CONFIG_MODULES_H</b>  &lt;freetype/config/ftmodule.h&gt;
#endif
</pre>

<p>A macro used in #include statements to name the file containing the list of FreeType&nbsp;2 modules that are statically linked to new library instances in <a href="ft2-base_interface.html#FT_Init_FreeType">FT_Init_FreeType</a>.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_FREETYPE_H">FT_FREETYPE_H</h3>
<pre>
#define <b>FT_FREETYPE_H</b>  &lt;freetype/freetype.h&gt;
</pre>

<p>A macro used in #include statements to name the file containing the base FreeType&nbsp;2 API.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_ERRORS_H">FT_ERRORS_H</h3>
<pre>
#define <b>FT_ERRORS_H</b>  &lt;freetype/fterrors.h&gt;
</pre>

<p>A macro used in #include statements to name the file containing the list of FreeType&nbsp;2 error codes (and messages).</p>
<p>It is included by <a href="ft2-header_file_macros.html#FT_FREETYPE_H">FT_FREETYPE_H</a>.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_MODULE_ERRORS_H">FT_MODULE_ERRORS_H</h3>
<pre>
#define <b>FT_MODULE_ERRORS_H</b>  &lt;freetype/ftmoderr.h&gt;
</pre>

<p>A macro used in #include statements to name the file containing the list of FreeType&nbsp;2 module error offsets (and messages).</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_SYSTEM_H">FT_SYSTEM_H</h3>
<pre>
#define <b>FT_SYSTEM_H</b>  &lt;freetype/ftsystem.h&gt;
</pre>

<p>A macro used in #include statements to name the file containing the FreeType&nbsp;2 interface to low-level operations (i.e., memory management and stream i/o).</p>
<p>It is included by <a href="ft2-header_file_macros.html#FT_FREETYPE_H">FT_FREETYPE_H</a>.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_IMAGE_H">FT_IMAGE_H</h3>
<pre>
#define <b>FT_IMAGE_H</b>  &lt;freetype/ftimage.h&gt;
</pre>

<p>A macro used in #include statements to name the file containing type definitions related to glyph images (i.e., bitmaps, outlines, scan-converter parameters).</p>
<p>It is included by <a href="ft2-header_file_macros.html#FT_FREETYPE_H">FT_FREETYPE_H</a>.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_TYPES_H">FT_TYPES_H</h3>
<pre>
#define <b>FT_TYPES_H</b>  &lt;freetype/fttypes.h&gt;
</pre>

<p>A macro used in #include statements to name the file containing the basic data types defined by FreeType&nbsp;2.</p>
<p>It is included by <a href="ft2-header_file_macros.html#FT_FREETYPE_H">FT_FREETYPE_H</a>.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_LIST_H">FT_LIST_H</h3>
<pre>
#define <b>FT_LIST_H</b>  &lt;freetype/ftlist.h&gt;
</pre>

<p>A macro used in #include statements to name the file containing the list management API of FreeType&nbsp;2.</p>
<p>(Most applications will never need to include this file.)</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_OUTLINE_H">FT_OUTLINE_H</h3>
<pre>
#define <b>FT_OUTLINE_H</b>  &lt;freetype/ftoutln.h&gt;
</pre>

<p>A macro used in #include statements to name the file containing the scalable outline management API of FreeType&nbsp;2.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_SIZES_H">FT_SIZES_H</h3>
<pre>
#define <b>FT_SIZES_H</b>  &lt;freetype/ftsizes.h&gt;
</pre>

<p>A macro used in #include statements to name the file containing the API which manages multiple <a href="ft2-base_interface.html#FT_Size">FT_Size</a> objects per face.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_MODULE_H">FT_MODULE_H</h3>
<pre>
#define <b>FT_MODULE_H</b>  &lt;freetype/ftmodapi.h&gt;
</pre>

<p>A macro used in #include statements to name the file containing the module management API of FreeType&nbsp;2.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_RENDER_H">FT_RENDER_H</h3>
<pre>
#define <b>FT_RENDER_H</b>  &lt;freetype/ftrender.h&gt;
</pre>

<p>A macro used in #include statements to name the file containing the renderer module management API of FreeType&nbsp;2.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_DRIVER_H">FT_DRIVER_H</h3>
<pre>
#define <b>FT_DRIVER_H</b>  &lt;freetype/ftdriver.h&gt;
</pre>

<p>A macro used in #include statements to name the file containing structures and macros related to the driver modules.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_AUTOHINTER_H">FT_AUTOHINTER_H</h3>
<pre>
#define <b>FT_AUTOHINTER_H</b>  <a href="ft2-header_file_macros.html#FT_DRIVER_H">FT_DRIVER_H</a>
</pre>

<p>A macro used in #include statements to name the file containing structures and macros related to the auto-hinting module.</p>
<p>Deprecated since version 2.9; use <a href="ft2-header_file_macros.html#FT_DRIVER_H">FT_DRIVER_H</a> instead.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_CFF_DRIVER_H">FT_CFF_DRIVER_H</h3>
<pre>
#define <b>FT_CFF_DRIVER_H</b>  <a href="ft2-header_file_macros.html#FT_DRIVER_H">FT_DRIVER_H</a>
</pre>

<p>A macro used in #include statements to name the file containing structures and macros related to the CFF driver module.</p>
<p>Deprecated since version 2.9; use <a href="ft2-header_file_macros.html#FT_DRIVER_H">FT_DRIVER_H</a> instead.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_TRUETYPE_DRIVER_H">FT_TRUETYPE_DRIVER_H</h3>
<pre>
#define <b>FT_TRUETYPE_DRIVER_H</b>  <a href="ft2-header_file_macros.html#FT_DRIVER_H">FT_DRIVER_H</a>
</pre>

<p>A macro used in #include statements to name the file containing structures and macros related to the TrueType driver module.</p>
<p>Deprecated since version 2.9; use <a href="ft2-header_file_macros.html#FT_DRIVER_H">FT_DRIVER_H</a> instead.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_PCF_DRIVER_H">FT_PCF_DRIVER_H</h3>
<pre>
#define <b>FT_PCF_DRIVER_H</b>  <a href="ft2-header_file_macros.html#FT_DRIVER_H">FT_DRIVER_H</a>
</pre>

<p>A macro used in #include statements to name the file containing structures and macros related to the PCF driver module.</p>
<p>Deprecated since version 2.9; use <a href="ft2-header_file_macros.html#FT_DRIVER_H">FT_DRIVER_H</a> instead.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_TYPE1_TABLES_H">FT_TYPE1_TABLES_H</h3>
<pre>
#define <b>FT_TYPE1_TABLES_H</b>  &lt;freetype/t1tables.h&gt;
</pre>

<p>A macro used in #include statements to name the file containing the types and API specific to the Type&nbsp;1 format.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_TRUETYPE_IDS_H">FT_TRUETYPE_IDS_H</h3>
<pre>
#define <b>FT_TRUETYPE_IDS_H</b>  &lt;freetype/ttnameid.h&gt;
</pre>

<p>A macro used in #include statements to name the file containing the enumeration values which identify name strings, languages, encodings, etc. This file really contains a <i>large</i> set of constant macro definitions, taken from the TrueType and OpenType specifications.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_TRUETYPE_TABLES_H">FT_TRUETYPE_TABLES_H</h3>
<pre>
#define <b>FT_TRUETYPE_TABLES_H</b>  &lt;freetype/tttables.h&gt;
</pre>

<p>A macro used in #include statements to name the file containing the types and API specific to the TrueType (as well as OpenType) format.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_TRUETYPE_TAGS_H">FT_TRUETYPE_TAGS_H</h3>
<pre>
#define <b>FT_TRUETYPE_TAGS_H</b>  &lt;freetype/tttags.h&gt;
</pre>

<p>A macro used in #include statements to name the file containing the definitions of TrueType four-byte &lsquo;tags&rsquo; which identify blocks in SFNT-based font formats (i.e., TrueType and OpenType).</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_BDF_H">FT_BDF_H</h3>
<pre>
#define <b>FT_BDF_H</b>  &lt;freetype/ftbdf.h&gt;
</pre>

<p>A macro used in #include statements to name the file containing the definitions of an API which accesses BDF-specific strings from a face.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_CID_H">FT_CID_H</h3>
<pre>
#define <b>FT_CID_H</b>  &lt;freetype/ftcid.h&gt;
</pre>

<p>A macro used in #include statements to name the file containing the definitions of an API which access CID font information from a face.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_GZIP_H">FT_GZIP_H</h3>
<pre>
#define <b>FT_GZIP_H</b>  &lt;freetype/ftgzip.h&gt;
</pre>

<p>A macro used in #include statements to name the file containing the definitions of an API which supports gzip-compressed files.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_LZW_H">FT_LZW_H</h3>
<pre>
#define <b>FT_LZW_H</b>  &lt;freetype/ftlzw.h&gt;
</pre>

<p>A macro used in #include statements to name the file containing the definitions of an API which supports LZW-compressed files.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_BZIP2_H">FT_BZIP2_H</h3>
<pre>
#define <b>FT_BZIP2_H</b>  &lt;freetype/ftbzip2.h&gt;
</pre>

<p>A macro used in #include statements to name the file containing the definitions of an API which supports bzip2-compressed files.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_WINFONTS_H">FT_WINFONTS_H</h3>
<pre>
#define <b>FT_WINFONTS_H</b>   &lt;freetype/ftwinfnt.h&gt;
</pre>

<p>A macro used in #include statements to name the file containing the definitions of an API which supports Windows FNT files.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_GLYPH_H">FT_GLYPH_H</h3>
<pre>
#define <b>FT_GLYPH_H</b>  &lt;freetype/ftglyph.h&gt;
</pre>

<p>A macro used in #include statements to name the file containing the API of the optional glyph management component.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_BITMAP_H">FT_BITMAP_H</h3>
<pre>
#define <b>FT_BITMAP_H</b>  &lt;freetype/ftbitmap.h&gt;
</pre>

<p>A macro used in #include statements to name the file containing the API of the optional bitmap conversion component.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_BBOX_H">FT_BBOX_H</h3>
<pre>
#define <b>FT_BBOX_H</b>  &lt;freetype/ftbbox.h&gt;
</pre>

<p>A macro used in #include statements to name the file containing the API of the optional exact bounding box computation routines.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_CACHE_H">FT_CACHE_H</h3>
<pre>
#define <b>FT_CACHE_H</b>  &lt;freetype/ftcache.h&gt;
</pre>

<p>A macro used in #include statements to name the file containing the API of the optional FreeType&nbsp;2 cache sub-system.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_MAC_H">FT_MAC_H</h3>
<pre>
#define <b>FT_MAC_H</b>  &lt;freetype/ftmac.h&gt;
</pre>

<p>A macro used in #include statements to name the file containing the Macintosh-specific FreeType&nbsp;2 API. The latter is used to access fonts embedded in resource forks.</p>
<p>This header file must be explicitly included by client applications compiled on the Mac (note that the base API still works though).</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_MULTIPLE_MASTERS_H">FT_MULTIPLE_MASTERS_H</h3>
<pre>
#define <b>FT_MULTIPLE_MASTERS_H</b>  &lt;freetype/ftmm.h&gt;
</pre>

<p>A macro used in #include statements to name the file containing the optional multiple-masters management API of FreeType&nbsp;2.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_SFNT_NAMES_H">FT_SFNT_NAMES_H</h3>
<pre>
#define <b>FT_SFNT_NAMES_H</b>  &lt;freetype/ftsnames.h&gt;
</pre>

<p>A macro used in #include statements to name the file containing the optional FreeType&nbsp;2 API which accesses embedded &lsquo;name&rsquo; strings in SFNT-based font formats (i.e., TrueType and OpenType).</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_OPENTYPE_VALIDATE_H">FT_OPENTYPE_VALIDATE_H</h3>
<pre>
#define <b>FT_OPENTYPE_VALIDATE_H</b>  &lt;freetype/ftotval.h&gt;
</pre>

<p>A macro used in #include statements to name the file containing the optional FreeType&nbsp;2 API which validates OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF).</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_GX_VALIDATE_H">FT_GX_VALIDATE_H</h3>
<pre>
#define <b>FT_GX_VALIDATE_H</b>  &lt;freetype/ftgxval.h&gt;
</pre>

<p>A macro used in #include statements to name the file containing the optional FreeType&nbsp;2 API which validates TrueTypeGX/AAT tables (feat, mort, morx, bsln, just, kern, opbd, trak, prop).</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_PFR_H">FT_PFR_H</h3>
<pre>
#define <b>FT_PFR_H</b>  &lt;freetype/ftpfr.h&gt;
</pre>

<p>A macro used in #include statements to name the file containing the FreeType&nbsp;2 API which accesses PFR-specific data.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_STROKER_H">FT_STROKER_H</h3>
<pre>
#define <b>FT_STROKER_H</b>  &lt;freetype/ftstroke.h&gt;
</pre>

<p>A macro used in #include statements to name the file containing the FreeType&nbsp;2 API which provides functions to stroke outline paths.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_SYNTHESIS_H">FT_SYNTHESIS_H</h3>
<pre>
#define <b>FT_SYNTHESIS_H</b>  &lt;freetype/ftsynth.h&gt;
</pre>

<p>A macro used in #include statements to name the file containing the FreeType&nbsp;2 API which performs artificial obliquing and emboldening.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_FONT_FORMATS_H">FT_FONT_FORMATS_H</h3>
<pre>
#define <b>FT_FONT_FORMATS_H</b>  &lt;freetype/ftfntfmt.h&gt;

  /* deprecated */
#define FT_XFREE86_H  <b>FT_FONT_FORMATS_H</b>
</pre>

<p>A macro used in #include statements to name the file containing the FreeType&nbsp;2 API which provides functions specific to font formats.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_TRIGONOMETRY_H">FT_TRIGONOMETRY_H</h3>
<pre>
#define <b>FT_TRIGONOMETRY_H</b>  &lt;freetype/fttrigon.h&gt;
</pre>

<p>A macro used in #include statements to name the file containing the FreeType&nbsp;2 API which performs trigonometric computations (e.g., cosines and arc tangents).</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_LCD_FILTER_H">FT_LCD_FILTER_H</h3>
<pre>
#define <b>FT_LCD_FILTER_H</b>  &lt;freetype/ftlcdfil.h&gt;
</pre>

<p>A macro used in #include statements to name the file containing the FreeType&nbsp;2 API which performs color filtering for subpixel rendering.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_INCREMENTAL_H">FT_INCREMENTAL_H</h3>
<pre>
#define <b>FT_INCREMENTAL_H</b>  &lt;freetype/ftincrem.h&gt;
</pre>

<p>A macro used in #include statements to name the file containing the FreeType&nbsp;2 API which performs incremental glyph loading.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_GASP_H">FT_GASP_H</h3>
<pre>
#define <b>FT_GASP_H</b>  &lt;freetype/ftgasp.h&gt;
</pre>

<p>A macro used in #include statements to name the file containing the FreeType&nbsp;2 API which returns entries from the TrueType GASP table.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_ADVANCES_H">FT_ADVANCES_H</h3>
<pre>
#define <b>FT_ADVANCES_H</b>  &lt;freetype/ftadvanc.h&gt;
</pre>

<p>A macro used in #include statements to name the file containing the FreeType&nbsp;2 API which returns individual and ranged glyph advances.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

</body>
</html>
reference/ft2-header_inclusion.html000064400000011006151706766400013406 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF;
         width: 87%;
         margin: auto; }

  div.section { width: 75%;
                margin: auto; }
  div.section hr { margin: 4ex 0 1ex 0; }
  div.section h4 { background-color: #EEEEFF;
                   font-size: medium;
                   font-style: oblique;
                   font-weight: bold;
                   margin: 3ex 0 1.5ex 9%;
                   padding: 0.3ex 0 0.3ex 1%; }
  div.section p { margin: 1.5ex 0 1.5ex 10%; }
  div.section pre { margin: 3ex 0 3ex 9%;
                    background-color: #D6E8FF;
                    padding: 2ex 0 2ex 1%; }
  div.section table.fields { width: 90%;
                             margin: 1.5ex 0 1.5ex 10%; }
  div.section table.toc { width: 95%;
                          margin: 1.5ex 0 1.5ex 5%; }
  div.timestamp { text-align: center;
                  font-size: 69%;
                  margin: 1.5ex 0 1.5ex 0; }

  h1 { text-align: center; }
  h3 { font-size: medium;
       margin: 4ex 0 1.5ex 0; }

  p { text-align: justify; }

  pre.colored { color: blue; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  table.fields td.val { font-weight: bold;
                        text-align: right;
                        width: 30%;
                        vertical-align: baseline;
                        padding: 1ex 1em 1ex 0; }
  table.fields td.desc { vertical-align: baseline;
                         padding: 1ex 0 1ex 1em; }
  table.fields td.desc p:first-child { margin: 0; }
  table.fields td.desc p { margin: 1.5ex 0 0 0; }
  table.index { margin: 6ex auto 6ex auto;
                border: 0;
                border-collapse: separate;
                border-spacing: 1em 0.3ex; }
  table.index tr { padding: 0; }
  table.index td { padding: 0; }
  table.index-toc-link { width: 100%;
                         border: 0;
                         border-spacing: 0;
                         margin: 1ex 0 1ex 0; }
  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
                                 font-size: 83%;
                                 text-align: left; }
  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
                                   font-size: 83%;
                                   text-align: center; }
  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
                                  font-size: 83%;
                                  text-align: right; }
  table.synopsis { margin: 6ex auto 6ex auto;
                   border: 0;
                   border-collapse: separate;
                   border-spacing: 2em 0.6ex; }
  table.synopsis tr { padding: 0; }
  table.synopsis td { padding: 0; }
  table.toc td.link { width: 30%;
                      text-align: right;
                      vertical-align: baseline;
                      padding: 1ex 1em 1ex 0; }
  table.toc td.desc { vertical-align: baseline;
                      padding: 1ex 0 1ex 1em;
                      text-align: left; }
  table.toc td.desc p:first-child { margin: 0;
                                    text-align: left; }
  table.toc td.desc p { margin: 1.5ex 0 0 0;
                        text-align: left; }

</style>
</head>
<body>

<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
<h1>FreeType-2.9.1 API Reference</h1>

<h1 id="header_inclusion">FreeType's header inclusion scheme</h1>

<p>To be as flexible as possible (and for historical reasons), FreeType uses a very special inclusion scheme to load header files, for example</p>
<pre class="colored">
  #include &lt;ft2build.h&gt;

  #include FT_FREETYPE_H
  #include FT_OUTLINE_H
</pre>
<p>A compiler and its preprocessor only needs an include path to find the file &lsquo;ft2build.h&rsquo;; the exact locations and names of the other FreeType header files are hidden by preprocessor macro names, loaded by &lsquo;ft2build.h&rsquo;. The API documentation always gives the header macro name needed for a particular function.</p>

</body>
</html>
reference/ft2-incremental.html000064400000046325151706766400012410 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF;
         width: 87%;
         margin: auto; }

  div.section { width: 75%;
                margin: auto; }
  div.section hr { margin: 4ex 0 1ex 0; }
  div.section h4 { background-color: #EEEEFF;
                   font-size: medium;
                   font-style: oblique;
                   font-weight: bold;
                   margin: 3ex 0 1.5ex 9%;
                   padding: 0.3ex 0 0.3ex 1%; }
  div.section p { margin: 1.5ex 0 1.5ex 10%; }
  div.section pre { margin: 3ex 0 3ex 9%;
                    background-color: #D6E8FF;
                    padding: 2ex 0 2ex 1%; }
  div.section table.fields { width: 90%;
                             margin: 1.5ex 0 1.5ex 10%; }
  div.section table.toc { width: 95%;
                          margin: 1.5ex 0 1.5ex 5%; }
  div.timestamp { text-align: center;
                  font-size: 69%;
                  margin: 1.5ex 0 1.5ex 0; }

  h1 { text-align: center; }
  h3 { font-size: medium;
       margin: 4ex 0 1.5ex 0; }

  p { text-align: justify; }

  pre.colored { color: blue; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  table.fields td.val { font-weight: bold;
                        text-align: right;
                        width: 30%;
                        vertical-align: baseline;
                        padding: 1ex 1em 1ex 0; }
  table.fields td.desc { vertical-align: baseline;
                         padding: 1ex 0 1ex 1em; }
  table.fields td.desc p:first-child { margin: 0; }
  table.fields td.desc p { margin: 1.5ex 0 0 0; }
  table.index { margin: 6ex auto 6ex auto;
                border: 0;
                border-collapse: separate;
                border-spacing: 1em 0.3ex; }
  table.index tr { padding: 0; }
  table.index td { padding: 0; }
  table.index-toc-link { width: 100%;
                         border: 0;
                         border-spacing: 0;
                         margin: 1ex 0 1ex 0; }
  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
                                 font-size: 83%;
                                 text-align: left; }
  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
                                   font-size: 83%;
                                   text-align: center; }
  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
                                  font-size: 83%;
                                  text-align: right; }
  table.synopsis { margin: 6ex auto 6ex auto;
                   border: 0;
                   border-collapse: separate;
                   border-spacing: 2em 0.6ex; }
  table.synopsis tr { padding: 0; }
  table.synopsis td { padding: 0; }
  table.toc td.link { width: 30%;
                      text-align: right;
                      vertical-align: baseline;
                      padding: 1ex 1em 1ex 0; }
  table.toc td.desc { vertical-align: baseline;
                      padding: 1ex 0 1ex 1em;
                      text-align: left; }
  table.toc td.desc p:first-child { margin: 0;
                                    text-align: left; }
  table.toc td.desc p { margin: 1.5ex 0 0 0;
                        text-align: left; }

</style>
</head>
<body>

<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
<h1>FreeType-2.9.1 API Reference</h1>

<h1 id="incremental">Incremental Loading</h1>
<h2>Synopsis</h2>
<table class="synopsis">
<tr><td><a href="#FT_Incremental">FT_Incremental</a></td><td><a href="#FT_Incremental_GetGlyphMetricsFunc">FT_Incremental_GetGlyphMetricsFunc</a></td></tr>
<tr><td><a href="#FT_Incremental_MetricsRec">FT_Incremental_MetricsRec</a></td><td><a href="#FT_Incremental_FuncsRec">FT_Incremental_FuncsRec</a></td></tr>
<tr><td><a href="#FT_Incremental_Metrics">FT_Incremental_Metrics</a></td><td><a href="#FT_Incremental_InterfaceRec">FT_Incremental_InterfaceRec</a></td></tr>
<tr><td><a href="#FT_Incremental_GetGlyphDataFunc">FT_Incremental_GetGlyphDataFunc</a></td><td><a href="#FT_Incremental_Interface">FT_Incremental_Interface</a></td></tr>
<tr><td><a href="#FT_Incremental_FreeGlyphDataFunc">FT_Incremental_FreeGlyphDataFunc</a></td><td></td></tr>
</table>


<p>This section contains various functions used to perform so-called &lsquo;incremental&rsquo; glyph loading. This is a mode where all glyphs loaded from a given <a href="ft2-base_interface.html#FT_Face">FT_Face</a> are provided by the client application.</p>
<p>Apart from that, all other tables are loaded normally from the font file. This mode is useful when FreeType is used within another engine, e.g., a PostScript Imaging Processor.</p>
<p>To enable this mode, you must use <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a>, passing an <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> with the <a href="ft2-parameter_tags.html#FT_PARAM_TAG_INCREMENTAL">FT_PARAM_TAG_INCREMENTAL</a> tag and an <a href="ft2-incremental.html#FT_Incremental_Interface">FT_Incremental_Interface</a> value. See the comments for <a href="ft2-incremental.html#FT_Incremental_InterfaceRec">FT_Incremental_InterfaceRec</a> for an example.</p>

<div class="section">
<h3 id="FT_Incremental">FT_Incremental</h3>
<p>Defined in FT_INCREMENTAL_H (freetype/ftincrem.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_IncrementalRec_*  <b>FT_Incremental</b>;
</pre>

<p>An opaque type describing a user-provided object used to implement &lsquo;incremental&rsquo; glyph loading within FreeType. This is used to support embedded fonts in certain environments (e.g., PostScript interpreters), where the glyph data isn't in the font file, or must be overridden by different values.</p>

<h4>note</h4>
<p>It is up to client applications to create and implement <a href="ft2-incremental.html#FT_Incremental">FT_Incremental</a> objects, as long as they provide implementations for the methods <a href="ft2-incremental.html#FT_Incremental_GetGlyphDataFunc">FT_Incremental_GetGlyphDataFunc</a>, <a href="ft2-incremental.html#FT_Incremental_FreeGlyphDataFunc">FT_Incremental_FreeGlyphDataFunc</a> and <a href="ft2-incremental.html#FT_Incremental_GetGlyphMetricsFunc">FT_Incremental_GetGlyphMetricsFunc</a>.</p>
<p>See the description of <a href="ft2-incremental.html#FT_Incremental_InterfaceRec">FT_Incremental_InterfaceRec</a> to understand how to use incremental objects with FreeType.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Incremental_MetricsRec">FT_Incremental_MetricsRec</h3>
<p>Defined in FT_INCREMENTAL_H (freetype/ftincrem.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_Incremental_MetricsRec_
  {
    <a href="ft2-basic_types.html#FT_Long">FT_Long</a>  bearing_x;
    <a href="ft2-basic_types.html#FT_Long">FT_Long</a>  bearing_y;
    <a href="ft2-basic_types.html#FT_Long">FT_Long</a>  advance;
    <a href="ft2-basic_types.html#FT_Long">FT_Long</a>  advance_v;     /* since 2.3.12 */

  } <b>FT_Incremental_MetricsRec</b>;
</pre>

<p>A small structure used to contain the basic glyph metrics returned by the <a href="ft2-incremental.html#FT_Incremental_GetGlyphMetricsFunc">FT_Incremental_GetGlyphMetricsFunc</a> method.</p>

<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="bearing_x">bearing_x</td><td class="desc">
<p>Left bearing, in font units.</p>
</td></tr>
<tr><td class="val" id="bearing_y">bearing_y</td><td class="desc">
<p>Top bearing, in font units.</p>
</td></tr>
<tr><td class="val" id="advance">advance</td><td class="desc">
<p>Horizontal component of glyph advance, in font units.</p>
</td></tr>
<tr><td class="val" id="advance_v">advance_v</td><td class="desc">
<p>Vertical component of glyph advance, in font units.</p>
</td></tr>
</table>

<h4>note</h4>
<p>These correspond to horizontal or vertical metrics depending on the value of the &lsquo;vertical&rsquo; argument to the function <a href="ft2-incremental.html#FT_Incremental_GetGlyphMetricsFunc">FT_Incremental_GetGlyphMetricsFunc</a>.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Incremental_Metrics">FT_Incremental_Metrics</h3>
<p>Defined in FT_INCREMENTAL_H (freetype/ftincrem.h).</p>
<pre>
   <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Incremental_MetricsRec_*  <b>FT_Incremental_Metrics</b>;
</pre>

<p>A handle to an <a href="ft2-incremental.html#FT_Incremental_MetricsRec">FT_Incremental_MetricsRec</a> structure.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Incremental_GetGlyphDataFunc">FT_Incremental_GetGlyphDataFunc</h3>
<p>Defined in FT_INCREMENTAL_H (freetype/ftincrem.h).</p>
<pre>
  <span class="keyword">typedef</span> <a href="ft2-basic_types.html#FT_Error">FT_Error</a>
  (*<b>FT_Incremental_GetGlyphDataFunc</b>)( <a href="ft2-incremental.html#FT_Incremental">FT_Incremental</a>  incremental,
                                      <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>         glyph_index,
                                      <a href="ft2-basic_types.html#FT_Data">FT_Data</a>*        adata );
</pre>

<p>A function called by FreeType to access a given glyph's data bytes during <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a> or <a href="ft2-base_interface.html#FT_Load_Char">FT_Load_Char</a> if incremental loading is enabled.</p>
<p>Note that the format of the glyph's data bytes depends on the font file format. For TrueType, it must correspond to the raw bytes within the &lsquo;glyf&rsquo; table. For PostScript formats, it must correspond to the <b>unencrypted</b> charstring bytes, without any &lsquo;lenIV&rsquo; header. It is undefined for any other format.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="incremental">incremental</td><td class="desc">
<p>Handle to an opaque <a href="ft2-incremental.html#FT_Incremental">FT_Incremental</a> handle provided by the client application.</p>
</td></tr>
<tr><td class="val" id="glyph_index">glyph_index</td><td class="desc">
<p>Index of relevant glyph.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="adata">adata</td><td class="desc">
<p>A structure describing the returned glyph data bytes (which will be accessed as a read-only byte block).</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>If this function returns successfully the method <a href="ft2-incremental.html#FT_Incremental_FreeGlyphDataFunc">FT_Incremental_FreeGlyphDataFunc</a> will be called later to release the data bytes.</p>
<p>Nested calls to <a href="ft2-incremental.html#FT_Incremental_GetGlyphDataFunc">FT_Incremental_GetGlyphDataFunc</a> can happen for compound glyphs.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Incremental_FreeGlyphDataFunc">FT_Incremental_FreeGlyphDataFunc</h3>
<p>Defined in FT_INCREMENTAL_H (freetype/ftincrem.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">void</span>
  (*<b>FT_Incremental_FreeGlyphDataFunc</b>)( <a href="ft2-incremental.html#FT_Incremental">FT_Incremental</a>  incremental,
                                       <a href="ft2-basic_types.html#FT_Data">FT_Data</a>*        data );
</pre>

<p>A function used to release the glyph data bytes returned by a successful call to <a href="ft2-incremental.html#FT_Incremental_GetGlyphDataFunc">FT_Incremental_GetGlyphDataFunc</a>.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="incremental">incremental</td><td class="desc">
<p>A handle to an opaque <a href="ft2-incremental.html#FT_Incremental">FT_Incremental</a> handle provided by the client application.</p>
</td></tr>
<tr><td class="val" id="data">data</td><td class="desc">
<p>A structure describing the glyph data bytes (which will be accessed as a read-only byte block).</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Incremental_GetGlyphMetricsFunc">FT_Incremental_GetGlyphMetricsFunc</h3>
<p>Defined in FT_INCREMENTAL_H (freetype/ftincrem.h).</p>
<pre>
  <span class="keyword">typedef</span> <a href="ft2-basic_types.html#FT_Error">FT_Error</a>
  (*<b>FT_Incremental_GetGlyphMetricsFunc</b>)
                      ( <a href="ft2-incremental.html#FT_Incremental">FT_Incremental</a>              incremental,
                        <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>                     glyph_index,
                        <a href="ft2-basic_types.html#FT_Bool">FT_Bool</a>                     vertical,
                        <a href="ft2-incremental.html#FT_Incremental_MetricsRec">FT_Incremental_MetricsRec</a>  *ametrics );
</pre>

<p>A function used to retrieve the basic metrics of a given glyph index before accessing its data. This is necessary because, in certain formats like TrueType, the metrics are stored in a different place from the glyph images proper.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="incremental">incremental</td><td class="desc">
<p>A handle to an opaque <a href="ft2-incremental.html#FT_Incremental">FT_Incremental</a> handle provided by the client application.</p>
</td></tr>
<tr><td class="val" id="glyph_index">glyph_index</td><td class="desc">
<p>Index of relevant glyph.</p>
</td></tr>
<tr><td class="val" id="vertical">vertical</td><td class="desc">
<p>If true, return vertical metrics.</p>
</td></tr>
<tr><td class="val" id="ametrics">ametrics</td><td class="desc">
<p>This parameter is used for both input and output. The original glyph metrics, if any, in font units. If metrics are not available all the values must be set to zero.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="ametrics">ametrics</td><td class="desc">
<p>The replacement glyph metrics in font units.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Incremental_FuncsRec">FT_Incremental_FuncsRec</h3>
<p>Defined in FT_INCREMENTAL_H (freetype/ftincrem.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_Incremental_FuncsRec_
  {
    <a href="ft2-incremental.html#FT_Incremental_GetGlyphDataFunc">FT_Incremental_GetGlyphDataFunc</a>     get_glyph_data;
    <a href="ft2-incremental.html#FT_Incremental_FreeGlyphDataFunc">FT_Incremental_FreeGlyphDataFunc</a>    free_glyph_data;
    <a href="ft2-incremental.html#FT_Incremental_GetGlyphMetricsFunc">FT_Incremental_GetGlyphMetricsFunc</a>  get_glyph_metrics;

  } <b>FT_Incremental_FuncsRec</b>;
</pre>

<p>A table of functions for accessing fonts that load data incrementally. Used in <a href="ft2-incremental.html#FT_Incremental_InterfaceRec">FT_Incremental_InterfaceRec</a>.</p>

<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="get_glyph_data">get_glyph_data</td><td class="desc">
<p>The function to get glyph data. Must not be null.</p>
</td></tr>
<tr><td class="val" id="free_glyph_data">free_glyph_data</td><td class="desc">
<p>The function to release glyph data. Must not be null.</p>
</td></tr>
<tr><td class="val" id="get_glyph_metrics">get_glyph_metrics</td><td class="desc">
<p>The function to get glyph metrics. May be null if the font does not provide overriding glyph metrics.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Incremental_InterfaceRec">FT_Incremental_InterfaceRec</h3>
<p>Defined in FT_INCREMENTAL_H (freetype/ftincrem.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_Incremental_InterfaceRec_
  {
    <span class="keyword">const</span> <a href="ft2-incremental.html#FT_Incremental_FuncsRec">FT_Incremental_FuncsRec</a>*  funcs;
    <a href="ft2-incremental.html#FT_Incremental">FT_Incremental</a>                  object;

  } <b>FT_Incremental_InterfaceRec</b>;
</pre>

<p>A structure to be used with <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> to indicate that the user wants to support incremental glyph loading. You should use it with <a href="ft2-parameter_tags.html#FT_PARAM_TAG_INCREMENTAL">FT_PARAM_TAG_INCREMENTAL</a> as in the following example:</p>
<pre class="colored">
  FT_Incremental_InterfaceRec  inc_int;
  FT_Parameter                 parameter;
  FT_Open_Args                 open_args;


  // set up incremental descriptor
  inc_int.funcs  = my_funcs;
  inc_int.object = my_object;

  // set up optional parameter
  parameter.tag  = FT_PARAM_TAG_INCREMENTAL;
  parameter.data = &amp;inc_int;

  // set up FT_Open_Args structure
  open_args.flags      = FT_OPEN_PATHNAME | FT_OPEN_PARAMS;
  open_args.pathname   = my_font_pathname;
  open_args.num_params = 1;
  open_args.params     = &amp;parameter; // we use one optional argument

  // open the font
  error = FT_Open_Face( library, &amp;open_args, index, &amp;face );
  ...
</pre>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Incremental_Interface">FT_Incremental_Interface</h3>
<p>Defined in FT_INCREMENTAL_H (freetype/ftincrem.h).</p>
<pre>
  <span class="keyword">typedef</span> <a href="ft2-incremental.html#FT_Incremental_InterfaceRec">FT_Incremental_InterfaceRec</a>*   <b>FT_Incremental_Interface</b>;
</pre>

<p>A pointer to an <a href="ft2-incremental.html#FT_Incremental_InterfaceRec">FT_Incremental_InterfaceRec</a> structure.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

</body>
</html>
reference/ft2-index.html000064400000213466151706766400011220 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF;
         width: 87%;
         margin: auto; }

  div.section { width: 75%;
                margin: auto; }
  div.section hr { margin: 4ex 0 1ex 0; }
  div.section h4 { background-color: #EEEEFF;
                   font-size: medium;
                   font-style: oblique;
                   font-weight: bold;
                   margin: 3ex 0 1.5ex 9%;
                   padding: 0.3ex 0 0.3ex 1%; }
  div.section p { margin: 1.5ex 0 1.5ex 10%; }
  div.section pre { margin: 3ex 0 3ex 9%;
                    background-color: #D6E8FF;
                    padding: 2ex 0 2ex 1%; }
  div.section table.fields { width: 90%;
                             margin: 1.5ex 0 1.5ex 10%; }
  div.section table.toc { width: 95%;
                          margin: 1.5ex 0 1.5ex 5%; }
  div.timestamp { text-align: center;
                  font-size: 69%;
                  margin: 1.5ex 0 1.5ex 0; }

  h1 { text-align: center; }
  h3 { font-size: medium;
       margin: 4ex 0 1.5ex 0; }

  p { text-align: justify; }

  pre.colored { color: blue; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  table.fields td.val { font-weight: bold;
                        text-align: right;
                        width: 30%;
                        vertical-align: baseline;
                        padding: 1ex 1em 1ex 0; }
  table.fields td.desc { vertical-align: baseline;
                         padding: 1ex 0 1ex 1em; }
  table.fields td.desc p:first-child { margin: 0; }
  table.fields td.desc p { margin: 1.5ex 0 0 0; }
  table.index { margin: 6ex auto 6ex auto;
                border: 0;
                border-collapse: separate;
                border-spacing: 1em 0.3ex; }
  table.index tr { padding: 0; }
  table.index td { padding: 0; }
  table.index-toc-link { width: 100%;
                         border: 0;
                         border-spacing: 0;
                         margin: 1ex 0 1ex 0; }
  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
                                 font-size: 83%;
                                 text-align: left; }
  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
                                   font-size: 83%;
                                   text-align: center; }
  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
                                  font-size: 83%;
                                  text-align: right; }
  table.synopsis { margin: 6ex auto 6ex auto;
                   border: 0;
                   border-collapse: separate;
                   border-spacing: 2em 0.6ex; }
  table.synopsis tr { padding: 0; }
  table.synopsis td { padding: 0; }
  table.toc td.link { width: 30%;
                      text-align: right;
                      vertical-align: baseline;
                      padding: 1ex 1em 1ex 0; }
  table.toc td.desc { vertical-align: baseline;
                      padding: 1ex 0 1ex 1em;
                      text-align: left; }
  table.toc td.desc p:first-child { margin: 0;
                                    text-align: left; }
  table.toc td.desc p { margin: 1.5ex 0 0 0;
                        text-align: left; }

</style>
</head>
<body>

<table class="index-toc-link"><tr><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
<h1>FreeType-2.9.1 API Reference</h1>

<table class="index">
<tr><td><a href="ft2-bdf_fonts.html#BDF_PropertyType">BDF_PROPERTY_TYPE_ATOM</a></td><td><a href="ft2-base_interface.html#FT_Kerning_Mode">FT_KERNING_UNFITTED</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_Done">FT_Stroker_Done</a></td></tr>
<tr><td><a href="ft2-bdf_fonts.html#BDF_PropertyType">BDF_PROPERTY_TYPE_CARDINAL</a></td><td><a href="ft2-base_interface.html#FT_Kerning_Mode">FT_KERNING_UNSCALED</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_EndSubPath">FT_Stroker_EndSubPath</a></td></tr>
<tr><td><a href="ft2-bdf_fonts.html#BDF_PropertyType">BDF_PROPERTY_TYPE_INTEGER</a></td><td><a href="ft2-base_interface.html#FT_Kerning_Mode">FT_Kerning_Mode</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_Export">FT_Stroker_Export</a></td></tr>
<tr><td><a href="ft2-bdf_fonts.html#BDF_PropertyType">BDF_PROPERTY_TYPE_NONE</a></td><td><a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LCD_FILTER_DEFAULT</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_ExportBorder">FT_Stroker_ExportBorder</a></td></tr>
<tr><td><a href="ft2-bdf_fonts.html#BDF_Property">BDF_Property</a></td><td><a href="ft2-header_file_macros.html#FT_LCD_FILTER_H">FT_LCD_FILTER_H</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_GetBorderCounts">FT_Stroker_GetBorderCounts</a></td></tr>
<tr><td><a href="ft2-bdf_fonts.html#BDF_PropertyRec">BDF_PropertyRec</a></td><td><a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LCD_FILTER_LEGACY</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_GetCounts">FT_Stroker_GetCounts</a></td></tr>
<tr><td><a href="ft2-bdf_fonts.html#BDF_PropertyType">BDF_PropertyType</a></td><td><a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LCD_FILTER_LEGACY1</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineCap">FT_Stroker_LineCap</a></td></tr>
<tr><td><a href="ft2-type1_tables.html#CID_FaceDict">CID_FaceDict</a></td><td><a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LCD_FILTER_LIGHT</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_Stroker_LineJoin</a></td></tr>
<tr><td><a href="ft2-type1_tables.html#CID_FaceDictRec">CID_FaceDictRec</a></td><td><a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LCD_FILTER_NONE</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineTo">FT_Stroker_LineTo</a></td></tr>
<tr><td><a href="ft2-type1_tables.html#CID_FaceInfo">CID_FaceInfo</a></td><td><a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LcdFilter</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_New">FT_Stroker_New</a></td></tr>
<tr><td><a href="ft2-type1_tables.html#CID_FaceInfoRec">CID_FaceInfoRec</a></td><td><a href="ft2-header_file_macros.html#FT_LIST_H">FT_LIST_H</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_ParseOutline">FT_Stroker_ParseOutline</a></td></tr>
<tr><td><a href="ft2-type1_tables.html#CID_FontDict">CID_FontDict</a></td><td><a href="ft2-base_interface.html#FT_Library">FT_Library</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_Rewind">FT_Stroker_Rewind</a></td></tr>
<tr><td><a href="ft2-type1_tables.html#CID_Info">CID_Info</a></td><td><a href="ft2-lcd_filtering.html#FT_Library_SetLcdFilter">FT_Library_SetLcdFilter</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_Set">FT_Stroker_Set</a></td></tr>
<tr><td><a href="ft2-properties.html#darkening-parameters">darkening-parameters</a></td><td><a href="ft2-lcd_filtering.html#FT_Library_SetLcdFilterWeights">FT_Library_SetLcdFilterWeights</a></td><td><a href="ft2-glyph_stroker.html#FT_StrokerBorder">FT_StrokerBorder</a></td></tr>
<tr><td><a href="ft2-properties.html#default-script">default-script</a></td><td><a href="ft2-version.html#FT_Library_Version">FT_Library_Version</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_2X2</a></td></tr>
<tr><td><a href="ft2-version.html#FREETYPE_XXX">FREETYPE_MAJOR</a></td><td><a href="ft2-list_processing.html#FT_List">FT_List</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS</a></td></tr>
<tr><td><a href="ft2-version.html#FREETYPE_XXX">FREETYPE_MINOR</a></td><td><a href="ft2-list_processing.html#FT_List_Add">FT_List_Add</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES</a></td></tr>
<tr><td><a href="ft2-version.html#FREETYPE_XXX">FREETYPE_PATCH</a></td><td><a href="ft2-list_processing.html#FT_List_Destructor">FT_List_Destructor</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID</a></td></tr>
<tr><td><a href="ft2-version.html#FREETYPE_XXX">FREETYPE_XXX</a></td><td><a href="ft2-list_processing.html#FT_List_Finalize">FT_List_Finalize</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_SCALE</a></td></tr>
<tr><td><a href="ft2-sizes_management.html#FT_Activate_Size">FT_Activate_Size</a></td><td><a href="ft2-list_processing.html#FT_List_Find">FT_List_Find</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_USE_MY_METRICS</a></td></tr>
<tr><td><a href="ft2-quick_advance.html#FT_ADVANCE_FLAG_FAST_ONLY">FT_ADVANCE_FLAG_FAST_ONLY</a></td><td><a href="ft2-list_processing.html#FT_List_Insert">FT_List_Insert</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_XXX</a></td></tr>
<tr><td><a href="ft2-header_file_macros.html#FT_ADVANCES_H">FT_ADVANCES_H</a></td><td><a href="ft2-list_processing.html#FT_List_Iterate">FT_List_Iterate</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_XY_SCALE</a></td></tr>
<tr><td><a href="ft2-module_management.html#FT_Add_Default_Modules">FT_Add_Default_Modules</a></td><td><a href="ft2-list_processing.html#FT_List_Iterator">FT_List_Iterator</a></td><td><a href="ft2-base_interface.html#FT_SubGlyph">FT_SubGlyph</a></td></tr>
<tr><td><a href="ft2-module_management.html#FT_Add_Module">FT_Add_Module</a></td><td><a href="ft2-list_processing.html#FT_List_Remove">FT_List_Remove</a></td><td><a href="ft2-header_file_macros.html#FT_SYNTHESIS_H">FT_SYNTHESIS_H</a></td></tr>
<tr><td><a href="ft2-system_interface.html#FT_Alloc_Func">FT_Alloc_Func</a></td><td><a href="ft2-list_processing.html#FT_List_Up">FT_List_Up</a></td><td><a href="ft2-header_file_macros.html#FT_SYSTEM_H">FT_SYSTEM_H</a></td></tr>
<tr><td><a href="ft2-computations.html#FT_ANGLE_2PI">FT_ANGLE_2PI</a></td><td><a href="ft2-list_processing.html#FT_ListNode">FT_ListNode</a></td><td><a href="ft2-basic_types.html#FT_Tag">FT_Tag</a></td></tr>
<tr><td><a href="ft2-computations.html#FT_ANGLE_PI">FT_ANGLE_PI</a></td><td><a href="ft2-list_processing.html#FT_ListNodeRec">FT_ListNodeRec</a></td><td><a href="ft2-computations.html#FT_Tan">FT_Tan</a></td></tr>
<tr><td><a href="ft2-computations.html#FT_ANGLE_PI2">FT_ANGLE_PI2</a></td><td><a href="ft2-list_processing.html#FT_ListRec">FT_ListRec</a></td><td><a href="ft2-header_file_macros.html#FT_TRIGONOMETRY_H">FT_TRIGONOMETRY_H</a></td></tr>
<tr><td><a href="ft2-computations.html#FT_ANGLE_PI4">FT_ANGLE_PI4</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_BITMAP_METRICS_ONLY</a></td><td><a href="ft2-header_file_macros.html#FT_TRUETYPE_DRIVER_H">FT_TRUETYPE_DRIVER_H</a></td></tr>
<tr><td><a href="ft2-computations.html#FT_Angle">FT_Angle</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_COLOR</a></td><td><a href="ft2-truetype_engine.html#FT_TrueTypeEngineType">FT_TRUETYPE_ENGINE_TYPE_NONE</a></td></tr>
<tr><td><a href="ft2-computations.html#FT_Angle_Diff">FT_Angle_Diff</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_COMPUTE_METRICS</a></td><td><a href="ft2-truetype_engine.html#FT_TrueTypeEngineType">FT_TRUETYPE_ENGINE_TYPE_PATENTED</a></td></tr>
<tr><td><a href="ft2-computations.html#FT_Atan2">FT_Atan2</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_CROP_BITMAP</a></td><td><a href="ft2-truetype_engine.html#FT_TrueTypeEngineType">FT_TRUETYPE_ENGINE_TYPE_UNPATENTED</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_Attach_File">FT_Attach_File</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_DEFAULT</a></td><td><a href="ft2-header_file_macros.html#FT_TRUETYPE_IDS_H">FT_TRUETYPE_IDS_H</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_Attach_Stream">FT_Attach_Stream</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_FORCE_AUTOHINT</a></td><td><a href="ft2-header_file_macros.html#FT_TRUETYPE_TABLES_H">FT_TRUETYPE_TABLES_H</a></td></tr>
<tr><td><a href="ft2-header_file_macros.html#FT_AUTOHINTER_H">FT_AUTOHINTER_H</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH</a></td><td><a href="ft2-header_file_macros.html#FT_TRUETYPE_TAGS_H">FT_TRUETYPE_TAGS_H</a></td></tr>
<tr><td><a href="ft2-properties.html#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_CJK</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_IGNORE_TRANSFORM</a></td><td><a href="ft2-truetype_engine.html#FT_TrueTypeEngineType">FT_TrueTypeEngineType</a></td></tr>
<tr><td><a href="ft2-properties.html#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_INDIC</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_LINEAR_DESIGN</a></td><td><a href="ft2-gx_validation.html#FT_TrueTypeGX_Free">FT_TrueTypeGX_Free</a></td></tr>
<tr><td><a href="ft2-properties.html#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_LATIN</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_MONOCHROME</a></td><td><a href="ft2-gx_validation.html#FT_TrueTypeGX_Validate">FT_TrueTypeGX_Validate</a></td></tr>
<tr><td><a href="ft2-properties.html#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_NONE</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_AUTOHINT</a></td><td><a href="ft2-header_file_macros.html#FT_TYPE1_TABLES_H">FT_TYPE1_TABLES_H</a></td></tr>
<tr><td><a href="ft2-properties.html#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_XXX</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_BITMAP</a></td><td><a href="ft2-header_file_macros.html#FT_TYPES_H">FT_TYPES_H</a></td></tr>
<tr><td><a href="ft2-header_file_macros.html#FT_BBOX_H">FT_BBOX_H</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_HINTING</a></td><td><a href="ft2-basic_types.html#FT_UFWord">FT_UFWord</a></td></tr>
<tr><td><a href="ft2-basic_types.html#FT_BBox">FT_BBox</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_RECURSE</a></td><td><a href="ft2-basic_types.html#FT_UInt">FT_UInt</a></td></tr>
<tr><td><a href="ft2-header_file_macros.html#FT_BDF_H">FT_BDF_H</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a></td><td><a href="ft2-basic_types.html#FT_UInt16">FT_UInt16</a></td></tr>
<tr><td><a href="ft2-header_file_macros.html#FT_BITMAP_H">FT_BITMAP_H</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_PEDANTIC</a></td><td><a href="ft2-basic_types.html#FT_UInt32">FT_UInt32</a></td></tr>
<tr><td><a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_RENDER</a></td><td><a href="ft2-basic_types.html#FT_UInt64">FT_UInt64</a></td></tr>
<tr><td><a href="ft2-bitmap_handling.html#FT_Bitmap_Convert">FT_Bitmap_Convert</a></td><td><a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_LCD</a></td><td><a href="ft2-basic_types.html#FT_ULong">FT_ULong</a></td></tr>
<tr><td><a href="ft2-bitmap_handling.html#FT_Bitmap_Copy">FT_Bitmap_Copy</a></td><td><a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_LCD_V</a></td><td><a href="ft2-basic_types.html#FT_UnitVector">FT_UnitVector</a></td></tr>
<tr><td><a href="ft2-bitmap_handling.html#FT_Bitmap_Done">FT_Bitmap_Done</a></td><td><a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_LIGHT</a></td><td><a href="ft2-basic_types.html#FT_UShort">FT_UShort</a></td></tr>
<tr><td><a href="ft2-bitmap_handling.html#FT_Bitmap_Embolden">FT_Bitmap_Embolden</a></td><td><a href="ft2-base_interface.html#FT_LOAD_TARGET_MODE">FT_LOAD_TARGET_MODE</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_CKERNXXX">FT_VALIDATE_APPLE</a></td></tr>
<tr><td><a href="ft2-bitmap_handling.html#FT_Bitmap_Init">FT_Bitmap_Init</a></td><td><a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_MONO</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_BASE</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_Bitmap_Size">FT_Bitmap_Size</a></td><td><a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_NORMAL</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_bsln</a></td></tr>
<tr><td><a href="ft2-glyph_management.html#FT_BitmapGlyph">FT_BitmapGlyph</a></td><td><a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_XXX</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_CKERNXXX">FT_VALIDATE_CKERN</a></td></tr>
<tr><td><a href="ft2-glyph_management.html#FT_BitmapGlyphRec">FT_BitmapGlyphRec</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_VERTICAL_LAYOUT</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_CKERNXXX">FT_VALIDATE_CKERNXXX</a></td></tr>
<tr><td><a href="ft2-basic_types.html#FT_Bool">FT_Bool</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_XXX</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_feat</a></td></tr>
<tr><td><a href="ft2-basic_types.html#FT_Byte">FT_Byte</a></td><td><a href="ft2-base_interface.html#FT_Load_Char">FT_Load_Char</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_GDEF</a></td></tr>
<tr><td><a href="ft2-basic_types.html#FT_Bytes">FT_Bytes</a></td><td><a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_GPOS</a></td></tr>
<tr><td><a href="ft2-header_file_macros.html#FT_BZIP2_H">FT_BZIP2_H</a></td><td><a href="ft2-truetype_tables.html#FT_Load_Sfnt_Table">FT_Load_Sfnt_Table</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_GSUB</a></td></tr>
<tr><td><a href="ft2-header_file_macros.html#FT_CACHE_H">FT_CACHE_H</a></td><td><a href="ft2-basic_types.html#FT_Long">FT_Long</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_GX</a></td></tr>
<tr><td><a href="ft2-computations.html#FT_CeilFix">FT_CeilFix</a></td><td><a href="ft2-header_file_macros.html#FT_LZW_H">FT_LZW_H</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GX_LENGTH">FT_VALIDATE_GX_LENGTH</a></td></tr>
<tr><td><a href="ft2-header_file_macros.html#FT_CFF_DRIVER_H">FT_CFF_DRIVER_H</a></td><td><a href="ft2-header_file_macros.html#FT_MAC_H">FT_MAC_H</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_GXXXX</a></td></tr>
<tr><td><a href="ft2-basic_types.html#FT_Char">FT_Char</a></td><td><a href="ft2-basic_types.html#FT_MAKE_TAG">FT_MAKE_TAG</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_JSTF</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_CharMap">FT_CharMap</a></td><td><a href="ft2-basic_types.html#FT_Matrix">FT_Matrix</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_just</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_CharMapRec">FT_CharMapRec</a></td><td><a href="ft2-computations.html#FT_Matrix_Invert">FT_Matrix_Invert</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_kern</a></td></tr>
<tr><td><a href="ft2-header_file_macros.html#FT_CID_H">FT_CID_H</a></td><td><a href="ft2-computations.html#FT_Matrix_Multiply">FT_Matrix_Multiply</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_lcar</a></td></tr>
<tr><td><a href="ft2-gx_validation.html#FT_ClassicKern_Free">FT_ClassicKern_Free</a></td><td><a href="ft2-system_interface.html#FT_Memory">FT_Memory</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_MATH</a></td></tr>
<tr><td><a href="ft2-gx_validation.html#FT_ClassicKern_Validate">FT_ClassicKern_Validate</a></td><td><a href="ft2-system_interface.html#FT_MemoryRec">FT_MemoryRec</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_CKERNXXX">FT_VALIDATE_MS</a></td></tr>
<tr><td><a href="ft2-header_file_macros.html#FT_CONFIG_CONFIG_H">FT_CONFIG_CONFIG_H</a></td><td><a href="ft2-multiple_masters.html#FT_MM_Axis">FT_MM_Axis</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_mort</a></td></tr>
<tr><td><a href="ft2-header_file_macros.html#FT_CONFIG_MODULES_H">FT_CONFIG_MODULES_H</a></td><td><a href="ft2-multiple_masters.html#FT_MM_Var">FT_MM_Var</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_morx</a></td></tr>
<tr><td><a href="ft2-header_file_macros.html#FT_CONFIG_OPTIONS_H">FT_CONFIG_OPTIONS_H</a></td><td><a href="ft2-header_file_macros.html#FT_MODULE_ERRORS_H">FT_MODULE_ERRORS_H</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_OT</a></td></tr>
<tr><td><a href="ft2-header_file_macros.html#FT_CONFIG_STANDARD_LIBRARY_H">FT_CONFIG_STANDARD_LIBRARY_H</a></td><td><a href="ft2-header_file_macros.html#FT_MODULE_H">FT_MODULE_H</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_OTXXX</a></td></tr>
<tr><td><a href="ft2-computations.html#FT_Cos">FT_Cos</a></td><td><a href="ft2-module_management.html#FT_Module">FT_Module</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_opbd</a></td></tr>
<tr><td><a href="ft2-basic_types.html#FT_Data">FT_Data</a></td><td><a href="ft2-module_management.html#FT_Module_Class">FT_Module_Class</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_prop</a></td></tr>
<tr><td><a href="ft2-computations.html#FT_DivFix">FT_DivFix</a></td><td><a href="ft2-module_management.html#FT_Module_Constructor">FT_Module_Constructor</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_trak</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_Done_Face">FT_Done_Face</a></td><td><a href="ft2-module_management.html#FT_Module_Destructor">FT_Module_Destructor</a></td><td><a href="ft2-multiple_masters.html#FT_VAR_AXIS_FLAG_XXX">FT_VAR_AXIS_FLAG_HIDDEN</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_Done_FreeType">FT_Done_FreeType</a></td><td><a href="ft2-module_management.html#FT_Module_Requester">FT_Module_Requester</a></td><td><a href="ft2-multiple_masters.html#FT_VAR_AXIS_FLAG_XXX">FT_VAR_AXIS_FLAG_XXX</a></td></tr>
<tr><td><a href="ft2-glyph_management.html#FT_Done_Glyph">FT_Done_Glyph</a></td><td><a href="ft2-header_file_macros.html#FT_MULTIPLE_MASTERS_H">FT_MULTIPLE_MASTERS_H</a></td><td><a href="ft2-multiple_masters.html#FT_Var_Axis">FT_Var_Axis</a></td></tr>
<tr><td><a href="ft2-module_management.html#FT_Done_Library">FT_Done_Library</a></td><td><a href="ft2-computations.html#FT_MulDiv">FT_MulDiv</a></td><td><a href="ft2-multiple_masters.html#FT_Var_Named_Style">FT_Var_Named_Style</a></td></tr>
<tr><td><a href="ft2-multiple_masters.html#FT_Done_MM_Var">FT_Done_MM_Var</a></td><td><a href="ft2-computations.html#FT_MulFix">FT_MulFix</a></td><td><a href="ft2-basic_types.html#FT_Vector">FT_Vector</a></td></tr>
<tr><td><a href="ft2-sizes_management.html#FT_Done_Size">FT_Done_Size</a></td><td><a href="ft2-multiple_masters.html#FT_Multi_Master">FT_Multi_Master</a></td><td><a href="ft2-computations.html#FT_Vector_From_Polar">FT_Vector_From_Polar</a></td></tr>
<tr><td><a href="ft2-header_file_macros.html#FT_DRIVER_H">FT_DRIVER_H</a></td><td><a href="ft2-base_interface.html#FT_New_Face">FT_New_Face</a></td><td><a href="ft2-computations.html#FT_Vector_Length">FT_Vector_Length</a></td></tr>
<tr><td><a href="ft2-module_management.html#FT_Driver">FT_Driver</a></td><td><a href="ft2-mac_specific.html#FT_New_Face_From_FOND">FT_New_Face_From_FOND</a></td><td><a href="ft2-computations.html#FT_Vector_Polarize">FT_Vector_Polarize</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a></td><td><a href="ft2-mac_specific.html#FT_New_Face_From_FSRef">FT_New_Face_From_FSRef</a></td><td><a href="ft2-computations.html#FT_Vector_Rotate">FT_Vector_Rotate</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_ADOBE_CUSTOM</a></td><td><a href="ft2-mac_specific.html#FT_New_Face_From_FSSpec">FT_New_Face_From_FSSpec</a></td><td><a href="ft2-computations.html#FT_Vector_Transform">FT_Vector_Transform</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_ADOBE_EXPERT</a></td><td><a href="ft2-module_management.html#FT_New_Library">FT_New_Library</a></td><td><a href="ft2-computations.html#FT_Vector_Unit">FT_Vector_Unit</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_ADOBE_LATIN_1</a></td><td><a href="ft2-base_interface.html#FT_New_Memory_Face">FT_New_Memory_Face</a></td><td><a href="ft2-header_file_macros.html#FT_WINFONTS_H">FT_WINFONTS_H</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_ADOBE_STANDARD</a></td><td><a href="ft2-sizes_management.html#FT_New_Size">FT_New_Size</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_Header">FT_WinFNT_Header</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_APPLE_ROMAN</a></td><td><a href="ft2-basic_types.html#FT_Offset">FT_Offset</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_HeaderRec">FT_WinFNT_HeaderRec</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_BIG5</a></td><td><a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_DRIVER</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1250</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_JOHAB</a></td><td><a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_MEMORY</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1251</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_BIG5</a></td><td><a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_PARAMS</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1252</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_GB2312</a></td><td><a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_PATHNAME</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1253</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_JOHAB</a></td><td><a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_STREAM</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1254</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_SJIS</a></td><td><a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_XXX</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1255</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_SYMBOL</a></td><td><a href="ft2-header_file_macros.html#FT_OPENTYPE_VALIDATE_H">FT_OPENTYPE_VALIDATE_H</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1256</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_WANSUNG</a></td><td><a href="ft2-base_interface.html#FT_Open_Args">FT_Open_Args</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1257</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_NONE</a></td><td><a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1258</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_OLD_LATIN_2</a></td><td><a href="ft2-ot_validation.html#FT_OpenType_Free">FT_OpenType_Free</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1361</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_PRC</a></td><td><a href="ft2-ot_validation.html#FT_OpenType_Validate">FT_OpenType_Validate</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP874</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_SJIS</a></td><td><a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_FILL_LEFT</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP932</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_UNICODE</a></td><td><a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_FILL_RIGHT</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP936</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_WANSUNG</a></td><td><a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_NONE</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP949</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_Encoding</a></td><td><a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_POSTSCRIPT</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP950</a></td></tr>
<tr><td><a href="ft2-header_file_macros.html#FT_ERRORS_H">FT_ERRORS_H</a></td><td><a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_TRUETYPE</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_DEFAULT</a></td></tr>
<tr><td><a href="ft2-error_code_values.html#FT_Err_XXX">FT_Err_XXX</a></td><td><a href="ft2-outline_processing.html#FT_Orientation">FT_Orientation</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_MAC</a></td></tr>
<tr><td><a href="ft2-basic_types.html#FT_Error">FT_Error</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_EVEN_ODD_FILL</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_OEM</a></td></tr>
<tr><td><a href="ft2-basic_types.html#FT_F26Dot6">FT_F26Dot6</a></td><td><a href="ft2-header_file_macros.html#FT_OUTLINE_H">FT_OUTLINE_H</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_SYMBOL</a></td></tr>
<tr><td><a href="ft2-basic_types.html#FT_F2Dot14">FT_F2Dot14</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_HIGH_PRECISION</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_XXX</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_CID_KEYED</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_IGNORE_DROPOUTS</a></td><td><a href="ft2-cache_subsystem.html#FTC_CMapCache">FTC_CMapCache</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_COLOR</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_INCLUDE_STUBS</a></td><td><a href="ft2-cache_subsystem.html#FTC_CMapCache_Lookup">FTC_CMapCache_Lookup</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_EXTERNAL_STREAM</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_NONE</a></td><td><a href="ft2-cache_subsystem.html#FTC_CMapCache_New">FTC_CMapCache_New</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_FAST_GLYPHS</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_OWNER</a></td><td><a href="ft2-cache_subsystem.html#FTC_Face_Requester">FTC_Face_Requester</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_FIXED_SIZES</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_REVERSE_FILL</a></td><td><a href="ft2-cache_subsystem.html#FTC_FaceID">FTC_FaceID</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_FIXED_WIDTH</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_SINGLE_PASS</a></td><td><a href="ft2-cache_subsystem.html#FTC_ImageCache">FTC_ImageCache</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_GLYPH_NAMES</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_SMART_DROPOUTS</a></td><td><a href="ft2-cache_subsystem.html#FTC_ImageCache_Lookup">FTC_ImageCache_Lookup</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_HINTER</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_XXX</a></td><td><a href="ft2-cache_subsystem.html#FTC_ImageCache_LookupScaler">FTC_ImageCache_LookupScaler</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_HORIZONTAL</a></td><td><a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a></td><td><a href="ft2-cache_subsystem.html#FTC_ImageCache_New">FTC_ImageCache_New</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_KERNING</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Check">FT_Outline_Check</a></td><td><a href="ft2-cache_subsystem.html#FTC_ImageType">FTC_ImageType</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_MULTIPLE_MASTERS</a></td><td><a href="ft2-outline_processing.html#FT_Outline_ConicToFunc">FT_Outline_ConicToFunc</a></td><td><a href="ft2-cache_subsystem.html#FTC_ImageTypeRec">FTC_ImageTypeRec</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_SCALABLE</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Copy">FT_Outline_Copy</a></td><td><a href="ft2-cache_subsystem.html#FTC_Manager">FTC_Manager</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_SFNT</a></td><td><a href="ft2-outline_processing.html#FT_Outline_CubicToFunc">FT_Outline_CubicToFunc</a></td><td><a href="ft2-cache_subsystem.html#FTC_Manager_Done">FTC_Manager_Done</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_TRICKY</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Decompose">FT_Outline_Decompose</a></td><td><a href="ft2-cache_subsystem.html#FTC_Manager_LookupFace">FTC_Manager_LookupFace</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_VARIATION</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Done">FT_Outline_Done</a></td><td><a href="ft2-cache_subsystem.html#FTC_Manager_LookupSize">FTC_Manager_LookupSize</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_VERTICAL</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Embolden">FT_Outline_Embolden</a></td><td><a href="ft2-cache_subsystem.html#FTC_Manager_New">FTC_Manager_New</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_XXX</a></td><td><a href="ft2-outline_processing.html#FT_Outline_EmboldenXY">FT_Outline_EmboldenXY</a></td><td><a href="ft2-cache_subsystem.html#FTC_Manager_RemoveFaceID">FTC_Manager_RemoveFaceID</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_Face">FT_Face</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Funcs">FT_Outline_Funcs</a></td><td><a href="ft2-cache_subsystem.html#FTC_Manager_Reset">FTC_Manager_Reset</a></td></tr>
<tr><td><a href="ft2-version.html#FT_Face_CheckTrueTypePatents">FT_Face_CheckTrueTypePatents</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Get_BBox">FT_Outline_Get_BBox</a></td><td><a href="ft2-cache_subsystem.html#FTC_Node">FTC_Node</a></td></tr>
<tr><td><a href="ft2-glyph_variants.html#FT_Face_GetCharsOfVariant">FT_Face_GetCharsOfVariant</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Get_Bitmap">FT_Outline_Get_Bitmap</a></td><td><a href="ft2-cache_subsystem.html#FTC_Node_Unref">FTC_Node_Unref</a></td></tr>
<tr><td><a href="ft2-glyph_variants.html#FT_Face_GetCharVariantIndex">FT_Face_GetCharVariantIndex</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Get_CBox">FT_Outline_Get_CBox</a></td><td><a href="ft2-cache_subsystem.html#FTC_SBit">FTC_SBit</a></td></tr>
<tr><td><a href="ft2-glyph_variants.html#FT_Face_GetCharVariantIsDefault">FT_Face_GetCharVariantIsDefault</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Get_Orientation">FT_Outline_Get_Orientation</a></td><td><a href="ft2-cache_subsystem.html#FTC_SBitCache">FTC_SBitCache</a></td></tr>
<tr><td><a href="ft2-glyph_variants.html#FT_Face_GetVariantSelectors">FT_Face_GetVariantSelectors</a></td><td><a href="ft2-glyph_stroker.html#FT_Outline_GetInsideBorder">FT_Outline_GetInsideBorder</a></td><td><a href="ft2-cache_subsystem.html#FTC_SBitCache_Lookup">FTC_SBitCache_Lookup</a></td></tr>
<tr><td><a href="ft2-glyph_variants.html#FT_Face_GetVariantsOfChar">FT_Face_GetVariantsOfChar</a></td><td><a href="ft2-glyph_stroker.html#FT_Outline_GetOutsideBorder">FT_Outline_GetOutsideBorder</a></td><td><a href="ft2-cache_subsystem.html#FTC_SBitCache_LookupScaler">FTC_SBitCache_LookupScaler</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_Face_Internal">FT_Face_Internal</a></td><td><a href="ft2-outline_processing.html#FT_Outline_LineToFunc">FT_Outline_LineToFunc</a></td><td><a href="ft2-cache_subsystem.html#FTC_SBitCache_New">FTC_SBitCache_New</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_Face_Properties">FT_Face_Properties</a></td><td><a href="ft2-outline_processing.html#FT_Outline_MoveToFunc">FT_Outline_MoveToFunc</a></td><td><a href="ft2-cache_subsystem.html#FTC_SBitRec">FTC_SBitRec</a></td></tr>
<tr><td><a href="ft2-version.html#FT_Face_SetUnpatentedHinting">FT_Face_SetUnpatentedHinting</a></td><td><a href="ft2-outline_processing.html#FT_Outline_New">FT_Outline_New</a></td><td><a href="ft2-cache_subsystem.html#FTC_Scaler">FTC_Scaler</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Render">FT_Outline_Render</a></td><td><a href="ft2-cache_subsystem.html#FTC_ScalerRec">FTC_ScalerRec</a></td></tr>
<tr><td><a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Reverse">FT_Outline_Reverse</a></td><td><a href="ft2-properties.html#fallback-script">fallback-script</a></td></tr>
<tr><td><a href="ft2-computations.html#FT_FloorFix">FT_FloorFix</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Transform">FT_Outline_Transform</a></td><td><a href="ft2-properties.html#glyph-to-script-map">glyph-to-script-map</a></td></tr>
<tr><td><a href="ft2-header_file_macros.html#FT_FONT_FORMATS_H">FT_FONT_FORMATS_H</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Translate">FT_Outline_Translate</a></td><td><a href="ft2-properties.html#hinting-engine">hinting-engine</a></td></tr>
<tr><td><a href="ft2-header_file_macros.html#FT_FREETYPE_H">FT_FREETYPE_H</a></td><td><a href="ft2-glyph_management.html#FT_OutlineGlyph">FT_OutlineGlyph</a></td><td><a href="ft2-properties.html#increase-x-height">increase-x-height</a></td></tr>
<tr><td><a href="ft2-system_interface.html#FT_Free_Func">FT_Free_Func</a></td><td><a href="ft2-glyph_management.html#FT_OutlineGlyphRec">FT_OutlineGlyphRec</a></td><td><a href="ft2-properties.html#interpreter-version">interpreter-version</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_BITMAP_EMBEDDING_ONLY</a></td><td><a href="ft2-parameter_tags.html#FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY">FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY</a></td><td><a href="ft2-properties.html#no-long-family-names">no-long-family-names</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_EDITABLE_EMBEDDING</a></td><td><a href="ft2-parameter_tags.html#FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY">FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY</a></td><td><a href="ft2-properties.html#no-stem-darkening">no-stem-darkening</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_INSTALLABLE_EMBEDDING</a></td><td><a href="ft2-parameter_tags.html#FT_PARAM_TAG_INCREMENTAL">FT_PARAM_TAG_INCREMENTAL</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_BLUE_FUZZ</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_NO_SUBSETTING</a></td><td><a href="ft2-parameter_tags.html#FT_PARAM_TAG_LCD_FILTER_WEIGHTS">FT_PARAM_TAG_LCD_FILTER_WEIGHTS</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_BLUE_SCALE</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING</a></td><td><a href="ft2-parameter_tags.html#FT_PARAM_TAG_RANDOM_SEED">FT_PARAM_TAG_RANDOM_SEED</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_BLUE_SHIFT</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING</a></td><td><a href="ft2-parameter_tags.html#FT_PARAM_TAG_STEM_DARKENING">FT_PARAM_TAG_STEM_DARKENING</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_BLUE_VALUE</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_XXX</a></td><td><a href="ft2-parameter_tags.html#FT_PARAM_TAG_UNPATENTED_HINTING">FT_PARAM_TAG_UNPATENTED_HINTING</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_CHAR_STRING</a></td></tr>
<tr><td><a href="ft2-basic_types.html#FT_FWord">FT_FWord</a></td><td><a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_CHAR_STRING_KEY</a></td></tr>
<tr><td><a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_DO_GRAY</a></td><td><a href="ft2-header_file_macros.html#FT_PCF_DRIVER_H">FT_PCF_DRIVER_H</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_ENCODING_ENTRY</a></td></tr>
<tr><td><a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_DO_GRIDFIT</a></td><td><a href="ft2-header_file_macros.html#FT_PFR_H">FT_PFR_H</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_ENCODING_TYPE</a></td></tr>
<tr><td><a href="ft2-header_file_macros.html#FT_GASP_H">FT_GASP_H</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_BGRA</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FAMILY_BLUE</a></td></tr>
<tr><td><a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_NO_TABLE</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_GRAY</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FAMILY_NAME</a></td></tr>
<tr><td><a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_SYMMETRIC_GRIDFIT</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_GRAY2</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FAMILY_OTHER_BLUE</a></td></tr>
<tr><td><a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_SYMMETRIC_SMOOTHING</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_GRAY4</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FONT_BBOX</a></td></tr>
<tr><td><a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_XXX</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_LCD</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FONT_MATRIX</a></td></tr>
<tr><td><a href="ft2-basic_types.html#FT_Generic">FT_Generic</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_LCD_V</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FONT_NAME</a></td></tr>
<tr><td><a href="ft2-basic_types.html#FT_Generic_Finalizer">FT_Generic_Finalizer</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_MONO</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FONT_TYPE</a></td></tr>
<tr><td><a href="ft2-quick_advance.html#FT_Get_Advance">FT_Get_Advance</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_NONE</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FORCE_BOLD</a></td></tr>
<tr><td><a href="ft2-quick_advance.html#FT_Get_Advances">FT_Get_Advances</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_Pixel_Mode</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FS_TYPE</a></td></tr>
<tr><td><a href="ft2-bdf_fonts.html#FT_Get_BDF_Charset_ID">FT_Get_BDF_Charset_ID</a></td><td><a href="ft2-basic_types.html#FT_Pointer">FT_Pointer</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FULL_NAME</a></td></tr>
<tr><td><a href="ft2-bdf_fonts.html#FT_Get_BDF_Property">FT_Get_BDF_Property</a></td><td><a href="ft2-basic_types.html#FT_Pos">FT_Pos</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_IS_FIXED_PITCH</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_Get_Char_Index">FT_Get_Char_Index</a></td><td><a href="ft2-properties.html#FT_Prop_GlyphToScriptMap">FT_Prop_GlyphToScriptMap</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_ITALIC_ANGLE</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_Get_Charmap_Index">FT_Get_Charmap_Index</a></td><td><a href="ft2-properties.html#FT_Prop_IncreaseXHeight">FT_Prop_IncreaseXHeight</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_LANGUAGE_GROUP</a></td></tr>
<tr><td><a href="ft2-cid_fonts.html#FT_Get_CID_From_Glyph_Index">FT_Get_CID_From_Glyph_Index</a></td><td><a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_LEN_IV</a></td></tr>
<tr><td><a href="ft2-cid_fonts.html#FT_Get_CID_Is_Internally_CID_Keyed">FT_Get_CID_Is_Internally_CID_Keyed</a></td><td><a href="ft2-module_management.html#FT_Property_Set">FT_Property_Set</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_MIN_FEATURE</a></td></tr>
<tr><td><a href="ft2-cid_fonts.html#FT_Get_CID_Registry_Ordering_Supplement">FT_Get_CID_Registry_Ordering_Supplement</a></td><td><a href="ft2-basic_types.html#FT_PtrDist">FT_PtrDist</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NOTICE</a></td></tr>
<tr><td><a href="ft2-truetype_tables.html#FT_Get_CMap_Format">FT_Get_CMap_Format</a></td><td><a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_AA</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NUM_BLUE_VALUES</a></td></tr>
<tr><td><a href="ft2-truetype_tables.html#FT_Get_CMap_Language_ID">FT_Get_CMap_Language_ID</a></td><td><a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_CLIP</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NUM_CHAR_STRINGS</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_Get_First_Char">FT_Get_First_Char</a></td><td><a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_DEFAULT</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NUM_FAMILY_BLUES</a></td></tr>
<tr><td><a href="ft2-font_formats.html#FT_Get_Font_Format">FT_Get_Font_Format</a></td><td><a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_DIRECT</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NUM_FAMILY_OTHER_BLUES</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_Get_FSType_Flags">FT_Get_FSType_Flags</a></td><td><a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_XXX</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NUM_OTHER_BLUES</a></td></tr>
<tr><td><a href="ft2-gasp_table.html#FT_Get_Gasp">FT_Get_Gasp</a></td><td><a href="ft2-raster.html#FT_Raster">FT_Raster</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NUM_STEM_SNAP_H</a></td></tr>
<tr><td><a href="ft2-glyph_management.html#FT_Get_Glyph">FT_Get_Glyph</a></td><td><a href="ft2-raster.html#FT_Raster_BitSet_Func">FT_Raster_BitSet_Func</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NUM_STEM_SNAP_V</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_Get_Glyph_Name">FT_Get_Glyph_Name</a></td><td><a href="ft2-raster.html#FT_Raster_BitTest_Func">FT_Raster_BitTest_Func</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NUM_SUBRS</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_Get_Kerning">FT_Get_Kerning</a></td><td><a href="ft2-raster.html#FT_Raster_DoneFunc">FT_Raster_DoneFunc</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_OTHER_BLUE</a></td></tr>
<tr><td><a href="ft2-multiple_masters.html#FT_Get_MM_Blend_Coordinates">FT_Get_MM_Blend_Coordinates</a></td><td><a href="ft2-raster.html#FT_Raster_Funcs">FT_Raster_Funcs</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_PAINT_TYPE</a></td></tr>
<tr><td><a href="ft2-multiple_masters.html#FT_Get_MM_Var">FT_Get_MM_Var</a></td><td><a href="ft2-raster.html#FT_Raster_NewFunc">FT_Raster_NewFunc</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_PASSWORD</a></td></tr>
<tr><td><a href="ft2-module_management.html#FT_Get_Module">FT_Get_Module</a></td><td><a href="ft2-raster.html#FT_Raster_Params">FT_Raster_Params</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_RND_STEM_UP</a></td></tr>
<tr><td><a href="ft2-multiple_masters.html#FT_Get_Multi_Master">FT_Get_Multi_Master</a></td><td><a href="ft2-raster.html#FT_Raster_RenderFunc">FT_Raster_RenderFunc</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_STD_HW</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_Get_Name_Index">FT_Get_Name_Index</a></td><td><a href="ft2-raster.html#FT_Raster_ResetFunc">FT_Raster_ResetFunc</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_STD_VW</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_Get_Next_Char">FT_Get_Next_Char</a></td><td><a href="ft2-raster.html#FT_Raster_SetModeFunc">FT_Raster_SetModeFunc</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_STEM_SNAP_H</a></td></tr>
<tr><td><a href="ft2-pfr_fonts.html#FT_Get_PFR_Advance">FT_Get_PFR_Advance</a></td><td><a href="ft2-header_file_macros.html#FT_RENDER_H">FT_RENDER_H</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_STEM_SNAP_V</a></td></tr>
<tr><td><a href="ft2-pfr_fonts.html#FT_Get_PFR_Kerning">FT_Get_PFR_Kerning</a></td><td><a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_LCD</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_SUBR</a></td></tr>
<tr><td><a href="ft2-pfr_fonts.html#FT_Get_PFR_Metrics">FT_Get_PFR_Metrics</a></td><td><a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_LCD_V</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_UNDERLINE_POSITION</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_Get_Postscript_Name">FT_Get_Postscript_Name</a></td><td><a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_LIGHT</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_UNDERLINE_THICKNESS</a></td></tr>
<tr><td><a href="ft2-type1_tables.html#FT_Get_PS_Font_Info">FT_Get_PS_Font_Info</a></td><td><a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_MONO</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_UNIQUE_ID</a></td></tr>
<tr><td><a href="ft2-type1_tables.html#FT_Get_PS_Font_Private">FT_Get_PS_Font_Private</a></td><td><a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_NORMAL</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_VERSION</a></td></tr>
<tr><td><a href="ft2-type1_tables.html#FT_Get_PS_Font_Value">FT_Get_PS_Font_Value</a></td><td><a href="ft2-system_interface.html#FT_Realloc_Func">FT_Realloc_Func</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_WEIGHT</a></td></tr>
<tr><td><a href="ft2-module_management.html#FT_Get_Renderer">FT_Get_Renderer</a></td><td><a href="ft2-base_interface.html#FT_Reference_Face">FT_Reference_Face</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_Dict_Keys</a></td></tr>
<tr><td><a href="ft2-sfnt_names.html#FT_Get_Sfnt_LangTag">FT_Get_Sfnt_LangTag</a></td><td><a href="ft2-module_management.html#FT_Reference_Library">FT_Reference_Library</a></td><td><a href="ft2-type1_tables.html#PS_FontInfo">PS_FontInfo</a></td></tr>
<tr><td><a href="ft2-sfnt_names.html#FT_Get_Sfnt_Name">FT_Get_Sfnt_Name</a></td><td><a href="ft2-module_management.html#FT_Remove_Module">FT_Remove_Module</a></td><td><a href="ft2-type1_tables.html#PS_FontInfoRec">PS_FontInfoRec</a></td></tr>
<tr><td><a href="ft2-sfnt_names.html#FT_Get_Sfnt_Name_Count">FT_Get_Sfnt_Name_Count</a></td><td><a href="ft2-base_interface.html#FT_Render_Glyph">FT_Render_Glyph</a></td><td><a href="ft2-type1_tables.html#PS_Private">PS_Private</a></td></tr>
<tr><td><a href="ft2-truetype_tables.html#FT_Get_Sfnt_Table">FT_Get_Sfnt_Table</a></td><td><a href="ft2-base_interface.html#FT_Render_Mode">FT_Render_Mode</a></td><td><a href="ft2-type1_tables.html#PS_PrivateRec">PS_PrivateRec</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_Get_SubGlyph_Info">FT_Get_SubGlyph_Info</a></td><td><a href="ft2-module_management.html#FT_Renderer">FT_Renderer</a></td><td><a href="ft2-properties.html#random-seed">random-seed</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_Get_Track_Kerning">FT_Get_Track_Kerning</a></td><td><a href="ft2-module_management.html#FT_Renderer_Class">FT_Renderer_Class</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_BLUE_SCALE</a></td></tr>
<tr><td><a href="ft2-truetype_engine.html#FT_Get_TrueType_Engine_Type">FT_Get_TrueType_Engine_Type</a></td><td><a href="ft2-base_interface.html#FT_Request_Size">FT_Request_Size</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_BLUE_SHIFT</a></td></tr>
<tr><td><a href="ft2-multiple_masters.html#FT_Get_Var_Axis_Flags">FT_Get_Var_Axis_Flags</a></td><td><a href="ft2-computations.html#FT_RoundFix">FT_RoundFix</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_BLUE_VALUES</a></td></tr>
<tr><td><a href="ft2-multiple_masters.html#FT_Get_Var_Blend_Coordinates">FT_Get_Var_Blend_Coordinates</a></td><td><a href="ft2-base_interface.html#FT_Select_Charmap">FT_Select_Charmap</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_FAMILY_BLUES</a></td></tr>
<tr><td><a href="ft2-multiple_masters.html#FT_Get_Var_Design_Coordinates">FT_Get_Var_Design_Coordinates</a></td><td><a href="ft2-base_interface.html#FT_Select_Size">FT_Select_Size</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_FAMILY_OTHER_BLUES</a></td></tr>
<tr><td><a href="ft2-winfnt_fonts.html#FT_Get_WinFNT_Header">FT_Get_WinFNT_Header</a></td><td><a href="ft2-base_interface.html#FT_Set_Char_Size">FT_Set_Char_Size</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_FORCE_BOLD</a></td></tr>
<tr><td><a href="ft2-mac_specific.html#FT_GetFile_From_Mac_ATS_Name">FT_GetFile_From_Mac_ATS_Name</a></td><td><a href="ft2-base_interface.html#FT_Set_Charmap">FT_Set_Charmap</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_ITALIC_ANGLE</a></td></tr>
<tr><td><a href="ft2-mac_specific.html#FT_GetFile_From_Mac_Name">FT_GetFile_From_Mac_Name</a></td><td><a href="ft2-module_management.html#FT_Set_Debug_Hook">FT_Set_Debug_Hook</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_OTHER_BLUES</a></td></tr>
<tr><td><a href="ft2-mac_specific.html#FT_GetFilePath_From_Mac_ATS_Name">FT_GetFilePath_From_Mac_ATS_Name</a></td><td><a href="ft2-module_management.html#FT_Set_Default_Properties">FT_Set_Default_Properties</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_STANDARD_HEIGHT</a></td></tr>
<tr><td><a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_GRIDFIT</a></td><td><a href="ft2-multiple_masters.html#FT_Set_MM_Blend_Coordinates">FT_Set_MM_Blend_Coordinates</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_STANDARD_WIDTH</a></td></tr>
<tr><td><a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_PIXELS</a></td><td><a href="ft2-multiple_masters.html#FT_Set_MM_Design_Coordinates">FT_Set_MM_Design_Coordinates</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_STEM_SNAP_HEIGHTS</a></td></tr>
<tr><td><a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_SUBPIXELS</a></td><td><a href="ft2-multiple_masters.html#FT_Set_Named_Instance">FT_Set_Named_Instance</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_STEM_SNAP_WIDTHS</a></td></tr>
<tr><td><a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_TRUNCATE</a></td><td><a href="ft2-base_interface.html#FT_Set_Pixel_Sizes">FT_Set_Pixel_Sizes</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_UNDERLINE_POSITION</a></td></tr>
<tr><td><a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_UNSCALED</a></td><td><a href="ft2-module_management.html#FT_Set_Renderer">FT_Set_Renderer</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_UNDERLINE_THICKNESS</a></td></tr>
<tr><td><a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_BITMAP</a></td><td><a href="ft2-base_interface.html#FT_Set_Transform">FT_Set_Transform</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_Blend_Flags</a></td></tr>
<tr><td><a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_COMPOSITE</a></td><td><a href="ft2-multiple_masters.html#FT_Set_Var_Blend_Coordinates">FT_Set_Var_Blend_Coordinates</a></td><td><a href="ft2-type1_tables.html#T1_EncodingType">T1_ENCODING_TYPE_ARRAY</a></td></tr>
<tr><td><a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_NONE</a></td><td><a href="ft2-multiple_masters.html#FT_Set_Var_Design_Coordinates">FT_Set_Var_Design_Coordinates</a></td><td><a href="ft2-type1_tables.html#T1_EncodingType">T1_ENCODING_TYPE_EXPERT</a></td></tr>
<tr><td><a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_OUTLINE</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_SFNT_HEAD</a></td><td><a href="ft2-type1_tables.html#T1_EncodingType">T1_ENCODING_TYPE_ISOLATIN1</a></td></tr>
<tr><td><a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_PLOTTER</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_SFNT_HHEA</a></td><td><a href="ft2-type1_tables.html#T1_EncodingType">T1_ENCODING_TYPE_NONE</a></td></tr>
<tr><td><a href="ft2-header_file_macros.html#FT_GLYPH_H">FT_GLYPH_H</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_SFNT_MAXP</a></td><td><a href="ft2-type1_tables.html#T1_EncodingType">T1_ENCODING_TYPE_STANDARD</a></td></tr>
<tr><td><a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a></td><td><a href="ft2-header_file_macros.html#FT_SFNT_NAMES_H">FT_SFNT_NAMES_H</a></td><td><a href="ft2-type1_tables.html#T1_EncodingType">T1_EncodingType</a></td></tr>
<tr><td><a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_Glyph_BBox_Mode</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_SFNT_OS2</a></td><td><a href="ft2-type1_tables.html#T1_FontInfo">T1_FontInfo</a></td></tr>
<tr><td><a href="ft2-glyph_management.html#FT_Glyph_Copy">FT_Glyph_Copy</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_SFNT_PCLT</a></td><td><a href="ft2-type1_tables.html#T1_Private">T1_Private</a></td></tr>
<tr><td><a href="ft2-basic_types.html#FT_Glyph_Format">FT_Glyph_Format</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_SFNT_POST</a></td><td><a href="ft2-truetype_tables.html#TT_ADOBE_ID_XXX">TT_ADOBE_ID_CUSTOM</a></td></tr>
<tr><td><a href="ft2-glyph_management.html#FT_Glyph_Get_CBox">FT_Glyph_Get_CBox</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_SFNT_VHEA</a></td><td><a href="ft2-truetype_tables.html#TT_ADOBE_ID_XXX">TT_ADOBE_ID_EXPERT</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_Glyph_Metrics">FT_Glyph_Metrics</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Table_Info">FT_Sfnt_Table_Info</a></td><td><a href="ft2-truetype_tables.html#TT_ADOBE_ID_XXX">TT_ADOBE_ID_LATIN_1</a></td></tr>
<tr><td><a href="ft2-glyph_stroker.html#FT_Glyph_Stroke">FT_Glyph_Stroke</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_Sfnt_Tag</a></td><td><a href="ft2-truetype_tables.html#TT_ADOBE_ID_XXX">TT_ADOBE_ID_STANDARD</a></td></tr>
<tr><td><a href="ft2-glyph_stroker.html#FT_Glyph_StrokeBorder">FT_Glyph_StrokeBorder</a></td><td><a href="ft2-sfnt_names.html#FT_SfntLangTag">FT_SfntLangTag</a></td><td><a href="ft2-truetype_tables.html#TT_ADOBE_ID_XXX">TT_ADOBE_ID_XXX</a></td></tr>
<tr><td><a href="ft2-glyph_management.html#FT_Glyph_To_Bitmap">FT_Glyph_To_Bitmap</a></td><td><a href="ft2-sfnt_names.html#FT_SfntName">FT_SfntName</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_DEFAULT</a></td></tr>
<tr><td><a href="ft2-glyph_management.html#FT_Glyph_Transform">FT_Glyph_Transform</a></td><td><a href="ft2-basic_types.html#FT_Short">FT_Short</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_FULL_UNICODE</a></td></tr>
<tr><td><a href="ft2-glyph_management.html#FT_GlyphRec">FT_GlyphRec</a></td><td><a href="ft2-base_interface.html#FT_Size_Request_Type">FT_SIZE_REQUEST_TYPE_BBOX</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_ISO_10646</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_GlyphSlot">FT_GlyphSlot</a></td><td><a href="ft2-base_interface.html#FT_Size_Request_Type">FT_SIZE_REQUEST_TYPE_CELL</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_UNICODE_1_1</a></td></tr>
<tr><td><a href="ft2-bitmap_handling.html#FT_GlyphSlot_Own_Bitmap">FT_GlyphSlot_Own_Bitmap</a></td><td><a href="ft2-base_interface.html#FT_Size_Request_Type">FT_SIZE_REQUEST_TYPE_NOMINAL</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_UNICODE_2_0</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a></td><td><a href="ft2-base_interface.html#FT_Size_Request_Type">FT_SIZE_REQUEST_TYPE_REAL_DIM</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_UNICODE_32</a></td></tr>
<tr><td><a href="ft2-header_file_macros.html#FT_GX_VALIDATE_H">FT_GX_VALIDATE_H</a></td><td><a href="ft2-base_interface.html#FT_Size_Request_Type">FT_SIZE_REQUEST_TYPE_SCALES</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_VARIANT_SELECTOR</a></td></tr>
<tr><td><a href="ft2-header_file_macros.html#FT_GZIP_H">FT_GZIP_H</a></td><td><a href="ft2-header_file_macros.html#FT_SIZES_H">FT_SIZES_H</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_XXX</a></td></tr>
<tr><td><a href="ft2-gzip.html#FT_Gzip_Uncompress">FT_Gzip_Uncompress</a></td><td><a href="ft2-computations.html#FT_Sin">FT_Sin</a></td><td><a href="ft2-truetype_tables.html#TT_Header">TT_Header</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_HAS_COLOR">FT_HAS_COLOR</a></td><td><a href="ft2-base_interface.html#FT_Size">FT_Size</a></td><td><a href="ft2-truetype_tables.html#TT_HoriHeader">TT_HoriHeader</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_HAS_FAST_GLYPHS">FT_HAS_FAST_GLYPHS</a></td><td><a href="ft2-base_interface.html#FT_Size_Internal">FT_Size_Internal</a></td><td><a href="ft2-properties.html#TT_INTERPRETER_VERSION_XXX">TT_INTERPRETER_VERSION_35</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_HAS_FIXED_SIZES">FT_HAS_FIXED_SIZES</a></td><td><a href="ft2-base_interface.html#FT_Size_Metrics">FT_Size_Metrics</a></td><td><a href="ft2-properties.html#TT_INTERPRETER_VERSION_XXX">TT_INTERPRETER_VERSION_38</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_HAS_GLYPH_NAMES">FT_HAS_GLYPH_NAMES</a></td><td><a href="ft2-base_interface.html#FT_Size_Request">FT_Size_Request</a></td><td><a href="ft2-properties.html#TT_INTERPRETER_VERSION_XXX">TT_INTERPRETER_VERSION_40</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_HAS_HORIZONTAL">FT_HAS_HORIZONTAL</a></td><td><a href="ft2-base_interface.html#FT_Size_Request_Type">FT_Size_Request_Type</a></td><td><a href="ft2-properties.html#TT_INTERPRETER_VERSION_XXX">TT_INTERPRETER_VERSION_XXX</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_HAS_KERNING">FT_HAS_KERNING</a></td><td><a href="ft2-base_interface.html#FT_Size_RequestRec">FT_Size_RequestRec</a></td><td><a href="ft2-truetype_tables.html#TT_ISO_ID_XXX">TT_ISO_ID_10646</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_HAS_MULTIPLE_MASTERS">FT_HAS_MULTIPLE_MASTERS</a></td><td><a href="ft2-base_interface.html#FT_SizeRec">FT_SizeRec</a></td><td><a href="ft2-truetype_tables.html#TT_ISO_ID_XXX">TT_ISO_ID_7BIT_ASCII</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_HAS_VERTICAL">FT_HAS_VERTICAL</a></td><td><a href="ft2-base_interface.html#FT_Slot_Internal">FT_Slot_Internal</a></td><td><a href="ft2-truetype_tables.html#TT_ISO_ID_XXX">TT_ISO_ID_8859_1</a></td></tr>
<tr><td><a href="ft2-type1_tables.html#FT_Has_PS_Glyph_Names">FT_Has_PS_Glyph_Names</a></td><td><a href="ft2-raster.html#FT_Span">FT_Span</a></td><td><a href="ft2-truetype_tables.html#TT_ISO_ID_XXX">TT_ISO_ID_XXX</a></td></tr>
<tr><td><a href="ft2-properties.html#FT_HINTING_XXX">FT_HINTING_ADOBE</a></td><td><a href="ft2-raster.html#FT_SpanFunc">FT_SpanFunc</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_XXX</a></td></tr>
<tr><td><a href="ft2-properties.html#FT_HINTING_XXX">FT_HINTING_FREETYPE</a></td><td><a href="ft2-glyph_stroker.html#FT_StrokerBorder">FT_STROKER_BORDER_LEFT</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_LANGID_XXX">TT_MAC_LANGID_XXX</a></td></tr>
<tr><td><a href="ft2-properties.html#FT_HINTING_XXX">FT_HINTING_XXX</a></td><td><a href="ft2-glyph_stroker.html#FT_StrokerBorder">FT_STROKER_BORDER_RIGHT</a></td><td><a href="ft2-truetype_tables.html#TT_MaxProfile">TT_MaxProfile</a></td></tr>
<tr><td><a href="ft2-header_file_macros.html#FT_IMAGE_H">FT_IMAGE_H</a></td><td><a href="ft2-header_file_macros.html#FT_STROKER_H">FT_STROKER_H</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_BIG_5</a></td></tr>
<tr><td><a href="ft2-basic_types.html#FT_IMAGE_TAG">FT_IMAGE_TAG</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineCap">FT_STROKER_LINECAP_BUTT</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_JOHAB</a></td></tr>
<tr><td><a href="ft2-header_file_macros.html#FT_INCREMENTAL_H">FT_INCREMENTAL_H</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineCap">FT_STROKER_LINECAP_ROUND</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_PRC</a></td></tr>
<tr><td><a href="ft2-incremental.html#FT_Incremental">FT_Incremental</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineCap">FT_STROKER_LINECAP_SQUARE</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_SJIS</a></td></tr>
<tr><td><a href="ft2-incremental.html#FT_Incremental_FreeGlyphDataFunc">FT_Incremental_FreeGlyphDataFunc</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_STROKER_LINEJOIN_BEVEL</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_SYMBOL_CS</a></td></tr>
<tr><td><a href="ft2-incremental.html#FT_Incremental_FuncsRec">FT_Incremental_FuncsRec</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_STROKER_LINEJOIN_MITER</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_UCS_4</a></td></tr>
<tr><td><a href="ft2-incremental.html#FT_Incremental_GetGlyphDataFunc">FT_Incremental_GetGlyphDataFunc</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_STROKER_LINEJOIN_MITER_FIXED</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_UNICODE_CS</a></td></tr>
<tr><td><a href="ft2-incremental.html#FT_Incremental_GetGlyphMetricsFunc">FT_Incremental_GetGlyphMetricsFunc</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_STROKER_LINEJOIN_MITER_VARIABLE</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_WANSUNG</a></td></tr>
<tr><td><a href="ft2-incremental.html#FT_Incremental_Interface">FT_Incremental_Interface</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_STROKER_LINEJOIN_ROUND</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_XXX</a></td></tr>
<tr><td><a href="ft2-incremental.html#FT_Incremental_InterfaceRec">FT_Incremental_InterfaceRec</a></td><td><a href="ft2-base_interface.html#FT_STYLE_FLAG_XXX">FT_STYLE_FLAG_BOLD</a></td><td><a href="ft2-truetype_tables.html#TT_MS_LANGID_XXX">TT_MS_LANGID_XXX</a></td></tr>
<tr><td><a href="ft2-incremental.html#FT_Incremental_Metrics">FT_Incremental_Metrics</a></td><td><a href="ft2-base_interface.html#FT_STYLE_FLAG_XXX">FT_STYLE_FLAG_ITALIC</a></td><td><a href="ft2-truetype_tables.html#TT_NAME_ID_XXX">TT_NAME_ID_XXX</a></td></tr>
<tr><td><a href="ft2-incremental.html#FT_Incremental_MetricsRec">FT_Incremental_MetricsRec</a></td><td><a href="ft2-base_interface.html#FT_STYLE_FLAG_XXX">FT_STYLE_FLAG_XXX</a></td><td><a href="ft2-truetype_tables.html#TT_OS2">TT_OS2</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_Init_FreeType">FT_Init_FreeType</a></td><td><a href="ft2-system_interface.html#FT_Stream">FT_Stream</a></td><td><a href="ft2-truetype_tables.html#TT_PCLT">TT_PCLT</a></td></tr>
<tr><td><a href="ft2-basic_types.html#FT_Int">FT_Int</a></td><td><a href="ft2-system_interface.html#FT_Stream_CloseFunc">FT_Stream_CloseFunc</a></td><td><a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_ADOBE</a></td></tr>
<tr><td><a href="ft2-basic_types.html#FT_Int16">FT_Int16</a></td><td><a href="ft2-system_interface.html#FT_Stream_IoFunc">FT_Stream_IoFunc</a></td><td><a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_APPLE_UNICODE</a></td></tr>
<tr><td><a href="ft2-basic_types.html#FT_Int32">FT_Int32</a></td><td><a href="ft2-bzip2.html#FT_Stream_OpenBzip2">FT_Stream_OpenBzip2</a></td><td><a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_CUSTOM</a></td></tr>
<tr><td><a href="ft2-basic_types.html#FT_Int64">FT_Int64</a></td><td><a href="ft2-gzip.html#FT_Stream_OpenGzip">FT_Stream_OpenGzip</a></td><td><a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_ISO</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_IS_CID_KEYED">FT_IS_CID_KEYED</a></td><td><a href="ft2-lzw.html#FT_Stream_OpenLZW">FT_Stream_OpenLZW</a></td><td><a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_MACINTOSH</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_IS_FIXED_WIDTH">FT_IS_FIXED_WIDTH</a></td><td><a href="ft2-system_interface.html#FT_StreamDesc">FT_StreamDesc</a></td><td><a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_MICROSOFT</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_IS_NAMED_INSTANCE">FT_IS_NAMED_INSTANCE</a></td><td><a href="ft2-system_interface.html#FT_StreamRec">FT_StreamRec</a></td><td><a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_XXX</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_IS_SCALABLE">FT_IS_SCALABLE</a></td><td><a href="ft2-basic_types.html#FT_String">FT_String</a></td><td><a href="ft2-truetype_tables.html#TT_Postscript">TT_Postscript</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_IS_SFNT">FT_IS_SFNT</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker">FT_Stroker</a></td><td><a href="ft2-truetype_tables.html#TT_UCR_XXX">TT_UCR_XXX</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_IS_TRICKY">FT_IS_TRICKY</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_BeginSubPath">FT_Stroker_BeginSubPath</a></td><td><a href="ft2-truetype_tables.html#TT_VertHeader">TT_VertHeader</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_IS_VARIATION">FT_IS_VARIATION</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_ConicTo">FT_Stroker_ConicTo</a></td><td><a href="ft2-properties.html#warping">warping</a></td></tr>
<tr><td><a href="ft2-base_interface.html#FT_Kerning_Mode">FT_KERNING_DEFAULT</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_CubicTo">FT_Stroker_CubicTo</a></td><td></td></tr>
</table>
<hr>
<table class="index-toc-link"><tr><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>

<div class="timestamp">generated on Tue May  1 23:34:43 2018</div></body>
</html>
reference/ft2-lcd_filtering.html000064400000040767151706766400012720 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF;
         width: 87%;
         margin: auto; }

  div.section { width: 75%;
                margin: auto; }
  div.section hr { margin: 4ex 0 1ex 0; }
  div.section h4 { background-color: #EEEEFF;
                   font-size: medium;
                   font-style: oblique;
                   font-weight: bold;
                   margin: 3ex 0 1.5ex 9%;
                   padding: 0.3ex 0 0.3ex 1%; }
  div.section p { margin: 1.5ex 0 1.5ex 10%; }
  div.section pre { margin: 3ex 0 3ex 9%;
                    background-color: #D6E8FF;
                    padding: 2ex 0 2ex 1%; }
  div.section table.fields { width: 90%;
                             margin: 1.5ex 0 1.5ex 10%; }
  div.section table.toc { width: 95%;
                          margin: 1.5ex 0 1.5ex 5%; }
  div.timestamp { text-align: center;
                  font-size: 69%;
                  margin: 1.5ex 0 1.5ex 0; }

  h1 { text-align: center; }
  h3 { font-size: medium;
       margin: 4ex 0 1.5ex 0; }

  p { text-align: justify; }

  pre.colored { color: blue; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  table.fields td.val { font-weight: bold;
                        text-align: right;
                        width: 30%;
                        vertical-align: baseline;
                        padding: 1ex 1em 1ex 0; }
  table.fields td.desc { vertical-align: baseline;
                         padding: 1ex 0 1ex 1em; }
  table.fields td.desc p:first-child { margin: 0; }
  table.fields td.desc p { margin: 1.5ex 0 0 0; }
  table.index { margin: 6ex auto 6ex auto;
                border: 0;
                border-collapse: separate;
                border-spacing: 1em 0.3ex; }
  table.index tr { padding: 0; }
  table.index td { padding: 0; }
  table.index-toc-link { width: 100%;
                         border: 0;
                         border-spacing: 0;
                         margin: 1ex 0 1ex 0; }
  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
                                 font-size: 83%;
                                 text-align: left; }
  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
                                   font-size: 83%;
                                   text-align: center; }
  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
                                  font-size: 83%;
                                  text-align: right; }
  table.synopsis { margin: 6ex auto 6ex auto;
                   border: 0;
                   border-collapse: separate;
                   border-spacing: 2em 0.6ex; }
  table.synopsis tr { padding: 0; }
  table.synopsis td { padding: 0; }
  table.toc td.link { width: 30%;
                      text-align: right;
                      vertical-align: baseline;
                      padding: 1ex 1em 1ex 0; }
  table.toc td.desc { vertical-align: baseline;
                      padding: 1ex 0 1ex 1em;
                      text-align: left; }
  table.toc td.desc p:first-child { margin: 0;
                                    text-align: left; }
  table.toc td.desc p { margin: 1.5ex 0 0 0;
                        text-align: left; }

</style>
</head>
<body>

<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
<h1>FreeType-2.9.1 API Reference</h1>

<h1 id="lcd_filtering">LCD Filtering</h1>
<h2>Synopsis</h2>
<table class="synopsis">
<tr><td><a href="#FT_LcdFilter">FT_LcdFilter</a></td><td><a href="#FT_Library_SetLcdFilterWeights">FT_Library_SetLcdFilterWeights</a></td></tr>
<tr><td><a href="#FT_Library_SetLcdFilter">FT_Library_SetLcdFilter</a></td><td></td></tr>
</table>


<p>Should you #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING in your &lsquo;ftoption.h&rsquo;, which enables patented ClearType-style rendering, the LCD-optimized glyph bitmaps should be filtered to reduce color fringes inherent to this technology. The default FreeType LCD rendering uses different technology, and API described below, although available, does nothing.</p>
<p>ClearType-style LCD rendering exploits the color-striped structure of LCD pixels, increasing the available resolution in the direction of the stripe (usually horizontal RGB) by a factor of&nbsp;3. Since these subpixels are color pixels, using them unfiltered creates severe color fringes. Use the <a href="ft2-lcd_filtering.html#FT_Library_SetLcdFilter">FT_Library_SetLcdFilter</a> API to specify a low-pass filter, which is then applied to subpixel-rendered bitmaps generated through <a href="ft2-base_interface.html#FT_Render_Glyph">FT_Render_Glyph</a>. The filter sacrifices some of the higher resolution to reduce color fringes, making the glyph image slightly blurrier. Positional improvements will remain.</p>
<p>A filter should have two properties:</p>
<p>1) It should be normalized, meaning the sum of the 5&nbsp;components should be 256 (0x100). It is possible to go above or under this target sum, however: going under means tossing out contrast, going over means invoking clamping and thereby non-linearities that increase contrast somewhat at the expense of greater distortion and color-fringing. Contrast is better enhanced through stem darkening.</p>
<p>2) It should be color-balanced, meaning a filter &lsquo;{&nbsp;a, b, c, b, a&nbsp;}&rsquo; where a&nbsp;+ b&nbsp;=&nbsp;c. It distributes the computed coverage for one subpixel to all subpixels equally, sacrificing some won resolution but drastically reducing color-fringing. Positioning improvements remain! Note that color-fringing can only really be minimized when using a color-balanced filter and alpha-blending the glyph onto a surface in linear space; see <a href="ft2-base_interface.html#FT_Render_Glyph">FT_Render_Glyph</a>.</p>
<p>Regarding the form, a filter can be a &lsquo;boxy&rsquo; filter or a &lsquo;beveled&rsquo; filter. Boxy filters are sharper but are less forgiving of non-ideal gamma curves of a screen (viewing angles!), beveled filters are fuzzier but more tolerant.</p>
<p>Examples:</p>
<p>- [0x10 0x40 0x70 0x40 0x10] is beveled and neither balanced nor normalized.</p>
<p>- [0x1A 0x33 0x4D 0x33 0x1A] is beveled and balanced but not normalized.</p>
<p>- [0x19 0x33 0x66 0x4c 0x19] is beveled and normalized but not balanced.</p>
<p>- [0x00 0x4c 0x66 0x4c 0x00] is boxily beveled and normalized but not balanced.</p>
<p>- [0x00 0x55 0x56 0x55 0x00] is boxy, normalized, and almost balanced.</p>
<p>- [0x08 0x4D 0x56 0x4D 0x08] is beveled, normalized and, almost balanced.</p>
<p>The filter affects glyph bitmaps rendered through <a href="ft2-base_interface.html#FT_Render_Glyph">FT_Render_Glyph</a>, <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a>, and <a href="ft2-base_interface.html#FT_Load_Char">FT_Load_Char</a>. It does <i>not</i> affect the output of <a href="ft2-outline_processing.html#FT_Outline_Render">FT_Outline_Render</a> and <a href="ft2-outline_processing.html#FT_Outline_Get_Bitmap">FT_Outline_Get_Bitmap</a>.</p>
<p>If this feature is activated, the dimensions of LCD glyph bitmaps are either wider or taller than the dimensions of the corresponding outline with regard to the pixel grid. For example, for <a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_LCD</a>, the filter adds 3&nbsp;subpixels to the left, and 3&nbsp;subpixels to the right. The bitmap offset values are adjusted accordingly, so clients shouldn't need to modify their layout and glyph positioning code when enabling the filter.</p>
<p>It is important to understand that linear alpha blending and gamma correction is critical for correctly rendering glyphs onto surfaces without artifacts and even more critical when subpixel rendering is involved.</p>
<p>Each of the 3&nbsp;alpha values (subpixels) is independently used to blend one color channel. That is, red alpha blends the red channel of the text color with the red channel of the background pixel. The distribution of density values by the color-balanced filter assumes alpha blending is done in linear space; only then color artifacts cancel out.</p>

<div class="section">
<h3 id="FT_LcdFilter">FT_LcdFilter</h3>
<p>Defined in FT_LCD_FILTER_H (freetype/ftlcdfil.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">enum</span>  FT_LcdFilter_
  {
    <a href="ft2-lcd_filtering.html#FT_LCD_FILTER_NONE">FT_LCD_FILTER_NONE</a>    = 0,
    <a href="ft2-lcd_filtering.html#FT_LCD_FILTER_DEFAULT">FT_LCD_FILTER_DEFAULT</a> = 1,
    <a href="ft2-lcd_filtering.html#FT_LCD_FILTER_LIGHT">FT_LCD_FILTER_LIGHT</a>   = 2,
    <a href="ft2-lcd_filtering.html#FT_LCD_FILTER_LEGACY1">FT_LCD_FILTER_LEGACY1</a> = 3,
    <a href="ft2-lcd_filtering.html#FT_LCD_FILTER_LEGACY">FT_LCD_FILTER_LEGACY</a>  = 16,

    FT_LCD_FILTER_MAX   /* do not remove */

  } <b>FT_LcdFilter</b>;
</pre>

<p>A list of values to identify various types of LCD filters.</p>

<h4>values</h4>
<table class="fields">
<tr><td class="val" id="FT_LCD_FILTER_NONE">FT_LCD_FILTER_NONE</td><td class="desc">
<p>Do not perform filtering. When used with subpixel rendering, this results in sometimes severe color fringes.</p>
</td></tr>
<tr><td class="val" id="FT_LCD_FILTER_DEFAULT">FT_LCD_FILTER_DEFAULT</td><td class="desc">
<p>The default filter reduces color fringes considerably, at the cost of a slight blurriness in the output.</p>
<p>It is a beveled, normalized, and color-balanced five-tap filter that is more forgiving to screens with non-ideal gamma curves and viewing angles. Note that while color-fringing is reduced, it can only be minimized by using linear alpha blending and gamma correction to render glyphs onto surfaces. The default filter weights are [0x08 0x4D 0x56 0x4D 0x08].</p>
</td></tr>
<tr><td class="val" id="FT_LCD_FILTER_LIGHT">FT_LCD_FILTER_LIGHT</td><td class="desc">
<p>The light filter is a variant that is sharper at the cost of slightly more color fringes than the default one.</p>
<p>It is a boxy, normalized, and color-balanced three-tap filter that is less forgiving to screens with non-ideal gamma curves and viewing angles. This filter works best when the rendering system uses linear alpha blending and gamma correction to render glyphs onto surfaces. The light filter weights are [0x00 0x55 0x56 0x55 0x00].</p>
</td></tr>
<tr><td class="val" id="FT_LCD_FILTER_LEGACY">FT_LCD_FILTER_LEGACY</td><td class="desc">
<p>This filter corresponds to the original libXft color filter. It provides high contrast output but can exhibit really bad color fringes if glyphs are not extremely well hinted to the pixel grid. In other words, it only works well if the TrueType bytecode interpreter is enabled <b>and</b> high-quality hinted fonts are used.</p>
<p>This filter is only provided for comparison purposes, and might be disabled or stay unsupported in the future.</p>
</td></tr>
<tr><td class="val" id="FT_LCD_FILTER_LEGACY1">FT_LCD_FILTER_LEGACY1</td><td class="desc">
<p>For historical reasons, the FontConfig library returns a different enumeration value for legacy LCD filtering. To make code work that (incorrectly) forwards FontConfig's enumeration value to <a href="ft2-lcd_filtering.html#FT_Library_SetLcdFilter">FT_Library_SetLcdFilter</a> without proper mapping, it is thus easiest to have another enumeration value, which is completely equal to &lsquo;FT_LCD_FILTER_LEGACY&rsquo;.</p>
</td></tr>
</table>

<h4>since</h4>
<p>2.3.0 (&lsquo;FT_LCD_FILTER_LEGACY1&rsquo; since 2.6.2)</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Library_SetLcdFilter">FT_Library_SetLcdFilter</h3>
<p>Defined in FT_LCD_FILTER_H (freetype/ftlcdfil.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Library_SetLcdFilter</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a>    library,
                           <a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LcdFilter</a>  filter );
</pre>

<p>This function is used to apply color filtering to LCD decimated bitmaps, like the ones used when calling <a href="ft2-base_interface.html#FT_Render_Glyph">FT_Render_Glyph</a> with <a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_LCD</a> or <a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_LCD_V</a>.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to the target library instance.</p>
</td></tr>
<tr><td class="val" id="filter">filter</td><td class="desc">
<p>The filter type.</p>
<p>You can use <a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LCD_FILTER_NONE</a> here to disable this feature, or <a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LCD_FILTER_DEFAULT</a> to use a default filter that should work well on most LCD screens.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>This feature is always disabled by default. Clients must make an explicit call to this function with a &lsquo;filter&rsquo; value other than <a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LCD_FILTER_NONE</a> in order to enable it.</p>
<p>Due to <b>PATENTS</b> covering subpixel rendering, this function doesn't do anything except returning &lsquo;FT_Err_Unimplemented_Feature&rsquo; if the configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING is not defined in your build of the library, which should correspond to all default builds of FreeType.</p>

<h4>since</h4>
<p>2.3.0</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Library_SetLcdFilterWeights">FT_Library_SetLcdFilterWeights</h3>
<p>Defined in FT_LCD_FILTER_H (freetype/ftlcdfil.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Library_SetLcdFilterWeights</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a>      library,
                                  <span class="keyword">unsigned</span> <span class="keyword">char</span>  *weights );


  /*
   * @type:
   *   FT_LcdFiveTapFilter
   *
   * @description:
   *   A <span class="keyword">typedef</span> for passing the five LCD filter weights to
   *   @<a href="ft2-base_interface.html#FT_Face_Properties">FT_Face_Properties</a> within an @<a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> structure.
   *
   * @since:
   *   2.8
   *
   */
#define FT_LCD_FILTER_FIVE_TAPS  5

  <span class="keyword">typedef</span> <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>  FT_LcdFiveTapFilter[FT_LCD_FILTER_FIVE_TAPS];
</pre>

<p>This function can be used to enable LCD filter with custom weights, instead of using presets in <a href="ft2-lcd_filtering.html#FT_Library_SetLcdFilter">FT_Library_SetLcdFilter</a>.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to the target library instance.</p>
</td></tr>
<tr><td class="val" id="weights">weights</td><td class="desc">
<p>A pointer to an array; the function copies the first five bytes and uses them to specify the filter weights.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>Due to <b>PATENTS</b> covering subpixel rendering, this function doesn't do anything except returning &lsquo;FT_Err_Unimplemented_Feature&rsquo; if the configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING is not defined in your build of the library, which should correspond to all default builds of FreeType.</p>
<p>LCD filter weights can also be set per face using <a href="ft2-base_interface.html#FT_Face_Properties">FT_Face_Properties</a> with <a href="ft2-parameter_tags.html#FT_PARAM_TAG_LCD_FILTER_WEIGHTS">FT_PARAM_TAG_LCD_FILTER_WEIGHTS</a>.</p>

<h4>since</h4>
<p>2.4.0</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

</body>
</html>
reference/ft2-list_processing.html000064400000044014151706766400013307 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF;
         width: 87%;
         margin: auto; }

  div.section { width: 75%;
                margin: auto; }
  div.section hr { margin: 4ex 0 1ex 0; }
  div.section h4 { background-color: #EEEEFF;
                   font-size: medium;
                   font-style: oblique;
                   font-weight: bold;
                   margin: 3ex 0 1.5ex 9%;
                   padding: 0.3ex 0 0.3ex 1%; }
  div.section p { margin: 1.5ex 0 1.5ex 10%; }
  div.section pre { margin: 3ex 0 3ex 9%;
                    background-color: #D6E8FF;
                    padding: 2ex 0 2ex 1%; }
  div.section table.fields { width: 90%;
                             margin: 1.5ex 0 1.5ex 10%; }
  div.section table.toc { width: 95%;
                          margin: 1.5ex 0 1.5ex 5%; }
  div.timestamp { text-align: center;
                  font-size: 69%;
                  margin: 1.5ex 0 1.5ex 0; }

  h1 { text-align: center; }
  h3 { font-size: medium;
       margin: 4ex 0 1.5ex 0; }

  p { text-align: justify; }

  pre.colored { color: blue; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  table.fields td.val { font-weight: bold;
                        text-align: right;
                        width: 30%;
                        vertical-align: baseline;
                        padding: 1ex 1em 1ex 0; }
  table.fields td.desc { vertical-align: baseline;
                         padding: 1ex 0 1ex 1em; }
  table.fields td.desc p:first-child { margin: 0; }
  table.fields td.desc p { margin: 1.5ex 0 0 0; }
  table.index { margin: 6ex auto 6ex auto;
                border: 0;
                border-collapse: separate;
                border-spacing: 1em 0.3ex; }
  table.index tr { padding: 0; }
  table.index td { padding: 0; }
  table.index-toc-link { width: 100%;
                         border: 0;
                         border-spacing: 0;
                         margin: 1ex 0 1ex 0; }
  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
                                 font-size: 83%;
                                 text-align: left; }
  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
                                   font-size: 83%;
                                   text-align: center; }
  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
                                  font-size: 83%;
                                  text-align: right; }
  table.synopsis { margin: 6ex auto 6ex auto;
                   border: 0;
                   border-collapse: separate;
                   border-spacing: 2em 0.6ex; }
  table.synopsis tr { padding: 0; }
  table.synopsis td { padding: 0; }
  table.toc td.link { width: 30%;
                      text-align: right;
                      vertical-align: baseline;
                      padding: 1ex 1em 1ex 0; }
  table.toc td.desc { vertical-align: baseline;
                      padding: 1ex 0 1ex 1em;
                      text-align: left; }
  table.toc td.desc p:first-child { margin: 0;
                                    text-align: left; }
  table.toc td.desc p { margin: 1.5ex 0 0 0;
                        text-align: left; }

</style>
</head>
<body>

<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
<h1>FreeType-2.9.1 API Reference</h1>

<h1 id="list_processing">List Processing</h1>
<h2>Synopsis</h2>
<table class="synopsis">
<tr><td><a href="#FT_List">FT_List</a></td><td><a href="#FT_List_Add">FT_List_Add</a></td><td><a href="#FT_List_Iterate">FT_List_Iterate</a></td></tr>
<tr><td><a href="#FT_ListNode">FT_ListNode</a></td><td><a href="#FT_List_Insert">FT_List_Insert</a></td><td><a href="#FT_List_Iterator">FT_List_Iterator</a></td></tr>
<tr><td><a href="#FT_ListRec">FT_ListRec</a></td><td><a href="#FT_List_Find">FT_List_Find</a></td><td><a href="#FT_List_Finalize">FT_List_Finalize</a></td></tr>
<tr><td><a href="#FT_ListNodeRec">FT_ListNodeRec</a></td><td><a href="#FT_List_Remove">FT_List_Remove</a></td><td><a href="#FT_List_Destructor">FT_List_Destructor</a></td></tr>
<tr><td>&nbsp;</td><td><a href="#FT_List_Up">FT_List_Up</a></td><td></td></tr>
</table>


<p>This section contains various definitions related to list processing using doubly-linked nodes.</p>

<div class="section">
<h3 id="FT_List">FT_List</h3>
<p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_ListRec_*  <b>FT_List</b>;
</pre>

<p>A handle to a list record (see <a href="ft2-list_processing.html#FT_ListRec">FT_ListRec</a>).</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_ListNode">FT_ListNode</h3>
<p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_ListNodeRec_*  <b>FT_ListNode</b>;
</pre>

<p>Many elements and objects in FreeType are listed through an <a href="ft2-list_processing.html#FT_List">FT_List</a> record (see <a href="ft2-list_processing.html#FT_ListRec">FT_ListRec</a>). As its name suggests, an FT_ListNode is a handle to a single list element.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_ListRec">FT_ListRec</h3>
<p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_ListRec_
  {
    <a href="ft2-list_processing.html#FT_ListNode">FT_ListNode</a>  head;
    <a href="ft2-list_processing.html#FT_ListNode">FT_ListNode</a>  tail;

  } <b>FT_ListRec</b>;
</pre>

<p>A structure used to hold a simple doubly-linked list. These are used in many parts of FreeType.</p>

<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="head">head</td><td class="desc">
<p>The head (first element) of doubly-linked list.</p>
</td></tr>
<tr><td class="val" id="tail">tail</td><td class="desc">
<p>The tail (last element) of doubly-linked list.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_ListNodeRec">FT_ListNodeRec</h3>
<p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_ListNodeRec_
  {
    <a href="ft2-list_processing.html#FT_ListNode">FT_ListNode</a>  prev;
    <a href="ft2-list_processing.html#FT_ListNode">FT_ListNode</a>  next;
    <span class="keyword">void</span>*        data;

  } <b>FT_ListNodeRec</b>;
</pre>

<p>A structure used to hold a single list element.</p>

<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="prev">prev</td><td class="desc">
<p>The previous element in the list. NULL if first.</p>
</td></tr>
<tr><td class="val" id="next">next</td><td class="desc">
<p>The next element in the list. NULL if last.</p>
</td></tr>
<tr><td class="val" id="data">data</td><td class="desc">
<p>A typeless pointer to the listed object.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_List_Add">FT_List_Add</h3>
<p>Defined in FT_LIST_H (freetype/ftlist.h).</p>
<pre>
  FT_EXPORT( <span class="keyword">void</span> )
  <b>FT_List_Add</b>( <a href="ft2-list_processing.html#FT_List">FT_List</a>      list,
               <a href="ft2-list_processing.html#FT_ListNode">FT_ListNode</a>  node );
</pre>

<p>Append an element to the end of a list.</p>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="list">list</td><td class="desc">
<p>A pointer to the parent list.</p>
</td></tr>
<tr><td class="val" id="node">node</td><td class="desc">
<p>The node to append.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_List_Insert">FT_List_Insert</h3>
<p>Defined in FT_LIST_H (freetype/ftlist.h).</p>
<pre>
  FT_EXPORT( <span class="keyword">void</span> )
  <b>FT_List_Insert</b>( <a href="ft2-list_processing.html#FT_List">FT_List</a>      list,
                  <a href="ft2-list_processing.html#FT_ListNode">FT_ListNode</a>  node );
</pre>

<p>Insert an element at the head of a list.</p>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="list">list</td><td class="desc">
<p>A pointer to parent list.</p>
</td></tr>
<tr><td class="val" id="node">node</td><td class="desc">
<p>The node to insert.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_List_Find">FT_List_Find</h3>
<p>Defined in FT_LIST_H (freetype/ftlist.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-list_processing.html#FT_ListNode">FT_ListNode</a> )
  <b>FT_List_Find</b>( <a href="ft2-list_processing.html#FT_List">FT_List</a>  list,
                <span class="keyword">void</span>*    data );
</pre>

<p>Find the list node for a given listed object.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="list">list</td><td class="desc">
<p>A pointer to the parent list.</p>
</td></tr>
<tr><td class="val" id="data">data</td><td class="desc">
<p>The address of the listed object.</p>
</td></tr>
</table>

<h4>return</h4>
<p>List node. NULL if it wasn't found.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_List_Remove">FT_List_Remove</h3>
<p>Defined in FT_LIST_H (freetype/ftlist.h).</p>
<pre>
  FT_EXPORT( <span class="keyword">void</span> )
  <b>FT_List_Remove</b>( <a href="ft2-list_processing.html#FT_List">FT_List</a>      list,
                  <a href="ft2-list_processing.html#FT_ListNode">FT_ListNode</a>  node );
</pre>

<p>Remove a node from a list. This function doesn't check whether the node is in the list!</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="node">node</td><td class="desc">
<p>The node to remove.</p>
</td></tr>
</table>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="list">list</td><td class="desc">
<p>A pointer to the parent list.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_List_Up">FT_List_Up</h3>
<p>Defined in FT_LIST_H (freetype/ftlist.h).</p>
<pre>
  FT_EXPORT( <span class="keyword">void</span> )
  <b>FT_List_Up</b>( <a href="ft2-list_processing.html#FT_List">FT_List</a>      list,
              <a href="ft2-list_processing.html#FT_ListNode">FT_ListNode</a>  node );
</pre>

<p>Move a node to the head/top of a list. Used to maintain LRU lists.</p>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="list">list</td><td class="desc">
<p>A pointer to the parent list.</p>
</td></tr>
<tr><td class="val" id="node">node</td><td class="desc">
<p>The node to move.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_List_Iterate">FT_List_Iterate</h3>
<p>Defined in FT_LIST_H (freetype/ftlist.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_List_Iterate</b>( <a href="ft2-list_processing.html#FT_List">FT_List</a>           list,
                   <a href="ft2-list_processing.html#FT_List_Iterator">FT_List_Iterator</a>  iterator,
                   <span class="keyword">void</span>*             user );
</pre>

<p>Parse a list and calls a given iterator function on each element. Note that parsing is stopped as soon as one of the iterator calls returns a non-zero value.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="list">list</td><td class="desc">
<p>A handle to the list.</p>
</td></tr>
<tr><td class="val" id="iterator">iterator</td><td class="desc">
<p>An iterator function, called on each node of the list.</p>
</td></tr>
<tr><td class="val" id="user">user</td><td class="desc">
<p>A user-supplied field that is passed as the second argument to the iterator.</p>
</td></tr>
</table>

<h4>return</h4>
<p>The result (a FreeType error code) of the last iterator call.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_List_Iterator">FT_List_Iterator</h3>
<p>Defined in FT_LIST_H (freetype/ftlist.h).</p>
<pre>
  <span class="keyword">typedef</span> <a href="ft2-basic_types.html#FT_Error">FT_Error</a>
  (*<b>FT_List_Iterator</b>)( <a href="ft2-list_processing.html#FT_ListNode">FT_ListNode</a>  node,
                       <span class="keyword">void</span>*        user );
</pre>

<p>An FT_List iterator function that is called during a list parse by <a href="ft2-list_processing.html#FT_List_Iterate">FT_List_Iterate</a>.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="node">node</td><td class="desc">
<p>The current iteration list node.</p>
</td></tr>
<tr><td class="val" id="user">user</td><td class="desc">
<p>A typeless pointer passed to <a href="ft2-list_processing.html#FT_List_Iterate">FT_List_Iterate</a>. Can be used to point to the iteration's state.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_List_Finalize">FT_List_Finalize</h3>
<p>Defined in FT_LIST_H (freetype/ftlist.h).</p>
<pre>
  FT_EXPORT( <span class="keyword">void</span> )
  <b>FT_List_Finalize</b>( <a href="ft2-list_processing.html#FT_List">FT_List</a>             list,
                    <a href="ft2-list_processing.html#FT_List_Destructor">FT_List_Destructor</a>  destroy,
                    <a href="ft2-system_interface.html#FT_Memory">FT_Memory</a>           memory,
                    <span class="keyword">void</span>*               user );
</pre>

<p>Destroy all elements in the list as well as the list itself.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="list">list</td><td class="desc">
<p>A handle to the list.</p>
</td></tr>
<tr><td class="val" id="destroy">destroy</td><td class="desc">
<p>A list destructor that will be applied to each element of the list. Set this to NULL if not needed.</p>
</td></tr>
<tr><td class="val" id="memory">memory</td><td class="desc">
<p>The current memory object that handles deallocation.</p>
</td></tr>
<tr><td class="val" id="user">user</td><td class="desc">
<p>A user-supplied field that is passed as the last argument to the destructor.</p>
</td></tr>
</table>

<h4>note</h4>
<p>This function expects that all nodes added by <a href="ft2-list_processing.html#FT_List_Add">FT_List_Add</a> or <a href="ft2-list_processing.html#FT_List_Insert">FT_List_Insert</a> have been dynamically allocated.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_List_Destructor">FT_List_Destructor</h3>
<p>Defined in FT_LIST_H (freetype/ftlist.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">void</span>
  (*<b>FT_List_Destructor</b>)( <a href="ft2-system_interface.html#FT_Memory">FT_Memory</a>  memory,
                         <span class="keyword">void</span>*      data,
                         <span class="keyword">void</span>*      user );
</pre>

<p>An <a href="ft2-list_processing.html#FT_List">FT_List</a> iterator function that is called during a list finalization by <a href="ft2-list_processing.html#FT_List_Finalize">FT_List_Finalize</a> to destroy all elements in a given list.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="system">system</td><td class="desc">
<p>The current system object.</p>
</td></tr>
<tr><td class="val" id="data">data</td><td class="desc">
<p>The current object to destroy.</p>
</td></tr>
<tr><td class="val" id="user">user</td><td class="desc">
<p>A typeless pointer passed to <a href="ft2-list_processing.html#FT_List_Iterate">FT_List_Iterate</a>. It can be used to point to the iteration's state.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

</body>
</html>
reference/ft2-lzw.html000064400000014201151706766400010707 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF;
         width: 87%;
         margin: auto; }

  div.section { width: 75%;
                margin: auto; }
  div.section hr { margin: 4ex 0 1ex 0; }
  div.section h4 { background-color: #EEEEFF;
                   font-size: medium;
                   font-style: oblique;
                   font-weight: bold;
                   margin: 3ex 0 1.5ex 9%;
                   padding: 0.3ex 0 0.3ex 1%; }
  div.section p { margin: 1.5ex 0 1.5ex 10%; }
  div.section pre { margin: 3ex 0 3ex 9%;
                    background-color: #D6E8FF;
                    padding: 2ex 0 2ex 1%; }
  div.section table.fields { width: 90%;
                             margin: 1.5ex 0 1.5ex 10%; }
  div.section table.toc { width: 95%;
                          margin: 1.5ex 0 1.5ex 5%; }
  div.timestamp { text-align: center;
                  font-size: 69%;
                  margin: 1.5ex 0 1.5ex 0; }

  h1 { text-align: center; }
  h3 { font-size: medium;
       margin: 4ex 0 1.5ex 0; }

  p { text-align: justify; }

  pre.colored { color: blue; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  table.fields td.val { font-weight: bold;
                        text-align: right;
                        width: 30%;
                        vertical-align: baseline;
                        padding: 1ex 1em 1ex 0; }
  table.fields td.desc { vertical-align: baseline;
                         padding: 1ex 0 1ex 1em; }
  table.fields td.desc p:first-child { margin: 0; }
  table.fields td.desc p { margin: 1.5ex 0 0 0; }
  table.index { margin: 6ex auto 6ex auto;
                border: 0;
                border-collapse: separate;
                border-spacing: 1em 0.3ex; }
  table.index tr { padding: 0; }
  table.index td { padding: 0; }
  table.index-toc-link { width: 100%;
                         border: 0;
                         border-spacing: 0;
                         margin: 1ex 0 1ex 0; }
  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
                                 font-size: 83%;
                                 text-align: left; }
  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
                                   font-size: 83%;
                                   text-align: center; }
  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
                                  font-size: 83%;
                                  text-align: right; }
  table.synopsis { margin: 6ex auto 6ex auto;
                   border: 0;
                   border-collapse: separate;
                   border-spacing: 2em 0.6ex; }
  table.synopsis tr { padding: 0; }
  table.synopsis td { padding: 0; }
  table.toc td.link { width: 30%;
                      text-align: right;
                      vertical-align: baseline;
                      padding: 1ex 1em 1ex 0; }
  table.toc td.desc { vertical-align: baseline;
                      padding: 1ex 0 1ex 1em;
                      text-align: left; }
  table.toc td.desc p:first-child { margin: 0;
                                    text-align: left; }
  table.toc td.desc p { margin: 1.5ex 0 0 0;
                        text-align: left; }

</style>
</head>
<body>

<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
<h1>FreeType-2.9.1 API Reference</h1>

<h1 id="lzw">LZW Streams</h1>
<h2>Synopsis</h2>
<table class="synopsis">
<tr><td><a href="#FT_Stream_OpenLZW">FT_Stream_OpenLZW</a></td><td></td><td></td><td></td></tr>
</table>


<p>This section contains the declaration of LZW-specific functions.</p>

<div class="section">
<h3 id="FT_Stream_OpenLZW">FT_Stream_OpenLZW</h3>
<p>Defined in FT_LZW_H (freetype/ftlzw.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Stream_OpenLZW</b>( <a href="ft2-system_interface.html#FT_Stream">FT_Stream</a>  stream,
                     <a href="ft2-system_interface.html#FT_Stream">FT_Stream</a>  source );
</pre>

<p>Open a new stream to parse LZW-compressed font files. This is mainly used to support the compressed &lsquo;*.pcf.Z&rsquo; fonts that come with XFree86.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="stream">stream</td><td class="desc">
<p>The target embedding stream.</p>
</td></tr>
<tr><td class="val" id="source">source</td><td class="desc">
<p>The source stream.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>The source stream must be opened <i>before</i> calling this function.</p>
<p>Calling the internal function &lsquo;FT_Stream_Close&rsquo; on the new stream will <b>not</b> call &lsquo;FT_Stream_Close&rsquo; on the source stream. None of the stream objects will be released to the heap.</p>
<p>The stream implementation is very basic and resets the decompression process each time seeking backwards is needed within the stream</p>
<p>In certain builds of the library, LZW compression recognition is automatically handled when calling <a href="ft2-base_interface.html#FT_New_Face">FT_New_Face</a> or <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a>. This means that if no font driver is capable of handling the raw compressed file, the library will try to open a LZW stream from it and re-open the face with it.</p>
<p>This function may return &lsquo;FT_Err_Unimplemented_Feature&rsquo; if your build of FreeType was not compiled with LZW support.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

</body>
</html>
reference/ft2-mac_specific.html000064400000035500151706766400012505 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF;
         width: 87%;
         margin: auto; }

  div.section { width: 75%;
                margin: auto; }
  div.section hr { margin: 4ex 0 1ex 0; }
  div.section h4 { background-color: #EEEEFF;
                   font-size: medium;
                   font-style: oblique;
                   font-weight: bold;
                   margin: 3ex 0 1.5ex 9%;
                   padding: 0.3ex 0 0.3ex 1%; }
  div.section p { margin: 1.5ex 0 1.5ex 10%; }
  div.section pre { margin: 3ex 0 3ex 9%;
                    background-color: #D6E8FF;
                    padding: 2ex 0 2ex 1%; }
  div.section table.fields { width: 90%;
                             margin: 1.5ex 0 1.5ex 10%; }
  div.section table.toc { width: 95%;
                          margin: 1.5ex 0 1.5ex 5%; }
  div.timestamp { text-align: center;
                  font-size: 69%;
                  margin: 1.5ex 0 1.5ex 0; }

  h1 { text-align: center; }
  h3 { font-size: medium;
       margin: 4ex 0 1.5ex 0; }

  p { text-align: justify; }

  pre.colored { color: blue; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  table.fields td.val { font-weight: bold;
                        text-align: right;
                        width: 30%;
                        vertical-align: baseline;
                        padding: 1ex 1em 1ex 0; }
  table.fields td.desc { vertical-align: baseline;
                         padding: 1ex 0 1ex 1em; }
  table.fields td.desc p:first-child { margin: 0; }
  table.fields td.desc p { margin: 1.5ex 0 0 0; }
  table.index { margin: 6ex auto 6ex auto;
                border: 0;
                border-collapse: separate;
                border-spacing: 1em 0.3ex; }
  table.index tr { padding: 0; }
  table.index td { padding: 0; }
  table.index-toc-link { width: 100%;
                         border: 0;
                         border-spacing: 0;
                         margin: 1ex 0 1ex 0; }
  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
                                 font-size: 83%;
                                 text-align: left; }
  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
                                   font-size: 83%;
                                   text-align: center; }
  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
                                  font-size: 83%;
                                  text-align: right; }
  table.synopsis { margin: 6ex auto 6ex auto;
                   border: 0;
                   border-collapse: separate;
                   border-spacing: 2em 0.6ex; }
  table.synopsis tr { padding: 0; }
  table.synopsis td { padding: 0; }
  table.toc td.link { width: 30%;
                      text-align: right;
                      vertical-align: baseline;
                      padding: 1ex 1em 1ex 0; }
  table.toc td.desc { vertical-align: baseline;
                      padding: 1ex 0 1ex 1em;
                      text-align: left; }
  table.toc td.desc p:first-child { margin: 0;
                                    text-align: left; }
  table.toc td.desc p { margin: 1.5ex 0 0 0;
                        text-align: left; }

</style>
</head>
<body>

<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
<h1>FreeType-2.9.1 API Reference</h1>

<h1 id="mac_specific">Mac Specific Interface</h1>
<h2>Synopsis</h2>
<table class="synopsis">
<tr><td><a href="#FT_New_Face_From_FOND">FT_New_Face_From_FOND</a></td><td><a href="#FT_GetFilePath_From_Mac_ATS_Name">FT_GetFilePath_From_Mac_ATS_Name</a></td></tr>
<tr><td><a href="#FT_GetFile_From_Mac_Name">FT_GetFile_From_Mac_Name</a></td><td><a href="#FT_New_Face_From_FSSpec">FT_New_Face_From_FSSpec</a></td></tr>
<tr><td><a href="#FT_GetFile_From_Mac_ATS_Name">FT_GetFile_From_Mac_ATS_Name</a></td><td><a href="#FT_New_Face_From_FSRef">FT_New_Face_From_FSRef</a></td></tr>
</table>


<p>The following definitions are only available if FreeType is compiled on a Macintosh.</p>

<div class="section">
<h3 id="FT_New_Face_From_FOND">FT_New_Face_From_FOND</h3>
<p>Defined in FT_MAC_H (freetype/ftmac.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_New_Face_From_FOND</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a>  library,
                         Handle      fond,
                         <a href="ft2-basic_types.html#FT_Long">FT_Long</a>     face_index,
                         <a href="ft2-base_interface.html#FT_Face">FT_Face</a>    *aface )
                       FT_DEPRECATED_ATTRIBUTE;
</pre>

<p>Create a new face object from a FOND resource.</p>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to the library resource.</p>
</td></tr>
</table>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="fond">fond</td><td class="desc">
<p>A FOND resource.</p>
</td></tr>
<tr><td class="val" id="face_index">face_index</td><td class="desc">
<p>Only supported for the -1 &lsquo;sanity check&rsquo; special case.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="aface">aface</td><td class="desc">
<p>A handle to a new face object.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>notes</h4>
<p>This function can be used to create <a href="ft2-base_interface.html#FT_Face">FT_Face</a> objects from fonts that are installed in the system as follows.</p>
<pre class="colored">
  fond = GetResource( 'FOND', fontName );
  error = FT_New_Face_From_FOND( library, fond, 0, &amp;face );
</pre>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_GetFile_From_Mac_Name">FT_GetFile_From_Mac_Name</h3>
<p>Defined in FT_MAC_H (freetype/ftmac.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_GetFile_From_Mac_Name</b>( <span class="keyword">const</span> <span class="keyword">char</span>*  fontName,
                            FSSpec*      pathSpec,
                            <a href="ft2-basic_types.html#FT_Long">FT_Long</a>*     face_index )
                          FT_DEPRECATED_ATTRIBUTE;
</pre>

<p>Return an FSSpec for the disk file containing the named font.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="fontName">fontName</td><td class="desc">
<p>Mac OS name of the font (e.g., Times New Roman Bold).</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="pathSpec">pathSpec</td><td class="desc">
<p>FSSpec to the file. For passing to <a href="ft2-mac_specific.html#FT_New_Face_From_FSSpec">FT_New_Face_From_FSSpec</a>.</p>
</td></tr>
<tr><td class="val" id="face_index">face_index</td><td class="desc">
<p>Index of the face. For passing to <a href="ft2-mac_specific.html#FT_New_Face_From_FSSpec">FT_New_Face_From_FSSpec</a>.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_GetFile_From_Mac_ATS_Name">FT_GetFile_From_Mac_ATS_Name</h3>
<p>Defined in FT_MAC_H (freetype/ftmac.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_GetFile_From_Mac_ATS_Name</b>( <span class="keyword">const</span> <span class="keyword">char</span>*  fontName,
                                FSSpec*      pathSpec,
                                <a href="ft2-basic_types.html#FT_Long">FT_Long</a>*     face_index )
                              FT_DEPRECATED_ATTRIBUTE;
</pre>

<p>Return an FSSpec for the disk file containing the named font.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="fontName">fontName</td><td class="desc">
<p>Mac OS name of the font in ATS framework.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="pathSpec">pathSpec</td><td class="desc">
<p>FSSpec to the file. For passing to <a href="ft2-mac_specific.html#FT_New_Face_From_FSSpec">FT_New_Face_From_FSSpec</a>.</p>
</td></tr>
<tr><td class="val" id="face_index">face_index</td><td class="desc">
<p>Index of the face. For passing to <a href="ft2-mac_specific.html#FT_New_Face_From_FSSpec">FT_New_Face_From_FSSpec</a>.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_GetFilePath_From_Mac_ATS_Name">FT_GetFilePath_From_Mac_ATS_Name</h3>
<p>Defined in FT_MAC_H (freetype/ftmac.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_GetFilePath_From_Mac_ATS_Name</b>( <span class="keyword">const</span> <span class="keyword">char</span>*  fontName,
                                    UInt8*       path,
                                    UInt32       maxPathSize,
                                    <a href="ft2-basic_types.html#FT_Long">FT_Long</a>*     face_index )
                                  FT_DEPRECATED_ATTRIBUTE;
</pre>

<p>Return a pathname of the disk file and face index for given font name that is handled by ATS framework.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="fontName">fontName</td><td class="desc">
<p>Mac OS name of the font in ATS framework.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="path">path</td><td class="desc">
<p>Buffer to store pathname of the file. For passing to <a href="ft2-base_interface.html#FT_New_Face">FT_New_Face</a>. The client must allocate this buffer before calling this function.</p>
</td></tr>
<tr><td class="val" id="maxPathSize">maxPathSize</td><td class="desc">
<p>Lengths of the buffer &lsquo;path&rsquo; that client allocated.</p>
</td></tr>
<tr><td class="val" id="face_index">face_index</td><td class="desc">
<p>Index of the face. For passing to <a href="ft2-base_interface.html#FT_New_Face">FT_New_Face</a>.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_New_Face_From_FSSpec">FT_New_Face_From_FSSpec</h3>
<p>Defined in FT_MAC_H (freetype/ftmac.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_New_Face_From_FSSpec</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a>     library,
                           <span class="keyword">const</span> FSSpec  *spec,
                           <a href="ft2-basic_types.html#FT_Long">FT_Long</a>        face_index,
                           <a href="ft2-base_interface.html#FT_Face">FT_Face</a>       *aface )
                         FT_DEPRECATED_ATTRIBUTE;
</pre>

<p>Create a new face object from a given resource and typeface index using an FSSpec to the font file.</p>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to the library resource.</p>
</td></tr>
</table>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="spec">spec</td><td class="desc">
<p>FSSpec to the font file.</p>
</td></tr>
<tr><td class="val" id="face_index">face_index</td><td class="desc">
<p>The index of the face within the resource. The first face has index&nbsp;0.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="aface">aface</td><td class="desc">
<p>A handle to a new face object.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p><a href="ft2-mac_specific.html#FT_New_Face_From_FSSpec">FT_New_Face_From_FSSpec</a> is identical to <a href="ft2-base_interface.html#FT_New_Face">FT_New_Face</a> except it accepts an FSSpec instead of a path.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_New_Face_From_FSRef">FT_New_Face_From_FSRef</h3>
<p>Defined in FT_MAC_H (freetype/ftmac.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_New_Face_From_FSRef</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a>    library,
                          <span class="keyword">const</span> FSRef  *ref,
                          <a href="ft2-basic_types.html#FT_Long">FT_Long</a>       face_index,
                          <a href="ft2-base_interface.html#FT_Face">FT_Face</a>      *aface )
                        FT_DEPRECATED_ATTRIBUTE;
</pre>

<p>Create a new face object from a given resource and typeface index using an FSRef to the font file.</p>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to the library resource.</p>
</td></tr>
</table>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="spec">spec</td><td class="desc">
<p>FSRef to the font file.</p>
</td></tr>
<tr><td class="val" id="face_index">face_index</td><td class="desc">
<p>The index of the face within the resource. The first face has index&nbsp;0.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="aface">aface</td><td class="desc">
<p>A handle to a new face object.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p><a href="ft2-mac_specific.html#FT_New_Face_From_FSRef">FT_New_Face_From_FSRef</a> is identical to <a href="ft2-base_interface.html#FT_New_Face">FT_New_Face</a> except it accepts an FSRef instead of a path.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

</body>
</html>
reference/ft2-module_management.html000064400000106625151706766400013570 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF;
         width: 87%;
         margin: auto; }

  div.section { width: 75%;
                margin: auto; }
  div.section hr { margin: 4ex 0 1ex 0; }
  div.section h4 { background-color: #EEEEFF;
                   font-size: medium;
                   font-style: oblique;
                   font-weight: bold;
                   margin: 3ex 0 1.5ex 9%;
                   padding: 0.3ex 0 0.3ex 1%; }
  div.section p { margin: 1.5ex 0 1.5ex 10%; }
  div.section pre { margin: 3ex 0 3ex 9%;
                    background-color: #D6E8FF;
                    padding: 2ex 0 2ex 1%; }
  div.section table.fields { width: 90%;
                             margin: 1.5ex 0 1.5ex 10%; }
  div.section table.toc { width: 95%;
                          margin: 1.5ex 0 1.5ex 5%; }
  div.timestamp { text-align: center;
                  font-size: 69%;
                  margin: 1.5ex 0 1.5ex 0; }

  h1 { text-align: center; }
  h3 { font-size: medium;
       margin: 4ex 0 1.5ex 0; }

  p { text-align: justify; }

  pre.colored { color: blue; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  table.fields td.val { font-weight: bold;
                        text-align: right;
                        width: 30%;
                        vertical-align: baseline;
                        padding: 1ex 1em 1ex 0; }
  table.fields td.desc { vertical-align: baseline;
                         padding: 1ex 0 1ex 1em; }
  table.fields td.desc p:first-child { margin: 0; }
  table.fields td.desc p { margin: 1.5ex 0 0 0; }
  table.index { margin: 6ex auto 6ex auto;
                border: 0;
                border-collapse: separate;
                border-spacing: 1em 0.3ex; }
  table.index tr { padding: 0; }
  table.index td { padding: 0; }
  table.index-toc-link { width: 100%;
                         border: 0;
                         border-spacing: 0;
                         margin: 1ex 0 1ex 0; }
  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
                                 font-size: 83%;
                                 text-align: left; }
  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
                                   font-size: 83%;
                                   text-align: center; }
  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
                                  font-size: 83%;
                                  text-align: right; }
  table.synopsis { margin: 6ex auto 6ex auto;
                   border: 0;
                   border-collapse: separate;
                   border-spacing: 2em 0.6ex; }
  table.synopsis tr { padding: 0; }
  table.synopsis td { padding: 0; }
  table.toc td.link { width: 30%;
                      text-align: right;
                      vertical-align: baseline;
                      padding: 1ex 1em 1ex 0; }
  table.toc td.desc { vertical-align: baseline;
                      padding: 1ex 0 1ex 1em;
                      text-align: left; }
  table.toc td.desc p:first-child { margin: 0;
                                    text-align: left; }
  table.toc td.desc p { margin: 1.5ex 0 0 0;
                        text-align: left; }

</style>
</head>
<body>

<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
<h1>FreeType-2.9.1 API Reference</h1>

<h1 id="module_management">Module Management</h1>
<h2>Synopsis</h2>
<table class="synopsis">
<tr><td><a href="#FT_Module">FT_Module</a></td><td>&nbsp;</td></tr>
<tr><td><a href="#FT_Module_Constructor">FT_Module_Constructor</a></td><td><a href="#FT_New_Library">FT_New_Library</a></td></tr>
<tr><td><a href="#FT_Module_Destructor">FT_Module_Destructor</a></td><td><a href="#FT_Done_Library">FT_Done_Library</a></td></tr>
<tr><td><a href="#FT_Module_Requester">FT_Module_Requester</a></td><td><a href="#FT_Reference_Library">FT_Reference_Library</a></td></tr>
<tr><td><a href="#FT_Module_Class">FT_Module_Class</a></td><td>&nbsp;</td></tr>
<tr><td>&nbsp;</td><td><a href="#FT_Renderer">FT_Renderer</a></td></tr>
<tr><td><a href="#FT_Add_Module">FT_Add_Module</a></td><td><a href="#FT_Renderer_Class">FT_Renderer_Class</a></td></tr>
<tr><td><a href="#FT_Get_Module">FT_Get_Module</a></td><td>&nbsp;</td></tr>
<tr><td><a href="#FT_Remove_Module">FT_Remove_Module</a></td><td><a href="#FT_Get_Renderer">FT_Get_Renderer</a></td></tr>
<tr><td><a href="#FT_Add_Default_Modules">FT_Add_Default_Modules</a></td><td><a href="#FT_Set_Renderer">FT_Set_Renderer</a></td></tr>
<tr><td>&nbsp;</td><td>&nbsp;</td></tr>
<tr><td><a href="#FT_Property_Set">FT_Property_Set</a></td><td><a href="#FT_Set_Debug_Hook">FT_Set_Debug_Hook</a></td></tr>
<tr><td><a href="#FT_Property_Get">FT_Property_Get</a></td><td>&nbsp;</td></tr>
<tr><td><a href="#FT_Set_Default_Properties">FT_Set_Default_Properties</a></td><td><a href="#FT_Driver">FT_Driver</a></td></tr>
</table>


<p>The definitions below are used to manage modules within FreeType. Modules can be added, upgraded, and removed at runtime. Additionally, some module properties can be controlled also.</p>
<p>Here is a list of possible values of the &lsquo;module_name&rsquo; field in the <a href="ft2-module_management.html#FT_Module_Class">FT_Module_Class</a> structure.</p>
<pre class="colored">
  autofitter
  bdf
  cff
  gxvalid
  otvalid
  pcf
  pfr
  psaux
  pshinter
  psnames
  raster1
  sfnt
  smooth, smooth-lcd, smooth-lcdv
  truetype
  type1
  type42
  t1cid
  winfonts
</pre>
<p>Note that the FreeType Cache sub-system is not a FreeType module.</p>

<div class="section">
<h3 id="FT_Module">FT_Module</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_ModuleRec_*  <b>FT_Module</b>;
</pre>

<p>A handle to a given FreeType module object. A module can be a font driver, a renderer, or anything else that provides services to the former.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Module_Constructor">FT_Module_Constructor</h3>
<p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p>
<pre>
  <span class="keyword">typedef</span> <a href="ft2-basic_types.html#FT_Error">FT_Error</a>
  (*<b>FT_Module_Constructor</b>)( <a href="ft2-module_management.html#FT_Module">FT_Module</a>  module );
</pre>

<p>A function used to initialize (not create) a new module object.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="module">module</td><td class="desc">
<p>The module to initialize.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Module_Destructor">FT_Module_Destructor</h3>
<p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">void</span>
  (*<b>FT_Module_Destructor</b>)( <a href="ft2-module_management.html#FT_Module">FT_Module</a>  module );
</pre>

<p>A function used to finalize (not destroy) a given module object.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="module">module</td><td class="desc">
<p>The module to finalize.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Module_Requester">FT_Module_Requester</h3>
<p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p>
<pre>
  <span class="keyword">typedef</span> FT_Module_Interface
  (*<b>FT_Module_Requester</b>)( <a href="ft2-module_management.html#FT_Module">FT_Module</a>    module,
                          <span class="keyword">const</span> <span class="keyword">char</span>*  name );
</pre>

<p>A function used to query a given module for a specific interface.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="module">module</td><td class="desc">
<p>The module to be searched.</p>
</td></tr>
<tr><td class="val" id="name">name</td><td class="desc">
<p>The name of the interface in the module.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Module_Class">FT_Module_Class</h3>
<p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_Module_Class_
  {
    <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>               module_flags;
    <a href="ft2-basic_types.html#FT_Long">FT_Long</a>                module_size;
    <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_String">FT_String</a>*       module_name;
    <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>               module_version;
    <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>               module_requires;

    <span class="keyword">const</span> <span class="keyword">void</span>*            module_interface;

    <a href="ft2-module_management.html#FT_Module_Constructor">FT_Module_Constructor</a>  module_init;
    <a href="ft2-module_management.html#FT_Module_Destructor">FT_Module_Destructor</a>   module_done;
    <a href="ft2-module_management.html#FT_Module_Requester">FT_Module_Requester</a>    get_interface;

  } <b>FT_Module_Class</b>;
</pre>

<p>The module class descriptor.</p>

<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="module_flags">module_flags</td><td class="desc">
<p>Bit flags describing the module.</p>
</td></tr>
<tr><td class="val" id="module_size">module_size</td><td class="desc">
<p>The size of one module object/instance in bytes.</p>
</td></tr>
<tr><td class="val" id="module_name">module_name</td><td class="desc">
<p>The name of the module.</p>
</td></tr>
<tr><td class="val" id="module_version">module_version</td><td class="desc">
<p>The version, as a 16.16 fixed number (major.minor).</p>
</td></tr>
<tr><td class="val" id="module_requires">module_requires</td><td class="desc">
<p>The version of FreeType this module requires, as a 16.16 fixed number (major.minor). Starts at version 2.0, i.e., 0x20000.</p>
</td></tr>
<tr><td class="val" id="module_init">module_init</td><td class="desc">
<p>The initializing function.</p>
</td></tr>
<tr><td class="val" id="module_done">module_done</td><td class="desc">
<p>The finalizing function.</p>
</td></tr>
<tr><td class="val" id="get_interface">get_interface</td><td class="desc">
<p>The interface requesting function.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Add_Module">FT_Add_Module</h3>
<p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Add_Module</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a>              library,
                 <span class="keyword">const</span> <a href="ft2-module_management.html#FT_Module_Class">FT_Module_Class</a>*  clazz );
</pre>

<p>Add a new module to a given library instance.</p>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to the library object.</p>
</td></tr>
</table>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="clazz">clazz</td><td class="desc">
<p>A pointer to class descriptor for the module.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>An error will be returned if a module already exists by that name, or if the module requires a version of FreeType that is too great.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Get_Module">FT_Get_Module</h3>
<p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-module_management.html#FT_Module">FT_Module</a> )
  <b>FT_Get_Module</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a>   library,
                 <span class="keyword">const</span> <span class="keyword">char</span>*  module_name );
</pre>

<p>Find a module by its name.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to the library object.</p>
</td></tr>
<tr><td class="val" id="module_name">module_name</td><td class="desc">
<p>The module's name (as an ASCII string).</p>
</td></tr>
</table>

<h4>return</h4>
<p>A module handle. 0&nbsp;if none was found.</p>

<h4>note</h4>
<p>FreeType's internal modules aren't documented very well, and you should look up the source code for details.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Remove_Module">FT_Remove_Module</h3>
<p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Remove_Module</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a>  library,
                    <a href="ft2-module_management.html#FT_Module">FT_Module</a>   module );
</pre>

<p>Remove a given module from a library instance.</p>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to a library object.</p>
</td></tr>
</table>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="module">module</td><td class="desc">
<p>A handle to a module object.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>The module object is destroyed by the function in case of success.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Add_Default_Modules">FT_Add_Default_Modules</h3>
<p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p>
<pre>
  FT_EXPORT( <span class="keyword">void</span> )
  <b>FT_Add_Default_Modules</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a>  library );
</pre>

<p>Add the set of default drivers to a given library object. This is only useful when you create a library object with <a href="ft2-module_management.html#FT_New_Library">FT_New_Library</a> (usually to plug a custom memory manager).</p>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to a new library object.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Property_Set">FT_Property_Set</h3>
<p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Property_Set</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a>        library,
                   <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_String">FT_String</a>*  module_name,
                   <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_String">FT_String</a>*  property_name,
                   <span class="keyword">const</span> <span class="keyword">void</span>*       value );
</pre>

<p>Set a property for a given module.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to the library the module is part of.</p>
</td></tr>
<tr><td class="val" id="module_name">module_name</td><td class="desc">
<p>The module name.</p>
</td></tr>
<tr><td class="val" id="property_name">property_name</td><td class="desc">
<p>The property name. Properties are described in section &lsquo;<a href="ft2-properties.html#properties">Driver properties</a>&rsquo;.</p>
<p>Note that only a few modules have properties.</p>
</td></tr>
<tr><td class="val" id="value">value</td><td class="desc">
<p>A generic pointer to a variable or structure that gives the new value of the property. The exact definition of &lsquo;value&rsquo; is dependent on the property; see section &lsquo;<a href="ft2-properties.html#properties">Driver properties</a>&rsquo;.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>If &lsquo;module_name&rsquo; isn't a valid module name, or &lsquo;property_name&rsquo; doesn't specify a valid property, or if &lsquo;value&rsquo; doesn't represent a valid value for the given property, an error is returned.</p>
<p>The following example sets property &lsquo;bar&rsquo; (a simple integer) in module &lsquo;foo&rsquo; to value&nbsp;1.</p>
<pre class="colored">
  FT_UInt  bar;


  bar = 1;
  FT_Property_Set( library, "foo", "bar", &amp;bar );
</pre>
<p>Note that the FreeType Cache sub-system doesn't recognize module property changes. To avoid glyph lookup confusion within the cache you should call <a href="ft2-cache_subsystem.html#FTC_Manager_Reset">FTC_Manager_Reset</a> to completely flush the cache if a module property gets changed after <a href="ft2-cache_subsystem.html#FTC_Manager_New">FTC_Manager_New</a> has been called.</p>
<p>It is not possible to set properties of the FreeType Cache sub-system itself with FT_Property_Set; use ?FTC_Property_Set? instead.</p>

<h4>since</h4>
<p>2.4.11</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Property_Get">FT_Property_Get</h3>
<p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Property_Get</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a>        library,
                   <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_String">FT_String</a>*  module_name,
                   <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_String">FT_String</a>*  property_name,
                   <span class="keyword">void</span>*             value );
</pre>

<p>Get a module's property value.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to the library the module is part of.</p>
</td></tr>
<tr><td class="val" id="module_name">module_name</td><td class="desc">
<p>The module name.</p>
</td></tr>
<tr><td class="val" id="property_name">property_name</td><td class="desc">
<p>The property name. Properties are described in section &lsquo;<a href="ft2-properties.html#properties">Driver properties</a>&rsquo;.</p>
</td></tr>
</table>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="value">value</td><td class="desc">
<p>A generic pointer to a variable or structure that gives the value of the property. The exact definition of &lsquo;value&rsquo; is dependent on the property; see section &lsquo;<a href="ft2-properties.html#properties">Driver properties</a>&rsquo;.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>If &lsquo;module_name&rsquo; isn't a valid module name, or &lsquo;property_name&rsquo; doesn't specify a valid property, or if &lsquo;value&rsquo; doesn't represent a valid value for the given property, an error is returned.</p>
<p>The following example gets property &lsquo;baz&rsquo; (a range) in module &lsquo;foo&rsquo;.</p>
<pre class="colored">
  typedef  range_
  {
    FT_Int32  min;
    FT_Int32  max;

  } range;

  range  baz;


  FT_Property_Get( library, "foo", "baz", &amp;baz );
</pre>
<p>It is not possible to retrieve properties of the FreeType Cache sub-system with FT_Property_Get; use ?FTC_Property_Get? instead.</p>

<h4>since</h4>
<p>2.4.11</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Set_Default_Properties">FT_Set_Default_Properties</h3>
<p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p>
<pre>
  FT_EXPORT( <span class="keyword">void</span> )
  <b>FT_Set_Default_Properties</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a>  library );
</pre>

<p>If compilation option FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES is set, this function reads the &lsquo;FREETYPE_PROPERTIES&rsquo; environment variable to control driver properties. See section &lsquo;<a href="ft2-properties.html#properties">Driver properties</a>&rsquo; for more.</p>
<p>If the compilation option is not set, this function does nothing.</p>
<p>&lsquo;FREETYPE_PROPERTIES&rsquo; has the following syntax form (broken here into multiple lines for better readability).</p>
<pre class="colored">
  &lt;optional whitespace&gt;
  &lt;module-name1&gt; ':'
  &lt;property-name1&gt; '=' &lt;property-value1&gt;
  &lt;whitespace&gt;
  &lt;module-name2&gt; ':'
  &lt;property-name2&gt; '=' &lt;property-value2&gt;
  ...
</pre>
<p>Example:</p>
<pre class="colored">
  FREETYPE_PROPERTIES=truetype:interpreter-version=35 \
                      cff:no-stem-darkening=1 \
                      autofitter:warping=1
</pre>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to a new library object.</p>
</td></tr>
</table>

<h4>since</h4>
<p>2.8</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_New_Library">FT_New_Library</h3>
<p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_New_Library</b>( <a href="ft2-system_interface.html#FT_Memory">FT_Memory</a>    memory,
                  <a href="ft2-base_interface.html#FT_Library">FT_Library</a>  *alibrary );
</pre>

<p>This function is used to create a new FreeType library instance from a given memory object. It is thus possible to use libraries with distinct memory allocators within the same program. Note, however, that the used <a href="ft2-system_interface.html#FT_Memory">FT_Memory</a> structure is expected to remain valid for the life of the <a href="ft2-base_interface.html#FT_Library">FT_Library</a> object.</p>
<p>Normally, you would call this function (followed by a call to <a href="ft2-module_management.html#FT_Add_Default_Modules">FT_Add_Default_Modules</a> or a series of calls to <a href="ft2-module_management.html#FT_Add_Module">FT_Add_Module</a>, and a call to <a href="ft2-module_management.html#FT_Set_Default_Properties">FT_Set_Default_Properties</a>) instead of <a href="ft2-base_interface.html#FT_Init_FreeType">FT_Init_FreeType</a> to initialize the FreeType library.</p>
<p>Don't use <a href="ft2-base_interface.html#FT_Done_FreeType">FT_Done_FreeType</a> but <a href="ft2-module_management.html#FT_Done_Library">FT_Done_Library</a> to destroy a library instance.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="memory">memory</td><td class="desc">
<p>A handle to the original memory object.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="alibrary">alibrary</td><td class="desc">
<p>A pointer to handle of a new library object.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>See the discussion of reference counters in the description of <a href="ft2-module_management.html#FT_Reference_Library">FT_Reference_Library</a>.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Done_Library">FT_Done_Library</h3>
<p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Done_Library</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a>  library );
</pre>

<p>Discard a given library object. This closes all drivers and discards all resource objects.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to the target library.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>See the discussion of reference counters in the description of <a href="ft2-module_management.html#FT_Reference_Library">FT_Reference_Library</a>.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Reference_Library">FT_Reference_Library</h3>
<p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Reference_Library</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a>  library );
</pre>

<p>A counter gets initialized to&nbsp;1 at the time an <a href="ft2-base_interface.html#FT_Library">FT_Library</a> structure is created. This function increments the counter. <a href="ft2-module_management.html#FT_Done_Library">FT_Done_Library</a> then only destroys a library if the counter is&nbsp;1, otherwise it simply decrements the counter.</p>
<p>This function helps in managing life-cycles of structures that reference <a href="ft2-base_interface.html#FT_Library">FT_Library</a> objects.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to a target library object.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>since</h4>
<p>2.4.2</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Renderer">FT_Renderer</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_RendererRec_*  <b>FT_Renderer</b>;
</pre>

<p>A handle to a given FreeType renderer. A renderer is a module in charge of converting a glyph's outline image to a bitmap. It supports a single glyph image format, and one or more target surface depths.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Renderer_Class">FT_Renderer_Class</h3>
<p>Defined in FT_RENDER_H (freetype/ftrender.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_Renderer_Class_
  {
    <a href="ft2-module_management.html#FT_Module_Class">FT_Module_Class</a>            root;

    <a href="ft2-basic_types.html#FT_Glyph_Format">FT_Glyph_Format</a>            glyph_format;

    FT_Renderer_RenderFunc     render_glyph;
    FT_Renderer_TransformFunc  transform_glyph;
    FT_Renderer_GetCBoxFunc    get_glyph_cbox;
    FT_Renderer_SetModeFunc    set_mode;

    <a href="ft2-raster.html#FT_Raster_Funcs">FT_Raster_Funcs</a>*           raster_class;

  } <b>FT_Renderer_Class</b>;
</pre>

<p>The renderer module class descriptor.</p>

<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="root">root</td><td class="desc">
<p>The root <a href="ft2-module_management.html#FT_Module_Class">FT_Module_Class</a> fields.</p>
</td></tr>
<tr><td class="val" id="glyph_format">glyph_format</td><td class="desc">
<p>The glyph image format this renderer handles.</p>
</td></tr>
<tr><td class="val" id="render_glyph">render_glyph</td><td class="desc">
<p>A method used to render the image that is in a given glyph slot into a bitmap.</p>
</td></tr>
<tr><td class="val" id="transform_glyph">transform_glyph</td><td class="desc">
<p>A method used to transform the image that is in a given glyph slot.</p>
</td></tr>
<tr><td class="val" id="get_glyph_cbox">get_glyph_cbox</td><td class="desc">
<p>A method used to access the glyph's cbox.</p>
</td></tr>
<tr><td class="val" id="set_mode">set_mode</td><td class="desc">
<p>A method used to pass additional parameters.</p>
</td></tr>
<tr><td class="val" id="raster_class">raster_class</td><td class="desc">
<p>For <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_OUTLINE</a> renderers only. This is a pointer to its raster's class.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Get_Renderer">FT_Get_Renderer</h3>
<p>Defined in FT_RENDER_H (freetype/ftrender.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-module_management.html#FT_Renderer">FT_Renderer</a> )
  <b>FT_Get_Renderer</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a>       library,
                   <a href="ft2-basic_types.html#FT_Glyph_Format">FT_Glyph_Format</a>  format );
</pre>

<p>Retrieve the current renderer for a given glyph format.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to the library object.</p>
</td></tr>
<tr><td class="val" id="format">format</td><td class="desc">
<p>The glyph format.</p>
</td></tr>
</table>

<h4>return</h4>
<p>A renderer handle. 0&nbsp;if none found.</p>

<h4>note</h4>
<p>An error will be returned if a module already exists by that name, or if the module requires a version of FreeType that is too great.</p>
<p>To add a new renderer, simply use <a href="ft2-module_management.html#FT_Add_Module">FT_Add_Module</a>. To retrieve a renderer by its name, use <a href="ft2-module_management.html#FT_Get_Module">FT_Get_Module</a>.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Set_Renderer">FT_Set_Renderer</h3>
<p>Defined in FT_RENDER_H (freetype/ftrender.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Set_Renderer</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a>     library,
                   <a href="ft2-module_management.html#FT_Renderer">FT_Renderer</a>    renderer,
                   <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>        num_params,
                   <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a>*  parameters );
</pre>

<p>Set the current renderer to use, and set additional mode.</p>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to the library object.</p>
</td></tr>
</table>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="renderer">renderer</td><td class="desc">
<p>A handle to the renderer object.</p>
</td></tr>
<tr><td class="val" id="num_params">num_params</td><td class="desc">
<p>The number of additional parameters.</p>
</td></tr>
<tr><td class="val" id="parameters">parameters</td><td class="desc">
<p>Additional parameters.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>In case of success, the renderer will be used to convert glyph images in the renderer's known format into bitmaps.</p>
<p>This doesn't change the current renderer for other formats.</p>
<p>Currently, no FreeType renderer module uses &lsquo;parameters&rsquo;; you should thus always pass NULL as the value.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Set_Debug_Hook">FT_Set_Debug_Hook</h3>
<p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p>
<pre>
  FT_EXPORT( <span class="keyword">void</span> )
  <b>FT_Set_Debug_Hook</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a>         library,
                     <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>            hook_index,
                     FT_DebugHook_Func  debug_hook );
</pre>

<p>Set a debug hook function for debugging the interpreter of a font format.</p>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to the library object.</p>
</td></tr>
</table>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="hook_index">hook_index</td><td class="desc">
<p>The index of the debug hook. You should use the values defined in &lsquo;ftobjs.h&rsquo;, e.g., &lsquo;FT_DEBUG_HOOK_TRUETYPE&rsquo;.</p>
</td></tr>
<tr><td class="val" id="debug_hook">debug_hook</td><td class="desc">
<p>The function used to debug the interpreter.</p>
</td></tr>
</table>

<h4>note</h4>
<p>Currently, four debug hook slots are available, but only two (for the TrueType and the Type&nbsp;1 interpreter) are defined.</p>
<p>Since the internal headers of FreeType are no longer installed, the symbol &lsquo;FT_DEBUG_HOOK_TRUETYPE&rsquo; isn't available publicly. This is a bug and will be fixed in a forthcoming release.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Driver">FT_Driver</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_DriverRec_*  <b>FT_Driver</b>;
</pre>

<p>A handle to a given FreeType font driver object. A font driver is a module capable of creating faces from font files.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

</body>
</html>
reference/ft2-multiple_masters.html000064400000102707151706766400013475 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF;
         width: 87%;
         margin: auto; }

  div.section { width: 75%;
                margin: auto; }
  div.section hr { margin: 4ex 0 1ex 0; }
  div.section h4 { background-color: #EEEEFF;
                   font-size: medium;
                   font-style: oblique;
                   font-weight: bold;
                   margin: 3ex 0 1.5ex 9%;
                   padding: 0.3ex 0 0.3ex 1%; }
  div.section p { margin: 1.5ex 0 1.5ex 10%; }
  div.section pre { margin: 3ex 0 3ex 9%;
                    background-color: #D6E8FF;
                    padding: 2ex 0 2ex 1%; }
  div.section table.fields { width: 90%;
                             margin: 1.5ex 0 1.5ex 10%; }
  div.section table.toc { width: 95%;
                          margin: 1.5ex 0 1.5ex 5%; }
  div.timestamp { text-align: center;
                  font-size: 69%;
                  margin: 1.5ex 0 1.5ex 0; }

  h1 { text-align: center; }
  h3 { font-size: medium;
       margin: 4ex 0 1.5ex 0; }

  p { text-align: justify; }

  pre.colored { color: blue; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  table.fields td.val { font-weight: bold;
                        text-align: right;
                        width: 30%;
                        vertical-align: baseline;
                        padding: 1ex 1em 1ex 0; }
  table.fields td.desc { vertical-align: baseline;
                         padding: 1ex 0 1ex 1em; }
  table.fields td.desc p:first-child { margin: 0; }
  table.fields td.desc p { margin: 1.5ex 0 0 0; }
  table.index { margin: 6ex auto 6ex auto;
                border: 0;
                border-collapse: separate;
                border-spacing: 1em 0.3ex; }
  table.index tr { padding: 0; }
  table.index td { padding: 0; }
  table.index-toc-link { width: 100%;
                         border: 0;
                         border-spacing: 0;
                         margin: 1ex 0 1ex 0; }
  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
                                 font-size: 83%;
                                 text-align: left; }
  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
                                   font-size: 83%;
                                   text-align: center; }
  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
                                  font-size: 83%;
                                  text-align: right; }
  table.synopsis { margin: 6ex auto 6ex auto;
                   border: 0;
                   border-collapse: separate;
                   border-spacing: 2em 0.6ex; }
  table.synopsis tr { padding: 0; }
  table.synopsis td { padding: 0; }
  table.toc td.link { width: 30%;
                      text-align: right;
                      vertical-align: baseline;
                      padding: 1ex 1em 1ex 0; }
  table.toc td.desc { vertical-align: baseline;
                      padding: 1ex 0 1ex 1em;
                      text-align: left; }
  table.toc td.desc p:first-child { margin: 0;
                                    text-align: left; }
  table.toc td.desc p { margin: 1.5ex 0 0 0;
                        text-align: left; }

</style>
</head>
<body>

<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
<h1>FreeType-2.9.1 API Reference</h1>

<h1 id="multiple_masters">Multiple Masters</h1>
<h2>Synopsis</h2>
<table class="synopsis">
<tr><td><a href="#FT_MM_Axis">FT_MM_Axis</a></td><td><a href="#FT_Set_Var_Design_Coordinates">FT_Set_Var_Design_Coordinates</a></td></tr>
<tr><td><a href="#FT_Multi_Master">FT_Multi_Master</a></td><td><a href="#FT_Get_Var_Design_Coordinates">FT_Get_Var_Design_Coordinates</a></td></tr>
<tr><td><a href="#FT_Var_Axis">FT_Var_Axis</a></td><td><a href="#FT_Set_MM_Blend_Coordinates">FT_Set_MM_Blend_Coordinates</a></td></tr>
<tr><td><a href="#FT_Var_Named_Style">FT_Var_Named_Style</a></td><td><a href="#FT_Get_MM_Blend_Coordinates">FT_Get_MM_Blend_Coordinates</a></td></tr>
<tr><td><a href="#FT_MM_Var">FT_MM_Var</a></td><td><a href="#FT_Set_Var_Blend_Coordinates">FT_Set_Var_Blend_Coordinates</a></td></tr>
<tr><td><a href="#FT_Get_Multi_Master">FT_Get_Multi_Master</a></td><td><a href="#FT_Get_Var_Blend_Coordinates">FT_Get_Var_Blend_Coordinates</a></td></tr>
<tr><td><a href="#FT_Get_MM_Var">FT_Get_MM_Var</a></td><td><a href="#FT_VAR_AXIS_FLAG_XXX">FT_VAR_AXIS_FLAG_XXX</a></td></tr>
<tr><td><a href="#FT_Done_MM_Var">FT_Done_MM_Var</a></td><td><a href="#FT_Get_Var_Axis_Flags">FT_Get_Var_Axis_Flags</a></td></tr>
<tr><td><a href="#FT_Set_MM_Design_Coordinates">FT_Set_MM_Design_Coordinates</a></td><td><a href="#FT_Set_Named_Instance">FT_Set_Named_Instance</a></td></tr>
</table>


<p>The following types and functions are used to manage Multiple Master fonts, i.e., the selection of specific design instances by setting design axis coordinates.</p>
<p>Besides Adobe MM fonts, the interface supports Apple's TrueType GX and OpenType variation fonts. Some of the routines only work with Adobe MM fonts, others will work with all three types. They are similar enough that a consistent interface makes sense.</p>

<div class="section">
<h3 id="FT_MM_Axis">FT_MM_Axis</h3>
<p>Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_MM_Axis_
  {
    <a href="ft2-basic_types.html#FT_String">FT_String</a>*  name;
    <a href="ft2-basic_types.html#FT_Long">FT_Long</a>     minimum;
    <a href="ft2-basic_types.html#FT_Long">FT_Long</a>     maximum;

  } <b>FT_MM_Axis</b>;
</pre>

<p>A structure to model a given axis in design space for Multiple Masters fonts.</p>
<p>This structure can't be used for TrueType GX or OpenType variation fonts.</p>

<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="name">name</td><td class="desc">
<p>The axis's name.</p>
</td></tr>
<tr><td class="val" id="minimum">minimum</td><td class="desc">
<p>The axis's minimum design coordinate.</p>
</td></tr>
<tr><td class="val" id="maximum">maximum</td><td class="desc">
<p>The axis's maximum design coordinate.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Multi_Master">FT_Multi_Master</h3>
<p>Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_Multi_Master_
  {
    <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>     num_axis;
    <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>     num_designs;
    <a href="ft2-multiple_masters.html#FT_MM_Axis">FT_MM_Axis</a>  axis[T1_MAX_MM_AXIS];

  } <b>FT_Multi_Master</b>;
</pre>

<p>A structure to model the axes and space of a Multiple Masters font.</p>
<p>This structure can't be used for TrueType GX or OpenType variation fonts.</p>

<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="num_axis">num_axis</td><td class="desc">
<p>Number of axes. Cannot exceed&nbsp;4.</p>
</td></tr>
<tr><td class="val" id="num_designs">num_designs</td><td class="desc">
<p>Number of designs; should be normally 2^num_axis even though the Type&nbsp;1 specification strangely allows for intermediate designs to be present. This number cannot exceed&nbsp;16.</p>
</td></tr>
<tr><td class="val" id="axis">axis</td><td class="desc">
<p>A table of axis descriptors.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Var_Axis">FT_Var_Axis</h3>
<p>Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_Var_Axis_
  {
    <a href="ft2-basic_types.html#FT_String">FT_String</a>*  name;

    <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>    minimum;
    <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>    def;
    <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>    maximum;

    <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>    tag;
    <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>     strid;

  } <b>FT_Var_Axis</b>;
</pre>

<p>A structure to model a given axis in design space for Multiple Masters, TrueType GX, and OpenType variation fonts.</p>

<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="name">name</td><td class="desc">
<p>The axis's name. Not always meaningful for TrueType GX or OpenType variation fonts.</p>
</td></tr>
<tr><td class="val" id="minimum">minimum</td><td class="desc">
<p>The axis's minimum design coordinate.</p>
</td></tr>
<tr><td class="val" id="def">def</td><td class="desc">
<p>The axis's default design coordinate. FreeType computes meaningful default values for Adobe MM fonts.</p>
</td></tr>
<tr><td class="val" id="maximum">maximum</td><td class="desc">
<p>The axis's maximum design coordinate.</p>
</td></tr>
<tr><td class="val" id="tag">tag</td><td class="desc">
<p>The axis's tag (the equivalent to &lsquo;name&rsquo; for TrueType GX and OpenType variation fonts). FreeType provides default values for Adobe MM fonts if possible.</p>
</td></tr>
<tr><td class="val" id="strid">strid</td><td class="desc">
<p>The axis name entry in the font's &lsquo;name&rsquo; table. This is another (and often better) version of the &lsquo;name&rsquo; field for TrueType GX or OpenType variation fonts. Not meaningful for Adobe MM fonts.</p>
</td></tr>
</table>

<h4>note</h4>
<p>The fields &lsquo;minimum&rsquo;, &lsquo;def&rsquo;, and &lsquo;maximum&rsquo; are 16.16 fractional values for TrueType GX and OpenType variation fonts. For Adobe MM fonts, the values are integers.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Var_Named_Style">FT_Var_Named_Style</h3>
<p>Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_Var_Named_Style_
  {
    <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>*  coords;
    <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>    strid;
    <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>    psid;   /* since 2.7.1 */

  } <b>FT_Var_Named_Style</b>;
</pre>

<p>A structure to model a named instance in a TrueType GX or OpenType variation font.</p>
<p>This structure can't be used for Adobe MM fonts.</p>

<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="coords">coords</td><td class="desc">
<p>The design coordinates for this instance. This is an array with one entry for each axis.</p>
</td></tr>
<tr><td class="val" id="strid">strid</td><td class="desc">
<p>The entry in &lsquo;name&rsquo; table identifying this instance.</p>
</td></tr>
<tr><td class="val" id="psid">psid</td><td class="desc">
<p>The entry in &lsquo;name&rsquo; table identifying a PostScript name for this instance. Value 0xFFFF indicates a missing entry.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_MM_Var">FT_MM_Var</h3>
<p>Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_MM_Var_
  {
    <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>              num_axis;
    <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>              num_designs;
    <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>              num_namedstyles;
    <a href="ft2-multiple_masters.html#FT_Var_Axis">FT_Var_Axis</a>*         axis;
    <a href="ft2-multiple_masters.html#FT_Var_Named_Style">FT_Var_Named_Style</a>*  namedstyle;

  } <b>FT_MM_Var</b>;
</pre>

<p>A structure to model the axes and space of an Adobe MM, TrueType GX, or OpenType variation font.</p>
<p>Some fields are specific to one format and not to the others.</p>

<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="num_axis">num_axis</td><td class="desc">
<p>The number of axes. The maximum value is&nbsp;4 for Adobe MM fonts; no limit in TrueType GX or OpenType variation fonts.</p>
</td></tr>
<tr><td class="val" id="num_designs">num_designs</td><td class="desc">
<p>The number of designs; should be normally 2^num_axis for Adobe MM fonts. Not meaningful for TrueType GX or OpenType variation fonts (where every glyph could have a different number of designs).</p>
</td></tr>
<tr><td class="val" id="num_namedstyles">num_namedstyles</td><td class="desc">
<p>The number of named styles; a &lsquo;named style&rsquo; is a tuple of design coordinates that has a string ID (in the &lsquo;name&rsquo; table) associated with it. The font can tell the user that, for example, [Weight=1.5,Width=1.1] is &lsquo;Bold&rsquo;. Another name for &lsquo;named style&rsquo; is &lsquo;named instance&rsquo;.</p>
<p>For Adobe Multiple Masters fonts, this value is always zero because the format does not support named styles.</p>
</td></tr>
<tr><td class="val" id="axis">axis</td><td class="desc">
<p>An axis descriptor table. TrueType GX and OpenType variation fonts contain slightly more data than Adobe MM fonts. Memory management of this pointer is done internally by FreeType.</p>
</td></tr>
<tr><td class="val" id="namedstyle">namedstyle</td><td class="desc">
<p>A named style (instance) table. Only meaningful for TrueType GX and OpenType variation fonts. Memory management of this pointer is done internally by FreeType.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Get_Multi_Master">FT_Get_Multi_Master</h3>
<p>Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Get_Multi_Master</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>           face,
                       <a href="ft2-multiple_masters.html#FT_Multi_Master">FT_Multi_Master</a>  *amaster );
</pre>

<p>Retrieve a variation descriptor of a given Adobe MM font.</p>
<p>This function can't be used with TrueType GX or OpenType variation fonts.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the source face.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="amaster">amaster</td><td class="desc">
<p>The Multiple Masters descriptor.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Get_MM_Var">FT_Get_MM_Var</h3>
<p>Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Get_MM_Var</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>      face,
                 <a href="ft2-multiple_masters.html#FT_MM_Var">FT_MM_Var</a>*  *amaster );
</pre>

<p>Retrieve a variation descriptor for a given font.</p>
<p>This function works with all supported variation formats.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the source face.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="amaster">amaster</td><td class="desc">
<p>The variation descriptor. Allocates a data structure, which the user must deallocate with a call to <a href="ft2-multiple_masters.html#FT_Done_MM_Var">FT_Done_MM_Var</a> after use.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Done_MM_Var">FT_Done_MM_Var</h3>
<p>Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Done_MM_Var</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a>   library,
                  <a href="ft2-multiple_masters.html#FT_MM_Var">FT_MM_Var</a>   *amaster );
</pre>

<p>Free the memory allocated by <a href="ft2-multiple_masters.html#FT_Get_MM_Var">FT_Get_MM_Var</a>.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle of the face's parent library object that was used in the call to <a href="ft2-multiple_masters.html#FT_Get_MM_Var">FT_Get_MM_Var</a> to create &lsquo;amaster&rsquo;.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Set_MM_Design_Coordinates">FT_Set_MM_Design_Coordinates</h3>
<p>Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Set_MM_Design_Coordinates</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>   face,
                                <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>   num_coords,
                                <a href="ft2-basic_types.html#FT_Long">FT_Long</a>*  coords );
</pre>

<p>For Adobe MM fonts, choose an interpolated font design through design coordinates.</p>
<p>This function can't be used with TrueType GX or OpenType variation fonts.</p>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the source face.</p>
</td></tr>
</table>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="num_coords">num_coords</td><td class="desc">
<p>The number of available design coordinates. If it is larger than the number of axes, ignore the excess values. If it is smaller than the number of axes, use default values for the remaining axes.</p>
</td></tr>
<tr><td class="val" id="coords">coords</td><td class="desc">
<p>An array of design coordinates.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>[Since 2.8.1] To reset all axes to the default values, call the function with &lsquo;num_coords&rsquo; set to zero and &lsquo;coords&rsquo; set to NULL.</p>
<p>[Since 2.9] If &lsquo;num_coords&rsquo; is larger than zero, this function sets the <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_VARIATION</a> bit in <a href="ft2-base_interface.html#FT_Face">FT_Face</a>'s &lsquo;face_flags&rsquo; field (i.e., <a href="ft2-base_interface.html#FT_IS_VARIATION">FT_IS_VARIATION</a> will return true). If &lsquo;num_coords&rsquo; is zero, this bit flag gets unset.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Set_Var_Design_Coordinates">FT_Set_Var_Design_Coordinates</h3>
<p>Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Set_Var_Design_Coordinates</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>    face,
                                 <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>    num_coords,
                                 <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>*  coords );
</pre>

<p>Choose an interpolated font design through design coordinates.</p>
<p>This function works with all supported variation formats.</p>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the source face.</p>
</td></tr>
</table>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="num_coords">num_coords</td><td class="desc">
<p>The number of available design coordinates. If it is larger than the number of axes, ignore the excess values. If it is smaller than the number of axes, use default values for the remaining axes.</p>
</td></tr>
<tr><td class="val" id="coords">coords</td><td class="desc">
<p>An array of design coordinates.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>[Since 2.8.1] To reset all axes to the default values, call the function with &lsquo;num_coords&rsquo; set to zero and &lsquo;coords&rsquo; set to NULL. [Since 2.9] &lsquo;Default values&rsquo; means the currently selected named instance (or the base font if no named instance is selected).</p>
<p>[Since 2.9] If &lsquo;num_coords&rsquo; is larger than zero, this function sets the <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_VARIATION</a> bit in <a href="ft2-base_interface.html#FT_Face">FT_Face</a>'s &lsquo;face_flags&rsquo; field (i.e., <a href="ft2-base_interface.html#FT_IS_VARIATION">FT_IS_VARIATION</a> will return true). If &lsquo;num_coords&rsquo; is zero, this bit flag gets unset.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Get_Var_Design_Coordinates">FT_Get_Var_Design_Coordinates</h3>
<p>Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Get_Var_Design_Coordinates</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>    face,
                                 <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>    num_coords,
                                 <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>*  coords );
</pre>

<p>Get the design coordinates of the currently selected interpolated font.</p>
<p>This function works with all supported variation formats.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the source face.</p>
</td></tr>
<tr><td class="val" id="num_coords">num_coords</td><td class="desc">
<p>The number of design coordinates to retrieve. If it is larger than the number of axes, set the excess values to&nbsp;0.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="coords">coords</td><td class="desc">
<p>The design coordinates array.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>since</h4>
<p>2.7.1</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Set_MM_Blend_Coordinates">FT_Set_MM_Blend_Coordinates</h3>
<p>Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Set_MM_Blend_Coordinates</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>    face,
                               <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>    num_coords,
                               <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>*  coords );
</pre>

<p>Choose an interpolated font design through normalized blend coordinates.</p>
<p>This function works with all supported variation formats.</p>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the source face.</p>
</td></tr>
</table>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="num_coords">num_coords</td><td class="desc">
<p>The number of available design coordinates. If it is larger than the number of axes, ignore the excess values. If it is smaller than the number of axes, use default values for the remaining axes.</p>
</td></tr>
<tr><td class="val" id="coords">coords</td><td class="desc">
<p>The design coordinates array (each element must be between 0 and 1.0 for Adobe MM fonts, and between -1.0 and 1.0 for TrueType GX and OpenType variation fonts).</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>[Since 2.8.1] To reset all axes to the default values, call the function with &lsquo;num_coords&rsquo; set to zero and &lsquo;coords&rsquo; set to NULL. [Since 2.9] &lsquo;Default values&rsquo; means the currently selected named instance (or the base font if no named instance is selected).</p>
<p>[Since 2.9] If &lsquo;num_coords&rsquo; is larger than zero, this function sets the <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_VARIATION</a> bit in <a href="ft2-base_interface.html#FT_Face">FT_Face</a>'s &lsquo;face_flags&rsquo; field (i.e., <a href="ft2-base_interface.html#FT_IS_VARIATION">FT_IS_VARIATION</a> will return true). If &lsquo;num_coords&rsquo; is zero, this bit flag gets unset.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Get_MM_Blend_Coordinates">FT_Get_MM_Blend_Coordinates</h3>
<p>Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Get_MM_Blend_Coordinates</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>    face,
                               <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>    num_coords,
                               <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>*  coords );
</pre>

<p>Get the normalized blend coordinates of the currently selected interpolated font.</p>
<p>This function works with all supported variation formats.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the source face.</p>
</td></tr>
<tr><td class="val" id="num_coords">num_coords</td><td class="desc">
<p>The number of normalized blend coordinates to retrieve. If it is larger than the number of axes, set the excess values to&nbsp;0.5 for Adobe MM fonts, and to&nbsp;0 for TrueType GX and OpenType variation fonts.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="coords">coords</td><td class="desc">
<p>The normalized blend coordinates array.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>since</h4>
<p>2.7.1</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Set_Var_Blend_Coordinates">FT_Set_Var_Blend_Coordinates</h3>
<p>Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Set_Var_Blend_Coordinates</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>    face,
                                <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>    num_coords,
                                <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>*  coords );
</pre>

<p>This is another name of <a href="ft2-multiple_masters.html#FT_Set_MM_Blend_Coordinates">FT_Set_MM_Blend_Coordinates</a>.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Get_Var_Blend_Coordinates">FT_Get_Var_Blend_Coordinates</h3>
<p>Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Get_Var_Blend_Coordinates</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>    face,
                                <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>    num_coords,
                                <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>*  coords );
</pre>

<p>This is another name of <a href="ft2-multiple_masters.html#FT_Get_MM_Blend_Coordinates">FT_Get_MM_Blend_Coordinates</a>.</p>

<h4>since</h4>
<p>2.7.1</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_VAR_AXIS_FLAG_XXX">FT_VAR_AXIS_FLAG_XXX</h3>
<p>Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).</p>
<pre>
#define <a href="ft2-multiple_masters.html#FT_VAR_AXIS_FLAG_HIDDEN">FT_VAR_AXIS_FLAG_HIDDEN</a>  1
</pre>

<p>A list of bit flags used in the return value of <a href="ft2-multiple_masters.html#FT_Get_Var_Axis_Flags">FT_Get_Var_Axis_Flags</a>.</p>

<h4>values</h4>
<table class="fields">
<tr><td class="val" id="FT_VAR_AXIS_FLAG_HIDDEN">FT_VAR_AXIS_FLAG_HIDDEN</td><td class="desc">
<p>The variation axis should not be exposed to user interfaces.</p>
</td></tr>
</table>

<h4>since</h4>
<p>2.8.1</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Get_Var_Axis_Flags">FT_Get_Var_Axis_Flags</h3>
<p>Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Get_Var_Axis_Flags</b>( <a href="ft2-multiple_masters.html#FT_MM_Var">FT_MM_Var</a>*  master,
                         <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>     axis_index,
                         <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>*    flags );
</pre>

<p>Get the &lsquo;flags&rsquo; field of an OpenType Variation Axis Record.</p>
<p>Not meaningful for Adobe MM fonts (&lsquo;*flags&rsquo; is always zero).</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="master">master</td><td class="desc">
<p>The variation descriptor.</p>
</td></tr>
<tr><td class="val" id="axis_index">axis_index</td><td class="desc">
<p>The index of the requested variation axis.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="flags">flags</td><td class="desc">
<p>The &lsquo;flags&rsquo; field. See <a href="ft2-multiple_masters.html#FT_VAR_AXIS_FLAG_XXX">FT_VAR_AXIS_FLAG_XXX</a> for possible values.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>since</h4>
<p>2.8.1</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Set_Named_Instance">FT_Set_Named_Instance</h3>
<p>Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Set_Named_Instance</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>  face,
                         <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>  instance_index );
</pre>

<p>Set or change the current named instance.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the source face.</p>
</td></tr>
<tr><td class="val" id="instance_index">instance_index</td><td class="desc">
<p>The index of the requested instance, starting with value 1. If set to value 0, FreeType switches to font access without a named instance.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>The function uses the value of &lsquo;instance_index&rsquo; to set bits 16-30 of the face's &lsquo;face_index&rsquo; field. It also resets any variation applied to the font, and the <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_VARIATION</a> bit of the face's &lsquo;face_flags&rsquo; field gets reset to zero (i.e., <a href="ft2-base_interface.html#FT_IS_VARIATION">FT_IS_VARIATION</a> will return false).</p>
<p>For Adobe MM fonts (which don't have named instances) this function simply resets the current face to the default instance.</p>

<h4>since</h4>
<p>2.9</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

</body>
</html>
reference/ft2-ot_validation.html000064400000025436151706766400012743 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF;
         width: 87%;
         margin: auto; }

  div.section { width: 75%;
                margin: auto; }
  div.section hr { margin: 4ex 0 1ex 0; }
  div.section h4 { background-color: #EEEEFF;
                   font-size: medium;
                   font-style: oblique;
                   font-weight: bold;
                   margin: 3ex 0 1.5ex 9%;
                   padding: 0.3ex 0 0.3ex 1%; }
  div.section p { margin: 1.5ex 0 1.5ex 10%; }
  div.section pre { margin: 3ex 0 3ex 9%;
                    background-color: #D6E8FF;
                    padding: 2ex 0 2ex 1%; }
  div.section table.fields { width: 90%;
                             margin: 1.5ex 0 1.5ex 10%; }
  div.section table.toc { width: 95%;
                          margin: 1.5ex 0 1.5ex 5%; }
  div.timestamp { text-align: center;
                  font-size: 69%;
                  margin: 1.5ex 0 1.5ex 0; }

  h1 { text-align: center; }
  h3 { font-size: medium;
       margin: 4ex 0 1.5ex 0; }

  p { text-align: justify; }

  pre.colored { color: blue; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  table.fields td.val { font-weight: bold;
                        text-align: right;
                        width: 30%;
                        vertical-align: baseline;
                        padding: 1ex 1em 1ex 0; }
  table.fields td.desc { vertical-align: baseline;
                         padding: 1ex 0 1ex 1em; }
  table.fields td.desc p:first-child { margin: 0; }
  table.fields td.desc p { margin: 1.5ex 0 0 0; }
  table.index { margin: 6ex auto 6ex auto;
                border: 0;
                border-collapse: separate;
                border-spacing: 1em 0.3ex; }
  table.index tr { padding: 0; }
  table.index td { padding: 0; }
  table.index-toc-link { width: 100%;
                         border: 0;
                         border-spacing: 0;
                         margin: 1ex 0 1ex 0; }
  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
                                 font-size: 83%;
                                 text-align: left; }
  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
                                   font-size: 83%;
                                   text-align: center; }
  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
                                  font-size: 83%;
                                  text-align: right; }
  table.synopsis { margin: 6ex auto 6ex auto;
                   border: 0;
                   border-collapse: separate;
                   border-spacing: 2em 0.6ex; }
  table.synopsis tr { padding: 0; }
  table.synopsis td { padding: 0; }
  table.toc td.link { width: 30%;
                      text-align: right;
                      vertical-align: baseline;
                      padding: 1ex 1em 1ex 0; }
  table.toc td.desc { vertical-align: baseline;
                      padding: 1ex 0 1ex 1em;
                      text-align: left; }
  table.toc td.desc p:first-child { margin: 0;
                                    text-align: left; }
  table.toc td.desc p { margin: 1.5ex 0 0 0;
                        text-align: left; }

</style>
</head>
<body>

<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
<h1>FreeType-2.9.1 API Reference</h1>

<h1 id="ot_validation">OpenType Validation</h1>
<h2>Synopsis</h2>
<table class="synopsis">
<tr><td><a href="#FT_OpenType_Validate">FT_OpenType_Validate</a></td><td>&nbsp;</td><td></td></tr>
<tr><td><a href="#FT_OpenType_Free">FT_OpenType_Free</a></td><td><a href="#FT_VALIDATE_OTXXX">FT_VALIDATE_OTXXX</a></td><td></td></tr>
</table>


<p>This section contains the declaration of functions to validate some OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH).</p>

<div class="section">
<h3 id="FT_OpenType_Validate">FT_OpenType_Validate</h3>
<p>Defined in FT_OPENTYPE_VALIDATE_H (freetype/ftotval.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_OpenType_Validate</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>    face,
                        <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>    validation_flags,
                        <a href="ft2-basic_types.html#FT_Bytes">FT_Bytes</a>  *BASE_table,
                        <a href="ft2-basic_types.html#FT_Bytes">FT_Bytes</a>  *GDEF_table,
                        <a href="ft2-basic_types.html#FT_Bytes">FT_Bytes</a>  *GPOS_table,
                        <a href="ft2-basic_types.html#FT_Bytes">FT_Bytes</a>  *GSUB_table,
                        <a href="ft2-basic_types.html#FT_Bytes">FT_Bytes</a>  *JSTF_table );
</pre>

<p>Validate various OpenType tables to assure that all offsets and indices are valid. The idea is that a higher-level library that actually does the text layout can access those tables without error checking (which can be quite time consuming).</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the input face.</p>
</td></tr>
<tr><td class="val" id="validation_flags">validation_flags</td><td class="desc">
<p>A bit field that specifies the tables to be validated. See <a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_OTXXX</a> for possible values.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="BASE_table">BASE_table</td><td class="desc">
<p>A pointer to the BASE table.</p>
</td></tr>
<tr><td class="val" id="GDEF_table">GDEF_table</td><td class="desc">
<p>A pointer to the GDEF table.</p>
</td></tr>
<tr><td class="val" id="GPOS_table">GPOS_table</td><td class="desc">
<p>A pointer to the GPOS table.</p>
</td></tr>
<tr><td class="val" id="GSUB_table">GSUB_table</td><td class="desc">
<p>A pointer to the GSUB table.</p>
</td></tr>
<tr><td class="val" id="JSTF_table">JSTF_table</td><td class="desc">
<p>A pointer to the JSTF table.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>This function only works with OpenType fonts, returning an error otherwise.</p>
<p>After use, the application should deallocate the five tables with <a href="ft2-ot_validation.html#FT_OpenType_Free">FT_OpenType_Free</a>. A NULL value indicates that the table either doesn't exist in the font, or the application hasn't asked for validation.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_OpenType_Free">FT_OpenType_Free</h3>
<p>Defined in FT_OPENTYPE_VALIDATE_H (freetype/ftotval.h).</p>
<pre>
  FT_EXPORT( <span class="keyword">void</span> )
  <b>FT_OpenType_Free</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>   face,
                    <a href="ft2-basic_types.html#FT_Bytes">FT_Bytes</a>  table );
</pre>

<p>Free the buffer allocated by OpenType validator.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the input face.</p>
</td></tr>
<tr><td class="val" id="table">table</td><td class="desc">
<p>The pointer to the buffer that is allocated by <a href="ft2-ot_validation.html#FT_OpenType_Validate">FT_OpenType_Validate</a>.</p>
</td></tr>
</table>

<h4>note</h4>
<p>This function must be used to free the buffer allocated by <a href="ft2-ot_validation.html#FT_OpenType_Validate">FT_OpenType_Validate</a> only.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_VALIDATE_OTXXX">FT_VALIDATE_OTXXX</h3>
<p>Defined in FT_OPENTYPE_VALIDATE_H (freetype/ftotval.h).</p>
<pre>
#define <a href="ft2-ot_validation.html#FT_VALIDATE_BASE">FT_VALIDATE_BASE</a>  0x0100
#define <a href="ft2-ot_validation.html#FT_VALIDATE_GDEF">FT_VALIDATE_GDEF</a>  0x0200
#define <a href="ft2-ot_validation.html#FT_VALIDATE_GPOS">FT_VALIDATE_GPOS</a>  0x0400
#define <a href="ft2-ot_validation.html#FT_VALIDATE_GSUB">FT_VALIDATE_GSUB</a>  0x0800
#define <a href="ft2-ot_validation.html#FT_VALIDATE_JSTF">FT_VALIDATE_JSTF</a>  0x1000
#define <a href="ft2-ot_validation.html#FT_VALIDATE_MATH">FT_VALIDATE_MATH</a>  0x2000

#define <a href="ft2-ot_validation.html#FT_VALIDATE_OT">FT_VALIDATE_OT</a>  ( <a href="ft2-ot_validation.html#FT_VALIDATE_BASE">FT_VALIDATE_BASE</a> | \
                          <a href="ft2-ot_validation.html#FT_VALIDATE_GDEF">FT_VALIDATE_GDEF</a> | \
                          <a href="ft2-ot_validation.html#FT_VALIDATE_GPOS">FT_VALIDATE_GPOS</a> | \
                          <a href="ft2-ot_validation.html#FT_VALIDATE_GSUB">FT_VALIDATE_GSUB</a> | \
                          <a href="ft2-ot_validation.html#FT_VALIDATE_JSTF">FT_VALIDATE_JSTF</a> | \
                          <a href="ft2-ot_validation.html#FT_VALIDATE_MATH">FT_VALIDATE_MATH</a> )
</pre>

<p>A list of bit-field constants used with <a href="ft2-ot_validation.html#FT_OpenType_Validate">FT_OpenType_Validate</a> to indicate which OpenType tables should be validated.</p>

<h4>values</h4>
<table class="fields">
<tr><td class="val" id="FT_VALIDATE_BASE">FT_VALIDATE_BASE</td><td class="desc">
<p>Validate BASE table.</p>
</td></tr>
<tr><td class="val" id="FT_VALIDATE_GDEF">FT_VALIDATE_GDEF</td><td class="desc">
<p>Validate GDEF table.</p>
</td></tr>
<tr><td class="val" id="FT_VALIDATE_GPOS">FT_VALIDATE_GPOS</td><td class="desc">
<p>Validate GPOS table.</p>
</td></tr>
<tr><td class="val" id="FT_VALIDATE_GSUB">FT_VALIDATE_GSUB</td><td class="desc">
<p>Validate GSUB table.</p>
</td></tr>
<tr><td class="val" id="FT_VALIDATE_JSTF">FT_VALIDATE_JSTF</td><td class="desc">
<p>Validate JSTF table.</p>
</td></tr>
<tr><td class="val" id="FT_VALIDATE_MATH">FT_VALIDATE_MATH</td><td class="desc">
<p>Validate MATH table.</p>
</td></tr>
<tr><td class="val" id="FT_VALIDATE_OT">FT_VALIDATE_OT</td><td class="desc">
<p>Validate all OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH).</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

</body>
</html>
reference/ft2-outline_processing.html000064400000143666151706766400014030 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF;
         width: 87%;
         margin: auto; }

  div.section { width: 75%;
                margin: auto; }
  div.section hr { margin: 4ex 0 1ex 0; }
  div.section h4 { background-color: #EEEEFF;
                   font-size: medium;
                   font-style: oblique;
                   font-weight: bold;
                   margin: 3ex 0 1.5ex 9%;
                   padding: 0.3ex 0 0.3ex 1%; }
  div.section p { margin: 1.5ex 0 1.5ex 10%; }
  div.section pre { margin: 3ex 0 3ex 9%;
                    background-color: #D6E8FF;
                    padding: 2ex 0 2ex 1%; }
  div.section table.fields { width: 90%;
                             margin: 1.5ex 0 1.5ex 10%; }
  div.section table.toc { width: 95%;
                          margin: 1.5ex 0 1.5ex 5%; }
  div.timestamp { text-align: center;
                  font-size: 69%;
                  margin: 1.5ex 0 1.5ex 0; }

  h1 { text-align: center; }
  h3 { font-size: medium;
       margin: 4ex 0 1.5ex 0; }

  p { text-align: justify; }

  pre.colored { color: blue; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  table.fields td.val { font-weight: bold;
                        text-align: right;
                        width: 30%;
                        vertical-align: baseline;
                        padding: 1ex 1em 1ex 0; }
  table.fields td.desc { vertical-align: baseline;
                         padding: 1ex 0 1ex 1em; }
  table.fields td.desc p:first-child { margin: 0; }
  table.fields td.desc p { margin: 1.5ex 0 0 0; }
  table.index { margin: 6ex auto 6ex auto;
                border: 0;
                border-collapse: separate;
                border-spacing: 1em 0.3ex; }
  table.index tr { padding: 0; }
  table.index td { padding: 0; }
  table.index-toc-link { width: 100%;
                         border: 0;
                         border-spacing: 0;
                         margin: 1ex 0 1ex 0; }
  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
                                 font-size: 83%;
                                 text-align: left; }
  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
                                   font-size: 83%;
                                   text-align: center; }
  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
                                  font-size: 83%;
                                  text-align: right; }
  table.synopsis { margin: 6ex auto 6ex auto;
                   border: 0;
                   border-collapse: separate;
                   border-spacing: 2em 0.6ex; }
  table.synopsis tr { padding: 0; }
  table.synopsis td { padding: 0; }
  table.toc td.link { width: 30%;
                      text-align: right;
                      vertical-align: baseline;
                      padding: 1ex 1em 1ex 0; }
  table.toc td.desc { vertical-align: baseline;
                      padding: 1ex 0 1ex 1em;
                      text-align: left; }
  table.toc td.desc p:first-child { margin: 0;
                                    text-align: left; }
  table.toc td.desc p { margin: 1.5ex 0 0 0;
                        text-align: left; }

</style>
</head>
<body>

<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
<h1>FreeType-2.9.1 API Reference</h1>

<h1 id="outline_processing">Outline Processing</h1>
<h2>Synopsis</h2>
<table class="synopsis">
<tr><td><a href="#FT_Outline">FT_Outline</a></td><td><a href="#FT_Outline_Get_Bitmap">FT_Outline_Get_Bitmap</a></td></tr>
<tr><td><a href="#FT_Outline_New">FT_Outline_New</a></td><td><a href="#FT_Outline_Render">FT_Outline_Render</a></td></tr>
<tr><td><a href="#FT_Outline_Done">FT_Outline_Done</a></td><td><a href="#FT_Outline_Decompose">FT_Outline_Decompose</a></td></tr>
<tr><td><a href="#FT_Outline_Copy">FT_Outline_Copy</a></td><td><a href="#FT_Outline_Funcs">FT_Outline_Funcs</a></td></tr>
<tr><td><a href="#FT_Outline_Translate">FT_Outline_Translate</a></td><td><a href="#FT_Outline_MoveToFunc">FT_Outline_MoveToFunc</a></td></tr>
<tr><td><a href="#FT_Outline_Transform">FT_Outline_Transform</a></td><td><a href="#FT_Outline_LineToFunc">FT_Outline_LineToFunc</a></td></tr>
<tr><td><a href="#FT_Outline_Embolden">FT_Outline_Embolden</a></td><td><a href="#FT_Outline_ConicToFunc">FT_Outline_ConicToFunc</a></td></tr>
<tr><td><a href="#FT_Outline_EmboldenXY">FT_Outline_EmboldenXY</a></td><td><a href="#FT_Outline_CubicToFunc">FT_Outline_CubicToFunc</a></td></tr>
<tr><td><a href="#FT_Outline_Reverse">FT_Outline_Reverse</a></td><td>&nbsp;</td></tr>
<tr><td><a href="#FT_Outline_Check">FT_Outline_Check</a></td><td><a href="#FT_Orientation">FT_Orientation</a></td></tr>
<tr><td>&nbsp;</td><td><a href="#FT_Outline_Get_Orientation">FT_Outline_Get_Orientation</a></td></tr>
<tr><td><a href="#FT_Outline_Get_CBox">FT_Outline_Get_CBox</a></td><td>&nbsp;</td></tr>
<tr><td><a href="#FT_Outline_Get_BBox">FT_Outline_Get_BBox</a></td><td><a href="#FT_OUTLINE_XXX">FT_OUTLINE_XXX</a></td></tr>
<tr><td>&nbsp;</td><td></td></tr>
</table>


<p>This section contains routines used to create and destroy scalable glyph images known as &lsquo;outlines&rsquo;. These can also be measured, transformed, and converted into bitmaps and pixmaps.</p>

<div class="section">
<h3 id="FT_Outline">FT_Outline</h3>
<p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_Outline_
  {
    <span class="keyword">short</span>       n_contours;      /* number of contours in glyph        */
    <span class="keyword">short</span>       n_points;        /* number of points in the glyph      */

    <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>*  points;          /* the outline's points               */
    <span class="keyword">char</span>*       tags;            /* the points flags                   */
    <span class="keyword">short</span>*      contours;        /* the contour end points             */

    <span class="keyword">int</span>         flags;           /* outline masks                      */

  } <b>FT_Outline</b>;
</pre>

<p>This structure is used to describe an outline to the scan-line converter.</p>

<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="n_contours">n_contours</td><td class="desc">
<p>The number of contours in the outline.</p>
</td></tr>
<tr><td class="val" id="n_points">n_points</td><td class="desc">
<p>The number of points in the outline.</p>
</td></tr>
<tr><td class="val" id="points">points</td><td class="desc">
<p>A pointer to an array of &lsquo;n_points&rsquo; <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a> elements, giving the outline's point coordinates.</p>
</td></tr>
<tr><td class="val" id="tags">tags</td><td class="desc">
<p>A pointer to an array of &lsquo;n_points&rsquo; chars, giving each outline point's type.</p>
<p>If bit&nbsp;0 is unset, the point is &lsquo;off&rsquo; the curve, i.e., a Bezier control point, while it is &lsquo;on&rsquo; if set.</p>
<p>Bit&nbsp;1 is meaningful for &lsquo;off&rsquo; points only. If set, it indicates a third-order Bezier arc control point; and a second-order control point if unset.</p>
<p>If bit&nbsp;2 is set, bits 5-7 contain the drop-out mode (as defined in the OpenType specification; the value is the same as the argument to the SCANMODE instruction).</p>
<p>Bits 3 and&nbsp;4 are reserved for internal purposes.</p>
</td></tr>
<tr><td class="val" id="contours">contours</td><td class="desc">
<p>An array of &lsquo;n_contours&rsquo; shorts, giving the end point of each contour within the outline. For example, the first contour is defined by the points &lsquo;0&rsquo; to &lsquo;contours[0]&rsquo;, the second one is defined by the points &lsquo;contours[0]+1&rsquo; to &lsquo;contours[1]&rsquo;, etc.</p>
</td></tr>
<tr><td class="val" id="flags">flags</td><td class="desc">
<p>A set of bit flags used to characterize the outline and give hints to the scan-converter and hinter on how to convert/grid-fit it. See <a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_XXX</a>.</p>
</td></tr>
</table>

<h4>note</h4>
<p>The B/W rasterizer only checks bit&nbsp;2 in the &lsquo;tags&rsquo; array for the first point of each contour. The drop-out mode as given with <a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_IGNORE_DROPOUTS</a>, <a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_SMART_DROPOUTS</a>, and <a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_INCLUDE_STUBS</a> in &lsquo;flags&rsquo; is then overridden.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Outline_New">FT_Outline_New</h3>
<p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Outline_New</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a>   library,
                  <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>      numPoints,
                  <a href="ft2-basic_types.html#FT_Int">FT_Int</a>       numContours,
                  <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>  *anoutline );


  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  FT_Outline_New_Internal( <a href="ft2-system_interface.html#FT_Memory">FT_Memory</a>    memory,
                           <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>      numPoints,
                           <a href="ft2-basic_types.html#FT_Int">FT_Int</a>       numContours,
                           <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>  *anoutline );
</pre>

<p>Create a new outline of a given size.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to the library object from where the outline is allocated. Note however that the new outline will <b>not</b> necessarily be <b>freed</b>, when destroying the library, by <a href="ft2-base_interface.html#FT_Done_FreeType">FT_Done_FreeType</a>.</p>
</td></tr>
<tr><td class="val" id="numPoints">numPoints</td><td class="desc">
<p>The maximum number of points within the outline. Must be smaller than or equal to 0xFFFF (65535).</p>
</td></tr>
<tr><td class="val" id="numContours">numContours</td><td class="desc">
<p>The maximum number of contours within the outline. This value must be in the range 0 to &lsquo;numPoints&rsquo;.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="anoutline">anoutline</td><td class="desc">
<p>A handle to the new outline.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>The reason why this function takes a &lsquo;library&rsquo; parameter is simply to use the library's memory allocator.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Outline_Done">FT_Outline_Done</h3>
<p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Outline_Done</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a>   library,
                   <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>*  outline );


  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  FT_Outline_Done_Internal( <a href="ft2-system_interface.html#FT_Memory">FT_Memory</a>    memory,
                            <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>*  outline );
</pre>

<p>Destroy an outline created with <a href="ft2-outline_processing.html#FT_Outline_New">FT_Outline_New</a>.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle of the library object used to allocate the outline.</p>
</td></tr>
<tr><td class="val" id="outline">outline</td><td class="desc">
<p>A pointer to the outline object to be discarded.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>If the outline's &lsquo;owner&rsquo; field is not set, only the outline descriptor will be released.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Outline_Copy">FT_Outline_Copy</h3>
<p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Outline_Copy</b>( <span class="keyword">const</span> <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>*  source,
                   <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>        *target );
</pre>

<p>Copy an outline into another one. Both objects must have the same sizes (number of points &amp; number of contours) when this function is called.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="source">source</td><td class="desc">
<p>A handle to the source outline.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="target">target</td><td class="desc">
<p>A handle to the target outline.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Outline_Translate">FT_Outline_Translate</h3>
<p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
<pre>
  FT_EXPORT( <span class="keyword">void</span> )
  <b>FT_Outline_Translate</b>( <span class="keyword">const</span> <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>*  outline,
                        <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a>             xOffset,
                        <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a>             yOffset );
</pre>

<p>Apply a simple translation to the points of an outline.</p>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="outline">outline</td><td class="desc">
<p>A pointer to the target outline descriptor.</p>
</td></tr>
</table>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="xOffset">xOffset</td><td class="desc">
<p>The horizontal offset.</p>
</td></tr>
<tr><td class="val" id="yOffset">yOffset</td><td class="desc">
<p>The vertical offset.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Outline_Transform">FT_Outline_Transform</h3>
<p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
<pre>
  FT_EXPORT( <span class="keyword">void</span> )
  <b>FT_Outline_Transform</b>( <span class="keyword">const</span> <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>*  outline,
                        <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Matrix">FT_Matrix</a>*   matrix );
</pre>

<p>Apply a simple 2x2 matrix to all of an outline's points. Useful for applying rotations, slanting, flipping, etc.</p>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="outline">outline</td><td class="desc">
<p>A pointer to the target outline descriptor.</p>
</td></tr>
</table>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="matrix">matrix</td><td class="desc">
<p>A pointer to the transformation matrix.</p>
</td></tr>
</table>

<h4>note</h4>
<p>You can use <a href="ft2-outline_processing.html#FT_Outline_Translate">FT_Outline_Translate</a> if you need to translate the outline's points.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Outline_Embolden">FT_Outline_Embolden</h3>
<p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Outline_Embolden</b>( <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>*  outline,
                       <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a>       strength );
</pre>

<p>Embolden an outline. The new outline will be at most 4&nbsp;times &lsquo;strength&rsquo; pixels wider and higher. You may think of the left and bottom borders as unchanged.</p>
<p>Negative &lsquo;strength&rsquo; values to reduce the outline thickness are possible also.</p>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="outline">outline</td><td class="desc">
<p>A handle to the target outline.</p>
</td></tr>
</table>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="strength">strength</td><td class="desc">
<p>How strong the glyph is emboldened. Expressed in 26.6 pixel format.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>The used algorithm to increase or decrease the thickness of the glyph doesn't change the number of points; this means that certain situations like acute angles or intersections are sometimes handled incorrectly.</p>
<p>If you need &lsquo;better&rsquo; metrics values you should call <a href="ft2-outline_processing.html#FT_Outline_Get_CBox">FT_Outline_Get_CBox</a> or <a href="ft2-outline_processing.html#FT_Outline_Get_BBox">FT_Outline_Get_BBox</a>.</p>
<p>Example call:</p>
<pre class="colored">
  FT_Load_Glyph( face, index, FT_LOAD_DEFAULT );
  if ( face-&gt;glyph-&gt;format == FT_GLYPH_FORMAT_OUTLINE )
    FT_Outline_Embolden( &amp;face-&gt;glyph-&gt;outline, strength );
</pre>
<p>To get meaningful results, font scaling values must be set with functions like <a href="ft2-base_interface.html#FT_Set_Char_Size">FT_Set_Char_Size</a> before calling FT_Render_Glyph.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Outline_EmboldenXY">FT_Outline_EmboldenXY</h3>
<p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Outline_EmboldenXY</b>( <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>*  outline,
                         <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a>       xstrength,
                         <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a>       ystrength );
</pre>

<p>Embolden an outline. The new outline will be &lsquo;xstrength&rsquo; pixels wider and &lsquo;ystrength&rsquo; pixels higher. Otherwise, it is similar to <a href="ft2-outline_processing.html#FT_Outline_Embolden">FT_Outline_Embolden</a>, which uses the same strength in both directions.</p>

<h4>since</h4>
<p>2.4.10</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Outline_Reverse">FT_Outline_Reverse</h3>
<p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
<pre>
  FT_EXPORT( <span class="keyword">void</span> )
  <b>FT_Outline_Reverse</b>( <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>*  outline );
</pre>

<p>Reverse the drawing direction of an outline. This is used to ensure consistent fill conventions for mirrored glyphs.</p>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="outline">outline</td><td class="desc">
<p>A pointer to the target outline descriptor.</p>
</td></tr>
</table>

<h4>note</h4>
<p>This function toggles the bit flag <a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_REVERSE_FILL</a> in the outline's &lsquo;flags&rsquo; field.</p>
<p>It shouldn't be used by a normal client application, unless it knows what it is doing.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Outline_Check">FT_Outline_Check</h3>
<p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Outline_Check</b>( <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>*  outline );
</pre>

<p>Check the contents of an outline descriptor.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="outline">outline</td><td class="desc">
<p>A handle to a source outline.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>An empty outline, or an outline with a single point only is also valid.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Outline_Get_CBox">FT_Outline_Get_CBox</h3>
<p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
<pre>
  FT_EXPORT( <span class="keyword">void</span> )
  <b>FT_Outline_Get_CBox</b>( <span class="keyword">const</span> <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>*  outline,
                       <a href="ft2-basic_types.html#FT_BBox">FT_BBox</a>           *acbox );
</pre>

<p>Return an outline's &lsquo;control box&rsquo;. The control box encloses all the outline's points, including Bezier control points. Though it coincides with the exact bounding box for most glyphs, it can be slightly larger in some situations (like when rotating an outline that contains Bezier outside arcs).</p>
<p>Computing the control box is very fast, while getting the bounding box can take much more time as it needs to walk over all segments and arcs in the outline. To get the latter, you can use the &lsquo;ftbbox&rsquo; component, which is dedicated to this single task.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="outline">outline</td><td class="desc">
<p>A pointer to the source outline descriptor.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="acbox">acbox</td><td class="desc">
<p>The outline's control box.</p>
</td></tr>
</table>

<h4>note</h4>
<p>See <a href="ft2-glyph_management.html#FT_Glyph_Get_CBox">FT_Glyph_Get_CBox</a> for a discussion of tricky fonts.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Outline_Get_BBox">FT_Outline_Get_BBox</h3>
<p>Defined in FT_BBOX_H (freetype/ftbbox.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Outline_Get_BBox</b>( <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>*  outline,
                       <a href="ft2-basic_types.html#FT_BBox">FT_BBox</a>     *abbox );
</pre>

<p>Compute the exact bounding box of an outline. This is slower than computing the control box. However, it uses an advanced algorithm that returns <i>very</i> quickly when the two boxes coincide. Otherwise, the outline Bezier arcs are traversed to extract their extrema.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="outline">outline</td><td class="desc">
<p>A pointer to the source outline.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="abbox">abbox</td><td class="desc">
<p>The outline's exact bounding box.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>If the font is tricky and the glyph has been loaded with <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a>, the resulting BBox is meaningless. To get reasonable values for the BBox it is necessary to load the glyph at a large ppem value (so that the hinting instructions can properly shift and scale the subglyphs), then extracting the BBox, which can be eventually converted back to font units.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Outline_Get_Bitmap">FT_Outline_Get_Bitmap</h3>
<p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Outline_Get_Bitmap</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a>        library,
                         <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>*       outline,
                         <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a>  *abitmap );
</pre>

<p>Render an outline within a bitmap. The outline's image is simply OR-ed to the target bitmap.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to a FreeType library object.</p>
</td></tr>
<tr><td class="val" id="outline">outline</td><td class="desc">
<p>A pointer to the source outline descriptor.</p>
</td></tr>
</table>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="abitmap">abitmap</td><td class="desc">
<p>A pointer to the target bitmap descriptor.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>This function does NOT CREATE the bitmap, it only renders an outline image within the one you pass to it! Consequently, the various fields in &lsquo;abitmap&rsquo; should be set accordingly.</p>
<p>It will use the raster corresponding to the default glyph format.</p>
<p>The value of the &lsquo;num_grays&rsquo; field in &lsquo;abitmap&rsquo; is ignored. If you select the gray-level rasterizer, and you want less than 256 gray levels, you have to use <a href="ft2-outline_processing.html#FT_Outline_Render">FT_Outline_Render</a> directly.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Outline_Render">FT_Outline_Render</h3>
<p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Outline_Render</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a>         library,
                     <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>*        outline,
                     <a href="ft2-raster.html#FT_Raster_Params">FT_Raster_Params</a>*  params );
</pre>

<p>Render an outline within a bitmap using the current scan-convert. This function uses an <a href="ft2-raster.html#FT_Raster_Params">FT_Raster_Params</a> structure as an argument, allowing advanced features like direct composition, translucency, etc.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to a FreeType library object.</p>
</td></tr>
<tr><td class="val" id="outline">outline</td><td class="desc">
<p>A pointer to the source outline descriptor.</p>
</td></tr>
</table>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="params">params</td><td class="desc">
<p>A pointer to an <a href="ft2-raster.html#FT_Raster_Params">FT_Raster_Params</a> structure used to describe the rendering operation.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>You should know what you are doing and how <a href="ft2-raster.html#FT_Raster_Params">FT_Raster_Params</a> works to use this function.</p>
<p>The field &lsquo;params.source&rsquo; will be set to &lsquo;outline&rsquo; before the scan converter is called, which means that the value you give to it is actually ignored.</p>
<p>The gray-level rasterizer always uses 256 gray levels. If you want less gray levels, you have to provide your own span callback. See the <a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_DIRECT</a> value of the &lsquo;flags&rsquo; field in the <a href="ft2-raster.html#FT_Raster_Params">FT_Raster_Params</a> structure for more details.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Outline_Decompose">FT_Outline_Decompose</h3>
<p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Outline_Decompose</b>( <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>*              outline,
                        <span class="keyword">const</span> <a href="ft2-outline_processing.html#FT_Outline_Funcs">FT_Outline_Funcs</a>*  func_interface,
                        <span class="keyword">void</span>*                    user );
</pre>

<p>Walk over an outline's structure to decompose it into individual segments and Bezier arcs. This function also emits &lsquo;move to&rsquo; operations to indicate the start of new contours in the outline.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="outline">outline</td><td class="desc">
<p>A pointer to the source target.</p>
</td></tr>
<tr><td class="val" id="func_interface">func_interface</td><td class="desc">
<p>A table of &lsquo;emitters&rsquo;, i.e., function pointers called during decomposition to indicate path operations.</p>
</td></tr>
</table>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="user">user</td><td class="desc">
<p>A typeless pointer that is passed to each emitter during the decomposition. It can be used to store the state during the decomposition.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>A contour that contains a single point only is represented by a &lsquo;move to&rsquo; operation followed by &lsquo;line to&rsquo; to the same point. In most cases, it is best to filter this out before using the outline for stroking purposes (otherwise it would result in a visible dot when round caps are used).</p>
<p>Similarly, the function returns success for an empty outline also (doing nothing, this is, not calling any emitter); if necessary, you should filter this out, too.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Outline_Funcs">FT_Outline_Funcs</h3>
<p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_Outline_Funcs_
  {
    <a href="ft2-outline_processing.html#FT_Outline_MoveToFunc">FT_Outline_MoveToFunc</a>   move_to;
    <a href="ft2-outline_processing.html#FT_Outline_LineToFunc">FT_Outline_LineToFunc</a>   line_to;
    <a href="ft2-outline_processing.html#FT_Outline_ConicToFunc">FT_Outline_ConicToFunc</a>  conic_to;
    <a href="ft2-outline_processing.html#FT_Outline_CubicToFunc">FT_Outline_CubicToFunc</a>  cubic_to;

    <span class="keyword">int</span>                     shift;
    <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a>                  delta;

  } <b>FT_Outline_Funcs</b>;
</pre>

<p>A structure to hold various function pointers used during outline decomposition in order to emit segments, conic, and cubic Beziers.</p>

<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="move_to">move_to</td><td class="desc">
<p>The &lsquo;move to&rsquo; emitter.</p>
</td></tr>
<tr><td class="val" id="line_to">line_to</td><td class="desc">
<p>The segment emitter.</p>
</td></tr>
<tr><td class="val" id="conic_to">conic_to</td><td class="desc">
<p>The second-order Bezier arc emitter.</p>
</td></tr>
<tr><td class="val" id="cubic_to">cubic_to</td><td class="desc">
<p>The third-order Bezier arc emitter.</p>
</td></tr>
<tr><td class="val" id="shift">shift</td><td class="desc">
<p>The shift that is applied to coordinates before they are sent to the emitter.</p>
</td></tr>
<tr><td class="val" id="delta">delta</td><td class="desc">
<p>The delta that is applied to coordinates before they are sent to the emitter, but after the shift.</p>
</td></tr>
</table>

<h4>note</h4>
<p>The point coordinates sent to the emitters are the transformed version of the original coordinates (this is important for high accuracy during scan-conversion). The transformation is simple:</p>
<pre class="colored">
  x' = (x &lt;&lt; shift) - delta
  y' = (y &lt;&lt; shift) - delta
</pre>
<p>Set the values of &lsquo;shift&rsquo; and &lsquo;delta&rsquo; to&nbsp;0 to get the original point coordinates.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Outline_MoveToFunc">FT_Outline_MoveToFunc</h3>
<p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">int</span>
  (*<b>FT_Outline_MoveToFunc</b>)( <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>*  to,
                            <span class="keyword">void</span>*             user );

#define FT_Outline_MoveTo_Func  <b>FT_Outline_MoveToFunc</b>
</pre>

<p>A function pointer type used to describe the signature of a &lsquo;move to&rsquo; function during outline walking/decomposition.</p>
<p>A &lsquo;move to&rsquo; is emitted to start a new contour in an outline.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="to">to</td><td class="desc">
<p>A pointer to the target point of the &lsquo;move to&rsquo;.</p>
</td></tr>
<tr><td class="val" id="user">user</td><td class="desc">
<p>A typeless pointer, which is passed from the caller of the decomposition function.</p>
</td></tr>
</table>

<h4>return</h4>
<p>Error code. 0&nbsp;means success.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Outline_LineToFunc">FT_Outline_LineToFunc</h3>
<p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">int</span>
  (*<b>FT_Outline_LineToFunc</b>)( <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>*  to,
                            <span class="keyword">void</span>*             user );

#define FT_Outline_LineTo_Func  <b>FT_Outline_LineToFunc</b>
</pre>

<p>A function pointer type used to describe the signature of a &lsquo;line to&rsquo; function during outline walking/decomposition.</p>
<p>A &lsquo;line to&rsquo; is emitted to indicate a segment in the outline.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="to">to</td><td class="desc">
<p>A pointer to the target point of the &lsquo;line to&rsquo;.</p>
</td></tr>
<tr><td class="val" id="user">user</td><td class="desc">
<p>A typeless pointer, which is passed from the caller of the decomposition function.</p>
</td></tr>
</table>

<h4>return</h4>
<p>Error code. 0&nbsp;means success.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Outline_ConicToFunc">FT_Outline_ConicToFunc</h3>
<p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">int</span>
  (*<b>FT_Outline_ConicToFunc</b>)( <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>*  control,
                             <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>*  to,
                             <span class="keyword">void</span>*             user );

#define FT_Outline_ConicTo_Func  <b>FT_Outline_ConicToFunc</b>
</pre>

<p>A function pointer type used to describe the signature of a &lsquo;conic to&rsquo; function during outline walking or decomposition.</p>
<p>A &lsquo;conic to&rsquo; is emitted to indicate a second-order Bezier arc in the outline.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="control">control</td><td class="desc">
<p>An intermediate control point between the last position and the new target in &lsquo;to&rsquo;.</p>
</td></tr>
<tr><td class="val" id="to">to</td><td class="desc">
<p>A pointer to the target end point of the conic arc.</p>
</td></tr>
<tr><td class="val" id="user">user</td><td class="desc">
<p>A typeless pointer, which is passed from the caller of the decomposition function.</p>
</td></tr>
</table>

<h4>return</h4>
<p>Error code. 0&nbsp;means success.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Outline_CubicToFunc">FT_Outline_CubicToFunc</h3>
<p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">int</span>
  (*<b>FT_Outline_CubicToFunc</b>)( <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>*  control1,
                             <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>*  control2,
                             <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>*  to,
                             <span class="keyword">void</span>*             user );

#define FT_Outline_CubicTo_Func  <b>FT_Outline_CubicToFunc</b>
</pre>

<p>A function pointer type used to describe the signature of a &lsquo;cubic to&rsquo; function during outline walking or decomposition.</p>
<p>A &lsquo;cubic to&rsquo; is emitted to indicate a third-order Bezier arc.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="control1">control1</td><td class="desc">
<p>A pointer to the first Bezier control point.</p>
</td></tr>
<tr><td class="val" id="control2">control2</td><td class="desc">
<p>A pointer to the second Bezier control point.</p>
</td></tr>
<tr><td class="val" id="to">to</td><td class="desc">
<p>A pointer to the target end point.</p>
</td></tr>
<tr><td class="val" id="user">user</td><td class="desc">
<p>A typeless pointer, which is passed from the caller of the decomposition function.</p>
</td></tr>
</table>

<h4>return</h4>
<p>Error code. 0&nbsp;means success.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Orientation">FT_Orientation</h3>
<p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">enum</span>  FT_Orientation_
  {
    <a href="ft2-outline_processing.html#FT_ORIENTATION_TRUETYPE">FT_ORIENTATION_TRUETYPE</a>   = 0,
    <a href="ft2-outline_processing.html#FT_ORIENTATION_POSTSCRIPT">FT_ORIENTATION_POSTSCRIPT</a> = 1,
    <a href="ft2-outline_processing.html#FT_ORIENTATION_FILL_RIGHT">FT_ORIENTATION_FILL_RIGHT</a> = <a href="ft2-outline_processing.html#FT_ORIENTATION_TRUETYPE">FT_ORIENTATION_TRUETYPE</a>,
    <a href="ft2-outline_processing.html#FT_ORIENTATION_FILL_LEFT">FT_ORIENTATION_FILL_LEFT</a>  = <a href="ft2-outline_processing.html#FT_ORIENTATION_POSTSCRIPT">FT_ORIENTATION_POSTSCRIPT</a>,
    <a href="ft2-outline_processing.html#FT_ORIENTATION_NONE">FT_ORIENTATION_NONE</a>

  } <b>FT_Orientation</b>;
</pre>

<p>A list of values used to describe an outline's contour orientation.</p>
<p>The TrueType and PostScript specifications use different conventions to determine whether outline contours should be filled or unfilled.</p>

<h4>values</h4>
<table class="fields">
<tr><td class="val" id="FT_ORIENTATION_TRUETYPE">FT_ORIENTATION_TRUETYPE</td><td class="desc">
<p>According to the TrueType specification, clockwise contours must be filled, and counter-clockwise ones must be unfilled.</p>
</td></tr>
<tr><td class="val" id="FT_ORIENTATION_POSTSCRIPT">FT_ORIENTATION_POSTSCRIPT</td><td class="desc">
<p>According to the PostScript specification, counter-clockwise contours must be filled, and clockwise ones must be unfilled.</p>
</td></tr>
<tr><td class="val" id="FT_ORIENTATION_FILL_RIGHT">FT_ORIENTATION_FILL_RIGHT</td><td class="desc">
<p>This is identical to <a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_TRUETYPE</a>, but is used to remember that in TrueType, everything that is to the right of the drawing direction of a contour must be filled.</p>
</td></tr>
<tr><td class="val" id="FT_ORIENTATION_FILL_LEFT">FT_ORIENTATION_FILL_LEFT</td><td class="desc">
<p>This is identical to <a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_POSTSCRIPT</a>, but is used to remember that in PostScript, everything that is to the left of the drawing direction of a contour must be filled.</p>
</td></tr>
<tr><td class="val" id="FT_ORIENTATION_NONE">FT_ORIENTATION_NONE</td><td class="desc">
<p>The orientation cannot be determined. That is, different parts of the glyph have different orientation.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Outline_Get_Orientation">FT_Outline_Get_Orientation</h3>
<p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-outline_processing.html#FT_Orientation">FT_Orientation</a> )
  <b>FT_Outline_Get_Orientation</b>( <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>*  outline );
</pre>

<p>This function analyzes a glyph outline and tries to compute its fill orientation (see <a href="ft2-outline_processing.html#FT_Orientation">FT_Orientation</a>). This is done by integrating the total area covered by the outline. The positive integral corresponds to the clockwise orientation and <a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_POSTSCRIPT</a> is returned. The negative integral corresponds to the counter-clockwise orientation and <a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_TRUETYPE</a> is returned.</p>
<p>Note that this will return <a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_TRUETYPE</a> for empty outlines.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="outline">outline</td><td class="desc">
<p>A handle to the source outline.</p>
</td></tr>
</table>

<h4>return</h4>
<p>The orientation.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_OUTLINE_XXX">FT_OUTLINE_XXX</h3>
<p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
<pre>
#define <a href="ft2-outline_processing.html#FT_OUTLINE_NONE">FT_OUTLINE_NONE</a>             0x0
#define <a href="ft2-outline_processing.html#FT_OUTLINE_OWNER">FT_OUTLINE_OWNER</a>            0x1
#define <a href="ft2-outline_processing.html#FT_OUTLINE_EVEN_ODD_FILL">FT_OUTLINE_EVEN_ODD_FILL</a>    0x2
#define <a href="ft2-outline_processing.html#FT_OUTLINE_REVERSE_FILL">FT_OUTLINE_REVERSE_FILL</a>     0x4
#define <a href="ft2-outline_processing.html#FT_OUTLINE_IGNORE_DROPOUTS">FT_OUTLINE_IGNORE_DROPOUTS</a>  0x8
#define <a href="ft2-outline_processing.html#FT_OUTLINE_SMART_DROPOUTS">FT_OUTLINE_SMART_DROPOUTS</a>   0x10
#define <a href="ft2-outline_processing.html#FT_OUTLINE_INCLUDE_STUBS">FT_OUTLINE_INCLUDE_STUBS</a>    0x20

#define <a href="ft2-outline_processing.html#FT_OUTLINE_HIGH_PRECISION">FT_OUTLINE_HIGH_PRECISION</a>   0x100
#define <a href="ft2-outline_processing.html#FT_OUTLINE_SINGLE_PASS">FT_OUTLINE_SINGLE_PASS</a>      0x200


  /* these constants are deprecated; use the corresponding */
  /* `<b>FT_OUTLINE_XXX</b>' values instead                       */
#define ft_outline_none             <a href="ft2-outline_processing.html#FT_OUTLINE_NONE">FT_OUTLINE_NONE</a>
#define ft_outline_owner            <a href="ft2-outline_processing.html#FT_OUTLINE_OWNER">FT_OUTLINE_OWNER</a>
#define ft_outline_even_odd_fill    <a href="ft2-outline_processing.html#FT_OUTLINE_EVEN_ODD_FILL">FT_OUTLINE_EVEN_ODD_FILL</a>
#define ft_outline_reverse_fill     <a href="ft2-outline_processing.html#FT_OUTLINE_REVERSE_FILL">FT_OUTLINE_REVERSE_FILL</a>
#define ft_outline_ignore_dropouts  <a href="ft2-outline_processing.html#FT_OUTLINE_IGNORE_DROPOUTS">FT_OUTLINE_IGNORE_DROPOUTS</a>
#define ft_outline_high_precision   <a href="ft2-outline_processing.html#FT_OUTLINE_HIGH_PRECISION">FT_OUTLINE_HIGH_PRECISION</a>
#define ft_outline_single_pass      <a href="ft2-outline_processing.html#FT_OUTLINE_SINGLE_PASS">FT_OUTLINE_SINGLE_PASS</a>
</pre>

<p>A list of bit-field constants use for the flags in an outline's &lsquo;flags&rsquo; field.</p>

<h4>values</h4>
<table class="fields">
<tr><td class="val" id="FT_OUTLINE_NONE">FT_OUTLINE_NONE</td><td class="desc">
<p>Value&nbsp;0 is reserved.</p>
</td></tr>
<tr><td class="val" id="FT_OUTLINE_OWNER">FT_OUTLINE_OWNER</td><td class="desc">
<p>If set, this flag indicates that the outline's field arrays (i.e., &lsquo;points&rsquo;, &lsquo;flags&rsquo;, and &lsquo;contours&rsquo;) are &lsquo;owned&rsquo; by the outline object, and should thus be freed when it is destroyed.</p>
</td></tr>
<tr><td class="val" id="FT_OUTLINE_EVEN_ODD_FILL">FT_OUTLINE_EVEN_ODD_FILL</td><td class="desc">
<p>By default, outlines are filled using the non-zero winding rule. If set to 1, the outline will be filled using the even-odd fill rule (only works with the smooth rasterizer).</p>
</td></tr>
<tr><td class="val" id="FT_OUTLINE_REVERSE_FILL">FT_OUTLINE_REVERSE_FILL</td><td class="desc">
<p>By default, outside contours of an outline are oriented in clock-wise direction, as defined in the TrueType specification. This flag is set if the outline uses the opposite direction (typically for Type&nbsp;1 fonts). This flag is ignored by the scan converter.</p>
</td></tr>
<tr><td class="val" id="FT_OUTLINE_IGNORE_DROPOUTS">FT_OUTLINE_IGNORE_DROPOUTS</td><td class="desc">
<p>By default, the scan converter will try to detect drop-outs in an outline and correct the glyph bitmap to ensure consistent shape continuity. If set, this flag hints the scan-line converter to ignore such cases. See below for more information.</p>
</td></tr>
<tr><td class="val" id="FT_OUTLINE_SMART_DROPOUTS">FT_OUTLINE_SMART_DROPOUTS</td><td class="desc">
<p>Select smart dropout control. If unset, use simple dropout control. Ignored if <a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_IGNORE_DROPOUTS</a> is set. See below for more information.</p>
</td></tr>
<tr><td class="val" id="FT_OUTLINE_INCLUDE_STUBS">FT_OUTLINE_INCLUDE_STUBS</td><td class="desc">
<p>If set, turn pixels on for &lsquo;stubs&rsquo;, otherwise exclude them. Ignored if <a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_IGNORE_DROPOUTS</a> is set. See below for more information.</p>
</td></tr>
<tr><td class="val" id="FT_OUTLINE_HIGH_PRECISION">FT_OUTLINE_HIGH_PRECISION</td><td class="desc">
<p>This flag indicates that the scan-line converter should try to convert this outline to bitmaps with the highest possible quality. It is typically set for small character sizes. Note that this is only a hint that might be completely ignored by a given scan-converter.</p>
</td></tr>
<tr><td class="val" id="FT_OUTLINE_SINGLE_PASS">FT_OUTLINE_SINGLE_PASS</td><td class="desc">
<p>This flag is set to force a given scan-converter to only use a single pass over the outline to render a bitmap glyph image. Normally, it is set for very large character sizes. It is only a hint that might be completely ignored by a given scan-converter.</p>
</td></tr>
</table>

<h4>note</h4>
<p>The flags <a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_IGNORE_DROPOUTS</a>, <a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_SMART_DROPOUTS</a>, and <a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_INCLUDE_STUBS</a> are ignored by the smooth rasterizer.</p>
<p>There exists a second mechanism to pass the drop-out mode to the B/W rasterizer; see the &lsquo;tags&rsquo; field in <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>.</p>
<p>Please refer to the description of the &lsquo;SCANTYPE&rsquo; instruction in the OpenType specification (in file &lsquo;ttinst1.doc&rsquo;) how simple drop-outs, smart drop-outs, and stubs are defined.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

</body>
</html>
reference/ft2-parameter_tags.html000064400000026414151706766400013102 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF;
         width: 87%;
         margin: auto; }

  div.section { width: 75%;
                margin: auto; }
  div.section hr { margin: 4ex 0 1ex 0; }
  div.section h4 { background-color: #EEEEFF;
                   font-size: medium;
                   font-style: oblique;
                   font-weight: bold;
                   margin: 3ex 0 1.5ex 9%;
                   padding: 0.3ex 0 0.3ex 1%; }
  div.section p { margin: 1.5ex 0 1.5ex 10%; }
  div.section pre { margin: 3ex 0 3ex 9%;
                    background-color: #D6E8FF;
                    padding: 2ex 0 2ex 1%; }
  div.section table.fields { width: 90%;
                             margin: 1.5ex 0 1.5ex 10%; }
  div.section table.toc { width: 95%;
                          margin: 1.5ex 0 1.5ex 5%; }
  div.timestamp { text-align: center;
                  font-size: 69%;
                  margin: 1.5ex 0 1.5ex 0; }

  h1 { text-align: center; }
  h3 { font-size: medium;
       margin: 4ex 0 1.5ex 0; }

  p { text-align: justify; }

  pre.colored { color: blue; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  table.fields td.val { font-weight: bold;
                        text-align: right;
                        width: 30%;
                        vertical-align: baseline;
                        padding: 1ex 1em 1ex 0; }
  table.fields td.desc { vertical-align: baseline;
                         padding: 1ex 0 1ex 1em; }
  table.fields td.desc p:first-child { margin: 0; }
  table.fields td.desc p { margin: 1.5ex 0 0 0; }
  table.index { margin: 6ex auto 6ex auto;
                border: 0;
                border-collapse: separate;
                border-spacing: 1em 0.3ex; }
  table.index tr { padding: 0; }
  table.index td { padding: 0; }
  table.index-toc-link { width: 100%;
                         border: 0;
                         border-spacing: 0;
                         margin: 1ex 0 1ex 0; }
  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
                                 font-size: 83%;
                                 text-align: left; }
  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
                                   font-size: 83%;
                                   text-align: center; }
  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
                                  font-size: 83%;
                                  text-align: right; }
  table.synopsis { margin: 6ex auto 6ex auto;
                   border: 0;
                   border-collapse: separate;
                   border-spacing: 2em 0.6ex; }
  table.synopsis tr { padding: 0; }
  table.synopsis td { padding: 0; }
  table.toc td.link { width: 30%;
                      text-align: right;
                      vertical-align: baseline;
                      padding: 1ex 1em 1ex 0; }
  table.toc td.desc { vertical-align: baseline;
                      padding: 1ex 0 1ex 1em;
                      text-align: left; }
  table.toc td.desc p:first-child { margin: 0;
                                    text-align: left; }
  table.toc td.desc p { margin: 1.5ex 0 0 0;
                        text-align: left; }

</style>
</head>
<body>

<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
<h1>FreeType-2.9.1 API Reference</h1>

<h1 id="parameter_tags">Parameter Tags</h1>
<h2>Synopsis</h2>
<table class="synopsis">
<tr><td><a href="#FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY">FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY</a></td></tr>
<tr><td><a href="#FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY">FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY</a></td></tr>
<tr><td><a href="#FT_PARAM_TAG_INCREMENTAL">FT_PARAM_TAG_INCREMENTAL</a></td></tr>
<tr><td><a href="#FT_PARAM_TAG_LCD_FILTER_WEIGHTS">FT_PARAM_TAG_LCD_FILTER_WEIGHTS</a></td></tr>
<tr><td><a href="#FT_PARAM_TAG_RANDOM_SEED">FT_PARAM_TAG_RANDOM_SEED</a></td></tr>
<tr><td><a href="#FT_PARAM_TAG_STEM_DARKENING">FT_PARAM_TAG_STEM_DARKENING</a></td></tr>
<tr><td><a href="#FT_PARAM_TAG_UNPATENTED_HINTING">FT_PARAM_TAG_UNPATENTED_HINTING</a></td></tr>
</table>


<p>This section contains macros for the <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> structure that are used with various functions to activate some special functionality or different behaviour of various components of FreeType.</p>

<div class="section">
<h3 id="FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY">FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY</h3>
<pre>
#define <b>FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY</b> \
          <a href="ft2-basic_types.html#FT_MAKE_TAG">FT_MAKE_TAG</a>( 'i', 'g', 'p', 'f' )


  /* this constant is deprecated */
#define FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY \
          <b>FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY</b>
</pre>

<p>A tag for <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> to make <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> ignore typographic family names in the &lsquo;name&rsquo; table (introduced in OpenType version 1.4). Use this for backward compatibility with legacy systems that have a four-faces-per-family restriction.</p>

<h4>since</h4>
<p>2.8</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY">FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY</h3>
<pre>
#define <b>FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY</b> \
          <a href="ft2-basic_types.html#FT_MAKE_TAG">FT_MAKE_TAG</a>( 'i', 'g', 'p', 's' )


  /* this constant is deprecated */
#define FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY \
          <b>FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY</b>
</pre>

<p>A tag for <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> to make <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> ignore typographic subfamily names in the &lsquo;name&rsquo; table (introduced in OpenType version 1.4). Use this for backward compatibility with legacy systems that have a four-faces-per-family restriction.</p>

<h4>since</h4>
<p>2.8</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_PARAM_TAG_INCREMENTAL">FT_PARAM_TAG_INCREMENTAL</h3>
<pre>
#define <b>FT_PARAM_TAG_INCREMENTAL</b> \
          <a href="ft2-basic_types.html#FT_MAKE_TAG">FT_MAKE_TAG</a>( 'i', 'n', 'c', 'r' )
</pre>

<p>An <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> tag to be used with <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> to indicate incremental glyph loading.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_PARAM_TAG_LCD_FILTER_WEIGHTS">FT_PARAM_TAG_LCD_FILTER_WEIGHTS</h3>
<pre>
#define <b>FT_PARAM_TAG_LCD_FILTER_WEIGHTS</b> \
          <a href="ft2-basic_types.html#FT_MAKE_TAG">FT_MAKE_TAG</a>( 'l', 'c', 'd', 'f' )
</pre>

<p>An <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> tag to be used with <a href="ft2-base_interface.html#FT_Face_Properties">FT_Face_Properties</a>. The corresponding argument specifies the five LCD filter weights for a given face (if using <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_LCD</a>, for example), overriding the global default values or the values set up with <a href="ft2-lcd_filtering.html#FT_Library_SetLcdFilterWeights">FT_Library_SetLcdFilterWeights</a>.</p>

<h4>since</h4>
<p>2.8</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_PARAM_TAG_RANDOM_SEED">FT_PARAM_TAG_RANDOM_SEED</h3>
<pre>
#define <b>FT_PARAM_TAG_RANDOM_SEED</b> \
          <a href="ft2-basic_types.html#FT_MAKE_TAG">FT_MAKE_TAG</a>( 's', 'e', 'e', 'd' )
</pre>

<p>An <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> tag to be used with <a href="ft2-base_interface.html#FT_Face_Properties">FT_Face_Properties</a>. The corresponding 32bit signed integer argument overrides the font driver's random seed value with a face-specific one; see <a href="ft2-properties.html#random-seed">random-seed</a>.</p>

<h4>since</h4>
<p>2.8</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_PARAM_TAG_STEM_DARKENING">FT_PARAM_TAG_STEM_DARKENING</h3>
<pre>
#define <b>FT_PARAM_TAG_STEM_DARKENING</b> \
          <a href="ft2-basic_types.html#FT_MAKE_TAG">FT_MAKE_TAG</a>( 'd', 'a', 'r', 'k' )
</pre>

<p>An <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> tag to be used with <a href="ft2-base_interface.html#FT_Face_Properties">FT_Face_Properties</a>. The corresponding Boolean argument specifies whether to apply stem darkening, overriding the global default values or the values set up with <a href="ft2-module_management.html#FT_Property_Set">FT_Property_Set</a> (see <a href="ft2-properties.html#no-stem-darkening">no-stem-darkening</a>).</p>
<p>This is a passive setting that only takes effect if the font driver or autohinter honors it, which the CFF, Type&nbsp;1, and CID drivers always do, but the autohinter only in &lsquo;light&rsquo; hinting mode (as of version 2.9).</p>

<h4>since</h4>
<p>2.8</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_PARAM_TAG_UNPATENTED_HINTING">FT_PARAM_TAG_UNPATENTED_HINTING</h3>
<pre>
#define <b>FT_PARAM_TAG_UNPATENTED_HINTING</b> \
          <a href="ft2-basic_types.html#FT_MAKE_TAG">FT_MAKE_TAG</a>( 'u', 'n', 'p', 'a' )
</pre>

<p>Deprecated, no effect.</p>
<p>Previously: A constant used as the tag of an <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> structure to indicate that unpatented methods only should be used by the TrueType bytecode interpreter for a typeface opened by <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a>.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

</body>
</html>
reference/ft2-pcf_driver.html000064400000010636151706766400012226 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF;
         width: 87%;
         margin: auto; }

  div.section { width: 75%;
                margin: auto; }
  div.section hr { margin: 4ex 0 1ex 0; }
  div.section h4 { background-color: #EEEEFF;
                   font-size: medium;
                   font-style: oblique;
                   font-weight: bold;
                   margin: 3ex 0 1.5ex 9%;
                   padding: 0.3ex 0 0.3ex 1%; }
  div.section p { margin: 1.5ex 0 1.5ex 10%; }
  div.section pre { margin: 3ex 0 3ex 9%;
                    background-color: #D6E8FF;
                    padding: 2ex 0 2ex 1%; }
  div.section table.fields { width: 90%;
                             margin: 1.5ex 0 1.5ex 10%; }
  div.section table.toc { width: 95%;
                          margin: 1.5ex 0 1.5ex 5%; }
  div.timestamp { text-align: center;
                  font-size: 69%;
                  margin: 1.5ex 0 1.5ex 0; }

  h1 { text-align: center; }
  h3 { font-size: medium;
       margin: 4ex 0 1.5ex 0; }

  p { text-align: justify; }

  pre.colored { color: blue; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  table.fields td.val { font-weight: bold;
                        text-align: right;
                        width: 30%;
                        vertical-align: baseline;
                        padding: 1ex 1em 1ex 0; }
  table.fields td.desc { vertical-align: baseline;
                         padding: 1ex 0 1ex 1em; }
  table.fields td.desc p:first-child { margin: 0; }
  table.fields td.desc p { margin: 1.5ex 0 0 0; }
  table.index { margin: 6ex auto 6ex auto;
                border: 0;
                border-collapse: separate;
                border-spacing: 1em 0.3ex; }
  table.index tr { padding: 0; }
  table.index td { padding: 0; }
  table.index-toc-link { width: 100%;
                         border: 0;
                         border-spacing: 0;
                         margin: 1ex 0 1ex 0; }
  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
                                 font-size: 83%;
                                 text-align: left; }
  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
                                   font-size: 83%;
                                   text-align: center; }
  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
                                  font-size: 83%;
                                  text-align: right; }
  table.synopsis { margin: 6ex auto 6ex auto;
                   border: 0;
                   border-collapse: separate;
                   border-spacing: 2em 0.6ex; }
  table.synopsis tr { padding: 0; }
  table.synopsis td { padding: 0; }
  table.toc td.link { width: 30%;
                      text-align: right;
                      vertical-align: baseline;
                      padding: 1ex 1em 1ex 0; }
  table.toc td.desc { vertical-align: baseline;
                      padding: 1ex 0 1ex 1em;
                      text-align: left; }
  table.toc td.desc p:first-child { margin: 0;
                                    text-align: left; }
  table.toc td.desc p { margin: 1.5ex 0 0 0;
                        text-align: left; }

</style>
</head>
<body>

<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
<h1>FreeType-2.9.1 API Reference</h1>

<h1 id="pcf_driver">The PCF driver</h1>

<p>While FreeType's PCF driver doesn't expose API functions by itself, it is possible to control its behaviour with <a href="ft2-module_management.html#FT_Property_Set">FT_Property_Set</a> and <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a>. Right now, there is a single property <a href="ft2-properties.html#no-long-family-names">no-long-family-names</a> available if FreeType is compiled with PCF_CONFIG_OPTION_LONG_FAMILY_NAMES.</p>
<p>The PCF driver's module name is &lsquo;pcf&rsquo;.</p>

</body>
</html>
reference/ft2-pfr_fonts.html000064400000024040151706766400012075 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF;
         width: 87%;
         margin: auto; }

  div.section { width: 75%;
                margin: auto; }
  div.section hr { margin: 4ex 0 1ex 0; }
  div.section h4 { background-color: #EEEEFF;
                   font-size: medium;
                   font-style: oblique;
                   font-weight: bold;
                   margin: 3ex 0 1.5ex 9%;
                   padding: 0.3ex 0 0.3ex 1%; }
  div.section p { margin: 1.5ex 0 1.5ex 10%; }
  div.section pre { margin: 3ex 0 3ex 9%;
                    background-color: #D6E8FF;
                    padding: 2ex 0 2ex 1%; }
  div.section table.fields { width: 90%;
                             margin: 1.5ex 0 1.5ex 10%; }
  div.section table.toc { width: 95%;
                          margin: 1.5ex 0 1.5ex 5%; }
  div.timestamp { text-align: center;
                  font-size: 69%;
                  margin: 1.5ex 0 1.5ex 0; }

  h1 { text-align: center; }
  h3 { font-size: medium;
       margin: 4ex 0 1.5ex 0; }

  p { text-align: justify; }

  pre.colored { color: blue; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  table.fields td.val { font-weight: bold;
                        text-align: right;
                        width: 30%;
                        vertical-align: baseline;
                        padding: 1ex 1em 1ex 0; }
  table.fields td.desc { vertical-align: baseline;
                         padding: 1ex 0 1ex 1em; }
  table.fields td.desc p:first-child { margin: 0; }
  table.fields td.desc p { margin: 1.5ex 0 0 0; }
  table.index { margin: 6ex auto 6ex auto;
                border: 0;
                border-collapse: separate;
                border-spacing: 1em 0.3ex; }
  table.index tr { padding: 0; }
  table.index td { padding: 0; }
  table.index-toc-link { width: 100%;
                         border: 0;
                         border-spacing: 0;
                         margin: 1ex 0 1ex 0; }
  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
                                 font-size: 83%;
                                 text-align: left; }
  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
                                   font-size: 83%;
                                   text-align: center; }
  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
                                  font-size: 83%;
                                  text-align: right; }
  table.synopsis { margin: 6ex auto 6ex auto;
                   border: 0;
                   border-collapse: separate;
                   border-spacing: 2em 0.6ex; }
  table.synopsis tr { padding: 0; }
  table.synopsis td { padding: 0; }
  table.toc td.link { width: 30%;
                      text-align: right;
                      vertical-align: baseline;
                      padding: 1ex 1em 1ex 0; }
  table.toc td.desc { vertical-align: baseline;
                      padding: 1ex 0 1ex 1em;
                      text-align: left; }
  table.toc td.desc p:first-child { margin: 0;
                                    text-align: left; }
  table.toc td.desc p { margin: 1.5ex 0 0 0;
                        text-align: left; }

</style>
</head>
<body>

<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
<h1>FreeType-2.9.1 API Reference</h1>

<h1 id="pfr_fonts">PFR Fonts</h1>
<h2>Synopsis</h2>
<table class="synopsis">
<tr><td><a href="#FT_Get_PFR_Metrics">FT_Get_PFR_Metrics</a></td><td><a href="#FT_Get_PFR_Kerning">FT_Get_PFR_Kerning</a></td><td><a href="#FT_Get_PFR_Advance">FT_Get_PFR_Advance</a></td></tr>
</table>


<p>This section contains the declaration of PFR-specific functions.</p>

<div class="section">
<h3 id="FT_Get_PFR_Metrics">FT_Get_PFR_Metrics</h3>
<p>Defined in FT_PFR_H (freetype/ftpfr.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Get_PFR_Metrics</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>    face,
                      <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>   *aoutline_resolution,
                      <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>   *ametrics_resolution,
                      <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>  *ametrics_x_scale,
                      <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>  *ametrics_y_scale );
</pre>

<p>Return the outline and metrics resolutions of a given PFR face.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>Handle to the input face. It can be a non-PFR face.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="aoutline_resolution">aoutline_resolution</td><td class="desc">
<p>Outline resolution. This is equivalent to &lsquo;face-&gt;units_per_EM&rsquo; for non-PFR fonts. Optional (parameter can be NULL).</p>
</td></tr>
<tr><td class="val" id="ametrics_resolution">ametrics_resolution</td><td class="desc">
<p>Metrics resolution. This is equivalent to &lsquo;outline_resolution&rsquo; for non-PFR fonts. Optional (parameter can be NULL).</p>
</td></tr>
<tr><td class="val" id="ametrics_x_scale">ametrics_x_scale</td><td class="desc">
<p>A 16.16 fixed-point number used to scale distance expressed in metrics units to device subpixels. This is equivalent to &lsquo;face-&gt;size-&gt;x_scale&rsquo;, but for metrics only. Optional (parameter can be NULL).</p>
</td></tr>
<tr><td class="val" id="ametrics_y_scale">ametrics_y_scale</td><td class="desc">
<p>Same as &lsquo;ametrics_x_scale&rsquo; but for the vertical direction. optional (parameter can be NULL).</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>If the input face is not a PFR, this function will return an error. However, in all cases, it will return valid values.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Get_PFR_Kerning">FT_Get_PFR_Kerning</h3>
<p>Defined in FT_PFR_H (freetype/ftpfr.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Get_PFR_Kerning</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>     face,
                      <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>     left,
                      <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>     right,
                      <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>  *avector );
</pre>

<p>Return the kerning pair corresponding to two glyphs in a PFR face. The distance is expressed in metrics units, unlike the result of <a href="ft2-base_interface.html#FT_Get_Kerning">FT_Get_Kerning</a>.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the input face.</p>
</td></tr>
<tr><td class="val" id="left">left</td><td class="desc">
<p>Index of the left glyph.</p>
</td></tr>
<tr><td class="val" id="right">right</td><td class="desc">
<p>Index of the right glyph.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="avector">avector</td><td class="desc">
<p>A kerning vector.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>This function always return distances in original PFR metrics units. This is unlike <a href="ft2-base_interface.html#FT_Get_Kerning">FT_Get_Kerning</a> with the <a href="ft2-base_interface.html#FT_Kerning_Mode">FT_KERNING_UNSCALED</a> mode, which always returns distances converted to outline units.</p>
<p>You can use the value of the &lsquo;x_scale&rsquo; and &lsquo;y_scale&rsquo; parameters returned by <a href="ft2-pfr_fonts.html#FT_Get_PFR_Metrics">FT_Get_PFR_Metrics</a> to scale these to device subpixels.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Get_PFR_Advance">FT_Get_PFR_Advance</h3>
<p>Defined in FT_PFR_H (freetype/ftpfr.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Get_PFR_Advance</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>   face,
                      <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>   gindex,
                      <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a>   *aadvance );
</pre>

<p>Return a given glyph advance, expressed in original metrics units, from a PFR font.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the input face.</p>
</td></tr>
<tr><td class="val" id="gindex">gindex</td><td class="desc">
<p>The glyph index.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="aadvance">aadvance</td><td class="desc">
<p>The glyph advance in metrics units.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>You can use the &lsquo;x_scale&rsquo; or &lsquo;y_scale&rsquo; results of <a href="ft2-pfr_fonts.html#FT_Get_PFR_Metrics">FT_Get_PFR_Metrics</a> to convert the advance to device subpixels (i.e., 1/64th of pixels).</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

</body>
</html>
reference/ft2-properties.html000064400000125700151706766400012276 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF;
         width: 87%;
         margin: auto; }

  div.section { width: 75%;
                margin: auto; }
  div.section hr { margin: 4ex 0 1ex 0; }
  div.section h4 { background-color: #EEEEFF;
                   font-size: medium;
                   font-style: oblique;
                   font-weight: bold;
                   margin: 3ex 0 1.5ex 9%;
                   padding: 0.3ex 0 0.3ex 1%; }
  div.section p { margin: 1.5ex 0 1.5ex 10%; }
  div.section pre { margin: 3ex 0 3ex 9%;
                    background-color: #D6E8FF;
                    padding: 2ex 0 2ex 1%; }
  div.section table.fields { width: 90%;
                             margin: 1.5ex 0 1.5ex 10%; }
  div.section table.toc { width: 95%;
                          margin: 1.5ex 0 1.5ex 5%; }
  div.timestamp { text-align: center;
                  font-size: 69%;
                  margin: 1.5ex 0 1.5ex 0; }

  h1 { text-align: center; }
  h3 { font-size: medium;
       margin: 4ex 0 1.5ex 0; }

  p { text-align: justify; }

  pre.colored { color: blue; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  table.fields td.val { font-weight: bold;
                        text-align: right;
                        width: 30%;
                        vertical-align: baseline;
                        padding: 1ex 1em 1ex 0; }
  table.fields td.desc { vertical-align: baseline;
                         padding: 1ex 0 1ex 1em; }
  table.fields td.desc p:first-child { margin: 0; }
  table.fields td.desc p { margin: 1.5ex 0 0 0; }
  table.index { margin: 6ex auto 6ex auto;
                border: 0;
                border-collapse: separate;
                border-spacing: 1em 0.3ex; }
  table.index tr { padding: 0; }
  table.index td { padding: 0; }
  table.index-toc-link { width: 100%;
                         border: 0;
                         border-spacing: 0;
                         margin: 1ex 0 1ex 0; }
  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
                                 font-size: 83%;
                                 text-align: left; }
  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
                                   font-size: 83%;
                                   text-align: center; }
  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
                                  font-size: 83%;
                                  text-align: right; }
  table.synopsis { margin: 6ex auto 6ex auto;
                   border: 0;
                   border-collapse: separate;
                   border-spacing: 2em 0.6ex; }
  table.synopsis tr { padding: 0; }
  table.synopsis td { padding: 0; }
  table.toc td.link { width: 30%;
                      text-align: right;
                      vertical-align: baseline;
                      padding: 1ex 1em 1ex 0; }
  table.toc td.desc { vertical-align: baseline;
                      padding: 1ex 0 1ex 1em;
                      text-align: left; }
  table.toc td.desc p:first-child { margin: 0;
                                    text-align: left; }
  table.toc td.desc p { margin: 1.5ex 0 0 0;
                        text-align: left; }

</style>
</head>
<body>

<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
<h1>FreeType-2.9.1 API Reference</h1>

<h1 id="properties">Driver properties</h1>
<h2>Synopsis</h2>
<table class="synopsis">
<tr><td><a href="#FT_HINTING_XXX">FT_HINTING_XXX</a></td><td><a href="#glyph-to-script-map">glyph-to-script-map</a></td></tr>
<tr><td><a href="#hinting-engine">hinting-engine</a></td><td><a href="#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_XXX</a></td></tr>
<tr><td><a href="#no-stem-darkening">no-stem-darkening</a></td><td><a href="#FT_Prop_GlyphToScriptMap">FT_Prop_GlyphToScriptMap</a></td></tr>
<tr><td><a href="#darkening-parameters">darkening-parameters</a></td><td><a href="#fallback-script">fallback-script</a></td></tr>
<tr><td><a href="#random-seed">random-seed</a></td><td><a href="#default-script">default-script</a></td></tr>
<tr><td><a href="#no-long-family-names">no-long-family-names</a></td><td><a href="#increase-x-height">increase-x-height</a></td></tr>
<tr><td><a href="#TT_INTERPRETER_VERSION_XXX">TT_INTERPRETER_VERSION_XXX</a></td><td><a href="#FT_Prop_IncreaseXHeight">FT_Prop_IncreaseXHeight</a></td></tr>
<tr><td><a href="#interpreter-version">interpreter-version</a></td><td><a href="#warping">warping</a></td></tr>
</table>


<p>Driver modules can be controlled by setting and unsetting properties, using the functions <a href="ft2-module_management.html#FT_Property_Set">FT_Property_Set</a> and <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a>. This section documents the available properties, together with auxiliary macros and structures.</p>

<div class="section">
<h3 id="FT_HINTING_XXX">FT_HINTING_XXX</h3>
<p>Defined in FT_DRIVER_H (freetype/ftdriver.h).</p>
<pre>
#define <a href="ft2-properties.html#FT_HINTING_FREETYPE">FT_HINTING_FREETYPE</a>  0
#define <a href="ft2-properties.html#FT_HINTING_ADOBE">FT_HINTING_ADOBE</a>     1

  /* these constants (introduced in 2.4.12) are deprecated */
#define FT_CFF_HINTING_FREETYPE  <a href="ft2-properties.html#FT_HINTING_FREETYPE">FT_HINTING_FREETYPE</a>
#define FT_CFF_HINTING_ADOBE     <a href="ft2-properties.html#FT_HINTING_ADOBE">FT_HINTING_ADOBE</a>
</pre>

<p>A list of constants used for the <a href="ft2-properties.html#hinting-engine">hinting-engine</a> property to select the hinting engine for CFF, Type&nbsp;1, and CID fonts.</p>

<h4>values</h4>
<table class="fields">
<tr><td class="val" id="FT_HINTING_FREETYPE">FT_HINTING_FREETYPE</td><td class="desc">
<p>Use the old FreeType hinting engine.</p>
</td></tr>
<tr><td class="val" id="FT_HINTING_ADOBE">FT_HINTING_ADOBE</td><td class="desc">
<p>Use the hinting engine contributed by Adobe.</p>
</td></tr>
</table>

<h4>since</h4>
<p>2.9</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="hinting-engine">hinting-engine</h3>

<p>Thanks to Adobe, which contributed a new hinting (and parsing) engine, an application can select between &lsquo;freetype&rsquo; and &lsquo;adobe&rsquo; if compiled with CFF_CONFIG_OPTION_OLD_ENGINE. If this configuration macro isn't defined, &lsquo;hinting-engine&rsquo; does nothing.</p>
<p>The same holds for the Type&nbsp;1 and CID modules if compiled with T1_CONFIG_OPTION_OLD_ENGINE.</p>
<p>For the &lsquo;cff&rsquo; module, the default engine is &lsquo;freetype&rsquo; if CFF_CONFIG_OPTION_OLD_ENGINE is defined, and &lsquo;adobe&rsquo; otherwise.</p>
<p>For both the &lsquo;type1&rsquo; and &lsquo;t1cid&rsquo; modules, the default engine is &lsquo;freetype&rsquo; if T1_CONFIG_OPTION_OLD_ENGINE is defined, and &lsquo;adobe&rsquo; otherwise.</p>
<p>The following example code demonstrates how to select Adobe's hinting engine for the &lsquo;cff&rsquo; module (omitting the error handling).</p>
<pre class="colored">
  FT_Library  library;
  FT_UInt     hinting_engine = FT_CFF_HINTING_ADOBE;


  FT_Init_FreeType( &amp;library );

  FT_Property_Set( library, "cff",
                            "hinting-engine", &amp;hinting_engine );
</pre>

<h4>note</h4>
<p>This property can be used with <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a> also.</p>
<p>This property can be set via the &lsquo;FREETYPE_PROPERTIES&rsquo; environment variable (using values &lsquo;adobe&rsquo; or &lsquo;freetype&rsquo;).</p>

<h4>since</h4>
<p>2.4.12 (for &lsquo;cff&rsquo; module)</p>
<p>2.9 (for &lsquo;type1&rsquo; and &lsquo;t1cid&rsquo; modules)</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="no-stem-darkening">no-stem-darkening</h3>

<p>All glyphs that pass through the auto-hinter will be emboldened unless this property is set to TRUE. The same is true for the CFF, Type&nbsp;1, and CID font modules if the &lsquo;Adobe&rsquo; engine is selected (which is the default).</p>
<p>Stem darkening emboldens glyphs at smaller sizes to make them more readable on common low-DPI screens when using linear alpha blending and gamma correction, see <a href="ft2-base_interface.html#FT_Render_Glyph">FT_Render_Glyph</a>. When not using linear alpha blending and gamma correction, glyphs will appear heavy and fuzzy!</p>
<p>Gamma correction essentially lightens fonts since shades of grey are shifted to higher pixel values (=&nbsp;higher brightness) to match the original intention to the reality of our screens. The side-effect is that glyphs &lsquo;thin out&rsquo;. Mac OS&nbsp;X and Adobe's proprietary font rendering library implement a counter-measure: stem darkening at smaller sizes where shades of gray dominate. By emboldening a glyph slightly in relation to its pixel size, individual pixels get higher coverage of filled-in outlines and are therefore &lsquo;blacker&rsquo;. This counteracts the &lsquo;thinning out&rsquo; of glyphs, making text remain readable at smaller sizes.</p>
<p>By default, the Adobe engines for CFF, Type&nbsp;1, and CID fonts darken stems at smaller sizes, regardless of hinting, to enhance contrast. Setting this property, stem darkening gets switched off.</p>
<p>For the auto-hinter, stem-darkening is experimental currently and thus switched off by default (this is, &lsquo;no-stem-darkening&rsquo; is set to TRUE by default). Total consistency with the CFF driver is not achieved right now because the emboldening method differs and glyphs must be scaled down on the Y-axis to keep outline points inside their precomputed blue zones. The smaller the size (especially 9ppem and down), the higher the loss of emboldening versus the CFF driver.</p>
<p>Note that stem darkening is never applied if <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a> is set.</p>
<pre class="colored">
  FT_Library  library;
  FT_Bool     no_stem_darkening = TRUE;


  FT_Init_FreeType( &amp;library );

  FT_Property_Set( library, "cff",
                            "no-stem-darkening", &amp;no_stem_darkening );
</pre>

<h4>note</h4>
<p>This property can be used with <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a> also.</p>
<p>This property can be set via the &lsquo;FREETYPE_PROPERTIES&rsquo; environment variable (using values 1 and 0 for &lsquo;on&rsquo; and &lsquo;off&rsquo;, respectively). It can also be set per face using <a href="ft2-base_interface.html#FT_Face_Properties">FT_Face_Properties</a> with <a href="ft2-parameter_tags.html#FT_PARAM_TAG_STEM_DARKENING">FT_PARAM_TAG_STEM_DARKENING</a>.</p>

<h4>since</h4>
<p>2.4.12 (for &lsquo;cff&rsquo; module)</p>
<p>2.6.2 (for &lsquo;autofitter&rsquo; module)</p>
<p>2.9 (for &lsquo;type1&rsquo; and &lsquo;t1cid&rsquo; modules)</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="darkening-parameters">darkening-parameters</h3>

<p>By default, the Adobe hinting engine, as used by the CFF, Type&nbsp;1, and CID font drivers, darkens stems as follows (if the &lsquo;no-stem-darkening&rsquo; property isn't set):</p>
<pre class="colored">
  stem width &lt;= 0.5px:   darkening amount = 0.4px
  stem width  = 1px:     darkening amount = 0.275px
  stem width  = 1.667px: darkening amount = 0.275px
  stem width &gt;= 2.333px: darkening amount = 0px
</pre>
<p>and piecewise linear in-between. At configuration time, these four control points can be set with the macro &lsquo;CFF_CONFIG_OPTION_DARKENING_PARAMETERS&rsquo;; the CFF, Type&nbsp;1, and CID drivers share these values. At runtime, the control points can be changed using the &lsquo;darkening-parameters&rsquo; property, as the following example demonstrates for the Type&nbsp;1 driver.</p>
<pre class="colored">
  FT_Library  library;
  FT_Int      darken_params[8] = {  500, 300,   // x1, y1
                                   1000, 200,   // x2, y2
                                   1500, 100,   // x3, y3
                                   2000,   0 }; // x4, y4


  FT_Init_FreeType( &amp;library );

  FT_Property_Set( library, "type1",
                            "darkening-parameters", darken_params );
</pre>
<p>The x&nbsp;values give the stem width, and the y&nbsp;values the darkening amount. The unit is 1000th of pixels. All coordinate values must be positive; the x&nbsp;values must be monotonically increasing; the y&nbsp;values must be monotonically decreasing and smaller than or equal to 500 (corresponding to half a pixel); the slope of each linear piece must be shallower than -1 (e.g., -.4).</p>
<p>The auto-hinter provides this property, too, as an experimental feature. See <a href="ft2-properties.html#no-stem-darkening">no-stem-darkening</a> for more.</p>

<h4>note</h4>
<p>This property can be used with <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a> also.</p>
<p>This property can be set via the &lsquo;FREETYPE_PROPERTIES&rsquo; environment variable, using eight comma-separated integers without spaces. Here the above example, using &lsquo;\&rsquo; to break the line for readability.</p>
<pre class="colored">
  FREETYPE_PROPERTIES=\
  type1:darkening-parameters=500,300,1000,200,1500,100,2000,0
</pre>

<h4>since</h4>
<p>2.5.1 (for &lsquo;cff&rsquo; module)</p>
<p>2.6.2 (for &lsquo;autofitter&rsquo; module)</p>
<p>2.9 (for &lsquo;type1&rsquo; and &lsquo;t1cid&rsquo; modules)</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="random-seed">random-seed</h3>

<p>By default, the seed value for the CFF &lsquo;random&rsquo; operator and the similar &lsquo;0 28 callothersubr pop&rsquo; command for the Type&nbsp;1 and CID drivers is set to a random value. However, mainly for debugging purposes, it is often necessary to use a known value as a seed so that the pseudo-random number sequences generated by &lsquo;random&rsquo; are repeatable.</p>
<p>The &lsquo;random-seed&rsquo; property does that. Its argument is a signed 32bit integer; if the value is zero or negative, the seed given by the &lsquo;intitialRandomSeed&rsquo; private DICT operator in a CFF file gets used (or a default value if there is no such operator). If the value is positive, use it instead of &lsquo;initialRandomSeed&rsquo;, which is consequently ignored.</p>

<h4>note</h4>
<p>This property can be set via the &lsquo;FREETYPE_PROPERTIES&rsquo; environment variable. It can also be set per face using <a href="ft2-base_interface.html#FT_Face_Properties">FT_Face_Properties</a> with <a href="ft2-parameter_tags.html#FT_PARAM_TAG_RANDOM_SEED">FT_PARAM_TAG_RANDOM_SEED</a>.</p>

<h4>since</h4>
<p>2.8 (for &lsquo;cff&rsquo; module)</p>
<p>2.9 (for &lsquo;type1&rsquo; and &lsquo;t1cid&rsquo; modules)</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="no-long-family-names">no-long-family-names</h3>

<p>If PCF_CONFIG_OPTION_LONG_FAMILY_NAMES is active while compiling FreeType, the PCF driver constructs long family names.</p>
<p>There are many PCF fonts just called &lsquo;Fixed&rsquo; which look completely different, and which have nothing to do with each other. When selecting &lsquo;Fixed&rsquo; in KDE or Gnome one gets results that appear rather random, the style changes often if one changes the size and one cannot select some fonts at all. The improve this situation, the PCF module prepends the foundry name (plus a space) to the family name. It also checks whether there are &lsquo;wide&rsquo; characters; all put together, family names like &lsquo;Sony Fixed&rsquo; or &lsquo;Misc Fixed Wide&rsquo; are constructed.</p>
<p>If &lsquo;no-long-family-names&rsquo; is set, this feature gets switched off.</p>
<pre class="colored">
  FT_Library  library;
  FT_Bool     no_long_family_names = TRUE;


  FT_Init_FreeType( &amp;library );

  FT_Property_Set( library, "pcf",
                            "no-long-family-names",
                            &amp;no_long_family_names );
</pre>

<h4>note</h4>
<p>This property can be used with <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a> also.</p>
<p>This property can be set via the &lsquo;FREETYPE_PROPERTIES&rsquo; environment variable (using values 1 and 0 for &lsquo;on&rsquo; and &lsquo;off&rsquo;, respectively).</p>

<h4>since</h4>
<p>2.8</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="TT_INTERPRETER_VERSION_XXX">TT_INTERPRETER_VERSION_XXX</h3>
<p>Defined in FT_DRIVER_H (freetype/ftdriver.h).</p>
<pre>
#define <a href="ft2-properties.html#TT_INTERPRETER_VERSION_35">TT_INTERPRETER_VERSION_35</a>  35
#define <a href="ft2-properties.html#TT_INTERPRETER_VERSION_38">TT_INTERPRETER_VERSION_38</a>  38
#define <a href="ft2-properties.html#TT_INTERPRETER_VERSION_40">TT_INTERPRETER_VERSION_40</a>  40
</pre>

<p>A list of constants used for the <a href="ft2-properties.html#interpreter-version">interpreter-version</a> property to select the hinting engine for Truetype fonts.</p>
<p>The numeric value in the constant names represents the version number as returned by the &lsquo;GETINFO&rsquo; bytecode instruction.</p>

<h4>values</h4>
<table class="fields">
<tr><td class="val" id="TT_INTERPRETER_VERSION_35">TT_INTERPRETER_VERSION_35</td><td class="desc">
<p>Version&nbsp;35 corresponds to MS rasterizer v.1.7 as used e.g. in Windows&nbsp;98; only grayscale and B/W rasterizing is supported.</p>
</td></tr>
<tr><td class="val" id="TT_INTERPRETER_VERSION_38">TT_INTERPRETER_VERSION_38</td><td class="desc">
<p>Version&nbsp;38 corresponds to MS rasterizer v.1.9; it is roughly equivalent to the hinting provided by DirectWrite ClearType (as can be found, for example, in the Internet Explorer&nbsp;9 running on Windows&nbsp;7). It is used in FreeType to select the &lsquo;Infinality&rsquo; subpixel hinting code. The code may be removed in a future version.</p>
</td></tr>
<tr><td class="val" id="TT_INTERPRETER_VERSION_40">TT_INTERPRETER_VERSION_40</td><td class="desc">
<p>Version&nbsp;40 corresponds to MS rasterizer v.2.1; it is roughly equivalent to the hinting provided by DirectWrite ClearType (as can be found, for example, in Microsoft's Edge Browser on Windows&nbsp;10). It is used in FreeType to select the &lsquo;minimal&rsquo; subpixel hinting code, a stripped-down and higher performance version of the &lsquo;Infinality&rsquo; code.</p>
</td></tr>
</table>

<h4>note</h4>
<p>This property controls the behaviour of the bytecode interpreter and thus how outlines get hinted. It does <b>not</b> control how glyph get rasterized! In particular, it does not control subpixel color filtering.</p>
<p>If FreeType has not been compiled with the configuration option TT_CONFIG_OPTION_SUBPIXEL_HINTING, selecting version&nbsp;38 or&nbsp;40 causes an &lsquo;FT_Err_Unimplemented_Feature&rsquo; error.</p>
<p>Depending on the graphics framework, Microsoft uses different bytecode and rendering engines. As a consequence, the version numbers returned by a call to the &lsquo;GETINFO&rsquo; bytecode instruction are more convoluted than desired.</p>
<p>Here are two tables that try to shed some light on the possible values for the MS rasterizer engine, together with the additional features introduced by it.</p>
<pre class="colored">
  GETINFO framework               version feature
  -------------------------------------------------------------------
      3   GDI (Win 3.1),            v1.0  16-bit, first version
          TrueImage
     33   GDI (Win NT 3.1),         v1.5  32-bit
          HP Laserjet
     34   GDI (Win 95)              v1.6  font smoothing,
                                          new SCANTYPE opcode
     35   GDI (Win 98/2000)         v1.7  (UN)SCALED_COMPONENT_OFFSET
                                            bits in composite glyphs
     36   MGDI (Win CE 2)           v1.6+ classic ClearType
     37   GDI (XP and later),       v1.8  ClearType
          GDI+ old (before Vista)
     38   GDI+ old (Vista, Win 7),  v1.9  subpixel ClearType,
          WPF                             Y-direction ClearType,
                                          additional error checking
     39   DWrite (before Win 8)     v2.0  subpixel ClearType flags
                                            in GETINFO opcode,
                                          bug fixes
     40   GDI+ (after Win 7),       v2.1  Y-direction ClearType flag
          DWrite (Win 8)                    in GETINFO opcode,
                                          Gray ClearType
</pre>
<p>The &lsquo;version&rsquo; field gives a rough orientation only, since some applications provided certain features much earlier (as an example, Microsoft Reader used subpixel and Y-direction ClearType already in Windows 2000). Similarly, updates to a given framework might include improved hinting support.</p>
<pre class="colored">
   version   sampling          rendering        comment
            x        y       x           y
  --------------------------------------------------------------
    v1.0   normal  normal  B/W           B/W    bi-level
    v1.6   high    high    gray          gray   grayscale
    v1.8   high    normal  color-filter  B/W    (GDI) ClearType
    v1.9   high    high    color-filter  gray   Color ClearType
    v2.1   high    normal  gray          B/W    Gray ClearType
    v2.1   high    high    gray          gray   Gray ClearType
</pre>
<p>Color and Gray ClearType are the two available variants of &lsquo;Y-direction ClearType&rsquo;, meaning grayscale rasterization along the Y-direction; the name used in the TrueType specification for this feature is &lsquo;symmetric smoothing&rsquo;. &lsquo;Classic ClearType&rsquo; is the original algorithm used before introducing a modified version in Win&nbsp;XP. Another name for v1.6's grayscale rendering is &lsquo;font smoothing&rsquo;, and &lsquo;Color ClearType&rsquo; is sometimes also called &lsquo;DWrite ClearType&rsquo;. To differentiate between today's Color ClearType and the earlier ClearType variant with B/W rendering along the vertical axis, the latter is sometimes called &lsquo;GDI ClearType&rsquo;.</p>
<p>&lsquo;Normal&rsquo; and &lsquo;high&rsquo; sampling describe the (virtual) resolution to access the rasterized outline after the hinting process. &lsquo;Normal&rsquo; means 1 sample per grid line (i.e., B/W). In the current Microsoft implementation, &lsquo;high&rsquo; means an extra virtual resolution of 16x16 (or 16x1) grid lines per pixel for bytecode instructions like &lsquo;MIRP&rsquo;. After hinting, these 16 grid lines are mapped to 6x5 (or 6x1) grid lines for color filtering if Color ClearType is activated.</p>
<p>Note that &lsquo;Gray ClearType&rsquo; is essentially the same as v1.6's grayscale rendering. However, the GETINFO instruction handles it differently: v1.6 returns bit&nbsp;12 (hinting for grayscale), while v2.1 returns bits&nbsp;13 (hinting for ClearType), 18 (symmetrical smoothing), and&nbsp;19 (Gray ClearType). Also, this mode respects bits 2 and&nbsp;3 for the version&nbsp;1 gasp table exclusively (like Color ClearType), while v1.6 only respects the values of version&nbsp;0 (bits 0 and&nbsp;1).</p>
<p>Keep in mind that the features of the above interpreter versions might not map exactly to FreeType features or behavior because it is a fundamentally different library with different internals.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="interpreter-version">interpreter-version</h3>

<p>Currently, three versions are available, two representing the bytecode interpreter with subpixel hinting support (old &lsquo;Infinality&rsquo; code and new stripped-down and higher performance &lsquo;minimal&rsquo; code) and one without, respectively. The default is subpixel support if TT_CONFIG_OPTION_SUBPIXEL_HINTING is defined, and no subpixel support otherwise (since it isn't available then).</p>
<p>If subpixel hinting is on, many TrueType bytecode instructions behave differently compared to B/W or grayscale rendering (except if &lsquo;native ClearType&rsquo; is selected by the font). Microsoft's main idea is to render at a much increased horizontal resolution, then sampling down the created output to subpixel precision. However, many older fonts are not suited to this and must be specially taken care of by applying (hardcoded) tweaks in Microsoft's interpreter.</p>
<p>Details on subpixel hinting and some of the necessary tweaks can be found in Greg Hitchcock's whitepaper at &lsquo;<a href="https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx">https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx</a>&rsquo;. Note that FreeType currently doesn't really &lsquo;subpixel hint&rsquo; (6x1, 6x2, or 6x5 supersampling) like discussed in the paper. Depending on the chosen interpreter, it simply ignores instructions on vertical stems to arrive at very similar results.</p>
<p>The following example code demonstrates how to deactivate subpixel hinting (omitting the error handling).</p>
<pre class="colored">
  FT_Library  library;
  FT_Face     face;
  FT_UInt     interpreter_version = TT_INTERPRETER_VERSION_35;


  FT_Init_FreeType( &amp;library );

  FT_Property_Set( library, "truetype",
                            "interpreter-version",
                            &amp;interpreter_version );
</pre>

<h4>note</h4>
<p>This property can be used with <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a> also.</p>
<p>This property can be set via the &lsquo;FREETYPE_PROPERTIES&rsquo; environment variable (using values &lsquo;35&rsquo;, &lsquo;38&rsquo;, or &lsquo;40&rsquo;).</p>

<h4>since</h4>
<p>2.5</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="glyph-to-script-map">glyph-to-script-map</h3>

<p><b>Experimental</b> <b>only</b></p>
<p>The auto-hinter provides various script modules to hint glyphs. Examples of supported scripts are Latin or CJK. Before a glyph is auto-hinted, the Unicode character map of the font gets examined, and the script is then determined based on Unicode character ranges, see below.</p>
<p>OpenType fonts, however, often provide much more glyphs than character codes (small caps, superscripts, ligatures, swashes, etc.), to be controlled by so-called &lsquo;features&rsquo;. Handling OpenType features can be quite complicated and thus needs a separate library on top of FreeType.</p>
<p>The mapping between glyph indices and scripts (in the auto-hinter sense, see the <a href="ft2-properties.html#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_XXX</a> values) is stored as an array with &lsquo;num_glyphs&rsquo; elements, as found in the font's <a href="ft2-base_interface.html#FT_Face">FT_Face</a> structure. The &lsquo;glyph-to-script-map&rsquo; property returns a pointer to this array, which can be modified as needed. Note that the modification should happen before the first glyph gets processed by the auto-hinter so that the global analysis of the font shapes actually uses the modified mapping.</p>
<p>The following example code demonstrates how to access it (omitting the error handling).</p>
<pre class="colored">
  FT_Library                library;
  FT_Face                   face;
  FT_Prop_GlyphToScriptMap  prop;


  FT_Init_FreeType( &amp;library );
  FT_New_Face( library, "foo.ttf", 0, &amp;face );

  prop.face = face;

  FT_Property_Get( library, "autofitter",
                            "glyph-to-script-map", &amp;prop );

  // adjust `prop.map' as needed right here

  FT_Load_Glyph( face, ..., FT_LOAD_FORCE_AUTOHINT );
</pre>

<h4>since</h4>
<p>2.4.11</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_XXX</h3>
<p>Defined in FT_DRIVER_H (freetype/ftdriver.h).</p>
<pre>
#define <a href="ft2-properties.html#FT_AUTOHINTER_SCRIPT_NONE">FT_AUTOHINTER_SCRIPT_NONE</a>   0
#define <a href="ft2-properties.html#FT_AUTOHINTER_SCRIPT_LATIN">FT_AUTOHINTER_SCRIPT_LATIN</a>  1
#define <a href="ft2-properties.html#FT_AUTOHINTER_SCRIPT_CJK">FT_AUTOHINTER_SCRIPT_CJK</a>    2
#define <a href="ft2-properties.html#FT_AUTOHINTER_SCRIPT_INDIC">FT_AUTOHINTER_SCRIPT_INDIC</a>  3
</pre>

<p><b>Experimental</b> <b>only</b></p>
<p>A list of constants used for the <a href="ft2-properties.html#glyph-to-script-map">glyph-to-script-map</a> property to specify the script submodule the auto-hinter should use for hinting a particular glyph.</p>

<h4>values</h4>
<table class="fields">
<tr><td class="val" id="FT_AUTOHINTER_SCRIPT_NONE">FT_AUTOHINTER_SCRIPT_NONE</td><td class="desc">
<p>Don't auto-hint this glyph.</p>
</td></tr>
<tr><td class="val" id="FT_AUTOHINTER_SCRIPT_LATIN">FT_AUTOHINTER_SCRIPT_LATIN</td><td class="desc">
<p>Apply the latin auto-hinter. For the auto-hinter, &lsquo;latin&rsquo; is a very broad term, including Cyrillic and Greek also since characters from those scripts share the same design constraints.</p>
<p>By default, characters from the following Unicode ranges are assigned to this submodule.</p>
<pre class="colored">
  U+0020 - U+007F  // Basic Latin (no control characters)
  U+00A0 - U+00FF  // Latin-1 Supplement (no control characters)
  U+0100 - U+017F  // Latin Extended-A
  U+0180 - U+024F  // Latin Extended-B
  U+0250 - U+02AF  // IPA Extensions
  U+02B0 - U+02FF  // Spacing Modifier Letters
  U+0300 - U+036F  // Combining Diacritical Marks
  U+0370 - U+03FF  // Greek and Coptic
  U+0400 - U+04FF  // Cyrillic
  U+0500 - U+052F  // Cyrillic Supplement
  U+1D00 - U+1D7F  // Phonetic Extensions
  U+1D80 - U+1DBF  // Phonetic Extensions Supplement
  U+1DC0 - U+1DFF  // Combining Diacritical Marks Supplement
  U+1E00 - U+1EFF  // Latin Extended Additional
  U+1F00 - U+1FFF  // Greek Extended
  U+2000 - U+206F  // General Punctuation
  U+2070 - U+209F  // Superscripts and Subscripts
  U+20A0 - U+20CF  // Currency Symbols
  U+2150 - U+218F  // Number Forms
  U+2460 - U+24FF  // Enclosed Alphanumerics
  U+2C60 - U+2C7F  // Latin Extended-C
  U+2DE0 - U+2DFF  // Cyrillic Extended-A
  U+2E00 - U+2E7F  // Supplemental Punctuation
  U+A640 - U+A69F  // Cyrillic Extended-B
  U+A720 - U+A7FF  // Latin Extended-D
  U+FB00 - U+FB06  // Alphab. Present. Forms (Latin Ligatures)
 U+1D400 - U+1D7FF // Mathematical Alphanumeric Symbols
 U+1F100 - U+1F1FF // Enclosed Alphanumeric Supplement
</pre>
<p></p>
</td></tr>
<tr><td class="val" id="FT_AUTOHINTER_SCRIPT_CJK">FT_AUTOHINTER_SCRIPT_CJK</td><td class="desc">
<p>Apply the CJK auto-hinter, covering Chinese, Japanese, Korean, old Vietnamese, and some other scripts.</p>
<p>By default, characters from the following Unicode ranges are assigned to this submodule.</p>
<pre class="colored">
  U+1100 - U+11FF  // Hangul Jamo
  U+2E80 - U+2EFF  // CJK Radicals Supplement
  U+2F00 - U+2FDF  // Kangxi Radicals
  U+2FF0 - U+2FFF  // Ideographic Description Characters
  U+3000 - U+303F  // CJK Symbols and Punctuation
  U+3040 - U+309F  // Hiragana
  U+30A0 - U+30FF  // Katakana
  U+3100 - U+312F  // Bopomofo
  U+3130 - U+318F  // Hangul Compatibility Jamo
  U+3190 - U+319F  // Kanbun
  U+31A0 - U+31BF  // Bopomofo Extended
  U+31C0 - U+31EF  // CJK Strokes
  U+31F0 - U+31FF  // Katakana Phonetic Extensions
  U+3200 - U+32FF  // Enclosed CJK Letters and Months
  U+3300 - U+33FF  // CJK Compatibility
  U+3400 - U+4DBF  // CJK Unified Ideographs Extension A
  U+4DC0 - U+4DFF  // Yijing Hexagram Symbols
  U+4E00 - U+9FFF  // CJK Unified Ideographs
  U+A960 - U+A97F  // Hangul Jamo Extended-A
  U+AC00 - U+D7AF  // Hangul Syllables
  U+D7B0 - U+D7FF  // Hangul Jamo Extended-B
  U+F900 - U+FAFF  // CJK Compatibility Ideographs
  U+FE10 - U+FE1F  // Vertical forms
  U+FE30 - U+FE4F  // CJK Compatibility Forms
  U+FF00 - U+FFEF  // Halfwidth and Fullwidth Forms
 U+1B000 - U+1B0FF // Kana Supplement
 U+1D300 - U+1D35F // Tai Xuan Hing Symbols
 U+1F200 - U+1F2FF // Enclosed Ideographic Supplement
 U+20000 - U+2A6DF // CJK Unified Ideographs Extension B
 U+2A700 - U+2B73F // CJK Unified Ideographs Extension C
 U+2B740 - U+2B81F // CJK Unified Ideographs Extension D
 U+2F800 - U+2FA1F // CJK Compatibility Ideographs Supplement
</pre>
<p></p>
</td></tr>
<tr><td class="val" id="FT_AUTOHINTER_SCRIPT_INDIC">FT_AUTOHINTER_SCRIPT_INDIC</td><td class="desc">
<p>Apply the indic auto-hinter, covering all major scripts from the Indian sub-continent and some other related scripts like Thai, Lao, or Tibetan.</p>
<p>By default, characters from the following Unicode ranges are assigned to this submodule.</p>
<pre class="colored">
  U+0900 - U+0DFF  // Indic Range
  U+0F00 - U+0FFF  // Tibetan
  U+1900 - U+194F  // Limbu
  U+1B80 - U+1BBF  // Sundanese
  U+A800 - U+A82F  // Syloti Nagri
  U+ABC0 - U+ABFF  // Meetei Mayek
 U+11800 - U+118DF // Sharada
</pre>
<p>Note that currently Indic support is rudimentary only, missing blue zone support.</p>
</td></tr>
</table>

<h4>since</h4>
<p>2.4.11</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Prop_GlyphToScriptMap">FT_Prop_GlyphToScriptMap</h3>
<p>Defined in FT_DRIVER_H (freetype/ftdriver.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_Prop_GlyphToScriptMap_
  {
    <a href="ft2-base_interface.html#FT_Face">FT_Face</a>     face;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>*  map;

  } <b>FT_Prop_GlyphToScriptMap</b>;
</pre>

<p><b>Experimental</b> <b>only</b></p>
<p>The data exchange structure for the <a href="ft2-properties.html#glyph-to-script-map">glyph-to-script-map</a> property.</p>

<h4>since</h4>
<p>2.4.11</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="fallback-script">fallback-script</h3>

<p><b>Experimental</b> <b>only</b></p>
<p>If no auto-hinter script module can be assigned to a glyph, a fallback script gets assigned to it (see also the <a href="ft2-properties.html#glyph-to-script-map">glyph-to-script-map</a> property). By default, this is <a href="ft2-properties.html#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_CJK</a>. Using the &lsquo;fallback-script&rsquo; property, this fallback value can be changed.</p>
<pre class="colored">
  FT_Library  library;
  FT_UInt     fallback_script = FT_AUTOHINTER_SCRIPT_NONE;


  FT_Init_FreeType( &amp;library );

  FT_Property_Set( library, "autofitter",
                            "fallback-script", &amp;fallback_script );
</pre>

<h4>note</h4>
<p>This property can be used with <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a> also.</p>
<p>It's important to use the right timing for changing this value: The creation of the glyph-to-script map that eventually uses the fallback script value gets triggered either by setting or reading a face-specific property like <a href="ft2-properties.html#glyph-to-script-map">glyph-to-script-map</a>, or by auto-hinting any glyph from that face. In particular, if you have already created an <a href="ft2-base_interface.html#FT_Face">FT_Face</a> structure but not loaded any glyph (using the auto-hinter), a change of the fallback script will affect this face.</p>

<h4>since</h4>
<p>2.4.11</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="default-script">default-script</h3>

<p><b>Experimental</b> <b>only</b></p>
<p>If FreeType gets compiled with FT_CONFIG_OPTION_USE_HARFBUZZ to make the HarfBuzz library access OpenType features for getting better glyph coverages, this property sets the (auto-fitter) script to be used for the default (OpenType) script data of a font's GSUB table. Features for the default script are intended for all scripts not explicitly handled in GSUB; an example is a &lsquo;dlig&rsquo; feature, containing the combination of the characters &lsquo;T&rsquo;, &lsquo;E&rsquo;, and &lsquo;L&rsquo; to form a &lsquo;TEL&rsquo; ligature.</p>
<p>By default, this is <a href="ft2-properties.html#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_LATIN</a>. Using the &lsquo;default-script&rsquo; property, this default value can be changed.</p>
<pre class="colored">
  FT_Library  library;
  FT_UInt     default_script = FT_AUTOHINTER_SCRIPT_NONE;


  FT_Init_FreeType( &amp;library );

  FT_Property_Set( library, "autofitter",
                            "default-script", &amp;default_script );
</pre>

<h4>note</h4>
<p>This property can be used with <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a> also.</p>
<p>It's important to use the right timing for changing this value: The creation of the glyph-to-script map that eventually uses the default script value gets triggered either by setting or reading a face-specific property like <a href="ft2-properties.html#glyph-to-script-map">glyph-to-script-map</a>, or by auto-hinting any glyph from that face. In particular, if you have already created an <a href="ft2-base_interface.html#FT_Face">FT_Face</a> structure but not loaded any glyph (using the auto-hinter), a change of the default script will affect this face.</p>

<h4>since</h4>
<p>2.5.3</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="increase-x-height">increase-x-height</h3>

<p>For ppem values in the range 6&nbsp;&lt;= ppem &lt;= &lsquo;increase-x-height&rsquo;, round up the font's x&nbsp;height much more often than normally. If the value is set to&nbsp;0, which is the default, this feature is switched off. Use this property to improve the legibility of small font sizes if necessary.</p>
<pre class="colored">
  FT_Library               library;
  FT_Face                  face;
  FT_Prop_IncreaseXHeight  prop;


  FT_Init_FreeType( &amp;library );
  FT_New_Face( library, "foo.ttf", 0, &amp;face );
  FT_Set_Char_Size( face, 10 * 64, 0, 72, 0 );

  prop.face  = face;
  prop.limit = 14;

  FT_Property_Set( library, "autofitter",
                            "increase-x-height", &amp;prop );
</pre>

<h4>note</h4>
<p>This property can be used with <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a> also.</p>
<p>Set this value right after calling <a href="ft2-base_interface.html#FT_Set_Char_Size">FT_Set_Char_Size</a>, but before loading any glyph (using the auto-hinter).</p>

<h4>since</h4>
<p>2.4.11</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Prop_IncreaseXHeight">FT_Prop_IncreaseXHeight</h3>
<p>Defined in FT_DRIVER_H (freetype/ftdriver.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_Prop_IncreaseXHeight_
  {
    <a href="ft2-base_interface.html#FT_Face">FT_Face</a>  face;
    <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>  limit;

  } <b>FT_Prop_IncreaseXHeight</b>;
</pre>

<p>The data exchange structure for the <a href="ft2-properties.html#increase-x-height">increase-x-height</a> property.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="warping">warping</h3>

<p><b>Experimental</b> <b>only</b></p>
<p>If FreeType gets compiled with option AF_CONFIG_OPTION_USE_WARPER to activate the warp hinting code in the auto-hinter, this property switches warping on and off.</p>
<p>Warping only works in &lsquo;normal&rsquo; auto-hinting mode replacing it. The idea of the code is to slightly scale and shift a glyph along the non-hinted dimension (which is usually the horizontal axis) so that as much of its segments are aligned (more or less) to the grid. To find out a glyph's optimal scaling and shifting value, various parameter combinations are tried and scored.</p>
<p>By default, warping is off. The example below shows how to switch on warping (omitting the error handling).</p>
<pre class="colored">
  FT_Library  library;
  FT_Bool     warping = 1;


  FT_Init_FreeType( &amp;library );

  FT_Property_Set( library, "autofitter",
                            "warping", &amp;warping );
</pre>

<h4>note</h4>
<p>This property can be used with <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a> also.</p>
<p>This property can be set via the &lsquo;FREETYPE_PROPERTIES&rsquo; environment variable (using values 1 and 0 for &lsquo;on&rsquo; and &lsquo;off&rsquo;, respectively).</p>
<p>The warping code can also change advance widths. Have a look at the &lsquo;lsb_delta&rsquo; and &lsquo;rsb_delta&rsquo; fields in the <a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a> structure for details on improving inter-glyph distances while rendering.</p>
<p>Since warping is a global property of the auto-hinter it is best to change its value before rendering any face. Otherwise, you should reload all faces that get auto-hinted in &lsquo;normal&rsquo; hinting mode.</p>

<h4>since</h4>
<p>2.6</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

</body>
</html>
reference/ft2-quick_advance.html000064400000024633151706766400012702 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF;
         width: 87%;
         margin: auto; }

  div.section { width: 75%;
                margin: auto; }
  div.section hr { margin: 4ex 0 1ex 0; }
  div.section h4 { background-color: #EEEEFF;
                   font-size: medium;
                   font-style: oblique;
                   font-weight: bold;
                   margin: 3ex 0 1.5ex 9%;
                   padding: 0.3ex 0 0.3ex 1%; }
  div.section p { margin: 1.5ex 0 1.5ex 10%; }
  div.section pre { margin: 3ex 0 3ex 9%;
                    background-color: #D6E8FF;
                    padding: 2ex 0 2ex 1%; }
  div.section table.fields { width: 90%;
                             margin: 1.5ex 0 1.5ex 10%; }
  div.section table.toc { width: 95%;
                          margin: 1.5ex 0 1.5ex 5%; }
  div.timestamp { text-align: center;
                  font-size: 69%;
                  margin: 1.5ex 0 1.5ex 0; }

  h1 { text-align: center; }
  h3 { font-size: medium;
       margin: 4ex 0 1.5ex 0; }

  p { text-align: justify; }

  pre.colored { color: blue; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  table.fields td.val { font-weight: bold;
                        text-align: right;
                        width: 30%;
                        vertical-align: baseline;
                        padding: 1ex 1em 1ex 0; }
  table.fields td.desc { vertical-align: baseline;
                         padding: 1ex 0 1ex 1em; }
  table.fields td.desc p:first-child { margin: 0; }
  table.fields td.desc p { margin: 1.5ex 0 0 0; }
  table.index { margin: 6ex auto 6ex auto;
                border: 0;
                border-collapse: separate;
                border-spacing: 1em 0.3ex; }
  table.index tr { padding: 0; }
  table.index td { padding: 0; }
  table.index-toc-link { width: 100%;
                         border: 0;
                         border-spacing: 0;
                         margin: 1ex 0 1ex 0; }
  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
                                 font-size: 83%;
                                 text-align: left; }
  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
                                   font-size: 83%;
                                   text-align: center; }
  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
                                  font-size: 83%;
                                  text-align: right; }
  table.synopsis { margin: 6ex auto 6ex auto;
                   border: 0;
                   border-collapse: separate;
                   border-spacing: 2em 0.6ex; }
  table.synopsis tr { padding: 0; }
  table.synopsis td { padding: 0; }
  table.toc td.link { width: 30%;
                      text-align: right;
                      vertical-align: baseline;
                      padding: 1ex 1em 1ex 0; }
  table.toc td.desc { vertical-align: baseline;
                      padding: 1ex 0 1ex 1em;
                      text-align: left; }
  table.toc td.desc p:first-child { margin: 0;
                                    text-align: left; }
  table.toc td.desc p { margin: 1.5ex 0 0 0;
                        text-align: left; }

</style>
</head>
<body>

<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
<h1>FreeType-2.9.1 API Reference</h1>

<h1 id="quick_advance">Quick retrieval of advance values</h1>
<h2>Synopsis</h2>
<table class="synopsis">
<tr><td><a href="#FT_Get_Advance">FT_Get_Advance</a></td><td>&nbsp;</td></tr>
<tr><td><a href="#FT_Get_Advances">FT_Get_Advances</a></td><td><a href="#FT_ADVANCE_FLAG_FAST_ONLY">FT_ADVANCE_FLAG_FAST_ONLY</a></td></tr>
</table>


<p>This section contains functions to quickly extract advance values without handling glyph outlines, if possible.</p>

<div class="section">
<h3 id="FT_Get_Advance">FT_Get_Advance</h3>
<p>Defined in FT_ADVANCES_H (freetype/ftadvanc.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Get_Advance</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>    face,
                  <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>    gindex,
                  <a href="ft2-basic_types.html#FT_Int32">FT_Int32</a>   load_flags,
                  <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>  *padvance );
</pre>

<p>Retrieve the advance value of a given glyph outline in an <a href="ft2-base_interface.html#FT_Face">FT_Face</a>.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>The source <a href="ft2-base_interface.html#FT_Face">FT_Face</a> handle.</p>
</td></tr>
<tr><td class="val" id="gindex">gindex</td><td class="desc">
<p>The glyph index.</p>
</td></tr>
<tr><td class="val" id="load_flags">load_flags</td><td class="desc">
<p>A set of bit flags similar to those used when calling <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a>, used to determine what kind of advances you need.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="padvance">padvance</td><td class="desc">
<p>The advance value. If scaling is performed (based on the value of &lsquo;load_flags&rsquo;), the advance value is in 16.16 format. Otherwise, it is in font units.</p>
<p>If <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_VERTICAL_LAYOUT</a> is set, this is the vertical advance corresponding to a vertical layout. Otherwise, it is the horizontal advance in a horizontal layout.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0 means success.</p>

<h4>note</h4>
<p>This function may fail if you use <a href="ft2-quick_advance.html#FT_ADVANCE_FLAG_FAST_ONLY">FT_ADVANCE_FLAG_FAST_ONLY</a> and if the corresponding font backend doesn't have a quick way to retrieve the advances.</p>
<p>A scaled advance is returned in 16.16 format but isn't transformed by the affine transformation specified by <a href="ft2-base_interface.html#FT_Set_Transform">FT_Set_Transform</a>.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Get_Advances">FT_Get_Advances</h3>
<p>Defined in FT_ADVANCES_H (freetype/ftadvanc.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Get_Advances</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>    face,
                   <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>    start,
                   <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>    count,
                   <a href="ft2-basic_types.html#FT_Int32">FT_Int32</a>   load_flags,
                   <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>  *padvances );
</pre>

<p>Retrieve the advance values of several glyph outlines in an <a href="ft2-base_interface.html#FT_Face">FT_Face</a>.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>The source <a href="ft2-base_interface.html#FT_Face">FT_Face</a> handle.</p>
</td></tr>
<tr><td class="val" id="start">start</td><td class="desc">
<p>The first glyph index.</p>
</td></tr>
<tr><td class="val" id="count">count</td><td class="desc">
<p>The number of advance values you want to retrieve.</p>
</td></tr>
<tr><td class="val" id="load_flags">load_flags</td><td class="desc">
<p>A set of bit flags similar to those used when calling <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a>.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="padvance">padvance</td><td class="desc">
<p>The advance values. This array, to be provided by the caller, must contain at least &lsquo;count&rsquo; elements.</p>
<p>If scaling is performed (based on the value of &lsquo;load_flags&rsquo;), the advance values are in 16.16 format. Otherwise, they are in font units.</p>
<p>If <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_VERTICAL_LAYOUT</a> is set, these are the vertical advances corresponding to a vertical layout. Otherwise, they are the horizontal advances in a horizontal layout.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0 means success.</p>

<h4>note</h4>
<p>This function may fail if you use <a href="ft2-quick_advance.html#FT_ADVANCE_FLAG_FAST_ONLY">FT_ADVANCE_FLAG_FAST_ONLY</a> and if the corresponding font backend doesn't have a quick way to retrieve the advances.</p>
<p>Scaled advances are returned in 16.16 format but aren't transformed by the affine transformation specified by <a href="ft2-base_interface.html#FT_Set_Transform">FT_Set_Transform</a>.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_ADVANCE_FLAG_FAST_ONLY">FT_ADVANCE_FLAG_FAST_ONLY</h3>
<p>Defined in FT_ADVANCES_H (freetype/ftadvanc.h).</p>
<pre>
#define <b>FT_ADVANCE_FLAG_FAST_ONLY</b>  0x20000000L
</pre>

<p>A bit-flag to be OR-ed with the &lsquo;flags&rsquo; parameter of the <a href="ft2-quick_advance.html#FT_Get_Advance">FT_Get_Advance</a> and <a href="ft2-quick_advance.html#FT_Get_Advances">FT_Get_Advances</a> functions.</p>
<p>If set, it indicates that you want these functions to fail if the corresponding hinting mode or font driver doesn't allow for very quick advance computation.</p>
<p>Typically, glyphs that are either unscaled, unhinted, bitmapped, or light-hinted can have their advance width computed very quickly.</p>
<p>Normal and bytecode hinted modes that require loading, scaling, and hinting of the glyph outline, are extremely slow by comparison.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

</body>
</html>
reference/ft2-raster.html000064400000061465151706766400011411 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF;
         width: 87%;
         margin: auto; }

  div.section { width: 75%;
                margin: auto; }
  div.section hr { margin: 4ex 0 1ex 0; }
  div.section h4 { background-color: #EEEEFF;
                   font-size: medium;
                   font-style: oblique;
                   font-weight: bold;
                   margin: 3ex 0 1.5ex 9%;
                   padding: 0.3ex 0 0.3ex 1%; }
  div.section p { margin: 1.5ex 0 1.5ex 10%; }
  div.section pre { margin: 3ex 0 3ex 9%;
                    background-color: #D6E8FF;
                    padding: 2ex 0 2ex 1%; }
  div.section table.fields { width: 90%;
                             margin: 1.5ex 0 1.5ex 10%; }
  div.section table.toc { width: 95%;
                          margin: 1.5ex 0 1.5ex 5%; }
  div.timestamp { text-align: center;
                  font-size: 69%;
                  margin: 1.5ex 0 1.5ex 0; }

  h1 { text-align: center; }
  h3 { font-size: medium;
       margin: 4ex 0 1.5ex 0; }

  p { text-align: justify; }

  pre.colored { color: blue; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  table.fields td.val { font-weight: bold;
                        text-align: right;
                        width: 30%;
                        vertical-align: baseline;
                        padding: 1ex 1em 1ex 0; }
  table.fields td.desc { vertical-align: baseline;
                         padding: 1ex 0 1ex 1em; }
  table.fields td.desc p:first-child { margin: 0; }
  table.fields td.desc p { margin: 1.5ex 0 0 0; }
  table.index { margin: 6ex auto 6ex auto;
                border: 0;
                border-collapse: separate;
                border-spacing: 1em 0.3ex; }
  table.index tr { padding: 0; }
  table.index td { padding: 0; }
  table.index-toc-link { width: 100%;
                         border: 0;
                         border-spacing: 0;
                         margin: 1ex 0 1ex 0; }
  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
                                 font-size: 83%;
                                 text-align: left; }
  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
                                   font-size: 83%;
                                   text-align: center; }
  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
                                  font-size: 83%;
                                  text-align: right; }
  table.synopsis { margin: 6ex auto 6ex auto;
                   border: 0;
                   border-collapse: separate;
                   border-spacing: 2em 0.6ex; }
  table.synopsis tr { padding: 0; }
  table.synopsis td { padding: 0; }
  table.toc td.link { width: 30%;
                      text-align: right;
                      vertical-align: baseline;
                      padding: 1ex 1em 1ex 0; }
  table.toc td.desc { vertical-align: baseline;
                      padding: 1ex 0 1ex 1em;
                      text-align: left; }
  table.toc td.desc p:first-child { margin: 0;
                                    text-align: left; }
  table.toc td.desc p { margin: 1.5ex 0 0 0;
                        text-align: left; }

</style>
</head>
<body>

<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
<h1>FreeType-2.9.1 API Reference</h1>

<h1 id="raster">Scanline Converter</h1>
<h2>Synopsis</h2>
<table class="synopsis">
<tr><td><a href="#FT_Raster">FT_Raster</a></td><td>&nbsp;</td><td><a href="#FT_Raster_Funcs">FT_Raster_Funcs</a></td></tr>
<tr><td><a href="#FT_Span">FT_Span</a></td><td><a href="#FT_Raster_NewFunc">FT_Raster_NewFunc</a></td><td>&nbsp;</td></tr>
<tr><td><a href="#FT_SpanFunc">FT_SpanFunc</a></td><td><a href="#FT_Raster_DoneFunc">FT_Raster_DoneFunc</a></td><td><a href="#FT_Raster_BitTest_Func">FT_Raster_BitTest_Func</a></td></tr>
<tr><td>&nbsp;</td><td><a href="#FT_Raster_ResetFunc">FT_Raster_ResetFunc</a></td><td><a href="#FT_Raster_BitSet_Func">FT_Raster_BitSet_Func</a></td></tr>
<tr><td><a href="#FT_Raster_Params">FT_Raster_Params</a></td><td><a href="#FT_Raster_SetModeFunc">FT_Raster_SetModeFunc</a></td><td></td></tr>
<tr><td><a href="#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_XXX</a></td><td><a href="#FT_Raster_RenderFunc">FT_Raster_RenderFunc</a></td><td></td></tr>
</table>


<p>This section contains technical definitions.</p>

<div class="section">
<h3 id="FT_Raster">FT_Raster</h3>
<p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_RasterRec_*  <b>FT_Raster</b>;
</pre>

<p>An opaque handle (pointer) to a raster object. Each object can be used independently to convert an outline into a bitmap or pixmap.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Span">FT_Span</h3>
<p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_Span_
  {
    <span class="keyword">short</span>           x;
    <span class="keyword">unsigned</span> <span class="keyword">short</span>  len;
    <span class="keyword">unsigned</span> <span class="keyword">char</span>   coverage;

  } <b>FT_Span</b>;
</pre>

<p>A structure used to model a single span of gray pixels when rendering an anti-aliased bitmap.</p>

<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="x">x</td><td class="desc">
<p>The span's horizontal start position.</p>
</td></tr>
<tr><td class="val" id="len">len</td><td class="desc">
<p>The span's length in pixels.</p>
</td></tr>
<tr><td class="val" id="coverage">coverage</td><td class="desc">
<p>The span color/coverage, ranging from 0 (background) to 255 (foreground).</p>
</td></tr>
</table>

<h4>note</h4>
<p>This structure is used by the span drawing callback type named <a href="ft2-raster.html#FT_SpanFunc">FT_SpanFunc</a> that takes the y&nbsp;coordinate of the span as a parameter.</p>
<p>The coverage value is always between 0 and 255. If you want less gray values, the callback function has to reduce them.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_SpanFunc">FT_SpanFunc</h3>
<p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">void</span>
  (*<b>FT_SpanFunc</b>)( <span class="keyword">int</span>             y,
                  <span class="keyword">int</span>             count,
                  <span class="keyword">const</span> <a href="ft2-raster.html#FT_Span">FT_Span</a>*  spans,
                  <span class="keyword">void</span>*           user );

#define FT_Raster_Span_Func  <b>FT_SpanFunc</b>
</pre>

<p>A function used as a call-back by the anti-aliased renderer in order to let client applications draw themselves the gray pixel spans on each scan line.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="y">y</td><td class="desc">
<p>The scanline's y&nbsp;coordinate.</p>
</td></tr>
<tr><td class="val" id="count">count</td><td class="desc">
<p>The number of spans to draw on this scanline.</p>
</td></tr>
<tr><td class="val" id="spans">spans</td><td class="desc">
<p>A table of &lsquo;count&rsquo; spans to draw on the scanline.</p>
</td></tr>
<tr><td class="val" id="user">user</td><td class="desc">
<p>User-supplied data that is passed to the callback.</p>
</td></tr>
</table>

<h4>note</h4>
<p>This callback allows client applications to directly render the gray spans of the anti-aliased bitmap to any kind of surfaces.</p>
<p>This can be used to write anti-aliased outlines directly to a given background bitmap, and even perform translucency.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Raster_Params">FT_Raster_Params</h3>
<p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_Raster_Params_
  {
    <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a>*        target;
    <span class="keyword">const</span> <span class="keyword">void</span>*             source;
    <span class="keyword">int</span>                     flags;
    <a href="ft2-raster.html#FT_SpanFunc">FT_SpanFunc</a>             gray_spans;
    <a href="ft2-raster.html#FT_SpanFunc">FT_SpanFunc</a>             black_spans;  /* unused */
    <a href="ft2-raster.html#FT_Raster_BitTest_Func">FT_Raster_BitTest_Func</a>  bit_test;     /* unused */
    <a href="ft2-raster.html#FT_Raster_BitSet_Func">FT_Raster_BitSet_Func</a>   bit_set;      /* unused */
    <span class="keyword">void</span>*                   user;
    <a href="ft2-basic_types.html#FT_BBox">FT_BBox</a>                 clip_box;

  } <b>FT_Raster_Params</b>;
</pre>

<p>A structure to hold the arguments used by a raster's render function.</p>

<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="target">target</td><td class="desc">
<p>The target bitmap.</p>
</td></tr>
<tr><td class="val" id="source">source</td><td class="desc">
<p>A pointer to the source glyph image (e.g., an <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>).</p>
</td></tr>
<tr><td class="val" id="flags">flags</td><td class="desc">
<p>The rendering flags.</p>
</td></tr>
<tr><td class="val" id="gray_spans">gray_spans</td><td class="desc">
<p>The gray span drawing callback.</p>
</td></tr>
<tr><td class="val" id="black_spans">black_spans</td><td class="desc">
<p>Unused.</p>
</td></tr>
<tr><td class="val" id="bit_test">bit_test</td><td class="desc">
<p>Unused.</p>
</td></tr>
<tr><td class="val" id="bit_set">bit_set</td><td class="desc">
<p>Unused.</p>
</td></tr>
<tr><td class="val" id="user">user</td><td class="desc">
<p>User-supplied data that is passed to each drawing callback.</p>
</td></tr>
<tr><td class="val" id="clip_box">clip_box</td><td class="desc">
<p>An optional clipping box. It is only used in direct rendering mode. Note that coordinates here should be expressed in <i>integer</i> pixels (and not in 26.6 fixed-point units).</p>
</td></tr>
</table>

<h4>note</h4>
<p>An anti-aliased glyph bitmap is drawn if the <a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_AA</a> bit flag is set in the &lsquo;flags&rsquo; field, otherwise a monochrome bitmap is generated.</p>
<p>If the <a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_DIRECT</a> bit flag is set in &lsquo;flags&rsquo;, the raster will call the &lsquo;gray_spans&rsquo; callback to draw gray pixel spans. This allows direct composition over a pre-existing bitmap through user-provided callbacks to perform the span drawing and composition. Not supported by the monochrome rasterizer.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_XXX</h3>
<p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
<pre>
#define <a href="ft2-raster.html#FT_RASTER_FLAG_DEFAULT">FT_RASTER_FLAG_DEFAULT</a>  0x0
#define <a href="ft2-raster.html#FT_RASTER_FLAG_AA">FT_RASTER_FLAG_AA</a>       0x1
#define <a href="ft2-raster.html#FT_RASTER_FLAG_DIRECT">FT_RASTER_FLAG_DIRECT</a>   0x2
#define <a href="ft2-raster.html#FT_RASTER_FLAG_CLIP">FT_RASTER_FLAG_CLIP</a>     0x4

  /* these constants are deprecated; use the corresponding */
  /* `<b>FT_RASTER_FLAG_XXX</b>' values instead                   */
#define ft_raster_flag_default  <a href="ft2-raster.html#FT_RASTER_FLAG_DEFAULT">FT_RASTER_FLAG_DEFAULT</a>
#define ft_raster_flag_aa       <a href="ft2-raster.html#FT_RASTER_FLAG_AA">FT_RASTER_FLAG_AA</a>
#define ft_raster_flag_direct   <a href="ft2-raster.html#FT_RASTER_FLAG_DIRECT">FT_RASTER_FLAG_DIRECT</a>
#define ft_raster_flag_clip     <a href="ft2-raster.html#FT_RASTER_FLAG_CLIP">FT_RASTER_FLAG_CLIP</a>
</pre>

<p>A list of bit flag constants as used in the &lsquo;flags&rsquo; field of a <a href="ft2-raster.html#FT_Raster_Params">FT_Raster_Params</a> structure.</p>

<h4>values</h4>
<table class="fields">
<tr><td class="val" id="FT_RASTER_FLAG_DEFAULT">FT_RASTER_FLAG_DEFAULT</td><td class="desc">
<p>This value is 0.</p>
</td></tr>
<tr><td class="val" id="FT_RASTER_FLAG_AA">FT_RASTER_FLAG_AA</td><td class="desc">
<p>This flag is set to indicate that an anti-aliased glyph image should be generated. Otherwise, it will be monochrome (1-bit).</p>
</td></tr>
<tr><td class="val" id="FT_RASTER_FLAG_DIRECT">FT_RASTER_FLAG_DIRECT</td><td class="desc">
<p>This flag is set to indicate direct rendering. In this mode, client applications must provide their own span callback. This lets them directly draw or compose over an existing bitmap. If this bit is not set, the target pixmap's buffer <i>must</i> be zeroed before rendering.</p>
<p>Direct rendering is only possible with anti-aliased glyphs.</p>
</td></tr>
<tr><td class="val" id="FT_RASTER_FLAG_CLIP">FT_RASTER_FLAG_CLIP</td><td class="desc">
<p>This flag is only used in direct rendering mode. If set, the output will be clipped to a box specified in the &lsquo;clip_box&rsquo; field of the <a href="ft2-raster.html#FT_Raster_Params">FT_Raster_Params</a> structure.</p>
<p>Note that by default, the glyph bitmap is clipped to the target pixmap, except in direct rendering mode where all spans are generated if no clipping box is set.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Raster_NewFunc">FT_Raster_NewFunc</h3>
<p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">int</span>
  (*<b>FT_Raster_NewFunc</b>)( <span class="keyword">void</span>*       memory,
                        <a href="ft2-raster.html#FT_Raster">FT_Raster</a>*  raster );

#define FT_Raster_New_Func  <b>FT_Raster_NewFunc</b>
</pre>

<p>A function used to create a new raster object.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="memory">memory</td><td class="desc">
<p>A handle to the memory allocator.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="raster">raster</td><td class="desc">
<p>A handle to the new raster object.</p>
</td></tr>
</table>

<h4>return</h4>
<p>Error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>The &lsquo;memory&rsquo; parameter is a typeless pointer in order to avoid un-wanted dependencies on the rest of the FreeType code. In practice, it is an <a href="ft2-system_interface.html#FT_Memory">FT_Memory</a> object, i.e., a handle to the standard FreeType memory allocator. However, this field can be completely ignored by a given raster implementation.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Raster_DoneFunc">FT_Raster_DoneFunc</h3>
<p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">void</span>
  (*<b>FT_Raster_DoneFunc</b>)( <a href="ft2-raster.html#FT_Raster">FT_Raster</a>  raster );

#define FT_Raster_Done_Func  <b>FT_Raster_DoneFunc</b>
</pre>

<p>A function used to destroy a given raster object.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="raster">raster</td><td class="desc">
<p>A handle to the raster object.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Raster_ResetFunc">FT_Raster_ResetFunc</h3>
<p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">void</span>
  (*<b>FT_Raster_ResetFunc</b>)( <a href="ft2-raster.html#FT_Raster">FT_Raster</a>       raster,
                          <span class="keyword">unsigned</span> <span class="keyword">char</span>*  pool_base,
                          <span class="keyword">unsigned</span> <span class="keyword">long</span>   pool_size );

#define FT_Raster_Reset_Func  <b>FT_Raster_ResetFunc</b>
</pre>

<p>FreeType used to provide an area of memory called the &lsquo;render pool&rsquo; available to all registered rasterizers. This was not thread safe, however, and now FreeType never allocates this pool.</p>
<p>This function is called after a new raster object is created.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="raster">raster</td><td class="desc">
<p>A handle to the new raster object.</p>
</td></tr>
<tr><td class="val" id="pool_base">pool_base</td><td class="desc">
<p>Previously, the address in memory of the render pool. Set this to NULL.</p>
</td></tr>
<tr><td class="val" id="pool_size">pool_size</td><td class="desc">
<p>Previously, the size in bytes of the render pool. Set this to 0.</p>
</td></tr>
</table>

<h4>note</h4>
<p>Rasterizers should rely on dynamic or stack allocation if they want to (a handle to the memory allocator is passed to the rasterizer constructor).</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Raster_SetModeFunc">FT_Raster_SetModeFunc</h3>
<p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">int</span>
  (*<b>FT_Raster_SetModeFunc</b>)( <a href="ft2-raster.html#FT_Raster">FT_Raster</a>      raster,
                            <span class="keyword">unsigned</span> <span class="keyword">long</span>  mode,
                            <span class="keyword">void</span>*          args );

#define FT_Raster_Set_Mode_Func  <b>FT_Raster_SetModeFunc</b>
</pre>

<p>This function is a generic facility to change modes or attributes in a given raster. This can be used for debugging purposes, or simply to allow implementation-specific &lsquo;features&rsquo; in a given raster module.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="raster">raster</td><td class="desc">
<p>A handle to the new raster object.</p>
</td></tr>
<tr><td class="val" id="mode">mode</td><td class="desc">
<p>A 4-byte tag used to name the mode or property.</p>
</td></tr>
<tr><td class="val" id="args">args</td><td class="desc">
<p>A pointer to the new mode/property to use.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Raster_RenderFunc">FT_Raster_RenderFunc</h3>
<p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">int</span>
  (*<b>FT_Raster_RenderFunc</b>)( <a href="ft2-raster.html#FT_Raster">FT_Raster</a>                raster,
                           <span class="keyword">const</span> <a href="ft2-raster.html#FT_Raster_Params">FT_Raster_Params</a>*  params );

#define FT_Raster_Render_Func  <b>FT_Raster_RenderFunc</b>
</pre>

<p>Invoke a given raster to scan-convert a given glyph image into a target bitmap.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="raster">raster</td><td class="desc">
<p>A handle to the raster object.</p>
</td></tr>
<tr><td class="val" id="params">params</td><td class="desc">
<p>A pointer to an <a href="ft2-raster.html#FT_Raster_Params">FT_Raster_Params</a> structure used to store the rendering parameters.</p>
</td></tr>
</table>

<h4>return</h4>
<p>Error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>The exact format of the source image depends on the raster's glyph format defined in its <a href="ft2-raster.html#FT_Raster_Funcs">FT_Raster_Funcs</a> structure. It can be an <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a> or anything else in order to support a large array of glyph formats.</p>
<p>Note also that the render function can fail and return a &lsquo;FT_Err_Unimplemented_Feature&rsquo; error code if the raster used does not support direct composition.</p>
<p>XXX: For now, the standard raster doesn't support direct composition but this should change for the final release (see the files &lsquo;demos/src/ftgrays.c&rsquo; and &lsquo;demos/src/ftgrays2.c&rsquo; for examples of distinct implementations that support direct composition).</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Raster_Funcs">FT_Raster_Funcs</h3>
<p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_Raster_Funcs_
  {
    <a href="ft2-basic_types.html#FT_Glyph_Format">FT_Glyph_Format</a>        glyph_format;

    <a href="ft2-raster.html#FT_Raster_NewFunc">FT_Raster_NewFunc</a>      raster_new;
    <a href="ft2-raster.html#FT_Raster_ResetFunc">FT_Raster_ResetFunc</a>    raster_reset;
    <a href="ft2-raster.html#FT_Raster_SetModeFunc">FT_Raster_SetModeFunc</a>  raster_set_mode;
    <a href="ft2-raster.html#FT_Raster_RenderFunc">FT_Raster_RenderFunc</a>   raster_render;
    <a href="ft2-raster.html#FT_Raster_DoneFunc">FT_Raster_DoneFunc</a>     raster_done;

  } <b>FT_Raster_Funcs</b>;
</pre>

<p>A structure used to describe a given raster class to the library.</p>

<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="glyph_format">glyph_format</td><td class="desc">
<p>The supported glyph format for this raster.</p>
</td></tr>
<tr><td class="val" id="raster_new">raster_new</td><td class="desc">
<p>The raster constructor.</p>
</td></tr>
<tr><td class="val" id="raster_reset">raster_reset</td><td class="desc">
<p>Used to reset the render pool within the raster.</p>
</td></tr>
<tr><td class="val" id="raster_render">raster_render</td><td class="desc">
<p>A function to render a glyph into a given bitmap.</p>
</td></tr>
<tr><td class="val" id="raster_done">raster_done</td><td class="desc">
<p>The raster destructor.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Raster_BitTest_Func">FT_Raster_BitTest_Func</h3>
<p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">int</span>
  (*<b>FT_Raster_BitTest_Func</b>)( <span class="keyword">int</span>    y,
                             <span class="keyword">int</span>    x,
                             <span class="keyword">void</span>*  user );
</pre>

<p>Deprecated, unimplemented.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Raster_BitSet_Func">FT_Raster_BitSet_Func</h3>
<p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">void</span>
  (*<b>FT_Raster_BitSet_Func</b>)( <span class="keyword">int</span>    y,
                            <span class="keyword">int</span>    x,
                            <span class="keyword">void</span>*  user );
</pre>

<p>Deprecated, unimplemented.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

</body>
</html>
reference/ft2-sfnt_names.html000064400000033522151706766400012237 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF;
         width: 87%;
         margin: auto; }

  div.section { width: 75%;
                margin: auto; }
  div.section hr { margin: 4ex 0 1ex 0; }
  div.section h4 { background-color: #EEEEFF;
                   font-size: medium;
                   font-style: oblique;
                   font-weight: bold;
                   margin: 3ex 0 1.5ex 9%;
                   padding: 0.3ex 0 0.3ex 1%; }
  div.section p { margin: 1.5ex 0 1.5ex 10%; }
  div.section pre { margin: 3ex 0 3ex 9%;
                    background-color: #D6E8FF;
                    padding: 2ex 0 2ex 1%; }
  div.section table.fields { width: 90%;
                             margin: 1.5ex 0 1.5ex 10%; }
  div.section table.toc { width: 95%;
                          margin: 1.5ex 0 1.5ex 5%; }
  div.timestamp { text-align: center;
                  font-size: 69%;
                  margin: 1.5ex 0 1.5ex 0; }

  h1 { text-align: center; }
  h3 { font-size: medium;
       margin: 4ex 0 1.5ex 0; }

  p { text-align: justify; }

  pre.colored { color: blue; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  table.fields td.val { font-weight: bold;
                        text-align: right;
                        width: 30%;
                        vertical-align: baseline;
                        padding: 1ex 1em 1ex 0; }
  table.fields td.desc { vertical-align: baseline;
                         padding: 1ex 0 1ex 1em; }
  table.fields td.desc p:first-child { margin: 0; }
  table.fields td.desc p { margin: 1.5ex 0 0 0; }
  table.index { margin: 6ex auto 6ex auto;
                border: 0;
                border-collapse: separate;
                border-spacing: 1em 0.3ex; }
  table.index tr { padding: 0; }
  table.index td { padding: 0; }
  table.index-toc-link { width: 100%;
                         border: 0;
                         border-spacing: 0;
                         margin: 1ex 0 1ex 0; }
  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
                                 font-size: 83%;
                                 text-align: left; }
  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
                                   font-size: 83%;
                                   text-align: center; }
  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
                                  font-size: 83%;
                                  text-align: right; }
  table.synopsis { margin: 6ex auto 6ex auto;
                   border: 0;
                   border-collapse: separate;
                   border-spacing: 2em 0.6ex; }
  table.synopsis tr { padding: 0; }
  table.synopsis td { padding: 0; }
  table.toc td.link { width: 30%;
                      text-align: right;
                      vertical-align: baseline;
                      padding: 1ex 1em 1ex 0; }
  table.toc td.desc { vertical-align: baseline;
                      padding: 1ex 0 1ex 1em;
                      text-align: left; }
  table.toc td.desc p:first-child { margin: 0;
                                    text-align: left; }
  table.toc td.desc p { margin: 1.5ex 0 0 0;
                        text-align: left; }

</style>
</head>
<body>

<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
<h1>FreeType-2.9.1 API Reference</h1>

<h1 id="sfnt_names">SFNT Names</h1>
<h2>Synopsis</h2>
<table class="synopsis">
<tr><td><a href="#FT_SfntName">FT_SfntName</a></td><td><a href="#FT_Get_Sfnt_Name">FT_Get_Sfnt_Name</a></td><td><a href="#FT_Get_Sfnt_LangTag">FT_Get_Sfnt_LangTag</a></td></tr>
<tr><td><a href="#FT_Get_Sfnt_Name_Count">FT_Get_Sfnt_Name_Count</a></td><td><a href="#FT_SfntLangTag">FT_SfntLangTag</a></td><td></td></tr>
</table>


<p>The TrueType and OpenType specifications allow the inclusion of a special names table (&lsquo;name&rsquo;) in font files. This table contains textual (and internationalized) information regarding the font, like family name, copyright, version, etc.</p>
<p>The definitions below are used to access them if available.</p>
<p>Note that this has nothing to do with glyph names!</p>

<div class="section">
<h3 id="FT_SfntName">FT_SfntName</h3>
<p>Defined in FT_SFNT_NAMES_H (freetype/ftsnames.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_SfntName_
  {
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  platform_id;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  encoding_id;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  language_id;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  name_id;

    <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>*   string;      /* this string is *not* null-terminated! */
    <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>    string_len;  /* in bytes                              */

  } <b>FT_SfntName</b>;
</pre>

<p>A structure used to model an SFNT &lsquo;name&rsquo; table entry.</p>

<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="platform_id">platform_id</td><td class="desc">
<p>The platform ID for &lsquo;string&rsquo;. See <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_XXX</a> for possible values.</p>
</td></tr>
<tr><td class="val" id="encoding_id">encoding_id</td><td class="desc">
<p>The encoding ID for &lsquo;string&rsquo;. See <a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_XXX</a>, <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_XXX</a>, <a href="ft2-truetype_tables.html#TT_ISO_ID_XXX">TT_ISO_ID_XXX</a>, <a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_XXX</a>, and <a href="ft2-truetype_tables.html#TT_ADOBE_ID_XXX">TT_ADOBE_ID_XXX</a> for possible values.</p>
</td></tr>
<tr><td class="val" id="language_id">language_id</td><td class="desc">
<p>The language ID for &lsquo;string&rsquo;. See <a href="ft2-truetype_tables.html#TT_MAC_LANGID_XXX">TT_MAC_LANGID_XXX</a> and <a href="ft2-truetype_tables.html#TT_MS_LANGID_XXX">TT_MS_LANGID_XXX</a> for possible values.</p>
<p>Registered OpenType values for &lsquo;language_id&rsquo; are always smaller than 0x8000; values equal or larger than 0x8000 usually indicate a language tag string (introduced in OpenType version 1.6). Use function <a href="ft2-sfnt_names.html#FT_Get_Sfnt_LangTag">FT_Get_Sfnt_LangTag</a> with &lsquo;language_id&rsquo; as its argument to retrieve the associated language tag.</p>
</td></tr>
<tr><td class="val" id="name_id">name_id</td><td class="desc">
<p>An identifier for &lsquo;string&rsquo;. See <a href="ft2-truetype_tables.html#TT_NAME_ID_XXX">TT_NAME_ID_XXX</a> for possible values.</p>
</td></tr>
<tr><td class="val" id="string">string</td><td class="desc">
<p>The &lsquo;name&rsquo; string. Note that its format differs depending on the (platform,encoding) pair, being either a string of bytes (without a terminating NULL byte) or containing UTF-16BE entities.</p>
</td></tr>
<tr><td class="val" id="string_len">string_len</td><td class="desc">
<p>The length of &lsquo;string&rsquo; in bytes.</p>
</td></tr>
</table>

<h4>note</h4>
<p>Please refer to the TrueType or OpenType specification for more details.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Get_Sfnt_Name_Count">FT_Get_Sfnt_Name_Count</h3>
<p>Defined in FT_SFNT_NAMES_H (freetype/ftsnames.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> )
  <b>FT_Get_Sfnt_Name_Count</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>  face );
</pre>

<p>Retrieve the number of name strings in the SFNT &lsquo;name&rsquo; table.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the source face.</p>
</td></tr>
</table>

<h4>return</h4>
<p>The number of strings in the &lsquo;name&rsquo; table.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Get_Sfnt_Name">FT_Get_Sfnt_Name</h3>
<p>Defined in FT_SFNT_NAMES_H (freetype/ftsnames.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Get_Sfnt_Name</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>       face,
                    <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>       idx,
                    <a href="ft2-sfnt_names.html#FT_SfntName">FT_SfntName</a>  *aname );
</pre>

<p>Retrieve a string of the SFNT &lsquo;name&rsquo; table for a given index.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the source face.</p>
</td></tr>
<tr><td class="val" id="idx">idx</td><td class="desc">
<p>The index of the &lsquo;name&rsquo; string.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="aname">aname</td><td class="desc">
<p>The indexed <a href="ft2-sfnt_names.html#FT_SfntName">FT_SfntName</a> structure.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>The &lsquo;string&rsquo; array returned in the &lsquo;aname&rsquo; structure is not null-terminated. Note that you don't have to deallocate &lsquo;string&rsquo; by yourself; FreeType takes care of it if you call <a href="ft2-base_interface.html#FT_Done_Face">FT_Done_Face</a>.</p>
<p>Use <a href="ft2-sfnt_names.html#FT_Get_Sfnt_Name_Count">FT_Get_Sfnt_Name_Count</a> to get the total number of available &lsquo;name&rsquo; table entries, then do a loop until you get the right platform, encoding, and name ID.</p>
<p>&lsquo;name&rsquo; table format&nbsp;1 entries can use language tags also, see <a href="ft2-sfnt_names.html#FT_Get_Sfnt_LangTag">FT_Get_Sfnt_LangTag</a>.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_SfntLangTag">FT_SfntLangTag</h3>
<p>Defined in FT_SFNT_NAMES_H (freetype/ftsnames.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_SfntLangTag_
  {
    <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>*  string;      /* this string is *not* null-terminated! */
    <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>   string_len;  /* in bytes                              */

  } <b>FT_SfntLangTag</b>;
</pre>

<p>A structure to model a language tag entry from an SFNT &lsquo;name&rsquo; table.</p>

<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="string">string</td><td class="desc">
<p>The language tag string, encoded in UTF-16BE (without trailing NULL bytes).</p>
</td></tr>
<tr><td class="val" id="string_len">string_len</td><td class="desc">
<p>The length of &lsquo;string&rsquo; in <b>bytes</b>.</p>
</td></tr>
</table>

<h4>note</h4>
<p>Please refer to the TrueType or OpenType specification for more details.</p>

<h4>since</h4>
<p>2.8</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Get_Sfnt_LangTag">FT_Get_Sfnt_LangTag</h3>
<p>Defined in FT_SFNT_NAMES_H (freetype/ftsnames.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Get_Sfnt_LangTag</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>          face,
                       <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>          langID,
                       <a href="ft2-sfnt_names.html#FT_SfntLangTag">FT_SfntLangTag</a>  *alangTag );
</pre>

<p>Retrieve the language tag associated with a language ID of an SFNT &lsquo;name&rsquo; table entry.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the source face.</p>
</td></tr>
<tr><td class="val" id="langID">langID</td><td class="desc">
<p>The language ID, as returned by <a href="ft2-sfnt_names.html#FT_Get_Sfnt_Name">FT_Get_Sfnt_Name</a>. This is always a value larger than 0x8000.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="alangTag">alangTag</td><td class="desc">
<p>The language tag associated with the &lsquo;name&rsquo; table entry's language ID.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>The &lsquo;string&rsquo; array returned in the &lsquo;alangTag&rsquo; structure is not null-terminated. Note that you don't have to deallocate &lsquo;string&rsquo; by yourself; FreeType takes care of it if you call <a href="ft2-base_interface.html#FT_Done_Face">FT_Done_Face</a>.</p>
<p>Only &lsquo;name&rsquo; table format&nbsp;1 supports language tags. For format&nbsp;0 tables, this function always returns FT_Err_Invalid_Table. For invalid format&nbsp;1 language ID values, FT_Err_Invalid_Argument is returned.</p>

<h4>since</h4>
<p>2.8</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

</body>
</html>
reference/ft2-sizes_management.html000064400000021714151706766400013433 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF;
         width: 87%;
         margin: auto; }

  div.section { width: 75%;
                margin: auto; }
  div.section hr { margin: 4ex 0 1ex 0; }
  div.section h4 { background-color: #EEEEFF;
                   font-size: medium;
                   font-style: oblique;
                   font-weight: bold;
                   margin: 3ex 0 1.5ex 9%;
                   padding: 0.3ex 0 0.3ex 1%; }
  div.section p { margin: 1.5ex 0 1.5ex 10%; }
  div.section pre { margin: 3ex 0 3ex 9%;
                    background-color: #D6E8FF;
                    padding: 2ex 0 2ex 1%; }
  div.section table.fields { width: 90%;
                             margin: 1.5ex 0 1.5ex 10%; }
  div.section table.toc { width: 95%;
                          margin: 1.5ex 0 1.5ex 5%; }
  div.timestamp { text-align: center;
                  font-size: 69%;
                  margin: 1.5ex 0 1.5ex 0; }

  h1 { text-align: center; }
  h3 { font-size: medium;
       margin: 4ex 0 1.5ex 0; }

  p { text-align: justify; }

  pre.colored { color: blue; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  table.fields td.val { font-weight: bold;
                        text-align: right;
                        width: 30%;
                        vertical-align: baseline;
                        padding: 1ex 1em 1ex 0; }
  table.fields td.desc { vertical-align: baseline;
                         padding: 1ex 0 1ex 1em; }
  table.fields td.desc p:first-child { margin: 0; }
  table.fields td.desc p { margin: 1.5ex 0 0 0; }
  table.index { margin: 6ex auto 6ex auto;
                border: 0;
                border-collapse: separate;
                border-spacing: 1em 0.3ex; }
  table.index tr { padding: 0; }
  table.index td { padding: 0; }
  table.index-toc-link { width: 100%;
                         border: 0;
                         border-spacing: 0;
                         margin: 1ex 0 1ex 0; }
  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
                                 font-size: 83%;
                                 text-align: left; }
  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
                                   font-size: 83%;
                                   text-align: center; }
  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
                                  font-size: 83%;
                                  text-align: right; }
  table.synopsis { margin: 6ex auto 6ex auto;
                   border: 0;
                   border-collapse: separate;
                   border-spacing: 2em 0.6ex; }
  table.synopsis tr { padding: 0; }
  table.synopsis td { padding: 0; }
  table.toc td.link { width: 30%;
                      text-align: right;
                      vertical-align: baseline;
                      padding: 1ex 1em 1ex 0; }
  table.toc td.desc { vertical-align: baseline;
                      padding: 1ex 0 1ex 1em;
                      text-align: left; }
  table.toc td.desc p:first-child { margin: 0;
                                    text-align: left; }
  table.toc td.desc p { margin: 1.5ex 0 0 0;
                        text-align: left; }

</style>
</head>
<body>

<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
<h1>FreeType-2.9.1 API Reference</h1>

<h1 id="sizes_management">Size Management</h1>
<h2>Synopsis</h2>
<table class="synopsis">
<tr><td><a href="#FT_New_Size">FT_New_Size</a></td><td><a href="#FT_Done_Size">FT_Done_Size</a></td><td><a href="#FT_Activate_Size">FT_Activate_Size</a></td><td></td></tr>
</table>


<p>When creating a new face object (e.g., with <a href="ft2-base_interface.html#FT_New_Face">FT_New_Face</a>), an <a href="ft2-base_interface.html#FT_Size">FT_Size</a> object is automatically created and used to store all pixel-size dependent information, available in the &lsquo;face-&gt;size&rsquo; field.</p>
<p>It is however possible to create more sizes for a given face, mostly in order to manage several character pixel sizes of the same font family and style. See <a href="ft2-sizes_management.html#FT_New_Size">FT_New_Size</a> and <a href="ft2-sizes_management.html#FT_Done_Size">FT_Done_Size</a>.</p>
<p>Note that <a href="ft2-base_interface.html#FT_Set_Pixel_Sizes">FT_Set_Pixel_Sizes</a> and <a href="ft2-base_interface.html#FT_Set_Char_Size">FT_Set_Char_Size</a> only modify the contents of the current &lsquo;active&rsquo; size; you thus need to use <a href="ft2-sizes_management.html#FT_Activate_Size">FT_Activate_Size</a> to change it.</p>
<p>99% of applications won't need the functions provided here, especially if they use the caching sub-system, so be cautious when using these.</p>

<div class="section">
<h3 id="FT_New_Size">FT_New_Size</h3>
<p>Defined in FT_SIZES_H (freetype/ftsizes.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_New_Size</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>   face,
               <a href="ft2-base_interface.html#FT_Size">FT_Size</a>*  size );
</pre>

<p>Create a new size object from a given face object.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to a parent face object.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="asize">asize</td><td class="desc">
<p>A handle to a new size object.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>You need to call <a href="ft2-sizes_management.html#FT_Activate_Size">FT_Activate_Size</a> in order to select the new size for upcoming calls to <a href="ft2-base_interface.html#FT_Set_Pixel_Sizes">FT_Set_Pixel_Sizes</a>, <a href="ft2-base_interface.html#FT_Set_Char_Size">FT_Set_Char_Size</a>, <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a>, <a href="ft2-base_interface.html#FT_Load_Char">FT_Load_Char</a>, etc.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Done_Size">FT_Done_Size</h3>
<p>Defined in FT_SIZES_H (freetype/ftsizes.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Done_Size</b>( <a href="ft2-base_interface.html#FT_Size">FT_Size</a>  size );
</pre>

<p>Discard a given size object. Note that <a href="ft2-base_interface.html#FT_Done_Face">FT_Done_Face</a> automatically discards all size objects allocated with <a href="ft2-sizes_management.html#FT_New_Size">FT_New_Size</a>.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="size">size</td><td class="desc">
<p>A handle to a target size object.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Activate_Size">FT_Activate_Size</h3>
<p>Defined in FT_SIZES_H (freetype/ftsizes.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Activate_Size</b>( <a href="ft2-base_interface.html#FT_Size">FT_Size</a>  size );
</pre>

<p>Even though it is possible to create several size objects for a given face (see <a href="ft2-sizes_management.html#FT_New_Size">FT_New_Size</a> for details), functions like <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a> or <a href="ft2-base_interface.html#FT_Load_Char">FT_Load_Char</a> only use the one that has been activated last to determine the &lsquo;current character pixel size&rsquo;.</p>
<p>This function can be used to &lsquo;activate&rsquo; a previously created size object.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="size">size</td><td class="desc">
<p>A handle to a target size object.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>If &lsquo;face&rsquo; is the size's parent face object, this function changes the value of &lsquo;face-&gt;size&rsquo; to the input size handle.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

</body>
</html>
reference/ft2-system_interface.html000064400000041634151706766400013451 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF;
         width: 87%;
         margin: auto; }

  div.section { width: 75%;
                margin: auto; }
  div.section hr { margin: 4ex 0 1ex 0; }
  div.section h4 { background-color: #EEEEFF;
                   font-size: medium;
                   font-style: oblique;
                   font-weight: bold;
                   margin: 3ex 0 1.5ex 9%;
                   padding: 0.3ex 0 0.3ex 1%; }
  div.section p { margin: 1.5ex 0 1.5ex 10%; }
  div.section pre { margin: 3ex 0 3ex 9%;
                    background-color: #D6E8FF;
                    padding: 2ex 0 2ex 1%; }
  div.section table.fields { width: 90%;
                             margin: 1.5ex 0 1.5ex 10%; }
  div.section table.toc { width: 95%;
                          margin: 1.5ex 0 1.5ex 5%; }
  div.timestamp { text-align: center;
                  font-size: 69%;
                  margin: 1.5ex 0 1.5ex 0; }

  h1 { text-align: center; }
  h3 { font-size: medium;
       margin: 4ex 0 1.5ex 0; }

  p { text-align: justify; }

  pre.colored { color: blue; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  table.fields td.val { font-weight: bold;
                        text-align: right;
                        width: 30%;
                        vertical-align: baseline;
                        padding: 1ex 1em 1ex 0; }
  table.fields td.desc { vertical-align: baseline;
                         padding: 1ex 0 1ex 1em; }
  table.fields td.desc p:first-child { margin: 0; }
  table.fields td.desc p { margin: 1.5ex 0 0 0; }
  table.index { margin: 6ex auto 6ex auto;
                border: 0;
                border-collapse: separate;
                border-spacing: 1em 0.3ex; }
  table.index tr { padding: 0; }
  table.index td { padding: 0; }
  table.index-toc-link { width: 100%;
                         border: 0;
                         border-spacing: 0;
                         margin: 1ex 0 1ex 0; }
  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
                                 font-size: 83%;
                                 text-align: left; }
  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
                                   font-size: 83%;
                                   text-align: center; }
  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
                                  font-size: 83%;
                                  text-align: right; }
  table.synopsis { margin: 6ex auto 6ex auto;
                   border: 0;
                   border-collapse: separate;
                   border-spacing: 2em 0.6ex; }
  table.synopsis tr { padding: 0; }
  table.synopsis td { padding: 0; }
  table.toc td.link { width: 30%;
                      text-align: right;
                      vertical-align: baseline;
                      padding: 1ex 1em 1ex 0; }
  table.toc td.desc { vertical-align: baseline;
                      padding: 1ex 0 1ex 1em;
                      text-align: left; }
  table.toc td.desc p:first-child { margin: 0;
                                    text-align: left; }
  table.toc td.desc p { margin: 1.5ex 0 0 0;
                        text-align: left; }

</style>
</head>
<body>

<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
<h1>FreeType-2.9.1 API Reference</h1>

<h1 id="system_interface">System Interface</h1>
<h2>Synopsis</h2>
<table class="synopsis">
<tr><td><a href="#FT_Memory">FT_Memory</a></td><td><a href="#FT_MemoryRec">FT_MemoryRec</a></td><td><a href="#FT_Stream_CloseFunc">FT_Stream_CloseFunc</a></td></tr>
<tr><td><a href="#FT_Alloc_Func">FT_Alloc_Func</a></td><td><a href="#FT_Stream">FT_Stream</a></td><td><a href="#FT_StreamRec">FT_StreamRec</a></td></tr>
<tr><td><a href="#FT_Free_Func">FT_Free_Func</a></td><td><a href="#FT_StreamDesc">FT_StreamDesc</a></td><td></td></tr>
<tr><td><a href="#FT_Realloc_Func">FT_Realloc_Func</a></td><td><a href="#FT_Stream_IoFunc">FT_Stream_IoFunc</a></td><td></td></tr>
</table>


<p>This section contains various definitions related to memory management and i/o access. You need to understand this information if you want to use a custom memory manager or you own i/o streams.</p>

<div class="section">
<h3 id="FT_Memory">FT_Memory</h3>
<p>Defined in FT_SYSTEM_H (freetype/ftsystem.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_MemoryRec_*  <b>FT_Memory</b>;
</pre>

<p>A handle to a given memory manager object, defined with an <a href="ft2-system_interface.html#FT_MemoryRec">FT_MemoryRec</a> structure.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Alloc_Func">FT_Alloc_Func</h3>
<p>Defined in FT_SYSTEM_H (freetype/ftsystem.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">void</span>*
  (*<b>FT_Alloc_Func</b>)( <a href="ft2-system_interface.html#FT_Memory">FT_Memory</a>  memory,
                    <span class="keyword">long</span>       size );
</pre>

<p>A function used to allocate &lsquo;size&rsquo; bytes from &lsquo;memory&rsquo;.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="memory">memory</td><td class="desc">
<p>A handle to the source memory manager.</p>
</td></tr>
<tr><td class="val" id="size">size</td><td class="desc">
<p>The size in bytes to allocate.</p>
</td></tr>
</table>

<h4>return</h4>
<p>Address of new memory block. 0&nbsp;in case of failure.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Free_Func">FT_Free_Func</h3>
<p>Defined in FT_SYSTEM_H (freetype/ftsystem.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">void</span>
  (*<b>FT_Free_Func</b>)( <a href="ft2-system_interface.html#FT_Memory">FT_Memory</a>  memory,
                   <span class="keyword">void</span>*      block );
</pre>

<p>A function used to release a given block of memory.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="memory">memory</td><td class="desc">
<p>A handle to the source memory manager.</p>
</td></tr>
<tr><td class="val" id="block">block</td><td class="desc">
<p>The address of the target memory block.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Realloc_Func">FT_Realloc_Func</h3>
<p>Defined in FT_SYSTEM_H (freetype/ftsystem.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">void</span>*
  (*<b>FT_Realloc_Func</b>)( <a href="ft2-system_interface.html#FT_Memory">FT_Memory</a>  memory,
                      <span class="keyword">long</span>       cur_size,
                      <span class="keyword">long</span>       new_size,
                      <span class="keyword">void</span>*      block );
</pre>

<p>A function used to re-allocate a given block of memory.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="memory">memory</td><td class="desc">
<p>A handle to the source memory manager.</p>
</td></tr>
<tr><td class="val" id="cur_size">cur_size</td><td class="desc">
<p>The block's current size in bytes.</p>
</td></tr>
<tr><td class="val" id="new_size">new_size</td><td class="desc">
<p>The block's requested new size.</p>
</td></tr>
<tr><td class="val" id="block">block</td><td class="desc">
<p>The block's current address.</p>
</td></tr>
</table>

<h4>return</h4>
<p>New block address. 0&nbsp;in case of memory shortage.</p>

<h4>note</h4>
<p>In case of error, the old block must still be available.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_MemoryRec">FT_MemoryRec</h3>
<p>Defined in FT_SYSTEM_H (freetype/ftsystem.h).</p>
<pre>
  <span class="keyword">struct</span>  FT_MemoryRec_
  {
    <span class="keyword">void</span>*            user;
    <a href="ft2-system_interface.html#FT_Alloc_Func">FT_Alloc_Func</a>    alloc;
    <a href="ft2-system_interface.html#FT_Free_Func">FT_Free_Func</a>     free;
    <a href="ft2-system_interface.html#FT_Realloc_Func">FT_Realloc_Func</a>  realloc;
  };
</pre>

<p>A structure used to describe a given memory manager to FreeType&nbsp;2.</p>

<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="user">user</td><td class="desc">
<p>A generic typeless pointer for user data.</p>
</td></tr>
<tr><td class="val" id="alloc">alloc</td><td class="desc">
<p>A pointer type to an allocation function.</p>
</td></tr>
<tr><td class="val" id="free">free</td><td class="desc">
<p>A pointer type to an memory freeing function.</p>
</td></tr>
<tr><td class="val" id="realloc">realloc</td><td class="desc">
<p>A pointer type to a reallocation function.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Stream">FT_Stream</h3>
<p>Defined in FT_SYSTEM_H (freetype/ftsystem.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_StreamRec_*  <b>FT_Stream</b>;
</pre>

<p>A handle to an input stream.</p>

<h4>also</h4>
<p>See <a href="ft2-system_interface.html#FT_StreamRec">FT_StreamRec</a> for the publicly accessible fields of a given stream object.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_StreamDesc">FT_StreamDesc</h3>
<p>Defined in FT_SYSTEM_H (freetype/ftsystem.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">union</span>  FT_StreamDesc_
  {
    <span class="keyword">long</span>   value;
    <span class="keyword">void</span>*  pointer;

  } <b>FT_StreamDesc</b>;
</pre>

<p>A union type used to store either a long or a pointer. This is used to store a file descriptor or a &lsquo;FILE*&rsquo; in an input stream.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Stream_IoFunc">FT_Stream_IoFunc</h3>
<p>Defined in FT_SYSTEM_H (freetype/ftsystem.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">unsigned</span> <span class="keyword">long</span>
  (*<b>FT_Stream_IoFunc</b>)( <a href="ft2-system_interface.html#FT_Stream">FT_Stream</a>       stream,
                       <span class="keyword">unsigned</span> <span class="keyword">long</span>   offset,
                       <span class="keyword">unsigned</span> <span class="keyword">char</span>*  buffer,
                       <span class="keyword">unsigned</span> <span class="keyword">long</span>   count );
</pre>

<p>A function used to seek and read data from a given input stream.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="stream">stream</td><td class="desc">
<p>A handle to the source stream.</p>
</td></tr>
<tr><td class="val" id="offset">offset</td><td class="desc">
<p>The offset of read in stream (always from start).</p>
</td></tr>
<tr><td class="val" id="buffer">buffer</td><td class="desc">
<p>The address of the read buffer.</p>
</td></tr>
<tr><td class="val" id="count">count</td><td class="desc">
<p>The number of bytes to read from the stream.</p>
</td></tr>
</table>

<h4>return</h4>
<p>The number of bytes effectively read by the stream.</p>

<h4>note</h4>
<p>This function might be called to perform a seek or skip operation with a &lsquo;count&rsquo; of&nbsp;0. A non-zero return value then indicates an error.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Stream_CloseFunc">FT_Stream_CloseFunc</h3>
<p>Defined in FT_SYSTEM_H (freetype/ftsystem.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">void</span>
  (*<b>FT_Stream_CloseFunc</b>)( <a href="ft2-system_interface.html#FT_Stream">FT_Stream</a>  stream );
</pre>

<p>A function used to close a given input stream.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="stream">stream</td><td class="desc">
<p>A handle to the target stream.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_StreamRec">FT_StreamRec</h3>
<p>Defined in FT_SYSTEM_H (freetype/ftsystem.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_StreamRec_
  {
    <span class="keyword">unsigned</span> <span class="keyword">char</span>*       base;
    <span class="keyword">unsigned</span> <span class="keyword">long</span>        size;
    <span class="keyword">unsigned</span> <span class="keyword">long</span>        pos;

    <a href="ft2-system_interface.html#FT_StreamDesc">FT_StreamDesc</a>        descriptor;
    <a href="ft2-system_interface.html#FT_StreamDesc">FT_StreamDesc</a>        pathname;
    <a href="ft2-system_interface.html#FT_Stream_IoFunc">FT_Stream_IoFunc</a>     read;
    <a href="ft2-system_interface.html#FT_Stream_CloseFunc">FT_Stream_CloseFunc</a>  close;

    <a href="ft2-system_interface.html#FT_Memory">FT_Memory</a>            memory;
    <span class="keyword">unsigned</span> <span class="keyword">char</span>*       cursor;
    <span class="keyword">unsigned</span> <span class="keyword">char</span>*       limit;

  } <b>FT_StreamRec</b>;
</pre>

<p>A structure used to describe an input stream.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="base">base</td><td class="desc">
<p>For memory-based streams, this is the address of the first stream byte in memory. This field should always be set to NULL for disk-based streams.</p>
</td></tr>
<tr><td class="val" id="size">size</td><td class="desc">
<p>The stream size in bytes.</p>
<p>In case of compressed streams where the size is unknown before actually doing the decompression, the value is set to 0x7FFFFFFF. (Note that this size value can occur for normal streams also; it is thus just a hint.)</p>
</td></tr>
<tr><td class="val" id="pos">pos</td><td class="desc">
<p>The current position within the stream.</p>
</td></tr>
<tr><td class="val" id="descriptor">descriptor</td><td class="desc">
<p>This field is a union that can hold an integer or a pointer. It is used by stream implementations to store file descriptors or &lsquo;FILE*&rsquo; pointers.</p>
</td></tr>
<tr><td class="val" id="pathname">pathname</td><td class="desc">
<p>This field is completely ignored by FreeType. However, it is often useful during debugging to use it to store the stream's filename (where available).</p>
</td></tr>
<tr><td class="val" id="read">read</td><td class="desc">
<p>The stream's input function.</p>
</td></tr>
<tr><td class="val" id="close">close</td><td class="desc">
<p>The stream's close function.</p>
</td></tr>
<tr><td class="val" id="memory">memory</td><td class="desc">
<p>The memory manager to use to preload frames. This is set internally by FreeType and shouldn't be touched by stream implementations.</p>
</td></tr>
<tr><td class="val" id="cursor">cursor</td><td class="desc">
<p>This field is set and used internally by FreeType when parsing frames.</p>
</td></tr>
<tr><td class="val" id="limit">limit</td><td class="desc">
<p>This field is set and used internally by FreeType when parsing frames.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

</body>
</html>
reference/ft2-t1_cid_driver.html000064400000011733151706766400012620 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF;
         width: 87%;
         margin: auto; }

  div.section { width: 75%;
                margin: auto; }
  div.section hr { margin: 4ex 0 1ex 0; }
  div.section h4 { background-color: #EEEEFF;
                   font-size: medium;
                   font-style: oblique;
                   font-weight: bold;
                   margin: 3ex 0 1.5ex 9%;
                   padding: 0.3ex 0 0.3ex 1%; }
  div.section p { margin: 1.5ex 0 1.5ex 10%; }
  div.section pre { margin: 3ex 0 3ex 9%;
                    background-color: #D6E8FF;
                    padding: 2ex 0 2ex 1%; }
  div.section table.fields { width: 90%;
                             margin: 1.5ex 0 1.5ex 10%; }
  div.section table.toc { width: 95%;
                          margin: 1.5ex 0 1.5ex 5%; }
  div.timestamp { text-align: center;
                  font-size: 69%;
                  margin: 1.5ex 0 1.5ex 0; }

  h1 { text-align: center; }
  h3 { font-size: medium;
       margin: 4ex 0 1.5ex 0; }

  p { text-align: justify; }

  pre.colored { color: blue; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  table.fields td.val { font-weight: bold;
                        text-align: right;
                        width: 30%;
                        vertical-align: baseline;
                        padding: 1ex 1em 1ex 0; }
  table.fields td.desc { vertical-align: baseline;
                         padding: 1ex 0 1ex 1em; }
  table.fields td.desc p:first-child { margin: 0; }
  table.fields td.desc p { margin: 1.5ex 0 0 0; }
  table.index { margin: 6ex auto 6ex auto;
                border: 0;
                border-collapse: separate;
                border-spacing: 1em 0.3ex; }
  table.index tr { padding: 0; }
  table.index td { padding: 0; }
  table.index-toc-link { width: 100%;
                         border: 0;
                         border-spacing: 0;
                         margin: 1ex 0 1ex 0; }
  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
                                 font-size: 83%;
                                 text-align: left; }
  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
                                   font-size: 83%;
                                   text-align: center; }
  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
                                  font-size: 83%;
                                  text-align: right; }
  table.synopsis { margin: 6ex auto 6ex auto;
                   border: 0;
                   border-collapse: separate;
                   border-spacing: 2em 0.6ex; }
  table.synopsis tr { padding: 0; }
  table.synopsis td { padding: 0; }
  table.toc td.link { width: 30%;
                      text-align: right;
                      vertical-align: baseline;
                      padding: 1ex 1em 1ex 0; }
  table.toc td.desc { vertical-align: baseline;
                      padding: 1ex 0 1ex 1em;
                      text-align: left; }
  table.toc td.desc p:first-child { margin: 0;
                                    text-align: left; }
  table.toc td.desc p { margin: 1.5ex 0 0 0;
                        text-align: left; }

</style>
</head>
<body>

<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
<h1>FreeType-2.9.1 API Reference</h1>

<h1 id="t1_cid_driver">The Type 1 and CID drivers</h1>

<p>It is possible to control the behaviour of FreeType's Type&nbsp;1 and Type&nbsp;1 CID drivers with <a href="ft2-module_management.html#FT_Property_Set">FT_Property_Set</a> and <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a>.</p>
<p>Behind the scenes, both drivers use the Adobe CFF engine for hinting; however, the used properties must be specified separately.</p>
<p>The Type&nbsp;1 driver's module name is &lsquo;type1&rsquo;; the CID driver's module name is &lsquo;t1cid&rsquo;.</p>
<p>Available properties are <a href="ft2-properties.html#hinting-engine">hinting-engine</a>, <a href="ft2-properties.html#no-stem-darkening">no-stem-darkening</a>, <a href="ft2-properties.html#darkening-parameters">darkening-parameters</a>, and <a href="ft2-properties.html#random-seed">random-seed</a>, as documented in the &lsquo;<a href="ft2-properties.html#properties">Driver properties</a>&rsquo; section.</p>
<p>Please see the &lsquo;<a href="ft2-cff_driver.html#cff_driver">The CFF driver</a>&rsquo; section for more details on the new hinting engine.</p>

</body>
</html>
reference/ft2-toc.html000064400000030076151706766400010670 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF;
         width: 87%;
         margin: auto; }

  div.section { width: 75%;
                margin: auto; }
  div.section hr { margin: 4ex 0 1ex 0; }
  div.section h4 { background-color: #EEEEFF;
                   font-size: medium;
                   font-style: oblique;
                   font-weight: bold;
                   margin: 3ex 0 1.5ex 9%;
                   padding: 0.3ex 0 0.3ex 1%; }
  div.section p { margin: 1.5ex 0 1.5ex 10%; }
  div.section pre { margin: 3ex 0 3ex 9%;
                    background-color: #D6E8FF;
                    padding: 2ex 0 2ex 1%; }
  div.section table.fields { width: 90%;
                             margin: 1.5ex 0 1.5ex 10%; }
  div.section table.toc { width: 95%;
                          margin: 1.5ex 0 1.5ex 5%; }
  div.timestamp { text-align: center;
                  font-size: 69%;
                  margin: 1.5ex 0 1.5ex 0; }

  h1 { text-align: center; }
  h3 { font-size: medium;
       margin: 4ex 0 1.5ex 0; }

  p { text-align: justify; }

  pre.colored { color: blue; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  table.fields td.val { font-weight: bold;
                        text-align: right;
                        width: 30%;
                        vertical-align: baseline;
                        padding: 1ex 1em 1ex 0; }
  table.fields td.desc { vertical-align: baseline;
                         padding: 1ex 0 1ex 1em; }
  table.fields td.desc p:first-child { margin: 0; }
  table.fields td.desc p { margin: 1.5ex 0 0 0; }
  table.index { margin: 6ex auto 6ex auto;
                border: 0;
                border-collapse: separate;
                border-spacing: 1em 0.3ex; }
  table.index tr { padding: 0; }
  table.index td { padding: 0; }
  table.index-toc-link { width: 100%;
                         border: 0;
                         border-spacing: 0;
                         margin: 1ex 0 1ex 0; }
  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
                                 font-size: 83%;
                                 text-align: left; }
  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
                                   font-size: 83%;
                                   text-align: center; }
  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
                                  font-size: 83%;
                                  text-align: right; }
  table.synopsis { margin: 6ex auto 6ex auto;
                   border: 0;
                   border-collapse: separate;
                   border-spacing: 2em 0.6ex; }
  table.synopsis tr { padding: 0; }
  table.synopsis td { padding: 0; }
  table.toc td.link { width: 30%;
                      text-align: right;
                      vertical-align: baseline;
                      padding: 1ex 1em 1ex 0; }
  table.toc td.desc { vertical-align: baseline;
                      padding: 1ex 0 1ex 1em;
                      text-align: left; }
  table.toc td.desc p:first-child { margin: 0;
                                    text-align: left; }
  table.toc td.desc p { margin: 1.5ex 0 0 0;
                        text-align: left; }

</style>
</head>
<body>

<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td></tr></table>
<h1>FreeType-2.9.1 API Reference</h1>

<h1>Table of Contents</h1>
<div class="section">
<h2>General Remarks</h2>
<table class="toc">
<tr><td class="link"><a href="ft2-header_inclusion.html">FreeType's header inclusion scheme</a></td><td class="desc">
<p>How client applications should include FreeType header files.</p>
</td></tr>
<tr><td class="link"><a href="ft2-user_allocation.html">User allocation</a></td><td class="desc">
<p>How client applications should allocate FreeType data structures.</p>
</td></tr>
</table>
</div>
<div class="section">
<h2>Core API</h2>
<table class="toc">
<tr><td class="link"><a href="ft2-version.html">FreeType Version</a></td><td class="desc">
<p>Functions and macros related to FreeType versions.</p>
</td></tr>
<tr><td class="link"><a href="ft2-basic_types.html">Basic Data Types</a></td><td class="desc">
<p>The basic data types defined by the library.</p>
</td></tr>
<tr><td class="link"><a href="ft2-base_interface.html">Base Interface</a></td><td class="desc">
<p>The FreeType&nbsp;2 base font interface.</p>
</td></tr>
<tr><td class="link"><a href="ft2-glyph_variants.html">Unicode Variation Sequences</a></td><td class="desc">
<p>The FreeType&nbsp;2 interface to Unicode Variation Sequences (UVS), using the SFNT cmap format&nbsp;14.</p>
</td></tr>
<tr><td class="link"><a href="ft2-glyph_management.html">Glyph Management</a></td><td class="desc">
<p>Generic interface to manage individual glyph data.</p>
</td></tr>
<tr><td class="link"><a href="ft2-mac_specific.html">Mac Specific Interface</a></td><td class="desc">
<p>Only available on the Macintosh.</p>
</td></tr>
<tr><td class="link"><a href="ft2-sizes_management.html">Size Management</a></td><td class="desc">
<p>Managing multiple sizes per face.</p>
</td></tr>
<tr><td class="link"><a href="ft2-header_file_macros.html">Header File Macros</a></td><td class="desc">
<p>Macro definitions used to #include specific header files.</p>
</td></tr>
</table>
</div>
<div class="section">
<h2>Format-Specific API</h2>
<table class="toc">
<tr><td class="link"><a href="ft2-multiple_masters.html">Multiple Masters</a></td><td class="desc">
<p>How to manage Multiple Masters fonts.</p>
</td></tr>
<tr><td class="link"><a href="ft2-truetype_tables.html">TrueType Tables</a></td><td class="desc">
<p>TrueType specific table types and functions.</p>
</td></tr>
<tr><td class="link"><a href="ft2-type1_tables.html">Type 1 Tables</a></td><td class="desc">
<p>Type&nbsp;1 (PostScript) specific font tables.</p>
</td></tr>
<tr><td class="link"><a href="ft2-sfnt_names.html">SFNT Names</a></td><td class="desc">
<p>Access the names embedded in TrueType and OpenType files.</p>
</td></tr>
<tr><td class="link"><a href="ft2-bdf_fonts.html">BDF and PCF Files</a></td><td class="desc">
<p>BDF and PCF specific API.</p>
</td></tr>
<tr><td class="link"><a href="ft2-cid_fonts.html">CID Fonts</a></td><td class="desc">
<p>CID-keyed font specific API.</p>
</td></tr>
<tr><td class="link"><a href="ft2-pfr_fonts.html">PFR Fonts</a></td><td class="desc">
<p>PFR/TrueDoc specific API.</p>
</td></tr>
<tr><td class="link"><a href="ft2-winfnt_fonts.html">Window FNT Files</a></td><td class="desc">
<p>Windows FNT specific API.</p>
</td></tr>
<tr><td class="link"><a href="ft2-font_formats.html">Font Formats</a></td><td class="desc">
<p>Getting the font format.</p>
</td></tr>
<tr><td class="link"><a href="ft2-gasp_table.html">Gasp Table</a></td><td class="desc">
<p>Retrieving TrueType &lsquo;gasp&rsquo; table entries.</p>
</td></tr>
</table>
</div>
<div class="section">
<h2>Controlling FreeType Modules</h2>
<table class="toc">
<tr><td class="link"><a href="ft2-auto_hinter.html">The auto-hinter</a></td><td class="desc">
<p>Controlling the auto-hinting module.</p>
</td></tr>
<tr><td class="link"><a href="ft2-cff_driver.html">The CFF driver</a></td><td class="desc">
<p>Controlling the CFF driver module.</p>
</td></tr>
<tr><td class="link"><a href="ft2-t1_cid_driver.html">The Type 1 and CID drivers</a></td><td class="desc">
<p>Controlling the Type&nbsp;1 and CID driver modules.</p>
</td></tr>
<tr><td class="link"><a href="ft2-tt_driver.html">The TrueType driver</a></td><td class="desc">
<p>Controlling the TrueType driver module.</p>
</td></tr>
<tr><td class="link"><a href="ft2-pcf_driver.html">The PCF driver</a></td><td class="desc">
<p>Controlling the PCF driver module.</p>
</td></tr>
<tr><td class="link"><a href="ft2-properties.html">Driver properties</a></td><td class="desc">
<p>Controlling driver modules.</p>
</td></tr>
<tr><td class="link"><a href="ft2-parameter_tags.html">Parameter Tags</a></td><td class="desc">
<p>Macros for driver property and font loading parameter tags.</p>
</td></tr>
</table>
</div>
<div class="section">
<h2>Cache Sub-System</h2>
<table class="toc">
<tr><td class="link"><a href="ft2-cache_subsystem.html">Cache Sub-System</a></td><td class="desc">
<p>How to cache face, size, and glyph data with FreeType&nbsp;2.</p>
</td></tr>
</table>
</div>
<div class="section">
<h2>Support API</h2>
<table class="toc">
<tr><td class="link"><a href="ft2-computations.html">Computations</a></td><td class="desc">
<p>Crunching fixed numbers and vectors.</p>
</td></tr>
<tr><td class="link"><a href="ft2-list_processing.html">List Processing</a></td><td class="desc">
<p>Simple management of lists.</p>
</td></tr>
<tr><td class="link"><a href="ft2-outline_processing.html">Outline Processing</a></td><td class="desc">
<p>Functions to create, transform, and render vectorial glyph images.</p>
</td></tr>
<tr><td class="link"><a href="ft2-quick_advance.html">Quick retrieval of advance values</a></td><td class="desc">
<p>Retrieve horizontal and vertical advance values without processing glyph outlines, if possible.</p>
</td></tr>
<tr><td class="link"><a href="ft2-bitmap_handling.html">Bitmap Handling</a></td><td class="desc">
<p>Handling FT_Bitmap objects.</p>
</td></tr>
<tr><td class="link"><a href="ft2-raster.html">Scanline Converter</a></td><td class="desc">
<p>How vectorial outlines are converted into bitmaps and pixmaps.</p>
</td></tr>
<tr><td class="link"><a href="ft2-glyph_stroker.html">Glyph Stroker</a></td><td class="desc">
<p>Generating bordered and stroked glyphs.</p>
</td></tr>
<tr><td class="link"><a href="ft2-system_interface.html">System Interface</a></td><td class="desc">
<p>How FreeType manages memory and i/o.</p>
</td></tr>
<tr><td class="link"><a href="ft2-module_management.html">Module Management</a></td><td class="desc">
<p>How to add, upgrade, remove, and control modules from FreeType.</p>
</td></tr>
<tr><td class="link"><a href="ft2-gzip.html">GZIP Streams</a></td><td class="desc">
<p>Using gzip-compressed font files.</p>
</td></tr>
<tr><td class="link"><a href="ft2-lzw.html">LZW Streams</a></td><td class="desc">
<p>Using LZW-compressed font files.</p>
</td></tr>
<tr><td class="link"><a href="ft2-bzip2.html">BZIP2 Streams</a></td><td class="desc">
<p>Using bzip2-compressed font files.</p>
</td></tr>
<tr><td class="link"><a href="ft2-lcd_filtering.html">LCD Filtering</a></td><td class="desc">
<p>Reduce color fringes of subpixel-rendered bitmaps.</p>
</td></tr>
</table>
</div>
<div class="section">
<h2>Error Codes</h2>
<table class="toc">
<tr><td class="link"><a href="ft2-error_enumerations.html">Error Enumerations</a></td><td class="desc">
<p>How to handle errors and error strings.</p>
</td></tr>
<tr><td class="link"><a href="ft2-error_code_values.html">Error Code Values</a></td><td class="desc">
<p>All possible error codes returned by FreeType functions.</p>
</td></tr>
</table>
</div>
<div class="section">
<h2>Miscellaneous</h2>
<table class="toc">
<tr><td class="link"><a href="ft2-ot_validation.html">OpenType Validation</a></td><td class="desc">
<p>An API to validate OpenType tables.</p>
</td></tr>
<tr><td class="link"><a href="ft2-incremental.html">Incremental Loading</a></td><td class="desc">
<p>Custom Glyph Loading.</p>
</td></tr>
<tr><td class="link"><a href="ft2-truetype_engine.html">The TrueType Engine</a></td><td class="desc">
<p>TrueType bytecode support.</p>
</td></tr>
<tr><td class="link"><a href="ft2-gx_validation.html">TrueTypeGX/AAT Validation</a></td><td class="desc">
<p>An API to validate TrueTypeGX/AAT tables.</p>
</td></tr>
</table>
</div>
<div class="section">
<h2><a href="ft2-index.html">Global Index</a></h2></div>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td></tr></table>

<div class="timestamp">generated on Tue May  1 23:34:43 2018</div></body>
</html>
reference/ft2-truetype_engine.html000064400000016012151706766400013303 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF;
         width: 87%;
         margin: auto; }

  div.section { width: 75%;
                margin: auto; }
  div.section hr { margin: 4ex 0 1ex 0; }
  div.section h4 { background-color: #EEEEFF;
                   font-size: medium;
                   font-style: oblique;
                   font-weight: bold;
                   margin: 3ex 0 1.5ex 9%;
                   padding: 0.3ex 0 0.3ex 1%; }
  div.section p { margin: 1.5ex 0 1.5ex 10%; }
  div.section pre { margin: 3ex 0 3ex 9%;
                    background-color: #D6E8FF;
                    padding: 2ex 0 2ex 1%; }
  div.section table.fields { width: 90%;
                             margin: 1.5ex 0 1.5ex 10%; }
  div.section table.toc { width: 95%;
                          margin: 1.5ex 0 1.5ex 5%; }
  div.timestamp { text-align: center;
                  font-size: 69%;
                  margin: 1.5ex 0 1.5ex 0; }

  h1 { text-align: center; }
  h3 { font-size: medium;
       margin: 4ex 0 1.5ex 0; }

  p { text-align: justify; }

  pre.colored { color: blue; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  table.fields td.val { font-weight: bold;
                        text-align: right;
                        width: 30%;
                        vertical-align: baseline;
                        padding: 1ex 1em 1ex 0; }
  table.fields td.desc { vertical-align: baseline;
                         padding: 1ex 0 1ex 1em; }
  table.fields td.desc p:first-child { margin: 0; }
  table.fields td.desc p { margin: 1.5ex 0 0 0; }
  table.index { margin: 6ex auto 6ex auto;
                border: 0;
                border-collapse: separate;
                border-spacing: 1em 0.3ex; }
  table.index tr { padding: 0; }
  table.index td { padding: 0; }
  table.index-toc-link { width: 100%;
                         border: 0;
                         border-spacing: 0;
                         margin: 1ex 0 1ex 0; }
  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
                                 font-size: 83%;
                                 text-align: left; }
  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
                                   font-size: 83%;
                                   text-align: center; }
  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
                                  font-size: 83%;
                                  text-align: right; }
  table.synopsis { margin: 6ex auto 6ex auto;
                   border: 0;
                   border-collapse: separate;
                   border-spacing: 2em 0.6ex; }
  table.synopsis tr { padding: 0; }
  table.synopsis td { padding: 0; }
  table.toc td.link { width: 30%;
                      text-align: right;
                      vertical-align: baseline;
                      padding: 1ex 1em 1ex 0; }
  table.toc td.desc { vertical-align: baseline;
                      padding: 1ex 0 1ex 1em;
                      text-align: left; }
  table.toc td.desc p:first-child { margin: 0;
                                    text-align: left; }
  table.toc td.desc p { margin: 1.5ex 0 0 0;
                        text-align: left; }

</style>
</head>
<body>

<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
<h1>FreeType-2.9.1 API Reference</h1>

<h1 id="truetype_engine">The TrueType Engine</h1>
<h2>Synopsis</h2>
<table class="synopsis">
<tr><td><a href="#FT_TrueTypeEngineType">FT_TrueTypeEngineType</a></td><td><a href="#FT_Get_TrueType_Engine_Type">FT_Get_TrueType_Engine_Type</a></td></tr>
</table>


<p>This section contains a function used to query the level of TrueType bytecode support compiled in this version of the library.</p>

<div class="section">
<h3 id="FT_TrueTypeEngineType">FT_TrueTypeEngineType</h3>
<p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">enum</span>  FT_TrueTypeEngineType_
  {
    <a href="ft2-truetype_engine.html#FT_TRUETYPE_ENGINE_TYPE_NONE">FT_TRUETYPE_ENGINE_TYPE_NONE</a> = 0,
    <a href="ft2-truetype_engine.html#FT_TRUETYPE_ENGINE_TYPE_UNPATENTED">FT_TRUETYPE_ENGINE_TYPE_UNPATENTED</a>,
    <a href="ft2-truetype_engine.html#FT_TRUETYPE_ENGINE_TYPE_PATENTED">FT_TRUETYPE_ENGINE_TYPE_PATENTED</a>

  } <b>FT_TrueTypeEngineType</b>;
</pre>

<p>A list of values describing which kind of TrueType bytecode engine is implemented in a given FT_Library instance. It is used by the <a href="ft2-truetype_engine.html#FT_Get_TrueType_Engine_Type">FT_Get_TrueType_Engine_Type</a> function.</p>

<h4>values</h4>
<table class="fields">
<tr><td class="val" id="FT_TRUETYPE_ENGINE_TYPE_NONE">FT_TRUETYPE_ENGINE_TYPE_NONE</td><td class="desc">
<p>The library doesn't implement any kind of bytecode interpreter.</p>
</td></tr>
<tr><td class="val" id="FT_TRUETYPE_ENGINE_TYPE_UNPATENTED">FT_TRUETYPE_ENGINE_TYPE_UNPATENTED</td><td class="desc">
<p>Deprecated and removed.</p>
</td></tr>
<tr><td class="val" id="FT_TRUETYPE_ENGINE_TYPE_PATENTED">FT_TRUETYPE_ENGINE_TYPE_PATENTED</td><td class="desc">
<p>The library implements a bytecode interpreter that covers the full instruction set of the TrueType virtual machine (this was governed by patents until May 2010, hence the name).</p>
</td></tr>
</table>

<h4>since</h4>
<p>2.2</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Get_TrueType_Engine_Type">FT_Get_TrueType_Engine_Type</h3>
<p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-truetype_engine.html#FT_TrueTypeEngineType">FT_TrueTypeEngineType</a> )
  <b>FT_Get_TrueType_Engine_Type</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a>  library );
</pre>

<p>Return an <a href="ft2-truetype_engine.html#FT_TrueTypeEngineType">FT_TrueTypeEngineType</a> value to indicate which level of the TrueType virtual machine a given library instance supports.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="library">library</td><td class="desc">
<p>A library instance.</p>
</td></tr>
</table>

<h4>return</h4>
<p>A value indicating which level is supported.</p>

<h4>since</h4>
<p>2.2</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

</body>
</html>
reference/ft2-truetype_tables.html000064400000313730151706766400013317 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF;
         width: 87%;
         margin: auto; }

  div.section { width: 75%;
                margin: auto; }
  div.section hr { margin: 4ex 0 1ex 0; }
  div.section h4 { background-color: #EEEEFF;
                   font-size: medium;
                   font-style: oblique;
                   font-weight: bold;
                   margin: 3ex 0 1.5ex 9%;
                   padding: 0.3ex 0 0.3ex 1%; }
  div.section p { margin: 1.5ex 0 1.5ex 10%; }
  div.section pre { margin: 3ex 0 3ex 9%;
                    background-color: #D6E8FF;
                    padding: 2ex 0 2ex 1%; }
  div.section table.fields { width: 90%;
                             margin: 1.5ex 0 1.5ex 10%; }
  div.section table.toc { width: 95%;
                          margin: 1.5ex 0 1.5ex 5%; }
  div.timestamp { text-align: center;
                  font-size: 69%;
                  margin: 1.5ex 0 1.5ex 0; }

  h1 { text-align: center; }
  h3 { font-size: medium;
       margin: 4ex 0 1.5ex 0; }

  p { text-align: justify; }

  pre.colored { color: blue; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  table.fields td.val { font-weight: bold;
                        text-align: right;
                        width: 30%;
                        vertical-align: baseline;
                        padding: 1ex 1em 1ex 0; }
  table.fields td.desc { vertical-align: baseline;
                         padding: 1ex 0 1ex 1em; }
  table.fields td.desc p:first-child { margin: 0; }
  table.fields td.desc p { margin: 1.5ex 0 0 0; }
  table.index { margin: 6ex auto 6ex auto;
                border: 0;
                border-collapse: separate;
                border-spacing: 1em 0.3ex; }
  table.index tr { padding: 0; }
  table.index td { padding: 0; }
  table.index-toc-link { width: 100%;
                         border: 0;
                         border-spacing: 0;
                         margin: 1ex 0 1ex 0; }
  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
                                 font-size: 83%;
                                 text-align: left; }
  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
                                   font-size: 83%;
                                   text-align: center; }
  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
                                  font-size: 83%;
                                  text-align: right; }
  table.synopsis { margin: 6ex auto 6ex auto;
                   border: 0;
                   border-collapse: separate;
                   border-spacing: 2em 0.6ex; }
  table.synopsis tr { padding: 0; }
  table.synopsis td { padding: 0; }
  table.toc td.link { width: 30%;
                      text-align: right;
                      vertical-align: baseline;
                      padding: 1ex 1em 1ex 0; }
  table.toc td.desc { vertical-align: baseline;
                      padding: 1ex 0 1ex 1em;
                      text-align: left; }
  table.toc td.desc p:first-child { margin: 0;
                                    text-align: left; }
  table.toc td.desc p { margin: 1.5ex 0 0 0;
                        text-align: left; }

</style>
</head>
<body>

<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
<h1>FreeType-2.9.1 API Reference</h1>

<h1 id="truetype_tables">TrueType Tables</h1>
<h2>Synopsis</h2>
<table class="synopsis">
<tr><td><a href="#TT_Header">TT_Header</a></td><td><a href="#FT_Load_Sfnt_Table">FT_Load_Sfnt_Table</a></td><td><a href="#TT_MAC_ID_XXX">TT_MAC_ID_XXX</a></td></tr>
<tr><td><a href="#TT_HoriHeader">TT_HoriHeader</a></td><td><a href="#FT_Sfnt_Table_Info">FT_Sfnt_Table_Info</a></td><td><a href="#TT_ISO_ID_XXX">TT_ISO_ID_XXX</a></td></tr>
<tr><td><a href="#TT_VertHeader">TT_VertHeader</a></td><td>&nbsp;</td><td><a href="#TT_MS_ID_XXX">TT_MS_ID_XXX</a></td></tr>
<tr><td><a href="#TT_OS2">TT_OS2</a></td><td><a href="#FT_Get_CMap_Language_ID">FT_Get_CMap_Language_ID</a></td><td><a href="#TT_ADOBE_ID_XXX">TT_ADOBE_ID_XXX</a></td></tr>
<tr><td><a href="#TT_Postscript">TT_Postscript</a></td><td><a href="#FT_Get_CMap_Format">FT_Get_CMap_Format</a></td><td><a href="#TT_MAC_LANGID_XXX">TT_MAC_LANGID_XXX</a></td></tr>
<tr><td><a href="#TT_PCLT">TT_PCLT</a></td><td>&nbsp;</td><td><a href="#TT_MS_LANGID_XXX">TT_MS_LANGID_XXX</a></td></tr>
<tr><td><a href="#TT_MaxProfile">TT_MaxProfile</a></td><td><a href="#FT_PARAM_TAG_UNPATENTED_HINTING">FT_PARAM_TAG_UNPATENTED_HINTING</a></td><td><a href="#TT_NAME_ID_XXX">TT_NAME_ID_XXX</a></td></tr>
<tr><td>&nbsp;</td><td>&nbsp;</td><td><a href="#TT_UCR_XXX">TT_UCR_XXX</a></td></tr>
<tr><td><a href="#FT_Sfnt_Tag">FT_Sfnt_Tag</a></td><td><a href="#TT_PLATFORM_XXX">TT_PLATFORM_XXX</a></td><td></td></tr>
<tr><td><a href="#FT_Get_Sfnt_Table">FT_Get_Sfnt_Table</a></td><td><a href="#TT_APPLE_ID_XXX">TT_APPLE_ID_XXX</a></td><td></td></tr>
</table>


<p>This section contains definitions of some basic tables specific to TrueType and OpenType as well as some routines used to access and process them.</p>

<div class="section">
<h3 id="TT_Header">TT_Header</h3>
<p>Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  TT_Header_
  {
    <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>   Table_Version;
    <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>   Font_Revision;

    <a href="ft2-basic_types.html#FT_Long">FT_Long</a>    CheckSum_Adjust;
    <a href="ft2-basic_types.html#FT_Long">FT_Long</a>    Magic_Number;

    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  Flags;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  Units_Per_EM;

    <a href="ft2-basic_types.html#FT_Long">FT_Long</a>    Created [2];
    <a href="ft2-basic_types.html#FT_Long">FT_Long</a>    Modified[2];

    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   xMin;
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   yMin;
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   xMax;
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   yMax;

    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  Mac_Style;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  Lowest_Rec_PPEM;

    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   Font_Direction;
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   Index_To_Loc_Format;
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   Glyph_Data_Format;

  } <b>TT_Header</b>;
</pre>

<p>A structure to model a TrueType font header table. All fields follow the OpenType specification.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="TT_HoriHeader">TT_HoriHeader</h3>
<p>Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  TT_HoriHeader_
  {
    <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>   Version;
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   Ascender;
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   Descender;
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   Line_Gap;

    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  advance_Width_Max;      /* advance width maximum */

    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   min_Left_Side_Bearing;  /* minimum left-sb       */
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   min_Right_Side_Bearing; /* minimum right-sb      */
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   xMax_Extent;            /* xmax extents          */
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   caret_Slope_Rise;
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   caret_Slope_Run;
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   caret_Offset;

    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   Reserved[4];

    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   metric_Data_Format;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  number_Of_HMetrics;

    /* The following fields are not defined by the OpenType specification */
    /* but they are used to connect the metrics header to the relevant    */
    /* `hmtx' table.                                                      */

    <span class="keyword">void</span>*      long_metrics;
    <span class="keyword">void</span>*      short_metrics;

  } <b>TT_HoriHeader</b>;
</pre>

<p>A structure to model a TrueType horizontal header, the &lsquo;hhea&rsquo; table, as well as the corresponding horizontal metrics table, &lsquo;hmtx&rsquo;.</p>

<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="Version">Version</td><td class="desc">
<p>The table version.</p>
</td></tr>
<tr><td class="val" id="Ascender">Ascender</td><td class="desc">
<p>The font's ascender, i.e., the distance from the baseline to the top-most of all glyph points found in the font.</p>
<p>This value is invalid in many fonts, as it is usually set by the font designer, and often reflects only a portion of the glyphs found in the font (maybe ASCII).</p>
<p>You should use the &lsquo;sTypoAscender&rsquo; field of the &lsquo;OS/2&rsquo; table instead if you want the correct one.</p>
</td></tr>
<tr><td class="val" id="Descender">Descender</td><td class="desc">
<p>The font's descender, i.e., the distance from the baseline to the bottom-most of all glyph points found in the font. It is negative.</p>
<p>This value is invalid in many fonts, as it is usually set by the font designer, and often reflects only a portion of the glyphs found in the font (maybe ASCII).</p>
<p>You should use the &lsquo;sTypoDescender&rsquo; field of the &lsquo;OS/2&rsquo; table instead if you want the correct one.</p>
</td></tr>
<tr><td class="val" id="Line_Gap">Line_Gap</td><td class="desc">
<p>The font's line gap, i.e., the distance to add to the ascender and descender to get the BTB, i.e., the baseline-to-baseline distance for the font.</p>
</td></tr>
<tr><td class="val" id="advance_Width_Max">advance_Width_Max</td><td class="desc">
<p>This field is the maximum of all advance widths found in the font. It can be used to compute the maximum width of an arbitrary string of text.</p>
</td></tr>
<tr><td class="val" id="min_Left_Side_Bearing">min_Left_Side_Bearing</td><td class="desc">
<p>The minimum left side bearing of all glyphs within the font.</p>
</td></tr>
<tr><td class="val" id="min_Right_Side_Bearing">min_Right_Side_Bearing</td><td class="desc">
<p>The minimum right side bearing of all glyphs within the font.</p>
</td></tr>
<tr><td class="val" id="xMax_Extent">xMax_Extent</td><td class="desc">
<p>The maximum horizontal extent (i.e., the &lsquo;width&rsquo; of a glyph's bounding box) for all glyphs in the font.</p>
</td></tr>
<tr><td class="val" id="caret_Slope_Rise">caret_Slope_Rise</td><td class="desc">
<p>The rise coefficient of the cursor's slope of the cursor (slope=rise/run).</p>
</td></tr>
<tr><td class="val" id="caret_Slope_Run">caret_Slope_Run</td><td class="desc">
<p>The run coefficient of the cursor's slope.</p>
</td></tr>
<tr><td class="val" id="caret_Offset">caret_Offset</td><td class="desc">
<p>The cursor's offset for slanted fonts.</p>
</td></tr>
<tr><td class="val" id="Reserved">Reserved</td><td class="desc">
<p>8&nbsp;reserved bytes.</p>
</td></tr>
<tr><td class="val" id="metric_Data_Format">metric_Data_Format</td><td class="desc">
<p>Always&nbsp;0.</p>
</td></tr>
<tr><td class="val" id="number_Of_HMetrics">number_Of_HMetrics</td><td class="desc">
<p>Number of HMetrics entries in the &lsquo;hmtx&rsquo; table -- this value can be smaller than the total number of glyphs in the font.</p>
</td></tr>
<tr><td class="val" id="long_metrics">long_metrics</td><td class="desc">
<p>A pointer into the &lsquo;hmtx&rsquo; table.</p>
</td></tr>
<tr><td class="val" id="short_metrics">short_metrics</td><td class="desc">
<p>A pointer into the &lsquo;hmtx&rsquo; table.</p>
</td></tr>
</table>

<h4>note</h4>
<p>For an OpenType variation font, the values of the following fields can change after a call to <a href="ft2-multiple_masters.html#FT_Set_Var_Design_Coordinates">FT_Set_Var_Design_Coordinates</a> (and friends) if the font contains an &lsquo;MVAR&rsquo; table: &lsquo;caret_Slope_Rise&rsquo;, &lsquo;caret_Slope_Run&rsquo;, and &lsquo;caret_Offset&rsquo;.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="TT_VertHeader">TT_VertHeader</h3>
<p>Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  TT_VertHeader_
  {
    <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>   Version;
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   Ascender;
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   Descender;
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   Line_Gap;

    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  advance_Height_Max;      /* advance height maximum */

    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   min_Top_Side_Bearing;    /* minimum top-sb          */
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   min_Bottom_Side_Bearing; /* minimum bottom-sb       */
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   yMax_Extent;             /* ymax extents            */
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   caret_Slope_Rise;
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   caret_Slope_Run;
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   caret_Offset;

    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   Reserved[4];

    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   metric_Data_Format;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  number_Of_VMetrics;

    /* The following fields are not defined by the OpenType specification */
    /* but they are used to connect the metrics header to the relevant    */
    /* `vmtx' table.                                                      */

    <span class="keyword">void</span>*      long_metrics;
    <span class="keyword">void</span>*      short_metrics;

  } <b>TT_VertHeader</b>;
</pre>

<p>A structure used to model a TrueType vertical header, the &lsquo;vhea&rsquo; table, as well as the corresponding vertical metrics table, &lsquo;vmtx&rsquo;.</p>

<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="Version">Version</td><td class="desc">
<p>The table version.</p>
</td></tr>
<tr><td class="val" id="Ascender">Ascender</td><td class="desc">
<p>The font's ascender, i.e., the distance from the baseline to the top-most of all glyph points found in the font.</p>
<p>This value is invalid in many fonts, as it is usually set by the font designer, and often reflects only a portion of the glyphs found in the font (maybe ASCII).</p>
<p>You should use the &lsquo;sTypoAscender&rsquo; field of the &lsquo;OS/2&rsquo; table instead if you want the correct one.</p>
</td></tr>
<tr><td class="val" id="Descender">Descender</td><td class="desc">
<p>The font's descender, i.e., the distance from the baseline to the bottom-most of all glyph points found in the font. It is negative.</p>
<p>This value is invalid in many fonts, as it is usually set by the font designer, and often reflects only a portion of the glyphs found in the font (maybe ASCII).</p>
<p>You should use the &lsquo;sTypoDescender&rsquo; field of the &lsquo;OS/2&rsquo; table instead if you want the correct one.</p>
</td></tr>
<tr><td class="val" id="Line_Gap">Line_Gap</td><td class="desc">
<p>The font's line gap, i.e., the distance to add to the ascender and descender to get the BTB, i.e., the baseline-to-baseline distance for the font.</p>
</td></tr>
<tr><td class="val" id="advance_Height_Max">advance_Height_Max</td><td class="desc">
<p>This field is the maximum of all advance heights found in the font. It can be used to compute the maximum height of an arbitrary string of text.</p>
</td></tr>
<tr><td class="val" id="min_Top_Side_Bearing">min_Top_Side_Bearing</td><td class="desc">
<p>The minimum top side bearing of all glyphs within the font.</p>
</td></tr>
<tr><td class="val" id="min_Bottom_Side_Bearing">min_Bottom_Side_Bearing</td><td class="desc">
<p>The minimum bottom side bearing of all glyphs within the font.</p>
</td></tr>
<tr><td class="val" id="yMax_Extent">yMax_Extent</td><td class="desc">
<p>The maximum vertical extent (i.e., the &lsquo;height&rsquo; of a glyph's bounding box) for all glyphs in the font.</p>
</td></tr>
<tr><td class="val" id="caret_Slope_Rise">caret_Slope_Rise</td><td class="desc">
<p>The rise coefficient of the cursor's slope of the cursor (slope=rise/run).</p>
</td></tr>
<tr><td class="val" id="caret_Slope_Run">caret_Slope_Run</td><td class="desc">
<p>The run coefficient of the cursor's slope.</p>
</td></tr>
<tr><td class="val" id="caret_Offset">caret_Offset</td><td class="desc">
<p>The cursor's offset for slanted fonts.</p>
</td></tr>
<tr><td class="val" id="Reserved">Reserved</td><td class="desc">
<p>8&nbsp;reserved bytes.</p>
</td></tr>
<tr><td class="val" id="metric_Data_Format">metric_Data_Format</td><td class="desc">
<p>Always&nbsp;0.</p>
</td></tr>
<tr><td class="val" id="number_Of_VMetrics">number_Of_VMetrics</td><td class="desc">
<p>Number of VMetrics entries in the &lsquo;vmtx&rsquo; table -- this value can be smaller than the total number of glyphs in the font.</p>
</td></tr>
<tr><td class="val" id="long_metrics">long_metrics</td><td class="desc">
<p>A pointer into the &lsquo;vmtx&rsquo; table.</p>
</td></tr>
<tr><td class="val" id="short_metrics">short_metrics</td><td class="desc">
<p>A pointer into the &lsquo;vmtx&rsquo; table.</p>
</td></tr>
</table>

<h4>note</h4>
<p>For an OpenType variation font, the values of the following fields can change after a call to <a href="ft2-multiple_masters.html#FT_Set_Var_Design_Coordinates">FT_Set_Var_Design_Coordinates</a> (and friends) if the font contains an &lsquo;MVAR&rsquo; table: &lsquo;Ascender&rsquo;, &lsquo;Descender&rsquo;, &lsquo;Line_Gap&rsquo;, &lsquo;caret_Slope_Rise&rsquo;, &lsquo;caret_Slope_Run&rsquo;, and &lsquo;caret_Offset&rsquo;.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="TT_OS2">TT_OS2</h3>
<p>Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  TT_OS2_
  {
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  version;                /* 0x0001 - more or 0xFFFF */
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   xAvgCharWidth;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  usWeightClass;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  usWidthClass;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  fsType;
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   ySubscriptXSize;
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   ySubscriptYSize;
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   ySubscriptXOffset;
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   ySubscriptYOffset;
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   ySuperscriptXSize;
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   ySuperscriptYSize;
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   ySuperscriptXOffset;
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   ySuperscriptYOffset;
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   yStrikeoutSize;
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   yStrikeoutPosition;
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   sFamilyClass;

    <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>    panose[10];

    <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>   ulUnicodeRange1;        /* Bits 0-31   */
    <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>   ulUnicodeRange2;        /* Bits 32-63  */
    <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>   ulUnicodeRange3;        /* Bits 64-95  */
    <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>   ulUnicodeRange4;        /* Bits 96-127 */

    <a href="ft2-basic_types.html#FT_Char">FT_Char</a>    achVendID[4];

    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  fsSelection;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  usFirstCharIndex;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  usLastCharIndex;
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   sTypoAscender;
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   sTypoDescender;
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   sTypoLineGap;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  usWinAscent;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  usWinDescent;

    /* only version 1 and higher: */

    <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>   ulCodePageRange1;       /* Bits 0-31   */
    <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>   ulCodePageRange2;       /* Bits 32-63  */

    /* only version 2 and higher: */

    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   sxHeight;
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   sCapHeight;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  usDefaultChar;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  usBreakChar;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  usMaxContext;

    /* only version 5 and higher: */

    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  usLowerOpticalPointSize;       /* in twips (1/20th points) */
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  usUpperOpticalPointSize;       /* in twips (1/20th points) */

  } <b>TT_OS2</b>;
</pre>

<p>A structure to model a TrueType &lsquo;OS/2&rsquo; table. All fields comply to the OpenType specification.</p>
<p>Note that we now support old Mac fonts that do not include an &lsquo;OS/2&rsquo; table. In this case, the &lsquo;version&rsquo; field is always set to 0xFFFF.</p>

<h4>note</h4>
<p>For an OpenType variation font, the values of the following fields can change after a call to <a href="ft2-multiple_masters.html#FT_Set_Var_Design_Coordinates">FT_Set_Var_Design_Coordinates</a> (and friends) if the font contains an &lsquo;MVAR&rsquo; table: &lsquo;sCapHeight&rsquo;, &lsquo;sTypoAscender&rsquo;, &lsquo;sTypoDescender&rsquo;, &lsquo;sTypoLineGap&rsquo;, &lsquo;sxHeight&rsquo;, &lsquo;usWinAscent&rsquo;, &lsquo;usWinDescent&rsquo;, &lsquo;yStrikeoutPosition&rsquo;, &lsquo;yStrikeoutSize&rsquo;, &lsquo;ySubscriptXOffset&rsquo;, &lsquo;ySubScriptXSize&rsquo;, &lsquo;ySubscriptYOffset&rsquo;, &lsquo;ySubscriptYSize&rsquo;, &lsquo;ySuperscriptXOffset&rsquo;, &lsquo;ySuperscriptXSize&rsquo;, &lsquo;ySuperscriptYOffset&rsquo;, and &lsquo;ySuperscriptYSize&rsquo;.</p>
<p>Possible values for bits in the &lsquo;ulUnicodeRangeX&rsquo; fields are given by the <a href="ft2-truetype_tables.html#TT_UCR_XXX">TT_UCR_XXX</a> macros.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="TT_Postscript">TT_Postscript</h3>
<p>Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  TT_Postscript_
  {
    <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>  FormatType;
    <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>  italicAngle;
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>  underlinePosition;
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>  underlineThickness;
    <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>  isFixedPitch;
    <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>  minMemType42;
    <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>  maxMemType42;
    <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>  minMemType1;
    <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>  maxMemType1;

    /* Glyph names follow in the `post' table, but we don't */
    /* load them by default.                                */

  } <b>TT_Postscript</b>;
</pre>

<p>A structure to model a TrueType &lsquo;post&rsquo; table. All fields comply to the OpenType specification. This structure does not reference a font's PostScript glyph names; use <a href="ft2-base_interface.html#FT_Get_Glyph_Name">FT_Get_Glyph_Name</a> to retrieve them.</p>

<h4>note</h4>
<p>For an OpenType variation font, the values of the following fields can change after a call to <a href="ft2-multiple_masters.html#FT_Set_Var_Design_Coordinates">FT_Set_Var_Design_Coordinates</a> (and friends) if the font contains an &lsquo;MVAR&rsquo; table: &lsquo;underlinePosition&rsquo; and &lsquo;underlineThickness&rsquo;.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="TT_PCLT">TT_PCLT</h3>
<p>Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  TT_PCLT_
  {
    <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>   Version;
    <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>   FontNumber;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  Pitch;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  xHeight;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  Style;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  TypeFamily;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  CapHeight;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  SymbolSet;
    <a href="ft2-basic_types.html#FT_Char">FT_Char</a>    TypeFace[16];
    <a href="ft2-basic_types.html#FT_Char">FT_Char</a>    CharacterComplement[8];
    <a href="ft2-basic_types.html#FT_Char">FT_Char</a>    FileName[6];
    <a href="ft2-basic_types.html#FT_Char">FT_Char</a>    StrokeWeight;
    <a href="ft2-basic_types.html#FT_Char">FT_Char</a>    WidthType;
    <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>    SerifStyle;
    <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>    Reserved;

  } <b>TT_PCLT</b>;
</pre>

<p>A structure to model a TrueType &lsquo;PCLT&rsquo; table. All fields comply to the OpenType specification.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="TT_MaxProfile">TT_MaxProfile</h3>
<p>Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  TT_MaxProfile_
  {
    <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>   version;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  numGlyphs;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  maxPoints;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  maxContours;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  maxCompositePoints;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  maxCompositeContours;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  maxZones;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  maxTwilightPoints;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  maxStorage;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  maxFunctionDefs;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  maxInstructionDefs;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  maxStackElements;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  maxSizeOfInstructions;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  maxComponentElements;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  maxComponentDepth;

  } <b>TT_MaxProfile</b>;
</pre>

<p>The maximum profile (&lsquo;maxp&rsquo;) table contains many max values, which can be used to pre-allocate arrays for speeding up glyph loading and hinting.</p>

<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="version">version</td><td class="desc">
<p>The version number.</p>
</td></tr>
<tr><td class="val" id="numGlyphs">numGlyphs</td><td class="desc">
<p>The number of glyphs in this TrueType font.</p>
</td></tr>
<tr><td class="val" id="maxPoints">maxPoints</td><td class="desc">
<p>The maximum number of points in a non-composite TrueType glyph. See also &lsquo;maxCompositePoints&rsquo;.</p>
</td></tr>
<tr><td class="val" id="maxContours">maxContours</td><td class="desc">
<p>The maximum number of contours in a non-composite TrueType glyph. See also &lsquo;maxCompositeContours&rsquo;.</p>
</td></tr>
<tr><td class="val" id="maxCompositePoints">maxCompositePoints</td><td class="desc">
<p>The maximum number of points in a composite TrueType glyph. See also &lsquo;maxPoints&rsquo;.</p>
</td></tr>
<tr><td class="val" id="maxCompositeContours">maxCompositeContours</td><td class="desc">
<p>The maximum number of contours in a composite TrueType glyph. See also &lsquo;maxContours&rsquo;.</p>
</td></tr>
<tr><td class="val" id="maxZones">maxZones</td><td class="desc">
<p>The maximum number of zones used for glyph hinting.</p>
</td></tr>
<tr><td class="val" id="maxTwilightPoints">maxTwilightPoints</td><td class="desc">
<p>The maximum number of points in the twilight zone used for glyph hinting.</p>
</td></tr>
<tr><td class="val" id="maxStorage">maxStorage</td><td class="desc">
<p>The maximum number of elements in the storage area used for glyph hinting.</p>
</td></tr>
<tr><td class="val" id="maxFunctionDefs">maxFunctionDefs</td><td class="desc">
<p>The maximum number of function definitions in the TrueType bytecode for this font.</p>
</td></tr>
<tr><td class="val" id="maxInstructionDefs">maxInstructionDefs</td><td class="desc">
<p>The maximum number of instruction definitions in the TrueType bytecode for this font.</p>
</td></tr>
<tr><td class="val" id="maxStackElements">maxStackElements</td><td class="desc">
<p>The maximum number of stack elements used during bytecode interpretation.</p>
</td></tr>
<tr><td class="val" id="maxSizeOfInstructions">maxSizeOfInstructions</td><td class="desc">
<p>The maximum number of TrueType opcodes used for glyph hinting.</p>
</td></tr>
<tr><td class="val" id="maxComponentElements">maxComponentElements</td><td class="desc">
<p>The maximum number of simple (i.e., non- composite) glyphs in a composite glyph.</p>
</td></tr>
<tr><td class="val" id="maxComponentDepth">maxComponentDepth</td><td class="desc">
<p>The maximum nesting depth of composite glyphs.</p>
</td></tr>
</table>

<h4>note</h4>
<p>This structure is only used during font loading.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Sfnt_Tag">FT_Sfnt_Tag</h3>
<p>Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">enum</span>  FT_Sfnt_Tag_
  {
    <a href="ft2-truetype_tables.html#FT_SFNT_HEAD">FT_SFNT_HEAD</a>,
    <a href="ft2-truetype_tables.html#FT_SFNT_MAXP">FT_SFNT_MAXP</a>,
    <a href="ft2-truetype_tables.html#FT_SFNT_OS2">FT_SFNT_OS2</a>,
    <a href="ft2-truetype_tables.html#FT_SFNT_HHEA">FT_SFNT_HHEA</a>,
    <a href="ft2-truetype_tables.html#FT_SFNT_VHEA">FT_SFNT_VHEA</a>,
    <a href="ft2-truetype_tables.html#FT_SFNT_POST">FT_SFNT_POST</a>,
    <a href="ft2-truetype_tables.html#FT_SFNT_PCLT">FT_SFNT_PCLT</a>,

    FT_SFNT_MAX

  } <b>FT_Sfnt_Tag</b>;

  /* these constants are deprecated; use the corresponding `<b>FT_Sfnt_Tag</b>' */
  /* values instead                                                      */
#define ft_sfnt_head  <a href="ft2-truetype_tables.html#FT_SFNT_HEAD">FT_SFNT_HEAD</a>
#define ft_sfnt_maxp  <a href="ft2-truetype_tables.html#FT_SFNT_MAXP">FT_SFNT_MAXP</a>
#define ft_sfnt_os2   <a href="ft2-truetype_tables.html#FT_SFNT_OS2">FT_SFNT_OS2</a>
#define ft_sfnt_hhea  <a href="ft2-truetype_tables.html#FT_SFNT_HHEA">FT_SFNT_HHEA</a>
#define ft_sfnt_vhea  <a href="ft2-truetype_tables.html#FT_SFNT_VHEA">FT_SFNT_VHEA</a>
#define ft_sfnt_post  <a href="ft2-truetype_tables.html#FT_SFNT_POST">FT_SFNT_POST</a>
#define ft_sfnt_pclt  <a href="ft2-truetype_tables.html#FT_SFNT_PCLT">FT_SFNT_PCLT</a>
</pre>

<p>An enumeration to specify indices of SFNT tables loaded and parsed by FreeType during initialization of an SFNT font. Used in the <a href="ft2-truetype_tables.html#FT_Get_Sfnt_Table">FT_Get_Sfnt_Table</a> API function.</p>

<h4>values</h4>
<table class="fields">
<tr><td class="val" id="FT_SFNT_HEAD">FT_SFNT_HEAD</td><td class="desc">
<p>To access the font's <a href="ft2-truetype_tables.html#TT_Header">TT_Header</a> structure.</p>
</td></tr>
<tr><td class="val" id="FT_SFNT_MAXP">FT_SFNT_MAXP</td><td class="desc">
<p>To access the font's <a href="ft2-truetype_tables.html#TT_MaxProfile">TT_MaxProfile</a> structure.</p>
</td></tr>
<tr><td class="val" id="FT_SFNT_OS2">FT_SFNT_OS2</td><td class="desc">
<p>To access the font's <a href="ft2-truetype_tables.html#TT_OS2">TT_OS2</a> structure.</p>
</td></tr>
<tr><td class="val" id="FT_SFNT_HHEA">FT_SFNT_HHEA</td><td class="desc">
<p>To access the font's <a href="ft2-truetype_tables.html#TT_HoriHeader">TT_HoriHeader</a> structure.</p>
</td></tr>
<tr><td class="val" id="FT_SFNT_VHEA">FT_SFNT_VHEA</td><td class="desc">
<p>To access the font's <a href="ft2-truetype_tables.html#TT_VertHeader">TT_VertHeader</a> structure.</p>
</td></tr>
<tr><td class="val" id="FT_SFNT_POST">FT_SFNT_POST</td><td class="desc">
<p>To access the font's <a href="ft2-truetype_tables.html#TT_Postscript">TT_Postscript</a> structure.</p>
</td></tr>
<tr><td class="val" id="FT_SFNT_PCLT">FT_SFNT_PCLT</td><td class="desc">
<p>To access the font's <a href="ft2-truetype_tables.html#TT_PCLT">TT_PCLT</a> structure.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Get_Sfnt_Table">FT_Get_Sfnt_Table</h3>
<p>Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h).</p>
<pre>
  FT_EXPORT( <span class="keyword">void</span>* )
  <b>FT_Get_Sfnt_Table</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>      face,
                     <a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_Sfnt_Tag</a>  tag );
</pre>

<p>Return a pointer to a given SFNT table stored within a face.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the source.</p>
</td></tr>
<tr><td class="val" id="tag">tag</td><td class="desc">
<p>The index of the SFNT table.</p>
</td></tr>
</table>

<h4>return</h4>
<p>A type-less pointer to the table. This will be NULL in case of error, or if the corresponding table was not found <b>OR</b> loaded from the file.</p>
<p>Use a typecast according to &lsquo;tag&rsquo; to access the structure elements.</p>

<h4>note</h4>
<p>The table is owned by the face object and disappears with it.</p>
<p>This function is only useful to access SFNT tables that are loaded by the sfnt, truetype, and opentype drivers. See <a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_Sfnt_Tag</a> for a list.</p>
<p>Here an example how to access the &lsquo;vhea&rsquo; table:</p>
<pre class="colored">
  TT_VertHeader*  vert_header;


  vert_header =
    (TT_VertHeader*)FT_Get_Sfnt_Table( face, FT_SFNT_VHEA );
</pre>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Load_Sfnt_Table">FT_Load_Sfnt_Table</h3>
<p>Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Load_Sfnt_Table</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>    face,
                      <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>   tag,
                      <a href="ft2-basic_types.html#FT_Long">FT_Long</a>    offset,
                      <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>*   buffer,
                      <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>*  length );
</pre>

<p>Load any SFNT font table into client memory.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the source face.</p>
</td></tr>
<tr><td class="val" id="tag">tag</td><td class="desc">
<p>The four-byte tag of the table to load. Use value&nbsp;0 if you want to access the whole font file. Otherwise, you can use one of the definitions found in the <a href="ft2-header_file_macros.html#FT_TRUETYPE_TAGS_H">FT_TRUETYPE_TAGS_H</a> file, or forge a new one with <a href="ft2-basic_types.html#FT_MAKE_TAG">FT_MAKE_TAG</a>.</p>
</td></tr>
<tr><td class="val" id="offset">offset</td><td class="desc">
<p>The starting offset in the table (or file if tag&nbsp;==&nbsp;0).</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="buffer">buffer</td><td class="desc">
<p>The target buffer address. The client must ensure that the memory array is big enough to hold the data.</p>
</td></tr>
</table>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="length">length</td><td class="desc">
<p>If the &lsquo;length&rsquo; parameter is NULL, try to load the whole table. Return an error code if it fails.</p>
<p>Else, if &lsquo;*length&rsquo; is&nbsp;0, exit immediately while returning the table's (or file) full size in it.</p>
<p>Else the number of bytes to read from the table or file, from the starting offset.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>If you need to determine the table's length you should first call this function with &lsquo;*length&rsquo; set to&nbsp;0, as in the following example:</p>
<pre class="colored">
  FT_ULong  length = 0;


  error = FT_Load_Sfnt_Table( face, tag, 0, NULL, &amp;length );
  if ( error ) { ... table does not exist ... }

  buffer = malloc( length );
  if ( buffer == NULL ) { ... not enough memory ... }

  error = FT_Load_Sfnt_Table( face, tag, 0, buffer, &amp;length );
  if ( error ) { ... could not load table ... }
</pre>
<p>Note that structures like <a href="ft2-truetype_tables.html#TT_Header">TT_Header</a> or <a href="ft2-truetype_tables.html#TT_OS2">TT_OS2</a> can't be used with this function; they are limited to <a href="ft2-truetype_tables.html#FT_Get_Sfnt_Table">FT_Get_Sfnt_Table</a>. Reason is that those structures depend on the processor architecture, with varying size (e.g. 32bit vs. 64bit) or order (big endian vs. little endian).</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Sfnt_Table_Info">FT_Sfnt_Table_Info</h3>
<p>Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Sfnt_Table_Info</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>    face,
                      <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>    table_index,
                      <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>  *tag,
                      <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>  *length );
</pre>

<p>Return information on an SFNT table.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the source face.</p>
</td></tr>
<tr><td class="val" id="table_index">table_index</td><td class="desc">
<p>The index of an SFNT table. The function returns FT_Err_Table_Missing for an invalid value.</p>
</td></tr>
</table>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="tag">tag</td><td class="desc">
<p>The name tag of the SFNT table. If the value is NULL, &lsquo;table_index&rsquo; is ignored, and &lsquo;length&rsquo; returns the number of SFNT tables in the font.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="length">length</td><td class="desc">
<p>The length of the SFNT table (or the number of SFNT tables, depending on &lsquo;tag&rsquo;).</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>While parsing fonts, FreeType handles SFNT tables with length zero as missing.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Get_CMap_Language_ID">FT_Get_CMap_Language_ID</h3>
<p>Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a> )
  <b>FT_Get_CMap_Language_ID</b>( <a href="ft2-base_interface.html#FT_CharMap">FT_CharMap</a>  charmap );
</pre>

<p>Return cmap language ID as specified in the OpenType standard. Definitions of language ID values are in file <a href="ft2-header_file_macros.html#FT_TRUETYPE_IDS_H">FT_TRUETYPE_IDS_H</a>.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="charmap">charmap</td><td class="desc">
<p>The target charmap.</p>
</td></tr>
</table>

<h4>return</h4>
<p>The language ID of &lsquo;charmap&rsquo;. If &lsquo;charmap&rsquo; doesn't belong to an SFNT face, just return&nbsp;0 as the default value.</p>
<p>For a format&nbsp;14 cmap (to access Unicode IVS), the return value is 0xFFFFFFFF.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Get_CMap_Format">FT_Get_CMap_Format</h3>
<p>Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Long">FT_Long</a> )
  <b>FT_Get_CMap_Format</b>( <a href="ft2-base_interface.html#FT_CharMap">FT_CharMap</a>  charmap );
</pre>

<p>Return the format of an SFNT &lsquo;cmap&rsquo; table.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="charmap">charmap</td><td class="desc">
<p>The target charmap.</p>
</td></tr>
</table>

<h4>return</h4>
<p>The format of &lsquo;charmap&rsquo;. If &lsquo;charmap&rsquo; doesn't belong to an SFNT face, return -1.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_PARAM_TAG_UNPATENTED_HINTING">FT_PARAM_TAG_UNPATENTED_HINTING</h3>
<pre>
#define <b>FT_PARAM_TAG_UNPATENTED_HINTING</b> \
          <a href="ft2-basic_types.html#FT_MAKE_TAG">FT_MAKE_TAG</a>( 'u', 'n', 'p', 'a' )
</pre>

<p>Deprecated, no effect.</p>
<p>Previously: A constant used as the tag of an <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> structure to indicate that unpatented methods only should be used by the TrueType bytecode interpreter for a typeface opened by <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a>.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="TT_PLATFORM_XXX">TT_PLATFORM_XXX</h3>
<p>Defined in FT_TRUETYPE_IDS_H (freetype/ttnameid.h).</p>
<pre>
#define <a href="ft2-truetype_tables.html#TT_PLATFORM_APPLE_UNICODE">TT_PLATFORM_APPLE_UNICODE</a>  0
#define <a href="ft2-truetype_tables.html#TT_PLATFORM_MACINTOSH">TT_PLATFORM_MACINTOSH</a>      1
#define <a href="ft2-truetype_tables.html#TT_PLATFORM_ISO">TT_PLATFORM_ISO</a>            2 /* deprecated */
#define <a href="ft2-truetype_tables.html#TT_PLATFORM_MICROSOFT">TT_PLATFORM_MICROSOFT</a>      3
#define <a href="ft2-truetype_tables.html#TT_PLATFORM_CUSTOM">TT_PLATFORM_CUSTOM</a>         4
#define <a href="ft2-truetype_tables.html#TT_PLATFORM_ADOBE">TT_PLATFORM_ADOBE</a>          7 /* artificial */
</pre>

<p>A list of valid values for the &lsquo;platform_id&rsquo; identifier code in <a href="ft2-base_interface.html#FT_CharMapRec">FT_CharMapRec</a> and <a href="ft2-sfnt_names.html#FT_SfntName">FT_SfntName</a> structures.</p>

<h4>values</h4>
<table class="fields">
<tr><td class="val" id="TT_PLATFORM_APPLE_UNICODE">TT_PLATFORM_APPLE_UNICODE</td><td class="desc">
<p>Used by Apple to indicate a Unicode character map and/or name entry. See <a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_XXX</a> for corresponding &lsquo;encoding_id&rsquo; values. Note that name entries in this format are coded as big-endian UCS-2 character codes <i>only</i>.</p>
</td></tr>
<tr><td class="val" id="TT_PLATFORM_MACINTOSH">TT_PLATFORM_MACINTOSH</td><td class="desc">
<p>Used by Apple to indicate a MacOS-specific charmap and/or name entry. See <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_XXX</a> for corresponding &lsquo;encoding_id&rsquo; values. Note that most TrueType fonts contain an Apple roman charmap to be usable on MacOS systems (even if they contain a Microsoft charmap as well).</p>
</td></tr>
<tr><td class="val" id="TT_PLATFORM_ISO">TT_PLATFORM_ISO</td><td class="desc">
<p>This value was used to specify ISO/IEC 10646 charmaps. It is however now deprecated. See <a href="ft2-truetype_tables.html#TT_ISO_ID_XXX">TT_ISO_ID_XXX</a> for a list of corresponding &lsquo;encoding_id&rsquo; values.</p>
</td></tr>
<tr><td class="val" id="TT_PLATFORM_MICROSOFT">TT_PLATFORM_MICROSOFT</td><td class="desc">
<p>Used by Microsoft to indicate Windows-specific charmaps. See <a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_XXX</a> for a list of corresponding &lsquo;encoding_id&rsquo; values. Note that most fonts contain a Unicode charmap using (TT_PLATFORM_MICROSOFT, <a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_UNICODE_CS</a>).</p>
</td></tr>
<tr><td class="val" id="TT_PLATFORM_CUSTOM">TT_PLATFORM_CUSTOM</td><td class="desc">
<p>Used to indicate application-specific charmaps.</p>
</td></tr>
<tr><td class="val" id="TT_PLATFORM_ADOBE">TT_PLATFORM_ADOBE</td><td class="desc">
<p>This value isn't part of any font format specification, but is used by FreeType to report Adobe-specific charmaps in an <a href="ft2-base_interface.html#FT_CharMapRec">FT_CharMapRec</a> structure. See <a href="ft2-truetype_tables.html#TT_ADOBE_ID_XXX">TT_ADOBE_ID_XXX</a>.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="TT_APPLE_ID_XXX">TT_APPLE_ID_XXX</h3>
<p>Defined in FT_TRUETYPE_IDS_H (freetype/ttnameid.h).</p>
<pre>
#define <a href="ft2-truetype_tables.html#TT_APPLE_ID_DEFAULT">TT_APPLE_ID_DEFAULT</a>           0 /* Unicode 1.0                   */
#define <a href="ft2-truetype_tables.html#TT_APPLE_ID_UNICODE_1_1">TT_APPLE_ID_UNICODE_1_1</a>       1 /* specify Hangul at U+34xx      */
#define <a href="ft2-truetype_tables.html#TT_APPLE_ID_ISO_10646">TT_APPLE_ID_ISO_10646</a>         2 /* deprecated                    */
#define <a href="ft2-truetype_tables.html#TT_APPLE_ID_UNICODE_2_0">TT_APPLE_ID_UNICODE_2_0</a>       3 /* or later                      */
#define <a href="ft2-truetype_tables.html#TT_APPLE_ID_UNICODE_32">TT_APPLE_ID_UNICODE_32</a>        4 /* 2.0 or later, full repertoire */
#define <a href="ft2-truetype_tables.html#TT_APPLE_ID_VARIANT_SELECTOR">TT_APPLE_ID_VARIANT_SELECTOR</a>  5 /* variation selector data       */
#define <a href="ft2-truetype_tables.html#TT_APPLE_ID_FULL_UNICODE">TT_APPLE_ID_FULL_UNICODE</a>      6 /* used with type 13 cmaps       */
</pre>

<p>A list of valid values for the &lsquo;encoding_id&rsquo; for <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_APPLE_UNICODE</a> charmaps and name entries.</p>

<h4>values</h4>
<table class="fields">
<tr><td class="val" id="TT_APPLE_ID_DEFAULT">TT_APPLE_ID_DEFAULT</td><td class="desc">
<p>Unicode version 1.0.</p>
</td></tr>
<tr><td class="val" id="TT_APPLE_ID_UNICODE_1_1">TT_APPLE_ID_UNICODE_1_1</td><td class="desc">
<p>Unicode 1.1; specifies Hangul characters starting at U+34xx.</p>
</td></tr>
<tr><td class="val" id="TT_APPLE_ID_ISO_10646">TT_APPLE_ID_ISO_10646</td><td class="desc">
<p>Deprecated (identical to preceding).</p>
</td></tr>
<tr><td class="val" id="TT_APPLE_ID_UNICODE_2_0">TT_APPLE_ID_UNICODE_2_0</td><td class="desc">
<p>Unicode 2.0 and beyond (UTF-16 BMP only).</p>
</td></tr>
<tr><td class="val" id="TT_APPLE_ID_UNICODE_32">TT_APPLE_ID_UNICODE_32</td><td class="desc">
<p>Unicode 3.1 and beyond, using UTF-32.</p>
</td></tr>
<tr><td class="val" id="TT_APPLE_ID_VARIANT_SELECTOR">TT_APPLE_ID_VARIANT_SELECTOR</td><td class="desc">
<p>From Adobe, not Apple. Not a normal cmap. Specifies variations on a real cmap.</p>
</td></tr>
<tr><td class="val" id="TT_APPLE_ID_FULL_UNICODE">TT_APPLE_ID_FULL_UNICODE</td><td class="desc">
<p>Used for fallback fonts that provide complete Unicode coverage with a type&nbsp;13 cmap.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="TT_MAC_ID_XXX">TT_MAC_ID_XXX</h3>
<p>Defined in FT_TRUETYPE_IDS_H (freetype/ttnameid.h).</p>
<pre>
#define TT_MAC_ID_ROMAN                 0
#define TT_MAC_ID_JAPANESE              1
#define TT_MAC_ID_TRADITIONAL_CHINESE   2
#define TT_MAC_ID_KOREAN                3
#define TT_MAC_ID_ARABIC                4
#define TT_MAC_ID_HEBREW                5
#define TT_MAC_ID_GREEK                 6
#define TT_MAC_ID_RUSSIAN               7
#define TT_MAC_ID_RSYMBOL               8
#define TT_MAC_ID_DEVANAGARI            9
#define TT_MAC_ID_GURMUKHI             10
#define TT_MAC_ID_GUJARATI             11
#define TT_MAC_ID_ORIYA                12
#define TT_MAC_ID_BENGALI              13
#define TT_MAC_ID_TAMIL                14
#define TT_MAC_ID_TELUGU               15
#define TT_MAC_ID_KANNADA              16
#define TT_MAC_ID_MALAYALAM            17
#define TT_MAC_ID_SINHALESE            18
#define TT_MAC_ID_BURMESE              19
#define TT_MAC_ID_KHMER                20
#define TT_MAC_ID_THAI                 21
#define TT_MAC_ID_LAOTIAN              22
#define TT_MAC_ID_GEORGIAN             23
#define TT_MAC_ID_ARMENIAN             24
#define TT_MAC_ID_MALDIVIAN            25
#define TT_MAC_ID_SIMPLIFIED_CHINESE   25
#define TT_MAC_ID_TIBETAN              26
#define TT_MAC_ID_MONGOLIAN            27
#define TT_MAC_ID_GEEZ                 28
#define TT_MAC_ID_SLAVIC               29
#define TT_MAC_ID_VIETNAMESE           30
#define TT_MAC_ID_SINDHI               31
#define TT_MAC_ID_UNINTERP             32
</pre>

<p>A list of valid values for the &lsquo;encoding_id&rsquo; for <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_MACINTOSH</a> charmaps and name entries.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="TT_ISO_ID_XXX">TT_ISO_ID_XXX</h3>
<p>Defined in FT_TRUETYPE_IDS_H (freetype/ttnameid.h).</p>
<pre>
#define <a href="ft2-truetype_tables.html#TT_ISO_ID_7BIT_ASCII">TT_ISO_ID_7BIT_ASCII</a>  0
#define <a href="ft2-truetype_tables.html#TT_ISO_ID_10646">TT_ISO_ID_10646</a>       1
#define <a href="ft2-truetype_tables.html#TT_ISO_ID_8859_1">TT_ISO_ID_8859_1</a>      2
</pre>

<p>A list of valid values for the &lsquo;encoding_id&rsquo; for <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_ISO</a> charmaps and name entries.</p>
<p>Their use is now deprecated.</p>

<h4>values</h4>
<table class="fields">
<tr><td class="val" id="TT_ISO_ID_7BIT_ASCII">TT_ISO_ID_7BIT_ASCII</td><td class="desc">
<p>ASCII.</p>
</td></tr>
<tr><td class="val" id="TT_ISO_ID_10646">TT_ISO_ID_10646</td><td class="desc">
<p>ISO/10646.</p>
</td></tr>
<tr><td class="val" id="TT_ISO_ID_8859_1">TT_ISO_ID_8859_1</td><td class="desc">
<p>Also known as Latin-1.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="TT_MS_ID_XXX">TT_MS_ID_XXX</h3>
<p>Defined in FT_TRUETYPE_IDS_H (freetype/ttnameid.h).</p>
<pre>
#define <a href="ft2-truetype_tables.html#TT_MS_ID_SYMBOL_CS">TT_MS_ID_SYMBOL_CS</a>    0
#define <a href="ft2-truetype_tables.html#TT_MS_ID_UNICODE_CS">TT_MS_ID_UNICODE_CS</a>   1
#define <a href="ft2-truetype_tables.html#TT_MS_ID_SJIS">TT_MS_ID_SJIS</a>         2
#define <a href="ft2-truetype_tables.html#TT_MS_ID_PRC">TT_MS_ID_PRC</a>          3
#define <a href="ft2-truetype_tables.html#TT_MS_ID_BIG_5">TT_MS_ID_BIG_5</a>        4
#define <a href="ft2-truetype_tables.html#TT_MS_ID_WANSUNG">TT_MS_ID_WANSUNG</a>      5
#define <a href="ft2-truetype_tables.html#TT_MS_ID_JOHAB">TT_MS_ID_JOHAB</a>        6
#define <a href="ft2-truetype_tables.html#TT_MS_ID_UCS_4">TT_MS_ID_UCS_4</a>       10

  /* this value is deprecated */
#define TT_MS_ID_GB2312  <a href="ft2-truetype_tables.html#TT_MS_ID_PRC">TT_MS_ID_PRC</a>
</pre>

<p>A list of valid values for the &lsquo;encoding_id&rsquo; for <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_MICROSOFT</a> charmaps and name entries.</p>

<h4>values</h4>
<table class="fields">
<tr><td class="val" id="TT_MS_ID_SYMBOL_CS">TT_MS_ID_SYMBOL_CS</td><td class="desc">
<p>Microsoft symbol encoding. See <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_SYMBOL</a>.</p>
</td></tr>
<tr><td class="val" id="TT_MS_ID_UNICODE_CS">TT_MS_ID_UNICODE_CS</td><td class="desc">
<p>Microsoft WGL4 charmap, matching Unicode. See <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_UNICODE</a>.</p>
</td></tr>
<tr><td class="val" id="TT_MS_ID_SJIS">TT_MS_ID_SJIS</td><td class="desc">
<p>Shift JIS Japanese encoding. See <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_SJIS</a>.</p>
</td></tr>
<tr><td class="val" id="TT_MS_ID_PRC">TT_MS_ID_PRC</td><td class="desc">
<p>Chinese encodings as used in the People's Republic of China (PRC). This means the encodings GB&nbsp;2312 and its supersets GBK and GB&nbsp;18030. See <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_PRC</a>.</p>
</td></tr>
<tr><td class="val" id="TT_MS_ID_BIG_5">TT_MS_ID_BIG_5</td><td class="desc">
<p>Traditional Chinese as used in Taiwan and Hong Kong. See <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_BIG5</a>.</p>
</td></tr>
<tr><td class="val" id="TT_MS_ID_WANSUNG">TT_MS_ID_WANSUNG</td><td class="desc">
<p>Korean Extended Wansung encoding. See <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_WANSUNG</a>.</p>
</td></tr>
<tr><td class="val" id="TT_MS_ID_JOHAB">TT_MS_ID_JOHAB</td><td class="desc">
<p>Korean Johab encoding. See <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_JOHAB</a>.</p>
</td></tr>
<tr><td class="val" id="TT_MS_ID_UCS_4">TT_MS_ID_UCS_4</td><td class="desc">
<p>UCS-4 or UTF-32 charmaps. This has been added to the OpenType specification version 1.4 (mid-2001).</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="TT_ADOBE_ID_XXX">TT_ADOBE_ID_XXX</h3>
<p>Defined in FT_TRUETYPE_IDS_H (freetype/ttnameid.h).</p>
<pre>
#define <a href="ft2-truetype_tables.html#TT_ADOBE_ID_STANDARD">TT_ADOBE_ID_STANDARD</a>  0
#define <a href="ft2-truetype_tables.html#TT_ADOBE_ID_EXPERT">TT_ADOBE_ID_EXPERT</a>    1
#define <a href="ft2-truetype_tables.html#TT_ADOBE_ID_CUSTOM">TT_ADOBE_ID_CUSTOM</a>    2
#define <a href="ft2-truetype_tables.html#TT_ADOBE_ID_LATIN_1">TT_ADOBE_ID_LATIN_1</a>   3
</pre>

<p>A list of valid values for the &lsquo;encoding_id&rsquo; for <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_ADOBE</a> charmaps. This is a FreeType-specific extension!</p>

<h4>values</h4>
<table class="fields">
<tr><td class="val" id="TT_ADOBE_ID_STANDARD">TT_ADOBE_ID_STANDARD</td><td class="desc">
<p>Adobe standard encoding.</p>
</td></tr>
<tr><td class="val" id="TT_ADOBE_ID_EXPERT">TT_ADOBE_ID_EXPERT</td><td class="desc">
<p>Adobe expert encoding.</p>
</td></tr>
<tr><td class="val" id="TT_ADOBE_ID_CUSTOM">TT_ADOBE_ID_CUSTOM</td><td class="desc">
<p>Adobe custom encoding.</p>
</td></tr>
<tr><td class="val" id="TT_ADOBE_ID_LATIN_1">TT_ADOBE_ID_LATIN_1</td><td class="desc">
<p>Adobe Latin&nbsp;1 encoding.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="TT_MAC_LANGID_XXX">TT_MAC_LANGID_XXX</h3>
<p>Defined in FT_TRUETYPE_IDS_H (freetype/ttnameid.h).</p>
<pre>
#define TT_MAC_LANGID_ENGLISH                       0
#define TT_MAC_LANGID_FRENCH                        1
#define TT_MAC_LANGID_GERMAN                        2
#define TT_MAC_LANGID_ITALIAN                       3
#define TT_MAC_LANGID_DUTCH                         4
#define TT_MAC_LANGID_SWEDISH                       5
#define TT_MAC_LANGID_SPANISH                       6
#define TT_MAC_LANGID_DANISH                        7
#define TT_MAC_LANGID_PORTUGUESE                    8
#define TT_MAC_LANGID_NORWEGIAN                     9
#define TT_MAC_LANGID_HEBREW                       10
#define TT_MAC_LANGID_JAPANESE                     11
#define TT_MAC_LANGID_ARABIC                       12
#define TT_MAC_LANGID_FINNISH                      13
#define TT_MAC_LANGID_GREEK                        14
#define TT_MAC_LANGID_ICELANDIC                    15
#define TT_MAC_LANGID_MALTESE                      16
#define TT_MAC_LANGID_TURKISH                      17
#define TT_MAC_LANGID_CROATIAN                     18
#define TT_MAC_LANGID_CHINESE_TRADITIONAL          19
#define TT_MAC_LANGID_URDU                         20
#define TT_MAC_LANGID_HINDI                        21
#define TT_MAC_LANGID_THAI                         22
#define TT_MAC_LANGID_KOREAN                       23
#define TT_MAC_LANGID_LITHUANIAN                   24
#define TT_MAC_LANGID_POLISH                       25
#define TT_MAC_LANGID_HUNGARIAN                    26
#define TT_MAC_LANGID_ESTONIAN                     27
#define TT_MAC_LANGID_LETTISH                      28
#define TT_MAC_LANGID_SAAMISK                      29
#define TT_MAC_LANGID_FAEROESE                     30
#define TT_MAC_LANGID_FARSI                        31
#define TT_MAC_LANGID_RUSSIAN                      32
#define TT_MAC_LANGID_CHINESE_SIMPLIFIED           33
#define TT_MAC_LANGID_FLEMISH                      34
#define TT_MAC_LANGID_IRISH                        35
#define TT_MAC_LANGID_ALBANIAN                     36
#define TT_MAC_LANGID_ROMANIAN                     37
#define TT_MAC_LANGID_CZECH                        38
#define TT_MAC_LANGID_SLOVAK                       39
#define TT_MAC_LANGID_SLOVENIAN                    40
#define TT_MAC_LANGID_YIDDISH                      41
#define TT_MAC_LANGID_SERBIAN                      42
#define TT_MAC_LANGID_MACEDONIAN                   43
#define TT_MAC_LANGID_BULGARIAN                    44
#define TT_MAC_LANGID_UKRAINIAN                    45
#define TT_MAC_LANGID_BYELORUSSIAN                 46
#define TT_MAC_LANGID_UZBEK                        47
#define TT_MAC_LANGID_KAZAKH                       48
#define TT_MAC_LANGID_AZERBAIJANI                  49
#define TT_MAC_LANGID_AZERBAIJANI_CYRILLIC_SCRIPT  49
#define TT_MAC_LANGID_AZERBAIJANI_ARABIC_SCRIPT    50
#define TT_MAC_LANGID_ARMENIAN                     51
#define TT_MAC_LANGID_GEORGIAN                     52
#define TT_MAC_LANGID_MOLDAVIAN                    53
#define TT_MAC_LANGID_KIRGHIZ                      54
#define TT_MAC_LANGID_TAJIKI                       55
#define TT_MAC_LANGID_TURKMEN                      56
#define TT_MAC_LANGID_MONGOLIAN                    57
#define TT_MAC_LANGID_MONGOLIAN_MONGOLIAN_SCRIPT   57
#define TT_MAC_LANGID_MONGOLIAN_CYRILLIC_SCRIPT    58
#define TT_MAC_LANGID_PASHTO                       59
#define TT_MAC_LANGID_KURDISH                      60
#define TT_MAC_LANGID_KASHMIRI                     61
#define TT_MAC_LANGID_SINDHI                       62
#define TT_MAC_LANGID_TIBETAN                      63
#define TT_MAC_LANGID_NEPALI                       64
#define TT_MAC_LANGID_SANSKRIT                     65
#define TT_MAC_LANGID_MARATHI                      66
#define TT_MAC_LANGID_BENGALI                      67
#define TT_MAC_LANGID_ASSAMESE                     68
#define TT_MAC_LANGID_GUJARATI                     69
#define TT_MAC_LANGID_PUNJABI                      70
#define TT_MAC_LANGID_ORIYA                        71
#define TT_MAC_LANGID_MALAYALAM                    72
#define TT_MAC_LANGID_KANNADA                      73
#define TT_MAC_LANGID_TAMIL                        74
#define TT_MAC_LANGID_TELUGU                       75
#define TT_MAC_LANGID_SINHALESE                    76
#define TT_MAC_LANGID_BURMESE                      77
#define TT_MAC_LANGID_KHMER                        78
#define TT_MAC_LANGID_LAO                          79
#define TT_MAC_LANGID_VIETNAMESE                   80
#define TT_MAC_LANGID_INDONESIAN                   81
#define TT_MAC_LANGID_TAGALOG                      82
#define TT_MAC_LANGID_MALAY_ROMAN_SCRIPT           83
#define TT_MAC_LANGID_MALAY_ARABIC_SCRIPT          84
#define TT_MAC_LANGID_AMHARIC                      85
#define TT_MAC_LANGID_TIGRINYA                     86
#define TT_MAC_LANGID_GALLA                        87
#define TT_MAC_LANGID_SOMALI                       88
#define TT_MAC_LANGID_SWAHILI                      89
#define TT_MAC_LANGID_RUANDA                       90
#define TT_MAC_LANGID_RUNDI                        91
#define TT_MAC_LANGID_CHEWA                        92
#define TT_MAC_LANGID_MALAGASY                     93
#define TT_MAC_LANGID_ESPERANTO                    94
#define TT_MAC_LANGID_WELSH                       128
#define TT_MAC_LANGID_BASQUE                      129
#define TT_MAC_LANGID_CATALAN                     130
#define TT_MAC_LANGID_LATIN                       131
#define TT_MAC_LANGID_QUECHUA                     132
#define TT_MAC_LANGID_GUARANI                     133
#define TT_MAC_LANGID_AYMARA                      134
#define TT_MAC_LANGID_TATAR                       135
#define TT_MAC_LANGID_UIGHUR                      136
#define TT_MAC_LANGID_DZONGKHA                    137
#define TT_MAC_LANGID_JAVANESE                    138
#define TT_MAC_LANGID_SUNDANESE                   139

  /* The following codes are new as of 2000-03-10 */
#define TT_MAC_LANGID_GALICIAN                    140
#define TT_MAC_LANGID_AFRIKAANS                   141
#define TT_MAC_LANGID_BRETON                      142
#define TT_MAC_LANGID_INUKTITUT                   143
#define TT_MAC_LANGID_SCOTTISH_GAELIC             144
#define TT_MAC_LANGID_MANX_GAELIC                 145
#define TT_MAC_LANGID_IRISH_GAELIC                146
#define TT_MAC_LANGID_TONGAN                      147
#define TT_MAC_LANGID_GREEK_POLYTONIC             148
#define TT_MAC_LANGID_GREELANDIC                  149
#define TT_MAC_LANGID_AZERBAIJANI_ROMAN_SCRIPT    150
</pre>

<p>Possible values of the language identifier field in the name records of the SFNT &lsquo;name&rsquo; table if the &lsquo;platform&rsquo; identifier code is <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_MACINTOSH</a>. These values are also used as return values for function <a href="ft2-truetype_tables.html#FT_Get_CMap_Language_ID">FT_Get_CMap_Language_ID</a>.</p>
<p>The canonical source for Apple's IDs is</p>
<p><a href="https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6name.html">https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6name.html</a></p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="TT_MS_LANGID_XXX">TT_MS_LANGID_XXX</h3>
<p>Defined in FT_TRUETYPE_IDS_H (freetype/ttnameid.h).</p>
<pre>
#define TT_MS_LANGID_ARABIC_SAUDI_ARABIA               0x0401
#define TT_MS_LANGID_ARABIC_IRAQ                       0x0801
#define TT_MS_LANGID_ARABIC_EGYPT                      0x0C01
#define TT_MS_LANGID_ARABIC_LIBYA                      0x1001
#define TT_MS_LANGID_ARABIC_ALGERIA                    0x1401
#define TT_MS_LANGID_ARABIC_MOROCCO                    0x1801
#define TT_MS_LANGID_ARABIC_TUNISIA                    0x1C01
#define TT_MS_LANGID_ARABIC_OMAN                       0x2001
#define TT_MS_LANGID_ARABIC_YEMEN                      0x2401
#define TT_MS_LANGID_ARABIC_SYRIA                      0x2801
#define TT_MS_LANGID_ARABIC_JORDAN                     0x2C01
#define TT_MS_LANGID_ARABIC_LEBANON                    0x3001
#define TT_MS_LANGID_ARABIC_KUWAIT                     0x3401
#define TT_MS_LANGID_ARABIC_UAE                        0x3801
#define TT_MS_LANGID_ARABIC_BAHRAIN                    0x3C01
#define TT_MS_LANGID_ARABIC_QATAR                      0x4001
#define TT_MS_LANGID_BULGARIAN_BULGARIA                0x0402
#define TT_MS_LANGID_CATALAN_CATALAN                   0x0403
#define TT_MS_LANGID_CHINESE_TAIWAN                    0x0404
#define TT_MS_LANGID_CHINESE_PRC                       0x0804
#define TT_MS_LANGID_CHINESE_HONG_KONG                 0x0C04
#define TT_MS_LANGID_CHINESE_SINGAPORE                 0x1004
#define TT_MS_LANGID_CHINESE_MACAO                     0x1404
#define TT_MS_LANGID_CZECH_CZECH_REPUBLIC              0x0405
#define TT_MS_LANGID_DANISH_DENMARK                    0x0406
#define TT_MS_LANGID_GERMAN_GERMANY                    0x0407
#define TT_MS_LANGID_GERMAN_SWITZERLAND                0x0807
#define TT_MS_LANGID_GERMAN_AUSTRIA                    0x0C07
#define TT_MS_LANGID_GERMAN_LUXEMBOURG                 0x1007
#define TT_MS_LANGID_GERMAN_LIECHTENSTEIN              0x1407
#define TT_MS_LANGID_GREEK_GREECE                      0x0408
#define TT_MS_LANGID_ENGLISH_UNITED_STATES             0x0409
#define TT_MS_LANGID_ENGLISH_UNITED_KINGDOM            0x0809
#define TT_MS_LANGID_ENGLISH_AUSTRALIA                 0x0C09
#define TT_MS_LANGID_ENGLISH_CANADA                    0x1009
#define TT_MS_LANGID_ENGLISH_NEW_ZEALAND               0x1409
#define TT_MS_LANGID_ENGLISH_IRELAND                   0x1809
#define TT_MS_LANGID_ENGLISH_SOUTH_AFRICA              0x1C09
#define TT_MS_LANGID_ENGLISH_JAMAICA                   0x2009
#define TT_MS_LANGID_ENGLISH_CARIBBEAN                 0x2409
#define TT_MS_LANGID_ENGLISH_BELIZE                    0x2809
#define TT_MS_LANGID_ENGLISH_TRINIDAD                  0x2C09
#define TT_MS_LANGID_ENGLISH_ZIMBABWE                  0x3009
#define TT_MS_LANGID_ENGLISH_PHILIPPINES               0x3409
#define TT_MS_LANGID_ENGLISH_INDIA                     0x4009
#define TT_MS_LANGID_ENGLISH_MALAYSIA                  0x4409
#define TT_MS_LANGID_ENGLISH_SINGAPORE                 0x4809
#define TT_MS_LANGID_SPANISH_SPAIN_TRADITIONAL_SORT    0x040A
#define TT_MS_LANGID_SPANISH_MEXICO                    0x080A
#define TT_MS_LANGID_SPANISH_SPAIN_MODERN_SORT         0x0C0A
#define TT_MS_LANGID_SPANISH_GUATEMALA                 0x100A
#define TT_MS_LANGID_SPANISH_COSTA_RICA                0x140A
#define TT_MS_LANGID_SPANISH_PANAMA                    0x180A
#define TT_MS_LANGID_SPANISH_DOMINICAN_REPUBLIC        0x1C0A
#define TT_MS_LANGID_SPANISH_VENEZUELA                 0x200A
#define TT_MS_LANGID_SPANISH_COLOMBIA                  0x240A
#define TT_MS_LANGID_SPANISH_PERU                      0x280A
#define TT_MS_LANGID_SPANISH_ARGENTINA                 0x2C0A
#define TT_MS_LANGID_SPANISH_ECUADOR                   0x300A
#define TT_MS_LANGID_SPANISH_CHILE                     0x340A
#define TT_MS_LANGID_SPANISH_URUGUAY                   0x380A
#define TT_MS_LANGID_SPANISH_PARAGUAY                  0x3C0A
#define TT_MS_LANGID_SPANISH_BOLIVIA                   0x400A
#define TT_MS_LANGID_SPANISH_EL_SALVADOR               0x440A
#define TT_MS_LANGID_SPANISH_HONDURAS                  0x480A
#define TT_MS_LANGID_SPANISH_NICARAGUA                 0x4C0A
#define TT_MS_LANGID_SPANISH_PUERTO_RICO               0x500A
#define TT_MS_LANGID_SPANISH_UNITED_STATES             0x540A
#define TT_MS_LANGID_FINNISH_FINLAND                   0x040B
#define TT_MS_LANGID_FRENCH_FRANCE                     0x040C
#define TT_MS_LANGID_FRENCH_BELGIUM                    0x080C
#define TT_MS_LANGID_FRENCH_CANADA                     0x0C0C
#define TT_MS_LANGID_FRENCH_SWITZERLAND                0x100C
#define TT_MS_LANGID_FRENCH_LUXEMBOURG                 0x140C
#define TT_MS_LANGID_FRENCH_MONACO                     0x180C
#define TT_MS_LANGID_HEBREW_ISRAEL                     0x040D
#define TT_MS_LANGID_HUNGARIAN_HUNGARY                 0x040E
#define TT_MS_LANGID_ICELANDIC_ICELAND                 0x040F
#define TT_MS_LANGID_ITALIAN_ITALY                     0x0410
#define TT_MS_LANGID_ITALIAN_SWITZERLAND               0x0810
#define TT_MS_LANGID_JAPANESE_JAPAN                    0x0411
#define TT_MS_LANGID_KOREAN_KOREA                      0x0412
#define TT_MS_LANGID_DUTCH_NETHERLANDS                 0x0413
#define TT_MS_LANGID_DUTCH_BELGIUM                     0x0813
#define TT_MS_LANGID_NORWEGIAN_NORWAY_BOKMAL           0x0414
#define TT_MS_LANGID_NORWEGIAN_NORWAY_NYNORSK          0x0814
#define TT_MS_LANGID_POLISH_POLAND                     0x0415
#define TT_MS_LANGID_PORTUGUESE_BRAZIL                 0x0416
#define TT_MS_LANGID_PORTUGUESE_PORTUGAL               0x0816
#define TT_MS_LANGID_ROMANSH_SWITZERLAND               0x0417
#define TT_MS_LANGID_ROMANIAN_ROMANIA                  0x0418
#define TT_MS_LANGID_RUSSIAN_RUSSIA                    0x0419
#define TT_MS_LANGID_CROATIAN_CROATIA                  0x041A
#define TT_MS_LANGID_SERBIAN_SERBIA_LATIN              0x081A
#define TT_MS_LANGID_SERBIAN_SERBIA_CYRILLIC           0x0C1A
#define TT_MS_LANGID_CROATIAN_BOSNIA_HERZEGOVINA       0x101A
#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA        0x141A
#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_LATIN         0x181A
#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_CYRILLIC      0x1C1A
#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZ_CYRILLIC      0x201A
#define TT_MS_LANGID_SLOVAK_SLOVAKIA                   0x041B
#define TT_MS_LANGID_ALBANIAN_ALBANIA                  0x041C
#define TT_MS_LANGID_SWEDISH_SWEDEN                    0x041D
#define TT_MS_LANGID_SWEDISH_FINLAND                   0x081D
#define TT_MS_LANGID_THAI_THAILAND                     0x041E
#define TT_MS_LANGID_TURKISH_TURKEY                    0x041F
#define TT_MS_LANGID_URDU_PAKISTAN                     0x0420
#define TT_MS_LANGID_INDONESIAN_INDONESIA              0x0421
#define TT_MS_LANGID_UKRAINIAN_UKRAINE                 0x0422
#define TT_MS_LANGID_BELARUSIAN_BELARUS                0x0423
#define TT_MS_LANGID_SLOVENIAN_SLOVENIA                0x0424
#define TT_MS_LANGID_ESTONIAN_ESTONIA                  0x0425
#define TT_MS_LANGID_LATVIAN_LATVIA                    0x0426
#define TT_MS_LANGID_LITHUANIAN_LITHUANIA              0x0427
#define TT_MS_LANGID_TAJIK_TAJIKISTAN                  0x0428
#define TT_MS_LANGID_VIETNAMESE_VIET_NAM               0x042A
#define TT_MS_LANGID_ARMENIAN_ARMENIA                  0x042B
#define TT_MS_LANGID_AZERI_AZERBAIJAN_LATIN            0x042C
#define TT_MS_LANGID_AZERI_AZERBAIJAN_CYRILLIC         0x082C
#define TT_MS_LANGID_BASQUE_BASQUE                     0x042D
#define TT_MS_LANGID_UPPER_SORBIAN_GERMANY             0x042E
#define TT_MS_LANGID_LOWER_SORBIAN_GERMANY             0x082E
#define TT_MS_LANGID_MACEDONIAN_MACEDONIA              0x042F
#define TT_MS_LANGID_SETSWANA_SOUTH_AFRICA             0x0432
#define TT_MS_LANGID_ISIXHOSA_SOUTH_AFRICA             0x0434
#define TT_MS_LANGID_ISIZULU_SOUTH_AFRICA              0x0435
#define TT_MS_LANGID_AFRIKAANS_SOUTH_AFRICA            0x0436
#define TT_MS_LANGID_GEORGIAN_GEORGIA                  0x0437
#define TT_MS_LANGID_FAEROESE_FAEROE_ISLANDS           0x0438
#define TT_MS_LANGID_HINDI_INDIA                       0x0439
#define TT_MS_LANGID_MALTESE_MALTA                     0x043A
#define TT_MS_LANGID_SAMI_NORTHERN_NORWAY              0x043B
#define TT_MS_LANGID_SAMI_NORTHERN_SWEDEN              0x083B
#define TT_MS_LANGID_SAMI_NORTHERN_FINLAND             0x0C3B
#define TT_MS_LANGID_SAMI_LULE_NORWAY                  0x103B
#define TT_MS_LANGID_SAMI_LULE_SWEDEN                  0x143B
#define TT_MS_LANGID_SAMI_SOUTHERN_NORWAY              0x183B
#define TT_MS_LANGID_SAMI_SOUTHERN_SWEDEN              0x1C3B
#define TT_MS_LANGID_SAMI_SKOLT_FINLAND                0x203B
#define TT_MS_LANGID_SAMI_INARI_FINLAND                0x243B
#define TT_MS_LANGID_IRISH_IRELAND                     0x083C
#define TT_MS_LANGID_MALAY_MALAYSIA                    0x043E
#define TT_MS_LANGID_MALAY_BRUNEI_DARUSSALAM           0x083E
#define TT_MS_LANGID_KAZAKH_KAZAKHSTAN                 0x043F
#define TT_MS_LANGID_KYRGYZ_KYRGYZSTAN /* Cyrillic*/   0x0440
#define TT_MS_LANGID_KISWAHILI_KENYA                   0x0441
#define TT_MS_LANGID_TURKMEN_TURKMENISTAN              0x0442
#define TT_MS_LANGID_UZBEK_UZBEKISTAN_LATIN            0x0443
#define TT_MS_LANGID_UZBEK_UZBEKISTAN_CYRILLIC         0x0843
#define TT_MS_LANGID_TATAR_RUSSIA                      0x0444
#define TT_MS_LANGID_BENGALI_INDIA                     0x0445
#define TT_MS_LANGID_BENGALI_BANGLADESH                0x0845
#define TT_MS_LANGID_PUNJABI_INDIA                     0x0446
#define TT_MS_LANGID_GUJARATI_INDIA                    0x0447
#define TT_MS_LANGID_ODIA_INDIA                        0x0448
#define TT_MS_LANGID_TAMIL_INDIA                       0x0449
#define TT_MS_LANGID_TELUGU_INDIA                      0x044A
#define TT_MS_LANGID_KANNADA_INDIA                     0x044B
#define TT_MS_LANGID_MALAYALAM_INDIA                   0x044C
#define TT_MS_LANGID_ASSAMESE_INDIA                    0x044D
#define TT_MS_LANGID_MARATHI_INDIA                     0x044E
#define TT_MS_LANGID_SANSKRIT_INDIA                    0x044F
#define TT_MS_LANGID_MONGOLIAN_MONGOLIA /* Cyrillic */ 0x0450
#define TT_MS_LANGID_MONGOLIAN_PRC                     0x0850
#define TT_MS_LANGID_TIBETAN_PRC                       0x0451
#define TT_MS_LANGID_WELSH_UNITED_KINGDOM              0x0452
#define TT_MS_LANGID_KHMER_CAMBODIA                    0x0453
#define TT_MS_LANGID_LAO_LAOS                          0x0454
#define TT_MS_LANGID_GALICIAN_GALICIAN                 0x0456
#define TT_MS_LANGID_KONKANI_INDIA                     0x0457
#define TT_MS_LANGID_SYRIAC_SYRIA                      0x045A
#define TT_MS_LANGID_SINHALA_SRI_LANKA                 0x045B
#define TT_MS_LANGID_INUKTITUT_CANADA                  0x045D
#define TT_MS_LANGID_INUKTITUT_CANADA_LATIN            0x085D
#define TT_MS_LANGID_AMHARIC_ETHIOPIA                  0x045E
#define TT_MS_LANGID_TAMAZIGHT_ALGERIA                 0x085F
#define TT_MS_LANGID_NEPALI_NEPAL                      0x0461
#define TT_MS_LANGID_FRISIAN_NETHERLANDS               0x0462
#define TT_MS_LANGID_PASHTO_AFGHANISTAN                0x0463
#define TT_MS_LANGID_FILIPINO_PHILIPPINES              0x0464
#define TT_MS_LANGID_DHIVEHI_MALDIVES                  0x0465
#define TT_MS_LANGID_HAUSA_NIGERIA                     0x0468
#define TT_MS_LANGID_YORUBA_NIGERIA                    0x046A
#define TT_MS_LANGID_QUECHUA_BOLIVIA                   0x046B
#define TT_MS_LANGID_QUECHUA_ECUADOR                   0x086B
#define TT_MS_LANGID_QUECHUA_PERU                      0x0C6B
#define TT_MS_LANGID_SESOTHO_SA_LEBOA_SOUTH_AFRICA     0x046C
#define TT_MS_LANGID_BASHKIR_RUSSIA                    0x046D
#define TT_MS_LANGID_LUXEMBOURGISH_LUXEMBOURG          0x046E
#define TT_MS_LANGID_GREENLANDIC_GREENLAND             0x046F
#define TT_MS_LANGID_IGBO_NIGERIA                      0x0470
#define TT_MS_LANGID_YI_PRC                            0x0478
#define TT_MS_LANGID_MAPUDUNGUN_CHILE                  0x047A
#define TT_MS_LANGID_MOHAWK_MOHAWK                     0x047C
#define TT_MS_LANGID_BRETON_FRANCE                     0x047E
#define TT_MS_LANGID_UIGHUR_PRC                        0x0480
#define TT_MS_LANGID_MAORI_NEW_ZEALAND                 0x0481
#define TT_MS_LANGID_OCCITAN_FRANCE                    0x0482
#define TT_MS_LANGID_CORSICAN_FRANCE                   0x0483
#define TT_MS_LANGID_ALSATIAN_FRANCE                   0x0484
#define TT_MS_LANGID_YAKUT_RUSSIA                      0x0485
#define TT_MS_LANGID_KICHE_GUATEMALA                   0x0486
#define TT_MS_LANGID_KINYARWANDA_RWANDA                0x0487
#define TT_MS_LANGID_WOLOF_SENEGAL                     0x0488
#define TT_MS_LANGID_DARI_AFGHANISTAN                  0x048C
</pre>

<p>Possible values of the language identifier field in the name records of the SFNT &lsquo;name&rsquo; table if the &lsquo;platform&rsquo; identifier code is <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_MICROSOFT</a>. These values are also used as return values for function <a href="ft2-truetype_tables.html#FT_Get_CMap_Language_ID">FT_Get_CMap_Language_ID</a>.</p>
<p>The canonical source for Microsoft's IDs is</p>
<p><a href="https://www.microsoft.com/globaldev/reference/lcid-all.mspx">https://www.microsoft.com/globaldev/reference/lcid-all.mspx</a> ,</p>
<p>however, we only provide macros for language identifiers present in the OpenType specification: Microsoft has abandoned the concept of LCIDs (language code identifiers), and format&nbsp;1 of the &lsquo;name&rsquo; table provides a better mechanism for languages not covered here.</p>
<p>More legacy values not listed in the reference can be found in the <a href="ft2-header_file_macros.html#FT_TRUETYPE_IDS_H">FT_TRUETYPE_IDS_H</a> header file.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="TT_NAME_ID_XXX">TT_NAME_ID_XXX</h3>
<p>Defined in FT_TRUETYPE_IDS_H (freetype/ttnameid.h).</p>
<pre>
#define TT_NAME_ID_COPYRIGHT              0
#define TT_NAME_ID_FONT_FAMILY            1
#define TT_NAME_ID_FONT_SUBFAMILY         2
#define TT_NAME_ID_UNIQUE_ID              3
#define TT_NAME_ID_FULL_NAME              4
#define TT_NAME_ID_VERSION_STRING         5
#define TT_NAME_ID_PS_NAME                6
#define TT_NAME_ID_TRADEMARK              7

  /* the following values are from the OpenType spec */
#define TT_NAME_ID_MANUFACTURER           8
#define TT_NAME_ID_DESIGNER               9
#define TT_NAME_ID_DESCRIPTION            10
#define TT_NAME_ID_VENDOR_URL             11
#define TT_NAME_ID_DESIGNER_URL           12
#define TT_NAME_ID_LICENSE                13
#define TT_NAME_ID_LICENSE_URL            14
  /* number 15 is reserved */
#define TT_NAME_ID_TYPOGRAPHIC_FAMILY     16
#define TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY  17
#define TT_NAME_ID_MAC_FULL_NAME          18

  /* The following code is new as of 2000-01-21 */
#define TT_NAME_ID_SAMPLE_TEXT            19

  /* This is new in OpenType 1.3 */
#define TT_NAME_ID_CID_FINDFONT_NAME      20

  /* This is new in OpenType 1.5 */
#define TT_NAME_ID_WWS_FAMILY             21
#define TT_NAME_ID_WWS_SUBFAMILY          22

  /* This is new in OpenType 1.7 */
#define TT_NAME_ID_LIGHT_BACKGROUND       23
#define TT_NAME_ID_DARK_BACKGROUND        24

  /* This is new in OpenType 1.8 */
#define TT_NAME_ID_VARIATIONS_PREFIX      25

  /* these two values are deprecated */
#define TT_NAME_ID_PREFERRED_FAMILY     TT_NAME_ID_TYPOGRAPHIC_FAMILY
#define TT_NAME_ID_PREFERRED_SUBFAMILY  TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY
</pre>

<p>Possible values of the &lsquo;name&rsquo; identifier field in the name records of an SFNT &lsquo;name&rsquo; table. These values are platform independent.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="TT_UCR_XXX">TT_UCR_XXX</h3>
<p>Defined in FT_TRUETYPE_IDS_H (freetype/ttnameid.h).</p>
<pre>
  /* ulUnicodeRange1 */
  /* --------------- */

  /* Bit  0   Basic Latin */
#define TT_UCR_BASIC_LATIN                     (1L &lt;&lt;  0) /* U+0020-U+007E */
  /* Bit  1   C1 Controls and Latin-1 Supplement */
#define TT_UCR_LATIN1_SUPPLEMENT               (1L &lt;&lt;  1) /* U+0080-U+00FF */
  /* Bit  2   Latin Extended-A */
#define TT_UCR_LATIN_EXTENDED_A                (1L &lt;&lt;  2) /* U+0100-U+017F */
  /* Bit  3   Latin Extended-B */
#define TT_UCR_LATIN_EXTENDED_B                (1L &lt;&lt;  3) /* U+0180-U+024F */
  /* Bit  4   IPA Extensions                 */
  /*          Phonetic Extensions            */
  /*          Phonetic Extensions Supplement */
#define TT_UCR_IPA_EXTENSIONS                  (1L &lt;&lt;  4) /* U+0250-U+02AF */
                                                          /* U+1D00-U+1D7F */
                                                          /* U+1D80-U+1DBF */
  /* Bit  5   Spacing Modifier Letters */
  /*          Modifier Tone Letters    */
#define TT_UCR_SPACING_MODIFIER                (1L &lt;&lt;  5) /* U+02B0-U+02FF */
                                                          /* U+A700-U+A71F */
  /* Bit  6   Combining Diacritical Marks            */
  /*          Combining Diacritical Marks Supplement */
#define TT_UCR_COMBINING_DIACRITICAL_MARKS     (1L &lt;&lt;  6) /* U+0300-U+036F */
                                                          /* U+1DC0-U+1DFF */
  /* Bit  7   Greek and Coptic */
#define TT_UCR_GREEK                           (1L &lt;&lt;  7) /* U+0370-U+03FF */
  /* Bit  8   Coptic */
#define TT_UCR_COPTIC                          (1L &lt;&lt;  8) /* U+2C80-U+2CFF */
  /* Bit  9   Cyrillic            */
  /*          Cyrillic Supplement */
  /*          Cyrillic Extended-A */
  /*          Cyrillic Extended-B */
#define TT_UCR_CYRILLIC                        (1L &lt;&lt;  9) /* U+0400-U+04FF */
                                                          /* U+0500-U+052F */
                                                          /* U+2DE0-U+2DFF */
                                                          /* U+A640-U+A69F */
  /* Bit 10   Armenian */
#define TT_UCR_ARMENIAN                        (1L &lt;&lt; 10) /* U+0530-U+058F */
  /* Bit 11   Hebrew */
#define TT_UCR_HEBREW                          (1L &lt;&lt; 11) /* U+0590-U+05FF */
  /* Bit 12   Vai */
#define TT_UCR_VAI                             (1L &lt;&lt; 12) /* U+A500-U+A63F */
  /* Bit 13   Arabic            */
  /*          Arabic Supplement */
#define TT_UCR_ARABIC                          (1L &lt;&lt; 13) /* U+0600-U+06FF */
                                                          /* U+0750-U+077F */
  /* Bit 14   NKo */
#define TT_UCR_NKO                             (1L &lt;&lt; 14) /* U+07C0-U+07FF */
  /* Bit 15   Devanagari */
#define TT_UCR_DEVANAGARI                      (1L &lt;&lt; 15) /* U+0900-U+097F */
  /* Bit 16   Bengali */
#define TT_UCR_BENGALI                         (1L &lt;&lt; 16) /* U+0980-U+09FF */
  /* Bit 17   Gurmukhi */
#define TT_UCR_GURMUKHI                        (1L &lt;&lt; 17) /* U+0A00-U+0A7F */
  /* Bit 18   Gujarati */
#define TT_UCR_GUJARATI                        (1L &lt;&lt; 18) /* U+0A80-U+0AFF */
  /* Bit 19   Oriya */
#define TT_UCR_ORIYA                           (1L &lt;&lt; 19) /* U+0B00-U+0B7F */
  /* Bit 20   Tamil */
#define TT_UCR_TAMIL                           (1L &lt;&lt; 20) /* U+0B80-U+0BFF */
  /* Bit 21   Telugu */
#define TT_UCR_TELUGU                          (1L &lt;&lt; 21) /* U+0C00-U+0C7F */
  /* Bit 22   Kannada */
#define TT_UCR_KANNADA                         (1L &lt;&lt; 22) /* U+0C80-U+0CFF */
  /* Bit 23   Malayalam */
#define TT_UCR_MALAYALAM                       (1L &lt;&lt; 23) /* U+0D00-U+0D7F */
  /* Bit 24   Thai */
#define TT_UCR_THAI                            (1L &lt;&lt; 24) /* U+0E00-U+0E7F */
  /* Bit 25   Lao */
#define TT_UCR_LAO                             (1L &lt;&lt; 25) /* U+0E80-U+0EFF */
  /* Bit 26   Georgian            */
  /*          Georgian Supplement */
#define TT_UCR_GEORGIAN                        (1L &lt;&lt; 26) /* U+10A0-U+10FF */
                                                          /* U+2D00-U+2D2F */
  /* Bit 27   Balinese */
#define TT_UCR_BALINESE                        (1L &lt;&lt; 27) /* U+1B00-U+1B7F */
  /* Bit 28   Hangul Jamo */
#define TT_UCR_HANGUL_JAMO                     (1L &lt;&lt; 28) /* U+1100-U+11FF */
  /* Bit 29   Latin Extended Additional */
  /*          Latin Extended-C          */
  /*          Latin Extended-D          */
#define TT_UCR_LATIN_EXTENDED_ADDITIONAL       (1L &lt;&lt; 29) /* U+1E00-U+1EFF */
                                                          /* U+2C60-U+2C7F */
                                                          /* U+A720-U+A7FF */
  /* Bit 30   Greek Extended */
#define TT_UCR_GREEK_EXTENDED                  (1L &lt;&lt; 30) /* U+1F00-U+1FFF */
  /* Bit 31   General Punctuation      */
  /*          Supplemental Punctuation */
#define TT_UCR_GENERAL_PUNCTUATION             (1L &lt;&lt; 31) /* U+2000-U+206F */
                                                          /* U+2E00-U+2E7F */

  /* ulUnicodeRange2 */
  /* --------------- */

  /* Bit 32   Superscripts And Subscripts */
#define TT_UCR_SUPERSCRIPTS_SUBSCRIPTS         (1L &lt;&lt;  0) /* U+2070-U+209F */
  /* Bit 33   Currency Symbols */
#define TT_UCR_CURRENCY_SYMBOLS                (1L &lt;&lt;  1) /* U+20A0-U+20CF */
  /* Bit 34   Combining Diacritical Marks For Symbols */
#define TT_UCR_COMBINING_DIACRITICAL_MARKS_SYMB \
                                               (1L &lt;&lt;  2) /* U+20D0-U+20FF */
  /* Bit 35   Letterlike Symbols */
#define TT_UCR_LETTERLIKE_SYMBOLS              (1L &lt;&lt;  3) /* U+2100-U+214F */
  /* Bit 36   Number Forms */
#define TT_UCR_NUMBER_FORMS                    (1L &lt;&lt;  4) /* U+2150-U+218F */
  /* Bit 37   Arrows                           */
  /*          Supplemental Arrows-A            */
  /*          Supplemental Arrows-B            */
  /*          Miscellaneous Symbols and Arrows */
#define TT_UCR_ARROWS                          (1L &lt;&lt;  5) /* U+2190-U+21FF */
                                                          /* U+27F0-U+27FF */
                                                          /* U+2900-U+297F */
                                                          /* U+2B00-U+2BFF */
  /* Bit 38   Mathematical Operators               */
  /*          Supplemental Mathematical Operators  */
  /*          Miscellaneous Mathematical Symbols-A */
  /*          Miscellaneous Mathematical Symbols-B */
#define TT_UCR_MATHEMATICAL_OPERATORS          (1L &lt;&lt;  6) /* U+2200-U+22FF */
                                                          /* U+2A00-U+2AFF */
                                                          /* U+27C0-U+27EF */
                                                          /* U+2980-U+29FF */
  /* Bit 39 Miscellaneous Technical */
#define TT_UCR_MISCELLANEOUS_TECHNICAL         (1L &lt;&lt;  7) /* U+2300-U+23FF */
  /* Bit 40   Control Pictures */
#define TT_UCR_CONTROL_PICTURES                (1L &lt;&lt;  8) /* U+2400-U+243F */
  /* Bit 41   Optical Character Recognition */
#define TT_UCR_OCR                             (1L &lt;&lt;  9) /* U+2440-U+245F */
  /* Bit 42   Enclosed Alphanumerics */
#define TT_UCR_ENCLOSED_ALPHANUMERICS          (1L &lt;&lt; 10) /* U+2460-U+24FF */
  /* Bit 43   Box Drawing */
#define TT_UCR_BOX_DRAWING                     (1L &lt;&lt; 11) /* U+2500-U+257F */
  /* Bit 44   Block Elements */
#define TT_UCR_BLOCK_ELEMENTS                  (1L &lt;&lt; 12) /* U+2580-U+259F */
  /* Bit 45   Geometric Shapes */
#define TT_UCR_GEOMETRIC_SHAPES                (1L &lt;&lt; 13) /* U+25A0-U+25FF */
  /* Bit 46   Miscellaneous Symbols */
#define TT_UCR_MISCELLANEOUS_SYMBOLS           (1L &lt;&lt; 14) /* U+2600-U+26FF */
  /* Bit 47   Dingbats */
#define TT_UCR_DINGBATS                        (1L &lt;&lt; 15) /* U+2700-U+27BF */
  /* Bit 48   CJK Symbols and Punctuation */
#define TT_UCR_CJK_SYMBOLS                     (1L &lt;&lt; 16) /* U+3000-U+303F */
  /* Bit 49   Hiragana */
#define TT_UCR_HIRAGANA                        (1L &lt;&lt; 17) /* U+3040-U+309F */
  /* Bit 50   Katakana                     */
  /*          Katakana Phonetic Extensions */
#define TT_UCR_KATAKANA                        (1L &lt;&lt; 18) /* U+30A0-U+30FF */
                                                          /* U+31F0-U+31FF */
  /* Bit 51   Bopomofo          */
  /*          Bopomofo Extended */
#define TT_UCR_BOPOMOFO                        (1L &lt;&lt; 19) /* U+3100-U+312F */
                                                          /* U+31A0-U+31BF */
  /* Bit 52   Hangul Compatibility Jamo */
#define TT_UCR_HANGUL_COMPATIBILITY_JAMO       (1L &lt;&lt; 20) /* U+3130-U+318F */
  /* Bit 53   Phags-Pa */
#define TT_UCR_CJK_MISC                        (1L &lt;&lt; 21) /* U+A840-U+A87F */
#define TT_UCR_KANBUN  TT_UCR_CJK_MISC /* deprecated */
#define TT_UCR_PHAGSPA
  /* Bit 54   Enclosed CJK Letters and Months */
#define TT_UCR_ENCLOSED_CJK_LETTERS_MONTHS     (1L &lt;&lt; 22) /* U+3200-U+32FF */
  /* Bit 55   CJK Compatibility */
#define TT_UCR_CJK_COMPATIBILITY               (1L &lt;&lt; 23) /* U+3300-U+33FF */
  /* Bit 56   Hangul Syllables */
#define TT_UCR_HANGUL                          (1L &lt;&lt; 24) /* U+AC00-U+D7A3 */
  /* Bit 57   High Surrogates              */
  /*          High Private Use Surrogates  */
  /*          Low Surrogates               */

  /* According to OpenType specs v.1.3+,   */
  /* setting bit 57 implies that there is  */
  /* at least one codepoint beyond the     */
  /* Basic Multilingual Plane that is      */
  /* supported by this font.  So it really */
  /* means &gt;= U+10000.                     */
#define TT_UCR_SURROGATES                      (1L &lt;&lt; 25) /* U+D800-U+DB7F */
                                                          /* U+DB80-U+DBFF */
                                                          /* U+DC00-U+DFFF */
#define TT_UCR_NON_PLANE_0  TT_UCR_SURROGATES
  /* Bit 58  Phoenician */
#define TT_UCR_PHOENICIAN                      (1L &lt;&lt; 26) /*U+10900-U+1091F*/
  /* Bit 59   CJK Unified Ideographs             */
  /*          CJK Radicals Supplement            */
  /*          Kangxi Radicals                    */
  /*          Ideographic Description Characters */
  /*          CJK Unified Ideographs Extension A */
  /*          CJK Unified Ideographs Extension B */
  /*          Kanbun                             */
#define TT_UCR_CJK_UNIFIED_IDEOGRAPHS          (1L &lt;&lt; 27) /* U+4E00-U+9FFF */
                                                          /* U+2E80-U+2EFF */
                                                          /* U+2F00-U+2FDF */
                                                          /* U+2FF0-U+2FFF */
                                                          /* U+3400-U+4DB5 */
                                                          /*U+20000-U+2A6DF*/
                                                          /* U+3190-U+319F */
  /* Bit 60   Private Use */
#define TT_UCR_PRIVATE_USE                     (1L &lt;&lt; 28) /* U+E000-U+F8FF */
  /* Bit 61   CJK Strokes                             */
  /*          CJK Compatibility Ideographs            */
  /*          CJK Compatibility Ideographs Supplement */
#define TT_UCR_CJK_COMPATIBILITY_IDEOGRAPHS    (1L &lt;&lt; 29) /* U+31C0-U+31EF */
                                                          /* U+F900-U+FAFF */
                                                          /*U+2F800-U+2FA1F*/
  /* Bit 62   Alphabetic Presentation Forms */
#define TT_UCR_ALPHABETIC_PRESENTATION_FORMS   (1L &lt;&lt; 30) /* U+FB00-U+FB4F */
  /* Bit 63   Arabic Presentation Forms-A */
#define TT_UCR_ARABIC_PRESENTATION_FORMS_A     (1L &lt;&lt; 31) /* U+FB50-U+FDFF */

  /* ulUnicodeRange3 */
  /* --------------- */

  /* Bit 64   Combining Half Marks */
#define TT_UCR_COMBINING_HALF_MARKS            (1L &lt;&lt;  0) /* U+FE20-U+FE2F */
  /* Bit 65   Vertical forms          */
  /*          CJK Compatibility Forms */
#define TT_UCR_CJK_COMPATIBILITY_FORMS         (1L &lt;&lt;  1) /* U+FE10-U+FE1F */
                                                          /* U+FE30-U+FE4F */
  /* Bit 66   Small Form Variants */
#define TT_UCR_SMALL_FORM_VARIANTS             (1L &lt;&lt;  2) /* U+FE50-U+FE6F */
  /* Bit 67   Arabic Presentation Forms-B */
#define TT_UCR_ARABIC_PRESENTATION_FORMS_B     (1L &lt;&lt;  3) /* U+FE70-U+FEFE */
  /* Bit 68   Halfwidth and Fullwidth Forms */
#define TT_UCR_HALFWIDTH_FULLWIDTH_FORMS       (1L &lt;&lt;  4) /* U+FF00-U+FFEF */
  /* Bit 69   Specials */
#define TT_UCR_SPECIALS                        (1L &lt;&lt;  5) /* U+FFF0-U+FFFD */
  /* Bit 70   Tibetan */
#define TT_UCR_TIBETAN                         (1L &lt;&lt;  6) /* U+0F00-U+0FFF */
  /* Bit 71   Syriac */
#define TT_UCR_SYRIAC                          (1L &lt;&lt;  7) /* U+0700-U+074F */
  /* Bit 72   Thaana */
#define TT_UCR_THAANA                          (1L &lt;&lt;  8) /* U+0780-U+07BF */
  /* Bit 73   Sinhala */
#define TT_UCR_SINHALA                         (1L &lt;&lt;  9) /* U+0D80-U+0DFF */
  /* Bit 74   Myanmar */
#define TT_UCR_MYANMAR                         (1L &lt;&lt; 10) /* U+1000-U+109F */
  /* Bit 75   Ethiopic            */
  /*          Ethiopic Supplement */
  /*          Ethiopic Extended   */
#define TT_UCR_ETHIOPIC                        (1L &lt;&lt; 11) /* U+1200-U+137F */
                                                          /* U+1380-U+139F */
                                                          /* U+2D80-U+2DDF */
  /* Bit 76   Cherokee */
#define TT_UCR_CHEROKEE                        (1L &lt;&lt; 12) /* U+13A0-U+13FF */
  /* Bit 77   Unified Canadian Aboriginal Syllabics */
#define TT_UCR_CANADIAN_ABORIGINAL_SYLLABICS   (1L &lt;&lt; 13) /* U+1400-U+167F */
  /* Bit 78   Ogham */
#define TT_UCR_OGHAM                           (1L &lt;&lt; 14) /* U+1680-U+169F */
  /* Bit 79   Runic */
#define TT_UCR_RUNIC                           (1L &lt;&lt; 15) /* U+16A0-U+16FF */
  /* Bit 80   Khmer         */
  /*          Khmer Symbols */
#define TT_UCR_KHMER                           (1L &lt;&lt; 16) /* U+1780-U+17FF */
                                                          /* U+19E0-U+19FF */
  /* Bit 81   Mongolian */
#define TT_UCR_MONGOLIAN                       (1L &lt;&lt; 17) /* U+1800-U+18AF */
  /* Bit 82   Braille Patterns */
#define TT_UCR_BRAILLE                         (1L &lt;&lt; 18) /* U+2800-U+28FF */
  /* Bit 83   Yi Syllables */
  /*          Yi Radicals  */
#define TT_UCR_YI                              (1L &lt;&lt; 19) /* U+A000-U+A48F */
                                                          /* U+A490-U+A4CF */
  /* Bit 84   Tagalog  */
  /*          Hanunoo  */
  /*          Buhid    */
  /*          Tagbanwa */
#define TT_UCR_PHILIPPINE                      (1L &lt;&lt; 20) /* U+1700-U+171F */
                                                          /* U+1720-U+173F */
                                                          /* U+1740-U+175F */
                                                          /* U+1760-U+177F */
  /* Bit 85   Old Italic */
#define TT_UCR_OLD_ITALIC                      (1L &lt;&lt; 21) /*U+10300-U+1032F*/
  /* Bit 86   Gothic */
#define TT_UCR_GOTHIC                          (1L &lt;&lt; 22) /*U+10330-U+1034F*/
  /* Bit 87   Deseret */
#define TT_UCR_DESERET                         (1L &lt;&lt; 23) /*U+10400-U+1044F*/
  /* Bit 88   Byzantine Musical Symbols      */
  /*          Musical Symbols                */
  /*          Ancient Greek Musical Notation */
#define TT_UCR_MUSICAL_SYMBOLS                 (1L &lt;&lt; 24) /*U+1D000-U+1D0FF*/
                                                          /*U+1D100-U+1D1FF*/
                                                          /*U+1D200-U+1D24F*/
  /* Bit 89   Mathematical Alphanumeric Symbols */
#define TT_UCR_MATH_ALPHANUMERIC_SYMBOLS       (1L &lt;&lt; 25) /*U+1D400-U+1D7FF*/
  /* Bit 90   Private Use (plane 15) */
  /*          Private Use (plane 16) */
#define TT_UCR_PRIVATE_USE_SUPPLEMENTARY       (1L &lt;&lt; 26) /*U+F0000-U+FFFFD*/
                                                        /*U+100000-U+10FFFD*/
  /* Bit 91   Variation Selectors            */
  /*          Variation Selectors Supplement */
#define TT_UCR_VARIATION_SELECTORS             (1L &lt;&lt; 27) /* U+FE00-U+FE0F */
                                                          /*U+E0100-U+E01EF*/
  /* Bit 92   Tags */
#define TT_UCR_TAGS                            (1L &lt;&lt; 28) /*U+E0000-U+E007F*/
  /* Bit 93   Limbu */
#define TT_UCR_LIMBU                           (1L &lt;&lt; 29) /* U+1900-U+194F */
  /* Bit 94   Tai Le */
#define TT_UCR_TAI_LE                          (1L &lt;&lt; 30) /* U+1950-U+197F */
  /* Bit 95   New Tai Lue */
#define TT_UCR_NEW_TAI_LUE                     (1L &lt;&lt; 31) /* U+1980-U+19DF */

  /* ulUnicodeRange4 */
  /* --------------- */

  /* Bit 96   Buginese */
#define TT_UCR_BUGINESE                        (1L &lt;&lt;  0) /* U+1A00-U+1A1F */
  /* Bit 97   Glagolitic */
#define TT_UCR_GLAGOLITIC                      (1L &lt;&lt;  1) /* U+2C00-U+2C5F */
  /* Bit 98   Tifinagh */
#define TT_UCR_TIFINAGH                        (1L &lt;&lt;  2) /* U+2D30-U+2D7F */
  /* Bit 99   Yijing Hexagram Symbols */
#define TT_UCR_YIJING                          (1L &lt;&lt;  3) /* U+4DC0-U+4DFF */
  /* Bit 100  Syloti Nagri */
#define TT_UCR_SYLOTI_NAGRI                    (1L &lt;&lt;  4) /* U+A800-U+A82F */
  /* Bit 101  Linear B Syllabary */
  /*          Linear B Ideograms */
  /*          Aegean Numbers     */
#define TT_UCR_LINEAR_B                        (1L &lt;&lt;  5) /*U+10000-U+1007F*/
                                                          /*U+10080-U+100FF*/
                                                          /*U+10100-U+1013F*/
  /* Bit 102  Ancient Greek Numbers */
#define TT_UCR_ANCIENT_GREEK_NUMBERS           (1L &lt;&lt;  6) /*U+10140-U+1018F*/
  /* Bit 103  Ugaritic */
#define TT_UCR_UGARITIC                        (1L &lt;&lt;  7) /*U+10380-U+1039F*/
  /* Bit 104  Old Persian */
#define TT_UCR_OLD_PERSIAN                     (1L &lt;&lt;  8) /*U+103A0-U+103DF*/
  /* Bit 105  Shavian */
#define TT_UCR_SHAVIAN                         (1L &lt;&lt;  9) /*U+10450-U+1047F*/
  /* Bit 106  Osmanya */
#define TT_UCR_OSMANYA                         (1L &lt;&lt; 10) /*U+10480-U+104AF*/
  /* Bit 107  Cypriot Syllabary */
#define TT_UCR_CYPRIOT_SYLLABARY               (1L &lt;&lt; 11) /*U+10800-U+1083F*/
  /* Bit 108  Kharoshthi */
#define TT_UCR_KHAROSHTHI                      (1L &lt;&lt; 12) /*U+10A00-U+10A5F*/
  /* Bit 109  Tai Xuan Jing Symbols */
#define TT_UCR_TAI_XUAN_JING                   (1L &lt;&lt; 13) /*U+1D300-U+1D35F*/
  /* Bit 110  Cuneiform                         */
  /*          Cuneiform Numbers and Punctuation */
#define TT_UCR_CUNEIFORM                       (1L &lt;&lt; 14) /*U+12000-U+123FF*/
                                                          /*U+12400-U+1247F*/
  /* Bit 111  Counting Rod Numerals */
#define TT_UCR_COUNTING_ROD_NUMERALS           (1L &lt;&lt; 15) /*U+1D360-U+1D37F*/
  /* Bit 112  Sundanese */
#define TT_UCR_SUNDANESE                       (1L &lt;&lt; 16) /* U+1B80-U+1BBF */
  /* Bit 113  Lepcha */
#define TT_UCR_LEPCHA                          (1L &lt;&lt; 17) /* U+1C00-U+1C4F */
  /* Bit 114  Ol Chiki */
#define TT_UCR_OL_CHIKI                        (1L &lt;&lt; 18) /* U+1C50-U+1C7F */
  /* Bit 115  Saurashtra */
#define TT_UCR_SAURASHTRA                      (1L &lt;&lt; 19) /* U+A880-U+A8DF */
  /* Bit 116  Kayah Li */
#define TT_UCR_KAYAH_LI                        (1L &lt;&lt; 20) /* U+A900-U+A92F */
  /* Bit 117  Rejang */
#define TT_UCR_REJANG                          (1L &lt;&lt; 21) /* U+A930-U+A95F */
  /* Bit 118  Cham */
#define TT_UCR_CHAM                            (1L &lt;&lt; 22) /* U+AA00-U+AA5F */
  /* Bit 119  Ancient Symbols */
#define TT_UCR_ANCIENT_SYMBOLS                 (1L &lt;&lt; 23) /*U+10190-U+101CF*/
  /* Bit 120  Phaistos Disc */
#define TT_UCR_PHAISTOS_DISC                   (1L &lt;&lt; 24) /*U+101D0-U+101FF*/
  /* Bit 121  Carian */
  /*          Lycian */
  /*          Lydian */
#define TT_UCR_OLD_ANATOLIAN                   (1L &lt;&lt; 25) /*U+102A0-U+102DF*/
                                                          /*U+10280-U+1029F*/
                                                          /*U+10920-U+1093F*/
  /* Bit 122  Domino Tiles  */
  /*          Mahjong Tiles */
#define TT_UCR_GAME_TILES                      (1L &lt;&lt; 26) /*U+1F030-U+1F09F*/
                                                          /*U+1F000-U+1F02F*/
  /* Bit 123-127 Reserved for process-internal usage */
</pre>

<p>Possible bit mask values for the &lsquo;ulUnicodeRangeX&rsquo; fields in an SFNT &lsquo;OS/2&rsquo; table.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

</body>
</html>
reference/ft2-tt_driver.html000064400000021213151706766400012076 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF;
         width: 87%;
         margin: auto; }

  div.section { width: 75%;
                margin: auto; }
  div.section hr { margin: 4ex 0 1ex 0; }
  div.section h4 { background-color: #EEEEFF;
                   font-size: medium;
                   font-style: oblique;
                   font-weight: bold;
                   margin: 3ex 0 1.5ex 9%;
                   padding: 0.3ex 0 0.3ex 1%; }
  div.section p { margin: 1.5ex 0 1.5ex 10%; }
  div.section pre { margin: 3ex 0 3ex 9%;
                    background-color: #D6E8FF;
                    padding: 2ex 0 2ex 1%; }
  div.section table.fields { width: 90%;
                             margin: 1.5ex 0 1.5ex 10%; }
  div.section table.toc { width: 95%;
                          margin: 1.5ex 0 1.5ex 5%; }
  div.timestamp { text-align: center;
                  font-size: 69%;
                  margin: 1.5ex 0 1.5ex 0; }

  h1 { text-align: center; }
  h3 { font-size: medium;
       margin: 4ex 0 1.5ex 0; }

  p { text-align: justify; }

  pre.colored { color: blue; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  table.fields td.val { font-weight: bold;
                        text-align: right;
                        width: 30%;
                        vertical-align: baseline;
                        padding: 1ex 1em 1ex 0; }
  table.fields td.desc { vertical-align: baseline;
                         padding: 1ex 0 1ex 1em; }
  table.fields td.desc p:first-child { margin: 0; }
  table.fields td.desc p { margin: 1.5ex 0 0 0; }
  table.index { margin: 6ex auto 6ex auto;
                border: 0;
                border-collapse: separate;
                border-spacing: 1em 0.3ex; }
  table.index tr { padding: 0; }
  table.index td { padding: 0; }
  table.index-toc-link { width: 100%;
                         border: 0;
                         border-spacing: 0;
                         margin: 1ex 0 1ex 0; }
  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
                                 font-size: 83%;
                                 text-align: left; }
  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
                                   font-size: 83%;
                                   text-align: center; }
  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
                                  font-size: 83%;
                                  text-align: right; }
  table.synopsis { margin: 6ex auto 6ex auto;
                   border: 0;
                   border-collapse: separate;
                   border-spacing: 2em 0.6ex; }
  table.synopsis tr { padding: 0; }
  table.synopsis td { padding: 0; }
  table.toc td.link { width: 30%;
                      text-align: right;
                      vertical-align: baseline;
                      padding: 1ex 1em 1ex 0; }
  table.toc td.desc { vertical-align: baseline;
                      padding: 1ex 0 1ex 1em;
                      text-align: left; }
  table.toc td.desc p:first-child { margin: 0;
                                    text-align: left; }
  table.toc td.desc p { margin: 1.5ex 0 0 0;
                        text-align: left; }

</style>
</head>
<body>

<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
<h1>FreeType-2.9.1 API Reference</h1>

<h1 id="tt_driver">The TrueType driver</h1>

<p>While FreeType's TrueType driver doesn't expose API functions by itself, it is possible to control its behaviour with <a href="ft2-module_management.html#FT_Property_Set">FT_Property_Set</a> and <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a>. The following lists the available properties together with the necessary macros and structures.</p>
<p>The TrueType driver's module name is &lsquo;truetype&rsquo;.</p>
<p>A single property <a href="ft2-properties.html#interpreter-version">interpreter-version</a> is available, as documented in the &lsquo;<a href="ft2-properties.html#properties">Driver properties</a>&rsquo; section.</p>
<p>We start with a list of definitions, kindly provided by Greg Hitchcock.</p>
<p><i>Bi-Level</i> <i>Rendering</i></p>
<p>Monochromatic rendering, exclusively used in the early days of TrueType by both Apple and Microsoft. Microsoft's GDI interface supported hinting of the right-side bearing point, such that the advance width could be non-linear. Most often this was done to achieve some level of glyph symmetry. To enable reasonable performance (e.g., not having to run hinting on all glyphs just to get the widths) there was a bit in the head table indicating if the side bearing was hinted, and additional tables, &lsquo;hdmx&rsquo; and &lsquo;LTSH&rsquo;, to cache hinting widths across multiple sizes and device aspect ratios.</p>
<p><i>Font</i> <i>Smoothing</i></p>
<p>Microsoft's GDI implementation of anti-aliasing. Not traditional anti-aliasing as the outlines were hinted before the sampling. The widths matched the bi-level rendering.</p>
<p><i>ClearType</i> <i>Rendering</i></p>
<p>Technique that uses physical subpixels to improve rendering on LCD (and other) displays. Because of the higher resolution, many methods of improving symmetry in glyphs through hinting the right-side bearing were no longer necessary. This lead to what GDI calls &lsquo;natural widths&rsquo; ClearType, see <a href="http://www.beatstamm.com/typography/RTRCh4.htm#Sec21">http://www.beatstamm.com/typography/RTRCh4.htm#Sec21</a>. Since hinting has extra resolution, most non-linearity went away, but it is still possible for hints to change the advance widths in this mode.</p>
<p><i>ClearType</i> <i>Compatible</i> <i>Widths</i></p>
<p>One of the earliest challenges with ClearType was allowing the implementation in GDI to be selected without requiring all UI and documents to reflow. To address this, a compatible method of rendering ClearType was added where the font hints are executed once to determine the width in bi-level rendering, and then re-run in ClearType, with the difference in widths being absorbed in the font hints for ClearType (mostly in the white space of hints); see <a href="http://www.beatstamm.com/typography/RTRCh4.htm#Sec20">http://www.beatstamm.com/typography/RTRCh4.htm#Sec20</a>. Somewhat by definition, compatible width ClearType allows for non-linear widths, but only when the bi-level version has non-linear widths.</p>
<p><i>ClearType</i> <i>Subpixel</i> <i>Positioning</i></p>
<p>One of the nice benefits of ClearType is the ability to more crisply display fractional widths; unfortunately, the GDI model of integer bitmaps did not support this. However, the WPF and Direct Write frameworks do support fractional widths. DWrite calls this &lsquo;natural mode&rsquo;, not to be confused with GDI's &lsquo;natural widths&rsquo;. Subpixel positioning, in the current implementation of Direct Write, unfortunately does not support hinted advance widths, see <a href="http://www.beatstamm.com/typography/RTRCh4.htm#Sec22">http://www.beatstamm.com/typography/RTRCh4.htm#Sec22</a>. Note that the TrueType interpreter fully allows the advance width to be adjusted in this mode, just the DWrite client will ignore those changes.</p>
<p><i>ClearType</i> <i>Backward</i> <i>Compatibility</i></p>
<p>This is a set of exceptions made in the TrueType interpreter to minimize hinting techniques that were problematic with the extra resolution of ClearType; see <a href="http://www.beatstamm.com/typography/RTRCh4.htm#Sec1">http://www.beatstamm.com/typography/RTRCh4.htm#Sec1</a> and <a href="https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx">https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx</a>. This technique is not to be confused with ClearType compatible widths. ClearType backward compatibility has no direct impact on changing advance widths, but there might be an indirect impact on disabling some deltas. This could be worked around in backward compatibility mode.</p>
<p><i>Native</i> <i>ClearType</i> <i>Mode</i></p>
<p>(Not to be confused with &lsquo;natural widths&rsquo;.) This mode removes all the exceptions in the TrueType interpreter when running with ClearType. Any issues on widths would still apply, though.</p>

</body>
</html>
reference/ft2-type1_tables.html000064400000130527151706766400012501 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF;
         width: 87%;
         margin: auto; }

  div.section { width: 75%;
                margin: auto; }
  div.section hr { margin: 4ex 0 1ex 0; }
  div.section h4 { background-color: #EEEEFF;
                   font-size: medium;
                   font-style: oblique;
                   font-weight: bold;
                   margin: 3ex 0 1.5ex 9%;
                   padding: 0.3ex 0 0.3ex 1%; }
  div.section p { margin: 1.5ex 0 1.5ex 10%; }
  div.section pre { margin: 3ex 0 3ex 9%;
                    background-color: #D6E8FF;
                    padding: 2ex 0 2ex 1%; }
  div.section table.fields { width: 90%;
                             margin: 1.5ex 0 1.5ex 10%; }
  div.section table.toc { width: 95%;
                          margin: 1.5ex 0 1.5ex 5%; }
  div.timestamp { text-align: center;
                  font-size: 69%;
                  margin: 1.5ex 0 1.5ex 0; }

  h1 { text-align: center; }
  h3 { font-size: medium;
       margin: 4ex 0 1.5ex 0; }

  p { text-align: justify; }

  pre.colored { color: blue; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  table.fields td.val { font-weight: bold;
                        text-align: right;
                        width: 30%;
                        vertical-align: baseline;
                        padding: 1ex 1em 1ex 0; }
  table.fields td.desc { vertical-align: baseline;
                         padding: 1ex 0 1ex 1em; }
  table.fields td.desc p:first-child { margin: 0; }
  table.fields td.desc p { margin: 1.5ex 0 0 0; }
  table.index { margin: 6ex auto 6ex auto;
                border: 0;
                border-collapse: separate;
                border-spacing: 1em 0.3ex; }
  table.index tr { padding: 0; }
  table.index td { padding: 0; }
  table.index-toc-link { width: 100%;
                         border: 0;
                         border-spacing: 0;
                         margin: 1ex 0 1ex 0; }
  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
                                 font-size: 83%;
                                 text-align: left; }
  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
                                   font-size: 83%;
                                   text-align: center; }
  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
                                  font-size: 83%;
                                  text-align: right; }
  table.synopsis { margin: 6ex auto 6ex auto;
                   border: 0;
                   border-collapse: separate;
                   border-spacing: 2em 0.6ex; }
  table.synopsis tr { padding: 0; }
  table.synopsis td { padding: 0; }
  table.toc td.link { width: 30%;
                      text-align: right;
                      vertical-align: baseline;
                      padding: 1ex 1em 1ex 0; }
  table.toc td.desc { vertical-align: baseline;
                      padding: 1ex 0 1ex 1em;
                      text-align: left; }
  table.toc td.desc p:first-child { margin: 0;
                                    text-align: left; }
  table.toc td.desc p { margin: 1.5ex 0 0 0;
                        text-align: left; }

</style>
</head>
<body>

<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
<h1>FreeType-2.9.1 API Reference</h1>

<h1 id="type1_tables">Type 1 Tables</h1>
<h2>Synopsis</h2>
<table class="synopsis">
<tr><td><a href="#PS_FontInfoRec">PS_FontInfoRec</a></td><td><a href="#CID_FaceInfo">CID_FaceInfo</a></td><td><a href="#T1_EncodingType">T1_EncodingType</a></td></tr>
<tr><td><a href="#PS_FontInfo">PS_FontInfo</a></td><td>&nbsp;</td><td><a href="#PS_Dict_Keys">PS_Dict_Keys</a></td></tr>
<tr><td><a href="#PS_PrivateRec">PS_PrivateRec</a></td><td><a href="#FT_Has_PS_Glyph_Names">FT_Has_PS_Glyph_Names</a></td><td>&nbsp;</td></tr>
<tr><td><a href="#PS_Private">PS_Private</a></td><td><a href="#FT_Get_PS_Font_Info">FT_Get_PS_Font_Info</a></td><td><a href="#T1_FontInfo">T1_FontInfo</a></td></tr>
<tr><td>&nbsp;</td><td><a href="#FT_Get_PS_Font_Private">FT_Get_PS_Font_Private</a></td><td><a href="#T1_Private">T1_Private</a></td></tr>
<tr><td><a href="#CID_FaceDictRec">CID_FaceDictRec</a></td><td><a href="#FT_Get_PS_Font_Value">FT_Get_PS_Font_Value</a></td><td><a href="#CID_FontDict">CID_FontDict</a></td></tr>
<tr><td><a href="#CID_FaceDict">CID_FaceDict</a></td><td>&nbsp;</td><td><a href="#CID_Info">CID_Info</a></td></tr>
<tr><td><a href="#CID_FaceInfoRec">CID_FaceInfoRec</a></td><td><a href="#T1_Blend_Flags">T1_Blend_Flags</a></td><td></td></tr>
</table>


<p>This section contains the definition of Type 1-specific tables, including structures related to other PostScript font formats.</p>

<div class="section">
<h3 id="PS_FontInfoRec">PS_FontInfoRec</h3>
<p>Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  PS_FontInfoRec_
  {
    <a href="ft2-basic_types.html#FT_String">FT_String</a>*  version;
    <a href="ft2-basic_types.html#FT_String">FT_String</a>*  notice;
    <a href="ft2-basic_types.html#FT_String">FT_String</a>*  full_name;
    <a href="ft2-basic_types.html#FT_String">FT_String</a>*  family_name;
    <a href="ft2-basic_types.html#FT_String">FT_String</a>*  weight;
    <a href="ft2-basic_types.html#FT_Long">FT_Long</a>     italic_angle;
    <a href="ft2-basic_types.html#FT_Bool">FT_Bool</a>     is_fixed_pitch;
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>    underline_position;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>   underline_thickness;

  } <b>PS_FontInfoRec</b>;
</pre>

<p>A structure used to model a Type&nbsp;1 or Type&nbsp;2 FontInfo dictionary. Note that for Multiple Master fonts, each instance has its own FontInfo dictionary.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="PS_FontInfo">PS_FontInfo</h3>
<p>Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span> PS_FontInfoRec_*  <b>PS_FontInfo</b>;
</pre>

<p>A handle to a <a href="ft2-type1_tables.html#PS_FontInfoRec">PS_FontInfoRec</a> structure.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="PS_PrivateRec">PS_PrivateRec</h3>
<p>Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  PS_PrivateRec_
  {
    <a href="ft2-basic_types.html#FT_Int">FT_Int</a>     unique_id;
    <a href="ft2-basic_types.html#FT_Int">FT_Int</a>     lenIV;

    <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>    num_blue_values;
    <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>    num_other_blues;
    <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>    num_family_blues;
    <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>    num_family_other_blues;

    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   blue_values[14];
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   other_blues[10];

    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   family_blues      [14];
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   family_other_blues[10];

    <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>   blue_scale;
    <a href="ft2-basic_types.html#FT_Int">FT_Int</a>     blue_shift;
    <a href="ft2-basic_types.html#FT_Int">FT_Int</a>     blue_fuzz;

    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  standard_width[1];
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  standard_height[1];

    <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>    num_snap_widths;
    <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>    num_snap_heights;
    <a href="ft2-basic_types.html#FT_Bool">FT_Bool</a>    force_bold;
    <a href="ft2-basic_types.html#FT_Bool">FT_Bool</a>    round_stem_up;

    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   snap_widths [13];  /* including std width  */
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   snap_heights[13];  /* including std height */

    <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>   expansion_factor;

    <a href="ft2-basic_types.html#FT_Long">FT_Long</a>    language_group;
    <a href="ft2-basic_types.html#FT_Long">FT_Long</a>    password;

    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   min_feature[2];

  } <b>PS_PrivateRec</b>;
</pre>

<p>A structure used to model a Type&nbsp;1 or Type&nbsp;2 private dictionary. Note that for Multiple Master fonts, each instance has its own Private dictionary.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="PS_Private">PS_Private</h3>
<p>Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span> PS_PrivateRec_*  <b>PS_Private</b>;
</pre>

<p>A handle to a <a href="ft2-type1_tables.html#PS_PrivateRec">PS_PrivateRec</a> structure.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="CID_FaceDictRec">CID_FaceDictRec</h3>
<p>Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  CID_FaceDictRec_
  {
    <a href="ft2-type1_tables.html#PS_PrivateRec">PS_PrivateRec</a>  private_dict;

    <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>        len_buildchar;
    <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>       forcebold_threshold;
    <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a>         stroke_width;
    <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>       expansion_factor;

    <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>        paint_type;
    <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>        font_type;
    <a href="ft2-basic_types.html#FT_Matrix">FT_Matrix</a>      font_matrix;
    <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>      font_offset;

    <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>        num_subrs;
    <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>       subrmap_offset;
    <a href="ft2-basic_types.html#FT_Int">FT_Int</a>         sd_bytes;

  } <b>CID_FaceDictRec</b>;
</pre>

<p>A structure used to represent data in a CID top-level dictionary.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="CID_FaceDict">CID_FaceDict</h3>
<p>Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span> CID_FaceDictRec_*  <b>CID_FaceDict</b>;
</pre>

<p>A handle to a <a href="ft2-type1_tables.html#CID_FaceDictRec">CID_FaceDictRec</a> structure.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="CID_FaceInfoRec">CID_FaceInfoRec</h3>
<p>Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  CID_FaceInfoRec_
  {
    <a href="ft2-basic_types.html#FT_String">FT_String</a>*      cid_font_name;
    <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>        cid_version;
    <a href="ft2-basic_types.html#FT_Int">FT_Int</a>          cid_font_type;

    <a href="ft2-basic_types.html#FT_String">FT_String</a>*      registry;
    <a href="ft2-basic_types.html#FT_String">FT_String</a>*      ordering;
    <a href="ft2-basic_types.html#FT_Int">FT_Int</a>          supplement;

    <a href="ft2-type1_tables.html#PS_FontInfoRec">PS_FontInfoRec</a>  font_info;
    <a href="ft2-basic_types.html#FT_BBox">FT_BBox</a>         font_bbox;
    <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>        uid_base;

    <a href="ft2-basic_types.html#FT_Int">FT_Int</a>          num_xuid;
    <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>        xuid[16];

    <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>        cidmap_offset;
    <a href="ft2-basic_types.html#FT_Int">FT_Int</a>          fd_bytes;
    <a href="ft2-basic_types.html#FT_Int">FT_Int</a>          gd_bytes;
    <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>        cid_count;

    <a href="ft2-basic_types.html#FT_Int">FT_Int</a>          num_dicts;
    <a href="ft2-type1_tables.html#CID_FaceDict">CID_FaceDict</a>    font_dicts;

    <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>        data_offset;

  } <b>CID_FaceInfoRec</b>;
</pre>

<p>A structure used to represent CID Face information.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="CID_FaceInfo">CID_FaceInfo</h3>
<p>Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span> CID_FaceInfoRec_*  <b>CID_FaceInfo</b>;
</pre>

<p>A handle to a <a href="ft2-type1_tables.html#CID_FaceInfoRec">CID_FaceInfoRec</a> structure.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Has_PS_Glyph_Names">FT_Has_PS_Glyph_Names</h3>
<p>Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Int">FT_Int</a> )
  <b>FT_Has_PS_Glyph_Names</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>  face );
</pre>

<p>Return true if a given face provides reliable PostScript glyph names. This is similar to using the <a href="ft2-base_interface.html#FT_HAS_GLYPH_NAMES">FT_HAS_GLYPH_NAMES</a> macro, except that certain fonts (mostly TrueType) contain incorrect glyph name tables.</p>
<p>When this function returns true, the caller is sure that the glyph names returned by <a href="ft2-base_interface.html#FT_Get_Glyph_Name">FT_Get_Glyph_Name</a> are reliable.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>face handle</p>
</td></tr>
</table>

<h4>return</h4>
<p>Boolean. True if glyph names are reliable.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Get_PS_Font_Info">FT_Get_PS_Font_Info</h3>
<p>Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Get_PS_Font_Info</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>      face,
                       <a href="ft2-type1_tables.html#PS_FontInfo">PS_FontInfo</a>  afont_info );
</pre>

<p>Retrieve the <a href="ft2-type1_tables.html#PS_FontInfoRec">PS_FontInfoRec</a> structure corresponding to a given PostScript font.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>PostScript face handle.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="afont_info">afont_info</td><td class="desc">
<p>Output font info structure pointer.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>String pointers within the <a href="ft2-type1_tables.html#PS_FontInfoRec">PS_FontInfoRec</a> structure are owned by the face and don't need to be freed by the caller. Missing entries in the font's FontInfo dictionary are represented by NULL pointers.</p>
<p>If the font's format is not PostScript-based, this function will return the &lsquo;FT_Err_Invalid_Argument&rsquo; error code.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Get_PS_Font_Private">FT_Get_PS_Font_Private</h3>
<p>Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Get_PS_Font_Private</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>     face,
                          <a href="ft2-type1_tables.html#PS_Private">PS_Private</a>  afont_private );
</pre>

<p>Retrieve the <a href="ft2-type1_tables.html#PS_PrivateRec">PS_PrivateRec</a> structure corresponding to a given PostScript font.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>PostScript face handle.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="afont_private">afont_private</td><td class="desc">
<p>Output private dictionary structure pointer.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>The string pointers within the <a href="ft2-type1_tables.html#PS_PrivateRec">PS_PrivateRec</a> structure are owned by the face and don't need to be freed by the caller.</p>
<p>If the font's format is not PostScript-based, this function returns the &lsquo;FT_Err_Invalid_Argument&rsquo; error code.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Get_PS_Font_Value">FT_Get_PS_Font_Value</h3>
<p>Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Long">FT_Long</a> )
  <b>FT_Get_PS_Font_Value</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>       face,
                        <a href="ft2-type1_tables.html#PS_Dict_Keys">PS_Dict_Keys</a>  key,
                        <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>       idx,
                        <span class="keyword">void</span>         *value,
                        <a href="ft2-basic_types.html#FT_Long">FT_Long</a>       value_len );
</pre>

<p>Retrieve the value for the supplied key from a PostScript font.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>PostScript face handle.</p>
</td></tr>
<tr><td class="val" id="key">key</td><td class="desc">
<p>An enumeration value representing the dictionary key to retrieve.</p>
</td></tr>
<tr><td class="val" id="idx">idx</td><td class="desc">
<p>For array values, this specifies the index to be returned.</p>
</td></tr>
<tr><td class="val" id="value">value</td><td class="desc">
<p>A pointer to memory into which to write the value.</p>
</td></tr>
<tr><td class="val" id="valen_len">valen_len</td><td class="desc">
<p>The size, in bytes, of the memory supplied for the value.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="value">value</td><td class="desc">
<p>The value matching the above key, if it exists.</p>
</td></tr>
</table>

<h4>return</h4>
<p>The amount of memory (in bytes) required to hold the requested value (if it exists, -1 otherwise).</p>

<h4>note</h4>
<p>The values returned are not pointers into the internal structures of the face, but are &lsquo;fresh&rsquo; copies, so that the memory containing them belongs to the calling application. This also enforces the &lsquo;read-only&rsquo; nature of these values, i.e., this function cannot be used to manipulate the face.</p>
<p>&lsquo;value&rsquo; is a void pointer because the values returned can be of various types.</p>
<p>If either &lsquo;value&rsquo; is NULL or &lsquo;value_len&rsquo; is too small, just the required memory size for the requested entry is returned.</p>
<p>The &lsquo;idx&rsquo; parameter is used, not only to retrieve elements of, for example, the FontMatrix or FontBBox, but also to retrieve name keys from the CharStrings dictionary, and the charstrings themselves. It is ignored for atomic values.</p>
<p>PS_DICT_BLUE_SCALE returns a value that is scaled up by 1000. To get the value as in the font stream, you need to divide by 65536000.0 (to remove the FT_Fixed scale, and the x1000 scale).</p>
<p>IMPORTANT: Only key/value pairs read by the FreeType interpreter can be retrieved. So, for example, PostScript procedures such as NP, ND, and RD are not available. Arbitrary keys are, obviously, not be available either.</p>
<p>If the font's format is not PostScript-based, this function returns the &lsquo;FT_Err_Invalid_Argument&rsquo; error code.</p>

<h4>since</h4>
<p>2.4.8</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="T1_Blend_Flags">T1_Blend_Flags</h3>
<p>Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">enum</span>  T1_Blend_Flags_
  {
    /* required fields in a FontInfo blend dictionary */
    <a href="ft2-type1_tables.html#T1_BLEND_UNDERLINE_POSITION">T1_BLEND_UNDERLINE_POSITION</a> = 0,
    <a href="ft2-type1_tables.html#T1_BLEND_UNDERLINE_THICKNESS">T1_BLEND_UNDERLINE_THICKNESS</a>,
    <a href="ft2-type1_tables.html#T1_BLEND_ITALIC_ANGLE">T1_BLEND_ITALIC_ANGLE</a>,

    /* required fields in a Private blend dictionary */
    <a href="ft2-type1_tables.html#T1_BLEND_BLUE_VALUES">T1_BLEND_BLUE_VALUES</a>,
    <a href="ft2-type1_tables.html#T1_BLEND_OTHER_BLUES">T1_BLEND_OTHER_BLUES</a>,
    <a href="ft2-type1_tables.html#T1_BLEND_STANDARD_WIDTH">T1_BLEND_STANDARD_WIDTH</a>,
    <a href="ft2-type1_tables.html#T1_BLEND_STANDARD_HEIGHT">T1_BLEND_STANDARD_HEIGHT</a>,
    <a href="ft2-type1_tables.html#T1_BLEND_STEM_SNAP_WIDTHS">T1_BLEND_STEM_SNAP_WIDTHS</a>,
    <a href="ft2-type1_tables.html#T1_BLEND_STEM_SNAP_HEIGHTS">T1_BLEND_STEM_SNAP_HEIGHTS</a>,
    <a href="ft2-type1_tables.html#T1_BLEND_BLUE_SCALE">T1_BLEND_BLUE_SCALE</a>,
    <a href="ft2-type1_tables.html#T1_BLEND_BLUE_SHIFT">T1_BLEND_BLUE_SHIFT</a>,
    <a href="ft2-type1_tables.html#T1_BLEND_FAMILY_BLUES">T1_BLEND_FAMILY_BLUES</a>,
    <a href="ft2-type1_tables.html#T1_BLEND_FAMILY_OTHER_BLUES">T1_BLEND_FAMILY_OTHER_BLUES</a>,
    <a href="ft2-type1_tables.html#T1_BLEND_FORCE_BOLD">T1_BLEND_FORCE_BOLD</a>,

    T1_BLEND_MAX    /* do not remove */

  } <b>T1_Blend_Flags</b>;


  /* these constants are deprecated; use the corresponding */
  /* `<b>T1_Blend_Flags</b>' values instead                       */
#define t1_blend_underline_position   <a href="ft2-type1_tables.html#T1_BLEND_UNDERLINE_POSITION">T1_BLEND_UNDERLINE_POSITION</a>
#define t1_blend_underline_thickness  <a href="ft2-type1_tables.html#T1_BLEND_UNDERLINE_THICKNESS">T1_BLEND_UNDERLINE_THICKNESS</a>
#define t1_blend_italic_angle         <a href="ft2-type1_tables.html#T1_BLEND_ITALIC_ANGLE">T1_BLEND_ITALIC_ANGLE</a>
#define t1_blend_blue_values          <a href="ft2-type1_tables.html#T1_BLEND_BLUE_VALUES">T1_BLEND_BLUE_VALUES</a>
#define t1_blend_other_blues          <a href="ft2-type1_tables.html#T1_BLEND_OTHER_BLUES">T1_BLEND_OTHER_BLUES</a>
#define t1_blend_standard_widths      <a href="ft2-type1_tables.html#T1_BLEND_STANDARD_WIDTH">T1_BLEND_STANDARD_WIDTH</a>
#define t1_blend_standard_height      <a href="ft2-type1_tables.html#T1_BLEND_STANDARD_HEIGHT">T1_BLEND_STANDARD_HEIGHT</a>
#define t1_blend_stem_snap_widths     <a href="ft2-type1_tables.html#T1_BLEND_STEM_SNAP_WIDTHS">T1_BLEND_STEM_SNAP_WIDTHS</a>
#define t1_blend_stem_snap_heights    <a href="ft2-type1_tables.html#T1_BLEND_STEM_SNAP_HEIGHTS">T1_BLEND_STEM_SNAP_HEIGHTS</a>
#define t1_blend_blue_scale           <a href="ft2-type1_tables.html#T1_BLEND_BLUE_SCALE">T1_BLEND_BLUE_SCALE</a>
#define t1_blend_blue_shift           <a href="ft2-type1_tables.html#T1_BLEND_BLUE_SHIFT">T1_BLEND_BLUE_SHIFT</a>
#define t1_blend_family_blues         <a href="ft2-type1_tables.html#T1_BLEND_FAMILY_BLUES">T1_BLEND_FAMILY_BLUES</a>
#define t1_blend_family_other_blues   <a href="ft2-type1_tables.html#T1_BLEND_FAMILY_OTHER_BLUES">T1_BLEND_FAMILY_OTHER_BLUES</a>
#define t1_blend_force_bold           <a href="ft2-type1_tables.html#T1_BLEND_FORCE_BOLD">T1_BLEND_FORCE_BOLD</a>
#define t1_blend_max                  T1_BLEND_MAX
</pre>

<p>A set of flags used to indicate which fields are present in a given blend dictionary (font info or private). Used to support Multiple Masters fonts.</p>

<h4>values</h4>
<table class="fields">
<tr><td class="val" id="T1_BLEND_UNDERLINE_POSITION">T1_BLEND_UNDERLINE_POSITION</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="T1_BLEND_UNDERLINE_THICKNESS">T1_BLEND_UNDERLINE_THICKNESS</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="T1_BLEND_ITALIC_ANGLE">T1_BLEND_ITALIC_ANGLE</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="T1_BLEND_BLUE_VALUES">T1_BLEND_BLUE_VALUES</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="T1_BLEND_OTHER_BLUES">T1_BLEND_OTHER_BLUES</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="T1_BLEND_STANDARD_WIDTH">T1_BLEND_STANDARD_WIDTH</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="T1_BLEND_STANDARD_HEIGHT">T1_BLEND_STANDARD_HEIGHT</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="T1_BLEND_STEM_SNAP_WIDTHS">T1_BLEND_STEM_SNAP_WIDTHS</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="T1_BLEND_STEM_SNAP_HEIGHTS">T1_BLEND_STEM_SNAP_HEIGHTS</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="T1_BLEND_BLUE_SCALE">T1_BLEND_BLUE_SCALE</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="T1_BLEND_BLUE_SHIFT">T1_BLEND_BLUE_SHIFT</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="T1_BLEND_FAMILY_BLUES">T1_BLEND_FAMILY_BLUES</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="T1_BLEND_FAMILY_OTHER_BLUES">T1_BLEND_FAMILY_OTHER_BLUES</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="T1_BLEND_FORCE_BOLD">T1_BLEND_FORCE_BOLD</td><td class="desc">
<p></p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="T1_EncodingType">T1_EncodingType</h3>
<p>Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">enum</span>  T1_EncodingType_
  {
    <a href="ft2-type1_tables.html#T1_ENCODING_TYPE_NONE">T1_ENCODING_TYPE_NONE</a> = 0,
    <a href="ft2-type1_tables.html#T1_ENCODING_TYPE_ARRAY">T1_ENCODING_TYPE_ARRAY</a>,
    <a href="ft2-type1_tables.html#T1_ENCODING_TYPE_STANDARD">T1_ENCODING_TYPE_STANDARD</a>,
    <a href="ft2-type1_tables.html#T1_ENCODING_TYPE_ISOLATIN1">T1_ENCODING_TYPE_ISOLATIN1</a>,
    <a href="ft2-type1_tables.html#T1_ENCODING_TYPE_EXPERT">T1_ENCODING_TYPE_EXPERT</a>

  } <b>T1_EncodingType</b>;
</pre>

<p>An enumeration describing the &lsquo;Encoding&rsquo; entry in a Type 1 dictionary.</p>

<h4>values</h4>
<table class="fields">
<tr><td class="val" id="T1_ENCODING_TYPE_NONE">T1_ENCODING_TYPE_NONE</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="T1_ENCODING_TYPE_ARRAY">T1_ENCODING_TYPE_ARRAY</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="T1_ENCODING_TYPE_STANDARD">T1_ENCODING_TYPE_STANDARD</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="T1_ENCODING_TYPE_ISOLATIN1">T1_ENCODING_TYPE_ISOLATIN1</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="T1_ENCODING_TYPE_EXPERT">T1_ENCODING_TYPE_EXPERT</td><td class="desc">
<p></p>
</td></tr>
</table>

<h4>since</h4>
<p>2.4.8</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="PS_Dict_Keys">PS_Dict_Keys</h3>
<p>Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">enum</span>  PS_Dict_Keys_
  {
    /* conventionally in the font dictionary */
    <a href="ft2-type1_tables.html#PS_DICT_FONT_TYPE">PS_DICT_FONT_TYPE</a>,              /* <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>         */
    <a href="ft2-type1_tables.html#PS_DICT_FONT_MATRIX">PS_DICT_FONT_MATRIX</a>,            /* <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>        */
    <a href="ft2-type1_tables.html#PS_DICT_FONT_BBOX">PS_DICT_FONT_BBOX</a>,              /* <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>        */
    <a href="ft2-type1_tables.html#PS_DICT_PAINT_TYPE">PS_DICT_PAINT_TYPE</a>,             /* <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>         */
    <a href="ft2-type1_tables.html#PS_DICT_FONT_NAME">PS_DICT_FONT_NAME</a>,              /* <a href="ft2-basic_types.html#FT_String">FT_String</a>*      */
    <a href="ft2-type1_tables.html#PS_DICT_UNIQUE_ID">PS_DICT_UNIQUE_ID</a>,              /* <a href="ft2-basic_types.html#FT_Int">FT_Int</a>          */
    <a href="ft2-type1_tables.html#PS_DICT_NUM_CHAR_STRINGS">PS_DICT_NUM_CHAR_STRINGS</a>,       /* <a href="ft2-basic_types.html#FT_Int">FT_Int</a>          */
    <a href="ft2-type1_tables.html#PS_DICT_CHAR_STRING_KEY">PS_DICT_CHAR_STRING_KEY</a>,        /* <a href="ft2-basic_types.html#FT_String">FT_String</a>*      */
    <a href="ft2-type1_tables.html#PS_DICT_CHAR_STRING">PS_DICT_CHAR_STRING</a>,            /* <a href="ft2-basic_types.html#FT_String">FT_String</a>*      */
    <a href="ft2-type1_tables.html#PS_DICT_ENCODING_TYPE">PS_DICT_ENCODING_TYPE</a>,          /* <a href="ft2-type1_tables.html#T1_EncodingType">T1_EncodingType</a> */
    <a href="ft2-type1_tables.html#PS_DICT_ENCODING_ENTRY">PS_DICT_ENCODING_ENTRY</a>,         /* <a href="ft2-basic_types.html#FT_String">FT_String</a>*      */

    /* conventionally in the font Private dictionary */
    <a href="ft2-type1_tables.html#PS_DICT_NUM_SUBRS">PS_DICT_NUM_SUBRS</a>,              /* <a href="ft2-basic_types.html#FT_Int">FT_Int</a>     */
    <a href="ft2-type1_tables.html#PS_DICT_SUBR">PS_DICT_SUBR</a>,                   /* <a href="ft2-basic_types.html#FT_String">FT_String</a>* */
    <a href="ft2-type1_tables.html#PS_DICT_STD_HW">PS_DICT_STD_HW</a>,                 /* <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  */
    <a href="ft2-type1_tables.html#PS_DICT_STD_VW">PS_DICT_STD_VW</a>,                 /* <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  */
    <a href="ft2-type1_tables.html#PS_DICT_NUM_BLUE_VALUES">PS_DICT_NUM_BLUE_VALUES</a>,        /* <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>    */
    <a href="ft2-type1_tables.html#PS_DICT_BLUE_VALUE">PS_DICT_BLUE_VALUE</a>,             /* <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   */
    <a href="ft2-type1_tables.html#PS_DICT_BLUE_FUZZ">PS_DICT_BLUE_FUZZ</a>,              /* <a href="ft2-basic_types.html#FT_Int">FT_Int</a>     */
    <a href="ft2-type1_tables.html#PS_DICT_NUM_OTHER_BLUES">PS_DICT_NUM_OTHER_BLUES</a>,        /* <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>    */
    <a href="ft2-type1_tables.html#PS_DICT_OTHER_BLUE">PS_DICT_OTHER_BLUE</a>,             /* <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   */
    <a href="ft2-type1_tables.html#PS_DICT_NUM_FAMILY_BLUES">PS_DICT_NUM_FAMILY_BLUES</a>,       /* <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>    */
    <a href="ft2-type1_tables.html#PS_DICT_FAMILY_BLUE">PS_DICT_FAMILY_BLUE</a>,            /* <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   */
    <a href="ft2-type1_tables.html#PS_DICT_NUM_FAMILY_OTHER_BLUES">PS_DICT_NUM_FAMILY_OTHER_BLUES</a>, /* <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>    */
    <a href="ft2-type1_tables.html#PS_DICT_FAMILY_OTHER_BLUE">PS_DICT_FAMILY_OTHER_BLUE</a>,      /* <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   */
    <a href="ft2-type1_tables.html#PS_DICT_BLUE_SCALE">PS_DICT_BLUE_SCALE</a>,             /* <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>   */
    <a href="ft2-type1_tables.html#PS_DICT_BLUE_SHIFT">PS_DICT_BLUE_SHIFT</a>,             /* <a href="ft2-basic_types.html#FT_Int">FT_Int</a>     */
    <a href="ft2-type1_tables.html#PS_DICT_NUM_STEM_SNAP_H">PS_DICT_NUM_STEM_SNAP_H</a>,        /* <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>    */
    <a href="ft2-type1_tables.html#PS_DICT_STEM_SNAP_H">PS_DICT_STEM_SNAP_H</a>,            /* <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   */
    <a href="ft2-type1_tables.html#PS_DICT_NUM_STEM_SNAP_V">PS_DICT_NUM_STEM_SNAP_V</a>,        /* <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>    */
    <a href="ft2-type1_tables.html#PS_DICT_STEM_SNAP_V">PS_DICT_STEM_SNAP_V</a>,            /* <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   */
    <a href="ft2-type1_tables.html#PS_DICT_FORCE_BOLD">PS_DICT_FORCE_BOLD</a>,             /* <a href="ft2-basic_types.html#FT_Bool">FT_Bool</a>    */
    <a href="ft2-type1_tables.html#PS_DICT_RND_STEM_UP">PS_DICT_RND_STEM_UP</a>,            /* <a href="ft2-basic_types.html#FT_Bool">FT_Bool</a>    */
    <a href="ft2-type1_tables.html#PS_DICT_MIN_FEATURE">PS_DICT_MIN_FEATURE</a>,            /* <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   */
    <a href="ft2-type1_tables.html#PS_DICT_LEN_IV">PS_DICT_LEN_IV</a>,                 /* <a href="ft2-basic_types.html#FT_Int">FT_Int</a>     */
    <a href="ft2-type1_tables.html#PS_DICT_PASSWORD">PS_DICT_PASSWORD</a>,               /* <a href="ft2-basic_types.html#FT_Long">FT_Long</a>    */
    <a href="ft2-type1_tables.html#PS_DICT_LANGUAGE_GROUP">PS_DICT_LANGUAGE_GROUP</a>,         /* <a href="ft2-basic_types.html#FT_Long">FT_Long</a>    */

    /* conventionally in the font FontInfo dictionary */
    <a href="ft2-type1_tables.html#PS_DICT_VERSION">PS_DICT_VERSION</a>,                /* <a href="ft2-basic_types.html#FT_String">FT_String</a>* */
    <a href="ft2-type1_tables.html#PS_DICT_NOTICE">PS_DICT_NOTICE</a>,                 /* <a href="ft2-basic_types.html#FT_String">FT_String</a>* */
    <a href="ft2-type1_tables.html#PS_DICT_FULL_NAME">PS_DICT_FULL_NAME</a>,              /* <a href="ft2-basic_types.html#FT_String">FT_String</a>* */
    <a href="ft2-type1_tables.html#PS_DICT_FAMILY_NAME">PS_DICT_FAMILY_NAME</a>,            /* <a href="ft2-basic_types.html#FT_String">FT_String</a>* */
    <a href="ft2-type1_tables.html#PS_DICT_WEIGHT">PS_DICT_WEIGHT</a>,                 /* <a href="ft2-basic_types.html#FT_String">FT_String</a>* */
    <a href="ft2-type1_tables.html#PS_DICT_IS_FIXED_PITCH">PS_DICT_IS_FIXED_PITCH</a>,         /* <a href="ft2-basic_types.html#FT_Bool">FT_Bool</a>    */
    <a href="ft2-type1_tables.html#PS_DICT_UNDERLINE_POSITION">PS_DICT_UNDERLINE_POSITION</a>,     /* <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   */
    <a href="ft2-type1_tables.html#PS_DICT_UNDERLINE_THICKNESS">PS_DICT_UNDERLINE_THICKNESS</a>,    /* <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  */
    <a href="ft2-type1_tables.html#PS_DICT_FS_TYPE">PS_DICT_FS_TYPE</a>,                /* <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  */
    <a href="ft2-type1_tables.html#PS_DICT_ITALIC_ANGLE">PS_DICT_ITALIC_ANGLE</a>,           /* <a href="ft2-basic_types.html#FT_Long">FT_Long</a>    */

    PS_DICT_MAX = <a href="ft2-type1_tables.html#PS_DICT_ITALIC_ANGLE">PS_DICT_ITALIC_ANGLE</a>

  } <b>PS_Dict_Keys</b>;
</pre>

<p>An enumeration used in calls to <a href="ft2-type1_tables.html#FT_Get_PS_Font_Value">FT_Get_PS_Font_Value</a> to identify the Type&nbsp;1 dictionary entry to retrieve.</p>

<h4>values</h4>
<table class="fields">
<tr><td class="val" id="PS_DICT_FONT_TYPE">PS_DICT_FONT_TYPE</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="PS_DICT_FONT_MATRIX">PS_DICT_FONT_MATRIX</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="PS_DICT_FONT_BBOX">PS_DICT_FONT_BBOX</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="PS_DICT_PAINT_TYPE">PS_DICT_PAINT_TYPE</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="PS_DICT_FONT_NAME">PS_DICT_FONT_NAME</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="PS_DICT_UNIQUE_ID">PS_DICT_UNIQUE_ID</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="PS_DICT_NUM_CHAR_STRINGS">PS_DICT_NUM_CHAR_STRINGS</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="PS_DICT_CHAR_STRING_KEY">PS_DICT_CHAR_STRING_KEY</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="PS_DICT_CHAR_STRING">PS_DICT_CHAR_STRING</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="PS_DICT_ENCODING_TYPE">PS_DICT_ENCODING_TYPE</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="PS_DICT_ENCODING_ENTRY">PS_DICT_ENCODING_ENTRY</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="PS_DICT_NUM_SUBRS">PS_DICT_NUM_SUBRS</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="PS_DICT_SUBR">PS_DICT_SUBR</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="PS_DICT_STD_HW">PS_DICT_STD_HW</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="PS_DICT_STD_VW">PS_DICT_STD_VW</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="PS_DICT_NUM_BLUE_VALUES">PS_DICT_NUM_BLUE_VALUES</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="PS_DICT_BLUE_VALUE">PS_DICT_BLUE_VALUE</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="PS_DICT_BLUE_FUZZ">PS_DICT_BLUE_FUZZ</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="PS_DICT_NUM_OTHER_BLUES">PS_DICT_NUM_OTHER_BLUES</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="PS_DICT_OTHER_BLUE">PS_DICT_OTHER_BLUE</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="PS_DICT_NUM_FAMILY_BLUES">PS_DICT_NUM_FAMILY_BLUES</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="PS_DICT_FAMILY_BLUE">PS_DICT_FAMILY_BLUE</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="PS_DICT_NUM_FAMILY_OTHER_BLUES">PS_DICT_NUM_FAMILY_OTHER_BLUES</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="PS_DICT_FAMILY_OTHER_BLUE">PS_DICT_FAMILY_OTHER_BLUE</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="PS_DICT_BLUE_SCALE">PS_DICT_BLUE_SCALE</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="PS_DICT_BLUE_SHIFT">PS_DICT_BLUE_SHIFT</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="PS_DICT_NUM_STEM_SNAP_H">PS_DICT_NUM_STEM_SNAP_H</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="PS_DICT_STEM_SNAP_H">PS_DICT_STEM_SNAP_H</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="PS_DICT_NUM_STEM_SNAP_V">PS_DICT_NUM_STEM_SNAP_V</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="PS_DICT_STEM_SNAP_V">PS_DICT_STEM_SNAP_V</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="PS_DICT_FORCE_BOLD">PS_DICT_FORCE_BOLD</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="PS_DICT_RND_STEM_UP">PS_DICT_RND_STEM_UP</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="PS_DICT_MIN_FEATURE">PS_DICT_MIN_FEATURE</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="PS_DICT_LEN_IV">PS_DICT_LEN_IV</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="PS_DICT_PASSWORD">PS_DICT_PASSWORD</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="PS_DICT_LANGUAGE_GROUP">PS_DICT_LANGUAGE_GROUP</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="PS_DICT_VERSION">PS_DICT_VERSION</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="PS_DICT_NOTICE">PS_DICT_NOTICE</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="PS_DICT_FULL_NAME">PS_DICT_FULL_NAME</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="PS_DICT_FAMILY_NAME">PS_DICT_FAMILY_NAME</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="PS_DICT_WEIGHT">PS_DICT_WEIGHT</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="PS_DICT_IS_FIXED_PITCH">PS_DICT_IS_FIXED_PITCH</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="PS_DICT_UNDERLINE_POSITION">PS_DICT_UNDERLINE_POSITION</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="PS_DICT_UNDERLINE_THICKNESS">PS_DICT_UNDERLINE_THICKNESS</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="PS_DICT_FS_TYPE">PS_DICT_FS_TYPE</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="PS_DICT_ITALIC_ANGLE">PS_DICT_ITALIC_ANGLE</td><td class="desc">
<p></p>
</td></tr>
</table>

<h4>since</h4>
<p>2.4.8</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="T1_FontInfo">T1_FontInfo</h3>
<p>Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).</p>
<pre>
  <span class="keyword">typedef</span> <a href="ft2-type1_tables.html#PS_FontInfoRec">PS_FontInfoRec</a>  <b>T1_FontInfo</b>;
</pre>

<p>This type is equivalent to <a href="ft2-type1_tables.html#PS_FontInfoRec">PS_FontInfoRec</a>. It is deprecated but kept to maintain source compatibility between various versions of FreeType.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="T1_Private">T1_Private</h3>
<p>Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).</p>
<pre>
  <span class="keyword">typedef</span> <a href="ft2-type1_tables.html#PS_PrivateRec">PS_PrivateRec</a>  <b>T1_Private</b>;
</pre>

<p>This type is equivalent to <a href="ft2-type1_tables.html#PS_PrivateRec">PS_PrivateRec</a>. It is deprecated but kept to maintain source compatibility between various versions of FreeType.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="CID_FontDict">CID_FontDict</h3>
<p>Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).</p>
<pre>
  <span class="keyword">typedef</span> <a href="ft2-type1_tables.html#CID_FaceDictRec">CID_FaceDictRec</a>  <b>CID_FontDict</b>;
</pre>

<p>This type is equivalent to <a href="ft2-type1_tables.html#CID_FaceDictRec">CID_FaceDictRec</a>. It is deprecated but kept to maintain source compatibility between various versions of FreeType.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="CID_Info">CID_Info</h3>
<p>Defined in FT_TYPE1_TABLES_H (freetype/t1tables.h).</p>
<pre>
  <span class="keyword">typedef</span> <a href="ft2-type1_tables.html#CID_FaceInfoRec">CID_FaceInfoRec</a>  <b>CID_Info</b>;
</pre>

<p>This type is equivalent to <a href="ft2-type1_tables.html#CID_FaceInfoRec">CID_FaceInfoRec</a>. It is deprecated but kept to maintain source compatibility between various versions of FreeType.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

</body>
</html>
reference/ft2-user_allocation.html000064400000010240151706766400013255 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF;
         width: 87%;
         margin: auto; }

  div.section { width: 75%;
                margin: auto; }
  div.section hr { margin: 4ex 0 1ex 0; }
  div.section h4 { background-color: #EEEEFF;
                   font-size: medium;
                   font-style: oblique;
                   font-weight: bold;
                   margin: 3ex 0 1.5ex 9%;
                   padding: 0.3ex 0 0.3ex 1%; }
  div.section p { margin: 1.5ex 0 1.5ex 10%; }
  div.section pre { margin: 3ex 0 3ex 9%;
                    background-color: #D6E8FF;
                    padding: 2ex 0 2ex 1%; }
  div.section table.fields { width: 90%;
                             margin: 1.5ex 0 1.5ex 10%; }
  div.section table.toc { width: 95%;
                          margin: 1.5ex 0 1.5ex 5%; }
  div.timestamp { text-align: center;
                  font-size: 69%;
                  margin: 1.5ex 0 1.5ex 0; }

  h1 { text-align: center; }
  h3 { font-size: medium;
       margin: 4ex 0 1.5ex 0; }

  p { text-align: justify; }

  pre.colored { color: blue; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  table.fields td.val { font-weight: bold;
                        text-align: right;
                        width: 30%;
                        vertical-align: baseline;
                        padding: 1ex 1em 1ex 0; }
  table.fields td.desc { vertical-align: baseline;
                         padding: 1ex 0 1ex 1em; }
  table.fields td.desc p:first-child { margin: 0; }
  table.fields td.desc p { margin: 1.5ex 0 0 0; }
  table.index { margin: 6ex auto 6ex auto;
                border: 0;
                border-collapse: separate;
                border-spacing: 1em 0.3ex; }
  table.index tr { padding: 0; }
  table.index td { padding: 0; }
  table.index-toc-link { width: 100%;
                         border: 0;
                         border-spacing: 0;
                         margin: 1ex 0 1ex 0; }
  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
                                 font-size: 83%;
                                 text-align: left; }
  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
                                   font-size: 83%;
                                   text-align: center; }
  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
                                  font-size: 83%;
                                  text-align: right; }
  table.synopsis { margin: 6ex auto 6ex auto;
                   border: 0;
                   border-collapse: separate;
                   border-spacing: 2em 0.6ex; }
  table.synopsis tr { padding: 0; }
  table.synopsis td { padding: 0; }
  table.toc td.link { width: 30%;
                      text-align: right;
                      vertical-align: baseline;
                      padding: 1ex 1em 1ex 0; }
  table.toc td.desc { vertical-align: baseline;
                      padding: 1ex 0 1ex 1em;
                      text-align: left; }
  table.toc td.desc p:first-child { margin: 0;
                                    text-align: left; }
  table.toc td.desc p { margin: 1.5ex 0 0 0;
                        text-align: left; }

</style>
</head>
<body>

<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
<h1>FreeType-2.9.1 API Reference</h1>

<h1 id="user_allocation">User allocation</h1>

<p>FreeType assumes that structures allocated by the user and passed as arguments are zeroed out except for the actual data. In other words, it is recommended to use &lsquo;calloc&rsquo; (or variants of it) instead of &lsquo;malloc&rsquo; for allocation.</p>

</body>
</html>
reference/ft2-version.html000064400000023361151706766400011567 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF;
         width: 87%;
         margin: auto; }

  div.section { width: 75%;
                margin: auto; }
  div.section hr { margin: 4ex 0 1ex 0; }
  div.section h4 { background-color: #EEEEFF;
                   font-size: medium;
                   font-style: oblique;
                   font-weight: bold;
                   margin: 3ex 0 1.5ex 9%;
                   padding: 0.3ex 0 0.3ex 1%; }
  div.section p { margin: 1.5ex 0 1.5ex 10%; }
  div.section pre { margin: 3ex 0 3ex 9%;
                    background-color: #D6E8FF;
                    padding: 2ex 0 2ex 1%; }
  div.section table.fields { width: 90%;
                             margin: 1.5ex 0 1.5ex 10%; }
  div.section table.toc { width: 95%;
                          margin: 1.5ex 0 1.5ex 5%; }
  div.timestamp { text-align: center;
                  font-size: 69%;
                  margin: 1.5ex 0 1.5ex 0; }

  h1 { text-align: center; }
  h3 { font-size: medium;
       margin: 4ex 0 1.5ex 0; }

  p { text-align: justify; }

  pre.colored { color: blue; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  table.fields td.val { font-weight: bold;
                        text-align: right;
                        width: 30%;
                        vertical-align: baseline;
                        padding: 1ex 1em 1ex 0; }
  table.fields td.desc { vertical-align: baseline;
                         padding: 1ex 0 1ex 1em; }
  table.fields td.desc p:first-child { margin: 0; }
  table.fields td.desc p { margin: 1.5ex 0 0 0; }
  table.index { margin: 6ex auto 6ex auto;
                border: 0;
                border-collapse: separate;
                border-spacing: 1em 0.3ex; }
  table.index tr { padding: 0; }
  table.index td { padding: 0; }
  table.index-toc-link { width: 100%;
                         border: 0;
                         border-spacing: 0;
                         margin: 1ex 0 1ex 0; }
  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
                                 font-size: 83%;
                                 text-align: left; }
  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
                                   font-size: 83%;
                                   text-align: center; }
  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
                                  font-size: 83%;
                                  text-align: right; }
  table.synopsis { margin: 6ex auto 6ex auto;
                   border: 0;
                   border-collapse: separate;
                   border-spacing: 2em 0.6ex; }
  table.synopsis tr { padding: 0; }
  table.synopsis td { padding: 0; }
  table.toc td.link { width: 30%;
                      text-align: right;
                      vertical-align: baseline;
                      padding: 1ex 1em 1ex 0; }
  table.toc td.desc { vertical-align: baseline;
                      padding: 1ex 0 1ex 1em;
                      text-align: left; }
  table.toc td.desc p:first-child { margin: 0;
                                    text-align: left; }
  table.toc td.desc p { margin: 1.5ex 0 0 0;
                        text-align: left; }

</style>
</head>
<body>

<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
<h1>FreeType-2.9.1 API Reference</h1>

<h1 id="version">FreeType Version</h1>
<h2>Synopsis</h2>
<table class="synopsis">
<tr><td><a href="#FT_Library_Version">FT_Library_Version</a></td><td>&nbsp;</td></tr>
<tr><td>&nbsp;</td><td><a href="#FT_Face_CheckTrueTypePatents">FT_Face_CheckTrueTypePatents</a></td></tr>
<tr><td><a href="#FREETYPE_MAJOR">FREETYPE_MAJOR</a></td><td><a href="#FT_Face_SetUnpatentedHinting">FT_Face_SetUnpatentedHinting</a></td></tr>
<tr><td><a href="#FREETYPE_MINOR">FREETYPE_MINOR</a></td><td>&nbsp;</td></tr>
<tr><td><a href="#FREETYPE_PATCH">FREETYPE_PATCH</a></td><td><a href="#FREETYPE_XXX">FREETYPE_XXX</a></td></tr>
</table>


<p>Note that those functions and macros are of limited use because even a new release of FreeType with only documentation changes increases the version number.</p>

<div class="section">
<h3 id="FT_Library_Version">FT_Library_Version</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  FT_EXPORT( <span class="keyword">void</span> )
  <b>FT_Library_Version</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a>   library,
                      <a href="ft2-basic_types.html#FT_Int">FT_Int</a>      *amajor,
                      <a href="ft2-basic_types.html#FT_Int">FT_Int</a>      *aminor,
                      <a href="ft2-basic_types.html#FT_Int">FT_Int</a>      *apatch );
</pre>

<p>Return the version of the FreeType library being used. This is useful when dynamically linking to the library, since one cannot use the macros <a href="ft2-version.html#FREETYPE_XXX">FREETYPE_MAJOR</a>, <a href="ft2-version.html#FREETYPE_XXX">FREETYPE_MINOR</a>, and <a href="ft2-version.html#FREETYPE_XXX">FREETYPE_PATCH</a>.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="library">library</td><td class="desc">
<p>A source library handle.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="amajor">amajor</td><td class="desc">
<p>The major version number.</p>
</td></tr>
<tr><td class="val" id="aminor">aminor</td><td class="desc">
<p>The minor version number.</p>
</td></tr>
<tr><td class="val" id="apatch">apatch</td><td class="desc">
<p>The patch version number.</p>
</td></tr>
</table>

<h4>note</h4>
<p>The reason why this function takes a &lsquo;library&rsquo; argument is because certain programs implement library initialization in a custom way that doesn't use <a href="ft2-base_interface.html#FT_Init_FreeType">FT_Init_FreeType</a>.</p>
<p>In such cases, the library version might not be available before the library object has been created.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Face_CheckTrueTypePatents">FT_Face_CheckTrueTypePatents</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Bool">FT_Bool</a> )
  <b>FT_Face_CheckTrueTypePatents</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>  face );
</pre>

<p>Deprecated, does nothing.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A face handle.</p>
</td></tr>
</table>

<h4>return</h4>
<p>Always returns false.</p>

<h4>note</h4>
<p>Since May 2010, TrueType hinting is no longer patented.</p>

<h4>since</h4>
<p>2.3.5</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Face_SetUnpatentedHinting">FT_Face_SetUnpatentedHinting</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Bool">FT_Bool</a> )
  <b>FT_Face_SetUnpatentedHinting</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>  face,
                                <a href="ft2-basic_types.html#FT_Bool">FT_Bool</a>  value );
</pre>

<p>Deprecated, does nothing.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A face handle.</p>
</td></tr>
<tr><td class="val" id="value">value</td><td class="desc">
<p>New boolean setting.</p>
</td></tr>
</table>

<h4>return</h4>
<p>Always returns false.</p>

<h4>note</h4>
<p>Since May 2010, TrueType hinting is no longer patented.</p>

<h4>since</h4>
<p>2.3.5</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FREETYPE_XXX">FREETYPE_XXX</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
#define <a href="ft2-version.html#FREETYPE_MAJOR">FREETYPE_MAJOR</a>  2
#define <a href="ft2-version.html#FREETYPE_MINOR">FREETYPE_MINOR</a>  9
#define <a href="ft2-version.html#FREETYPE_PATCH">FREETYPE_PATCH</a>  1
</pre>

<p>These three macros identify the FreeType source code version. Use <a href="ft2-version.html#FT_Library_Version">FT_Library_Version</a> to access them at runtime.</p>

<h4>values</h4>
<table class="fields">
<tr><td class="val" id="FREETYPE_MAJOR">FREETYPE_MAJOR</td><td class="desc">
<p>The major version number.</p>
</td></tr>
<tr><td class="val" id="FREETYPE_MINOR">FREETYPE_MINOR</td><td class="desc">
<p>The minor version number.</p>
</td></tr>
<tr><td class="val" id="FREETYPE_PATCH">FREETYPE_PATCH</td><td class="desc">
<p>The patch level.</p>
</td></tr>
</table>

<h4>note</h4>
<p>The version number of FreeType if built as a dynamic link library with the &lsquo;libtool&rsquo; package is <i>not</i> controlled by these three macros.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

</body>
</html>
reference/ft2-winfnt_fonts.html000064400000037514151706766400012625 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF;
         width: 87%;
         margin: auto; }

  div.section { width: 75%;
                margin: auto; }
  div.section hr { margin: 4ex 0 1ex 0; }
  div.section h4 { background-color: #EEEEFF;
                   font-size: medium;
                   font-style: oblique;
                   font-weight: bold;
                   margin: 3ex 0 1.5ex 9%;
                   padding: 0.3ex 0 0.3ex 1%; }
  div.section p { margin: 1.5ex 0 1.5ex 10%; }
  div.section pre { margin: 3ex 0 3ex 9%;
                    background-color: #D6E8FF;
                    padding: 2ex 0 2ex 1%; }
  div.section table.fields { width: 90%;
                             margin: 1.5ex 0 1.5ex 10%; }
  div.section table.toc { width: 95%;
                          margin: 1.5ex 0 1.5ex 5%; }
  div.timestamp { text-align: center;
                  font-size: 69%;
                  margin: 1.5ex 0 1.5ex 0; }

  h1 { text-align: center; }
  h3 { font-size: medium;
       margin: 4ex 0 1.5ex 0; }

  p { text-align: justify; }

  pre.colored { color: blue; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  table.fields td.val { font-weight: bold;
                        text-align: right;
                        width: 30%;
                        vertical-align: baseline;
                        padding: 1ex 1em 1ex 0; }
  table.fields td.desc { vertical-align: baseline;
                         padding: 1ex 0 1ex 1em; }
  table.fields td.desc p:first-child { margin: 0; }
  table.fields td.desc p { margin: 1.5ex 0 0 0; }
  table.index { margin: 6ex auto 6ex auto;
                border: 0;
                border-collapse: separate;
                border-spacing: 1em 0.3ex; }
  table.index tr { padding: 0; }
  table.index td { padding: 0; }
  table.index-toc-link { width: 100%;
                         border: 0;
                         border-spacing: 0;
                         margin: 1ex 0 1ex 0; }
  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
                                 font-size: 83%;
                                 text-align: left; }
  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
                                   font-size: 83%;
                                   text-align: center; }
  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
                                  font-size: 83%;
                                  text-align: right; }
  table.synopsis { margin: 6ex auto 6ex auto;
                   border: 0;
                   border-collapse: separate;
                   border-spacing: 2em 0.6ex; }
  table.synopsis tr { padding: 0; }
  table.synopsis td { padding: 0; }
  table.toc td.link { width: 30%;
                      text-align: right;
                      vertical-align: baseline;
                      padding: 1ex 1em 1ex 0; }
  table.toc td.desc { vertical-align: baseline;
                      padding: 1ex 0 1ex 1em;
                      text-align: left; }
  table.toc td.desc p:first-child { margin: 0;
                                    text-align: left; }
  table.toc td.desc p { margin: 1.5ex 0 0 0;
                        text-align: left; }

</style>
</head>
<body>

<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
<h1>FreeType-2.9.1 API Reference</h1>

<h1 id="winfnt_fonts">Window FNT Files</h1>
<h2>Synopsis</h2>
<table class="synopsis">
<tr><td><a href="#FT_WinFNT_ID_XXX">FT_WinFNT_ID_XXX</a></td><td><a href="#FT_WinFNT_Header">FT_WinFNT_Header</a></td><td></td></tr>
<tr><td><a href="#FT_WinFNT_HeaderRec">FT_WinFNT_HeaderRec</a></td><td><a href="#FT_Get_WinFNT_Header">FT_Get_WinFNT_Header</a></td><td></td></tr>
</table>


<p>This section contains the declaration of Windows FNT specific functions.</p>

<div class="section">
<h3 id="FT_WinFNT_ID_XXX">FT_WinFNT_ID_XXX</h3>
<p>Defined in FT_WINFONTS_H (freetype/ftwinfnt.h).</p>
<pre>
#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_CP1252">FT_WinFNT_ID_CP1252</a>    0
#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_DEFAULT">FT_WinFNT_ID_DEFAULT</a>   1
#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_SYMBOL">FT_WinFNT_ID_SYMBOL</a>    2
#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_MAC">FT_WinFNT_ID_MAC</a>      77
#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_CP932">FT_WinFNT_ID_CP932</a>   128
#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_CP949">FT_WinFNT_ID_CP949</a>   129
#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_CP1361">FT_WinFNT_ID_CP1361</a>  130
#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_CP936">FT_WinFNT_ID_CP936</a>   134
#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_CP950">FT_WinFNT_ID_CP950</a>   136
#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_CP1253">FT_WinFNT_ID_CP1253</a>  161
#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_CP1254">FT_WinFNT_ID_CP1254</a>  162
#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_CP1258">FT_WinFNT_ID_CP1258</a>  163
#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_CP1255">FT_WinFNT_ID_CP1255</a>  177
#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_CP1256">FT_WinFNT_ID_CP1256</a>  178
#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_CP1257">FT_WinFNT_ID_CP1257</a>  186
#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_CP1251">FT_WinFNT_ID_CP1251</a>  204
#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_CP874">FT_WinFNT_ID_CP874</a>   222
#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_CP1250">FT_WinFNT_ID_CP1250</a>  238
#define <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_OEM">FT_WinFNT_ID_OEM</a>     255
</pre>

<p>A list of valid values for the &lsquo;charset&rsquo; byte in <a href="ft2-winfnt_fonts.html#FT_WinFNT_HeaderRec">FT_WinFNT_HeaderRec</a>. Exact mapping tables for the various cpXXXX encodings (except for cp1361) can be found at <a href="ftp://ftp.unicode.org/Public">ftp://ftp.unicode.org/Public</a> in the MAPPINGS/VENDORS/MICSFT/WINDOWS subdirectory. cp1361 is roughly a superset of MAPPINGS/OBSOLETE/EASTASIA/KSC/JOHAB.TXT.</p>

<h4>values</h4>
<table class="fields">
<tr><td class="val" id="FT_WinFNT_ID_DEFAULT">FT_WinFNT_ID_DEFAULT</td><td class="desc">
<p>This is used for font enumeration and font creation as a &lsquo;don't care&rsquo; value. Valid font files don't contain this value. When querying for information about the character set of the font that is currently selected into a specified device context, this return value (of the related Windows API) simply denotes failure.</p>
</td></tr>
<tr><td class="val" id="FT_WinFNT_ID_SYMBOL">FT_WinFNT_ID_SYMBOL</td><td class="desc">
<p>There is no known mapping table available.</p>
</td></tr>
<tr><td class="val" id="FT_WinFNT_ID_MAC">FT_WinFNT_ID_MAC</td><td class="desc">
<p>Mac Roman encoding.</p>
</td></tr>
<tr><td class="val" id="FT_WinFNT_ID_OEM">FT_WinFNT_ID_OEM</td><td class="desc">
<p>From Michael Poettgen &lt;michael@poettgen.de&gt;:</p>
<p>The &lsquo;Windows Font Mapping&rsquo; article says that FT_WinFNT_ID_OEM is used for the charset of vector fonts, like &lsquo;modern.fon&rsquo;, &lsquo;roman.fon&rsquo;, and &lsquo;script.fon&rsquo; on Windows.</p>
<p>The &lsquo;CreateFont&rsquo; documentation says: The FT_WinFNT_ID_OEM value specifies a character set that is operating-system dependent.</p>
<p>The &lsquo;IFIMETRICS&rsquo; documentation from the &lsquo;Windows Driver Development Kit&rsquo; says: This font supports an OEM-specific character set. The OEM character set is system dependent.</p>
<p>In general OEM, as opposed to ANSI (i.e., cp1252), denotes the second default codepage that most international versions of Windows have. It is one of the OEM codepages from</p>
<p><a href="https://msdn.microsoft.com/en-us/goglobal/bb964655">https://msdn.microsoft.com/en-us/goglobal/bb964655</a>,</p>
<p>and is used for the &lsquo;DOS boxes&rsquo;, to support legacy applications. A German Windows version for example usually uses ANSI codepage 1252 and OEM codepage 850.</p>
</td></tr>
<tr><td class="val" id="FT_WinFNT_ID_CP874">FT_WinFNT_ID_CP874</td><td class="desc">
<p>A superset of Thai TIS 620 and ISO 8859-11.</p>
</td></tr>
<tr><td class="val" id="FT_WinFNT_ID_CP932">FT_WinFNT_ID_CP932</td><td class="desc">
<p>A superset of Japanese Shift-JIS (with minor deviations).</p>
</td></tr>
<tr><td class="val" id="FT_WinFNT_ID_CP936">FT_WinFNT_ID_CP936</td><td class="desc">
<p>A superset of simplified Chinese GB 2312-1980 (with different ordering and minor deviations).</p>
</td></tr>
<tr><td class="val" id="FT_WinFNT_ID_CP949">FT_WinFNT_ID_CP949</td><td class="desc">
<p>A superset of Korean Hangul KS&nbsp;C 5601-1987 (with different ordering and minor deviations).</p>
</td></tr>
<tr><td class="val" id="FT_WinFNT_ID_CP950">FT_WinFNT_ID_CP950</td><td class="desc">
<p>A superset of traditional Chinese Big&nbsp;5 ETen (with different ordering and minor deviations).</p>
</td></tr>
<tr><td class="val" id="FT_WinFNT_ID_CP1250">FT_WinFNT_ID_CP1250</td><td class="desc">
<p>A superset of East European ISO 8859-2 (with slightly different ordering).</p>
</td></tr>
<tr><td class="val" id="FT_WinFNT_ID_CP1251">FT_WinFNT_ID_CP1251</td><td class="desc">
<p>A superset of Russian ISO 8859-5 (with different ordering).</p>
</td></tr>
<tr><td class="val" id="FT_WinFNT_ID_CP1252">FT_WinFNT_ID_CP1252</td><td class="desc">
<p>ANSI encoding. A superset of ISO 8859-1.</p>
</td></tr>
<tr><td class="val" id="FT_WinFNT_ID_CP1253">FT_WinFNT_ID_CP1253</td><td class="desc">
<p>A superset of Greek ISO 8859-7 (with minor modifications).</p>
</td></tr>
<tr><td class="val" id="FT_WinFNT_ID_CP1254">FT_WinFNT_ID_CP1254</td><td class="desc">
<p>A superset of Turkish ISO 8859-9.</p>
</td></tr>
<tr><td class="val" id="FT_WinFNT_ID_CP1255">FT_WinFNT_ID_CP1255</td><td class="desc">
<p>A superset of Hebrew ISO 8859-8 (with some modifications).</p>
</td></tr>
<tr><td class="val" id="FT_WinFNT_ID_CP1256">FT_WinFNT_ID_CP1256</td><td class="desc">
<p>A superset of Arabic ISO 8859-6 (with different ordering).</p>
</td></tr>
<tr><td class="val" id="FT_WinFNT_ID_CP1257">FT_WinFNT_ID_CP1257</td><td class="desc">
<p>A superset of Baltic ISO 8859-13 (with some deviations).</p>
</td></tr>
<tr><td class="val" id="FT_WinFNT_ID_CP1258">FT_WinFNT_ID_CP1258</td><td class="desc">
<p>For Vietnamese. This encoding doesn't cover all necessary characters.</p>
</td></tr>
<tr><td class="val" id="FT_WinFNT_ID_CP1361">FT_WinFNT_ID_CP1361</td><td class="desc">
<p>Korean (Johab).</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_WinFNT_HeaderRec">FT_WinFNT_HeaderRec</h3>
<p>Defined in FT_WINFONTS_H (freetype/ftwinfnt.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_WinFNT_HeaderRec_
  {
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  version;
    <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>   file_size;
    <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>    copyright[60];
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  file_type;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  nominal_point_size;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  vertical_resolution;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  horizontal_resolution;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  ascent;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  internal_leading;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  external_leading;
    <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>    italic;
    <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>    underline;
    <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>    strike_out;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  weight;
    <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>    charset;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  pixel_width;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  pixel_height;
    <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>    pitch_and_family;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  avg_width;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  max_width;
    <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>    first_char;
    <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>    last_char;
    <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>    default_char;
    <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>    break_char;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  bytes_per_row;
    <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>   device_offset;
    <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>   face_name_offset;
    <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>   bits_pointer;
    <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>   bits_offset;
    <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>    reserved;
    <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>   flags;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  A_space;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  B_space;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  C_space;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  color_table_offset;
    <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>   reserved1[4];

  } <b>FT_WinFNT_HeaderRec</b>;
</pre>

<p>Windows FNT Header info.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_WinFNT_Header">FT_WinFNT_Header</h3>
<p>Defined in FT_WINFONTS_H (freetype/ftwinfnt.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_WinFNT_HeaderRec_*  <b>FT_WinFNT_Header</b>;
</pre>

<p>A handle to an <a href="ft2-winfnt_fonts.html#FT_WinFNT_HeaderRec">FT_WinFNT_HeaderRec</a> structure.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Get_WinFNT_Header">FT_Get_WinFNT_Header</h3>
<p>Defined in FT_WINFONTS_H (freetype/ftwinfnt.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Get_WinFNT_Header</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>               face,
                        <a href="ft2-winfnt_fonts.html#FT_WinFNT_HeaderRec">FT_WinFNT_HeaderRec</a>  *aheader );
</pre>

<p>Retrieve a Windows FNT font info header.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the input face.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="aheader">aheader</td><td class="desc">
<p>The WinFNT header.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>This function only works with Windows FNT faces, returning an error otherwise.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

</body>
</html>
reference/README000064400000000277151706766400007404 0ustar00After saying `make refdoc' this directory contains the FreeType API
reference.  You need python to make this target.

This also works with Jam: Just type `jam refdoc' in the main directory.

reference/ft2-auto_hinter.html000064400000012062151706766400012417 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF;
         width: 87%;
         margin: auto; }

  div.section { width: 75%;
                margin: auto; }
  div.section hr { margin: 4ex 0 1ex 0; }
  div.section h4 { background-color: #EEEEFF;
                   font-size: medium;
                   font-style: oblique;
                   font-weight: bold;
                   margin: 3ex 0 1.5ex 9%;
                   padding: 0.3ex 0 0.3ex 1%; }
  div.section p { margin: 1.5ex 0 1.5ex 10%; }
  div.section pre { margin: 3ex 0 3ex 9%;
                    background-color: #D6E8FF;
                    padding: 2ex 0 2ex 1%; }
  div.section table.fields { width: 90%;
                             margin: 1.5ex 0 1.5ex 10%; }
  div.section table.toc { width: 95%;
                          margin: 1.5ex 0 1.5ex 5%; }
  div.timestamp { text-align: center;
                  font-size: 69%;
                  margin: 1.5ex 0 1.5ex 0; }

  h1 { text-align: center; }
  h3 { font-size: medium;
       margin: 4ex 0 1.5ex 0; }

  p { text-align: justify; }

  pre.colored { color: blue; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  table.fields td.val { font-weight: bold;
                        text-align: right;
                        width: 30%;
                        vertical-align: baseline;
                        padding: 1ex 1em 1ex 0; }
  table.fields td.desc { vertical-align: baseline;
                         padding: 1ex 0 1ex 1em; }
  table.fields td.desc p:first-child { margin: 0; }
  table.fields td.desc p { margin: 1.5ex 0 0 0; }
  table.index { margin: 6ex auto 6ex auto;
                border: 0;
                border-collapse: separate;
                border-spacing: 1em 0.3ex; }
  table.index tr { padding: 0; }
  table.index td { padding: 0; }
  table.index-toc-link { width: 100%;
                         border: 0;
                         border-spacing: 0;
                         margin: 1ex 0 1ex 0; }
  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
                                 font-size: 83%;
                                 text-align: left; }
  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
                                   font-size: 83%;
                                   text-align: center; }
  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
                                  font-size: 83%;
                                  text-align: right; }
  table.synopsis { margin: 6ex auto 6ex auto;
                   border: 0;
                   border-collapse: separate;
                   border-spacing: 2em 0.6ex; }
  table.synopsis tr { padding: 0; }
  table.synopsis td { padding: 0; }
  table.toc td.link { width: 30%;
                      text-align: right;
                      vertical-align: baseline;
                      padding: 1ex 1em 1ex 0; }
  table.toc td.desc { vertical-align: baseline;
                      padding: 1ex 0 1ex 1em;
                      text-align: left; }
  table.toc td.desc p:first-child { margin: 0;
                                    text-align: left; }
  table.toc td.desc p { margin: 1.5ex 0 0 0;
                        text-align: left; }

</style>
</head>
<body>

<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
<h1>FreeType-2.9.1 API Reference</h1>

<h1 id="auto_hinter">The auto-hinter</h1>

<p>While FreeType's auto-hinter doesn't expose API functions by itself, it is possible to control its behaviour with <a href="ft2-module_management.html#FT_Property_Set">FT_Property_Set</a> and <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a>. The following lists the available properties together with the necessary macros and structures.</p>
<p>Note that the auto-hinter's module name is &lsquo;autofitter&rsquo; for historical reasons.</p>
<p>Available properties are <a href="ft2-properties.html#increase-x-height">increase-x-height</a>, <a href="ft2-properties.html#no-stem-darkening">no-stem-darkening</a> (experimental), <a href="ft2-properties.html#darkening-parameters">darkening-parameters</a> (experimental), <a href="ft2-properties.html#warping">warping</a> (experimental), <a href="ft2-properties.html#glyph-to-script-map">glyph-to-script-map</a> (experimental), <a href="ft2-properties.html#fallback-script">fallback-script</a> (experimental), and <a href="ft2-properties.html#default-script">default-script</a> (experimental), as documented in the &lsquo;<a href="ft2-properties.html#properties">Driver properties</a>&rsquo; section.</p>

</body>
</html>
reference/ft2-base_interface.html000064400000627521151706766400013044 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF;
         width: 87%;
         margin: auto; }

  div.section { width: 75%;
                margin: auto; }
  div.section hr { margin: 4ex 0 1ex 0; }
  div.section h4 { background-color: #EEEEFF;
                   font-size: medium;
                   font-style: oblique;
                   font-weight: bold;
                   margin: 3ex 0 1.5ex 9%;
                   padding: 0.3ex 0 0.3ex 1%; }
  div.section p { margin: 1.5ex 0 1.5ex 10%; }
  div.section pre { margin: 3ex 0 3ex 9%;
                    background-color: #D6E8FF;
                    padding: 2ex 0 2ex 1%; }
  div.section table.fields { width: 90%;
                             margin: 1.5ex 0 1.5ex 10%; }
  div.section table.toc { width: 95%;
                          margin: 1.5ex 0 1.5ex 5%; }
  div.timestamp { text-align: center;
                  font-size: 69%;
                  margin: 1.5ex 0 1.5ex 0; }

  h1 { text-align: center; }
  h3 { font-size: medium;
       margin: 4ex 0 1.5ex 0; }

  p { text-align: justify; }

  pre.colored { color: blue; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  table.fields td.val { font-weight: bold;
                        text-align: right;
                        width: 30%;
                        vertical-align: baseline;
                        padding: 1ex 1em 1ex 0; }
  table.fields td.desc { vertical-align: baseline;
                         padding: 1ex 0 1ex 1em; }
  table.fields td.desc p:first-child { margin: 0; }
  table.fields td.desc p { margin: 1.5ex 0 0 0; }
  table.index { margin: 6ex auto 6ex auto;
                border: 0;
                border-collapse: separate;
                border-spacing: 1em 0.3ex; }
  table.index tr { padding: 0; }
  table.index td { padding: 0; }
  table.index-toc-link { width: 100%;
                         border: 0;
                         border-spacing: 0;
                         margin: 1ex 0 1ex 0; }
  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
                                 font-size: 83%;
                                 text-align: left; }
  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
                                   font-size: 83%;
                                   text-align: center; }
  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
                                  font-size: 83%;
                                  text-align: right; }
  table.synopsis { margin: 6ex auto 6ex auto;
                   border: 0;
                   border-collapse: separate;
                   border-spacing: 2em 0.6ex; }
  table.synopsis tr { padding: 0; }
  table.synopsis td { padding: 0; }
  table.toc td.link { width: 30%;
                      text-align: right;
                      vertical-align: baseline;
                      padding: 1ex 1em 1ex 0; }
  table.toc td.desc { vertical-align: baseline;
                      padding: 1ex 0 1ex 1em;
                      text-align: left; }
  table.toc td.desc p:first-child { margin: 0;
                                    text-align: left; }
  table.toc td.desc p { margin: 1.5ex 0 0 0;
                        text-align: left; }

</style>
</head>
<body>

<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
<h1>FreeType-2.9.1 API Reference</h1>

<h1 id="base_interface">Base Interface</h1>
<h2>Synopsis</h2>
<table class="synopsis">
<tr><td><a href="#FT_Library">FT_Library</a></td><td><a href="#FT_GlyphSlotRec">FT_GlyphSlotRec</a></td><td><a href="#FT_LOAD_NO_AUTOHINT">FT_LOAD_NO_AUTOHINT</a></td></tr>
<tr><td><a href="#FT_Face">FT_Face</a></td><td><a href="#FT_Glyph_Metrics">FT_Glyph_Metrics</a></td><td><a href="#FT_LOAD_COLOR">FT_LOAD_COLOR</a></td></tr>
<tr><td><a href="#FT_Size">FT_Size</a></td><td><a href="#FT_SubGlyph">FT_SubGlyph</a></td><td>&nbsp;</td></tr>
<tr><td><a href="#FT_GlyphSlot">FT_GlyphSlot</a></td><td>&nbsp;</td><td><a href="#FT_LOAD_VERTICAL_LAYOUT">FT_LOAD_VERTICAL_LAYOUT</a></td></tr>
<tr><td><a href="#FT_CharMap">FT_CharMap</a></td><td><a href="#FT_Bitmap_Size">FT_Bitmap_Size</a></td><td><a href="#FT_LOAD_IGNORE_TRANSFORM">FT_LOAD_IGNORE_TRANSFORM</a></td></tr>
<tr><td><a href="#FT_Encoding">FT_Encoding</a></td><td>&nbsp;</td><td><a href="#FT_LOAD_FORCE_AUTOHINT">FT_LOAD_FORCE_AUTOHINT</a></td></tr>
<tr><td><a href="#FT_ENC_TAG">FT_ENC_TAG</a></td><td><a href="#FT_Init_FreeType">FT_Init_FreeType</a></td><td><a href="#FT_LOAD_NO_RECURSE">FT_LOAD_NO_RECURSE</a></td></tr>
<tr><td>&nbsp;</td><td><a href="#FT_Done_FreeType">FT_Done_FreeType</a></td><td><a href="#FT_LOAD_PEDANTIC">FT_LOAD_PEDANTIC</a></td></tr>
<tr><td><a href="#FT_FaceRec">FT_FaceRec</a></td><td>&nbsp;</td><td>&nbsp;</td></tr>
<tr><td>&nbsp;</td><td><a href="#FT_New_Face">FT_New_Face</a></td><td><a href="#FT_LOAD_TARGET_NORMAL">FT_LOAD_TARGET_NORMAL</a></td></tr>
<tr><td><a href="#FT_FACE_FLAG_SCALABLE">FT_FACE_FLAG_SCALABLE</a></td><td><a href="#FT_Done_Face">FT_Done_Face</a></td><td><a href="#FT_LOAD_TARGET_LIGHT">FT_LOAD_TARGET_LIGHT</a></td></tr>
<tr><td><a href="#FT_FACE_FLAG_FIXED_SIZES">FT_FACE_FLAG_FIXED_SIZES</a></td><td><a href="#FT_Reference_Face">FT_Reference_Face</a></td><td><a href="#FT_LOAD_TARGET_MONO">FT_LOAD_TARGET_MONO</a></td></tr>
<tr><td><a href="#FT_FACE_FLAG_FIXED_WIDTH">FT_FACE_FLAG_FIXED_WIDTH</a></td><td><a href="#FT_New_Memory_Face">FT_New_Memory_Face</a></td><td><a href="#FT_LOAD_TARGET_LCD">FT_LOAD_TARGET_LCD</a></td></tr>
<tr><td><a href="#FT_FACE_FLAG_HORIZONTAL">FT_FACE_FLAG_HORIZONTAL</a></td><td><a href="#FT_Face_Properties">FT_Face_Properties</a></td><td><a href="#FT_LOAD_TARGET_LCD_V">FT_LOAD_TARGET_LCD_V</a></td></tr>
<tr><td><a href="#FT_FACE_FLAG_VERTICAL">FT_FACE_FLAG_VERTICAL</a></td><td><a href="#FT_Open_Face">FT_Open_Face</a></td><td>&nbsp;</td></tr>
<tr><td><a href="#FT_FACE_FLAG_COLOR">FT_FACE_FLAG_COLOR</a></td><td><a href="#FT_Open_Args">FT_Open_Args</a></td><td><a href="#FT_LOAD_TARGET_MODE">FT_LOAD_TARGET_MODE</a></td></tr>
<tr><td><a href="#FT_FACE_FLAG_SFNT">FT_FACE_FLAG_SFNT</a></td><td><a href="#FT_Parameter">FT_Parameter</a></td><td>&nbsp;</td></tr>
<tr><td><a href="#FT_FACE_FLAG_CID_KEYED">FT_FACE_FLAG_CID_KEYED</a></td><td><a href="#FT_Attach_File">FT_Attach_File</a></td><td><a href="#FT_Render_Glyph">FT_Render_Glyph</a></td></tr>
<tr><td><a href="#FT_FACE_FLAG_TRICKY">FT_FACE_FLAG_TRICKY</a></td><td><a href="#FT_Attach_Stream">FT_Attach_Stream</a></td><td><a href="#FT_Render_Mode">FT_Render_Mode</a></td></tr>
<tr><td><a href="#FT_FACE_FLAG_KERNING">FT_FACE_FLAG_KERNING</a></td><td>&nbsp;</td><td><a href="#FT_Get_Kerning">FT_Get_Kerning</a></td></tr>
<tr><td><a href="#FT_FACE_FLAG_MULTIPLE_MASTERS">FT_FACE_FLAG_MULTIPLE_MASTERS</a></td><td><a href="#FT_Set_Char_Size">FT_Set_Char_Size</a></td><td><a href="#FT_Kerning_Mode">FT_Kerning_Mode</a></td></tr>
<tr><td><a href="#FT_FACE_FLAG_VARIATION">FT_FACE_FLAG_VARIATION</a></td><td><a href="#FT_Set_Pixel_Sizes">FT_Set_Pixel_Sizes</a></td><td><a href="#FT_Get_Track_Kerning">FT_Get_Track_Kerning</a></td></tr>
<tr><td><a href="#FT_FACE_FLAG_GLYPH_NAMES">FT_FACE_FLAG_GLYPH_NAMES</a></td><td><a href="#FT_Request_Size">FT_Request_Size</a></td><td><a href="#FT_Get_Glyph_Name">FT_Get_Glyph_Name</a></td></tr>
<tr><td><a href="#FT_FACE_FLAG_EXTERNAL_STREAM">FT_FACE_FLAG_EXTERNAL_STREAM</a></td><td><a href="#FT_Select_Size">FT_Select_Size</a></td><td><a href="#FT_Get_Postscript_Name">FT_Get_Postscript_Name</a></td></tr>
<tr><td><a href="#FT_FACE_FLAG_HINTER">FT_FACE_FLAG_HINTER</a></td><td><a href="#FT_Size_Request_Type">FT_Size_Request_Type</a></td><td>&nbsp;</td></tr>
<tr><td>&nbsp;</td><td><a href="#FT_Size_RequestRec">FT_Size_RequestRec</a></td><td><a href="#FT_CharMapRec">FT_CharMapRec</a></td></tr>
<tr><td><a href="#FT_HAS_HORIZONTAL">FT_HAS_HORIZONTAL</a></td><td><a href="#FT_Size_Request">FT_Size_Request</a></td><td><a href="#FT_Select_Charmap">FT_Select_Charmap</a></td></tr>
<tr><td><a href="#FT_HAS_VERTICAL">FT_HAS_VERTICAL</a></td><td><a href="#FT_Set_Transform">FT_Set_Transform</a></td><td><a href="#FT_Set_Charmap">FT_Set_Charmap</a></td></tr>
<tr><td><a href="#FT_HAS_KERNING">FT_HAS_KERNING</a></td><td><a href="#FT_Load_Glyph">FT_Load_Glyph</a></td><td><a href="#FT_Get_Charmap_Index">FT_Get_Charmap_Index</a></td></tr>
<tr><td><a href="#FT_HAS_FIXED_SIZES">FT_HAS_FIXED_SIZES</a></td><td><a href="#FT_Get_Char_Index">FT_Get_Char_Index</a></td><td>&nbsp;</td></tr>
<tr><td><a href="#FT_HAS_GLYPH_NAMES">FT_HAS_GLYPH_NAMES</a></td><td><a href="#FT_Get_First_Char">FT_Get_First_Char</a></td><td><a href="#FT_Get_FSType_Flags">FT_Get_FSType_Flags</a></td></tr>
<tr><td><a href="#FT_HAS_COLOR">FT_HAS_COLOR</a></td><td><a href="#FT_Get_Next_Char">FT_Get_Next_Char</a></td><td><a href="#FT_Get_SubGlyph_Info">FT_Get_SubGlyph_Info</a></td></tr>
<tr><td><a href="#FT_HAS_MULTIPLE_MASTERS">FT_HAS_MULTIPLE_MASTERS</a></td><td><a href="#FT_Get_Name_Index">FT_Get_Name_Index</a></td><td>&nbsp;</td></tr>
<tr><td>&nbsp;</td><td><a href="#FT_Load_Char">FT_Load_Char</a></td><td><a href="#FT_Face_Internal">FT_Face_Internal</a></td></tr>
<tr><td><a href="#FT_IS_SFNT">FT_IS_SFNT</a></td><td>&nbsp;</td><td><a href="#FT_Size_Internal">FT_Size_Internal</a></td></tr>
<tr><td><a href="#FT_IS_SCALABLE">FT_IS_SCALABLE</a></td><td><a href="#FT_OPEN_MEMORY">FT_OPEN_MEMORY</a></td><td><a href="#FT_Slot_Internal">FT_Slot_Internal</a></td></tr>
<tr><td><a href="#FT_IS_FIXED_WIDTH">FT_IS_FIXED_WIDTH</a></td><td><a href="#FT_OPEN_STREAM">FT_OPEN_STREAM</a></td><td>&nbsp;</td></tr>
<tr><td><a href="#FT_IS_CID_KEYED">FT_IS_CID_KEYED</a></td><td><a href="#FT_OPEN_PATHNAME">FT_OPEN_PATHNAME</a></td><td><a href="#FT_FACE_FLAG_XXX">FT_FACE_FLAG_XXX</a></td></tr>
<tr><td><a href="#FT_IS_TRICKY">FT_IS_TRICKY</a></td><td><a href="#FT_OPEN_DRIVER">FT_OPEN_DRIVER</a></td><td><a href="#FT_STYLE_FLAG_XXX">FT_STYLE_FLAG_XXX</a></td></tr>
<tr><td><a href="#FT_IS_NAMED_INSTANCE">FT_IS_NAMED_INSTANCE</a></td><td><a href="#FT_OPEN_PARAMS">FT_OPEN_PARAMS</a></td><td><a href="#FT_OPEN_XXX">FT_OPEN_XXX</a></td></tr>
<tr><td><a href="#FT_IS_VARIATION">FT_IS_VARIATION</a></td><td>&nbsp;</td><td><a href="#FT_LOAD_XXX">FT_LOAD_XXX</a></td></tr>
<tr><td>&nbsp;</td><td><a href="#FT_LOAD_DEFAULT">FT_LOAD_DEFAULT</a></td><td><a href="#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_XXX</a></td></tr>
<tr><td><a href="#FT_STYLE_FLAG_BOLD">FT_STYLE_FLAG_BOLD</a></td><td><a href="#FT_LOAD_RENDER">FT_LOAD_RENDER</a></td><td><a href="#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_XXX</a></td></tr>
<tr><td><a href="#FT_STYLE_FLAG_ITALIC">FT_STYLE_FLAG_ITALIC</a></td><td><a href="#FT_LOAD_MONOCHROME">FT_LOAD_MONOCHROME</a></td><td><a href="#FT_FSTYPE_XXX">FT_FSTYPE_XXX</a></td></tr>
<tr><td>&nbsp;</td><td><a href="#FT_LOAD_LINEAR_DESIGN">FT_LOAD_LINEAR_DESIGN</a></td><td>&nbsp;</td></tr>
<tr><td><a href="#FT_SizeRec">FT_SizeRec</a></td><td><a href="#FT_LOAD_NO_SCALE">FT_LOAD_NO_SCALE</a></td><td><a href="#FT_HAS_FAST_GLYPHS">FT_HAS_FAST_GLYPHS</a></td></tr>
<tr><td><a href="#FT_Size_Metrics">FT_Size_Metrics</a></td><td><a href="#FT_LOAD_NO_HINTING">FT_LOAD_NO_HINTING</a></td><td></td></tr>
<tr><td>&nbsp;</td><td><a href="#FT_LOAD_NO_BITMAP">FT_LOAD_NO_BITMAP</a></td><td></td></tr>
</table>


<p>This section describes the most important public high-level API functions of FreeType&nbsp;2.</p>

<div class="section">
<h3 id="FT_Library">FT_Library</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_LibraryRec_  *<b>FT_Library</b>;
</pre>

<p>A handle to a FreeType library instance. Each &lsquo;library&rsquo; is completely independent from the others; it is the &lsquo;root&rsquo; of a set of objects like fonts, faces, sizes, etc.</p>
<p>It also embeds a memory manager (see <a href="ft2-system_interface.html#FT_Memory">FT_Memory</a>), as well as a scan-line converter object (see <a href="ft2-raster.html#FT_Raster">FT_Raster</a>).</p>
<p>In multi-threaded applications it is easiest to use one &lsquo;FT_Library&rsquo; object per thread. In case this is too cumbersome, a single &lsquo;FT_Library&rsquo; object across threads is possible also (since FreeType version 2.5.6), as long as a mutex lock is used around <a href="ft2-base_interface.html#FT_New_Face">FT_New_Face</a> and <a href="ft2-base_interface.html#FT_Done_Face">FT_Done_Face</a>.</p>

<h4>note</h4>
<p>Library objects are normally created by <a href="ft2-base_interface.html#FT_Init_FreeType">FT_Init_FreeType</a>, and destroyed with <a href="ft2-base_interface.html#FT_Done_FreeType">FT_Done_FreeType</a>. If you need reference-counting (cf. <a href="ft2-module_management.html#FT_Reference_Library">FT_Reference_Library</a>), use <a href="ft2-module_management.html#FT_New_Library">FT_New_Library</a> and <a href="ft2-module_management.html#FT_Done_Library">FT_Done_Library</a>.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Face">FT_Face</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_FaceRec_*  <b>FT_Face</b>;
</pre>

<p>A handle to a typographic face object. A face object models a given typeface, in a given style.</p>

<h4>note</h4>
<p>A face object also owns a single <a href="ft2-base_interface.html#FT_GlyphSlot">FT_GlyphSlot</a> object, as well as one or more <a href="ft2-base_interface.html#FT_Size">FT_Size</a> objects.</p>
<p>Use <a href="ft2-base_interface.html#FT_New_Face">FT_New_Face</a> or <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> to create a new face object from a given filepath or a custom input stream.</p>
<p>Use <a href="ft2-base_interface.html#FT_Done_Face">FT_Done_Face</a> to destroy it (along with its slot and sizes).</p>
<p>An &lsquo;FT_Face&rsquo; object can only be safely used from one thread at a time. Similarly, creation and destruction of &lsquo;FT_Face&rsquo; with the same <a href="ft2-base_interface.html#FT_Library">FT_Library</a> object can only be done from one thread at a time. On the other hand, functions like <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a> and its siblings are thread-safe and do not need the lock to be held as long as the same &lsquo;FT_Face&rsquo; object is not used from multiple threads at the same time.</p>

<h4>also</h4>
<p>See <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> for the publicly accessible fields of a given face object.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Size">FT_Size</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_SizeRec_*  <b>FT_Size</b>;
</pre>

<p>A handle to an object that models a face scaled to a given character size.</p>

<h4>note</h4>
<p>An <a href="ft2-base_interface.html#FT_Face">FT_Face</a> has one <i>active</i> <a href="ft2-base_interface.html#FT_Size">FT_Size</a> object that is used by functions like <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a> to determine the scaling transformation that in turn is used to load and hint glyphs and metrics.</p>
<p>You can use <a href="ft2-base_interface.html#FT_Set_Char_Size">FT_Set_Char_Size</a>, <a href="ft2-base_interface.html#FT_Set_Pixel_Sizes">FT_Set_Pixel_Sizes</a>, <a href="ft2-base_interface.html#FT_Request_Size">FT_Request_Size</a> or even <a href="ft2-base_interface.html#FT_Select_Size">FT_Select_Size</a> to change the content (i.e., the scaling values) of the active <a href="ft2-base_interface.html#FT_Size">FT_Size</a>.</p>
<p>You can use <a href="ft2-sizes_management.html#FT_New_Size">FT_New_Size</a> to create additional size objects for a given <a href="ft2-base_interface.html#FT_Face">FT_Face</a>, but they won't be used by other functions until you activate it through <a href="ft2-sizes_management.html#FT_Activate_Size">FT_Activate_Size</a>. Only one size can be activated at any given time per face.</p>

<h4>also</h4>
<p>See <a href="ft2-base_interface.html#FT_SizeRec">FT_SizeRec</a> for the publicly accessible fields of a given size object.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_GlyphSlot">FT_GlyphSlot</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_GlyphSlotRec_*  <b>FT_GlyphSlot</b>;
</pre>

<p>A handle to a given &lsquo;glyph slot&rsquo;. A slot is a container that can hold any of the glyphs contained in its parent face.</p>
<p>In other words, each time you call <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a> or <a href="ft2-base_interface.html#FT_Load_Char">FT_Load_Char</a>, the slot's content is erased by the new glyph data, i.e., the glyph's metrics, its image (bitmap or outline), and other control information.</p>

<h4>also</h4>
<p>See <a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a> for the publicly accessible glyph fields.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_CharMap">FT_CharMap</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_CharMapRec_*  <b>FT_CharMap</b>;
</pre>

<p>A handle to a character map (usually abbreviated to &lsquo;charmap&rsquo;). A charmap is used to translate character codes in a given encoding into glyph indexes for its parent's face. Some font formats may provide several charmaps per font.</p>
<p>Each face object owns zero or more charmaps, but only one of them can be &lsquo;active&rsquo;, providing the data used by <a href="ft2-base_interface.html#FT_Get_Char_Index">FT_Get_Char_Index</a> or <a href="ft2-base_interface.html#FT_Load_Char">FT_Load_Char</a>.</p>
<p>The list of available charmaps in a face is available through the &lsquo;face-&gt;num_charmaps&rsquo; and &lsquo;face-&gt;charmaps&rsquo; fields of <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a>.</p>
<p>The currently active charmap is available as &lsquo;face-&gt;charmap&rsquo;. You should call <a href="ft2-base_interface.html#FT_Set_Charmap">FT_Set_Charmap</a> to change it.</p>

<h4>note</h4>
<p>When a new face is created (either through <a href="ft2-base_interface.html#FT_New_Face">FT_New_Face</a> or <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a>), the library looks for a Unicode charmap within the list and automatically activates it. If there is no Unicode charmap, FreeType doesn't set an &lsquo;active&rsquo; charmap.</p>

<h4>also</h4>
<p>See <a href="ft2-base_interface.html#FT_CharMapRec">FT_CharMapRec</a> for the publicly accessible fields of a given character map.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Encoding">FT_Encoding</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">enum</span>  FT_Encoding_
  {
    <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_ENCODING_NONE">FT_ENCODING_NONE</a>, 0, 0, 0, 0 ),

    <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_ENCODING_MS_SYMBOL">FT_ENCODING_MS_SYMBOL</a>, 's', 'y', 'm', 'b' ),
    <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_ENCODING_UNICODE">FT_ENCODING_UNICODE</a>,   'u', 'n', 'i', 'c' ),

    <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_ENCODING_SJIS">FT_ENCODING_SJIS</a>,    's', 'j', 'i', 's' ),
    <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_ENCODING_PRC">FT_ENCODING_PRC</a>,     'g', 'b', ' ', ' ' ),
    <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_ENCODING_BIG5">FT_ENCODING_BIG5</a>,    'b', 'i', 'g', '5' ),
    <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_ENCODING_WANSUNG">FT_ENCODING_WANSUNG</a>, 'w', 'a', 'n', 's' ),
    <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_ENCODING_JOHAB">FT_ENCODING_JOHAB</a>,   'j', 'o', 'h', 'a' ),

    /* for backward compatibility */
    FT_ENCODING_GB2312     = <a href="ft2-base_interface.html#FT_ENCODING_PRC">FT_ENCODING_PRC</a>,
    <a href="ft2-base_interface.html#FT_ENCODING_MS_SJIS">FT_ENCODING_MS_SJIS</a>    = <a href="ft2-base_interface.html#FT_ENCODING_SJIS">FT_ENCODING_SJIS</a>,
    <a href="ft2-base_interface.html#FT_ENCODING_MS_GB2312">FT_ENCODING_MS_GB2312</a>  = <a href="ft2-base_interface.html#FT_ENCODING_PRC">FT_ENCODING_PRC</a>,
    <a href="ft2-base_interface.html#FT_ENCODING_MS_BIG5">FT_ENCODING_MS_BIG5</a>    = <a href="ft2-base_interface.html#FT_ENCODING_BIG5">FT_ENCODING_BIG5</a>,
    <a href="ft2-base_interface.html#FT_ENCODING_MS_WANSUNG">FT_ENCODING_MS_WANSUNG</a> = <a href="ft2-base_interface.html#FT_ENCODING_WANSUNG">FT_ENCODING_WANSUNG</a>,
    <a href="ft2-base_interface.html#FT_ENCODING_MS_JOHAB">FT_ENCODING_MS_JOHAB</a>   = <a href="ft2-base_interface.html#FT_ENCODING_JOHAB">FT_ENCODING_JOHAB</a>,

    <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_ENCODING_ADOBE_STANDARD">FT_ENCODING_ADOBE_STANDARD</a>, 'A', 'D', 'O', 'B' ),
    <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_ENCODING_ADOBE_EXPERT">FT_ENCODING_ADOBE_EXPERT</a>,   'A', 'D', 'B', 'E' ),
    <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_ENCODING_ADOBE_CUSTOM">FT_ENCODING_ADOBE_CUSTOM</a>,   'A', 'D', 'B', 'C' ),
    <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_ENCODING_ADOBE_LATIN_1">FT_ENCODING_ADOBE_LATIN_1</a>,  'l', 'a', 't', '1' ),

    <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_ENCODING_OLD_LATIN_2">FT_ENCODING_OLD_LATIN_2</a>, 'l', 'a', 't', '2' ),

    <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_ENCODING_APPLE_ROMAN">FT_ENCODING_APPLE_ROMAN</a>, 'a', 'r', 'm', 'n' )

  } <b>FT_Encoding</b>;


  /* these constants are deprecated; use the corresponding `<b>FT_Encoding</b>' */
  /* values instead                                                      */
#define ft_encoding_none            <a href="ft2-base_interface.html#FT_ENCODING_NONE">FT_ENCODING_NONE</a>
#define ft_encoding_unicode         <a href="ft2-base_interface.html#FT_ENCODING_UNICODE">FT_ENCODING_UNICODE</a>
#define ft_encoding_symbol          <a href="ft2-base_interface.html#FT_ENCODING_MS_SYMBOL">FT_ENCODING_MS_SYMBOL</a>
#define ft_encoding_latin_1         <a href="ft2-base_interface.html#FT_ENCODING_ADOBE_LATIN_1">FT_ENCODING_ADOBE_LATIN_1</a>
#define ft_encoding_latin_2         <a href="ft2-base_interface.html#FT_ENCODING_OLD_LATIN_2">FT_ENCODING_OLD_LATIN_2</a>
#define ft_encoding_sjis            <a href="ft2-base_interface.html#FT_ENCODING_SJIS">FT_ENCODING_SJIS</a>
#define ft_encoding_gb2312          <a href="ft2-base_interface.html#FT_ENCODING_PRC">FT_ENCODING_PRC</a>
#define ft_encoding_big5            <a href="ft2-base_interface.html#FT_ENCODING_BIG5">FT_ENCODING_BIG5</a>
#define ft_encoding_wansung         <a href="ft2-base_interface.html#FT_ENCODING_WANSUNG">FT_ENCODING_WANSUNG</a>
#define ft_encoding_johab           <a href="ft2-base_interface.html#FT_ENCODING_JOHAB">FT_ENCODING_JOHAB</a>

#define ft_encoding_adobe_standard  <a href="ft2-base_interface.html#FT_ENCODING_ADOBE_STANDARD">FT_ENCODING_ADOBE_STANDARD</a>
#define ft_encoding_adobe_expert    <a href="ft2-base_interface.html#FT_ENCODING_ADOBE_EXPERT">FT_ENCODING_ADOBE_EXPERT</a>
#define ft_encoding_adobe_custom    <a href="ft2-base_interface.html#FT_ENCODING_ADOBE_CUSTOM">FT_ENCODING_ADOBE_CUSTOM</a>
#define ft_encoding_apple_roman     <a href="ft2-base_interface.html#FT_ENCODING_APPLE_ROMAN">FT_ENCODING_APPLE_ROMAN</a>
</pre>

<p>An enumeration to specify character sets supported by charmaps. Used in the <a href="ft2-base_interface.html#FT_Select_Charmap">FT_Select_Charmap</a> API function.</p>

<h4>note</h4>
<p>Despite the name, this enumeration lists specific character repertories (i.e., charsets), and not text encoding methods (e.g., UTF-8, UTF-16, etc.).</p>
<p>Other encodings might be defined in the future.</p>

<h4>values</h4>
<table class="fields">
<tr><td class="val" id="FT_ENCODING_NONE">FT_ENCODING_NONE</td><td class="desc">
<p>The encoding value&nbsp;0 is reserved.</p>
</td></tr>
<tr><td class="val" id="FT_ENCODING_UNICODE">FT_ENCODING_UNICODE</td><td class="desc">
<p>The Unicode character set. This value covers all versions of the Unicode repertoire, including ASCII and Latin-1. Most fonts include a Unicode charmap, but not all of them.</p>
<p>For example, if you want to access Unicode value U+1F028 (and the font contains it), use value 0x1F028 as the input value for <a href="ft2-base_interface.html#FT_Get_Char_Index">FT_Get_Char_Index</a>.</p>
</td></tr>
<tr><td class="val" id="FT_ENCODING_MS_SYMBOL">FT_ENCODING_MS_SYMBOL</td><td class="desc">
<p>Microsoft Symbol encoding, used to encode mathematical symbols and wingdings. For more information, see &lsquo;<a href="https://www.microsoft.com/typography/otspec/recom.htm">https://www.microsoft.com/typography/otspec/recom.htm</a>&rsquo;, &lsquo;<a href="http://www.kostis.net/charsets/symbol.htm">http://www.kostis.net/charsets/symbol.htm</a>&rsquo;, and &lsquo;<a href="http://www.kostis.net/charsets/wingding.htm">http://www.kostis.net/charsets/wingding.htm</a>&rsquo;.</p>
<p>This encoding uses character codes from the PUA (Private Unicode Area) in the range U+F020-U+F0FF.</p>
</td></tr>
<tr><td class="val" id="FT_ENCODING_SJIS">FT_ENCODING_SJIS</td><td class="desc">
<p>Shift JIS encoding for Japanese. More info at &lsquo;<a href="https://en.wikipedia.org/wiki/Shift_JIS">https://en.wikipedia.org/wiki/Shift_JIS</a>&rsquo;. See note on multi-byte encodings below.</p>
</td></tr>
<tr><td class="val" id="FT_ENCODING_PRC">FT_ENCODING_PRC</td><td class="desc">
<p>Corresponds to encoding systems mainly for Simplified Chinese as used in People's Republic of China (PRC). The encoding layout is based on GB&nbsp;2312 and its supersets GBK and GB&nbsp;18030.</p>
</td></tr>
<tr><td class="val" id="FT_ENCODING_BIG5">FT_ENCODING_BIG5</td><td class="desc">
<p>Corresponds to an encoding system for Traditional Chinese as used in Taiwan and Hong Kong.</p>
</td></tr>
<tr><td class="val" id="FT_ENCODING_WANSUNG">FT_ENCODING_WANSUNG</td><td class="desc">
<p>Corresponds to the Korean encoding system known as Extended Wansung (MS Windows code page 949). For more information see &lsquo;<a href="https://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit949.txt">https://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit949.txt</a>&rsquo;.</p>
</td></tr>
<tr><td class="val" id="FT_ENCODING_JOHAB">FT_ENCODING_JOHAB</td><td class="desc">
<p>The Korean standard character set (KS&nbsp;C 5601-1992), which corresponds to MS Windows code page 1361. This character set includes all possible Hangul character combinations.</p>
</td></tr>
<tr><td class="val" id="FT_ENCODING_ADOBE_LATIN_1">FT_ENCODING_ADOBE_LATIN_1</td><td class="desc">
<p>Corresponds to a Latin-1 encoding as defined in a Type&nbsp;1 PostScript font. It is limited to 256 character codes.</p>
</td></tr>
<tr><td class="val" id="FT_ENCODING_ADOBE_STANDARD">FT_ENCODING_ADOBE_STANDARD</td><td class="desc">
<p>Adobe Standard encoding, as found in Type&nbsp;1, CFF, and OpenType/CFF fonts. It is limited to 256 character codes.</p>
</td></tr>
<tr><td class="val" id="FT_ENCODING_ADOBE_EXPERT">FT_ENCODING_ADOBE_EXPERT</td><td class="desc">
<p>Adobe Expert encoding, as found in Type&nbsp;1, CFF, and OpenType/CFF fonts. It is limited to 256 character codes.</p>
</td></tr>
<tr><td class="val" id="FT_ENCODING_ADOBE_CUSTOM">FT_ENCODING_ADOBE_CUSTOM</td><td class="desc">
<p>Corresponds to a custom encoding, as found in Type&nbsp;1, CFF, and OpenType/CFF fonts. It is limited to 256 character codes.</p>
</td></tr>
<tr><td class="val" id="FT_ENCODING_APPLE_ROMAN">FT_ENCODING_APPLE_ROMAN</td><td class="desc">
<p>Apple roman encoding. Many TrueType and OpenType fonts contain a charmap for this 8-bit encoding, since older versions of Mac OS are able to use it.</p>
</td></tr>
<tr><td class="val" id="FT_ENCODING_OLD_LATIN_2">FT_ENCODING_OLD_LATIN_2</td><td class="desc">
<p>This value is deprecated and was neither used nor reported by FreeType. Don't use or test for it.</p>
</td></tr>
<tr><td class="val" id="FT_ENCODING_MS_SJIS">FT_ENCODING_MS_SJIS</td><td class="desc">
<p>Same as FT_ENCODING_SJIS. Deprecated.</p>
</td></tr>
<tr><td class="val" id="FT_ENCODING_MS_GB2312">FT_ENCODING_MS_GB2312</td><td class="desc">
<p>Same as FT_ENCODING_PRC. Deprecated.</p>
</td></tr>
<tr><td class="val" id="FT_ENCODING_MS_BIG5">FT_ENCODING_MS_BIG5</td><td class="desc">
<p>Same as FT_ENCODING_BIG5. Deprecated.</p>
</td></tr>
<tr><td class="val" id="FT_ENCODING_MS_WANSUNG">FT_ENCODING_MS_WANSUNG</td><td class="desc">
<p>Same as FT_ENCODING_WANSUNG. Deprecated.</p>
</td></tr>
<tr><td class="val" id="FT_ENCODING_MS_JOHAB">FT_ENCODING_MS_JOHAB</td><td class="desc">
<p>Same as FT_ENCODING_JOHAB. Deprecated.</p>
</td></tr>
</table>

<h4>note</h4>
<p>By default, FreeType enables a Unicode charmap and tags it with FT_ENCODING_UNICODE when it is either provided or can be generated from PostScript glyph name dictionaries in the font file. All other encodings are considered legacy and tagged only if explicitly defined in the font file. Otherwise, FT_ENCODING_NONE is used.</p>
<p>FT_ENCODING_NONE is set by the BDF and PCF drivers if the charmap is neither Unicode nor ISO-8859-1 (otherwise it is set to FT_ENCODING_UNICODE). Use <a href="ft2-bdf_fonts.html#FT_Get_BDF_Charset_ID">FT_Get_BDF_Charset_ID</a> to find out which encoding is really present. If, for example, the &lsquo;cs_registry&rsquo; field is &lsquo;KOI8&rsquo; and the &lsquo;cs_encoding&rsquo; field is &lsquo;R&rsquo;, the font is encoded in KOI8-R.</p>
<p>FT_ENCODING_NONE is always set (with a single exception) by the winfonts driver. Use <a href="ft2-winfnt_fonts.html#FT_Get_WinFNT_Header">FT_Get_WinFNT_Header</a> and examine the &lsquo;charset&rsquo; field of the <a href="ft2-winfnt_fonts.html#FT_WinFNT_HeaderRec">FT_WinFNT_HeaderRec</a> structure to find out which encoding is really present. For example, <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1251</a> (204) means Windows code page 1251 (for Russian).</p>
<p>FT_ENCODING_NONE is set if &lsquo;platform_id&rsquo; is <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_MACINTOSH</a> and &lsquo;encoding_id&rsquo; is not &lsquo;TT_MAC_ID_ROMAN&rsquo; (otherwise it is set to FT_ENCODING_APPLE_ROMAN).</p>
<p>If &lsquo;platform_id&rsquo; is <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_MACINTOSH</a>, use the function <a href="ft2-truetype_tables.html#FT_Get_CMap_Language_ID">FT_Get_CMap_Language_ID</a> to query the Mac language ID that may be needed to be able to distinguish Apple encoding variants. See</p>
<p><a href="https://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/Readme.txt">https://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/Readme.txt</a></p>
<p>to get an idea how to do that. Basically, if the language ID is&nbsp;0, don't use it, otherwise subtract 1 from the language ID. Then examine &lsquo;encoding_id&rsquo;. If, for example, &lsquo;encoding_id&rsquo; is &lsquo;TT_MAC_ID_ROMAN&rsquo; and the language ID (minus&nbsp;1) is &lsquo;TT_MAC_LANGID_GREEK&rsquo;, it is the Greek encoding, not Roman. &lsquo;TT_MAC_ID_ARABIC&rsquo; with &lsquo;TT_MAC_LANGID_FARSI&rsquo; means the Farsi variant the Arabic encoding.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_ENC_TAG">FT_ENC_TAG</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
#ifndef <b>FT_ENC_TAG</b>
#define <b>FT_ENC_TAG</b>( value, a, b, c, d )         \
          value = ( ( (<a href="ft2-basic_types.html#FT_UInt32">FT_UInt32</a>)(a) &lt;&lt; 24 ) |  \
                    ( (<a href="ft2-basic_types.html#FT_UInt32">FT_UInt32</a>)(b) &lt;&lt; 16 ) |  \
                    ( (<a href="ft2-basic_types.html#FT_UInt32">FT_UInt32</a>)(c) &lt;&lt;  8 ) |  \
                      (<a href="ft2-basic_types.html#FT_UInt32">FT_UInt32</a>)(d)         )

#endif /* <b>FT_ENC_TAG</b> */
</pre>

<p>This macro converts four-letter tags into an unsigned long. It is used to define &lsquo;encoding&rsquo; identifiers (see <a href="ft2-base_interface.html#FT_Encoding">FT_Encoding</a>).</p>

<h4>note</h4>
<p>Since many 16-bit compilers don't like 32-bit enumerations, you should redefine this macro in case of problems to something like this:</p>
<pre class="colored">
  #define FT_ENC_TAG( value, a, b, c, d )  value
</pre>
<p>to get a simple enumeration without assigning special numbers.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_FaceRec">FT_FaceRec</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_FaceRec_
  {
    <a href="ft2-basic_types.html#FT_Long">FT_Long</a>           num_faces;
    <a href="ft2-basic_types.html#FT_Long">FT_Long</a>           face_index;

    <a href="ft2-basic_types.html#FT_Long">FT_Long</a>           face_flags;
    <a href="ft2-basic_types.html#FT_Long">FT_Long</a>           style_flags;

    <a href="ft2-basic_types.html#FT_Long">FT_Long</a>           num_glyphs;

    <a href="ft2-basic_types.html#FT_String">FT_String</a>*        family_name;
    <a href="ft2-basic_types.html#FT_String">FT_String</a>*        style_name;

    <a href="ft2-basic_types.html#FT_Int">FT_Int</a>            num_fixed_sizes;
    <a href="ft2-base_interface.html#FT_Bitmap_Size">FT_Bitmap_Size</a>*   available_sizes;

    <a href="ft2-basic_types.html#FT_Int">FT_Int</a>            num_charmaps;
    <a href="ft2-base_interface.html#FT_CharMap">FT_CharMap</a>*       charmaps;

    <a href="ft2-basic_types.html#FT_Generic">FT_Generic</a>        generic;

    /*# The following member variables (down to `underline_thickness') */
    /*# are only relevant to scalable outlines; cf. @<a href="ft2-base_interface.html#FT_Bitmap_Size">FT_Bitmap_Size</a>    */
    /*# for bitmap fonts.                                              */
    <a href="ft2-basic_types.html#FT_BBox">FT_BBox</a>           bbox;

    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>         units_per_EM;
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>          ascender;
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>          descender;
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>          height;

    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>          max_advance_width;
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>          max_advance_height;

    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>          underline_position;
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>          underline_thickness;

    <a href="ft2-base_interface.html#FT_GlyphSlot">FT_GlyphSlot</a>      glyph;
    <a href="ft2-base_interface.html#FT_Size">FT_Size</a>           size;
    <a href="ft2-base_interface.html#FT_CharMap">FT_CharMap</a>        charmap;

    /*@private begin */

    <a href="ft2-module_management.html#FT_Driver">FT_Driver</a>         driver;
    <a href="ft2-system_interface.html#FT_Memory">FT_Memory</a>         memory;
    <a href="ft2-system_interface.html#FT_Stream">FT_Stream</a>         stream;

    <a href="ft2-list_processing.html#FT_ListRec">FT_ListRec</a>        sizes_list;

    <a href="ft2-basic_types.html#FT_Generic">FT_Generic</a>        autohint;   /* face-specific auto-hinter data */
    <span class="keyword">void</span>*             extensions; /* unused                         */

    <a href="ft2-base_interface.html#FT_Face_Internal">FT_Face_Internal</a>  internal;

    /*@private end */

  } <b>FT_FaceRec</b>;
</pre>

<p>FreeType root face class structure. A face object models a typeface in a font file.</p>

<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="num_faces">num_faces</td><td class="desc">
<p>The number of faces in the font file. Some font formats can have multiple faces in a single font file.</p>
</td></tr>
<tr><td class="val" id="face_index">face_index</td><td class="desc">
<p>This field holds two different values. Bits 0-15 are the index of the face in the font file (starting with value&nbsp;0). They are set to&nbsp;0 if there is only one face in the font file.</p>
<p>[Since 2.6.1] Bits 16-30 are relevant to GX and OpenType variation fonts only, holding the named instance index for the current face index (starting with value&nbsp;1; value&nbsp;0 indicates font access without a named instance). For non-variation fonts, bits 16-30 are ignored. If we have the third named instance of face&nbsp;4, say, &lsquo;face_index&rsquo; is set to 0x00030004.</p>
<p>Bit 31 is always zero (this is, &lsquo;face_index&rsquo; is always a positive value).</p>
<p>[Since 2.9] Changing the design coordinates with <a href="ft2-multiple_masters.html#FT_Set_Var_Design_Coordinates">FT_Set_Var_Design_Coordinates</a> or <a href="ft2-multiple_masters.html#FT_Set_Var_Blend_Coordinates">FT_Set_Var_Blend_Coordinates</a> does not influence the named instance index value (only <a href="ft2-multiple_masters.html#FT_Set_Named_Instance">FT_Set_Named_Instance</a> does that).</p>
</td></tr>
<tr><td class="val" id="face_flags">face_flags</td><td class="desc">
<p>A set of bit flags that give important information about the face; see <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_XXX</a> for the details.</p>
</td></tr>
<tr><td class="val" id="style_flags">style_flags</td><td class="desc">
<p>The lower 16&nbsp;bits contain a set of bit flags indicating the style of the face; see <a href="ft2-base_interface.html#FT_STYLE_FLAG_XXX">FT_STYLE_FLAG_XXX</a> for the details.</p>
<p>[Since 2.6.1] Bits 16-30 hold the number of named instances available for the current face if we have a GX or OpenType variation (sub)font. Bit 31 is always zero (this is, &lsquo;style_flags&rsquo; is always a positive value). Note that a variation font has always at least one named instance, namely the default instance.</p>
</td></tr>
<tr><td class="val" id="num_glyphs">num_glyphs</td><td class="desc">
<p>The number of glyphs in the face. If the face is scalable and has sbits (see &lsquo;num_fixed_sizes&rsquo;), it is set to the number of outline glyphs.</p>
<p>For CID-keyed fonts (not in an SFNT wrapper) this value gives the highest CID used in the font.</p>
</td></tr>
<tr><td class="val" id="family_name">family_name</td><td class="desc">
<p>The face's family name. This is an ASCII string, usually in English, that describes the typeface's family (like &lsquo;Times New Roman&rsquo;, &lsquo;Bodoni&rsquo;, &lsquo;Garamond&rsquo;, etc). This is a least common denominator used to list fonts. Some formats (TrueType &amp; OpenType) provide localized and Unicode versions of this string. Applications should use the format specific interface to access them. Can be NULL (e.g., in fonts embedded in a PDF file).</p>
<p>In case the font doesn't provide a specific family name entry, FreeType tries to synthesize one, deriving it from other name entries.</p>
</td></tr>
<tr><td class="val" id="style_name">style_name</td><td class="desc">
<p>The face's style name. This is an ASCII string, usually in English, that describes the typeface's style (like &lsquo;Italic&rsquo;, &lsquo;Bold&rsquo;, &lsquo;Condensed&rsquo;, etc). Not all font formats provide a style name, so this field is optional, and can be set to NULL. As for &lsquo;family_name&rsquo;, some formats provide localized and Unicode versions of this string. Applications should use the format specific interface to access them.</p>
</td></tr>
<tr><td class="val" id="num_fixed_sizes">num_fixed_sizes</td><td class="desc">
<p>The number of bitmap strikes in the face. Even if the face is scalable, there might still be bitmap strikes, which are called &lsquo;sbits&rsquo; in that case.</p>
</td></tr>
<tr><td class="val" id="available_sizes">available_sizes</td><td class="desc">
<p>An array of <a href="ft2-base_interface.html#FT_Bitmap_Size">FT_Bitmap_Size</a> for all bitmap strikes in the face. It is set to NULL if there is no bitmap strike.</p>
<p>Note that FreeType tries to sanitize the strike data since they are sometimes sloppy or incorrect, but this can easily fail.</p>
</td></tr>
<tr><td class="val" id="num_charmaps">num_charmaps</td><td class="desc">
<p>The number of charmaps in the face.</p>
</td></tr>
<tr><td class="val" id="charmaps">charmaps</td><td class="desc">
<p>An array of the charmaps of the face.</p>
</td></tr>
<tr><td class="val" id="generic">generic</td><td class="desc">
<p>A field reserved for client uses. See the <a href="ft2-basic_types.html#FT_Generic">FT_Generic</a> type description.</p>
</td></tr>
<tr><td class="val" id="bbox">bbox</td><td class="desc">
<p>The font bounding box. Coordinates are expressed in font units (see &lsquo;units_per_EM&rsquo;). The box is large enough to contain any glyph from the font. Thus, &lsquo;bbox.yMax&rsquo; can be seen as the &lsquo;maximum ascender&rsquo;, and &lsquo;bbox.yMin&rsquo; as the &lsquo;minimum descender&rsquo;. Only relevant for scalable formats.</p>
<p>Note that the bounding box might be off by (at least) one pixel for hinted fonts. See <a href="ft2-base_interface.html#FT_Size_Metrics">FT_Size_Metrics</a> for further discussion.</p>
</td></tr>
<tr><td class="val" id="units_per_EM">units_per_EM</td><td class="desc">
<p>The number of font units per EM square for this face. This is typically 2048 for TrueType fonts, and 1000 for Type&nbsp;1 fonts. Only relevant for scalable formats.</p>
</td></tr>
<tr><td class="val" id="ascender">ascender</td><td class="desc">
<p>The typographic ascender of the face, expressed in font units. For font formats not having this information, it is set to &lsquo;bbox.yMax&rsquo;. Only relevant for scalable formats.</p>
</td></tr>
<tr><td class="val" id="descender">descender</td><td class="desc">
<p>The typographic descender of the face, expressed in font units. For font formats not having this information, it is set to &lsquo;bbox.yMin&rsquo;. Note that this field is negative for values below the baseline. Only relevant for scalable formats.</p>
</td></tr>
<tr><td class="val" id="height">height</td><td class="desc">
<p>This value is the vertical distance between two consecutive baselines, expressed in font units. It is always positive. Only relevant for scalable formats.</p>
<p>If you want the global glyph height, use &lsquo;ascender - descender&rsquo;.</p>
</td></tr>
<tr><td class="val" id="max_advance_width">max_advance_width</td><td class="desc">
<p>The maximum advance width, in font units, for all glyphs in this face. This can be used to make word wrapping computations faster. Only relevant for scalable formats.</p>
</td></tr>
<tr><td class="val" id="max_advance_height">max_advance_height</td><td class="desc">
<p>The maximum advance height, in font units, for all glyphs in this face. This is only relevant for vertical layouts, and is set to &lsquo;height&rsquo; for fonts that do not provide vertical metrics. Only relevant for scalable formats.</p>
</td></tr>
<tr><td class="val" id="underline_position">underline_position</td><td class="desc">
<p>The position, in font units, of the underline line for this face. It is the center of the underlining stem. Only relevant for scalable formats.</p>
</td></tr>
<tr><td class="val" id="underline_thickness">underline_thickness</td><td class="desc">
<p>The thickness, in font units, of the underline for this face. Only relevant for scalable formats.</p>
</td></tr>
<tr><td class="val" id="glyph">glyph</td><td class="desc">
<p>The face's associated glyph slot(s).</p>
</td></tr>
<tr><td class="val" id="size">size</td><td class="desc">
<p>The current active size for this face.</p>
</td></tr>
<tr><td class="val" id="charmap">charmap</td><td class="desc">
<p>The current active charmap for this face.</p>
</td></tr>
</table>

<h4>note</h4>
<p>Fields may be changed after a call to <a href="ft2-base_interface.html#FT_Attach_File">FT_Attach_File</a> or <a href="ft2-base_interface.html#FT_Attach_Stream">FT_Attach_Stream</a>.</p>
<p>For an OpenType variation font, the values of the following fields can change after a call to <a href="ft2-multiple_masters.html#FT_Set_Var_Design_Coordinates">FT_Set_Var_Design_Coordinates</a> (and friends) if the font contains an &lsquo;MVAR&rsquo; table: &lsquo;ascender&rsquo;, &lsquo;descender&rsquo;, &lsquo;height&rsquo;, &lsquo;underline_position&rsquo;, and &lsquo;underline_thickness&rsquo;.</p>
<p>Especially for TrueType fonts see also the documentation for <a href="ft2-base_interface.html#FT_Size_Metrics">FT_Size_Metrics</a>.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_HAS_HORIZONTAL">FT_HAS_HORIZONTAL</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
#define <b>FT_HAS_HORIZONTAL</b>( face ) \
          ( (face)-&gt;face_flags &amp; <a href="ft2-base_interface.html#FT_FACE_FLAG_HORIZONTAL">FT_FACE_FLAG_HORIZONTAL</a> )
</pre>

<p>A macro that returns true whenever a face object contains horizontal metrics (this is true for all font formats though).</p>

<h4>also</h4>
<p><a href="ft2-base_interface.html#FT_HAS_VERTICAL">FT_HAS_VERTICAL</a> can be used to check for vertical metrics.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_HAS_VERTICAL">FT_HAS_VERTICAL</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
#define <b>FT_HAS_VERTICAL</b>( face ) \
          ( (face)-&gt;face_flags &amp; <a href="ft2-base_interface.html#FT_FACE_FLAG_VERTICAL">FT_FACE_FLAG_VERTICAL</a> )
</pre>

<p>A macro that returns true whenever a face object contains real vertical metrics (and not only synthesized ones).</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_HAS_KERNING">FT_HAS_KERNING</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
#define <b>FT_HAS_KERNING</b>( face ) \
          ( (face)-&gt;face_flags &amp; <a href="ft2-base_interface.html#FT_FACE_FLAG_KERNING">FT_FACE_FLAG_KERNING</a> )
</pre>

<p>A macro that returns true whenever a face object contains kerning data that can be accessed with <a href="ft2-base_interface.html#FT_Get_Kerning">FT_Get_Kerning</a>.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_HAS_FIXED_SIZES">FT_HAS_FIXED_SIZES</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
#define <b>FT_HAS_FIXED_SIZES</b>( face ) \
          ( (face)-&gt;face_flags &amp; <a href="ft2-base_interface.html#FT_FACE_FLAG_FIXED_SIZES">FT_FACE_FLAG_FIXED_SIZES</a> )
</pre>

<p>A macro that returns true whenever a face object contains some embedded bitmaps. See the &lsquo;available_sizes&rsquo; field of the <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> structure.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_HAS_GLYPH_NAMES">FT_HAS_GLYPH_NAMES</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
#define <b>FT_HAS_GLYPH_NAMES</b>( face ) \
          ( (face)-&gt;face_flags &amp; <a href="ft2-base_interface.html#FT_FACE_FLAG_GLYPH_NAMES">FT_FACE_FLAG_GLYPH_NAMES</a> )
</pre>

<p>A macro that returns true whenever a face object contains some glyph names that can be accessed through <a href="ft2-base_interface.html#FT_Get_Glyph_Name">FT_Get_Glyph_Name</a>.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_HAS_COLOR">FT_HAS_COLOR</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
#define <b>FT_HAS_COLOR</b>( face ) \
          ( (face)-&gt;face_flags &amp; <a href="ft2-base_interface.html#FT_FACE_FLAG_COLOR">FT_FACE_FLAG_COLOR</a> )
</pre>

<p>A macro that returns true whenever a face object contains tables for color glyphs.</p>

<h4>since</h4>
<p>2.5.1</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_HAS_MULTIPLE_MASTERS">FT_HAS_MULTIPLE_MASTERS</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
#define <b>FT_HAS_MULTIPLE_MASTERS</b>( face ) \
          ( (face)-&gt;face_flags &amp; <a href="ft2-base_interface.html#FT_FACE_FLAG_MULTIPLE_MASTERS">FT_FACE_FLAG_MULTIPLE_MASTERS</a> )
</pre>

<p>A macro that returns true whenever a face object contains some multiple masters. The functions provided by <a href="ft2-header_file_macros.html#FT_MULTIPLE_MASTERS_H">FT_MULTIPLE_MASTERS_H</a> are then available to choose the exact design you want.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_IS_SFNT">FT_IS_SFNT</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
#define <b>FT_IS_SFNT</b>( face ) \
          ( (face)-&gt;face_flags &amp; <a href="ft2-base_interface.html#FT_FACE_FLAG_SFNT">FT_FACE_FLAG_SFNT</a> )
</pre>

<p>A macro that returns true whenever a face object contains a font whose format is based on the SFNT storage scheme. This usually means: TrueType fonts, OpenType fonts, as well as SFNT-based embedded bitmap fonts.</p>
<p>If this macro is true, all functions defined in <a href="ft2-header_file_macros.html#FT_SFNT_NAMES_H">FT_SFNT_NAMES_H</a> and <a href="ft2-header_file_macros.html#FT_TRUETYPE_TABLES_H">FT_TRUETYPE_TABLES_H</a> are available.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_IS_SCALABLE">FT_IS_SCALABLE</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
#define <b>FT_IS_SCALABLE</b>( face ) \
          ( (face)-&gt;face_flags &amp; <a href="ft2-base_interface.html#FT_FACE_FLAG_SCALABLE">FT_FACE_FLAG_SCALABLE</a> )
</pre>

<p>A macro that returns true whenever a face object contains a scalable font face (true for TrueType, Type&nbsp;1, Type&nbsp;42, CID, OpenType/CFF, and PFR font formats).</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_IS_FIXED_WIDTH">FT_IS_FIXED_WIDTH</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
#define <b>FT_IS_FIXED_WIDTH</b>( face ) \
          ( (face)-&gt;face_flags &amp; <a href="ft2-base_interface.html#FT_FACE_FLAG_FIXED_WIDTH">FT_FACE_FLAG_FIXED_WIDTH</a> )
</pre>

<p>A macro that returns true whenever a face object contains a font face that contains fixed-width (or &lsquo;monospace&rsquo;, &lsquo;fixed-pitch&rsquo;, etc.) glyphs.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_IS_CID_KEYED">FT_IS_CID_KEYED</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
#define <b>FT_IS_CID_KEYED</b>( face ) \
          ( (face)-&gt;face_flags &amp; <a href="ft2-base_interface.html#FT_FACE_FLAG_CID_KEYED">FT_FACE_FLAG_CID_KEYED</a> )
</pre>

<p>A macro that returns true whenever a face object contains a CID-keyed font. See the discussion of <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_CID_KEYED</a> for more details.</p>
<p>If this macro is true, all functions defined in <a href="ft2-header_file_macros.html#FT_CID_H">FT_CID_H</a> are available.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_IS_TRICKY">FT_IS_TRICKY</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
#define <b>FT_IS_TRICKY</b>( face ) \
          ( (face)-&gt;face_flags &amp; <a href="ft2-base_interface.html#FT_FACE_FLAG_TRICKY">FT_FACE_FLAG_TRICKY</a> )
</pre>

<p>A macro that returns true whenever a face represents a &lsquo;tricky&rsquo; font. See the discussion of <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_TRICKY</a> for more details.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_IS_NAMED_INSTANCE">FT_IS_NAMED_INSTANCE</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
#define <b>FT_IS_NAMED_INSTANCE</b>( face ) \
          ( (face)-&gt;face_index &amp; 0x7FFF0000L )
</pre>

<p>A macro that returns true whenever a face object is a named instance of a GX or OpenType variation font.</p>
<p>[Since 2.9] Changing the design coordinates with <a href="ft2-multiple_masters.html#FT_Set_Var_Design_Coordinates">FT_Set_Var_Design_Coordinates</a> or <a href="ft2-multiple_masters.html#FT_Set_Var_Blend_Coordinates">FT_Set_Var_Blend_Coordinates</a> does not influence the return value of this macro (only <a href="ft2-multiple_masters.html#FT_Set_Named_Instance">FT_Set_Named_Instance</a> does that).</p>

<h4>since</h4>
<p>2.7</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_IS_VARIATION">FT_IS_VARIATION</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
#define <b>FT_IS_VARIATION</b>( face ) \
          ( (face)-&gt;face_flags &amp; <a href="ft2-base_interface.html#FT_FACE_FLAG_VARIATION">FT_FACE_FLAG_VARIATION</a> )
</pre>

<p>A macro that returns true whenever a face object has been altered by <a href="ft2-multiple_masters.html#FT_Set_MM_Design_Coordinates">FT_Set_MM_Design_Coordinates</a>, <a href="ft2-multiple_masters.html#FT_Set_Var_Design_Coordinates">FT_Set_Var_Design_Coordinates</a>, or <a href="ft2-multiple_masters.html#FT_Set_Var_Blend_Coordinates">FT_Set_Var_Blend_Coordinates</a>.</p>

<h4>since</h4>
<p>2.9</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_SizeRec">FT_SizeRec</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_SizeRec_
  {
    <a href="ft2-base_interface.html#FT_Face">FT_Face</a>           face;      /* parent face object              */
    <a href="ft2-basic_types.html#FT_Generic">FT_Generic</a>        generic;   /* generic pointer for client uses */
    <a href="ft2-base_interface.html#FT_Size_Metrics">FT_Size_Metrics</a>   metrics;   /* size metrics                    */
    <a href="ft2-base_interface.html#FT_Size_Internal">FT_Size_Internal</a>  internal;

  } <b>FT_SizeRec</b>;
</pre>

<p>FreeType root size class structure. A size object models a face object at a given size.</p>

<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>Handle to the parent face object.</p>
</td></tr>
<tr><td class="val" id="generic">generic</td><td class="desc">
<p>A typeless pointer, unused by the FreeType library or any of its drivers. It can be used by client applications to link their own data to each size object.</p>
</td></tr>
<tr><td class="val" id="metrics">metrics</td><td class="desc">
<p>Metrics for this size object. This field is read-only.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Size_Metrics">FT_Size_Metrics</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_Size_Metrics_
  {
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  x_ppem;      /* horizontal pixels per EM               */
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  y_ppem;      /* vertical pixels per EM                 */

    <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>   x_scale;     /* scaling values used to convert font    */
    <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>   y_scale;     /* units to 26.6 fractional pixels        */

    <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a>     ascender;    /* ascender in 26.6 frac. pixels          */
    <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a>     descender;   /* descender in 26.6 frac. pixels         */
    <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a>     height;      /* text height in 26.6 frac. pixels       */
    <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a>     max_advance; /* max horizontal advance, in 26.6 pixels */

  } <b>FT_Size_Metrics</b>;
</pre>

<p>The size metrics structure gives the metrics of a size object.</p>

<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="x_ppem">x_ppem</td><td class="desc">
<p>The width of the scaled EM square in pixels, hence the term &lsquo;ppem&rsquo; (pixels per EM). It is also referred to as &lsquo;nominal width&rsquo;.</p>
</td></tr>
<tr><td class="val" id="y_ppem">y_ppem</td><td class="desc">
<p>The height of the scaled EM square in pixels, hence the term &lsquo;ppem&rsquo; (pixels per EM). It is also referred to as &lsquo;nominal height&rsquo;.</p>
</td></tr>
<tr><td class="val" id="x_scale">x_scale</td><td class="desc">
<p>A 16.16 fractional scaling value to convert horizontal metrics from font units to 26.6 fractional pixels. Only relevant for scalable font formats.</p>
</td></tr>
<tr><td class="val" id="y_scale">y_scale</td><td class="desc">
<p>A 16.16 fractional scaling value to convert vertical metrics from font units to 26.6 fractional pixels. Only relevant for scalable font formats.</p>
</td></tr>
<tr><td class="val" id="ascender">ascender</td><td class="desc">
<p>The ascender in 26.6 fractional pixels, rounded up to an integer value. See <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> for the details.</p>
</td></tr>
<tr><td class="val" id="descender">descender</td><td class="desc">
<p>The descender in 26.6 fractional pixels, rounded down to an integer value. See <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> for the details.</p>
</td></tr>
<tr><td class="val" id="height">height</td><td class="desc">
<p>The height in 26.6 fractional pixels, rounded to an integer value. See <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> for the details.</p>
</td></tr>
<tr><td class="val" id="max_advance">max_advance</td><td class="desc">
<p>The maximum advance width in 26.6 fractional pixels, rounded to an integer value. See <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> for the details.</p>
</td></tr>
</table>

<h4>note</h4>
<p>The scaling values, if relevant, are determined first during a size changing operation. The remaining fields are then set by the driver. For scalable formats, they are usually set to scaled values of the corresponding fields in <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a>. Some values like ascender or descender are rounded for historical reasons; more precise values (for outline fonts) can be derived by scaling the corresponding <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> values manually, with code similar to the following.</p>
<pre class="colored">
  scaled_ascender = FT_MulFix( face-&gt;ascender,
                               size_metrics-&gt;y_scale );
</pre>
<p>Note that due to glyph hinting and the selected rendering mode these values are usually not exact; consequently, they must be treated as unreliable with an error margin of at least one pixel!</p>
<p>Indeed, the only way to get the exact metrics is to render <i>all</i> glyphs. As this would be a definite performance hit, it is up to client applications to perform such computations.</p>
<p>The &lsquo;FT_Size_Metrics&rsquo; structure is valid for bitmap fonts also.</p>
<p><b>TrueType</b> <b>fonts</b> <b>with</b> <b>native</b> <b>bytecode</b> <b>hinting</b></p>
<p>All applications that handle TrueType fonts with native hinting must be aware that TTFs expect different rounding of vertical font dimensions. The application has to cater for this, especially if it wants to rely on a TTF's vertical data (for example, to properly align box characters vertically).</p>
<p>Only the application knows <i>in</i> <i>advance</i> that it is going to use native hinting for TTFs! FreeType, on the other hand, selects the hinting mode not at the time of creating an <a href="ft2-base_interface.html#FT_Size">FT_Size</a> object but much later, namely while calling <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a>.</p>
<p>Here is some pseudo code that illustrates a possible solution.</p>
<pre class="colored">
  font_format = FT_Get_Font_Format( face );

  if ( !strcmp( font_format, "TrueType" ) &amp;&amp;
       do_native_bytecode_hinting         )
  {
    ascender  = ROUND( FT_MulFix( face-&gt;ascender,
                                  size_metrics-&gt;y_scale ) );
    descender = ROUND( FT_MulFix( face-&gt;descender,
                                  size_metrics-&gt;y_scale ) );
  }
  else
  {
    ascender  = size_metrics-&gt;ascender;
    descender = size_metrics-&gt;descender;
  }

  height      = size_metrics-&gt;height;
  max_advance = size_metrics-&gt;max_advance;
</pre>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_GlyphSlotRec">FT_GlyphSlotRec</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_GlyphSlotRec_
  {
    <a href="ft2-base_interface.html#FT_Library">FT_Library</a>        library;
    <a href="ft2-base_interface.html#FT_Face">FT_Face</a>           face;
    <a href="ft2-base_interface.html#FT_GlyphSlot">FT_GlyphSlot</a>      next;
    <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>           reserved;       /* retained for binary compatibility */
    <a href="ft2-basic_types.html#FT_Generic">FT_Generic</a>        generic;

    <a href="ft2-base_interface.html#FT_Glyph_Metrics">FT_Glyph_Metrics</a>  metrics;
    <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>          linearHoriAdvance;
    <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>          linearVertAdvance;
    <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>         advance;

    <a href="ft2-basic_types.html#FT_Glyph_Format">FT_Glyph_Format</a>   format;

    <a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a>         bitmap;
    <a href="ft2-basic_types.html#FT_Int">FT_Int</a>            bitmap_left;
    <a href="ft2-basic_types.html#FT_Int">FT_Int</a>            bitmap_top;

    <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>        outline;

    <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>           num_subglyphs;
    <a href="ft2-base_interface.html#FT_SubGlyph">FT_SubGlyph</a>       subglyphs;

    <span class="keyword">void</span>*             control_data;
    <span class="keyword">long</span>              control_len;

    <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a>            lsb_delta;
    <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a>            rsb_delta;

    <span class="keyword">void</span>*             other;

    <a href="ft2-base_interface.html#FT_Slot_Internal">FT_Slot_Internal</a>  internal;

  } <b>FT_GlyphSlotRec</b>;
</pre>

<p>FreeType root glyph slot class structure. A glyph slot is a container where individual glyphs can be loaded, be they in outline or bitmap format.</p>

<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to the FreeType library instance this slot belongs to.</p>
</td></tr>
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the parent face object.</p>
</td></tr>
<tr><td class="val" id="next">next</td><td class="desc">
<p>In some cases (like some font tools), several glyph slots per face object can be a good thing. As this is rare, the glyph slots are listed through a direct, single-linked list using its &lsquo;next&rsquo; field.</p>
</td></tr>
<tr><td class="val" id="generic">generic</td><td class="desc">
<p>A typeless pointer unused by the FreeType library or any of its drivers. It can be used by client applications to link their own data to each glyph slot object.</p>
</td></tr>
<tr><td class="val" id="metrics">metrics</td><td class="desc">
<p>The metrics of the last loaded glyph in the slot. The returned values depend on the last load flags (see the <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a> API function) and can be expressed either in 26.6 fractional pixels or font units.</p>
<p>Note that even when the glyph image is transformed, the metrics are not.</p>
</td></tr>
<tr><td class="val" id="linearHoriAdvance">linearHoriAdvance</td><td class="desc">
<p>The advance width of the unhinted glyph. Its value is expressed in 16.16 fractional pixels, unless <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_LINEAR_DESIGN</a> is set when loading the glyph. This field can be important to perform correct WYSIWYG layout. Only relevant for outline glyphs.</p>
</td></tr>
<tr><td class="val" id="linearVertAdvance">linearVertAdvance</td><td class="desc">
<p>The advance height of the unhinted glyph. Its value is expressed in 16.16 fractional pixels, unless <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_LINEAR_DESIGN</a> is set when loading the glyph. This field can be important to perform correct WYSIWYG layout. Only relevant for outline glyphs.</p>
</td></tr>
<tr><td class="val" id="advance">advance</td><td class="desc">
<p>This shorthand is, depending on <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_IGNORE_TRANSFORM</a>, the transformed (hinted) advance width for the glyph, in 26.6 fractional pixel format. As specified with <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_VERTICAL_LAYOUT</a>, it uses either the &lsquo;horiAdvance&rsquo; or the &lsquo;vertAdvance&rsquo; value of &lsquo;metrics&rsquo; field.</p>
</td></tr>
<tr><td class="val" id="format">format</td><td class="desc">
<p>This field indicates the format of the image contained in the glyph slot. Typically <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_BITMAP</a>, <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_OUTLINE</a>, or <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_COMPOSITE</a>, but other values are possible.</p>
</td></tr>
<tr><td class="val" id="bitmap">bitmap</td><td class="desc">
<p>This field is used as a bitmap descriptor. Note that the address and content of the bitmap buffer can change between calls of <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a> and a few other functions.</p>
</td></tr>
<tr><td class="val" id="bitmap_left">bitmap_left</td><td class="desc">
<p>The bitmap's left bearing expressed in integer pixels.</p>
</td></tr>
<tr><td class="val" id="bitmap_top">bitmap_top</td><td class="desc">
<p>The bitmap's top bearing expressed in integer pixels. This is the distance from the baseline to the top-most glyph scanline, upwards y&nbsp;coordinates being <b>positive</b>.</p>
</td></tr>
<tr><td class="val" id="outline">outline</td><td class="desc">
<p>The outline descriptor for the current glyph image if its format is <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_OUTLINE</a>. Once a glyph is loaded, &lsquo;outline&rsquo; can be transformed, distorted, emboldened, etc. However, it must not be freed.</p>
</td></tr>
<tr><td class="val" id="num_subglyphs">num_subglyphs</td><td class="desc">
<p>The number of subglyphs in a composite glyph. This field is only valid for the composite glyph format that should normally only be loaded with the <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_RECURSE</a> flag.</p>
</td></tr>
<tr><td class="val" id="subglyphs">subglyphs</td><td class="desc">
<p>An array of subglyph descriptors for composite glyphs. There are &lsquo;num_subglyphs&rsquo; elements in there. Currently internal to FreeType.</p>
</td></tr>
<tr><td class="val" id="control_data">control_data</td><td class="desc">
<p>Certain font drivers can also return the control data for a given glyph image (e.g. TrueType bytecode, Type&nbsp;1 charstrings, etc.). This field is a pointer to such data; it is currently internal to FreeType.</p>
</td></tr>
<tr><td class="val" id="control_len">control_len</td><td class="desc">
<p>This is the length in bytes of the control data. Currently internal to FreeType.</p>
</td></tr>
<tr><td class="val" id="other">other</td><td class="desc">
<p>Reserved.</p>
</td></tr>
<tr><td class="val" id="lsb_delta">lsb_delta</td><td class="desc">
<p>The difference between hinted and unhinted left side bearing while auto-hinting is active. Zero otherwise.</p>
</td></tr>
<tr><td class="val" id="rsb_delta">rsb_delta</td><td class="desc">
<p>The difference between hinted and unhinted right side bearing while auto-hinting is active. Zero otherwise.</p>
</td></tr>
</table>

<h4>note</h4>
<p>If <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a> is called with default flags (see <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_DEFAULT</a>) the glyph image is loaded in the glyph slot in its native format (e.g., an outline glyph for TrueType and Type&nbsp;1 formats). [Since 2.9] The prospective bitmap metrics are calculated according to <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_XXX</a> and other flags even for the outline glyph, even if <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_RENDER</a> is not set.</p>
<p>This image can later be converted into a bitmap by calling <a href="ft2-base_interface.html#FT_Render_Glyph">FT_Render_Glyph</a>. This function searches the current renderer for the native image's format, then invokes it.</p>
<p>The renderer is in charge of transforming the native image through the slot's face transformation fields, then converting it into a bitmap that is returned in &lsquo;slot-&gt;bitmap&rsquo;.</p>
<p>Note that &lsquo;slot-&gt;bitmap_left&rsquo; and &lsquo;slot-&gt;bitmap_top&rsquo; are also used to specify the position of the bitmap relative to the current pen position (e.g., coordinates (0,0) on the baseline). Of course, &lsquo;slot-&gt;format&rsquo; is also changed to <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_BITMAP</a>.</p>
<p>Here is a small pseudo code fragment that shows how to use &lsquo;lsb_delta&rsquo; and &lsquo;rsb_delta&rsquo; to do fractional positioning of glyphs:</p>
<pre class="colored">
  FT_GlyphSlot  slot     = face-&gt;glyph;
  FT_Pos        origin_x = 0;


  for all glyphs do
    &lt;load glyph with `FT_Load_Glyph'&gt;

    FT_Outline_Translate( slot-&gt;outline, origin_x &amp; 63, 0 );

    &lt;save glyph image, or render glyph, or ...&gt;

    &lt;compute kern between current and next glyph
     and add it to `origin_x'&gt;

    origin_x += slot-&gt;advance.x;
    origin_x += slot-&gt;rsb_delta - slot-&gt;lsb_delta;
  endfor
</pre>
<p>Here is another small pseudo code fragment that shows how to use &lsquo;lsb_delta&rsquo; and &lsquo;rsb_delta&rsquo; to improve integer positioning of glyphs:</p>
<pre class="colored">
  FT_GlyphSlot  slot           = face-&gt;glyph;
  FT_Pos        origin_x       = 0;
  FT_Pos        prev_rsb_delta = 0;


  for all glyphs do
    &lt;compute kern between current and previous glyph
     and add it to `origin_x'&gt;

    &lt;load glyph with `FT_Load_Glyph'&gt;

    if ( prev_rsb_delta - slot-&gt;lsb_delta &gt;  32 )
      origin_x -= 64;
    else if ( prev_rsb_delta - slot-&gt;lsb_delta &lt; -31 )
      origin_x += 64;

    prev_rsb_delta = slot-&gt;rsb_delta;

    &lt;save glyph image, or render glyph, or ...&gt;

    origin_x += slot-&gt;advance.x;
  endfor
</pre>
<p>If you use strong auto-hinting, you <b>must</b> apply these delta values! Otherwise you will experience far too large inter-glyph spacing at small rendering sizes in most cases. Note that it doesn't harm to use the above code for other hinting modes also, since the delta values are zero then.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Glyph_Metrics">FT_Glyph_Metrics</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_Glyph_Metrics_
  {
    <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a>  width;
    <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a>  height;

    <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a>  horiBearingX;
    <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a>  horiBearingY;
    <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a>  horiAdvance;

    <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a>  vertBearingX;
    <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a>  vertBearingY;
    <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a>  vertAdvance;

  } <b>FT_Glyph_Metrics</b>;
</pre>

<p>A structure to model the metrics of a single glyph. The values are expressed in 26.6 fractional pixel format; if the flag <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a> has been used while loading the glyph, values are expressed in font units instead.</p>

<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="width">width</td><td class="desc">
<p>The glyph's width.</p>
</td></tr>
<tr><td class="val" id="height">height</td><td class="desc">
<p>The glyph's height.</p>
</td></tr>
<tr><td class="val" id="horiBearingX">horiBearingX</td><td class="desc">
<p>Left side bearing for horizontal layout.</p>
</td></tr>
<tr><td class="val" id="horiBearingY">horiBearingY</td><td class="desc">
<p>Top side bearing for horizontal layout.</p>
</td></tr>
<tr><td class="val" id="horiAdvance">horiAdvance</td><td class="desc">
<p>Advance width for horizontal layout.</p>
</td></tr>
<tr><td class="val" id="vertBearingX">vertBearingX</td><td class="desc">
<p>Left side bearing for vertical layout.</p>
</td></tr>
<tr><td class="val" id="vertBearingY">vertBearingY</td><td class="desc">
<p>Top side bearing for vertical layout. Larger positive values mean further below the vertical glyph origin.</p>
</td></tr>
<tr><td class="val" id="vertAdvance">vertAdvance</td><td class="desc">
<p>Advance height for vertical layout. Positive values mean the glyph has a positive advance downward.</p>
</td></tr>
</table>

<h4>note</h4>
<p>If not disabled with <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_HINTING</a>, the values represent dimensions of the hinted glyph (in case hinting is applicable).</p>
<p>Stroking a glyph with an outside border does not increase &lsquo;horiAdvance&rsquo; or &lsquo;vertAdvance&rsquo;; you have to manually adjust these values to account for the added width and height.</p>
<p>FreeType doesn't use the &lsquo;VORG&rsquo; table data for CFF fonts because it doesn't have an interface to quickly retrieve the glyph height. The y&nbsp;coordinate of the vertical origin can be simply computed as &lsquo;vertBearingY + height&rsquo; after loading a glyph.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_SubGlyph">FT_SubGlyph</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_SubGlyphRec_*  <b>FT_SubGlyph</b>;
</pre>

<p>The subglyph structure is an internal object used to describe subglyphs (for example, in the case of composites).</p>

<h4>note</h4>
<p>The subglyph implementation is not part of the high-level API, hence the forward structure declaration.</p>
<p>You can however retrieve subglyph information with <a href="ft2-base_interface.html#FT_Get_SubGlyph_Info">FT_Get_SubGlyph_Info</a>.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Bitmap_Size">FT_Bitmap_Size</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_Bitmap_Size_
  {
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>  height;
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>  width;

    <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a>    size;

    <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a>    x_ppem;
    <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a>    y_ppem;

  } <b>FT_Bitmap_Size</b>;
</pre>

<p>This structure models the metrics of a bitmap strike (i.e., a set of glyphs for a given point size and resolution) in a bitmap font. It is used for the &lsquo;available_sizes&rsquo; field of <a href="ft2-base_interface.html#FT_Face">FT_Face</a>.</p>

<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="height">height</td><td class="desc">
<p>The vertical distance, in pixels, between two consecutive baselines. It is always positive.</p>
</td></tr>
<tr><td class="val" id="width">width</td><td class="desc">
<p>The average width, in pixels, of all glyphs in the strike.</p>
</td></tr>
<tr><td class="val" id="size">size</td><td class="desc">
<p>The nominal size of the strike in 26.6 fractional points. This field is not very useful.</p>
</td></tr>
<tr><td class="val" id="x_ppem">x_ppem</td><td class="desc">
<p>The horizontal ppem (nominal width) in 26.6 fractional pixels.</p>
</td></tr>
<tr><td class="val" id="y_ppem">y_ppem</td><td class="desc">
<p>The vertical ppem (nominal height) in 26.6 fractional pixels.</p>
</td></tr>
</table>

<h4>note</h4>
<p>Windows FNT: The nominal size given in a FNT font is not reliable. If the driver finds it incorrect, it sets &lsquo;size&rsquo; to some calculated values, and &lsquo;x_ppem&rsquo; and &lsquo;y_ppem&rsquo; to the pixel width and height given in the font, respectively.</p>
<p>TrueType embedded bitmaps: &lsquo;size&rsquo;, &lsquo;width&rsquo;, and &lsquo;height&rsquo; values are not contained in the bitmap strike itself. They are computed from the global font parameters.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Init_FreeType">FT_Init_FreeType</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Init_FreeType</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a>  *alibrary );
</pre>

<p>Initialize a new FreeType library object. The set of modules that are registered by this function is determined at build time.</p>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="alibrary">alibrary</td><td class="desc">
<p>A handle to a new library object.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>In case you want to provide your own memory allocating routines, use <a href="ft2-module_management.html#FT_New_Library">FT_New_Library</a> instead, followed by a call to <a href="ft2-module_management.html#FT_Add_Default_Modules">FT_Add_Default_Modules</a> (or a series of calls to <a href="ft2-module_management.html#FT_Add_Module">FT_Add_Module</a>) and <a href="ft2-module_management.html#FT_Set_Default_Properties">FT_Set_Default_Properties</a>.</p>
<p>See the documentation of <a href="ft2-base_interface.html#FT_Library">FT_Library</a> and <a href="ft2-base_interface.html#FT_Face">FT_Face</a> for multi-threading issues.</p>
<p>If you need reference-counting (cf. <a href="ft2-module_management.html#FT_Reference_Library">FT_Reference_Library</a>), use <a href="ft2-module_management.html#FT_New_Library">FT_New_Library</a> and <a href="ft2-module_management.html#FT_Done_Library">FT_Done_Library</a>.</p>
<p>If compilation option FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES is set, this function reads the &lsquo;FREETYPE_PROPERTIES&rsquo; environment variable to control driver properties. See section &lsquo;<a href="ft2-properties.html#properties">Driver properties</a>&rsquo; for more.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Done_FreeType">FT_Done_FreeType</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Done_FreeType</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a>  library );
</pre>

<p>Destroy a given FreeType library object and all of its children, including resources, drivers, faces, sizes, etc.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to the target library object.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_New_Face">FT_New_Face</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_New_Face</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a>   library,
               <span class="keyword">const</span> <span class="keyword">char</span>*  filepathname,
               <a href="ft2-basic_types.html#FT_Long">FT_Long</a>      face_index,
               <a href="ft2-base_interface.html#FT_Face">FT_Face</a>     *aface );
</pre>

<p>Call <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> to open a font by its pathname.</p>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to the library resource.</p>
</td></tr>
</table>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="pathname">pathname</td><td class="desc">
<p>A path to the font file.</p>
</td></tr>
<tr><td class="val" id="face_index">face_index</td><td class="desc">
<p>See <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> for a detailed description of this parameter.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="aface">aface</td><td class="desc">
<p>A handle to a new face object. If &lsquo;face_index&rsquo; is greater than or equal to zero, it must be non-NULL.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>Use <a href="ft2-base_interface.html#FT_Done_Face">FT_Done_Face</a> to destroy the created <a href="ft2-base_interface.html#FT_Face">FT_Face</a> object (along with its slot and sizes).</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Done_Face">FT_Done_Face</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Done_Face</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>  face );
</pre>

<p>Discard a given face object, as well as all of its child slots and sizes.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to a target face object.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>See the discussion of reference counters in the description of <a href="ft2-base_interface.html#FT_Reference_Face">FT_Reference_Face</a>.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Reference_Face">FT_Reference_Face</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Reference_Face</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>  face );
</pre>

<p>A counter gets initialized to&nbsp;1 at the time an <a href="ft2-base_interface.html#FT_Face">FT_Face</a> structure is created. This function increments the counter. <a href="ft2-base_interface.html#FT_Done_Face">FT_Done_Face</a> then only destroys a face if the counter is&nbsp;1, otherwise it simply decrements the counter.</p>
<p>This function helps in managing life-cycles of structures that reference <a href="ft2-base_interface.html#FT_Face">FT_Face</a> objects.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to a target face object.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>since</h4>
<p>2.4.2</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_New_Memory_Face">FT_New_Memory_Face</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_New_Memory_Face</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a>      library,
                      <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>*  file_base,
                      <a href="ft2-basic_types.html#FT_Long">FT_Long</a>         file_size,
                      <a href="ft2-basic_types.html#FT_Long">FT_Long</a>         face_index,
                      <a href="ft2-base_interface.html#FT_Face">FT_Face</a>        *aface );
</pre>

<p>Call <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> to open a font that has been loaded into memory.</p>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to the library resource.</p>
</td></tr>
</table>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="file_base">file_base</td><td class="desc">
<p>A pointer to the beginning of the font data.</p>
</td></tr>
<tr><td class="val" id="file_size">file_size</td><td class="desc">
<p>The size of the memory chunk used by the font data.</p>
</td></tr>
<tr><td class="val" id="face_index">face_index</td><td class="desc">
<p>See <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> for a detailed description of this parameter.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="aface">aface</td><td class="desc">
<p>A handle to a new face object. If &lsquo;face_index&rsquo; is greater than or equal to zero, it must be non-NULL.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>You must not deallocate the memory before calling <a href="ft2-base_interface.html#FT_Done_Face">FT_Done_Face</a>.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Face_Properties">FT_Face_Properties</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Face_Properties</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>        face,
                      <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>        num_properties,
                      <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a>*  properties );
</pre>

<p>Set or override certain (library or module-wide) properties on a face-by-face basis. Useful for finer-grained control and avoiding locks on shared structures (threads can modify their own faces as they see fit).</p>
<p>Contrary to <a href="ft2-module_management.html#FT_Property_Set">FT_Property_Set</a>, this function uses <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> so that you can pass multiple properties to the target face in one call. Note that only a subset of the available properties can be controlled.</p>
<p>* <a href="ft2-parameter_tags.html#FT_PARAM_TAG_STEM_DARKENING">FT_PARAM_TAG_STEM_DARKENING</a> (stem darkening, corresponding to the property &lsquo;no-stem-darkening&rsquo; provided by the &lsquo;autofit&rsquo;, &lsquo;cff&rsquo;, &lsquo;type1&rsquo;, and &lsquo;t1cid&rsquo; modules; see <a href="ft2-properties.html#no-stem-darkening">no-stem-darkening</a>).</p>
<p>* <a href="ft2-parameter_tags.html#FT_PARAM_TAG_LCD_FILTER_WEIGHTS">FT_PARAM_TAG_LCD_FILTER_WEIGHTS</a> (LCD filter weights, corresponding to function <a href="ft2-lcd_filtering.html#FT_Library_SetLcdFilterWeights">FT_Library_SetLcdFilterWeights</a>).</p>
<p>* <a href="ft2-parameter_tags.html#FT_PARAM_TAG_RANDOM_SEED">FT_PARAM_TAG_RANDOM_SEED</a> (seed value for the CFF, Type&nbsp;1, and CID &lsquo;random&rsquo; operator, corresponding to the &lsquo;random-seed&rsquo; property provided by the &lsquo;cff&rsquo;, &lsquo;type1&rsquo;, and &lsquo;t1cid&rsquo; modules; see <a href="ft2-properties.html#random-seed">random-seed</a>).</p>
<p>Pass NULL as &lsquo;data&rsquo; in <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> for a given tag to reset the option and use the library or module default again.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the source face object.</p>
</td></tr>
<tr><td class="val" id="num_properties">num_properties</td><td class="desc">
<p>The number of properties that follow.</p>
</td></tr>
<tr><td class="val" id="properties">properties</td><td class="desc">
<p>A handle to an <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> array with &lsquo;num_properties&rsquo; elements.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>Here an example that sets three properties. You must define FT_CONFIG_OPTION_SUBPIXEL_RENDERING to make the LCD filter examples work.</p>
<pre class="colored">
  FT_Parameter         property1;
  FT_Bool              darken_stems = 1;

  FT_Parameter         property2;
  FT_LcdFiveTapFilter  custom_weight =
                         { 0x11, 0x44, 0x56, 0x44, 0x11 };

  FT_Parameter         property3;
  FT_Int32             random_seed = 314159265;

  FT_Parameter         properties[3] = { property1,
                                         property2,
                                         property3 };


  property1.tag  = FT_PARAM_TAG_STEM_DARKENING;
  property1.data = &amp;darken_stems;

  property2.tag  = FT_PARAM_TAG_LCD_FILTER_WEIGHTS;
  property2.data = custom_weight;

  property3.tag  = FT_PARAM_TAG_RANDOM_SEED;
  property3.data = &amp;random_seed;

  FT_Face_Properties( face, 3, properties );
</pre>
<p>The next example resets a single property to its default value.</p>
<pre class="colored">
  FT_Parameter  property;


  property.tag  = FT_PARAM_TAG_LCD_FILTER_WEIGHTS;
  property.data = NULL;

  FT_Face_Properties( face, 1, &amp;property );
</pre>

<h4>since</h4>
<p>2.8</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Open_Face">FT_Open_Face</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Open_Face</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a>           library,
                <span class="keyword">const</span> <a href="ft2-base_interface.html#FT_Open_Args">FT_Open_Args</a>*  args,
                <a href="ft2-basic_types.html#FT_Long">FT_Long</a>              face_index,
                <a href="ft2-base_interface.html#FT_Face">FT_Face</a>             *aface );
</pre>

<p>Create a face object from a given resource described by <a href="ft2-base_interface.html#FT_Open_Args">FT_Open_Args</a>.</p>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to the library resource.</p>
</td></tr>
</table>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="args">args</td><td class="desc">
<p>A pointer to an &lsquo;FT_Open_Args&rsquo; structure that must be filled by the caller.</p>
</td></tr>
<tr><td class="val" id="face_index">face_index</td><td class="desc">
<p>This field holds two different values. Bits 0-15 are the index of the face in the font file (starting with value&nbsp;0). Set it to&nbsp;0 if there is only one face in the font file.</p>
<p>[Since 2.6.1] Bits 16-30 are relevant to GX and OpenType variation fonts only, specifying the named instance index for the current face index (starting with value&nbsp;1; value&nbsp;0 makes FreeType ignore named instances). For non-variation fonts, bits 16-30 are ignored. Assuming that you want to access the third named instance in face&nbsp;4, &lsquo;face_index&rsquo; should be set to 0x00030004. If you want to access face&nbsp;4 without variation handling, simply set &lsquo;face_index&rsquo; to value&nbsp;4.</p>
<p>&lsquo;FT_Open_Face&rsquo; and its siblings can be used to quickly check whether the font format of a given font resource is supported by FreeType. In general, if the &lsquo;face_index&rsquo; argument is negative, the function's return value is&nbsp;0 if the font format is recognized, or non-zero otherwise. The function allocates a more or less empty face handle in &lsquo;*aface&rsquo; (if &lsquo;aface&rsquo; isn't NULL); the only two useful fields in this special case are &lsquo;face-&gt;num_faces&rsquo; and &lsquo;face-&gt;style_flags&rsquo;. For any negative value of &lsquo;face_index&rsquo;, &lsquo;face-&gt;num_faces&rsquo; gives the number of faces within the font file. For the negative value &lsquo;-(N+1)&rsquo; (with &lsquo;N&rsquo; a non-negative 16-bit value), bits 16-30 in &lsquo;face-&gt;style_flags&rsquo; give the number of named instances in face &lsquo;N&rsquo; if we have a variation font (or zero otherwise). After examination, the returned <a href="ft2-base_interface.html#FT_Face">FT_Face</a> structure should be deallocated with a call to <a href="ft2-base_interface.html#FT_Done_Face">FT_Done_Face</a>.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="aface">aface</td><td class="desc">
<p>A handle to a new face object. If &lsquo;face_index&rsquo; is greater than or equal to zero, it must be non-NULL.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>Unlike FreeType 1.x, this function automatically creates a glyph slot for the face object that can be accessed directly through &lsquo;face-&gt;glyph&rsquo;.</p>
<p>Each new face object created with this function also owns a default <a href="ft2-base_interface.html#FT_Size">FT_Size</a> object, accessible as &lsquo;face-&gt;size&rsquo;.</p>
<p>One <a href="ft2-base_interface.html#FT_Library">FT_Library</a> instance can have multiple face objects, this is, <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> and its siblings can be called multiple times using the same &lsquo;library&rsquo; argument.</p>
<p>See the discussion of reference counters in the description of <a href="ft2-base_interface.html#FT_Reference_Face">FT_Reference_Face</a>.</p>
<p>To loop over all faces, use code similar to the following snippet (omitting the error handling).</p>
<pre class="colored">
  ...
  FT_Face  face;
  FT_Long  i, num_faces;


  error = FT_Open_Face( library, args, -1, &amp;face );
  if ( error ) { ... }

  num_faces = face-&gt;num_faces;
  FT_Done_Face( face );

  for ( i = 0; i &lt; num_faces; i++ )
  {
    ...
    error = FT_Open_Face( library, args, i, &amp;face );
    ...
    FT_Done_Face( face );
    ...
  }
</pre>
<p>To loop over all valid values for &lsquo;face_index&rsquo;, use something similar to the following snippet, again without error handling. The code accesses all faces immediately (thus only a single call of &lsquo;FT_Open_Face&rsquo; within the do-loop), with and without named instances.</p>
<pre class="colored">
  ...
  FT_Face  face;

  FT_Long  num_faces     = 0;
  FT_Long  num_instances = 0;

  FT_Long  face_idx     = 0;
  FT_Long  instance_idx = 0;


  do
  {
    FT_Long  id = ( instance_idx &lt;&lt; 16 ) + face_idx;


    error = FT_Open_Face( library, args, id, &amp;face );
    if ( error ) { ... }

    num_faces     = face-&gt;num_faces;
    num_instances = face-&gt;style_flags &gt;&gt; 16;

    ...

    FT_Done_Face( face );

    if ( instance_idx &lt; num_instances )
      instance_idx++;
    else
    {
      face_idx++;
      instance_idx = 0;
    }

  } while ( face_idx &lt; num_faces )
</pre>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Open_Args">FT_Open_Args</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_Open_Args_
  {
    <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>         flags;
    <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>*  memory_base;
    <a href="ft2-basic_types.html#FT_Long">FT_Long</a>         memory_size;
    <a href="ft2-basic_types.html#FT_String">FT_String</a>*      pathname;
    <a href="ft2-system_interface.html#FT_Stream">FT_Stream</a>       stream;
    <a href="ft2-module_management.html#FT_Module">FT_Module</a>       driver;
    <a href="ft2-basic_types.html#FT_Int">FT_Int</a>          num_params;
    <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a>*   params;

  } <b>FT_Open_Args</b>;
</pre>

<p>A structure to indicate how to open a new font file or stream. A pointer to such a structure can be used as a parameter for the functions <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> and <a href="ft2-base_interface.html#FT_Attach_Stream">FT_Attach_Stream</a>.</p>

<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="flags">flags</td><td class="desc">
<p>A set of bit flags indicating how to use the structure.</p>
</td></tr>
<tr><td class="val" id="memory_base">memory_base</td><td class="desc">
<p>The first byte of the file in memory.</p>
</td></tr>
<tr><td class="val" id="memory_size">memory_size</td><td class="desc">
<p>The size in bytes of the file in memory.</p>
</td></tr>
<tr><td class="val" id="pathname">pathname</td><td class="desc">
<p>A pointer to an 8-bit file pathname.</p>
</td></tr>
<tr><td class="val" id="stream">stream</td><td class="desc">
<p>A handle to a source stream object.</p>
</td></tr>
<tr><td class="val" id="driver">driver</td><td class="desc">
<p>This field is exclusively used by <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a>; it simply specifies the font driver to use for opening the face. If set to NULL, FreeType tries to load the face with each one of the drivers in its list.</p>
</td></tr>
<tr><td class="val" id="num_params">num_params</td><td class="desc">
<p>The number of extra parameters.</p>
</td></tr>
<tr><td class="val" id="params">params</td><td class="desc">
<p>Extra parameters passed to the font driver when opening a new face.</p>
</td></tr>
</table>

<h4>note</h4>
<p>The stream type is determined by the contents of &lsquo;flags&rsquo; that are tested in the following order by <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a>:</p>
<p>If the <a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_MEMORY</a> bit is set, assume that this is a memory file of &lsquo;memory_size&rsquo; bytes, located at &lsquo;memory_address&rsquo;. The data are not copied, and the client is responsible for releasing and destroying them <i>after</i> the corresponding call to <a href="ft2-base_interface.html#FT_Done_Face">FT_Done_Face</a>.</p>
<p>Otherwise, if the <a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_STREAM</a> bit is set, assume that a custom input stream &lsquo;stream&rsquo; is used.</p>
<p>Otherwise, if the <a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_PATHNAME</a> bit is set, assume that this is a normal file and use &lsquo;pathname&rsquo; to open it.</p>
<p>If the <a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_DRIVER</a> bit is set, <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> only tries to open the file with the driver whose handler is in &lsquo;driver&rsquo;.</p>
<p>If the <a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_PARAMS</a> bit is set, the parameters given by &lsquo;num_params&rsquo; and &lsquo;params&rsquo; is used. They are ignored otherwise.</p>
<p>Ideally, both the &lsquo;pathname&rsquo; and &lsquo;params&rsquo; fields should be tagged as &lsquo;const&rsquo;; this is missing for API backward compatibility. In other words, applications should treat them as read-only.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Parameter">FT_Parameter</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_Parameter_
  {
    <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>    tag;
    <a href="ft2-basic_types.html#FT_Pointer">FT_Pointer</a>  data;

  } <b>FT_Parameter</b>;
</pre>

<p>A simple structure to pass more or less generic parameters to <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> and <a href="ft2-base_interface.html#FT_Face_Properties">FT_Face_Properties</a>.</p>

<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="tag">tag</td><td class="desc">
<p>A four-byte identification tag.</p>
</td></tr>
<tr><td class="val" id="data">data</td><td class="desc">
<p>A pointer to the parameter data.</p>
</td></tr>
</table>

<h4>note</h4>
<p>The ID and function of parameters are driver-specific. See section &lsquo;<a href="ft2-parameter_tags.html#parameter_tags">Parameter Tags</a>&rsquo; for more information.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Attach_File">FT_Attach_File</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Attach_File</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>      face,
                  <span class="keyword">const</span> <span class="keyword">char</span>*  filepathname );
</pre>

<p>Call <a href="ft2-base_interface.html#FT_Attach_Stream">FT_Attach_Stream</a> to attach a file.</p>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>The target face object.</p>
</td></tr>
</table>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="filepathname">filepathname</td><td class="desc">
<p>The pathname.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Attach_Stream">FT_Attach_Stream</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Attach_Stream</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>        face,
                    <a href="ft2-base_interface.html#FT_Open_Args">FT_Open_Args</a>*  parameters );
</pre>

<p>&lsquo;Attach&rsquo; data to a face object. Normally, this is used to read additional information for the face object. For example, you can attach an AFM file that comes with a Type&nbsp;1 font to get the kerning values and other metrics.</p>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>The target face object.</p>
</td></tr>
</table>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="parameters">parameters</td><td class="desc">
<p>A pointer to <a href="ft2-base_interface.html#FT_Open_Args">FT_Open_Args</a> that must be filled by the caller.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>The meaning of the &lsquo;attach&rsquo; (i.e., what really happens when the new file is read) is not fixed by FreeType itself. It really depends on the font format (and thus the font driver).</p>
<p>Client applications are expected to know what they are doing when invoking this function. Most drivers simply do not implement file or stream attachments.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Set_Char_Size">FT_Set_Char_Size</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Set_Char_Size</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>     face,
                    <a href="ft2-basic_types.html#FT_F26Dot6">FT_F26Dot6</a>  char_width,
                    <a href="ft2-basic_types.html#FT_F26Dot6">FT_F26Dot6</a>  char_height,
                    <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>     horz_resolution,
                    <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>     vert_resolution );
</pre>

<p>Call <a href="ft2-base_interface.html#FT_Request_Size">FT_Request_Size</a> to request the nominal size (in points).</p>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to a target face object.</p>
</td></tr>
</table>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="char_width">char_width</td><td class="desc">
<p>The nominal width, in 26.6 fractional points.</p>
</td></tr>
<tr><td class="val" id="char_height">char_height</td><td class="desc">
<p>The nominal height, in 26.6 fractional points.</p>
</td></tr>
<tr><td class="val" id="horz_resolution">horz_resolution</td><td class="desc">
<p>The horizontal resolution in dpi.</p>
</td></tr>
<tr><td class="val" id="vert_resolution">vert_resolution</td><td class="desc">
<p>The vertical resolution in dpi.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>While this function allows fractional points as input values, the resulting ppem value for the given resolution is always rounded to the nearest integer.</p>
<p>If either the character width or height is zero, it is set equal to the other value.</p>
<p>If either the horizontal or vertical resolution is zero, it is set equal to the other value.</p>
<p>A character width or height smaller than 1pt is set to 1pt; if both resolution values are zero, they are set to 72dpi.</p>
<p>Don't use this function if you are using the FreeType cache API.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Set_Pixel_Sizes">FT_Set_Pixel_Sizes</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Set_Pixel_Sizes</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>  face,
                      <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>  pixel_width,
                      <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>  pixel_height );
</pre>

<p>Call <a href="ft2-base_interface.html#FT_Request_Size">FT_Request_Size</a> to request the nominal size (in pixels).</p>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the target face object.</p>
</td></tr>
</table>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="pixel_width">pixel_width</td><td class="desc">
<p>The nominal width, in pixels.</p>
</td></tr>
<tr><td class="val" id="pixel_height">pixel_height</td><td class="desc">
<p>The nominal height, in pixels.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>You should not rely on the resulting glyphs matching or being constrained to this pixel size. Refer to <a href="ft2-base_interface.html#FT_Request_Size">FT_Request_Size</a> to understand how requested sizes relate to actual sizes.</p>
<p>Don't use this function if you are using the FreeType cache API.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Request_Size">FT_Request_Size</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Request_Size</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>          face,
                   <a href="ft2-base_interface.html#FT_Size_Request">FT_Size_Request</a>  req );
</pre>

<p>Resize the scale of the active <a href="ft2-base_interface.html#FT_Size">FT_Size</a> object in a face.</p>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to a target face object.</p>
</td></tr>
</table>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="req">req</td><td class="desc">
<p>A pointer to a <a href="ft2-base_interface.html#FT_Size_RequestRec">FT_Size_RequestRec</a>.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>Although drivers may select the bitmap strike matching the request, you should not rely on this if you intend to select a particular bitmap strike. Use <a href="ft2-base_interface.html#FT_Select_Size">FT_Select_Size</a> instead in that case.</p>
<p>The relation between the requested size and the resulting glyph size is dependent entirely on how the size is defined in the source face. The font designer chooses the final size of each glyph relative to this size. For more information refer to &lsquo;<a href="https://www.freetype.org/freetype2/docs/glyphs/glyphs-2.html">https://www.freetype.org/freetype2/docs/glyphs/glyphs-2.html</a>&rsquo;.</p>
<p>Contrary to <a href="ft2-base_interface.html#FT_Set_Char_Size">FT_Set_Char_Size</a>, this function doesn't have special code to normalize zero-valued widths, heights, or resolutions (which lead to errors in most cases).</p>
<p>Don't use this function if you are using the FreeType cache API.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Select_Size">FT_Select_Size</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Select_Size</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>  face,
                  <a href="ft2-basic_types.html#FT_Int">FT_Int</a>   strike_index );
</pre>

<p>Select a bitmap strike. To be more precise, this function sets the scaling factors of the active <a href="ft2-base_interface.html#FT_Size">FT_Size</a> object in a face so that bitmaps from this particular strike are taken by <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a> and friends.</p>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to a target face object.</p>
</td></tr>
</table>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="strike_index">strike_index</td><td class="desc">
<p>The index of the bitmap strike in the &lsquo;available_sizes&rsquo; field of <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> structure.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>For bitmaps embedded in outline fonts it is common that only a subset of the available glyphs at a given ppem value is available. FreeType silently uses outlines if there is no bitmap for a given glyph index.</p>
<p>For GX and OpenType variation fonts, a bitmap strike makes sense only if the default instance is active (this is, no glyph variation takes place); otherwise, FreeType simply ignores bitmap strikes. The same is true for all named instances that are different from the default instance.</p>
<p>Don't use this function if you are using the FreeType cache API.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Size_Request_Type">FT_Size_Request_Type</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">enum</span>  FT_Size_Request_Type_
  {
    <a href="ft2-base_interface.html#FT_SIZE_REQUEST_TYPE_NOMINAL">FT_SIZE_REQUEST_TYPE_NOMINAL</a>,
    <a href="ft2-base_interface.html#FT_SIZE_REQUEST_TYPE_REAL_DIM">FT_SIZE_REQUEST_TYPE_REAL_DIM</a>,
    <a href="ft2-base_interface.html#FT_SIZE_REQUEST_TYPE_BBOX">FT_SIZE_REQUEST_TYPE_BBOX</a>,
    <a href="ft2-base_interface.html#FT_SIZE_REQUEST_TYPE_CELL">FT_SIZE_REQUEST_TYPE_CELL</a>,
    <a href="ft2-base_interface.html#FT_SIZE_REQUEST_TYPE_SCALES">FT_SIZE_REQUEST_TYPE_SCALES</a>,

    FT_SIZE_REQUEST_TYPE_MAX

  } <b>FT_Size_Request_Type</b>;
</pre>

<p>An enumeration type that lists the supported size request types, i.e., what input size (in font units) maps to the requested output size (in pixels, as computed from the arguments of <a href="ft2-base_interface.html#FT_Size_Request">FT_Size_Request</a>).</p>

<h4>values</h4>
<table class="fields">
<tr><td class="val" id="FT_SIZE_REQUEST_TYPE_NOMINAL">FT_SIZE_REQUEST_TYPE_NOMINAL</td><td class="desc">
<p>The nominal size. The &lsquo;units_per_EM&rsquo; field of <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> is used to determine both scaling values.</p>
<p>This is the standard scaling found in most applications. In particular, use this size request type for TrueType fonts if they provide optical scaling or something similar. Note, however, that &lsquo;units_per_EM&rsquo; is a rather abstract value which bears no relation to the actual size of the glyphs in a font.</p>
</td></tr>
<tr><td class="val" id="FT_SIZE_REQUEST_TYPE_REAL_DIM">FT_SIZE_REQUEST_TYPE_REAL_DIM</td><td class="desc">
<p>The real dimension. The sum of the &lsquo;ascender&rsquo; and (minus of) the &lsquo;descender&rsquo; fields of <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> is used to determine both scaling values.</p>
</td></tr>
<tr><td class="val" id="FT_SIZE_REQUEST_TYPE_BBOX">FT_SIZE_REQUEST_TYPE_BBOX</td><td class="desc">
<p>The font bounding box. The width and height of the &lsquo;bbox&rsquo; field of <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> are used to determine the horizontal and vertical scaling value, respectively.</p>
</td></tr>
<tr><td class="val" id="FT_SIZE_REQUEST_TYPE_CELL">FT_SIZE_REQUEST_TYPE_CELL</td><td class="desc">
<p>The &lsquo;max_advance_width&rsquo; field of <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> is used to determine the horizontal scaling value; the vertical scaling value is determined the same way as <a href="ft2-base_interface.html#FT_Size_Request_Type">FT_SIZE_REQUEST_TYPE_REAL_DIM</a> does. Finally, both scaling values are set to the smaller one. This type is useful if you want to specify the font size for, say, a window of a given dimension and 80x24 cells.</p>
</td></tr>
<tr><td class="val" id="FT_SIZE_REQUEST_TYPE_SCALES">FT_SIZE_REQUEST_TYPE_SCALES</td><td class="desc">
<p>Specify the scaling values directly.</p>
</td></tr>
</table>

<h4>note</h4>
<p>The above descriptions only apply to scalable formats. For bitmap formats, the behaviour is up to the driver.</p>
<p>See the note section of <a href="ft2-base_interface.html#FT_Size_Metrics">FT_Size_Metrics</a> if you wonder how size requesting relates to scaling values.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Size_RequestRec">FT_Size_RequestRec</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_Size_RequestRec_
  {
    <a href="ft2-base_interface.html#FT_Size_Request_Type">FT_Size_Request_Type</a>  type;
    <a href="ft2-basic_types.html#FT_Long">FT_Long</a>               width;
    <a href="ft2-basic_types.html#FT_Long">FT_Long</a>               height;
    <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>               horiResolution;
    <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>               vertResolution;

  } <b>FT_Size_RequestRec</b>;
</pre>

<p>A structure to model a size request.</p>

<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="type">type</td><td class="desc">
<p>See <a href="ft2-base_interface.html#FT_Size_Request_Type">FT_Size_Request_Type</a>.</p>
</td></tr>
<tr><td class="val" id="width">width</td><td class="desc">
<p>The desired width, given as a 26.6 fractional point value (with 72pt = 1in).</p>
</td></tr>
<tr><td class="val" id="height">height</td><td class="desc">
<p>The desired height, given as a 26.6 fractional point value (with 72pt = 1in).</p>
</td></tr>
<tr><td class="val" id="horiResolution">horiResolution</td><td class="desc">
<p>The horizontal resolution (dpi, i.e., pixels per inch). If set to zero, &lsquo;width&rsquo; is treated as a 26.6 fractional <b>pixel</b> value, which gets internally rounded to an integer.</p>
</td></tr>
<tr><td class="val" id="vertResolution">vertResolution</td><td class="desc">
<p>The vertical resolution (dpi, i.e., pixels per inch). If set to zero, &lsquo;height&rsquo; is treated as a 26.6 fractional <b>pixel</b> value, which gets internally rounded to an integer.</p>
</td></tr>
</table>

<h4>note</h4>
<p>If &lsquo;width&rsquo; is zero, the horizontal scaling value is set equal to the vertical scaling value, and vice versa.</p>
<p>If &lsquo;type&rsquo; is FT_SIZE_REQUEST_TYPE_SCALES, &lsquo;width&rsquo; and &lsquo;height&rsquo; are interpreted directly as 16.16 fractional scaling values, without any further modification, and both &lsquo;horiResolution&rsquo; and &lsquo;vertResolution&rsquo; are ignored.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Size_Request">FT_Size_Request</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Size_RequestRec_  *<b>FT_Size_Request</b>;
</pre>

<p>A handle to a size request structure.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Set_Transform">FT_Set_Transform</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  FT_EXPORT( <span class="keyword">void</span> )
  <b>FT_Set_Transform</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>     face,
                    <a href="ft2-basic_types.html#FT_Matrix">FT_Matrix</a>*  matrix,
                    <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>*  delta );
</pre>

<p>Set the transformation that is applied to glyph images when they are loaded into a glyph slot through <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a>.</p>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the source face object.</p>
</td></tr>
</table>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="matrix">matrix</td><td class="desc">
<p>A pointer to the transformation's 2x2 matrix. Use NULL for the identity matrix.</p>
</td></tr>
<tr><td class="val" id="delta">delta</td><td class="desc">
<p>A pointer to the translation vector. Use NULL for the null vector.</p>
</td></tr>
</table>

<h4>note</h4>
<p>The transformation is only applied to scalable image formats after the glyph has been loaded. It means that hinting is unaltered by the transformation and is performed on the character size given in the last call to <a href="ft2-base_interface.html#FT_Set_Char_Size">FT_Set_Char_Size</a> or <a href="ft2-base_interface.html#FT_Set_Pixel_Sizes">FT_Set_Pixel_Sizes</a>.</p>
<p>Note that this also transforms the &lsquo;face.glyph.advance&rsquo; field, but <b>not</b> the values in &lsquo;face.glyph.metrics&rsquo;.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Load_Glyph">FT_Load_Glyph</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Load_Glyph</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>   face,
                 <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>   glyph_index,
                 <a href="ft2-basic_types.html#FT_Int32">FT_Int32</a>  load_flags );
</pre>

<p>Load a glyph into the glyph slot of a face object.</p>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the target face object where the glyph is loaded.</p>
</td></tr>
</table>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="glyph_index">glyph_index</td><td class="desc">
<p>The index of the glyph in the font file. For CID-keyed fonts (either in PS or in CFF format) this argument specifies the CID value.</p>
</td></tr>
<tr><td class="val" id="load_flags">load_flags</td><td class="desc">
<p>A flag indicating what to load for this glyph. The <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_XXX</a> constants can be used to control the glyph loading process (e.g., whether the outline should be scaled, whether to load bitmaps or not, whether to hint the outline, etc).</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>The loaded glyph may be transformed. See <a href="ft2-base_interface.html#FT_Set_Transform">FT_Set_Transform</a> for the details.</p>
<p>For subsetted CID-keyed fonts, &lsquo;FT_Err_Invalid_Argument&rsquo; is returned for invalid CID values (this is, for CID values that don't have a corresponding glyph in the font). See the discussion of the <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_CID_KEYED</a> flag for more details.</p>
<p>If you receive &lsquo;FT_Err_Glyph_Too_Big&rsquo;, try getting the glyph outline at EM size, then scale it manually and fill it as a graphics operation.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Get_Char_Index">FT_Get_Char_Index</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> )
  <b>FT_Get_Char_Index</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>   face,
                     <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>  charcode );
</pre>

<p>Return the glyph index of a given character code. This function uses the currently selected charmap to do the mapping.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the source face object.</p>
</td></tr>
<tr><td class="val" id="charcode">charcode</td><td class="desc">
<p>The character code.</p>
</td></tr>
</table>

<h4>return</h4>
<p>The glyph index. 0&nbsp;means &lsquo;undefined character code&rsquo;.</p>

<h4>note</h4>
<p>If you use FreeType to manipulate the contents of font files directly, be aware that the glyph index returned by this function doesn't always correspond to the internal indices used within the file. This is done to ensure that value&nbsp;0 always corresponds to the &lsquo;missing glyph&rsquo;. If the first glyph is not named &lsquo;.notdef&rsquo;, then for Type&nbsp;1 and Type&nbsp;42 fonts, &lsquo;.notdef&rsquo; will be moved into the glyph ID&nbsp;0 position, and whatever was there will be moved to the position &lsquo;.notdef&rsquo; had. For Type&nbsp;1 fonts, if there is no &lsquo;.notdef&rsquo; glyph at all, then one will be created at index&nbsp;0 and whatever was there will be moved to the last index -- Type&nbsp;42 fonts are considered invalid under this condition.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Get_First_Char">FT_Get_First_Char</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a> )
  <b>FT_Get_First_Char</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>   face,
                     <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>  *agindex );
</pre>

<p>Return the first character code in the current charmap of a given face, together with its corresponding glyph index.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the source face object.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="agindex">agindex</td><td class="desc">
<p>Glyph index of first character code. 0&nbsp;if charmap is empty.</p>
</td></tr>
</table>

<h4>return</h4>
<p>The charmap's first character code.</p>

<h4>note</h4>
<p>You should use this function together with <a href="ft2-base_interface.html#FT_Get_Next_Char">FT_Get_Next_Char</a> to parse all character codes available in a given charmap. The code should look like this:</p>
<pre class="colored">
  FT_ULong  charcode;
  FT_UInt   gindex;


  charcode = FT_Get_First_Char( face, &amp;gindex );
  while ( gindex != 0 )
  {
    ... do something with (charcode,gindex) pair ...

    charcode = FT_Get_Next_Char( face, charcode, &amp;gindex );
  }
</pre>
<p>Be aware that character codes can have values up to 0xFFFFFFFF; this might happen for non-Unicode or malformed cmaps. However, even with regular Unicode encoding, so-called &lsquo;last resort fonts&rsquo; (using SFNT cmap format 13, see function <a href="ft2-truetype_tables.html#FT_Get_CMap_Format">FT_Get_CMap_Format</a>) normally have entries for all Unicode characters up to 0x1FFFFF, which can cause *a lot* of iterations.</p>
<p>Note that &lsquo;*agindex&rsquo; is set to&nbsp;0 if the charmap is empty. The result itself can be&nbsp;0 in two cases: if the charmap is empty or if the value&nbsp;0 is the first valid character code.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Get_Next_Char">FT_Get_Next_Char</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a> )
  <b>FT_Get_Next_Char</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>    face,
                    <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>   char_code,
                    <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>   *agindex );
</pre>

<p>Return the next character code in the current charmap of a given face following the value &lsquo;char_code&rsquo;, as well as the corresponding glyph index.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the source face object.</p>
</td></tr>
<tr><td class="val" id="char_code">char_code</td><td class="desc">
<p>The starting character code.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="agindex">agindex</td><td class="desc">
<p>Glyph index of next character code. 0&nbsp;if charmap is empty.</p>
</td></tr>
</table>

<h4>return</h4>
<p>The charmap's next character code.</p>

<h4>note</h4>
<p>You should use this function with <a href="ft2-base_interface.html#FT_Get_First_Char">FT_Get_First_Char</a> to walk over all character codes available in a given charmap. See the note for that function for a simple code example.</p>
<p>Note that &lsquo;*agindex&rsquo; is set to&nbsp;0 when there are no more codes in the charmap.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Get_Name_Index">FT_Get_Name_Index</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> )
  <b>FT_Get_Name_Index</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>     face,
                     <a href="ft2-basic_types.html#FT_String">FT_String</a>*  glyph_name );
</pre>

<p>Return the glyph index of a given glyph name.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the source face object.</p>
</td></tr>
<tr><td class="val" id="glyph_name">glyph_name</td><td class="desc">
<p>The glyph name.</p>
</td></tr>
</table>

<h4>return</h4>
<p>The glyph index. 0&nbsp;means &lsquo;undefined character code&rsquo;.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Load_Char">FT_Load_Char</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Load_Char</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>   face,
                <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>  char_code,
                <a href="ft2-basic_types.html#FT_Int32">FT_Int32</a>  load_flags );
</pre>

<p>Load a glyph into the glyph slot of a face object, accessed by its character code.</p>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to a target face object where the glyph is loaded.</p>
</td></tr>
</table>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="char_code">char_code</td><td class="desc">
<p>The glyph's character code, according to the current charmap used in the face.</p>
</td></tr>
<tr><td class="val" id="load_flags">load_flags</td><td class="desc">
<p>A flag indicating what to load for this glyph. The <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_XXX</a> constants can be used to control the glyph loading process (e.g., whether the outline should be scaled, whether to load bitmaps or not, whether to hint the outline, etc).</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>This function simply calls <a href="ft2-base_interface.html#FT_Get_Char_Index">FT_Get_Char_Index</a> and <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a>.</p>
<p>Many fonts contain glyphs that can't be loaded by this function since its glyph indices are not listed in any of the font's charmaps.</p>
<p>If no active cmap is set up (i.e., &lsquo;face-&gt;charmap&rsquo; is zero), the call to <a href="ft2-base_interface.html#FT_Get_Char_Index">FT_Get_Char_Index</a> is omitted, and the function behaves identically to <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a>.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_LOAD_TARGET_MODE">FT_LOAD_TARGET_MODE</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
#define <b>FT_LOAD_TARGET_MODE</b>( x )  ( (<a href="ft2-base_interface.html#FT_Render_Mode">FT_Render_Mode</a>)( ( (x) &gt;&gt; 16 ) &amp; 15 ) )
</pre>

<p>Return the <a href="ft2-base_interface.html#FT_Render_Mode">FT_Render_Mode</a> corresponding to a given <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_XXX</a> value.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Render_Glyph">FT_Render_Glyph</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Render_Glyph</b>( <a href="ft2-base_interface.html#FT_GlyphSlot">FT_GlyphSlot</a>    slot,
                   <a href="ft2-base_interface.html#FT_Render_Mode">FT_Render_Mode</a>  render_mode );
</pre>

<p>Convert a given glyph image to a bitmap. It does so by inspecting the glyph image format, finding the relevant renderer, and invoking it.</p>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="slot">slot</td><td class="desc">
<p>A handle to the glyph slot containing the image to convert.</p>
</td></tr>
</table>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="render_mode">render_mode</td><td class="desc">
<p>The render mode used to render the glyph image into a bitmap. See <a href="ft2-base_interface.html#FT_Render_Mode">FT_Render_Mode</a> for a list of possible values.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>To get meaningful results, font scaling values must be set with functions like <a href="ft2-base_interface.html#FT_Set_Char_Size">FT_Set_Char_Size</a> before calling &lsquo;FT_Render_Glyph&rsquo;.</p>
<p>When FreeType outputs a bitmap of a glyph, it really outputs an alpha coverage map. If a pixel is completely covered by a filled-in outline, the bitmap contains 0xFF at that pixel, meaning that 0xFF/0xFF fraction of that pixel is covered, meaning the pixel is 100% black (or 0% bright). If a pixel is only 50% covered (value 0x80), the pixel is made 50% black (50% bright or a middle shade of grey). 0% covered means 0% black (100% bright or white).</p>
<p>On high-DPI screens like on smartphones and tablets, the pixels are so small that their chance of being completely covered and therefore completely black are fairly good. On the low-DPI screens, however, the situation is different. The pixels are too large for most of the details of a glyph and shades of gray are the norm rather than the exception.</p>
<p>This is relevant because all our screens have a second problem: they are not linear. 1&nbsp;+&nbsp;1 is not&nbsp;2. Twice the value does not result in twice the brightness. When a pixel is only 50% covered, the coverage map says 50% black, and this translates to a pixel value of 128 when you use 8&nbsp;bits per channel (0-255). However, this does not translate to 50% brightness for that pixel on our sRGB and gamma&nbsp;2.2 screens. Due to their non-linearity, they dwell longer in the darks and only a pixel value of about 186 results in 50% brightness -- 128 ends up too dark on both bright and dark backgrounds. The net result is that dark text looks burnt-out, pixely and blotchy on bright background, bright text too frail on dark backgrounds, and colored text on colored background (for example, red on green) seems to have dark halos or &lsquo;dirt&rsquo; around it. The situation is especially ugly for diagonal stems like in &lsquo;w&rsquo; glyph shapes where the quality of FreeType's anti-aliasing depends on the correct display of grays. On high-DPI screens where smaller, fully black pixels reign supreme, this doesn't matter, but on our low-DPI screens with all the gray shades, it does. 0% and 100% brightness are the same things in linear and non-linear space, just all the shades in-between aren't.</p>
<p>The blending function for placing text over a background is</p>
<pre class="colored">
  dst = alpha * src + (1 - alpha) * dst    ,
</pre>
<p>which is known as the OVER operator.</p>
<p>To correctly composite an antialiased pixel of a glyph onto a surface,</p>
<p>1. take the foreground and background colors (e.g., in sRGB space) and apply gamma to get them in a linear space,</p>
<p>2. use OVER to blend the two linear colors using the glyph pixel as the alpha value (remember, the glyph bitmap is an alpha coverage bitmap), and</p>
<p>3. apply inverse gamma to the blended pixel and write it back to the image.</p>
<p>Internal testing at Adobe found that a target inverse gamma of&nbsp;1.8 for step&nbsp;3 gives good results across a wide range of displays with an sRGB gamma curve or a similar one.</p>
<p>This process can cost performance. There is an approximation that does not need to know about the background color; see <a href="https://bel.fi/alankila/lcd/">https://bel.fi/alankila/lcd/</a> and <a href="https://bel.fi/alankila/lcd/alpcor.html">https://bel.fi/alankila/lcd/alpcor.html</a> for details.</p>
<p><b>ATTENTION</b>: Linear blending is even more important when dealing with subpixel-rendered glyphs to prevent color-fringing! A subpixel-rendered glyph must first be filtered with a filter that gives equal weight to the three color primaries and does not exceed a sum of 0x100, see section &lsquo;<a href="ft2-lcd_filtering.html#lcd_filtering">LCD Filtering</a>&rsquo;. Then the only difference to gray linear blending is that subpixel-rendered linear blending is done 3&nbsp;times per pixel: red foreground subpixel to red background subpixel and so on for green and blue.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Render_Mode">FT_Render_Mode</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">enum</span>  FT_Render_Mode_
  {
    <a href="ft2-base_interface.html#FT_RENDER_MODE_NORMAL">FT_RENDER_MODE_NORMAL</a> = 0,
    <a href="ft2-base_interface.html#FT_RENDER_MODE_LIGHT">FT_RENDER_MODE_LIGHT</a>,
    <a href="ft2-base_interface.html#FT_RENDER_MODE_MONO">FT_RENDER_MODE_MONO</a>,
    <a href="ft2-base_interface.html#FT_RENDER_MODE_LCD">FT_RENDER_MODE_LCD</a>,
    <a href="ft2-base_interface.html#FT_RENDER_MODE_LCD_V">FT_RENDER_MODE_LCD_V</a>,

    FT_RENDER_MODE_MAX

  } <b>FT_Render_Mode</b>;


  /* these constants are deprecated; use the corresponding */
  /* `<b>FT_Render_Mode</b>' values instead                       */
#define ft_render_mode_normal  <a href="ft2-base_interface.html#FT_RENDER_MODE_NORMAL">FT_RENDER_MODE_NORMAL</a>
#define ft_render_mode_mono    <a href="ft2-base_interface.html#FT_RENDER_MODE_MONO">FT_RENDER_MODE_MONO</a>
</pre>

<p>Render modes supported by FreeType&nbsp;2. Each mode corresponds to a specific type of scanline conversion performed on the outline.</p>
<p>For bitmap fonts and embedded bitmaps the &lsquo;bitmap-&gt;pixel_mode&rsquo; field in the <a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a> structure gives the format of the returned bitmap.</p>
<p>All modes except <a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_MONO</a> use 256 levels of opacity, indicating pixel coverage. Use linear alpha blending and gamma correction to correctly render non-monochrome glyph bitmaps onto a surface; see <a href="ft2-base_interface.html#FT_Render_Glyph">FT_Render_Glyph</a>.</p>

<h4>values</h4>
<table class="fields">
<tr><td class="val" id="FT_RENDER_MODE_NORMAL">FT_RENDER_MODE_NORMAL</td><td class="desc">
<p>Default render mode; it corresponds to 8-bit anti-aliased bitmaps.</p>
</td></tr>
<tr><td class="val" id="FT_RENDER_MODE_LIGHT">FT_RENDER_MODE_LIGHT</td><td class="desc">
<p>This is equivalent to <a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_NORMAL</a>. It is only defined as a separate value because render modes are also used indirectly to define hinting algorithm selectors. See <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_XXX</a> for details.</p>
</td></tr>
<tr><td class="val" id="FT_RENDER_MODE_MONO">FT_RENDER_MODE_MONO</td><td class="desc">
<p>This mode corresponds to 1-bit bitmaps (with 2&nbsp;levels of opacity).</p>
</td></tr>
<tr><td class="val" id="FT_RENDER_MODE_LCD">FT_RENDER_MODE_LCD</td><td class="desc">
<p>This mode corresponds to horizontal RGB and BGR subpixel displays like LCD screens. It produces 8-bit bitmaps that are 3&nbsp;times the width of the original glyph outline in pixels, and which use the <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_LCD</a> mode.</p>
</td></tr>
<tr><td class="val" id="FT_RENDER_MODE_LCD_V">FT_RENDER_MODE_LCD_V</td><td class="desc">
<p>This mode corresponds to vertical RGB and BGR subpixel displays (like PDA screens, rotated LCD displays, etc.). It produces 8-bit bitmaps that are 3&nbsp;times the height of the original glyph outline in pixels and use the <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_LCD_V</a> mode.</p>
</td></tr>
</table>

<h4>note</h4>
<p>Should you define FT_CONFIG_OPTION_SUBPIXEL_RENDERING in your &lsquo;ftoption.h&rsquo;, which enables patented ClearType-style rendering, the LCD-optimized glyph bitmaps should be filtered to reduce color fringes inherent to this technology. You can either set up LCD filtering with <a href="ft2-lcd_filtering.html#FT_Library_SetLcdFilter">FT_Library_SetLcdFilter</a> or <a href="ft2-base_interface.html#FT_Face_Properties">FT_Face_Properties</a>, or do the filtering yourself. The default FreeType LCD rendering technology does not require filtering.</p>
<p>The selected render mode only affects vector glyphs of a font. Embedded bitmaps often have a different pixel mode like <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_MONO</a>. You can use <a href="ft2-bitmap_handling.html#FT_Bitmap_Convert">FT_Bitmap_Convert</a> to transform them into 8-bit pixmaps.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Get_Kerning">FT_Get_Kerning</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Get_Kerning</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>     face,
                  <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>     left_glyph,
                  <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>     right_glyph,
                  <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>     kern_mode,
                  <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>  *akerning );
</pre>

<p>Return the kerning vector between two glyphs of the same face.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to a source face object.</p>
</td></tr>
<tr><td class="val" id="left_glyph">left_glyph</td><td class="desc">
<p>The index of the left glyph in the kern pair.</p>
</td></tr>
<tr><td class="val" id="right_glyph">right_glyph</td><td class="desc">
<p>The index of the right glyph in the kern pair.</p>
</td></tr>
<tr><td class="val" id="kern_mode">kern_mode</td><td class="desc">
<p>See <a href="ft2-base_interface.html#FT_Kerning_Mode">FT_Kerning_Mode</a> for more information. Determines the scale and dimension of the returned kerning vector.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="akerning">akerning</td><td class="desc">
<p>The kerning vector. This is either in font units, fractional pixels (26.6 format), or pixels for scalable formats, and in pixels for fixed-sizes formats.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>Only horizontal layouts (left-to-right &amp; right-to-left) are supported by this method. Other layouts, or more sophisticated kernings, are out of the scope of this API function -- they can be implemented through format-specific interfaces.</p>
<p>Kerning for OpenType fonts implemented in a &lsquo;GPOS&rsquo; table is not supported; use <a href="ft2-base_interface.html#FT_HAS_KERNING">FT_HAS_KERNING</a> to find out whether a font has data that can be extracted with &lsquo;FT_Get_Kerning&rsquo;.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Kerning_Mode">FT_Kerning_Mode</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">enum</span>  FT_Kerning_Mode_
  {
    <a href="ft2-base_interface.html#FT_KERNING_DEFAULT">FT_KERNING_DEFAULT</a> = 0,
    <a href="ft2-base_interface.html#FT_KERNING_UNFITTED">FT_KERNING_UNFITTED</a>,
    <a href="ft2-base_interface.html#FT_KERNING_UNSCALED">FT_KERNING_UNSCALED</a>

  } <b>FT_Kerning_Mode</b>;


  /* these constants are deprecated; use the corresponding */
  /* `<b>FT_Kerning_Mode</b>' values instead                      */
#define ft_kerning_default   <a href="ft2-base_interface.html#FT_KERNING_DEFAULT">FT_KERNING_DEFAULT</a>
#define ft_kerning_unfitted  <a href="ft2-base_interface.html#FT_KERNING_UNFITTED">FT_KERNING_UNFITTED</a>
#define ft_kerning_unscaled  <a href="ft2-base_interface.html#FT_KERNING_UNSCALED">FT_KERNING_UNSCALED</a>
</pre>

<p>An enumeration to specify the format of kerning values returned by <a href="ft2-base_interface.html#FT_Get_Kerning">FT_Get_Kerning</a>.</p>

<h4>values</h4>
<table class="fields">
<tr><td class="val" id="FT_KERNING_DEFAULT">FT_KERNING_DEFAULT</td><td class="desc">
<p>Return grid-fitted kerning distances in 26.6 fractional pixels.</p>
</td></tr>
<tr><td class="val" id="FT_KERNING_UNFITTED">FT_KERNING_UNFITTED</td><td class="desc">
<p>Return un-grid-fitted kerning distances in 26.6 fractional pixels.</p>
</td></tr>
<tr><td class="val" id="FT_KERNING_UNSCALED">FT_KERNING_UNSCALED</td><td class="desc">
<p>Return the kerning vector in original font units.</p>
</td></tr>
</table>

<h4>note</h4>
<p>FT_KERNING_DEFAULT returns full pixel values; it also makes FreeType heuristically scale down kerning distances at small ppem values so that they don't become too big.</p>
<p>Both FT_KERNING_DEFAULT and FT_KERNING_UNFITTED use the current horizontal scaling factor (as set e.g. with <a href="ft2-base_interface.html#FT_Set_Char_Size">FT_Set_Char_Size</a>) to convert font units to pixels.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Get_Track_Kerning">FT_Get_Track_Kerning</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Get_Track_Kerning</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>    face,
                        <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>   point_size,
                        <a href="ft2-basic_types.html#FT_Int">FT_Int</a>     degree,
                        <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>*  akerning );
</pre>

<p>Return the track kerning for a given face object at a given size.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to a source face object.</p>
</td></tr>
<tr><td class="val" id="point_size">point_size</td><td class="desc">
<p>The point size in 16.16 fractional points.</p>
</td></tr>
<tr><td class="val" id="degree">degree</td><td class="desc">
<p>The degree of tightness. Increasingly negative values represent tighter track kerning, while increasingly positive values represent looser track kerning. Value zero means no track kerning.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="akerning">akerning</td><td class="desc">
<p>The kerning in 16.16 fractional points, to be uniformly applied between all glyphs.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>Currently, only the Type&nbsp;1 font driver supports track kerning, using data from AFM files (if attached with <a href="ft2-base_interface.html#FT_Attach_File">FT_Attach_File</a> or <a href="ft2-base_interface.html#FT_Attach_Stream">FT_Attach_Stream</a>).</p>
<p>Only very few AFM files come with track kerning data; please refer to Adobe's AFM specification for more details.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Get_Glyph_Name">FT_Get_Glyph_Name</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Get_Glyph_Name</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>     face,
                     <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>     glyph_index,
                     <a href="ft2-basic_types.html#FT_Pointer">FT_Pointer</a>  buffer,
                     <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>     buffer_max );
</pre>

<p>Retrieve the ASCII name of a given glyph in a face. This only works for those faces where <a href="ft2-base_interface.html#FT_HAS_GLYPH_NAMES">FT_HAS_GLYPH_NAMES</a>(face) returns&nbsp;1.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to a source face object.</p>
</td></tr>
<tr><td class="val" id="glyph_index">glyph_index</td><td class="desc">
<p>The glyph index.</p>
</td></tr>
<tr><td class="val" id="buffer_max">buffer_max</td><td class="desc">
<p>The maximum number of bytes available in the buffer.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="buffer">buffer</td><td class="desc">
<p>A pointer to a target buffer where the name is copied to.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>An error is returned if the face doesn't provide glyph names or if the glyph index is invalid. In all cases of failure, the first byte of &lsquo;buffer&rsquo; is set to&nbsp;0 to indicate an empty name.</p>
<p>The glyph name is truncated to fit within the buffer if it is too long. The returned string is always zero-terminated.</p>
<p>Be aware that FreeType reorders glyph indices internally so that glyph index&nbsp;0 always corresponds to the &lsquo;missing glyph&rsquo; (called &lsquo;.notdef&rsquo;).</p>
<p>This function always returns an error if the config macro &lsquo;FT_CONFIG_OPTION_NO_GLYPH_NAMES&rsquo; is not defined in &lsquo;ftoption.h&rsquo;.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Get_Postscript_Name">FT_Get_Postscript_Name</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  FT_EXPORT( <span class="keyword">const</span> <span class="keyword">char</span>* )
  <b>FT_Get_Postscript_Name</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>  face );
</pre>

<p>Retrieve the ASCII PostScript name of a given face, if available. This only works with PostScript, TrueType, and OpenType fonts.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the source face object.</p>
</td></tr>
</table>

<h4>return</h4>
<p>A pointer to the face's PostScript name. NULL if unavailable.</p>

<h4>note</h4>
<p>The returned pointer is owned by the face and is destroyed with it.</p>
<p>For variation fonts, this string changes if you select a different instance, and you have to call &lsquo;FT_Get_PostScript_Name&rsquo; again to retrieve it. FreeType follows Adobe TechNote #5902, &lsquo;Generating PostScript Names for Fonts Using OpenType Font Variations&rsquo;.</p>
<p><a href="https://download.macromedia.com/pub/developer/opentype/tech-notes/5902.AdobePSNameGeneration.html">https://download.macromedia.com/pub/developer/opentype/tech-notes/5902.AdobePSNameGeneration.html</a></p>
<p>[Since 2.9] Special PostScript names for named instances are only returned if the named instance is set with <a href="ft2-multiple_masters.html#FT_Set_Named_Instance">FT_Set_Named_Instance</a> (and the font has corresponding entries in its &lsquo;fvar&rsquo; table). If <a href="ft2-base_interface.html#FT_IS_VARIATION">FT_IS_VARIATION</a> returns true, the algorithmically derived PostScript name is provided, not looking up special entries for named instances.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_CharMapRec">FT_CharMapRec</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_CharMapRec_
  {
    <a href="ft2-base_interface.html#FT_Face">FT_Face</a>      face;
    <a href="ft2-base_interface.html#FT_Encoding">FT_Encoding</a>  encoding;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>    platform_id;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>    encoding_id;

  } <b>FT_CharMapRec</b>;
</pre>

<p>The base charmap structure.</p>

<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the parent face object.</p>
</td></tr>
<tr><td class="val" id="encoding">encoding</td><td class="desc">
<p>An <a href="ft2-base_interface.html#FT_Encoding">FT_Encoding</a> tag identifying the charmap. Use this with <a href="ft2-base_interface.html#FT_Select_Charmap">FT_Select_Charmap</a>.</p>
</td></tr>
<tr><td class="val" id="platform_id">platform_id</td><td class="desc">
<p>An ID number describing the platform for the following encoding ID. This comes directly from the TrueType specification and gets emulated for other formats.</p>
</td></tr>
<tr><td class="val" id="encoding_id">encoding_id</td><td class="desc">
<p>A platform specific encoding number. This also comes from the TrueType specification and gets emulated similarly.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Select_Charmap">FT_Select_Charmap</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Select_Charmap</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>      face,
                     <a href="ft2-base_interface.html#FT_Encoding">FT_Encoding</a>  encoding );
</pre>

<p>Select a given charmap by its encoding tag (as listed in &lsquo;freetype.h&rsquo;).</p>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the source face object.</p>
</td></tr>
</table>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="encoding">encoding</td><td class="desc">
<p>A handle to the selected encoding.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>This function returns an error if no charmap in the face corresponds to the encoding queried here.</p>
<p>Because many fonts contain more than a single cmap for Unicode encoding, this function has some special code to select the one that covers Unicode best (&lsquo;best&rsquo; in the sense that a UCS-4 cmap is preferred to a UCS-2 cmap). It is thus preferable to <a href="ft2-base_interface.html#FT_Set_Charmap">FT_Set_Charmap</a> in this case.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Set_Charmap">FT_Set_Charmap</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Set_Charmap</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>     face,
                  <a href="ft2-base_interface.html#FT_CharMap">FT_CharMap</a>  charmap );
</pre>

<p>Select a given charmap for character code to glyph index mapping.</p>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the source face object.</p>
</td></tr>
</table>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="charmap">charmap</td><td class="desc">
<p>A handle to the selected charmap.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>This function returns an error if the charmap is not part of the face (i.e., if it is not listed in the &lsquo;face-&gt;charmaps&rsquo; table).</p>
<p>It also fails if an OpenType type&nbsp;14 charmap is selected (which doesn't map character codes to glyph indices at all).</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Get_Charmap_Index">FT_Get_Charmap_Index</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Int">FT_Int</a> )
  <b>FT_Get_Charmap_Index</b>( <a href="ft2-base_interface.html#FT_CharMap">FT_CharMap</a>  charmap );
</pre>

<p>Retrieve index of a given charmap.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="charmap">charmap</td><td class="desc">
<p>A handle to a charmap.</p>
</td></tr>
</table>

<h4>return</h4>
<p>The index into the array of character maps within the face to which &lsquo;charmap&rsquo; belongs. If an error occurs, -1 is returned.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Get_FSType_Flags">FT_Get_FSType_Flags</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a> )
  <b>FT_Get_FSType_Flags</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>  face );
</pre>

<p>Return the &lsquo;fsType&rsquo; flags for a font.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the source face object.</p>
</td></tr>
</table>

<h4>return</h4>
<p>The &lsquo;fsType&rsquo; flags, see <a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_XXX</a>.</p>

<h4>note</h4>
<p>Use this function rather than directly reading the &lsquo;fs_type&rsquo; field in the <a href="ft2-type1_tables.html#PS_FontInfoRec">PS_FontInfoRec</a> structure, which is only guaranteed to return the correct results for Type&nbsp;1 fonts.</p>

<h4>since</h4>
<p>2.3.8</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Get_SubGlyph_Info">FT_Get_SubGlyph_Info</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Get_SubGlyph_Info</b>( <a href="ft2-base_interface.html#FT_GlyphSlot">FT_GlyphSlot</a>  glyph,
                        <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>       sub_index,
                        <a href="ft2-basic_types.html#FT_Int">FT_Int</a>       *p_index,
                        <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>      *p_flags,
                        <a href="ft2-basic_types.html#FT_Int">FT_Int</a>       *p_arg1,
                        <a href="ft2-basic_types.html#FT_Int">FT_Int</a>       *p_arg2,
                        <a href="ft2-basic_types.html#FT_Matrix">FT_Matrix</a>    *p_transform );
</pre>

<p>Retrieve a description of a given subglyph. Only use it if &lsquo;glyph-&gt;format&rsquo; is <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_COMPOSITE</a>; an error is returned otherwise.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="glyph">glyph</td><td class="desc">
<p>The source glyph slot.</p>
</td></tr>
<tr><td class="val" id="sub_index">sub_index</td><td class="desc">
<p>The index of the subglyph. Must be less than &lsquo;glyph-&gt;num_subglyphs&rsquo;.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="p_index">p_index</td><td class="desc">
<p>The glyph index of the subglyph.</p>
</td></tr>
<tr><td class="val" id="p_flags">p_flags</td><td class="desc">
<p>The subglyph flags, see <a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_XXX</a>.</p>
</td></tr>
<tr><td class="val" id="p_arg1">p_arg1</td><td class="desc">
<p>The subglyph's first argument (if any).</p>
</td></tr>
<tr><td class="val" id="p_arg2">p_arg2</td><td class="desc">
<p>The subglyph's second argument (if any).</p>
</td></tr>
<tr><td class="val" id="p_transform">p_transform</td><td class="desc">
<p>The subglyph transformation (if any).</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>The values of &lsquo;*p_arg1&rsquo;, &lsquo;*p_arg2&rsquo;, and &lsquo;*p_transform&rsquo; must be interpreted depending on the flags returned in &lsquo;*p_flags&rsquo;. See the OpenType specification for details.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Face_Internal">FT_Face_Internal</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Face_InternalRec_*  <b>FT_Face_Internal</b>;
</pre>

<p>An opaque handle to an &lsquo;FT_Face_InternalRec&rsquo; structure that models the private data of a given <a href="ft2-base_interface.html#FT_Face">FT_Face</a> object.</p>
<p>This structure might change between releases of FreeType&nbsp;2 and is not generally available to client applications.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Size_Internal">FT_Size_Internal</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Size_InternalRec_*  <b>FT_Size_Internal</b>;
</pre>

<p>An opaque handle to an &lsquo;FT_Size_InternalRec&rsquo; structure, used to model private data of a given <a href="ft2-base_interface.html#FT_Size">FT_Size</a> object.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Slot_Internal">FT_Slot_Internal</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Slot_InternalRec_*  <b>FT_Slot_Internal</b>;
</pre>

<p>An opaque handle to an &lsquo;FT_Slot_InternalRec&rsquo; structure, used to model private data of a given <a href="ft2-base_interface.html#FT_GlyphSlot">FT_GlyphSlot</a> object.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_FACE_FLAG_XXX">FT_FACE_FLAG_XXX</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
#define <a href="ft2-base_interface.html#FT_FACE_FLAG_SCALABLE">FT_FACE_FLAG_SCALABLE</a>          ( 1L &lt;&lt;  0 )
#define <a href="ft2-base_interface.html#FT_FACE_FLAG_FIXED_SIZES">FT_FACE_FLAG_FIXED_SIZES</a>       ( 1L &lt;&lt;  1 )
#define <a href="ft2-base_interface.html#FT_FACE_FLAG_FIXED_WIDTH">FT_FACE_FLAG_FIXED_WIDTH</a>       ( 1L &lt;&lt;  2 )
#define <a href="ft2-base_interface.html#FT_FACE_FLAG_SFNT">FT_FACE_FLAG_SFNT</a>              ( 1L &lt;&lt;  3 )
#define <a href="ft2-base_interface.html#FT_FACE_FLAG_HORIZONTAL">FT_FACE_FLAG_HORIZONTAL</a>        ( 1L &lt;&lt;  4 )
#define <a href="ft2-base_interface.html#FT_FACE_FLAG_VERTICAL">FT_FACE_FLAG_VERTICAL</a>          ( 1L &lt;&lt;  5 )
#define <a href="ft2-base_interface.html#FT_FACE_FLAG_KERNING">FT_FACE_FLAG_KERNING</a>           ( 1L &lt;&lt;  6 )
#define <a href="ft2-base_interface.html#FT_FACE_FLAG_FAST_GLYPHS">FT_FACE_FLAG_FAST_GLYPHS</a>       ( 1L &lt;&lt;  7 )
#define <a href="ft2-base_interface.html#FT_FACE_FLAG_MULTIPLE_MASTERS">FT_FACE_FLAG_MULTIPLE_MASTERS</a>  ( 1L &lt;&lt;  8 )
#define <a href="ft2-base_interface.html#FT_FACE_FLAG_GLYPH_NAMES">FT_FACE_FLAG_GLYPH_NAMES</a>       ( 1L &lt;&lt;  9 )
#define <a href="ft2-base_interface.html#FT_FACE_FLAG_EXTERNAL_STREAM">FT_FACE_FLAG_EXTERNAL_STREAM</a>   ( 1L &lt;&lt; 10 )
#define <a href="ft2-base_interface.html#FT_FACE_FLAG_HINTER">FT_FACE_FLAG_HINTER</a>            ( 1L &lt;&lt; 11 )
#define <a href="ft2-base_interface.html#FT_FACE_FLAG_CID_KEYED">FT_FACE_FLAG_CID_KEYED</a>         ( 1L &lt;&lt; 12 )
#define <a href="ft2-base_interface.html#FT_FACE_FLAG_TRICKY">FT_FACE_FLAG_TRICKY</a>            ( 1L &lt;&lt; 13 )
#define <a href="ft2-base_interface.html#FT_FACE_FLAG_COLOR">FT_FACE_FLAG_COLOR</a>             ( 1L &lt;&lt; 14 )
#define <a href="ft2-base_interface.html#FT_FACE_FLAG_VARIATION">FT_FACE_FLAG_VARIATION</a>         ( 1L &lt;&lt; 15 )
</pre>

<p>A list of bit flags used in the &lsquo;face_flags&rsquo; field of the <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> structure. They inform client applications of properties of the corresponding face.</p>

<h4>values</h4>
<table class="fields">
<tr><td class="val" id="FT_FACE_FLAG_SCALABLE">FT_FACE_FLAG_SCALABLE</td><td class="desc">
<p>The face contains outline glyphs. Note that a face can contain bitmap strikes also, i.e., a face can have both this flag and <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_FIXED_SIZES</a> set.</p>
</td></tr>
<tr><td class="val" id="FT_FACE_FLAG_FIXED_SIZES">FT_FACE_FLAG_FIXED_SIZES</td><td class="desc">
<p>The face contains bitmap strikes. See also the &lsquo;num_fixed_sizes&rsquo; and &lsquo;available_sizes&rsquo; fields of <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a>.</p>
</td></tr>
<tr><td class="val" id="FT_FACE_FLAG_FIXED_WIDTH">FT_FACE_FLAG_FIXED_WIDTH</td><td class="desc">
<p>The face contains fixed-width characters (like Courier, Lucida, MonoType, etc.).</p>
</td></tr>
<tr><td class="val" id="FT_FACE_FLAG_SFNT">FT_FACE_FLAG_SFNT</td><td class="desc">
<p>The face uses the SFNT storage scheme. For now, this means TrueType and OpenType.</p>
</td></tr>
<tr><td class="val" id="FT_FACE_FLAG_HORIZONTAL">FT_FACE_FLAG_HORIZONTAL</td><td class="desc">
<p>The face contains horizontal glyph metrics. This should be set for all common formats.</p>
</td></tr>
<tr><td class="val" id="FT_FACE_FLAG_VERTICAL">FT_FACE_FLAG_VERTICAL</td><td class="desc">
<p>The face contains vertical glyph metrics. This is only available in some formats, not all of them.</p>
</td></tr>
<tr><td class="val" id="FT_FACE_FLAG_KERNING">FT_FACE_FLAG_KERNING</td><td class="desc">
<p>The face contains kerning information. If set, the kerning distance can be retrieved using the function <a href="ft2-base_interface.html#FT_Get_Kerning">FT_Get_Kerning</a>. Otherwise the function always return the vector (0,0). Note that FreeType doesn't handle kerning data from the SFNT &lsquo;GPOS&rsquo; table (as present in many OpenType fonts).</p>
</td></tr>
<tr><td class="val" id="FT_FACE_FLAG_FAST_GLYPHS">FT_FACE_FLAG_FAST_GLYPHS</td><td class="desc">
<p>THIS FLAG IS DEPRECATED. DO NOT USE OR TEST IT.</p>
</td></tr>
<tr><td class="val" id="FT_FACE_FLAG_MULTIPLE_MASTERS">FT_FACE_FLAG_MULTIPLE_MASTERS</td><td class="desc">
<p>The face contains multiple masters and is capable of interpolating between them. Supported formats are Adobe MM, TrueType GX, and OpenType variation fonts.</p>
<p>See section &lsquo;<a href="ft2-multiple_masters.html#multiple_masters">Multiple Masters</a>&rsquo; for API details.</p>
</td></tr>
<tr><td class="val" id="FT_FACE_FLAG_GLYPH_NAMES">FT_FACE_FLAG_GLYPH_NAMES</td><td class="desc">
<p>The face contains glyph names, which can be retrieved using <a href="ft2-base_interface.html#FT_Get_Glyph_Name">FT_Get_Glyph_Name</a>. Note that some TrueType fonts contain broken glyph name tables. Use the function <a href="ft2-type1_tables.html#FT_Has_PS_Glyph_Names">FT_Has_PS_Glyph_Names</a> when needed.</p>
</td></tr>
<tr><td class="val" id="FT_FACE_FLAG_EXTERNAL_STREAM">FT_FACE_FLAG_EXTERNAL_STREAM</td><td class="desc">
<p>Used internally by FreeType to indicate that a face's stream was provided by the client application and should not be destroyed when <a href="ft2-base_interface.html#FT_Done_Face">FT_Done_Face</a> is called. Don't read or test this flag.</p>
</td></tr>
<tr><td class="val" id="FT_FACE_FLAG_HINTER">FT_FACE_FLAG_HINTER</td><td class="desc">
<p>The font driver has a hinting machine of its own. For example, with TrueType fonts, it makes sense to use data from the SFNT &lsquo;gasp&rsquo; table only if the native TrueType hinting engine (with the bytecode interpreter) is available and active.</p>
</td></tr>
<tr><td class="val" id="FT_FACE_FLAG_CID_KEYED">FT_FACE_FLAG_CID_KEYED</td><td class="desc">
<p>The face is CID-keyed. In that case, the face is not accessed by glyph indices but by CID values. For subsetted CID-keyed fonts this has the consequence that not all index values are a valid argument to <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a>. Only the CID values for which corresponding glyphs in the subsetted font exist make &lsquo;FT_Load_Glyph&rsquo; return successfully; in all other cases you get an &lsquo;FT_Err_Invalid_Argument&rsquo; error.</p>
<p>Note that CID-keyed fonts that are in an SFNT wrapper (this is, all OpenType/CFF fonts) don't have this flag set since the glyphs are accessed in the normal way (using contiguous indices); the &lsquo;CID-ness&rsquo; isn't visible to the application.</p>
</td></tr>
<tr><td class="val" id="FT_FACE_FLAG_TRICKY">FT_FACE_FLAG_TRICKY</td><td class="desc">
<p>The face is &lsquo;tricky&rsquo;, this is, it always needs the font format's native hinting engine to get a reasonable result. A typical example is the old Chinese font &lsquo;mingli.ttf&rsquo; (but not &lsquo;mingliu.ttc&rsquo;) that uses TrueType bytecode instructions to move and scale all of its subglyphs.</p>
<p>It is not possible to auto-hint such fonts using <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_FORCE_AUTOHINT</a>; it will also ignore <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_HINTING</a>. You have to set both <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_HINTING</a> and <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_AUTOHINT</a> to really disable hinting; however, you probably never want this except for demonstration purposes.</p>
<p>Currently, there are about a dozen TrueType fonts in the list of tricky fonts; they are hard-coded in file &lsquo;ttobjs.c&rsquo;.</p>
</td></tr>
<tr><td class="val" id="FT_FACE_FLAG_COLOR">FT_FACE_FLAG_COLOR</td><td class="desc">
<p>[Since 2.5.1] The face has color glyph tables. To access color glyphs use <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_COLOR</a>.</p>
</td></tr>
<tr><td class="val" id="FT_FACE_FLAG_VARIATION">FT_FACE_FLAG_VARIATION</td><td class="desc">
<p>[Since 2.9] Set if the current face (or named instance) has been altered with <a href="ft2-multiple_masters.html#FT_Set_MM_Design_Coordinates">FT_Set_MM_Design_Coordinates</a>, <a href="ft2-multiple_masters.html#FT_Set_Var_Design_Coordinates">FT_Set_Var_Design_Coordinates</a>, or <a href="ft2-multiple_masters.html#FT_Set_Var_Blend_Coordinates">FT_Set_Var_Blend_Coordinates</a>. This flag is unset by a call to <a href="ft2-multiple_masters.html#FT_Set_Named_Instance">FT_Set_Named_Instance</a>.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_STYLE_FLAG_XXX">FT_STYLE_FLAG_XXX</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
#define <a href="ft2-base_interface.html#FT_STYLE_FLAG_ITALIC">FT_STYLE_FLAG_ITALIC</a>  ( 1 &lt;&lt; 0 )
#define <a href="ft2-base_interface.html#FT_STYLE_FLAG_BOLD">FT_STYLE_FLAG_BOLD</a>    ( 1 &lt;&lt; 1 )
</pre>

<p>A list of bit flags to indicate the style of a given face. These are used in the &lsquo;style_flags&rsquo; field of <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a>.</p>

<h4>values</h4>
<table class="fields">
<tr><td class="val" id="FT_STYLE_FLAG_ITALIC">FT_STYLE_FLAG_ITALIC</td><td class="desc">
<p>The face style is italic or oblique.</p>
</td></tr>
<tr><td class="val" id="FT_STYLE_FLAG_BOLD">FT_STYLE_FLAG_BOLD</td><td class="desc">
<p>The face is bold.</p>
</td></tr>
</table>

<h4>note</h4>
<p>The style information as provided by FreeType is very basic. More details are beyond the scope and should be done on a higher level (for example, by analyzing various fields of the &lsquo;OS/2&rsquo; table in SFNT based fonts).</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_OPEN_XXX">FT_OPEN_XXX</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
#define <a href="ft2-base_interface.html#FT_OPEN_MEMORY">FT_OPEN_MEMORY</a>    0x1
#define <a href="ft2-base_interface.html#FT_OPEN_STREAM">FT_OPEN_STREAM</a>    0x2
#define <a href="ft2-base_interface.html#FT_OPEN_PATHNAME">FT_OPEN_PATHNAME</a>  0x4
#define <a href="ft2-base_interface.html#FT_OPEN_DRIVER">FT_OPEN_DRIVER</a>    0x8
#define <a href="ft2-base_interface.html#FT_OPEN_PARAMS">FT_OPEN_PARAMS</a>    0x10


  /* these constants are deprecated; use the corresponding `<b>FT_OPEN_XXX</b>' */
  /* values instead                                                      */
#define ft_open_memory    <a href="ft2-base_interface.html#FT_OPEN_MEMORY">FT_OPEN_MEMORY</a>
#define ft_open_stream    <a href="ft2-base_interface.html#FT_OPEN_STREAM">FT_OPEN_STREAM</a>
#define ft_open_pathname  <a href="ft2-base_interface.html#FT_OPEN_PATHNAME">FT_OPEN_PATHNAME</a>
#define ft_open_driver    <a href="ft2-base_interface.html#FT_OPEN_DRIVER">FT_OPEN_DRIVER</a>
#define ft_open_params    <a href="ft2-base_interface.html#FT_OPEN_PARAMS">FT_OPEN_PARAMS</a>
</pre>

<p>A list of bit field constants used within the &lsquo;flags&rsquo; field of the <a href="ft2-base_interface.html#FT_Open_Args">FT_Open_Args</a> structure.</p>

<h4>values</h4>
<table class="fields">
<tr><td class="val" id="FT_OPEN_MEMORY">FT_OPEN_MEMORY</td><td class="desc">
<p>This is a memory-based stream.</p>
</td></tr>
<tr><td class="val" id="FT_OPEN_STREAM">FT_OPEN_STREAM</td><td class="desc">
<p>Copy the stream from the &lsquo;stream&rsquo; field.</p>
</td></tr>
<tr><td class="val" id="FT_OPEN_PATHNAME">FT_OPEN_PATHNAME</td><td class="desc">
<p>Create a new input stream from a C&nbsp;path name.</p>
</td></tr>
<tr><td class="val" id="FT_OPEN_DRIVER">FT_OPEN_DRIVER</td><td class="desc">
<p>Use the &lsquo;driver&rsquo; field.</p>
</td></tr>
<tr><td class="val" id="FT_OPEN_PARAMS">FT_OPEN_PARAMS</td><td class="desc">
<p>Use the &lsquo;num_params&rsquo; and &lsquo;params&rsquo; fields.</p>
</td></tr>
</table>

<h4>note</h4>
<p>The &lsquo;FT_OPEN_MEMORY&rsquo;, &lsquo;FT_OPEN_STREAM&rsquo;, and &lsquo;FT_OPEN_PATHNAME&rsquo; flags are mutually exclusive.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_LOAD_XXX">FT_LOAD_XXX</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
#define <a href="ft2-base_interface.html#FT_LOAD_DEFAULT">FT_LOAD_DEFAULT</a>                      0x0
#define <a href="ft2-base_interface.html#FT_LOAD_NO_SCALE">FT_LOAD_NO_SCALE</a>                     ( 1L &lt;&lt; 0 )
#define <a href="ft2-base_interface.html#FT_LOAD_NO_HINTING">FT_LOAD_NO_HINTING</a>                   ( 1L &lt;&lt; 1 )
#define <a href="ft2-base_interface.html#FT_LOAD_RENDER">FT_LOAD_RENDER</a>                       ( 1L &lt;&lt; 2 )
#define <a href="ft2-base_interface.html#FT_LOAD_NO_BITMAP">FT_LOAD_NO_BITMAP</a>                    ( 1L &lt;&lt; 3 )
#define <a href="ft2-base_interface.html#FT_LOAD_VERTICAL_LAYOUT">FT_LOAD_VERTICAL_LAYOUT</a>              ( 1L &lt;&lt; 4 )
#define <a href="ft2-base_interface.html#FT_LOAD_FORCE_AUTOHINT">FT_LOAD_FORCE_AUTOHINT</a>               ( 1L &lt;&lt; 5 )
#define <a href="ft2-base_interface.html#FT_LOAD_CROP_BITMAP">FT_LOAD_CROP_BITMAP</a>                  ( 1L &lt;&lt; 6 )
#define <a href="ft2-base_interface.html#FT_LOAD_PEDANTIC">FT_LOAD_PEDANTIC</a>                     ( 1L &lt;&lt; 7 )
#define <a href="ft2-base_interface.html#FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH">FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH</a>  ( 1L &lt;&lt; 9 )
#define <a href="ft2-base_interface.html#FT_LOAD_NO_RECURSE">FT_LOAD_NO_RECURSE</a>                   ( 1L &lt;&lt; 10 )
#define <a href="ft2-base_interface.html#FT_LOAD_IGNORE_TRANSFORM">FT_LOAD_IGNORE_TRANSFORM</a>             ( 1L &lt;&lt; 11 )
#define <a href="ft2-base_interface.html#FT_LOAD_MONOCHROME">FT_LOAD_MONOCHROME</a>                   ( 1L &lt;&lt; 12 )
#define <a href="ft2-base_interface.html#FT_LOAD_LINEAR_DESIGN">FT_LOAD_LINEAR_DESIGN</a>                ( 1L &lt;&lt; 13 )
#define <a href="ft2-base_interface.html#FT_LOAD_NO_AUTOHINT">FT_LOAD_NO_AUTOHINT</a>                  ( 1L &lt;&lt; 15 )
  /* Bits 16-19 are used by `FT_LOAD_TARGET_' */
#define <a href="ft2-base_interface.html#FT_LOAD_COLOR">FT_LOAD_COLOR</a>                        ( 1L &lt;&lt; 20 )
#define <a href="ft2-base_interface.html#FT_LOAD_COMPUTE_METRICS">FT_LOAD_COMPUTE_METRICS</a>              ( 1L &lt;&lt; 21 )
#define <a href="ft2-base_interface.html#FT_LOAD_BITMAP_METRICS_ONLY">FT_LOAD_BITMAP_METRICS_ONLY</a>          ( 1L &lt;&lt; 22 )
</pre>

<p>A list of bit field constants for <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a> to indicate what kind of operations to perform during glyph loading.</p>

<h4>values</h4>
<table class="fields">
<tr><td class="val" id="FT_LOAD_DEFAULT">FT_LOAD_DEFAULT</td><td class="desc">
<p>Corresponding to&nbsp;0, this value is used as the default glyph load operation. In this case, the following happens:</p>
<p>1. FreeType looks for a bitmap for the glyph corresponding to the face's current size. If one is found, the function returns. The bitmap data can be accessed from the glyph slot (see note below).</p>
<p>2. If no embedded bitmap is searched for or found, FreeType looks for a scalable outline. If one is found, it is loaded from the font file, scaled to device pixels, then &lsquo;hinted&rsquo; to the pixel grid in order to optimize it. The outline data can be accessed from the glyph slot (see note below).</p>
<p>Note that by default the glyph loader doesn't render outlines into bitmaps. The following flags are used to modify this default behaviour to more specific and useful cases.</p>
</td></tr>
<tr><td class="val" id="FT_LOAD_NO_SCALE">FT_LOAD_NO_SCALE</td><td class="desc">
<p>Don't scale the loaded outline glyph but keep it in font units.</p>
<p>This flag implies <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_HINTING</a> and <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_BITMAP</a>, and unsets <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_RENDER</a>.</p>
<p>If the font is &lsquo;tricky&rsquo; (see <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_TRICKY</a> for more), using FT_LOAD_NO_SCALE usually yields meaningless outlines because the subglyphs must be scaled and positioned with hinting instructions. This can be solved by loading the font without FT_LOAD_NO_SCALE and setting the character size to &lsquo;font-&gt;units_per_EM&rsquo;.</p>
</td></tr>
<tr><td class="val" id="FT_LOAD_NO_HINTING">FT_LOAD_NO_HINTING</td><td class="desc">
<p>Disable hinting. This generally generates &lsquo;blurrier&rsquo; bitmap glyphs when the glyph are rendered in any of the anti-aliased modes. See also the note below.</p>
<p>This flag is implied by <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a>.</p>
</td></tr>
<tr><td class="val" id="FT_LOAD_RENDER">FT_LOAD_RENDER</td><td class="desc">
<p>Call <a href="ft2-base_interface.html#FT_Render_Glyph">FT_Render_Glyph</a> after the glyph is loaded. By default, the glyph is rendered in <a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_NORMAL</a> mode. This can be overridden by <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_XXX</a> or <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_MONOCHROME</a>.</p>
<p>This flag is unset by <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a>.</p>
</td></tr>
<tr><td class="val" id="FT_LOAD_NO_BITMAP">FT_LOAD_NO_BITMAP</td><td class="desc">
<p>Ignore bitmap strikes when loading. Bitmap-only fonts ignore this flag.</p>
<p><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a> always sets this flag.</p>
</td></tr>
<tr><td class="val" id="FT_LOAD_VERTICAL_LAYOUT">FT_LOAD_VERTICAL_LAYOUT</td><td class="desc">
<p>Load the glyph for vertical text layout. In particular, the &lsquo;advance&rsquo; value in the <a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a> structure is set to the &lsquo;vertAdvance&rsquo; value of the &lsquo;metrics&rsquo; field.</p>
<p>In case <a href="ft2-base_interface.html#FT_HAS_VERTICAL">FT_HAS_VERTICAL</a> doesn't return true, you shouldn't use this flag currently. Reason is that in this case vertical metrics get synthesized, and those values are not always consistent across various font formats.</p>
</td></tr>
<tr><td class="val" id="FT_LOAD_FORCE_AUTOHINT">FT_LOAD_FORCE_AUTOHINT</td><td class="desc">
<p>Prefer the auto-hinter over the font's native hinter. See also the note below.</p>
</td></tr>
<tr><td class="val" id="FT_LOAD_PEDANTIC">FT_LOAD_PEDANTIC</td><td class="desc">
<p>Make the font driver perform pedantic verifications during glyph loading. This is mostly used to detect broken glyphs in fonts. By default, FreeType tries to handle broken fonts also.</p>
<p>In particular, errors from the TrueType bytecode engine are not passed to the application if this flag is not set; this might result in partially hinted or distorted glyphs in case a glyph's bytecode is buggy.</p>
</td></tr>
<tr><td class="val" id="FT_LOAD_NO_RECURSE">FT_LOAD_NO_RECURSE</td><td class="desc">
<p>Don't load composite glyphs recursively. Instead, the font driver should set the &lsquo;num_subglyph&rsquo; and &lsquo;subglyphs&rsquo; values of the glyph slot accordingly, and set &lsquo;glyph-&gt;format&rsquo; to <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_COMPOSITE</a>. The description of subglyphs can then be accessed with <a href="ft2-base_interface.html#FT_Get_SubGlyph_Info">FT_Get_SubGlyph_Info</a>.</p>
<p>This flag implies <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a> and <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_IGNORE_TRANSFORM</a>.</p>
</td></tr>
<tr><td class="val" id="FT_LOAD_IGNORE_TRANSFORM">FT_LOAD_IGNORE_TRANSFORM</td><td class="desc">
<p>Ignore the transform matrix set by <a href="ft2-base_interface.html#FT_Set_Transform">FT_Set_Transform</a>.</p>
</td></tr>
<tr><td class="val" id="FT_LOAD_MONOCHROME">FT_LOAD_MONOCHROME</td><td class="desc">
<p>This flag is used with <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_RENDER</a> to indicate that you want to render an outline glyph to a 1-bit monochrome bitmap glyph, with 8&nbsp;pixels packed into each byte of the bitmap data.</p>
<p>Note that this has no effect on the hinting algorithm used. You should rather use <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_MONO</a> so that the monochrome-optimized hinting algorithm is used.</p>
</td></tr>
<tr><td class="val" id="FT_LOAD_LINEAR_DESIGN">FT_LOAD_LINEAR_DESIGN</td><td class="desc">
<p>Keep &lsquo;linearHoriAdvance&rsquo; and &lsquo;linearVertAdvance&rsquo; fields of <a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a> in font units. See <a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a> for details.</p>
</td></tr>
<tr><td class="val" id="FT_LOAD_NO_AUTOHINT">FT_LOAD_NO_AUTOHINT</td><td class="desc">
<p>Disable the auto-hinter. See also the note below.</p>
</td></tr>
<tr><td class="val" id="FT_LOAD_COLOR">FT_LOAD_COLOR</td><td class="desc">
<p>[Since 2.5] Load embedded color bitmap images. The resulting color bitmaps, if available, will have the <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_BGRA</a> format. If the flag is not set and color bitmaps are found, they are converted to 256-level gray bitmaps transparently, using the <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_GRAY</a> format.</p>
</td></tr>
<tr><td class="val" id="FT_LOAD_COMPUTE_METRICS">FT_LOAD_COMPUTE_METRICS</td><td class="desc">
<p>[Since 2.6.1] Compute glyph metrics from the glyph data, without the use of bundled metrics tables (for example, the &lsquo;hdmx&rsquo; table in TrueType fonts). This flag is mainly used by font validating or font editing applications, which need to ignore, verify, or edit those tables.</p>
<p>Currently, this flag is only implemented for TrueType fonts.</p>
</td></tr>
<tr><td class="val" id="FT_LOAD_BITMAP_METRICS_ONLY">FT_LOAD_BITMAP_METRICS_ONLY</td><td class="desc">
<p>[Since 2.7.1] Request loading of the metrics and bitmap image information of a (possibly embedded) bitmap glyph without allocating or copying the bitmap image data itself. No effect if the target glyph is not a bitmap image.</p>
<p>This flag unsets <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_RENDER</a>.</p>
</td></tr>
<tr><td class="val" id="FT_LOAD_CROP_BITMAP">FT_LOAD_CROP_BITMAP</td><td class="desc">
<p>Ignored. Deprecated.</p>
</td></tr>
<tr><td class="val" id="FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH">FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH</td><td class="desc">
<p>Ignored. Deprecated.</p>
</td></tr>
</table>

<h4>note</h4>
<p>By default, hinting is enabled and the font's native hinter (see <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_HINTER</a>) is preferred over the auto-hinter. You can disable hinting by setting <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_HINTING</a> or change the precedence by setting <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_FORCE_AUTOHINT</a>. You can also set <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_AUTOHINT</a> in case you don't want the auto-hinter to be used at all.</p>
<p>See the description of <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_TRICKY</a> for a special exception (affecting only a handful of Asian fonts).</p>
<p>Besides deciding which hinter to use, you can also decide which hinting algorithm to use. See <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_XXX</a> for details.</p>
<p>Note that the auto-hinter needs a valid Unicode cmap (either a native one or synthesized by FreeType) for producing correct results. If a font provides an incorrect mapping (for example, assigning the character code U+005A, LATIN CAPITAL LETTER Z, to a glyph depicting a mathematical integral sign), the auto-hinter might produce useless results.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_XXX</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
#define FT_LOAD_TARGET_( x )   ( (<a href="ft2-basic_types.html#FT_Int32">FT_Int32</a>)( (x) &amp; 15 ) &lt;&lt; 16 )

#define <a href="ft2-base_interface.html#FT_LOAD_TARGET_NORMAL">FT_LOAD_TARGET_NORMAL</a>  FT_LOAD_TARGET_( <a href="ft2-base_interface.html#FT_RENDER_MODE_NORMAL">FT_RENDER_MODE_NORMAL</a> )
#define <a href="ft2-base_interface.html#FT_LOAD_TARGET_LIGHT">FT_LOAD_TARGET_LIGHT</a>   FT_LOAD_TARGET_( <a href="ft2-base_interface.html#FT_RENDER_MODE_LIGHT">FT_RENDER_MODE_LIGHT</a>  )
#define <a href="ft2-base_interface.html#FT_LOAD_TARGET_MONO">FT_LOAD_TARGET_MONO</a>    FT_LOAD_TARGET_( <a href="ft2-base_interface.html#FT_RENDER_MODE_MONO">FT_RENDER_MODE_MONO</a>   )
#define <a href="ft2-base_interface.html#FT_LOAD_TARGET_LCD">FT_LOAD_TARGET_LCD</a>     FT_LOAD_TARGET_( <a href="ft2-base_interface.html#FT_RENDER_MODE_LCD">FT_RENDER_MODE_LCD</a>    )
#define <a href="ft2-base_interface.html#FT_LOAD_TARGET_LCD_V">FT_LOAD_TARGET_LCD_V</a>   FT_LOAD_TARGET_( <a href="ft2-base_interface.html#FT_RENDER_MODE_LCD_V">FT_RENDER_MODE_LCD_V</a>  )
</pre>

<p>A list of values to select a specific hinting algorithm for the hinter. You should OR one of these values to your &lsquo;load_flags&rsquo; when calling <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a>.</p>
<p>Note that a font's native hinters may ignore the hinting algorithm you have specified (e.g., the TrueType bytecode interpreter). You can set <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_FORCE_AUTOHINT</a> to ensure that the auto-hinter is used.</p>

<h4>values</h4>
<table class="fields">
<tr><td class="val" id="FT_LOAD_TARGET_NORMAL">FT_LOAD_TARGET_NORMAL</td><td class="desc">
<p>The default hinting algorithm, optimized for standard gray-level rendering. For monochrome output, use <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_MONO</a> instead.</p>
</td></tr>
<tr><td class="val" id="FT_LOAD_TARGET_LIGHT">FT_LOAD_TARGET_LIGHT</td><td class="desc">
<p>A lighter hinting algorithm for gray-level modes. Many generated glyphs are fuzzier but better resemble their original shape. This is achieved by snapping glyphs to the pixel grid only vertically (Y-axis), as is done by FreeType's new CFF engine or Microsoft's ClearType font renderer. This preserves inter-glyph spacing in horizontal text. The snapping is done either by the native font driver, if the driver itself and the font support it, or by the auto-hinter.</p>
<p>Advance widths are rounded to integer values; however, using the &lsquo;lsb_delta&rsquo; and &lsquo;rsb_delta&rsquo; fields of <a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a>, it is possible to get fractional advance widths for subpixel positioning (which is recommended to use).</p>
<p>If configuration option AF_CONFIG_OPTION_TT_SIZE_METRICS is active, TrueType-like metrics are used to make this mode behave similarly as in unpatched FreeType versions between 2.4.6 and 2.7.1 (inclusive).</p>
</td></tr>
<tr><td class="val" id="FT_LOAD_TARGET_MONO">FT_LOAD_TARGET_MONO</td><td class="desc">
<p>Strong hinting algorithm that should only be used for monochrome output. The result is probably unpleasant if the glyph is rendered in non-monochrome modes.</p>
</td></tr>
<tr><td class="val" id="FT_LOAD_TARGET_LCD">FT_LOAD_TARGET_LCD</td><td class="desc">
<p>A variant of <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_LIGHT</a> optimized for horizontally decimated LCD displays.</p>
</td></tr>
<tr><td class="val" id="FT_LOAD_TARGET_LCD_V">FT_LOAD_TARGET_LCD_V</td><td class="desc">
<p>A variant of <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_NORMAL</a> optimized for vertically decimated LCD displays.</p>
</td></tr>
</table>

<h4>note</h4>
<p>You should use only <i>one</i> of the FT_LOAD_TARGET_XXX values in your &lsquo;load_flags&rsquo;. They can't be ORed.</p>
<p>If <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_RENDER</a> is also set, the glyph is rendered in the corresponding mode (i.e., the mode that matches the used algorithm best). An exception is FT_LOAD_TARGET_MONO since it implies <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_MONOCHROME</a>.</p>
<p>You can use a hinting algorithm that doesn't correspond to the same rendering mode. As an example, it is possible to use the &lsquo;light&rsquo; hinting algorithm and have the results rendered in horizontal LCD pixel mode, with code like</p>
<pre class="colored">
  FT_Load_Glyph( face, glyph_index,
                 load_flags | FT_LOAD_TARGET_LIGHT );

  FT_Render_Glyph( face-&gt;glyph, FT_RENDER_MODE_LCD );
</pre>
<p>In general, you should stick with one rendering mode. For example, switching between <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_NORMAL</a> and <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_MONO</a> enforces a lot of recomputation for TrueType fonts, which is slow. Another reason is caching: Selecting a different mode usually causes changes in both the outlines and the rasterized bitmaps; it is thus necessary to empty the cache after a mode switch to avoid false hits.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_XXX</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
#define <a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS">FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS</a>          1
#define <a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES">FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES</a>      2
#define <a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID">FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID</a>        4
#define <a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_SCALE">FT_SUBGLYPH_FLAG_SCALE</a>                   8
#define <a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XY_SCALE">FT_SUBGLYPH_FLAG_XY_SCALE</a>             0x40
#define <a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_2X2">FT_SUBGLYPH_FLAG_2X2</a>                  0x80
#define <a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_USE_MY_METRICS">FT_SUBGLYPH_FLAG_USE_MY_METRICS</a>      0x200
</pre>

<p>A list of constants describing subglyphs. Please refer to the &lsquo;glyf&rsquo; table description in the OpenType specification for the meaning of the various flags (which get synthesized for non-OpenType subglyphs).</p>

<h4>values</h4>
<table class="fields">
<tr><td class="val" id="FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS">FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES">FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID">FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="FT_SUBGLYPH_FLAG_SCALE">FT_SUBGLYPH_FLAG_SCALE</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="FT_SUBGLYPH_FLAG_XY_SCALE">FT_SUBGLYPH_FLAG_XY_SCALE</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="FT_SUBGLYPH_FLAG_2X2">FT_SUBGLYPH_FLAG_2X2</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="FT_SUBGLYPH_FLAG_USE_MY_METRICS">FT_SUBGLYPH_FLAG_USE_MY_METRICS</td><td class="desc">
<p></p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_FSTYPE_XXX">FT_FSTYPE_XXX</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
#define <a href="ft2-base_interface.html#FT_FSTYPE_INSTALLABLE_EMBEDDING">FT_FSTYPE_INSTALLABLE_EMBEDDING</a>         0x0000
#define <a href="ft2-base_interface.html#FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING">FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING</a>  0x0002
#define <a href="ft2-base_interface.html#FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING">FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING</a>   0x0004
#define <a href="ft2-base_interface.html#FT_FSTYPE_EDITABLE_EMBEDDING">FT_FSTYPE_EDITABLE_EMBEDDING</a>            0x0008
#define <a href="ft2-base_interface.html#FT_FSTYPE_NO_SUBSETTING">FT_FSTYPE_NO_SUBSETTING</a>                 0x0100
#define <a href="ft2-base_interface.html#FT_FSTYPE_BITMAP_EMBEDDING_ONLY">FT_FSTYPE_BITMAP_EMBEDDING_ONLY</a>         0x0200
</pre>

<p>A list of bit flags used in the &lsquo;fsType&rsquo; field of the OS/2 table in a TrueType or OpenType font and the &lsquo;FSType&rsquo; entry in a PostScript font. These bit flags are returned by <a href="ft2-base_interface.html#FT_Get_FSType_Flags">FT_Get_FSType_Flags</a>; they inform client applications of embedding and subsetting restrictions associated with a font.</p>
<p>See <a href="https://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/FontPolicies.pdf">https://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/FontPolicies.pdf</a> for more details.</p>

<h4>values</h4>
<table class="fields">
<tr><td class="val" id="FT_FSTYPE_INSTALLABLE_EMBEDDING">FT_FSTYPE_INSTALLABLE_EMBEDDING</td><td class="desc">
<p>Fonts with no fsType bit set may be embedded and permanently installed on the remote system by an application.</p>
</td></tr>
<tr><td class="val" id="FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING">FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING</td><td class="desc">
<p>Fonts that have only this bit set must not be modified, embedded or exchanged in any manner without first obtaining permission of the font software copyright owner.</p>
</td></tr>
<tr><td class="val" id="FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING">FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING</td><td class="desc">
<p>The font may be embedded and temporarily loaded on the remote system. Documents containing Preview &amp; Print fonts must be opened &lsquo;read-only&rsquo;; no edits can be applied to the document.</p>
</td></tr>
<tr><td class="val" id="FT_FSTYPE_EDITABLE_EMBEDDING">FT_FSTYPE_EDITABLE_EMBEDDING</td><td class="desc">
<p>The font may be embedded but must only be installed temporarily on other systems. In contrast to Preview &amp; Print fonts, documents containing editable fonts may be opened for reading, editing is permitted, and changes may be saved.</p>
</td></tr>
<tr><td class="val" id="FT_FSTYPE_NO_SUBSETTING">FT_FSTYPE_NO_SUBSETTING</td><td class="desc">
<p>The font may not be subsetted prior to embedding.</p>
</td></tr>
<tr><td class="val" id="FT_FSTYPE_BITMAP_EMBEDDING_ONLY">FT_FSTYPE_BITMAP_EMBEDDING_ONLY</td><td class="desc">
<p>Only bitmaps contained in the font may be embedded; no outline data may be embedded. If there are no bitmaps available in the font, then the font is unembeddable.</p>
</td></tr>
</table>

<h4>note</h4>
<p>The flags are ORed together, thus more than a single value can be returned.</p>
<p>While the &lsquo;fsType&rsquo; flags can indicate that a font may be embedded, a license with the font vendor may be separately required to use the font in this way.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_HAS_FAST_GLYPHS">FT_HAS_FAST_GLYPHS</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
#define <b>FT_HAS_FAST_GLYPHS</b>( face )  0
</pre>

<p>Deprecated.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

</body>
</html>
reference/ft2-basic_types.html000064400000126161151706766400012411 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF;
         width: 87%;
         margin: auto; }

  div.section { width: 75%;
                margin: auto; }
  div.section hr { margin: 4ex 0 1ex 0; }
  div.section h4 { background-color: #EEEEFF;
                   font-size: medium;
                   font-style: oblique;
                   font-weight: bold;
                   margin: 3ex 0 1.5ex 9%;
                   padding: 0.3ex 0 0.3ex 1%; }
  div.section p { margin: 1.5ex 0 1.5ex 10%; }
  div.section pre { margin: 3ex 0 3ex 9%;
                    background-color: #D6E8FF;
                    padding: 2ex 0 2ex 1%; }
  div.section table.fields { width: 90%;
                             margin: 1.5ex 0 1.5ex 10%; }
  div.section table.toc { width: 95%;
                          margin: 1.5ex 0 1.5ex 5%; }
  div.timestamp { text-align: center;
                  font-size: 69%;
                  margin: 1.5ex 0 1.5ex 0; }

  h1 { text-align: center; }
  h3 { font-size: medium;
       margin: 4ex 0 1.5ex 0; }

  p { text-align: justify; }

  pre.colored { color: blue; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  table.fields td.val { font-weight: bold;
                        text-align: right;
                        width: 30%;
                        vertical-align: baseline;
                        padding: 1ex 1em 1ex 0; }
  table.fields td.desc { vertical-align: baseline;
                         padding: 1ex 0 1ex 1em; }
  table.fields td.desc p:first-child { margin: 0; }
  table.fields td.desc p { margin: 1.5ex 0 0 0; }
  table.index { margin: 6ex auto 6ex auto;
                border: 0;
                border-collapse: separate;
                border-spacing: 1em 0.3ex; }
  table.index tr { padding: 0; }
  table.index td { padding: 0; }
  table.index-toc-link { width: 100%;
                         border: 0;
                         border-spacing: 0;
                         margin: 1ex 0 1ex 0; }
  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
                                 font-size: 83%;
                                 text-align: left; }
  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
                                   font-size: 83%;
                                   text-align: center; }
  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
                                  font-size: 83%;
                                  text-align: right; }
  table.synopsis { margin: 6ex auto 6ex auto;
                   border: 0;
                   border-collapse: separate;
                   border-spacing: 2em 0.6ex; }
  table.synopsis tr { padding: 0; }
  table.synopsis td { padding: 0; }
  table.toc td.link { width: 30%;
                      text-align: right;
                      vertical-align: baseline;
                      padding: 1ex 1em 1ex 0; }
  table.toc td.desc { vertical-align: baseline;
                      padding: 1ex 0 1ex 1em;
                      text-align: left; }
  table.toc td.desc p:first-child { margin: 0;
                                    text-align: left; }
  table.toc td.desc p { margin: 1.5ex 0 0 0;
                        text-align: left; }

</style>
</head>
<body>

<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
<h1>FreeType-2.9.1 API Reference</h1>

<h1 id="basic_types">Basic Data Types</h1>
<h2>Synopsis</h2>
<table class="synopsis">
<tr><td><a href="#FT_Byte">FT_Byte</a></td><td><a href="#FT_Bool">FT_Bool</a></td><td><a href="#FT_UnitVector">FT_UnitVector</a></td></tr>
<tr><td><a href="#FT_Bytes">FT_Bytes</a></td><td><a href="#FT_Offset">FT_Offset</a></td><td><a href="#FT_F26Dot6">FT_F26Dot6</a></td></tr>
<tr><td><a href="#FT_Char">FT_Char</a></td><td><a href="#FT_PtrDist">FT_PtrDist</a></td><td><a href="#FT_Data">FT_Data</a></td></tr>
<tr><td><a href="#FT_Int">FT_Int</a></td><td><a href="#FT_String">FT_String</a></td><td>&nbsp;</td></tr>
<tr><td><a href="#FT_UInt">FT_UInt</a></td><td><a href="#FT_Tag">FT_Tag</a></td><td><a href="#FT_MAKE_TAG">FT_MAKE_TAG</a></td></tr>
<tr><td><a href="#FT_Int16">FT_Int16</a></td><td><a href="#FT_Error">FT_Error</a></td><td>&nbsp;</td></tr>
<tr><td><a href="#FT_UInt16">FT_UInt16</a></td><td><a href="#FT_Fixed">FT_Fixed</a></td><td><a href="#FT_Generic">FT_Generic</a></td></tr>
<tr><td><a href="#FT_Int32">FT_Int32</a></td><td><a href="#FT_Pointer">FT_Pointer</a></td><td><a href="#FT_Generic_Finalizer">FT_Generic_Finalizer</a></td></tr>
<tr><td><a href="#FT_UInt32">FT_UInt32</a></td><td><a href="#FT_Pos">FT_Pos</a></td><td>&nbsp;</td></tr>
<tr><td><a href="#FT_Int64">FT_Int64</a></td><td><a href="#FT_Vector">FT_Vector</a></td><td><a href="#FT_Bitmap">FT_Bitmap</a></td></tr>
<tr><td><a href="#FT_UInt64">FT_UInt64</a></td><td><a href="#FT_BBox">FT_BBox</a></td><td><a href="#FT_Pixel_Mode">FT_Pixel_Mode</a></td></tr>
<tr><td><a href="#FT_Short">FT_Short</a></td><td><a href="#FT_Matrix">FT_Matrix</a></td><td><a href="#FT_Palette_Mode">FT_Palette_Mode</a></td></tr>
<tr><td><a href="#FT_UShort">FT_UShort</a></td><td><a href="#FT_FWord">FT_FWord</a></td><td><a href="#FT_Glyph_Format">FT_Glyph_Format</a></td></tr>
<tr><td><a href="#FT_Long">FT_Long</a></td><td><a href="#FT_UFWord">FT_UFWord</a></td><td><a href="#FT_IMAGE_TAG">FT_IMAGE_TAG</a></td></tr>
<tr><td><a href="#FT_ULong">FT_ULong</a></td><td><a href="#FT_F2Dot14">FT_F2Dot14</a></td><td></td></tr>
</table>


<p>This section contains the basic data types defined by FreeType&nbsp;2, ranging from simple scalar types to bitmap descriptors. More font-specific structures are defined in a different section.</p>

<div class="section">
<h3 id="FT_Byte">FT_Byte</h3>
<p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">unsigned</span> <span class="keyword">char</span>  <b>FT_Byte</b>;
</pre>

<p>A simple typedef for the <i>unsigned</i> char type.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Bytes">FT_Bytes</h3>
<p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>*  <b>FT_Bytes</b>;
</pre>

<p>A typedef for constant memory areas.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Char">FT_Char</h3>
<p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="keyword">char</span>  <b>FT_Char</b>;
</pre>

<p>A simple typedef for the <i>signed</i> char type.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Int">FT_Int</h3>
<p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="keyword">int</span>  <b>FT_Int</b>;
</pre>

<p>A typedef for the int type.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_UInt">FT_UInt</h3>
<p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">unsigned</span> <span class="keyword">int</span>  <b>FT_UInt</b>;
</pre>

<p>A typedef for the unsigned int type.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Int16">FT_Int16</h3>
<p>Defined in FT_CONFIG_CONFIG_H (freetype/config/ftconfig.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="keyword">short</span>  <b>FT_Int16</b>;
</pre>

<p>A typedef for a 16bit signed integer type.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_UInt16">FT_UInt16</h3>
<p>Defined in FT_CONFIG_CONFIG_H (freetype/config/ftconfig.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">unsigned</span> <span class="keyword">short</span>  <b>FT_UInt16</b>;
</pre>

<p>A typedef for a 16bit unsigned integer type.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Int32">FT_Int32</h3>
<p>Defined in FT_CONFIG_CONFIG_H (freetype/config/ftconfig.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">signed</span> XXX  <b>FT_Int32</b>;
</pre>

<p>A typedef for a 32bit signed integer type. The size depends on the configuration.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_UInt32">FT_UInt32</h3>
<p>Defined in FT_CONFIG_CONFIG_H (freetype/config/ftconfig.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">unsigned</span> XXX  <b>FT_UInt32</b>;
</pre>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Int64">FT_Int64</h3>
<p>Defined in FT_CONFIG_CONFIG_H (freetype/config/ftconfig.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">signed</span> XXX  <b>FT_Int64</b>;
</pre>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_UInt64">FT_UInt64</h3>
<p>Defined in FT_CONFIG_CONFIG_H (freetype/config/ftconfig.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">unsigned</span> XXX  <b>FT_UInt64</b>;
</pre>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Short">FT_Short</h3>
<p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="keyword">short</span>  <b>FT_Short</b>;
</pre>

<p>A typedef for signed short.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_UShort">FT_UShort</h3>
<p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">unsigned</span> <span class="keyword">short</span>  <b>FT_UShort</b>;
</pre>

<p>A typedef for unsigned short.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Long">FT_Long</h3>
<p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="keyword">long</span>  <b>FT_Long</b>;
</pre>

<p>A typedef for signed long.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_ULong">FT_ULong</h3>
<p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">unsigned</span> <span class="keyword">long</span>  <b>FT_ULong</b>;
</pre>

<p>A typedef for unsigned long.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Bool">FT_Bool</h3>
<p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">unsigned</span> <span class="keyword">char</span>  <b>FT_Bool</b>;
</pre>

<p>A typedef of unsigned char, used for simple booleans. As usual, values 1 and&nbsp;0 represent true and false, respectively.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Offset">FT_Offset</h3>
<p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
<pre>
  <span class="keyword">typedef</span> size_t  <b>FT_Offset</b>;
</pre>

<p>This is equivalent to the ANSI&nbsp;C &lsquo;size_t&rsquo; type, i.e., the largest <i>unsigned</i> integer type used to express a file size or position, or a memory block size.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_PtrDist">FT_PtrDist</h3>
<p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
<pre>
  <span class="keyword">typedef</span> ft_ptrdiff_t  <b>FT_PtrDist</b>;
</pre>

<p>This is equivalent to the ANSI&nbsp;C &lsquo;ptrdiff_t&rsquo; type, i.e., the largest <i>signed</i> integer type used to express the distance between two pointers.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_String">FT_String</h3>
<p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">char</span>  <b>FT_String</b>;
</pre>

<p>A simple typedef for the char type, usually used for strings.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Tag">FT_Tag</h3>
<p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
<pre>
  <span class="keyword">typedef</span> <a href="ft2-basic_types.html#FT_UInt32">FT_UInt32</a>  <b>FT_Tag</b>;
</pre>

<p>A typedef for 32-bit tags (as used in the SFNT format).</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Error">FT_Error</h3>
<p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">int</span>  <b>FT_Error</b>;
</pre>

<p>The FreeType error code type. A value of&nbsp;0 is always interpreted as a successful operation.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Fixed">FT_Fixed</h3>
<p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="keyword">long</span>  <b>FT_Fixed</b>;
</pre>

<p>This type is used to store 16.16 fixed-point values, like scaling values or matrix coefficients.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Pointer">FT_Pointer</h3>
<p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">void</span>*  <b>FT_Pointer</b>;
</pre>

<p>A simple typedef for a typeless pointer.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Pos">FT_Pos</h3>
<p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="keyword">long</span>  <b>FT_Pos</b>;
</pre>

<p>The type FT_Pos is used to store vectorial coordinates. Depending on the context, these can represent distances in integer font units, or 16.16, or 26.6 fixed-point pixel coordinates.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Vector">FT_Vector</h3>
<p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_Vector_
  {
    <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a>  x;
    <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a>  y;

  } <b>FT_Vector</b>;
</pre>

<p>A simple structure used to store a 2D vector; coordinates are of the FT_Pos type.</p>

<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="x">x</td><td class="desc">
<p>The horizontal coordinate.</p>
</td></tr>
<tr><td class="val" id="y">y</td><td class="desc">
<p>The vertical coordinate.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_BBox">FT_BBox</h3>
<p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_BBox_
  {
    <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a>  xMin, yMin;
    <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a>  xMax, yMax;

  } <b>FT_BBox</b>;
</pre>

<p>A structure used to hold an outline's bounding box, i.e., the coordinates of its extrema in the horizontal and vertical directions.</p>

<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="xMin">xMin</td><td class="desc">
<p>The horizontal minimum (left-most).</p>
</td></tr>
<tr><td class="val" id="yMin">yMin</td><td class="desc">
<p>The vertical minimum (bottom-most).</p>
</td></tr>
<tr><td class="val" id="xMax">xMax</td><td class="desc">
<p>The horizontal maximum (right-most).</p>
</td></tr>
<tr><td class="val" id="yMax">yMax</td><td class="desc">
<p>The vertical maximum (top-most).</p>
</td></tr>
</table>

<h4>note</h4>
<p>The bounding box is specified with the coordinates of the lower left and the upper right corner. In PostScript, those values are often called (llx,lly) and (urx,ury), respectively.</p>
<p>If &lsquo;yMin&rsquo; is negative, this value gives the glyph's descender. Otherwise, the glyph doesn't descend below the baseline. Similarly, if &lsquo;ymax&rsquo; is positive, this value gives the glyph's ascender.</p>
<p>&lsquo;xMin&rsquo; gives the horizontal distance from the glyph's origin to the left edge of the glyph's bounding box. If &lsquo;xMin&rsquo; is negative, the glyph extends to the left of the origin.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Matrix">FT_Matrix</h3>
<p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_Matrix_
  {
    <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>  xx, xy;
    <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>  yx, yy;

  } <b>FT_Matrix</b>;
</pre>

<p>A simple structure used to store a 2x2 matrix. Coefficients are in 16.16 fixed-point format. The computation performed is:</p>
<pre class="colored">
   x' = x*xx + y*xy
   y' = x*yx + y*yy
</pre>

<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="xx">xx</td><td class="desc">
<p>Matrix coefficient.</p>
</td></tr>
<tr><td class="val" id="xy">xy</td><td class="desc">
<p>Matrix coefficient.</p>
</td></tr>
<tr><td class="val" id="yx">yx</td><td class="desc">
<p>Matrix coefficient.</p>
</td></tr>
<tr><td class="val" id="yy">yy</td><td class="desc">
<p>Matrix coefficient.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_FWord">FT_FWord</h3>
<p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="keyword">short</span>  <b>FT_FWord</b>;   /* distance in FUnits */
</pre>

<p>A signed 16-bit integer used to store a distance in original font units.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_UFWord">FT_UFWord</h3>
<p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">unsigned</span> <span class="keyword">short</span>  <b>FT_UFWord</b>;  /* <span class="keyword">unsigned</span> distance */
</pre>

<p>An unsigned 16-bit integer used to store a distance in original font units.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_F2Dot14">FT_F2Dot14</h3>
<p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="keyword">short</span>  <b>FT_F2Dot14</b>;
</pre>

<p>A signed 2.14 fixed-point type used for unit vectors.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_UnitVector">FT_UnitVector</h3>
<p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_UnitVector_
  {
    <a href="ft2-basic_types.html#FT_F2Dot14">FT_F2Dot14</a>  x;
    <a href="ft2-basic_types.html#FT_F2Dot14">FT_F2Dot14</a>  y;

  } <b>FT_UnitVector</b>;
</pre>

<p>A simple structure used to store a 2D vector unit vector. Uses FT_F2Dot14 types.</p>

<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="x">x</td><td class="desc">
<p>Horizontal coordinate.</p>
</td></tr>
<tr><td class="val" id="y">y</td><td class="desc">
<p>Vertical coordinate.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_F26Dot6">FT_F26Dot6</h3>
<p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="keyword">long</span>  <b>FT_F26Dot6</b>;
</pre>

<p>A signed 26.6 fixed-point type used for vectorial pixel coordinates.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Data">FT_Data</h3>
<p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_Data_
  {
    <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>*  pointer;
    <a href="ft2-basic_types.html#FT_Int">FT_Int</a>          length;

  } <b>FT_Data</b>;
</pre>

<p>Read-only binary data represented as a pointer and a length.</p>

<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="pointer">pointer</td><td class="desc">
<p>The data.</p>
</td></tr>
<tr><td class="val" id="length">length</td><td class="desc">
<p>The length of the data in bytes.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_MAKE_TAG">FT_MAKE_TAG</h3>
<p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
<pre>
#define <b>FT_MAKE_TAG</b>( _x1, _x2, _x3, _x4 ) \
          (<a href="ft2-basic_types.html#FT_Tag">FT_Tag</a>)                        \
          ( ( (<a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>)_x1 &lt;&lt; 24 ) |     \
            ( (<a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>)_x2 &lt;&lt; 16 ) |     \
            ( (<a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>)_x3 &lt;&lt;  8 ) |     \
              (<a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>)_x4         )
</pre>

<p>This macro converts four-letter tags that are used to label TrueType tables into an unsigned long, to be used within FreeType.</p>

<h4>note</h4>
<p>The produced values <b>must</b> be 32-bit integers. Don't redefine this macro.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Generic">FT_Generic</h3>
<p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_Generic_
  {
    <span class="keyword">void</span>*                 data;
    <a href="ft2-basic_types.html#FT_Generic_Finalizer">FT_Generic_Finalizer</a>  finalizer;

  } <b>FT_Generic</b>;
</pre>

<p>Client applications often need to associate their own data to a variety of FreeType core objects. For example, a text layout API might want to associate a glyph cache to a given size object.</p>
<p>Some FreeType object contains a &lsquo;generic&rsquo; field, of type FT_Generic, which usage is left to client applications and font servers.</p>
<p>It can be used to store a pointer to client-specific data, as well as the address of a &lsquo;finalizer&rsquo; function, which will be called by FreeType when the object is destroyed (for example, the previous client example would put the address of the glyph cache destructor in the &lsquo;finalizer&rsquo; field).</p>

<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="data">data</td><td class="desc">
<p>A typeless pointer to any client-specified data. This field is completely ignored by the FreeType library.</p>
</td></tr>
<tr><td class="val" id="finalizer">finalizer</td><td class="desc">
<p>A pointer to a &lsquo;generic finalizer&rsquo; function, which will be called when the object is destroyed. If this field is set to NULL, no code will be called.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Generic_Finalizer">FT_Generic_Finalizer</h3>
<p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">void</span>  (*<b>FT_Generic_Finalizer</b>)( <span class="keyword">void</span>*  object );
</pre>

<p>Describe a function used to destroy the &lsquo;client&rsquo; data of any FreeType object. See the description of the <a href="ft2-basic_types.html#FT_Generic">FT_Generic</a> type for details of usage.</p>

<h4>input</h4>
<p>The address of the FreeType object that is under finalization. Its client data is accessed through its &lsquo;generic&rsquo; field.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Bitmap">FT_Bitmap</h3>
<p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_Bitmap_
  {
    <span class="keyword">unsigned</span> <span class="keyword">int</span>    rows;
    <span class="keyword">unsigned</span> <span class="keyword">int</span>    width;
    <span class="keyword">int</span>             pitch;
    <span class="keyword">unsigned</span> <span class="keyword">char</span>*  buffer;
    <span class="keyword">unsigned</span> <span class="keyword">short</span>  num_grays;
    <span class="keyword">unsigned</span> <span class="keyword">char</span>   pixel_mode;
    <span class="keyword">unsigned</span> <span class="keyword">char</span>   palette_mode;
    <span class="keyword">void</span>*           palette;

  } <b>FT_Bitmap</b>;
</pre>

<p>A structure used to describe a bitmap or pixmap to the raster. Note that we now manage pixmaps of various depths through the &lsquo;pixel_mode&rsquo; field.</p>

<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="rows">rows</td><td class="desc">
<p>The number of bitmap rows.</p>
</td></tr>
<tr><td class="val" id="width">width</td><td class="desc">
<p>The number of pixels in bitmap row.</p>
</td></tr>
<tr><td class="val" id="pitch">pitch</td><td class="desc">
<p>The pitch's absolute value is the number of bytes taken by one bitmap row, including padding. However, the pitch is positive when the bitmap has a &lsquo;down&rsquo; flow, and negative when it has an &lsquo;up&rsquo; flow. In all cases, the pitch is an offset to add to a bitmap pointer in order to go down one row.</p>
<p>Note that &lsquo;padding&rsquo; means the alignment of a bitmap to a byte border, and FreeType functions normally align to the smallest possible integer value.</p>
<p>For the B/W rasterizer, &lsquo;pitch&rsquo; is always an even number.</p>
<p>To change the pitch of a bitmap (say, to make it a multiple of 4), use <a href="ft2-bitmap_handling.html#FT_Bitmap_Convert">FT_Bitmap_Convert</a>. Alternatively, you might use callback functions to directly render to the application's surface; see the file &lsquo;example2.cpp&rsquo; in the tutorial for a demonstration.</p>
</td></tr>
<tr><td class="val" id="buffer">buffer</td><td class="desc">
<p>A typeless pointer to the bitmap buffer. This value should be aligned on 32-bit boundaries in most cases.</p>
</td></tr>
<tr><td class="val" id="num_grays">num_grays</td><td class="desc">
<p>This field is only used with <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_GRAY</a>; it gives the number of gray levels used in the bitmap.</p>
</td></tr>
<tr><td class="val" id="pixel_mode">pixel_mode</td><td class="desc">
<p>The pixel mode, i.e., how pixel bits are stored. See <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_Pixel_Mode</a> for possible values.</p>
</td></tr>
<tr><td class="val" id="palette_mode">palette_mode</td><td class="desc">
<p>This field is intended for paletted pixel modes; it indicates how the palette is stored. Not used currently.</p>
</td></tr>
<tr><td class="val" id="palette">palette</td><td class="desc">
<p>A typeless pointer to the bitmap palette; this field is intended for paletted pixel modes. Not used currently.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Pixel_Mode">FT_Pixel_Mode</h3>
<p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">enum</span>  FT_Pixel_Mode_
  {
    <a href="ft2-basic_types.html#FT_PIXEL_MODE_NONE">FT_PIXEL_MODE_NONE</a> = 0,
    <a href="ft2-basic_types.html#FT_PIXEL_MODE_MONO">FT_PIXEL_MODE_MONO</a>,
    <a href="ft2-basic_types.html#FT_PIXEL_MODE_GRAY">FT_PIXEL_MODE_GRAY</a>,
    <a href="ft2-basic_types.html#FT_PIXEL_MODE_GRAY2">FT_PIXEL_MODE_GRAY2</a>,
    <a href="ft2-basic_types.html#FT_PIXEL_MODE_GRAY4">FT_PIXEL_MODE_GRAY4</a>,
    <a href="ft2-basic_types.html#FT_PIXEL_MODE_LCD">FT_PIXEL_MODE_LCD</a>,
    <a href="ft2-basic_types.html#FT_PIXEL_MODE_LCD_V">FT_PIXEL_MODE_LCD_V</a>,
    <a href="ft2-basic_types.html#FT_PIXEL_MODE_BGRA">FT_PIXEL_MODE_BGRA</a>,

    FT_PIXEL_MODE_MAX      /* do not remove */

  } <b>FT_Pixel_Mode</b>;


  /* these constants are deprecated; use the corresponding `<b>FT_Pixel_Mode</b>' */
  /* values instead.                                                       */
#define ft_pixel_mode_none   <a href="ft2-basic_types.html#FT_PIXEL_MODE_NONE">FT_PIXEL_MODE_NONE</a>
#define ft_pixel_mode_mono   <a href="ft2-basic_types.html#FT_PIXEL_MODE_MONO">FT_PIXEL_MODE_MONO</a>
#define ft_pixel_mode_grays  <a href="ft2-basic_types.html#FT_PIXEL_MODE_GRAY">FT_PIXEL_MODE_GRAY</a>
#define ft_pixel_mode_pal2   <a href="ft2-basic_types.html#FT_PIXEL_MODE_GRAY2">FT_PIXEL_MODE_GRAY2</a>
#define ft_pixel_mode_pal4   <a href="ft2-basic_types.html#FT_PIXEL_MODE_GRAY4">FT_PIXEL_MODE_GRAY4</a>
</pre>

<p>An enumeration type used to describe the format of pixels in a given bitmap. Note that additional formats may be added in the future.</p>

<h4>values</h4>
<table class="fields">
<tr><td class="val" id="FT_PIXEL_MODE_NONE">FT_PIXEL_MODE_NONE</td><td class="desc">
<p>Value&nbsp;0 is reserved.</p>
</td></tr>
<tr><td class="val" id="FT_PIXEL_MODE_MONO">FT_PIXEL_MODE_MONO</td><td class="desc">
<p>A monochrome bitmap, using 1&nbsp;bit per pixel. Note that pixels are stored in most-significant order (MSB), which means that the left-most pixel in a byte has value 128.</p>
</td></tr>
<tr><td class="val" id="FT_PIXEL_MODE_GRAY">FT_PIXEL_MODE_GRAY</td><td class="desc">
<p>An 8-bit bitmap, generally used to represent anti-aliased glyph images. Each pixel is stored in one byte. Note that the number of &lsquo;gray&rsquo; levels is stored in the &lsquo;num_grays&rsquo; field of the <a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a> structure (it generally is 256).</p>
</td></tr>
<tr><td class="val" id="FT_PIXEL_MODE_GRAY2">FT_PIXEL_MODE_GRAY2</td><td class="desc">
<p>A 2-bit per pixel bitmap, used to represent embedded anti-aliased bitmaps in font files according to the OpenType specification. We haven't found a single font using this format, however.</p>
</td></tr>
<tr><td class="val" id="FT_PIXEL_MODE_GRAY4">FT_PIXEL_MODE_GRAY4</td><td class="desc">
<p>A 4-bit per pixel bitmap, representing embedded anti-aliased bitmaps in font files according to the OpenType specification. We haven't found a single font using this format, however.</p>
</td></tr>
<tr><td class="val" id="FT_PIXEL_MODE_LCD">FT_PIXEL_MODE_LCD</td><td class="desc">
<p>An 8-bit bitmap, representing RGB or BGR decimated glyph images used for display on LCD displays; the bitmap is three times wider than the original glyph image. See also <a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_LCD</a>.</p>
</td></tr>
<tr><td class="val" id="FT_PIXEL_MODE_LCD_V">FT_PIXEL_MODE_LCD_V</td><td class="desc">
<p>An 8-bit bitmap, representing RGB or BGR decimated glyph images used for display on rotated LCD displays; the bitmap is three times taller than the original glyph image. See also <a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_LCD_V</a>.</p>
</td></tr>
<tr><td class="val" id="FT_PIXEL_MODE_BGRA">FT_PIXEL_MODE_BGRA</td><td class="desc">
<p>[Since 2.5] An image with four 8-bit channels per pixel, representing a color image (such as emoticons) with alpha channel. For each pixel, the format is BGRA, which means, the blue channel comes first in memory. The color channels are pre-multiplied and in the sRGB colorspace. For example, full red at half-translucent opacity will be represented as &lsquo;00,00,80,80&rsquo;, not &lsquo;00,00,FF,80&rsquo;. See also <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_COLOR</a>.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Glyph_Format">FT_Glyph_Format</h3>
<p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">enum</span>  FT_Glyph_Format_
  {
    <a href="ft2-basic_types.html#FT_IMAGE_TAG">FT_IMAGE_TAG</a>( <a href="ft2-basic_types.html#FT_GLYPH_FORMAT_NONE">FT_GLYPH_FORMAT_NONE</a>, 0, 0, 0, 0 ),

    <a href="ft2-basic_types.html#FT_IMAGE_TAG">FT_IMAGE_TAG</a>( <a href="ft2-basic_types.html#FT_GLYPH_FORMAT_COMPOSITE">FT_GLYPH_FORMAT_COMPOSITE</a>, 'c', 'o', 'm', 'p' ),
    <a href="ft2-basic_types.html#FT_IMAGE_TAG">FT_IMAGE_TAG</a>( <a href="ft2-basic_types.html#FT_GLYPH_FORMAT_BITMAP">FT_GLYPH_FORMAT_BITMAP</a>,    'b', 'i', 't', 's' ),
    <a href="ft2-basic_types.html#FT_IMAGE_TAG">FT_IMAGE_TAG</a>( <a href="ft2-basic_types.html#FT_GLYPH_FORMAT_OUTLINE">FT_GLYPH_FORMAT_OUTLINE</a>,   'o', 'u', 't', 'l' ),
    <a href="ft2-basic_types.html#FT_IMAGE_TAG">FT_IMAGE_TAG</a>( <a href="ft2-basic_types.html#FT_GLYPH_FORMAT_PLOTTER">FT_GLYPH_FORMAT_PLOTTER</a>,   'p', 'l', 'o', 't' )

  } <b>FT_Glyph_Format</b>;


  /* these constants are deprecated; use the corresponding */
  /* `<b>FT_Glyph_Format</b>' values instead.                     */
#define ft_glyph_format_none       <a href="ft2-basic_types.html#FT_GLYPH_FORMAT_NONE">FT_GLYPH_FORMAT_NONE</a>
#define ft_glyph_format_composite  <a href="ft2-basic_types.html#FT_GLYPH_FORMAT_COMPOSITE">FT_GLYPH_FORMAT_COMPOSITE</a>
#define ft_glyph_format_bitmap     <a href="ft2-basic_types.html#FT_GLYPH_FORMAT_BITMAP">FT_GLYPH_FORMAT_BITMAP</a>
#define ft_glyph_format_outline    <a href="ft2-basic_types.html#FT_GLYPH_FORMAT_OUTLINE">FT_GLYPH_FORMAT_OUTLINE</a>
#define ft_glyph_format_plotter    <a href="ft2-basic_types.html#FT_GLYPH_FORMAT_PLOTTER">FT_GLYPH_FORMAT_PLOTTER</a>
</pre>

<p>An enumeration type used to describe the format of a given glyph image. Note that this version of FreeType only supports two image formats, even though future font drivers will be able to register their own format.</p>

<h4>values</h4>
<table class="fields">
<tr><td class="val" id="FT_GLYPH_FORMAT_NONE">FT_GLYPH_FORMAT_NONE</td><td class="desc">
<p>The value&nbsp;0 is reserved.</p>
</td></tr>
<tr><td class="val" id="FT_GLYPH_FORMAT_COMPOSITE">FT_GLYPH_FORMAT_COMPOSITE</td><td class="desc">
<p>The glyph image is a composite of several other images. This format is <i>only</i> used with <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_RECURSE</a>, and is used to report compound glyphs (like accented characters).</p>
</td></tr>
<tr><td class="val" id="FT_GLYPH_FORMAT_BITMAP">FT_GLYPH_FORMAT_BITMAP</td><td class="desc">
<p>The glyph image is a bitmap, and can be described as an <a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a>. You generally need to access the &lsquo;bitmap&rsquo; field of the <a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a> structure to read it.</p>
</td></tr>
<tr><td class="val" id="FT_GLYPH_FORMAT_OUTLINE">FT_GLYPH_FORMAT_OUTLINE</td><td class="desc">
<p>The glyph image is a vectorial outline made of line segments and Bezier arcs; it can be described as an <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>; you generally want to access the &lsquo;outline&rsquo; field of the <a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a> structure to read it.</p>
</td></tr>
<tr><td class="val" id="FT_GLYPH_FORMAT_PLOTTER">FT_GLYPH_FORMAT_PLOTTER</td><td class="desc">
<p>The glyph image is a vectorial path with no inside and outside contours. Some Type&nbsp;1 fonts, like those in the Hershey family, contain glyphs in this format. These are described as <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>, but FreeType isn't currently capable of rendering them correctly.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_IMAGE_TAG">FT_IMAGE_TAG</h3>
<p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
<pre>
#ifndef <b>FT_IMAGE_TAG</b>
#define <b>FT_IMAGE_TAG</b>( value, _x1, _x2, _x3, _x4 )  \
          value = ( ( (<span class="keyword">unsigned</span> <span class="keyword">long</span>)_x1 &lt;&lt; 24 ) | \
                    ( (<span class="keyword">unsigned</span> <span class="keyword">long</span>)_x2 &lt;&lt; 16 ) | \
                    ( (<span class="keyword">unsigned</span> <span class="keyword">long</span>)_x3 &lt;&lt; 8  ) | \
                      (<span class="keyword">unsigned</span> <span class="keyword">long</span>)_x4         )
#endif /* <b>FT_IMAGE_TAG</b> */
</pre>

<p>This macro converts four-letter tags to an unsigned long type.</p>

<h4>note</h4>
<p>Since many 16-bit compilers don't like 32-bit enumerations, you should redefine this macro in case of problems to something like this:</p>
<pre class="colored">
  #define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 )  value
</pre>
<p>to get a simple enumeration without assigning special numbers.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

</body>
</html>
reference/ft2-bdf_fonts.html000064400000027034151706766400012047 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF;
         width: 87%;
         margin: auto; }

  div.section { width: 75%;
                margin: auto; }
  div.section hr { margin: 4ex 0 1ex 0; }
  div.section h4 { background-color: #EEEEFF;
                   font-size: medium;
                   font-style: oblique;
                   font-weight: bold;
                   margin: 3ex 0 1.5ex 9%;
                   padding: 0.3ex 0 0.3ex 1%; }
  div.section p { margin: 1.5ex 0 1.5ex 10%; }
  div.section pre { margin: 3ex 0 3ex 9%;
                    background-color: #D6E8FF;
                    padding: 2ex 0 2ex 1%; }
  div.section table.fields { width: 90%;
                             margin: 1.5ex 0 1.5ex 10%; }
  div.section table.toc { width: 95%;
                          margin: 1.5ex 0 1.5ex 5%; }
  div.timestamp { text-align: center;
                  font-size: 69%;
                  margin: 1.5ex 0 1.5ex 0; }

  h1 { text-align: center; }
  h3 { font-size: medium;
       margin: 4ex 0 1.5ex 0; }

  p { text-align: justify; }

  pre.colored { color: blue; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  table.fields td.val { font-weight: bold;
                        text-align: right;
                        width: 30%;
                        vertical-align: baseline;
                        padding: 1ex 1em 1ex 0; }
  table.fields td.desc { vertical-align: baseline;
                         padding: 1ex 0 1ex 1em; }
  table.fields td.desc p:first-child { margin: 0; }
  table.fields td.desc p { margin: 1.5ex 0 0 0; }
  table.index { margin: 6ex auto 6ex auto;
                border: 0;
                border-collapse: separate;
                border-spacing: 1em 0.3ex; }
  table.index tr { padding: 0; }
  table.index td { padding: 0; }
  table.index-toc-link { width: 100%;
                         border: 0;
                         border-spacing: 0;
                         margin: 1ex 0 1ex 0; }
  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
                                 font-size: 83%;
                                 text-align: left; }
  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
                                   font-size: 83%;
                                   text-align: center; }
  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
                                  font-size: 83%;
                                  text-align: right; }
  table.synopsis { margin: 6ex auto 6ex auto;
                   border: 0;
                   border-collapse: separate;
                   border-spacing: 2em 0.6ex; }
  table.synopsis tr { padding: 0; }
  table.synopsis td { padding: 0; }
  table.toc td.link { width: 30%;
                      text-align: right;
                      vertical-align: baseline;
                      padding: 1ex 1em 1ex 0; }
  table.toc td.desc { vertical-align: baseline;
                      padding: 1ex 0 1ex 1em;
                      text-align: left; }
  table.toc td.desc p:first-child { margin: 0;
                                    text-align: left; }
  table.toc td.desc p { margin: 1.5ex 0 0 0;
                        text-align: left; }

</style>
</head>
<body>

<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
<h1>FreeType-2.9.1 API Reference</h1>

<h1 id="bdf_fonts">BDF and PCF Files</h1>
<h2>Synopsis</h2>
<table class="synopsis">
<tr><td><a href="#BDF_PropertyType">BDF_PropertyType</a></td><td><a href="#BDF_PropertyRec">BDF_PropertyRec</a></td><td><a href="#FT_Get_BDF_Property">FT_Get_BDF_Property</a></td></tr>
<tr><td><a href="#BDF_Property">BDF_Property</a></td><td><a href="#FT_Get_BDF_Charset_ID">FT_Get_BDF_Charset_ID</a></td><td></td></tr>
</table>


<p>This section contains the declaration of functions specific to BDF and PCF fonts.</p>

<div class="section">
<h3 id="BDF_PropertyType">BDF_PropertyType</h3>
<p>Defined in FT_BDF_H (freetype/ftbdf.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">enum</span>  BDF_PropertyType_
  {
    <a href="ft2-bdf_fonts.html#BDF_PROPERTY_TYPE_NONE">BDF_PROPERTY_TYPE_NONE</a>     = 0,
    <a href="ft2-bdf_fonts.html#BDF_PROPERTY_TYPE_ATOM">BDF_PROPERTY_TYPE_ATOM</a>     = 1,
    <a href="ft2-bdf_fonts.html#BDF_PROPERTY_TYPE_INTEGER">BDF_PROPERTY_TYPE_INTEGER</a>  = 2,
    <a href="ft2-bdf_fonts.html#BDF_PROPERTY_TYPE_CARDINAL">BDF_PROPERTY_TYPE_CARDINAL</a> = 3

  } <b>BDF_PropertyType</b>;
</pre>

<p>A list of BDF property types.</p>

<h4>values</h4>
<table class="fields">
<tr><td class="val" id="BDF_PROPERTY_TYPE_NONE">BDF_PROPERTY_TYPE_NONE</td><td class="desc">
<p>Value&nbsp;0 is used to indicate a missing property.</p>
</td></tr>
<tr><td class="val" id="BDF_PROPERTY_TYPE_ATOM">BDF_PROPERTY_TYPE_ATOM</td><td class="desc">
<p>Property is a string atom.</p>
</td></tr>
<tr><td class="val" id="BDF_PROPERTY_TYPE_INTEGER">BDF_PROPERTY_TYPE_INTEGER</td><td class="desc">
<p>Property is a 32-bit signed integer.</p>
</td></tr>
<tr><td class="val" id="BDF_PROPERTY_TYPE_CARDINAL">BDF_PROPERTY_TYPE_CARDINAL</td><td class="desc">
<p>Property is a 32-bit unsigned integer.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="BDF_Property">BDF_Property</h3>
<p>Defined in FT_BDF_H (freetype/ftbdf.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span> BDF_PropertyRec_*  <b>BDF_Property</b>;
</pre>

<p>A handle to a <a href="ft2-bdf_fonts.html#BDF_PropertyRec">BDF_PropertyRec</a> structure to model a given BDF/PCF property.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="BDF_PropertyRec">BDF_PropertyRec</h3>
<p>Defined in FT_BDF_H (freetype/ftbdf.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  BDF_PropertyRec_
  {
    <a href="ft2-bdf_fonts.html#BDF_PropertyType">BDF_PropertyType</a>  type;
    <span class="keyword">union</span> {
      <span class="keyword">const</span> <span class="keyword">char</span>*     atom;
      <a href="ft2-basic_types.html#FT_Int32">FT_Int32</a>        integer;
      <a href="ft2-basic_types.html#FT_UInt32">FT_UInt32</a>       cardinal;

    } u;

  } <b>BDF_PropertyRec</b>;
</pre>

<p>This structure models a given BDF/PCF property.</p>

<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="type">type</td><td class="desc">
<p>The property type.</p>
</td></tr>
<tr><td class="val" id="u.atom">u.atom</td><td class="desc">
<p>The atom string, if type is <a href="ft2-bdf_fonts.html#BDF_PropertyType">BDF_PROPERTY_TYPE_ATOM</a>. May be NULL, indicating an empty string.</p>
</td></tr>
<tr><td class="val" id="u.integer">u.integer</td><td class="desc">
<p>A signed integer, if type is <a href="ft2-bdf_fonts.html#BDF_PropertyType">BDF_PROPERTY_TYPE_INTEGER</a>.</p>
</td></tr>
<tr><td class="val" id="u.cardinal">u.cardinal</td><td class="desc">
<p>An unsigned integer, if type is <a href="ft2-bdf_fonts.html#BDF_PropertyType">BDF_PROPERTY_TYPE_CARDINAL</a>.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Get_BDF_Charset_ID">FT_Get_BDF_Charset_ID</h3>
<p>Defined in FT_BDF_H (freetype/ftbdf.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Get_BDF_Charset_ID</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>       face,
                         <span class="keyword">const</span> <span class="keyword">char</span>*  *acharset_encoding,
                         <span class="keyword">const</span> <span class="keyword">char</span>*  *acharset_registry );
</pre>

<p>Retrieve a BDF font character set identity, according to the BDF specification.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the input face.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="acharset_encoding">acharset_encoding</td><td class="desc">
<p>Charset encoding, as a C&nbsp;string, owned by the face.</p>
</td></tr>
<tr><td class="val" id="acharset_registry">acharset_registry</td><td class="desc">
<p>Charset registry, as a C&nbsp;string, owned by the face.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>This function only works with BDF faces, returning an error otherwise.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Get_BDF_Property">FT_Get_BDF_Property</h3>
<p>Defined in FT_BDF_H (freetype/ftbdf.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Get_BDF_Property</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>           face,
                       <span class="keyword">const</span> <span class="keyword">char</span>*       prop_name,
                       <a href="ft2-bdf_fonts.html#BDF_PropertyRec">BDF_PropertyRec</a>  *aproperty );
</pre>

<p>Retrieve a BDF property from a BDF or PCF font file.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the input face.</p>
</td></tr>
<tr><td class="val" id="name">name</td><td class="desc">
<p>The property name.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="aproperty">aproperty</td><td class="desc">
<p>The property.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>This function works with BDF <i>and</i> PCF fonts. It returns an error otherwise. It also returns an error if the property is not in the font.</p>
<p>A &lsquo;property&rsquo; is a either key-value pair within the STARTPROPERTIES ... ENDPROPERTIES block of a BDF font or a key-value pair from the &lsquo;info-&gt;props&rsquo; array within a &lsquo;FontRec&rsquo; structure of a PCF font.</p>
<p>Integer properties are always stored as &lsquo;signed&rsquo; within PCF fonts; consequently, <a href="ft2-bdf_fonts.html#BDF_PropertyType">BDF_PROPERTY_TYPE_CARDINAL</a> is a possible return value for BDF fonts only.</p>
<p>In case of error, &lsquo;aproperty-&gt;type&rsquo; is always set to <a href="ft2-bdf_fonts.html#BDF_PropertyType">BDF_PROPERTY_TYPE_NONE</a>.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

</body>
</html>
reference/ft2-bitmap_handling.html000064400000032620151706766400013220 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF;
         width: 87%;
         margin: auto; }

  div.section { width: 75%;
                margin: auto; }
  div.section hr { margin: 4ex 0 1ex 0; }
  div.section h4 { background-color: #EEEEFF;
                   font-size: medium;
                   font-style: oblique;
                   font-weight: bold;
                   margin: 3ex 0 1.5ex 9%;
                   padding: 0.3ex 0 0.3ex 1%; }
  div.section p { margin: 1.5ex 0 1.5ex 10%; }
  div.section pre { margin: 3ex 0 3ex 9%;
                    background-color: #D6E8FF;
                    padding: 2ex 0 2ex 1%; }
  div.section table.fields { width: 90%;
                             margin: 1.5ex 0 1.5ex 10%; }
  div.section table.toc { width: 95%;
                          margin: 1.5ex 0 1.5ex 5%; }
  div.timestamp { text-align: center;
                  font-size: 69%;
                  margin: 1.5ex 0 1.5ex 0; }

  h1 { text-align: center; }
  h3 { font-size: medium;
       margin: 4ex 0 1.5ex 0; }

  p { text-align: justify; }

  pre.colored { color: blue; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  table.fields td.val { font-weight: bold;
                        text-align: right;
                        width: 30%;
                        vertical-align: baseline;
                        padding: 1ex 1em 1ex 0; }
  table.fields td.desc { vertical-align: baseline;
                         padding: 1ex 0 1ex 1em; }
  table.fields td.desc p:first-child { margin: 0; }
  table.fields td.desc p { margin: 1.5ex 0 0 0; }
  table.index { margin: 6ex auto 6ex auto;
                border: 0;
                border-collapse: separate;
                border-spacing: 1em 0.3ex; }
  table.index tr { padding: 0; }
  table.index td { padding: 0; }
  table.index-toc-link { width: 100%;
                         border: 0;
                         border-spacing: 0;
                         margin: 1ex 0 1ex 0; }
  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
                                 font-size: 83%;
                                 text-align: left; }
  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
                                   font-size: 83%;
                                   text-align: center; }
  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
                                  font-size: 83%;
                                  text-align: right; }
  table.synopsis { margin: 6ex auto 6ex auto;
                   border: 0;
                   border-collapse: separate;
                   border-spacing: 2em 0.6ex; }
  table.synopsis tr { padding: 0; }
  table.synopsis td { padding: 0; }
  table.toc td.link { width: 30%;
                      text-align: right;
                      vertical-align: baseline;
                      padding: 1ex 1em 1ex 0; }
  table.toc td.desc { vertical-align: baseline;
                      padding: 1ex 0 1ex 1em;
                      text-align: left; }
  table.toc td.desc p:first-child { margin: 0;
                                    text-align: left; }
  table.toc td.desc p { margin: 1.5ex 0 0 0;
                        text-align: left; }

</style>
</head>
<body>

<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
<h1>FreeType-2.9.1 API Reference</h1>

<h1 id="bitmap_handling">Bitmap Handling</h1>
<h2>Synopsis</h2>
<table class="synopsis">
<tr><td><a href="#FT_Bitmap_Init">FT_Bitmap_Init</a></td><td><a href="#FT_Bitmap_Embolden">FT_Bitmap_Embolden</a></td><td><a href="#FT_GlyphSlot_Own_Bitmap">FT_GlyphSlot_Own_Bitmap</a></td></tr>
<tr><td><a href="#FT_Bitmap_Copy">FT_Bitmap_Copy</a></td><td><a href="#FT_Bitmap_Convert">FT_Bitmap_Convert</a></td><td><a href="#FT_Bitmap_Done">FT_Bitmap_Done</a></td></tr>
</table>


<p>This section contains functions for handling <a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a> objects. Note that none of the functions changes the bitmap's &lsquo;flow&rsquo; (as indicated by the sign of the &lsquo;pitch&rsquo; field in &lsquo;FT_Bitmap&rsquo;).</p>

<div class="section">
<h3 id="FT_Bitmap_Init">FT_Bitmap_Init</h3>
<p>Defined in FT_BITMAP_H (freetype/ftbitmap.h).</p>
<pre>
  FT_EXPORT( <span class="keyword">void</span> )
  <b>FT_Bitmap_Init</b>( <a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a>  *abitmap );


  /* deprecated */
  FT_EXPORT( <span class="keyword">void</span> )
  FT_Bitmap_New( <a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a>  *abitmap );
</pre>

<p>Initialize a pointer to an <a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a> structure.</p>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="abitmap">abitmap</td><td class="desc">
<p>A pointer to the bitmap structure.</p>
</td></tr>
</table>

<h4>note</h4>
<p>A deprecated name for the same function is &lsquo;FT_Bitmap_New&rsquo;.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Bitmap_Copy">FT_Bitmap_Copy</h3>
<p>Defined in FT_BITMAP_H (freetype/ftbitmap.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Bitmap_Copy</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a>        library,
                  <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a>  *source,
                  <a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a>        *target );
</pre>

<p>Copy a bitmap into another one.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to a library object.</p>
</td></tr>
<tr><td class="val" id="source">source</td><td class="desc">
<p>A handle to the source bitmap.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="target">target</td><td class="desc">
<p>A handle to the target bitmap.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Bitmap_Embolden">FT_Bitmap_Embolden</h3>
<p>Defined in FT_BITMAP_H (freetype/ftbitmap.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Bitmap_Embolden</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a>  library,
                      <a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a>*  bitmap,
                      <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a>      xStrength,
                      <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a>      yStrength );
</pre>

<p>Embolden a bitmap. The new bitmap will be about &lsquo;xStrength&rsquo; pixels wider and &lsquo;yStrength&rsquo; pixels higher. The left and bottom borders are kept unchanged.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to a library object.</p>
</td></tr>
<tr><td class="val" id="xStrength">xStrength</td><td class="desc">
<p>How strong the glyph is emboldened horizontally. Expressed in 26.6 pixel format.</p>
</td></tr>
<tr><td class="val" id="yStrength">yStrength</td><td class="desc">
<p>How strong the glyph is emboldened vertically. Expressed in 26.6 pixel format.</p>
</td></tr>
</table>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="bitmap">bitmap</td><td class="desc">
<p>A handle to the target bitmap.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>The current implementation restricts &lsquo;xStrength&rsquo; to be less than or equal to&nbsp;8 if bitmap is of pixel_mode <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_MONO</a>.</p>
<p>If you want to embolden the bitmap owned by a <a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a>, you should call <a href="ft2-bitmap_handling.html#FT_GlyphSlot_Own_Bitmap">FT_GlyphSlot_Own_Bitmap</a> on the slot first.</p>
<p>Bitmaps in <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_GRAY2</a> and <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_GRAY</a>@ format are converted to <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_GRAY</a> format (i.e., 8bpp).</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Bitmap_Convert">FT_Bitmap_Convert</h3>
<p>Defined in FT_BITMAP_H (freetype/ftbitmap.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Bitmap_Convert</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a>        library,
                     <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a>  *source,
                     <a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a>        *target,
                     <a href="ft2-basic_types.html#FT_Int">FT_Int</a>            alignment );
</pre>

<p>Convert a bitmap object with depth 1bpp, 2bpp, 4bpp, 8bpp or 32bpp to a bitmap object with depth 8bpp, making the number of used bytes line (a.k.a. the &lsquo;pitch&rsquo;) a multiple of &lsquo;alignment&rsquo;.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to a library object.</p>
</td></tr>
<tr><td class="val" id="source">source</td><td class="desc">
<p>The source bitmap.</p>
</td></tr>
<tr><td class="val" id="alignment">alignment</td><td class="desc">
<p>The pitch of the bitmap is a multiple of this parameter. Common values are 1, 2, or 4.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="target">target</td><td class="desc">
<p>The target bitmap.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>It is possible to call <a href="ft2-bitmap_handling.html#FT_Bitmap_Convert">FT_Bitmap_Convert</a> multiple times without calling <a href="ft2-bitmap_handling.html#FT_Bitmap_Done">FT_Bitmap_Done</a> (the memory is simply reallocated).</p>
<p>Use <a href="ft2-bitmap_handling.html#FT_Bitmap_Done">FT_Bitmap_Done</a> to finally remove the bitmap object.</p>
<p>The &lsquo;library&rsquo; argument is taken to have access to FreeType's memory handling functions.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_GlyphSlot_Own_Bitmap">FT_GlyphSlot_Own_Bitmap</h3>
<p>Defined in FT_BITMAP_H (freetype/ftbitmap.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_GlyphSlot_Own_Bitmap</b>( <a href="ft2-base_interface.html#FT_GlyphSlot">FT_GlyphSlot</a>  slot );
</pre>

<p>Make sure that a glyph slot owns &lsquo;slot-&gt;bitmap&rsquo;.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="slot">slot</td><td class="desc">
<p>The glyph slot.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>This function is to be used in combination with <a href="ft2-bitmap_handling.html#FT_Bitmap_Embolden">FT_Bitmap_Embolden</a>.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Bitmap_Done">FT_Bitmap_Done</h3>
<p>Defined in FT_BITMAP_H (freetype/ftbitmap.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Bitmap_Done</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a>  library,
                  <a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a>  *bitmap );
</pre>

<p>Destroy a bitmap object initialized with <a href="ft2-bitmap_handling.html#FT_Bitmap_Init">FT_Bitmap_Init</a>.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to a library object.</p>
</td></tr>
<tr><td class="val" id="bitmap">bitmap</td><td class="desc">
<p>The bitmap object to be freed.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>The &lsquo;library&rsquo; argument is taken to have access to FreeType's memory handling functions.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

</body>
</html>
reference/ft2-bzip2.html000064400000014244151706766400011130 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF;
         width: 87%;
         margin: auto; }

  div.section { width: 75%;
                margin: auto; }
  div.section hr { margin: 4ex 0 1ex 0; }
  div.section h4 { background-color: #EEEEFF;
                   font-size: medium;
                   font-style: oblique;
                   font-weight: bold;
                   margin: 3ex 0 1.5ex 9%;
                   padding: 0.3ex 0 0.3ex 1%; }
  div.section p { margin: 1.5ex 0 1.5ex 10%; }
  div.section pre { margin: 3ex 0 3ex 9%;
                    background-color: #D6E8FF;
                    padding: 2ex 0 2ex 1%; }
  div.section table.fields { width: 90%;
                             margin: 1.5ex 0 1.5ex 10%; }
  div.section table.toc { width: 95%;
                          margin: 1.5ex 0 1.5ex 5%; }
  div.timestamp { text-align: center;
                  font-size: 69%;
                  margin: 1.5ex 0 1.5ex 0; }

  h1 { text-align: center; }
  h3 { font-size: medium;
       margin: 4ex 0 1.5ex 0; }

  p { text-align: justify; }

  pre.colored { color: blue; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  table.fields td.val { font-weight: bold;
                        text-align: right;
                        width: 30%;
                        vertical-align: baseline;
                        padding: 1ex 1em 1ex 0; }
  table.fields td.desc { vertical-align: baseline;
                         padding: 1ex 0 1ex 1em; }
  table.fields td.desc p:first-child { margin: 0; }
  table.fields td.desc p { margin: 1.5ex 0 0 0; }
  table.index { margin: 6ex auto 6ex auto;
                border: 0;
                border-collapse: separate;
                border-spacing: 1em 0.3ex; }
  table.index tr { padding: 0; }
  table.index td { padding: 0; }
  table.index-toc-link { width: 100%;
                         border: 0;
                         border-spacing: 0;
                         margin: 1ex 0 1ex 0; }
  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
                                 font-size: 83%;
                                 text-align: left; }
  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
                                   font-size: 83%;
                                   text-align: center; }
  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
                                  font-size: 83%;
                                  text-align: right; }
  table.synopsis { margin: 6ex auto 6ex auto;
                   border: 0;
                   border-collapse: separate;
                   border-spacing: 2em 0.6ex; }
  table.synopsis tr { padding: 0; }
  table.synopsis td { padding: 0; }
  table.toc td.link { width: 30%;
                      text-align: right;
                      vertical-align: baseline;
                      padding: 1ex 1em 1ex 0; }
  table.toc td.desc { vertical-align: baseline;
                      padding: 1ex 0 1ex 1em;
                      text-align: left; }
  table.toc td.desc p:first-child { margin: 0;
                                    text-align: left; }
  table.toc td.desc p { margin: 1.5ex 0 0 0;
                        text-align: left; }

</style>
</head>
<body>

<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
<h1>FreeType-2.9.1 API Reference</h1>

<h1 id="bzip2">BZIP2 Streams</h1>
<h2>Synopsis</h2>
<table class="synopsis">
<tr><td><a href="#FT_Stream_OpenBzip2">FT_Stream_OpenBzip2</a></td><td></td><td></td></tr>
</table>


<p>This section contains the declaration of Bzip2-specific functions.</p>

<div class="section">
<h3 id="FT_Stream_OpenBzip2">FT_Stream_OpenBzip2</h3>
<p>Defined in FT_BZIP2_H (freetype/ftbzip2.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Stream_OpenBzip2</b>( <a href="ft2-system_interface.html#FT_Stream">FT_Stream</a>  stream,
                       <a href="ft2-system_interface.html#FT_Stream">FT_Stream</a>  source );
</pre>

<p>Open a new stream to parse bzip2-compressed font files. This is mainly used to support the compressed &lsquo;*.pcf.bz2&rsquo; fonts that come with XFree86.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="stream">stream</td><td class="desc">
<p>The target embedding stream.</p>
</td></tr>
<tr><td class="val" id="source">source</td><td class="desc">
<p>The source stream.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>The source stream must be opened <i>before</i> calling this function.</p>
<p>Calling the internal function &lsquo;FT_Stream_Close&rsquo; on the new stream will <b>not</b> call &lsquo;FT_Stream_Close&rsquo; on the source stream. None of the stream objects will be released to the heap.</p>
<p>The stream implementation is very basic and resets the decompression process each time seeking backwards is needed within the stream.</p>
<p>In certain builds of the library, bzip2 compression recognition is automatically handled when calling <a href="ft2-base_interface.html#FT_New_Face">FT_New_Face</a> or <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a>. This means that if no font driver is capable of handling the raw compressed file, the library will try to open a bzip2 compressed stream from it and re-open the face with it.</p>
<p>This function may return &lsquo;FT_Err_Unimplemented_Feature&rsquo; if your build of FreeType was not compiled with bzip2 support.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

</body>
</html>
reference/ft2-cache_subsystem.html000064400000153232151706766400013264 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF;
         width: 87%;
         margin: auto; }

  div.section { width: 75%;
                margin: auto; }
  div.section hr { margin: 4ex 0 1ex 0; }
  div.section h4 { background-color: #EEEEFF;
                   font-size: medium;
                   font-style: oblique;
                   font-weight: bold;
                   margin: 3ex 0 1.5ex 9%;
                   padding: 0.3ex 0 0.3ex 1%; }
  div.section p { margin: 1.5ex 0 1.5ex 10%; }
  div.section pre { margin: 3ex 0 3ex 9%;
                    background-color: #D6E8FF;
                    padding: 2ex 0 2ex 1%; }
  div.section table.fields { width: 90%;
                             margin: 1.5ex 0 1.5ex 10%; }
  div.section table.toc { width: 95%;
                          margin: 1.5ex 0 1.5ex 5%; }
  div.timestamp { text-align: center;
                  font-size: 69%;
                  margin: 1.5ex 0 1.5ex 0; }

  h1 { text-align: center; }
  h3 { font-size: medium;
       margin: 4ex 0 1.5ex 0; }

  p { text-align: justify; }

  pre.colored { color: blue; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  table.fields td.val { font-weight: bold;
                        text-align: right;
                        width: 30%;
                        vertical-align: baseline;
                        padding: 1ex 1em 1ex 0; }
  table.fields td.desc { vertical-align: baseline;
                         padding: 1ex 0 1ex 1em; }
  table.fields td.desc p:first-child { margin: 0; }
  table.fields td.desc p { margin: 1.5ex 0 0 0; }
  table.index { margin: 6ex auto 6ex auto;
                border: 0;
                border-collapse: separate;
                border-spacing: 1em 0.3ex; }
  table.index tr { padding: 0; }
  table.index td { padding: 0; }
  table.index-toc-link { width: 100%;
                         border: 0;
                         border-spacing: 0;
                         margin: 1ex 0 1ex 0; }
  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
                                 font-size: 83%;
                                 text-align: left; }
  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
                                   font-size: 83%;
                                   text-align: center; }
  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
                                  font-size: 83%;
                                  text-align: right; }
  table.synopsis { margin: 6ex auto 6ex auto;
                   border: 0;
                   border-collapse: separate;
                   border-spacing: 2em 0.6ex; }
  table.synopsis tr { padding: 0; }
  table.synopsis td { padding: 0; }
  table.toc td.link { width: 30%;
                      text-align: right;
                      vertical-align: baseline;
                      padding: 1ex 1em 1ex 0; }
  table.toc td.desc { vertical-align: baseline;
                      padding: 1ex 0 1ex 1em;
                      text-align: left; }
  table.toc td.desc p:first-child { margin: 0;
                                    text-align: left; }
  table.toc td.desc p { margin: 1.5ex 0 0 0;
                        text-align: left; }

</style>
</head>
<body>

<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
<h1>FreeType-2.9.1 API Reference</h1>

<h1 id="cache_subsystem">Cache Sub-System</h1>
<h2>Synopsis</h2>
<table class="synopsis">
<tr><td><a href="#FTC_Manager">FTC_Manager</a></td><td>&nbsp;</td></tr>
<tr><td><a href="#FTC_FaceID">FTC_FaceID</a></td><td><a href="#FTC_SBit">FTC_SBit</a></td></tr>
<tr><td><a href="#FTC_Face_Requester">FTC_Face_Requester</a></td><td><a href="#FTC_SBitCache">FTC_SBitCache</a></td></tr>
<tr><td>&nbsp;</td><td><a href="#FTC_SBitCache_New">FTC_SBitCache_New</a></td></tr>
<tr><td><a href="#FTC_Manager_New">FTC_Manager_New</a></td><td><a href="#FTC_SBitCache_Lookup">FTC_SBitCache_Lookup</a></td></tr>
<tr><td><a href="#FTC_Manager_Reset">FTC_Manager_Reset</a></td><td>&nbsp;</td></tr>
<tr><td><a href="#FTC_Manager_Done">FTC_Manager_Done</a></td><td><a href="#FTC_CMapCache">FTC_CMapCache</a></td></tr>
<tr><td><a href="#FTC_Manager_LookupFace">FTC_Manager_LookupFace</a></td><td><a href="#FTC_CMapCache_New">FTC_CMapCache_New</a></td></tr>
<tr><td><a href="#FTC_Manager_LookupSize">FTC_Manager_LookupSize</a></td><td><a href="#FTC_CMapCache_Lookup">FTC_CMapCache_Lookup</a></td></tr>
<tr><td><a href="#FTC_Manager_RemoveFaceID">FTC_Manager_RemoveFaceID</a></td><td>&nbsp;</td></tr>
<tr><td>&nbsp;</td><td><a href="#FTC_ScalerRec">FTC_ScalerRec</a></td></tr>
<tr><td><a href="#FTC_Node">FTC_Node</a></td><td><a href="#FTC_Scaler">FTC_Scaler</a></td></tr>
<tr><td><a href="#FTC_Node_Unref">FTC_Node_Unref</a></td><td><a href="#FTC_ImageTypeRec">FTC_ImageTypeRec</a></td></tr>
<tr><td>&nbsp;</td><td><a href="#FTC_ImageType">FTC_ImageType</a></td></tr>
<tr><td><a href="#FTC_ImageCache">FTC_ImageCache</a></td><td><a href="#FTC_ImageCache_LookupScaler">FTC_ImageCache_LookupScaler</a></td></tr>
<tr><td><a href="#FTC_ImageCache_New">FTC_ImageCache_New</a></td><td><a href="#FTC_SBitRec">FTC_SBitRec</a></td></tr>
<tr><td><a href="#FTC_ImageCache_Lookup">FTC_ImageCache_Lookup</a></td><td><a href="#FTC_SBitCache_LookupScaler">FTC_SBitCache_LookupScaler</a></td></tr>
</table>


<p>This section describes the FreeType&nbsp;2 cache sub-system, which is used to limit the number of concurrently opened <a href="ft2-base_interface.html#FT_Face">FT_Face</a> and <a href="ft2-base_interface.html#FT_Size">FT_Size</a> objects, as well as caching information like character maps and glyph images while limiting their maximum memory usage.</p>
<p>Note that all types and functions begin with the &lsquo;FTC_&rsquo; prefix.</p>
<p>The cache is highly portable and thus doesn't know anything about the fonts installed on your system, or how to access them. This implies the following scheme:</p>
<p>First, available or installed font faces are uniquely identified by <a href="ft2-cache_subsystem.html#FTC_FaceID">FTC_FaceID</a> values, provided to the cache by the client. Note that the cache only stores and compares these values, and doesn't try to interpret them in any way.</p>
<p>Second, the cache calls, only when needed, a client-provided function to convert an <a href="ft2-cache_subsystem.html#FTC_FaceID">FTC_FaceID</a> into a new <a href="ft2-base_interface.html#FT_Face">FT_Face</a> object. The latter is then completely managed by the cache, including its termination through <a href="ft2-base_interface.html#FT_Done_Face">FT_Done_Face</a>. To monitor termination of face objects, the finalizer callback in the &lsquo;generic&rsquo; field of the <a href="ft2-base_interface.html#FT_Face">FT_Face</a> object can be used, which might also be used to store the <a href="ft2-cache_subsystem.html#FTC_FaceID">FTC_FaceID</a> of the face.</p>
<p>Clients are free to map face IDs to anything else. The most simple usage is to associate them to a (pathname,face_index) pair that is used to call <a href="ft2-base_interface.html#FT_New_Face">FT_New_Face</a>. However, more complex schemes are also possible.</p>
<p>Note that for the cache to work correctly, the face ID values must be <b>persistent</b>, which means that the contents they point to should not change at runtime, or that their value should not become invalid.</p>
<p>If this is unavoidable (e.g., when a font is uninstalled at runtime), you should call <a href="ft2-cache_subsystem.html#FTC_Manager_RemoveFaceID">FTC_Manager_RemoveFaceID</a> as soon as possible, to let the cache get rid of any references to the old <a href="ft2-cache_subsystem.html#FTC_FaceID">FTC_FaceID</a> it may keep internally. Failure to do so will lead to incorrect behaviour or even crashes.</p>
<p>To use the cache, start with calling <a href="ft2-cache_subsystem.html#FTC_Manager_New">FTC_Manager_New</a> to create a new <a href="ft2-cache_subsystem.html#FTC_Manager">FTC_Manager</a> object, which models a single cache instance. You can then look up <a href="ft2-base_interface.html#FT_Face">FT_Face</a> and <a href="ft2-base_interface.html#FT_Size">FT_Size</a> objects with <a href="ft2-cache_subsystem.html#FTC_Manager_LookupFace">FTC_Manager_LookupFace</a> and <a href="ft2-cache_subsystem.html#FTC_Manager_LookupSize">FTC_Manager_LookupSize</a>, respectively.</p>
<p>If you want to use the charmap caching, call <a href="ft2-cache_subsystem.html#FTC_CMapCache_New">FTC_CMapCache_New</a>, then later use <a href="ft2-cache_subsystem.html#FTC_CMapCache_Lookup">FTC_CMapCache_Lookup</a> to perform the equivalent of <a href="ft2-base_interface.html#FT_Get_Char_Index">FT_Get_Char_Index</a>, only much faster.</p>
<p>If you want to use the <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> caching, call <a href="ft2-cache_subsystem.html#FTC_ImageCache">FTC_ImageCache</a>, then later use <a href="ft2-cache_subsystem.html#FTC_ImageCache_Lookup">FTC_ImageCache_Lookup</a> to retrieve the corresponding <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> objects from the cache.</p>
<p>If you need lots of small bitmaps, it is much more memory efficient to call <a href="ft2-cache_subsystem.html#FTC_SBitCache_New">FTC_SBitCache_New</a> followed by <a href="ft2-cache_subsystem.html#FTC_SBitCache_Lookup">FTC_SBitCache_Lookup</a>. This returns <a href="ft2-cache_subsystem.html#FTC_SBitRec">FTC_SBitRec</a> structures, which are used to store small bitmaps directly. (A small bitmap is one whose metrics and dimensions all fit into 8-bit integers).</p>
<p>We hope to also provide a kerning cache in the near future.</p>

<div class="section">
<h3 id="FTC_Manager">FTC_Manager</h3>
<p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_ManagerRec_*  <b>FTC_Manager</b>;
</pre>

<p>This object corresponds to one instance of the cache-subsystem. It is used to cache one or more <a href="ft2-base_interface.html#FT_Face">FT_Face</a> objects, along with corresponding <a href="ft2-base_interface.html#FT_Size">FT_Size</a> objects.</p>
<p>The manager intentionally limits the total number of opened <a href="ft2-base_interface.html#FT_Face">FT_Face</a> and <a href="ft2-base_interface.html#FT_Size">FT_Size</a> objects to control memory usage. See the &lsquo;max_faces&rsquo; and &lsquo;max_sizes&rsquo; parameters of <a href="ft2-cache_subsystem.html#FTC_Manager_New">FTC_Manager_New</a>.</p>
<p>The manager is also used to cache &lsquo;nodes&rsquo; of various types while limiting their total memory usage.</p>
<p>All limitations are enforced by keeping lists of managed objects in most-recently-used order, and flushing old nodes to make room for new ones.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FTC_FaceID">FTC_FaceID</h3>
<p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
<pre>
  <span class="keyword">typedef</span> <a href="ft2-basic_types.html#FT_Pointer">FT_Pointer</a>  <b>FTC_FaceID</b>;
</pre>

<p>An opaque pointer type that is used to identity face objects. The contents of such objects is application-dependent.</p>
<p>These pointers are typically used to point to a user-defined structure containing a font file path, and face index.</p>

<h4>note</h4>
<p>Never use NULL as a valid <a href="ft2-cache_subsystem.html#FTC_FaceID">FTC_FaceID</a>.</p>
<p>Face IDs are passed by the client to the cache manager that calls, when needed, the <a href="ft2-cache_subsystem.html#FTC_Face_Requester">FTC_Face_Requester</a> to translate them into new <a href="ft2-base_interface.html#FT_Face">FT_Face</a> objects.</p>
<p>If the content of a given face ID changes at runtime, or if the value becomes invalid (e.g., when uninstalling a font), you should immediately call <a href="ft2-cache_subsystem.html#FTC_Manager_RemoveFaceID">FTC_Manager_RemoveFaceID</a> before any other cache function.</p>
<p>Failure to do so will result in incorrect behaviour or even memory leaks and crashes.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FTC_Face_Requester">FTC_Face_Requester</h3>
<p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
<pre>
  <span class="keyword">typedef</span> <a href="ft2-basic_types.html#FT_Error">FT_Error</a>
  (*<b>FTC_Face_Requester</b>)( <a href="ft2-cache_subsystem.html#FTC_FaceID">FTC_FaceID</a>  face_id,
                         <a href="ft2-base_interface.html#FT_Library">FT_Library</a>  library,
                         <a href="ft2-basic_types.html#FT_Pointer">FT_Pointer</a>  req_data,
                         <a href="ft2-base_interface.html#FT_Face">FT_Face</a>*    aface );
</pre>

<p>A callback function provided by client applications. It is used by the cache manager to translate a given <a href="ft2-cache_subsystem.html#FTC_FaceID">FTC_FaceID</a> into a new valid <a href="ft2-base_interface.html#FT_Face">FT_Face</a> object, on demand.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face_id">face_id</td><td class="desc">
<p>The face ID to resolve.</p>
</td></tr>
<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to a FreeType library object.</p>
</td></tr>
<tr><td class="val" id="req_data">req_data</td><td class="desc">
<p>Application-provided request data (see note below).</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="aface">aface</td><td class="desc">
<p>A new <a href="ft2-base_interface.html#FT_Face">FT_Face</a> handle.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>The third parameter &lsquo;req_data&rsquo; is the same as the one passed by the client when <a href="ft2-cache_subsystem.html#FTC_Manager_New">FTC_Manager_New</a> is called.</p>
<p>The face requester should not perform funny things on the returned face object, like creating a new <a href="ft2-base_interface.html#FT_Size">FT_Size</a> for it, or setting a transformation through <a href="ft2-base_interface.html#FT_Set_Transform">FT_Set_Transform</a>!</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FTC_Manager_New">FTC_Manager_New</h3>
<p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FTC_Manager_New</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a>          library,
                   <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>             max_faces,
                   <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>             max_sizes,
                   <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>            max_bytes,
                   <a href="ft2-cache_subsystem.html#FTC_Face_Requester">FTC_Face_Requester</a>  requester,
                   <a href="ft2-basic_types.html#FT_Pointer">FT_Pointer</a>          req_data,
                   <a href="ft2-cache_subsystem.html#FTC_Manager">FTC_Manager</a>        *amanager );
</pre>

<p>Create a new cache manager.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="library">library</td><td class="desc">
<p>The parent FreeType library handle to use.</p>
</td></tr>
<tr><td class="val" id="max_faces">max_faces</td><td class="desc">
<p>Maximum number of opened <a href="ft2-base_interface.html#FT_Face">FT_Face</a> objects managed by this cache instance. Use&nbsp;0 for defaults.</p>
</td></tr>
<tr><td class="val" id="max_sizes">max_sizes</td><td class="desc">
<p>Maximum number of opened <a href="ft2-base_interface.html#FT_Size">FT_Size</a> objects managed by this cache instance. Use&nbsp;0 for defaults.</p>
</td></tr>
<tr><td class="val" id="max_bytes">max_bytes</td><td class="desc">
<p>Maximum number of bytes to use for cached data nodes. Use&nbsp;0 for defaults. Note that this value does not account for managed <a href="ft2-base_interface.html#FT_Face">FT_Face</a> and <a href="ft2-base_interface.html#FT_Size">FT_Size</a> objects.</p>
</td></tr>
<tr><td class="val" id="requester">requester</td><td class="desc">
<p>An application-provided callback used to translate face IDs into real <a href="ft2-base_interface.html#FT_Face">FT_Face</a> objects.</p>
</td></tr>
<tr><td class="val" id="req_data">req_data</td><td class="desc">
<p>A generic pointer that is passed to the requester each time it is called (see <a href="ft2-cache_subsystem.html#FTC_Face_Requester">FTC_Face_Requester</a>).</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="amanager">amanager</td><td class="desc">
<p>A handle to a new manager object. 0&nbsp;in case of failure.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FTC_Manager_Reset">FTC_Manager_Reset</h3>
<p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
<pre>
  FT_EXPORT( <span class="keyword">void</span> )
  <b>FTC_Manager_Reset</b>( <a href="ft2-cache_subsystem.html#FTC_Manager">FTC_Manager</a>  manager );
</pre>

<p>Empty a given cache manager. This simply gets rid of all the currently cached <a href="ft2-base_interface.html#FT_Face">FT_Face</a> and <a href="ft2-base_interface.html#FT_Size">FT_Size</a> objects within the manager.</p>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="manager">manager</td><td class="desc">
<p>A handle to the manager.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FTC_Manager_Done">FTC_Manager_Done</h3>
<p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
<pre>
  FT_EXPORT( <span class="keyword">void</span> )
  <b>FTC_Manager_Done</b>( <a href="ft2-cache_subsystem.html#FTC_Manager">FTC_Manager</a>  manager );
</pre>

<p>Destroy a given manager after emptying it.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="manager">manager</td><td class="desc">
<p>A handle to the target cache manager object.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FTC_Manager_LookupFace">FTC_Manager_LookupFace</h3>
<p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FTC_Manager_LookupFace</b>( <a href="ft2-cache_subsystem.html#FTC_Manager">FTC_Manager</a>  manager,
                          <a href="ft2-cache_subsystem.html#FTC_FaceID">FTC_FaceID</a>   face_id,
                          <a href="ft2-base_interface.html#FT_Face">FT_Face</a>     *aface );
</pre>

<p>Retrieve the <a href="ft2-base_interface.html#FT_Face">FT_Face</a> object that corresponds to a given face ID through a cache manager.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="manager">manager</td><td class="desc">
<p>A handle to the cache manager.</p>
</td></tr>
<tr><td class="val" id="face_id">face_id</td><td class="desc">
<p>The ID of the face object.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="aface">aface</td><td class="desc">
<p>A handle to the face object.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>The returned <a href="ft2-base_interface.html#FT_Face">FT_Face</a> object is always owned by the manager. You should never try to discard it yourself.</p>
<p>The <a href="ft2-base_interface.html#FT_Face">FT_Face</a> object doesn't necessarily have a current size object (i.e., face-&gt;size can be&nbsp;0). If you need a specific &lsquo;font size&rsquo;, use <a href="ft2-cache_subsystem.html#FTC_Manager_LookupSize">FTC_Manager_LookupSize</a> instead.</p>
<p>Never change the face's transformation matrix (i.e., never call the <a href="ft2-base_interface.html#FT_Set_Transform">FT_Set_Transform</a> function) on a returned face! If you need to transform glyphs, do it yourself after glyph loading.</p>
<p>When you perform a lookup, out-of-memory errors are detected <i>within</i> the lookup and force incremental flushes of the cache until enough memory is released for the lookup to succeed.</p>
<p>If a lookup fails with &lsquo;FT_Err_Out_Of_Memory&rsquo; the cache has already been completely flushed, and still no memory was available for the operation.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FTC_Manager_LookupSize">FTC_Manager_LookupSize</h3>
<p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FTC_Manager_LookupSize</b>( <a href="ft2-cache_subsystem.html#FTC_Manager">FTC_Manager</a>  manager,
                          <a href="ft2-cache_subsystem.html#FTC_Scaler">FTC_Scaler</a>   scaler,
                          <a href="ft2-base_interface.html#FT_Size">FT_Size</a>     *asize );
</pre>

<p>Retrieve the <a href="ft2-base_interface.html#FT_Size">FT_Size</a> object that corresponds to a given <a href="ft2-cache_subsystem.html#FTC_ScalerRec">FTC_ScalerRec</a> pointer through a cache manager.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="manager">manager</td><td class="desc">
<p>A handle to the cache manager.</p>
</td></tr>
<tr><td class="val" id="scaler">scaler</td><td class="desc">
<p>A scaler handle.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="asize">asize</td><td class="desc">
<p>A handle to the size object.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>The returned <a href="ft2-base_interface.html#FT_Size">FT_Size</a> object is always owned by the manager. You should never try to discard it by yourself.</p>
<p>You can access the parent <a href="ft2-base_interface.html#FT_Face">FT_Face</a> object simply as &lsquo;size-&gt;face&rsquo; if you need it. Note that this object is also owned by the manager.</p>

<h4>note</h4>
<p>When you perform a lookup, out-of-memory errors are detected <i>within</i> the lookup and force incremental flushes of the cache until enough memory is released for the lookup to succeed.</p>
<p>If a lookup fails with &lsquo;FT_Err_Out_Of_Memory&rsquo; the cache has already been completely flushed, and still no memory is available for the operation.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FTC_Manager_RemoveFaceID">FTC_Manager_RemoveFaceID</h3>
<p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
<pre>
  FT_EXPORT( <span class="keyword">void</span> )
  <b>FTC_Manager_RemoveFaceID</b>( <a href="ft2-cache_subsystem.html#FTC_Manager">FTC_Manager</a>  manager,
                            <a href="ft2-cache_subsystem.html#FTC_FaceID">FTC_FaceID</a>   face_id );
</pre>

<p>A special function used to indicate to the cache manager that a given <a href="ft2-cache_subsystem.html#FTC_FaceID">FTC_FaceID</a> is no longer valid, either because its content changed, or because it was deallocated or uninstalled.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="manager">manager</td><td class="desc">
<p>The cache manager handle.</p>
</td></tr>
<tr><td class="val" id="face_id">face_id</td><td class="desc">
<p>The <a href="ft2-cache_subsystem.html#FTC_FaceID">FTC_FaceID</a> to be removed.</p>
</td></tr>
</table>

<h4>note</h4>
<p>This function flushes all nodes from the cache corresponding to this &lsquo;face_id&rsquo;, with the exception of nodes with a non-null reference count.</p>
<p>Such nodes are however modified internally so as to never appear in later lookups with the same &lsquo;face_id&rsquo; value, and to be immediately destroyed when released by all their users.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FTC_Node">FTC_Node</h3>
<p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_NodeRec_*  <b>FTC_Node</b>;
</pre>

<p>An opaque handle to a cache node object. Each cache node is reference-counted. A node with a count of&nbsp;0 might be flushed out of a full cache whenever a lookup request is performed.</p>
<p>If you look up nodes, you have the ability to &lsquo;acquire&rsquo; them, i.e., to increment their reference count. This will prevent the node from being flushed out of the cache until you explicitly &lsquo;release&rsquo; it (see <a href="ft2-cache_subsystem.html#FTC_Node_Unref">FTC_Node_Unref</a>).</p>
<p>See also <a href="ft2-cache_subsystem.html#FTC_SBitCache_Lookup">FTC_SBitCache_Lookup</a> and <a href="ft2-cache_subsystem.html#FTC_ImageCache_Lookup">FTC_ImageCache_Lookup</a>.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FTC_Node_Unref">FTC_Node_Unref</h3>
<p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
<pre>
  FT_EXPORT( <span class="keyword">void</span> )
  <b>FTC_Node_Unref</b>( <a href="ft2-cache_subsystem.html#FTC_Node">FTC_Node</a>     node,
                  <a href="ft2-cache_subsystem.html#FTC_Manager">FTC_Manager</a>  manager );
</pre>

<p>Decrement a cache node's internal reference count. When the count reaches 0, it is not destroyed but becomes eligible for subsequent cache flushes.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="node">node</td><td class="desc">
<p>The cache node handle.</p>
</td></tr>
<tr><td class="val" id="manager">manager</td><td class="desc">
<p>The cache manager handle.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FTC_ImageCache">FTC_ImageCache</h3>
<p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_ImageCacheRec_*  <b>FTC_ImageCache</b>;
</pre>

<p>A handle to a glyph image cache object. They are designed to hold many distinct glyph images while not exceeding a certain memory threshold.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FTC_ImageCache_New">FTC_ImageCache_New</h3>
<p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FTC_ImageCache_New</b>( <a href="ft2-cache_subsystem.html#FTC_Manager">FTC_Manager</a>      manager,
                      <a href="ft2-cache_subsystem.html#FTC_ImageCache">FTC_ImageCache</a>  *acache );
</pre>

<p>Create a new glyph image cache.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="manager">manager</td><td class="desc">
<p>The parent manager for the image cache.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="acache">acache</td><td class="desc">
<p>A handle to the new glyph image cache object.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FTC_ImageCache_Lookup">FTC_ImageCache_Lookup</h3>
<p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FTC_ImageCache_Lookup</b>( <a href="ft2-cache_subsystem.html#FTC_ImageCache">FTC_ImageCache</a>  cache,
                         <a href="ft2-cache_subsystem.html#FTC_ImageType">FTC_ImageType</a>   type,
                         <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>         gindex,
                         <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a>       *aglyph,
                         <a href="ft2-cache_subsystem.html#FTC_Node">FTC_Node</a>       *anode );
</pre>

<p>Retrieve a given glyph image from a glyph image cache.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="cache">cache</td><td class="desc">
<p>A handle to the source glyph image cache.</p>
</td></tr>
<tr><td class="val" id="type">type</td><td class="desc">
<p>A pointer to a glyph image type descriptor.</p>
</td></tr>
<tr><td class="val" id="gindex">gindex</td><td class="desc">
<p>The glyph index to retrieve.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="aglyph">aglyph</td><td class="desc">
<p>The corresponding <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> object. 0&nbsp;in case of failure.</p>
</td></tr>
<tr><td class="val" id="anode">anode</td><td class="desc">
<p>Used to return the address of the corresponding cache node after incrementing its reference count (see note below).</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>The returned glyph is owned and managed by the glyph image cache. Never try to transform or discard it manually! You can however create a copy with <a href="ft2-glyph_management.html#FT_Glyph_Copy">FT_Glyph_Copy</a> and modify the new one.</p>
<p>If &lsquo;anode&rsquo; is <i>not</i> NULL, it receives the address of the cache node containing the glyph image, after increasing its reference count. This ensures that the node (as well as the <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a>) will always be kept in the cache until you call <a href="ft2-cache_subsystem.html#FTC_Node_Unref">FTC_Node_Unref</a> to &lsquo;release&rsquo; it.</p>
<p>If &lsquo;anode&rsquo; is NULL, the cache node is left unchanged, which means that the <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> could be flushed out of the cache on the next call to one of the caching sub-system APIs. Don't assume that it is persistent!</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FTC_SBit">FTC_SBit</h3>
<p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_SBitRec_*  <b>FTC_SBit</b>;
</pre>

<p>A handle to a small bitmap descriptor. See the <a href="ft2-cache_subsystem.html#FTC_SBitRec">FTC_SBitRec</a> structure for details.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FTC_SBitCache">FTC_SBitCache</h3>
<p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_SBitCacheRec_*  <b>FTC_SBitCache</b>;
</pre>

<p>A handle to a small bitmap cache. These are special cache objects used to store small glyph bitmaps (and anti-aliased pixmaps) in a much more efficient way than the traditional glyph image cache implemented by <a href="ft2-cache_subsystem.html#FTC_ImageCache">FTC_ImageCache</a>.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FTC_SBitCache_New">FTC_SBitCache_New</h3>
<p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FTC_SBitCache_New</b>( <a href="ft2-cache_subsystem.html#FTC_Manager">FTC_Manager</a>     manager,
                     <a href="ft2-cache_subsystem.html#FTC_SBitCache">FTC_SBitCache</a>  *acache );
</pre>

<p>Create a new cache to store small glyph bitmaps.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="manager">manager</td><td class="desc">
<p>A handle to the source cache manager.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="acache">acache</td><td class="desc">
<p>A handle to the new sbit cache. NULL in case of error.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FTC_SBitCache_Lookup">FTC_SBitCache_Lookup</h3>
<p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FTC_SBitCache_Lookup</b>( <a href="ft2-cache_subsystem.html#FTC_SBitCache">FTC_SBitCache</a>    cache,
                        <a href="ft2-cache_subsystem.html#FTC_ImageType">FTC_ImageType</a>    type,
                        <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>          gindex,
                        <a href="ft2-cache_subsystem.html#FTC_SBit">FTC_SBit</a>        *sbit,
                        <a href="ft2-cache_subsystem.html#FTC_Node">FTC_Node</a>        *anode );
</pre>

<p>Look up a given small glyph bitmap in a given sbit cache and &lsquo;lock&rsquo; it to prevent its flushing from the cache until needed.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="cache">cache</td><td class="desc">
<p>A handle to the source sbit cache.</p>
</td></tr>
<tr><td class="val" id="type">type</td><td class="desc">
<p>A pointer to the glyph image type descriptor.</p>
</td></tr>
<tr><td class="val" id="gindex">gindex</td><td class="desc">
<p>The glyph index.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="sbit">sbit</td><td class="desc">
<p>A handle to a small bitmap descriptor.</p>
</td></tr>
<tr><td class="val" id="anode">anode</td><td class="desc">
<p>Used to return the address of the corresponding cache node after incrementing its reference count (see note below).</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>The small bitmap descriptor and its bit buffer are owned by the cache and should never be freed by the application. They might as well disappear from memory on the next cache lookup, so don't treat them as persistent data.</p>
<p>The descriptor's &lsquo;buffer&rsquo; field is set to&nbsp;0 to indicate a missing glyph bitmap.</p>
<p>If &lsquo;anode&rsquo; is <i>not</i> NULL, it receives the address of the cache node containing the bitmap, after increasing its reference count. This ensures that the node (as well as the image) will always be kept in the cache until you call <a href="ft2-cache_subsystem.html#FTC_Node_Unref">FTC_Node_Unref</a> to &lsquo;release&rsquo; it.</p>
<p>If &lsquo;anode&rsquo; is NULL, the cache node is left unchanged, which means that the bitmap could be flushed out of the cache on the next call to one of the caching sub-system APIs. Don't assume that it is persistent!</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FTC_CMapCache">FTC_CMapCache</h3>
<p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_CMapCacheRec_*  <b>FTC_CMapCache</b>;
</pre>

<p>An opaque handle used to model a charmap cache. This cache is to hold character codes -&gt; glyph indices mappings.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FTC_CMapCache_New">FTC_CMapCache_New</h3>
<p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FTC_CMapCache_New</b>( <a href="ft2-cache_subsystem.html#FTC_Manager">FTC_Manager</a>     manager,
                     <a href="ft2-cache_subsystem.html#FTC_CMapCache">FTC_CMapCache</a>  *acache );
</pre>

<p>Create a new charmap cache.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="manager">manager</td><td class="desc">
<p>A handle to the cache manager.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="acache">acache</td><td class="desc">
<p>A new cache handle. NULL in case of error.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>Like all other caches, this one will be destroyed with the cache manager.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FTC_CMapCache_Lookup">FTC_CMapCache_Lookup</h3>
<p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> )
  <b>FTC_CMapCache_Lookup</b>( <a href="ft2-cache_subsystem.html#FTC_CMapCache">FTC_CMapCache</a>  cache,
                        <a href="ft2-cache_subsystem.html#FTC_FaceID">FTC_FaceID</a>     face_id,
                        <a href="ft2-basic_types.html#FT_Int">FT_Int</a>         cmap_index,
                        <a href="ft2-basic_types.html#FT_UInt32">FT_UInt32</a>      char_code );
</pre>

<p>Translate a character code into a glyph index, using the charmap cache.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="cache">cache</td><td class="desc">
<p>A charmap cache handle.</p>
</td></tr>
<tr><td class="val" id="face_id">face_id</td><td class="desc">
<p>The source face ID.</p>
</td></tr>
<tr><td class="val" id="cmap_index">cmap_index</td><td class="desc">
<p>The index of the charmap in the source face. Any negative value means to use the cache <a href="ft2-base_interface.html#FT_Face">FT_Face</a>'s default charmap.</p>
</td></tr>
<tr><td class="val" id="char_code">char_code</td><td class="desc">
<p>The character code (in the corresponding charmap).</p>
</td></tr>
</table>

<h4>return</h4>
<p>Glyph index. 0&nbsp;means &lsquo;no glyph&rsquo;.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FTC_ScalerRec">FTC_ScalerRec</h3>
<p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FTC_ScalerRec_
  {
    <a href="ft2-cache_subsystem.html#FTC_FaceID">FTC_FaceID</a>  face_id;
    <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>     width;
    <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>     height;
    <a href="ft2-basic_types.html#FT_Int">FT_Int</a>      pixel;
    <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>     x_res;
    <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>     y_res;

  } <b>FTC_ScalerRec</b>;
</pre>

<p>A structure used to describe a given character size in either pixels or points to the cache manager. See <a href="ft2-cache_subsystem.html#FTC_Manager_LookupSize">FTC_Manager_LookupSize</a>.</p>

<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="face_id">face_id</td><td class="desc">
<p>The source face ID.</p>
</td></tr>
<tr><td class="val" id="width">width</td><td class="desc">
<p>The character width.</p>
</td></tr>
<tr><td class="val" id="height">height</td><td class="desc">
<p>The character height.</p>
</td></tr>
<tr><td class="val" id="pixel">pixel</td><td class="desc">
<p>A Boolean. If 1, the &lsquo;width&rsquo; and &lsquo;height&rsquo; fields are interpreted as integer pixel character sizes. Otherwise, they are expressed as 1/64th of points.</p>
</td></tr>
<tr><td class="val" id="x_res">x_res</td><td class="desc">
<p>Only used when &lsquo;pixel&rsquo; is value&nbsp;0 to indicate the horizontal resolution in dpi.</p>
</td></tr>
<tr><td class="val" id="y_res">y_res</td><td class="desc">
<p>Only used when &lsquo;pixel&rsquo; is value&nbsp;0 to indicate the vertical resolution in dpi.</p>
</td></tr>
</table>

<h4>note</h4>
<p>This type is mainly used to retrieve <a href="ft2-base_interface.html#FT_Size">FT_Size</a> objects through the cache manager.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FTC_Scaler">FTC_Scaler</h3>
<p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_ScalerRec_*  <b>FTC_Scaler</b>;
</pre>

<p>A handle to an <a href="ft2-cache_subsystem.html#FTC_ScalerRec">FTC_ScalerRec</a> structure.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FTC_ImageTypeRec">FTC_ImageTypeRec</h3>
<p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FTC_ImageTypeRec_
  {
    <a href="ft2-cache_subsystem.html#FTC_FaceID">FTC_FaceID</a>  face_id;
    <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>     width;
    <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>     height;
    <a href="ft2-basic_types.html#FT_Int32">FT_Int32</a>    flags;

  } <b>FTC_ImageTypeRec</b>;
</pre>

<p>A structure used to model the type of images in a glyph cache.</p>

<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="face_id">face_id</td><td class="desc">
<p>The face ID.</p>
</td></tr>
<tr><td class="val" id="width">width</td><td class="desc">
<p>The width in pixels.</p>
</td></tr>
<tr><td class="val" id="height">height</td><td class="desc">
<p>The height in pixels.</p>
</td></tr>
<tr><td class="val" id="flags">flags</td><td class="desc">
<p>The load flags, as in <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a>.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FTC_ImageType">FTC_ImageType</h3>
<p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_ImageTypeRec_*  <b>FTC_ImageType</b>;
</pre>

<p>A handle to an <a href="ft2-cache_subsystem.html#FTC_ImageTypeRec">FTC_ImageTypeRec</a> structure.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FTC_ImageCache_LookupScaler">FTC_ImageCache_LookupScaler</h3>
<p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FTC_ImageCache_LookupScaler</b>( <a href="ft2-cache_subsystem.html#FTC_ImageCache">FTC_ImageCache</a>  cache,
                               <a href="ft2-cache_subsystem.html#FTC_Scaler">FTC_Scaler</a>      scaler,
                               <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>        load_flags,
                               <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>         gindex,
                               <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a>       *aglyph,
                               <a href="ft2-cache_subsystem.html#FTC_Node">FTC_Node</a>       *anode );
</pre>

<p>A variant of <a href="ft2-cache_subsystem.html#FTC_ImageCache_Lookup">FTC_ImageCache_Lookup</a> that uses an <a href="ft2-cache_subsystem.html#FTC_ScalerRec">FTC_ScalerRec</a> to specify the face ID and its size.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="cache">cache</td><td class="desc">
<p>A handle to the source glyph image cache.</p>
</td></tr>
<tr><td class="val" id="scaler">scaler</td><td class="desc">
<p>A pointer to a scaler descriptor.</p>
</td></tr>
<tr><td class="val" id="load_flags">load_flags</td><td class="desc">
<p>The corresponding load flags.</p>
</td></tr>
<tr><td class="val" id="gindex">gindex</td><td class="desc">
<p>The glyph index to retrieve.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="aglyph">aglyph</td><td class="desc">
<p>The corresponding <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> object. 0&nbsp;in case of failure.</p>
</td></tr>
<tr><td class="val" id="anode">anode</td><td class="desc">
<p>Used to return the address of the corresponding cache node after incrementing its reference count (see note below).</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>The returned glyph is owned and managed by the glyph image cache. Never try to transform or discard it manually! You can however create a copy with <a href="ft2-glyph_management.html#FT_Glyph_Copy">FT_Glyph_Copy</a> and modify the new one.</p>
<p>If &lsquo;anode&rsquo; is <i>not</i> NULL, it receives the address of the cache node containing the glyph image, after increasing its reference count. This ensures that the node (as well as the <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a>) will always be kept in the cache until you call <a href="ft2-cache_subsystem.html#FTC_Node_Unref">FTC_Node_Unref</a> to &lsquo;release&rsquo; it.</p>
<p>If &lsquo;anode&rsquo; is NULL, the cache node is left unchanged, which means that the <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> could be flushed out of the cache on the next call to one of the caching sub-system APIs. Don't assume that it is persistent!</p>
<p>Calls to <a href="ft2-base_interface.html#FT_Set_Char_Size">FT_Set_Char_Size</a> and friends have no effect on cached glyphs; you should always use the FreeType cache API instead.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FTC_SBitRec">FTC_SBitRec</h3>
<p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FTC_SBitRec_
  {
    <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>   width;
    <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>   height;
    <a href="ft2-basic_types.html#FT_Char">FT_Char</a>   left;
    <a href="ft2-basic_types.html#FT_Char">FT_Char</a>   top;

    <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>   format;
    <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>   max_grays;
    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>  pitch;
    <a href="ft2-basic_types.html#FT_Char">FT_Char</a>   xadvance;
    <a href="ft2-basic_types.html#FT_Char">FT_Char</a>   yadvance;

    <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>*  buffer;

  } <b>FTC_SBitRec</b>;
</pre>

<p>A very compact structure used to describe a small glyph bitmap.</p>

<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="width">width</td><td class="desc">
<p>The bitmap width in pixels.</p>
</td></tr>
<tr><td class="val" id="height">height</td><td class="desc">
<p>The bitmap height in pixels.</p>
</td></tr>
<tr><td class="val" id="left">left</td><td class="desc">
<p>The horizontal distance from the pen position to the left bitmap border (a.k.a. &lsquo;left side bearing&rsquo;, or &lsquo;lsb&rsquo;).</p>
</td></tr>
<tr><td class="val" id="top">top</td><td class="desc">
<p>The vertical distance from the pen position (on the baseline) to the upper bitmap border (a.k.a. &lsquo;top side bearing&rsquo;). The distance is positive for upwards y&nbsp;coordinates.</p>
</td></tr>
<tr><td class="val" id="format">format</td><td class="desc">
<p>The format of the glyph bitmap (monochrome or gray).</p>
</td></tr>
<tr><td class="val" id="max_grays">max_grays</td><td class="desc">
<p>Maximum gray level value (in the range 1 to&nbsp;255).</p>
</td></tr>
<tr><td class="val" id="pitch">pitch</td><td class="desc">
<p>The number of bytes per bitmap line. May be positive or negative.</p>
</td></tr>
<tr><td class="val" id="xadvance">xadvance</td><td class="desc">
<p>The horizontal advance width in pixels.</p>
</td></tr>
<tr><td class="val" id="yadvance">yadvance</td><td class="desc">
<p>The vertical advance height in pixels.</p>
</td></tr>
<tr><td class="val" id="buffer">buffer</td><td class="desc">
<p>A pointer to the bitmap pixels.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FTC_SBitCache_LookupScaler">FTC_SBitCache_LookupScaler</h3>
<p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FTC_SBitCache_LookupScaler</b>( <a href="ft2-cache_subsystem.html#FTC_SBitCache">FTC_SBitCache</a>  cache,
                              <a href="ft2-cache_subsystem.html#FTC_Scaler">FTC_Scaler</a>     scaler,
                              <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>       load_flags,
                              <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>        gindex,
                              <a href="ft2-cache_subsystem.html#FTC_SBit">FTC_SBit</a>      *sbit,
                              <a href="ft2-cache_subsystem.html#FTC_Node">FTC_Node</a>      *anode );
</pre>

<p>A variant of <a href="ft2-cache_subsystem.html#FTC_SBitCache_Lookup">FTC_SBitCache_Lookup</a> that uses an <a href="ft2-cache_subsystem.html#FTC_ScalerRec">FTC_ScalerRec</a> to specify the face ID and its size.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="cache">cache</td><td class="desc">
<p>A handle to the source sbit cache.</p>
</td></tr>
<tr><td class="val" id="scaler">scaler</td><td class="desc">
<p>A pointer to the scaler descriptor.</p>
</td></tr>
<tr><td class="val" id="load_flags">load_flags</td><td class="desc">
<p>The corresponding load flags.</p>
</td></tr>
<tr><td class="val" id="gindex">gindex</td><td class="desc">
<p>The glyph index.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="sbit">sbit</td><td class="desc">
<p>A handle to a small bitmap descriptor.</p>
</td></tr>
<tr><td class="val" id="anode">anode</td><td class="desc">
<p>Used to return the address of the corresponding cache node after incrementing its reference count (see note below).</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>The small bitmap descriptor and its bit buffer are owned by the cache and should never be freed by the application. They might as well disappear from memory on the next cache lookup, so don't treat them as persistent data.</p>
<p>The descriptor's &lsquo;buffer&rsquo; field is set to&nbsp;0 to indicate a missing glyph bitmap.</p>
<p>If &lsquo;anode&rsquo; is <i>not</i> NULL, it receives the address of the cache node containing the bitmap, after increasing its reference count. This ensures that the node (as well as the image) will always be kept in the cache until you call <a href="ft2-cache_subsystem.html#FTC_Node_Unref">FTC_Node_Unref</a> to &lsquo;release&rsquo; it.</p>
<p>If &lsquo;anode&rsquo; is NULL, the cache node is left unchanged, which means that the bitmap could be flushed out of the cache on the next call to one of the caching sub-system APIs. Don't assume that it is persistent!</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

</body>
</html>
reference/ft2-cff_driver.html000064400000017547151706766400012224 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF;
         width: 87%;
         margin: auto; }

  div.section { width: 75%;
                margin: auto; }
  div.section hr { margin: 4ex 0 1ex 0; }
  div.section h4 { background-color: #EEEEFF;
                   font-size: medium;
                   font-style: oblique;
                   font-weight: bold;
                   margin: 3ex 0 1.5ex 9%;
                   padding: 0.3ex 0 0.3ex 1%; }
  div.section p { margin: 1.5ex 0 1.5ex 10%; }
  div.section pre { margin: 3ex 0 3ex 9%;
                    background-color: #D6E8FF;
                    padding: 2ex 0 2ex 1%; }
  div.section table.fields { width: 90%;
                             margin: 1.5ex 0 1.5ex 10%; }
  div.section table.toc { width: 95%;
                          margin: 1.5ex 0 1.5ex 5%; }
  div.timestamp { text-align: center;
                  font-size: 69%;
                  margin: 1.5ex 0 1.5ex 0; }

  h1 { text-align: center; }
  h3 { font-size: medium;
       margin: 4ex 0 1.5ex 0; }

  p { text-align: justify; }

  pre.colored { color: blue; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  table.fields td.val { font-weight: bold;
                        text-align: right;
                        width: 30%;
                        vertical-align: baseline;
                        padding: 1ex 1em 1ex 0; }
  table.fields td.desc { vertical-align: baseline;
                         padding: 1ex 0 1ex 1em; }
  table.fields td.desc p:first-child { margin: 0; }
  table.fields td.desc p { margin: 1.5ex 0 0 0; }
  table.index { margin: 6ex auto 6ex auto;
                border: 0;
                border-collapse: separate;
                border-spacing: 1em 0.3ex; }
  table.index tr { padding: 0; }
  table.index td { padding: 0; }
  table.index-toc-link { width: 100%;
                         border: 0;
                         border-spacing: 0;
                         margin: 1ex 0 1ex 0; }
  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
                                 font-size: 83%;
                                 text-align: left; }
  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
                                   font-size: 83%;
                                   text-align: center; }
  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
                                  font-size: 83%;
                                  text-align: right; }
  table.synopsis { margin: 6ex auto 6ex auto;
                   border: 0;
                   border-collapse: separate;
                   border-spacing: 2em 0.6ex; }
  table.synopsis tr { padding: 0; }
  table.synopsis td { padding: 0; }
  table.toc td.link { width: 30%;
                      text-align: right;
                      vertical-align: baseline;
                      padding: 1ex 1em 1ex 0; }
  table.toc td.desc { vertical-align: baseline;
                      padding: 1ex 0 1ex 1em;
                      text-align: left; }
  table.toc td.desc p:first-child { margin: 0;
                                    text-align: left; }
  table.toc td.desc p { margin: 1.5ex 0 0 0;
                        text-align: left; }

</style>
</head>
<body>

<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
<h1>FreeType-2.9.1 API Reference</h1>

<h1 id="cff_driver">The CFF driver</h1>

<p>While FreeType's CFF driver doesn't expose API functions by itself, it is possible to control its behaviour with <a href="ft2-module_management.html#FT_Property_Set">FT_Property_Set</a> and <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a>.</p>
<p>The CFF driver's module name is &lsquo;cff&rsquo;.</p>
<p>Available properties are <a href="ft2-properties.html#hinting-engine">hinting-engine</a>, <a href="ft2-properties.html#no-stem-darkening">no-stem-darkening</a>, <a href="ft2-properties.html#darkening-parameters">darkening-parameters</a>, and <a href="ft2-properties.html#random-seed">random-seed</a>, as documented in the &lsquo;<a href="ft2-properties.html#properties">Driver properties</a>&rsquo; section.</p>
<p><b>Hinting</b> <b>and</b> <b>antialiasing</b> <b>principles</b> <b>of</b> <b>the</b> <b>new</b> <b>engine</b></p>
<p>The rasterizer is positioning horizontal features (e.g., ascender height &amp; x-height, or crossbars) on the pixel grid and minimizing the amount of antialiasing applied to them, while placing vertical features (vertical stems) on the pixel grid without hinting, thus representing the stem position and weight accurately. Sometimes the vertical stems may be only partially black. In this context, &lsquo;antialiasing&rsquo; means that stems are not positioned exactly on pixel borders, causing a fuzzy appearance.</p>
<p>There are two principles behind this approach.</p>
<p>1) No hinting in the horizontal direction: Unlike &lsquo;superhinted&rsquo; TrueType, which changes glyph widths to accommodate regular inter-glyph spacing, Adobe's approach is &lsquo;faithful to the design&rsquo; in representing both the glyph width and the inter-glyph spacing designed for the font. This makes the screen display as close as it can be to the result one would get with infinite resolution, while preserving what is considered the key characteristics of each glyph. Note that the distances between unhinted and grid-fitted positions at small sizes are comparable to kerning values and thus would be noticeable (and distracting) while reading if hinting were applied.</p>
<p>One of the reasons to not hint horizontally is antialiasing for LCD screens: The pixel geometry of modern displays supplies three vertical subpixels as the eye moves horizontally across each visible pixel. On devices where we can be certain this characteristic is present a rasterizer can take advantage of the subpixels to add increments of weight. In Western writing systems this turns out to be the more critical direction anyway; the weights and spacing of vertical stems (see above) are central to Armenian, Cyrillic, Greek, and Latin type designs. Even when the rasterizer uses greyscale antialiasing instead of color (a necessary compromise when one doesn't know the screen characteristics), the unhinted vertical features preserve the design's weight and spacing much better than aliased type would.</p>
<p>2) Alignment in the vertical direction: Weights and spacing along the y&nbsp;axis are less critical; what is much more important is the visual alignment of related features (like cap-height and x-height). The sense of alignment for these is enhanced by the sharpness of grid-fit edges, while the cruder vertical resolution (full pixels instead of 1/3 pixels) is less of a problem.</p>
<p>On the technical side, horizontal alignment zones for ascender, x-height, and other important height values (traditionally called &lsquo;blue zones&rsquo;) as defined in the font are positioned independently, each being rounded to the nearest pixel edge, taking care of overshoot suppression at small sizes, stem darkening, and scaling.</p>
<p>Hstems (this is, hint values defined in the font to help align horizontal features) that fall within a blue zone are said to be &lsquo;captured&rsquo; and are aligned to that zone. Uncaptured stems are moved in one of four ways, top edge up or down, bottom edge up or down. Unless there are conflicting hstems, the smallest movement is taken to minimize distortion.</p>

</body>
</html>
reference/ft2-cid_fonts.html000064400000021666151706766400012060 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF;
         width: 87%;
         margin: auto; }

  div.section { width: 75%;
                margin: auto; }
  div.section hr { margin: 4ex 0 1ex 0; }
  div.section h4 { background-color: #EEEEFF;
                   font-size: medium;
                   font-style: oblique;
                   font-weight: bold;
                   margin: 3ex 0 1.5ex 9%;
                   padding: 0.3ex 0 0.3ex 1%; }
  div.section p { margin: 1.5ex 0 1.5ex 10%; }
  div.section pre { margin: 3ex 0 3ex 9%;
                    background-color: #D6E8FF;
                    padding: 2ex 0 2ex 1%; }
  div.section table.fields { width: 90%;
                             margin: 1.5ex 0 1.5ex 10%; }
  div.section table.toc { width: 95%;
                          margin: 1.5ex 0 1.5ex 5%; }
  div.timestamp { text-align: center;
                  font-size: 69%;
                  margin: 1.5ex 0 1.5ex 0; }

  h1 { text-align: center; }
  h3 { font-size: medium;
       margin: 4ex 0 1.5ex 0; }

  p { text-align: justify; }

  pre.colored { color: blue; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  table.fields td.val { font-weight: bold;
                        text-align: right;
                        width: 30%;
                        vertical-align: baseline;
                        padding: 1ex 1em 1ex 0; }
  table.fields td.desc { vertical-align: baseline;
                         padding: 1ex 0 1ex 1em; }
  table.fields td.desc p:first-child { margin: 0; }
  table.fields td.desc p { margin: 1.5ex 0 0 0; }
  table.index { margin: 6ex auto 6ex auto;
                border: 0;
                border-collapse: separate;
                border-spacing: 1em 0.3ex; }
  table.index tr { padding: 0; }
  table.index td { padding: 0; }
  table.index-toc-link { width: 100%;
                         border: 0;
                         border-spacing: 0;
                         margin: 1ex 0 1ex 0; }
  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
                                 font-size: 83%;
                                 text-align: left; }
  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
                                   font-size: 83%;
                                   text-align: center; }
  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
                                  font-size: 83%;
                                  text-align: right; }
  table.synopsis { margin: 6ex auto 6ex auto;
                   border: 0;
                   border-collapse: separate;
                   border-spacing: 2em 0.6ex; }
  table.synopsis tr { padding: 0; }
  table.synopsis td { padding: 0; }
  table.toc td.link { width: 30%;
                      text-align: right;
                      vertical-align: baseline;
                      padding: 1ex 1em 1ex 0; }
  table.toc td.desc { vertical-align: baseline;
                      padding: 1ex 0 1ex 1em;
                      text-align: left; }
  table.toc td.desc p:first-child { margin: 0;
                                    text-align: left; }
  table.toc td.desc p { margin: 1.5ex 0 0 0;
                        text-align: left; }

</style>
</head>
<body>

<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
<h1>FreeType-2.9.1 API Reference</h1>

<h1 id="cid_fonts">CID Fonts</h1>
<h2>Synopsis</h2>
<table class="synopsis">
<tr><td><a href="#FT_Get_CID_Registry_Ordering_Supplement">FT_Get_CID_Registry_Ordering_Supplement</a></td></tr>
<tr><td><a href="#FT_Get_CID_Is_Internally_CID_Keyed">FT_Get_CID_Is_Internally_CID_Keyed</a></td></tr>
<tr><td><a href="#FT_Get_CID_From_Glyph_Index">FT_Get_CID_From_Glyph_Index</a></td></tr>
</table>


<p>This section contains the declaration of CID-keyed font specific functions.</p>

<div class="section">
<h3 id="FT_Get_CID_Registry_Ordering_Supplement">FT_Get_CID_Registry_Ordering_Supplement</h3>
<p>Defined in FT_CID_H (freetype/ftcid.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Get_CID_Registry_Ordering_Supplement</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>       face,
                                           <span class="keyword">const</span> <span class="keyword">char</span>*  *registry,
                                           <span class="keyword">const</span> <span class="keyword">char</span>*  *ordering,
                                           <a href="ft2-basic_types.html#FT_Int">FT_Int</a>       *supplement );
</pre>

<p>Retrieve the Registry/Ordering/Supplement triple (also known as the "R/O/S") from a CID-keyed font.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the input face.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="registry">registry</td><td class="desc">
<p>The registry, as a C&nbsp;string, owned by the face.</p>
</td></tr>
<tr><td class="val" id="ordering">ordering</td><td class="desc">
<p>The ordering, as a C&nbsp;string, owned by the face.</p>
</td></tr>
<tr><td class="val" id="supplement">supplement</td><td class="desc">
<p>The supplement.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>This function only works with CID faces, returning an error otherwise.</p>

<h4>since</h4>
<p>2.3.6</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Get_CID_Is_Internally_CID_Keyed">FT_Get_CID_Is_Internally_CID_Keyed</h3>
<p>Defined in FT_CID_H (freetype/ftcid.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Get_CID_Is_Internally_CID_Keyed</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>   face,
                                      <a href="ft2-basic_types.html#FT_Bool">FT_Bool</a>  *is_cid );
</pre>

<p>Retrieve the type of the input face, CID keyed or not. In contrast to the <a href="ft2-base_interface.html#FT_IS_CID_KEYED">FT_IS_CID_KEYED</a> macro this function returns successfully also for CID-keyed fonts in an SFNT wrapper.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the input face.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="is_cid">is_cid</td><td class="desc">
<p>The type of the face as an <a href="ft2-basic_types.html#FT_Bool">FT_Bool</a>.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>This function only works with CID faces and OpenType fonts, returning an error otherwise.</p>

<h4>since</h4>
<p>2.3.9</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Get_CID_From_Glyph_Index">FT_Get_CID_From_Glyph_Index</h3>
<p>Defined in FT_CID_H (freetype/ftcid.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Get_CID_From_Glyph_Index</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>   face,
                               <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>   glyph_index,
                               <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>  *cid );
</pre>

<p>Retrieve the CID of the input glyph index.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>A handle to the input face.</p>
</td></tr>
<tr><td class="val" id="glyph_index">glyph_index</td><td class="desc">
<p>The input glyph index.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="cid">cid</td><td class="desc">
<p>The CID as an <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>This function only works with CID faces and OpenType fonts, returning an error otherwise.</p>

<h4>since</h4>
<p>2.3.9</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

</body>
</html>
reference/ft2-computations.html000064400000065707151706766400012641 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF;
         width: 87%;
         margin: auto; }

  div.section { width: 75%;
                margin: auto; }
  div.section hr { margin: 4ex 0 1ex 0; }
  div.section h4 { background-color: #EEEEFF;
                   font-size: medium;
                   font-style: oblique;
                   font-weight: bold;
                   margin: 3ex 0 1.5ex 9%;
                   padding: 0.3ex 0 0.3ex 1%; }
  div.section p { margin: 1.5ex 0 1.5ex 10%; }
  div.section pre { margin: 3ex 0 3ex 9%;
                    background-color: #D6E8FF;
                    padding: 2ex 0 2ex 1%; }
  div.section table.fields { width: 90%;
                             margin: 1.5ex 0 1.5ex 10%; }
  div.section table.toc { width: 95%;
                          margin: 1.5ex 0 1.5ex 5%; }
  div.timestamp { text-align: center;
                  font-size: 69%;
                  margin: 1.5ex 0 1.5ex 0; }

  h1 { text-align: center; }
  h3 { font-size: medium;
       margin: 4ex 0 1.5ex 0; }

  p { text-align: justify; }

  pre.colored { color: blue; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  table.fields td.val { font-weight: bold;
                        text-align: right;
                        width: 30%;
                        vertical-align: baseline;
                        padding: 1ex 1em 1ex 0; }
  table.fields td.desc { vertical-align: baseline;
                         padding: 1ex 0 1ex 1em; }
  table.fields td.desc p:first-child { margin: 0; }
  table.fields td.desc p { margin: 1.5ex 0 0 0; }
  table.index { margin: 6ex auto 6ex auto;
                border: 0;
                border-collapse: separate;
                border-spacing: 1em 0.3ex; }
  table.index tr { padding: 0; }
  table.index td { padding: 0; }
  table.index-toc-link { width: 100%;
                         border: 0;
                         border-spacing: 0;
                         margin: 1ex 0 1ex 0; }
  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
                                 font-size: 83%;
                                 text-align: left; }
  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
                                   font-size: 83%;
                                   text-align: center; }
  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
                                  font-size: 83%;
                                  text-align: right; }
  table.synopsis { margin: 6ex auto 6ex auto;
                   border: 0;
                   border-collapse: separate;
                   border-spacing: 2em 0.6ex; }
  table.synopsis tr { padding: 0; }
  table.synopsis td { padding: 0; }
  table.toc td.link { width: 30%;
                      text-align: right;
                      vertical-align: baseline;
                      padding: 1ex 1em 1ex 0; }
  table.toc td.desc { vertical-align: baseline;
                      padding: 1ex 0 1ex 1em;
                      text-align: left; }
  table.toc td.desc p:first-child { margin: 0;
                                    text-align: left; }
  table.toc td.desc p { margin: 1.5ex 0 0 0;
                        text-align: left; }

</style>
</head>
<body>

<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
<h1>FreeType-2.9.1 API Reference</h1>

<h1 id="computations">Computations</h1>
<h2>Synopsis</h2>
<table class="synopsis">
<tr><td><a href="#FT_MulDiv">FT_MulDiv</a></td><td>&nbsp;</td><td><a href="#FT_Atan2">FT_Atan2</a></td></tr>
<tr><td><a href="#FT_MulFix">FT_MulFix</a></td><td><a href="#FT_Angle">FT_Angle</a></td><td><a href="#FT_Angle_Diff">FT_Angle_Diff</a></td></tr>
<tr><td><a href="#FT_DivFix">FT_DivFix</a></td><td><a href="#FT_ANGLE_PI">FT_ANGLE_PI</a></td><td><a href="#FT_Vector_Unit">FT_Vector_Unit</a></td></tr>
<tr><td><a href="#FT_RoundFix">FT_RoundFix</a></td><td><a href="#FT_ANGLE_2PI">FT_ANGLE_2PI</a></td><td><a href="#FT_Vector_Rotate">FT_Vector_Rotate</a></td></tr>
<tr><td><a href="#FT_CeilFix">FT_CeilFix</a></td><td><a href="#FT_ANGLE_PI2">FT_ANGLE_PI2</a></td><td><a href="#FT_Vector_Length">FT_Vector_Length</a></td></tr>
<tr><td><a href="#FT_FloorFix">FT_FloorFix</a></td><td><a href="#FT_ANGLE_PI4">FT_ANGLE_PI4</a></td><td><a href="#FT_Vector_Polarize">FT_Vector_Polarize</a></td></tr>
<tr><td><a href="#FT_Vector_Transform">FT_Vector_Transform</a></td><td><a href="#FT_Sin">FT_Sin</a></td><td><a href="#FT_Vector_From_Polar">FT_Vector_From_Polar</a></td></tr>
<tr><td><a href="#FT_Matrix_Multiply">FT_Matrix_Multiply</a></td><td><a href="#FT_Cos">FT_Cos</a></td><td></td></tr>
<tr><td><a href="#FT_Matrix_Invert">FT_Matrix_Invert</a></td><td><a href="#FT_Tan">FT_Tan</a></td><td></td></tr>
</table>


<p>This section contains various functions used to perform computations on 16.16 fixed-float numbers or 2d vectors.</p>

<div class="section">
<h3 id="FT_MulDiv">FT_MulDiv</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Long">FT_Long</a> )
  <b>FT_MulDiv</b>( <a href="ft2-basic_types.html#FT_Long">FT_Long</a>  a,
             <a href="ft2-basic_types.html#FT_Long">FT_Long</a>  b,
             <a href="ft2-basic_types.html#FT_Long">FT_Long</a>  c );
</pre>

<p>Compute &lsquo;(a*b)/c&rsquo; with maximum accuracy, using a 64-bit intermediate integer whenever necessary.</p>
<p>This function isn't necessarily as fast as some processor specific operations, but is at least completely portable.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="a">a</td><td class="desc">
<p>The first multiplier.</p>
</td></tr>
<tr><td class="val" id="b">b</td><td class="desc">
<p>The second multiplier.</p>
</td></tr>
<tr><td class="val" id="c">c</td><td class="desc">
<p>The divisor.</p>
</td></tr>
</table>

<h4>return</h4>
<p>The result of &lsquo;(a*b)/c&rsquo;. This function never traps when trying to divide by zero; it simply returns &lsquo;MaxInt&rsquo; or &lsquo;MinInt&rsquo; depending on the signs of &lsquo;a&rsquo; and &lsquo;b&rsquo;.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_MulFix">FT_MulFix</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Long">FT_Long</a> )
  <b>FT_MulFix</b>( <a href="ft2-basic_types.html#FT_Long">FT_Long</a>  a,
             <a href="ft2-basic_types.html#FT_Long">FT_Long</a>  b );
</pre>

<p>Compute &lsquo;(a*b)/0x10000&rsquo; with maximum accuracy. Its main use is to multiply a given value by a 16.16 fixed-point factor.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="a">a</td><td class="desc">
<p>The first multiplier.</p>
</td></tr>
<tr><td class="val" id="b">b</td><td class="desc">
<p>The second multiplier. Use a 16.16 factor here whenever possible (see note below).</p>
</td></tr>
</table>

<h4>return</h4>
<p>The result of &lsquo;(a*b)/0x10000&rsquo;.</p>

<h4>note</h4>
<p>This function has been optimized for the case where the absolute value of &lsquo;a&rsquo; is less than 2048, and &lsquo;b&rsquo; is a 16.16 scaling factor. As this happens mainly when scaling from notional units to fractional pixels in FreeType, it resulted in noticeable speed improvements between versions 2.x and 1.x.</p>
<p>As a conclusion, always try to place a 16.16 factor as the <i>second</i> argument of this function; this can make a great difference.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_DivFix">FT_DivFix</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Long">FT_Long</a> )
  <b>FT_DivFix</b>( <a href="ft2-basic_types.html#FT_Long">FT_Long</a>  a,
             <a href="ft2-basic_types.html#FT_Long">FT_Long</a>  b );
</pre>

<p>Compute &lsquo;(a*0x10000)/b&rsquo; with maximum accuracy. Its main use is to divide a given value by a 16.16 fixed-point factor.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="a">a</td><td class="desc">
<p>The numerator.</p>
</td></tr>
<tr><td class="val" id="b">b</td><td class="desc">
<p>The denominator. Use a 16.16 factor here.</p>
</td></tr>
</table>

<h4>return</h4>
<p>The result of &lsquo;(a*0x10000)/b&rsquo;.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_RoundFix">FT_RoundFix</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> )
  <b>FT_RoundFix</b>( <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>  a );
</pre>

<p>Round a 16.16 fixed number.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="a">a</td><td class="desc">
<p>The number to be rounded.</p>
</td></tr>
</table>

<h4>return</h4>
<p>&lsquo;a&rsquo; rounded to the nearest 16.16 fixed integer, halfway cases away from zero.</p>

<h4>note</h4>
<p>The function uses wrap-around arithmetic.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_CeilFix">FT_CeilFix</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> )
  <b>FT_CeilFix</b>( <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>  a );
</pre>

<p>Compute the smallest following integer of a 16.16 fixed number.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="a">a</td><td class="desc">
<p>The number for which the ceiling function is to be computed.</p>
</td></tr>
</table>

<h4>return</h4>
<p>&lsquo;a&rsquo; rounded towards plus infinity.</p>

<h4>note</h4>
<p>The function uses wrap-around arithmetic.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_FloorFix">FT_FloorFix</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> )
  <b>FT_FloorFix</b>( <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>  a );
</pre>

<p>Compute the largest previous integer of a 16.16 fixed number.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="a">a</td><td class="desc">
<p>The number for which the floor function is to be computed.</p>
</td></tr>
</table>

<h4>return</h4>
<p>&lsquo;a&rsquo; rounded towards minus infinity.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Vector_Transform">FT_Vector_Transform</h3>
<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
<pre>
  FT_EXPORT( <span class="keyword">void</span> )
  <b>FT_Vector_Transform</b>( <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>*        vec,
                       <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Matrix">FT_Matrix</a>*  matrix );
</pre>

<p>Transform a single vector through a 2x2 matrix.</p>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="vector">vector</td><td class="desc">
<p>The target vector to transform.</p>
</td></tr>
</table>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="matrix">matrix</td><td class="desc">
<p>A pointer to the source 2x2 matrix.</p>
</td></tr>
</table>

<h4>note</h4>
<p>The result is undefined if either &lsquo;vector&rsquo; or &lsquo;matrix&rsquo; is invalid.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Matrix_Multiply">FT_Matrix_Multiply</h3>
<p>Defined in FT_GLYPH_H (freetype/ftglyph.h).</p>
<pre>
  FT_EXPORT( <span class="keyword">void</span> )
  <b>FT_Matrix_Multiply</b>( <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Matrix">FT_Matrix</a>*  a,
                      <a href="ft2-basic_types.html#FT_Matrix">FT_Matrix</a>*        b );
</pre>

<p>Perform the matrix operation &lsquo;b = a*b&rsquo;.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="a">a</td><td class="desc">
<p>A pointer to matrix &lsquo;a&rsquo;.</p>
</td></tr>
</table>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="b">b</td><td class="desc">
<p>A pointer to matrix &lsquo;b&rsquo;.</p>
</td></tr>
</table>

<h4>note</h4>
<p>The result is undefined if either &lsquo;a&rsquo; or &lsquo;b&rsquo; is zero.</p>
<p>Since the function uses wrap-around arithmetic, results become meaningless if the arguments are very large.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Matrix_Invert">FT_Matrix_Invert</h3>
<p>Defined in FT_GLYPH_H (freetype/ftglyph.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Matrix_Invert</b>( <a href="ft2-basic_types.html#FT_Matrix">FT_Matrix</a>*  matrix );
</pre>

<p>Invert a 2x2 matrix. Return an error if it can't be inverted.</p>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="matrix">matrix</td><td class="desc">
<p>A pointer to the target matrix. Remains untouched in case of error.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Angle">FT_Angle</h3>
<p>Defined in FT_TRIGONOMETRY_H (freetype/fttrigon.h).</p>
<pre>
  <span class="keyword">typedef</span> <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>  <b>FT_Angle</b>;
</pre>

<p>This type is used to model angle values in FreeType. Note that the angle is a 16.16 fixed-point value expressed in degrees.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_ANGLE_PI">FT_ANGLE_PI</h3>
<p>Defined in FT_TRIGONOMETRY_H (freetype/fttrigon.h).</p>
<pre>
#define <b>FT_ANGLE_PI</b>  ( 180L &lt;&lt; 16 )
</pre>

<p>The angle pi expressed in <a href="ft2-computations.html#FT_Angle">FT_Angle</a> units.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_ANGLE_2PI">FT_ANGLE_2PI</h3>
<p>Defined in FT_TRIGONOMETRY_H (freetype/fttrigon.h).</p>
<pre>
#define <b>FT_ANGLE_2PI</b>  ( <a href="ft2-computations.html#FT_ANGLE_PI">FT_ANGLE_PI</a> * 2 )
</pre>

<p>The angle 2*pi expressed in <a href="ft2-computations.html#FT_Angle">FT_Angle</a> units.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_ANGLE_PI2">FT_ANGLE_PI2</h3>
<p>Defined in FT_TRIGONOMETRY_H (freetype/fttrigon.h).</p>
<pre>
#define <b>FT_ANGLE_PI2</b>  ( <a href="ft2-computations.html#FT_ANGLE_PI">FT_ANGLE_PI</a> / 2 )
</pre>

<p>The angle pi/2 expressed in <a href="ft2-computations.html#FT_Angle">FT_Angle</a> units.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_ANGLE_PI4">FT_ANGLE_PI4</h3>
<p>Defined in FT_TRIGONOMETRY_H (freetype/fttrigon.h).</p>
<pre>
#define <b>FT_ANGLE_PI4</b>  ( <a href="ft2-computations.html#FT_ANGLE_PI">FT_ANGLE_PI</a> / 4 )
</pre>

<p>The angle pi/4 expressed in <a href="ft2-computations.html#FT_Angle">FT_Angle</a> units.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Sin">FT_Sin</h3>
<p>Defined in FT_TRIGONOMETRY_H (freetype/fttrigon.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> )
  <b>FT_Sin</b>( <a href="ft2-computations.html#FT_Angle">FT_Angle</a>  angle );
</pre>

<p>Return the sinus of a given angle in fixed-point format.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="angle">angle</td><td class="desc">
<p>The input angle.</p>
</td></tr>
</table>

<h4>return</h4>
<p>The sinus value.</p>

<h4>note</h4>
<p>If you need both the sinus and cosinus for a given angle, use the function <a href="ft2-computations.html#FT_Vector_Unit">FT_Vector_Unit</a>.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Cos">FT_Cos</h3>
<p>Defined in FT_TRIGONOMETRY_H (freetype/fttrigon.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> )
  <b>FT_Cos</b>( <a href="ft2-computations.html#FT_Angle">FT_Angle</a>  angle );
</pre>

<p>Return the cosinus of a given angle in fixed-point format.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="angle">angle</td><td class="desc">
<p>The input angle.</p>
</td></tr>
</table>

<h4>return</h4>
<p>The cosinus value.</p>

<h4>note</h4>
<p>If you need both the sinus and cosinus for a given angle, use the function <a href="ft2-computations.html#FT_Vector_Unit">FT_Vector_Unit</a>.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Tan">FT_Tan</h3>
<p>Defined in FT_TRIGONOMETRY_H (freetype/fttrigon.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> )
  <b>FT_Tan</b>( <a href="ft2-computations.html#FT_Angle">FT_Angle</a>  angle );
</pre>

<p>Return the tangent of a given angle in fixed-point format.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="angle">angle</td><td class="desc">
<p>The input angle.</p>
</td></tr>
</table>

<h4>return</h4>
<p>The tangent value.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Atan2">FT_Atan2</h3>
<p>Defined in FT_TRIGONOMETRY_H (freetype/fttrigon.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-computations.html#FT_Angle">FT_Angle</a> )
  <b>FT_Atan2</b>( <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>  x,
            <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>  y );
</pre>

<p>Return the arc-tangent corresponding to a given vector (x,y) in the 2d plane.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="x">x</td><td class="desc">
<p>The horizontal vector coordinate.</p>
</td></tr>
<tr><td class="val" id="y">y</td><td class="desc">
<p>The vertical vector coordinate.</p>
</td></tr>
</table>

<h4>return</h4>
<p>The arc-tangent value (i.e. angle).</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Angle_Diff">FT_Angle_Diff</h3>
<p>Defined in FT_TRIGONOMETRY_H (freetype/fttrigon.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-computations.html#FT_Angle">FT_Angle</a> )
  <b>FT_Angle_Diff</b>( <a href="ft2-computations.html#FT_Angle">FT_Angle</a>  angle1,
                 <a href="ft2-computations.html#FT_Angle">FT_Angle</a>  angle2 );
</pre>

<p>Return the difference between two angles. The result is always constrained to the ]-PI..PI] interval.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="angle1">angle1</td><td class="desc">
<p>First angle.</p>
</td></tr>
<tr><td class="val" id="angle2">angle2</td><td class="desc">
<p>Second angle.</p>
</td></tr>
</table>

<h4>return</h4>
<p>Constrained value of &lsquo;value2-value1&rsquo;.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Vector_Unit">FT_Vector_Unit</h3>
<p>Defined in FT_TRIGONOMETRY_H (freetype/fttrigon.h).</p>
<pre>
  FT_EXPORT( <span class="keyword">void</span> )
  <b>FT_Vector_Unit</b>( <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>*  vec,
                  <a href="ft2-computations.html#FT_Angle">FT_Angle</a>    angle );
</pre>

<p>Return the unit vector corresponding to a given angle. After the call, the value of &lsquo;vec.x&rsquo; will be &lsquo;cos(angle)&rsquo;, and the value of &lsquo;vec.y&rsquo; will be &lsquo;sin(angle)&rsquo;.</p>
<p>This function is useful to retrieve both the sinus and cosinus of a given angle quickly.</p>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="vec">vec</td><td class="desc">
<p>The address of target vector.</p>
</td></tr>
</table>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="angle">angle</td><td class="desc">
<p>The input angle.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Vector_Rotate">FT_Vector_Rotate</h3>
<p>Defined in FT_TRIGONOMETRY_H (freetype/fttrigon.h).</p>
<pre>
  FT_EXPORT( <span class="keyword">void</span> )
  <b>FT_Vector_Rotate</b>( <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>*  vec,
                    <a href="ft2-computations.html#FT_Angle">FT_Angle</a>    angle );
</pre>

<p>Rotate a vector by a given angle.</p>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="vec">vec</td><td class="desc">
<p>The address of target vector.</p>
</td></tr>
</table>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="angle">angle</td><td class="desc">
<p>The input angle.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Vector_Length">FT_Vector_Length</h3>
<p>Defined in FT_TRIGONOMETRY_H (freetype/fttrigon.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> )
  <b>FT_Vector_Length</b>( <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>*  vec );
</pre>

<p>Return the length of a given vector.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="vec">vec</td><td class="desc">
<p>The address of target vector.</p>
</td></tr>
</table>

<h4>return</h4>
<p>The vector length, expressed in the same units that the original vector coordinates.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Vector_Polarize">FT_Vector_Polarize</h3>
<p>Defined in FT_TRIGONOMETRY_H (freetype/fttrigon.h).</p>
<pre>
  FT_EXPORT( <span class="keyword">void</span> )
  <b>FT_Vector_Polarize</b>( <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>*  vec,
                      <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>   *length,
                      <a href="ft2-computations.html#FT_Angle">FT_Angle</a>   *angle );
</pre>

<p>Compute both the length and angle of a given vector.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="vec">vec</td><td class="desc">
<p>The address of source vector.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="length">length</td><td class="desc">
<p>The vector length.</p>
</td></tr>
<tr><td class="val" id="angle">angle</td><td class="desc">
<p>The vector angle.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Vector_From_Polar">FT_Vector_From_Polar</h3>
<p>Defined in FT_TRIGONOMETRY_H (freetype/fttrigon.h).</p>
<pre>
  FT_EXPORT( <span class="keyword">void</span> )
  <b>FT_Vector_From_Polar</b>( <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>*  vec,
                        <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>    length,
                        <a href="ft2-computations.html#FT_Angle">FT_Angle</a>    angle );
</pre>

<p>Compute vector coordinates from a length and angle.</p>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="vec">vec</td><td class="desc">
<p>The address of source vector.</p>
</td></tr>
</table>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="length">length</td><td class="desc">
<p>The vector length.</p>
</td></tr>
<tr><td class="val" id="angle">angle</td><td class="desc">
<p>The vector angle.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

</body>
</html>
reference/ft2-error_code_values.html000064400000037011151706766400013601 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF;
         width: 87%;
         margin: auto; }

  div.section { width: 75%;
                margin: auto; }
  div.section hr { margin: 4ex 0 1ex 0; }
  div.section h4 { background-color: #EEEEFF;
                   font-size: medium;
                   font-style: oblique;
                   font-weight: bold;
                   margin: 3ex 0 1.5ex 9%;
                   padding: 0.3ex 0 0.3ex 1%; }
  div.section p { margin: 1.5ex 0 1.5ex 10%; }
  div.section pre { margin: 3ex 0 3ex 9%;
                    background-color: #D6E8FF;
                    padding: 2ex 0 2ex 1%; }
  div.section table.fields { width: 90%;
                             margin: 1.5ex 0 1.5ex 10%; }
  div.section table.toc { width: 95%;
                          margin: 1.5ex 0 1.5ex 5%; }
  div.timestamp { text-align: center;
                  font-size: 69%;
                  margin: 1.5ex 0 1.5ex 0; }

  h1 { text-align: center; }
  h3 { font-size: medium;
       margin: 4ex 0 1.5ex 0; }

  p { text-align: justify; }

  pre.colored { color: blue; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  table.fields td.val { font-weight: bold;
                        text-align: right;
                        width: 30%;
                        vertical-align: baseline;
                        padding: 1ex 1em 1ex 0; }
  table.fields td.desc { vertical-align: baseline;
                         padding: 1ex 0 1ex 1em; }
  table.fields td.desc p:first-child { margin: 0; }
  table.fields td.desc p { margin: 1.5ex 0 0 0; }
  table.index { margin: 6ex auto 6ex auto;
                border: 0;
                border-collapse: separate;
                border-spacing: 1em 0.3ex; }
  table.index tr { padding: 0; }
  table.index td { padding: 0; }
  table.index-toc-link { width: 100%;
                         border: 0;
                         border-spacing: 0;
                         margin: 1ex 0 1ex 0; }
  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
                                 font-size: 83%;
                                 text-align: left; }
  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
                                   font-size: 83%;
                                   text-align: center; }
  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
                                  font-size: 83%;
                                  text-align: right; }
  table.synopsis { margin: 6ex auto 6ex auto;
                   border: 0;
                   border-collapse: separate;
                   border-spacing: 2em 0.6ex; }
  table.synopsis tr { padding: 0; }
  table.synopsis td { padding: 0; }
  table.toc td.link { width: 30%;
                      text-align: right;
                      vertical-align: baseline;
                      padding: 1ex 1em 1ex 0; }
  table.toc td.desc { vertical-align: baseline;
                      padding: 1ex 0 1ex 1em;
                      text-align: left; }
  table.toc td.desc p:first-child { margin: 0;
                                    text-align: left; }
  table.toc td.desc p { margin: 1.5ex 0 0 0;
                        text-align: left; }

</style>
</head>
<body>

<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
<h1>FreeType-2.9.1 API Reference</h1>

<h1 id="error_code_values">Error Code Values</h1>
<h2>Synopsis</h2>
<table class="synopsis">
<tr><td><a href="#FT_Err_XXX">FT_Err_XXX</a></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
</table>


<p>The list below is taken verbatim from the file &lsquo;fterrdef.h&rsquo; (loaded automatically by including &lsquo;FT_FREETYPE_H&rsquo;). The first argument of the &lsquo;FT_ERROR_DEF_&rsquo; macro is the error label; by default, the prefix &lsquo;FT_Err_&rsquo; gets added so that you get error names like &lsquo;FT_Err_Cannot_Open_Resource&rsquo;. The second argument is the error code, and the last argument an error string, which is not used by FreeType.</p>
<p>Within your application you should <b>only</b> use error names and <b>never</b> its numeric values! The latter might (and actually do) change in forthcoming FreeType versions.</p>
<p>Macro &lsquo;FT_NOERRORDEF_&rsquo; defines &lsquo;FT_Err_Ok&rsquo;, which is always zero. See the &lsquo;Error Enumerations&rsquo; subsection how to automatically generate a list of error strings.</p>

<div class="section">
<h3 id="FT_Err_XXX">FT_Err_XXX</h3>
<pre>
  /* generic errors */

  FT_NOERRORDEF_( Ok,                                        0x00,
                  "no error" )

  FT_ERRORDEF_( Cannot_Open_Resource,                        0x01,
                "cannot open resource" )
  FT_ERRORDEF_( Unknown_File_Format,                         0x02,
                "unknown file format" )
  FT_ERRORDEF_( Invalid_File_Format,                         0x03,
                "broken file" )
  FT_ERRORDEF_( Invalid_Version,                             0x04,
                "invalid FreeType version" )
  FT_ERRORDEF_( Lower_Module_Version,                        0x05,
                "module version is too low" )
  FT_ERRORDEF_( Invalid_Argument,                            0x06,
                "invalid argument" )
  FT_ERRORDEF_( Unimplemented_Feature,                       0x07,
                "unimplemented feature" )
  FT_ERRORDEF_( Invalid_Table,                               0x08,
                "broken table" )
  FT_ERRORDEF_( Invalid_Offset,                              0x09,
                "broken offset within table" )
  FT_ERRORDEF_( Array_Too_Large,                             0x0A,
                "array allocation size too large" )
  FT_ERRORDEF_( Missing_Module,                              0x0B,
                "missing module" )
  FT_ERRORDEF_( Missing_Property,                            0x0C,
                "missing property" )

  /* glyph/character errors */

  FT_ERRORDEF_( Invalid_Glyph_Index,                         0x10,
                "invalid glyph index" )
  FT_ERRORDEF_( Invalid_Character_Code,                      0x11,
                "invalid character code" )
  FT_ERRORDEF_( Invalid_Glyph_Format,                        0x12,
                "unsupported glyph image format" )
  FT_ERRORDEF_( Cannot_Render_Glyph,                         0x13,
                "cannot render this glyph format" )
  FT_ERRORDEF_( Invalid_Outline,                             0x14,
                "invalid outline" )
  FT_ERRORDEF_( Invalid_Composite,                           0x15,
                "invalid composite glyph" )
  FT_ERRORDEF_( Too_Many_Hints,                              0x16,
                "too many hints" )
  FT_ERRORDEF_( Invalid_Pixel_Size,                          0x17,
                "invalid pixel size" )

  /* handle errors */

  FT_ERRORDEF_( Invalid_Handle,                              0x20,
                "invalid object handle" )
  FT_ERRORDEF_( Invalid_Library_Handle,                      0x21,
                "invalid library handle" )
  FT_ERRORDEF_( Invalid_Driver_Handle,                       0x22,
                "invalid module handle" )
  FT_ERRORDEF_( Invalid_Face_Handle,                         0x23,
                "invalid face handle" )
  FT_ERRORDEF_( Invalid_Size_Handle,                         0x24,
                "invalid size handle" )
  FT_ERRORDEF_( Invalid_Slot_Handle,                         0x25,
                "invalid glyph slot handle" )
  FT_ERRORDEF_( Invalid_CharMap_Handle,                      0x26,
                "invalid charmap handle" )
  FT_ERRORDEF_( Invalid_Cache_Handle,                        0x27,
                "invalid cache manager handle" )
  FT_ERRORDEF_( Invalid_Stream_Handle,                       0x28,
                "invalid stream handle" )

  /* driver errors */

  FT_ERRORDEF_( Too_Many_Drivers,                            0x30,
                "too many modules" )
  FT_ERRORDEF_( Too_Many_Extensions,                         0x31,
                "too many extensions" )

  /* memory errors */

  FT_ERRORDEF_( Out_Of_Memory,                               0x40,
                "out of memory" )
  FT_ERRORDEF_( Unlisted_Object,                             0x41,
                "unlisted object" )

  /* stream errors */

  FT_ERRORDEF_( Cannot_Open_Stream,                          0x51,
                "cannot open stream" )
  FT_ERRORDEF_( Invalid_Stream_Seek,                         0x52,
                "invalid stream seek" )
  FT_ERRORDEF_( Invalid_Stream_Skip,                         0x53,
                "invalid stream skip" )
  FT_ERRORDEF_( Invalid_Stream_Read,                         0x54,
                "invalid stream read" )
  FT_ERRORDEF_( Invalid_Stream_Operation,                    0x55,
                "invalid stream operation" )
  FT_ERRORDEF_( Invalid_Frame_Operation,                     0x56,
                "invalid frame operation" )
  FT_ERRORDEF_( Nested_Frame_Access,                         0x57,
                "nested frame access" )
  FT_ERRORDEF_( Invalid_Frame_Read,                          0x58,
                "invalid frame read" )

  /* raster errors */

  FT_ERRORDEF_( Raster_Uninitialized,                        0x60,
                "raster uninitialized" )
  FT_ERRORDEF_( Raster_Corrupted,                            0x61,
                "raster corrupted" )
  FT_ERRORDEF_( Raster_Overflow,                             0x62,
                "raster overflow" )
  FT_ERRORDEF_( Raster_Negative_Height,                      0x63,
                "negative height while rastering" )

  /* cache errors */

  FT_ERRORDEF_( Too_Many_Caches,                             0x70,
                "too many registered caches" )

  /* TrueType and SFNT errors */

  FT_ERRORDEF_( Invalid_Opcode,                              0x80,
                "invalid opcode" )
  FT_ERRORDEF_( Too_Few_Arguments,                           0x81,
                "too few arguments" )
  FT_ERRORDEF_( Stack_Overflow,                              0x82,
                "stack overflow" )
  FT_ERRORDEF_( Code_Overflow,                               0x83,
                "code overflow" )
  FT_ERRORDEF_( Bad_Argument,                                0x84,
                "bad argument" )
  FT_ERRORDEF_( Divide_By_Zero,                              0x85,
                "division by zero" )
  FT_ERRORDEF_( Invalid_Reference,                           0x86,
                "invalid reference" )
  FT_ERRORDEF_( Debug_OpCode,                                0x87,
                "found debug opcode" )
  FT_ERRORDEF_( ENDF_In_Exec_Stream,                         0x88,
                "found ENDF opcode in execution stream" )
  FT_ERRORDEF_( Nested_DEFS,                                 0x89,
                "nested DEFS" )
  FT_ERRORDEF_( Invalid_CodeRange,                           0x8A,
                "invalid code range" )
  FT_ERRORDEF_( Execution_Too_Long,                          0x8B,
                "execution context too <span class="keyword">long</span>" )
  FT_ERRORDEF_( Too_Many_Function_Defs,                      0x8C,
                "too many function definitions" )
  FT_ERRORDEF_( Too_Many_Instruction_Defs,                   0x8D,
                "too many instruction definitions" )
  FT_ERRORDEF_( Table_Missing,                               0x8E,
                "SFNT font table missing" )
  FT_ERRORDEF_( Horiz_Header_Missing,                        0x8F,
                "horizontal header (hhea) table missing" )
  FT_ERRORDEF_( Locations_Missing,                           0x90,
                "locations (loca) table missing" )
  FT_ERRORDEF_( Name_Table_Missing,                          0x91,
                "name table missing" )
  FT_ERRORDEF_( CMap_Table_Missing,                          0x92,
                "character map (cmap) table missing" )
  FT_ERRORDEF_( Hmtx_Table_Missing,                          0x93,
                "horizontal metrics (hmtx) table missing" )
  FT_ERRORDEF_( Post_Table_Missing,                          0x94,
                "PostScript (post) table missing" )
  FT_ERRORDEF_( Invalid_Horiz_Metrics,                       0x95,
                "invalid horizontal metrics" )
  FT_ERRORDEF_( Invalid_CharMap_Format,                      0x96,
                "invalid character map (cmap) format" )
  FT_ERRORDEF_( Invalid_PPem,                                0x97,
                "invalid ppem value" )
  FT_ERRORDEF_( Invalid_Vert_Metrics,                        0x98,
                "invalid vertical metrics" )
  FT_ERRORDEF_( Could_Not_Find_Context,                      0x99,
                "could not find context" )
  FT_ERRORDEF_( Invalid_Post_Table_Format,                   0x9A,
                "invalid PostScript (post) table format" )
  FT_ERRORDEF_( Invalid_Post_Table,                          0x9B,
                "invalid PostScript (post) table" )
  FT_ERRORDEF_( DEF_In_Glyf_Bytecode,                        0x9C,
                "found FDEF or IDEF opcode in glyf bytecode" )
  FT_ERRORDEF_( Missing_Bitmap,                              0x9D,
                "missing bitmap in strike" )

  /* CFF, CID, and Type 1 errors */

  FT_ERRORDEF_( Syntax_Error,                                0xA0,
                "opcode syntax error" )
  FT_ERRORDEF_( Stack_Underflow,                             0xA1,
                "argument stack underflow" )
  FT_ERRORDEF_( Ignore,                                      0xA2,
                "ignore" )
  FT_ERRORDEF_( No_Unicode_Glyph_Name,                       0xA3,
                "no Unicode glyph name found" )
  FT_ERRORDEF_( Glyph_Too_Big,                               0xA4,
                "glyph too big for hinting" )

  /* BDF errors */

  FT_ERRORDEF_( Missing_Startfont_Field,                     0xB0,
                "`STARTFONT' field missing" )
  FT_ERRORDEF_( Missing_Font_Field,                          0xB1,
                "`FONT' field missing" )
  FT_ERRORDEF_( Missing_Size_Field,                          0xB2,
                "`SIZE' field missing" )
  FT_ERRORDEF_( Missing_Fontboundingbox_Field,               0xB3,
                "`FONTBOUNDINGBOX' field missing" )
  FT_ERRORDEF_( Missing_Chars_Field,                         0xB4,
                "`CHARS' field missing" )
  FT_ERRORDEF_( Missing_Startchar_Field,                     0xB5,
                "`STARTCHAR' field missing" )
  FT_ERRORDEF_( Missing_Encoding_Field,                      0xB6,
                "`ENCODING' field missing" )
  FT_ERRORDEF_( Missing_Bbx_Field,                           0xB7,
                "`BBX' field missing" )
  FT_ERRORDEF_( Bbx_Too_Big,                                 0xB8,
                "`BBX' too big" )
  FT_ERRORDEF_( Corrupted_Font_Header,                       0xB9,
                "Font header corrupted or missing fields" )
  FT_ERRORDEF_( Corrupted_Font_Glyphs,                       0xBA,
                "Font glyphs corrupted or missing fields" )
</pre>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

</body>
</html>
reference/ft2-error_enumerations.html000064400000014011151706766400014014 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF;
         width: 87%;
         margin: auto; }

  div.section { width: 75%;
                margin: auto; }
  div.section hr { margin: 4ex 0 1ex 0; }
  div.section h4 { background-color: #EEEEFF;
                   font-size: medium;
                   font-style: oblique;
                   font-weight: bold;
                   margin: 3ex 0 1.5ex 9%;
                   padding: 0.3ex 0 0.3ex 1%; }
  div.section p { margin: 1.5ex 0 1.5ex 10%; }
  div.section pre { margin: 3ex 0 3ex 9%;
                    background-color: #D6E8FF;
                    padding: 2ex 0 2ex 1%; }
  div.section table.fields { width: 90%;
                             margin: 1.5ex 0 1.5ex 10%; }
  div.section table.toc { width: 95%;
                          margin: 1.5ex 0 1.5ex 5%; }
  div.timestamp { text-align: center;
                  font-size: 69%;
                  margin: 1.5ex 0 1.5ex 0; }

  h1 { text-align: center; }
  h3 { font-size: medium;
       margin: 4ex 0 1.5ex 0; }

  p { text-align: justify; }

  pre.colored { color: blue; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  table.fields td.val { font-weight: bold;
                        text-align: right;
                        width: 30%;
                        vertical-align: baseline;
                        padding: 1ex 1em 1ex 0; }
  table.fields td.desc { vertical-align: baseline;
                         padding: 1ex 0 1ex 1em; }
  table.fields td.desc p:first-child { margin: 0; }
  table.fields td.desc p { margin: 1.5ex 0 0 0; }
  table.index { margin: 6ex auto 6ex auto;
                border: 0;
                border-collapse: separate;
                border-spacing: 1em 0.3ex; }
  table.index tr { padding: 0; }
  table.index td { padding: 0; }
  table.index-toc-link { width: 100%;
                         border: 0;
                         border-spacing: 0;
                         margin: 1ex 0 1ex 0; }
  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
                                 font-size: 83%;
                                 text-align: left; }
  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
                                   font-size: 83%;
                                   text-align: center; }
  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
                                  font-size: 83%;
                                  text-align: right; }
  table.synopsis { margin: 6ex auto 6ex auto;
                   border: 0;
                   border-collapse: separate;
                   border-spacing: 2em 0.6ex; }
  table.synopsis tr { padding: 0; }
  table.synopsis td { padding: 0; }
  table.toc td.link { width: 30%;
                      text-align: right;
                      vertical-align: baseline;
                      padding: 1ex 1em 1ex 0; }
  table.toc td.desc { vertical-align: baseline;
                      padding: 1ex 0 1ex 1em;
                      text-align: left; }
  table.toc td.desc p:first-child { margin: 0;
                                    text-align: left; }
  table.toc td.desc p { margin: 1.5ex 0 0 0;
                        text-align: left; }

</style>
</head>
<body>

<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
<h1>FreeType-2.9.1 API Reference</h1>

<h1 id="error_enumerations">Error Enumerations</h1>

<p>The header file &lsquo;fterrors.h&rsquo; (which is automatically included by &lsquo;freetype.h&rsquo; defines the handling of FreeType's enumeration constants. It can also be used to generate error message strings with a small macro trick explained below.</p>
<p><b>Error</b> <b>Formats</b></p>
<p>The configuration macro FT_CONFIG_OPTION_USE_MODULE_ERRORS can be defined in &lsquo;ftoption.h&rsquo; in order to make the higher byte indicate the module where the error has happened (this is not compatible with standard builds of FreeType&nbsp;2, however). See the file &lsquo;ftmoderr.h&rsquo; for more details.</p>
<p><b>Error</b> <b>Message</b> <b>Strings</b></p>
<p>Error definitions are set up with special macros that allow client applications to build a table of error message strings. The strings are not included in a normal build of FreeType&nbsp;2 to save space (most client applications do not use them).</p>
<p>To do so, you have to define the following macros before including this file.</p>
<pre class="colored">
  FT_ERROR_START_LIST
</pre>
<p>This macro is called before anything else to define the start of the error list. It is followed by several FT_ERROR_DEF calls.</p>
<pre class="colored">
  FT_ERROR_DEF( e, v, s )
</pre>
<p>This macro is called to define one single error. &lsquo;e&rsquo; is the error code identifier (e.g., &lsquo;Invalid_Argument&rsquo;), &lsquo;v&rsquo; is the error's numerical value, and &lsquo;s&rsquo; is the corresponding error string.</p>
<pre class="colored">
  FT_ERROR_END_LIST
</pre>
<p>This macro ends the list.</p>
<p>Additionally, you have to undefine &lsquo;FTERRORS_H_&rsquo; before #including this file.</p>
<p>Here is a simple example.</p>
<pre class="colored">
  #undef FTERRORS_H_
  #define FT_ERRORDEF( e, v, s )  { e, s },
  #define FT_ERROR_START_LIST     {
  #define FT_ERROR_END_LIST       { 0, NULL } };

  const struct
  {
    int          err_code;
    const char*  err_msg;
  } ft_errors[] =

  #include FT_ERRORS_H
</pre>
<p>Note that &lsquo;FT_Err_Ok&rsquo; is <i>not</i> defined with &lsquo;FT_ERRORDEF&rsquo; but with &lsquo;FT_NOERRORDEF&rsquo;; it is always zero.</p>

</body>
</html>
reference/ft2-font_formats.html000064400000013301151706766400012574 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF;
         width: 87%;
         margin: auto; }

  div.section { width: 75%;
                margin: auto; }
  div.section hr { margin: 4ex 0 1ex 0; }
  div.section h4 { background-color: #EEEEFF;
                   font-size: medium;
                   font-style: oblique;
                   font-weight: bold;
                   margin: 3ex 0 1.5ex 9%;
                   padding: 0.3ex 0 0.3ex 1%; }
  div.section p { margin: 1.5ex 0 1.5ex 10%; }
  div.section pre { margin: 3ex 0 3ex 9%;
                    background-color: #D6E8FF;
                    padding: 2ex 0 2ex 1%; }
  div.section table.fields { width: 90%;
                             margin: 1.5ex 0 1.5ex 10%; }
  div.section table.toc { width: 95%;
                          margin: 1.5ex 0 1.5ex 5%; }
  div.timestamp { text-align: center;
                  font-size: 69%;
                  margin: 1.5ex 0 1.5ex 0; }

  h1 { text-align: center; }
  h3 { font-size: medium;
       margin: 4ex 0 1.5ex 0; }

  p { text-align: justify; }

  pre.colored { color: blue; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  table.fields td.val { font-weight: bold;
                        text-align: right;
                        width: 30%;
                        vertical-align: baseline;
                        padding: 1ex 1em 1ex 0; }
  table.fields td.desc { vertical-align: baseline;
                         padding: 1ex 0 1ex 1em; }
  table.fields td.desc p:first-child { margin: 0; }
  table.fields td.desc p { margin: 1.5ex 0 0 0; }
  table.index { margin: 6ex auto 6ex auto;
                border: 0;
                border-collapse: separate;
                border-spacing: 1em 0.3ex; }
  table.index tr { padding: 0; }
  table.index td { padding: 0; }
  table.index-toc-link { width: 100%;
                         border: 0;
                         border-spacing: 0;
                         margin: 1ex 0 1ex 0; }
  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
                                 font-size: 83%;
                                 text-align: left; }
  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
                                   font-size: 83%;
                                   text-align: center; }
  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
                                  font-size: 83%;
                                  text-align: right; }
  table.synopsis { margin: 6ex auto 6ex auto;
                   border: 0;
                   border-collapse: separate;
                   border-spacing: 2em 0.6ex; }
  table.synopsis tr { padding: 0; }
  table.synopsis td { padding: 0; }
  table.toc td.link { width: 30%;
                      text-align: right;
                      vertical-align: baseline;
                      padding: 1ex 1em 1ex 0; }
  table.toc td.desc { vertical-align: baseline;
                      padding: 1ex 0 1ex 1em;
                      text-align: left; }
  table.toc td.desc p:first-child { margin: 0;
                                    text-align: left; }
  table.toc td.desc p { margin: 1.5ex 0 0 0;
                        text-align: left; }

</style>
</head>
<body>

<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
<h1>FreeType-2.9.1 API Reference</h1>

<h1 id="font_formats">Font Formats</h1>
<h2>Synopsis</h2>
<table class="synopsis">
<tr><td><a href="#FT_Get_Font_Format">FT_Get_Font_Format</a></td><td></td><td></td></tr>
</table>


<p>The single function in this section can be used to get the font format. Note that this information is not needed normally; however, there are special cases (like in PDF devices) where it is important to differentiate, in spite of FreeType's uniform API.</p>

<div class="section">
<h3 id="FT_Get_Font_Format">FT_Get_Font_Format</h3>
<p>Defined in FT_FONT_FORMATS_H (freetype/ftfntfmt.h).</p>
<pre>
  FT_EXPORT( <span class="keyword">const</span> <span class="keyword">char</span>* )
  <b>FT_Get_Font_Format</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>  face );


  /* deprecated */
  FT_EXPORT( <span class="keyword">const</span> <span class="keyword">char</span>* )
  FT_Get_X11_Font_Format( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>  face );
</pre>

<p>Return a string describing the format of a given face. Possible values are &lsquo;TrueType&rsquo;, &lsquo;Type&nbsp;1&rsquo;, &lsquo;BDF&rsquo;, &lsquo;PCF&rsquo;, &lsquo;Type&nbsp;42&rsquo;, &lsquo;CID&nbsp;Type&nbsp;1&rsquo;, &lsquo;CFF&rsquo;, &lsquo;PFR&rsquo;, and &lsquo;Windows&nbsp;FNT&rsquo;.</p>
<p>The return value is suitable to be used as an X11 FONT_PROPERTY.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>Input face handle.</p>
</td></tr>
</table>

<h4>return</h4>
<p>Font format string. NULL in case of error.</p>

<h4>note</h4>
<p>A deprecated name for the same function is &lsquo;FT_Get_X11_Font_Format&rsquo;.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

</body>
</html>
reference/ft2-gasp_table.html000064400000020721151706766400012200 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF;
         width: 87%;
         margin: auto; }

  div.section { width: 75%;
                margin: auto; }
  div.section hr { margin: 4ex 0 1ex 0; }
  div.section h4 { background-color: #EEEEFF;
                   font-size: medium;
                   font-style: oblique;
                   font-weight: bold;
                   margin: 3ex 0 1.5ex 9%;
                   padding: 0.3ex 0 0.3ex 1%; }
  div.section p { margin: 1.5ex 0 1.5ex 10%; }
  div.section pre { margin: 3ex 0 3ex 9%;
                    background-color: #D6E8FF;
                    padding: 2ex 0 2ex 1%; }
  div.section table.fields { width: 90%;
                             margin: 1.5ex 0 1.5ex 10%; }
  div.section table.toc { width: 95%;
                          margin: 1.5ex 0 1.5ex 5%; }
  div.timestamp { text-align: center;
                  font-size: 69%;
                  margin: 1.5ex 0 1.5ex 0; }

  h1 { text-align: center; }
  h3 { font-size: medium;
       margin: 4ex 0 1.5ex 0; }

  p { text-align: justify; }

  pre.colored { color: blue; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  table.fields td.val { font-weight: bold;
                        text-align: right;
                        width: 30%;
                        vertical-align: baseline;
                        padding: 1ex 1em 1ex 0; }
  table.fields td.desc { vertical-align: baseline;
                         padding: 1ex 0 1ex 1em; }
  table.fields td.desc p:first-child { margin: 0; }
  table.fields td.desc p { margin: 1.5ex 0 0 0; }
  table.index { margin: 6ex auto 6ex auto;
                border: 0;
                border-collapse: separate;
                border-spacing: 1em 0.3ex; }
  table.index tr { padding: 0; }
  table.index td { padding: 0; }
  table.index-toc-link { width: 100%;
                         border: 0;
                         border-spacing: 0;
                         margin: 1ex 0 1ex 0; }
  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
                                 font-size: 83%;
                                 text-align: left; }
  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
                                   font-size: 83%;
                                   text-align: center; }
  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
                                  font-size: 83%;
                                  text-align: right; }
  table.synopsis { margin: 6ex auto 6ex auto;
                   border: 0;
                   border-collapse: separate;
                   border-spacing: 2em 0.6ex; }
  table.synopsis tr { padding: 0; }
  table.synopsis td { padding: 0; }
  table.toc td.link { width: 30%;
                      text-align: right;
                      vertical-align: baseline;
                      padding: 1ex 1em 1ex 0; }
  table.toc td.desc { vertical-align: baseline;
                      padding: 1ex 0 1ex 1em;
                      text-align: left; }
  table.toc td.desc p:first-child { margin: 0;
                                    text-align: left; }
  table.toc td.desc p { margin: 1.5ex 0 0 0;
                        text-align: left; }

</style>
</head>
<body>

<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
<h1>FreeType-2.9.1 API Reference</h1>

<h1 id="gasp_table">Gasp Table</h1>
<h2>Synopsis</h2>
<table class="synopsis">
<tr><td><a href="#FT_GASP_XXX">FT_GASP_XXX</a></td><td><a href="#FT_Get_Gasp">FT_Get_Gasp</a></td><td></td><td></td><td></td><td></td></tr>
</table>


<p>The function <a href="ft2-gasp_table.html#FT_Get_Gasp">FT_Get_Gasp</a> can be used to query a TrueType or OpenType font for specific entries in its &lsquo;gasp&rsquo; table, if any. This is mainly useful when implementing native TrueType hinting with the bytecode interpreter to duplicate the Windows text rendering results.</p>

<div class="section">
<h3 id="FT_GASP_XXX">FT_GASP_XXX</h3>
<p>Defined in FT_GASP_H (freetype/ftgasp.h).</p>
<pre>
#define <a href="ft2-gasp_table.html#FT_GASP_NO_TABLE">FT_GASP_NO_TABLE</a>               -1
#define <a href="ft2-gasp_table.html#FT_GASP_DO_GRIDFIT">FT_GASP_DO_GRIDFIT</a>           0x01
#define <a href="ft2-gasp_table.html#FT_GASP_DO_GRAY">FT_GASP_DO_GRAY</a>              0x02
#define <a href="ft2-gasp_table.html#FT_GASP_SYMMETRIC_GRIDFIT">FT_GASP_SYMMETRIC_GRIDFIT</a>    0x04
#define <a href="ft2-gasp_table.html#FT_GASP_SYMMETRIC_SMOOTHING">FT_GASP_SYMMETRIC_SMOOTHING</a>  0x08
</pre>

<p>A list of values and/or bit-flags returned by the <a href="ft2-gasp_table.html#FT_Get_Gasp">FT_Get_Gasp</a> function.</p>

<h4>values</h4>
<table class="fields">
<tr><td class="val" id="FT_GASP_NO_TABLE">FT_GASP_NO_TABLE</td><td class="desc">
<p>This special value means that there is no GASP table in this face. It is up to the client to decide what to do.</p>
</td></tr>
<tr><td class="val" id="FT_GASP_DO_GRIDFIT">FT_GASP_DO_GRIDFIT</td><td class="desc">
<p>Grid-fitting and hinting should be performed at the specified ppem. This <b>really</b> means TrueType bytecode interpretation. If this bit is not set, no hinting gets applied.</p>
</td></tr>
<tr><td class="val" id="FT_GASP_DO_GRAY">FT_GASP_DO_GRAY</td><td class="desc">
<p>Anti-aliased rendering should be performed at the specified ppem. If not set, do monochrome rendering.</p>
</td></tr>
<tr><td class="val" id="FT_GASP_SYMMETRIC_SMOOTHING">FT_GASP_SYMMETRIC_SMOOTHING</td><td class="desc">
<p>If set, smoothing along multiple axes must be used with ClearType.</p>
</td></tr>
<tr><td class="val" id="FT_GASP_SYMMETRIC_GRIDFIT">FT_GASP_SYMMETRIC_GRIDFIT</td><td class="desc">
<p>Grid-fitting must be used with ClearType's symmetric smoothing.</p>
</td></tr>
</table>

<h4>note</h4>
<p>The bit-flags &lsquo;FT_GASP_DO_GRIDFIT&rsquo; and &lsquo;FT_GASP_DO_GRAY&rsquo; are to be used for standard font rasterization only. Independently of that, &lsquo;FT_GASP_SYMMETRIC_SMOOTHING&rsquo; and &lsquo;FT_GASP_SYMMETRIC_GRIDFIT&rsquo; are to be used if ClearType is enabled (and &lsquo;FT_GASP_DO_GRIDFIT&rsquo; and &lsquo;FT_GASP_DO_GRAY&rsquo; are consequently ignored).</p>
<p>&lsquo;ClearType&rsquo; is Microsoft's implementation of LCD rendering, partly protected by patents.</p>

<h4>since</h4>
<p>2.3.0</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Get_Gasp">FT_Get_Gasp</h3>
<p>Defined in FT_GASP_H (freetype/ftgasp.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Int">FT_Int</a> )
  <b>FT_Get_Gasp</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>  face,
               <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>  ppem );
</pre>

<p>For a TrueType or OpenType font file, return the rasterizer behaviour flags from the font's &lsquo;gasp&rsquo; table corresponding to a given character pixel size.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="face">face</td><td class="desc">
<p>The source face handle.</p>
</td></tr>
<tr><td class="val" id="ppem">ppem</td><td class="desc">
<p>The vertical character pixel size.</p>
</td></tr>
</table>

<h4>return</h4>
<p>Bit flags (see <a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_XXX</a>), or <a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_NO_TABLE</a> if there is no &lsquo;gasp&rsquo; table in the face.</p>

<h4>note</h4>
<p>If you want to use the MM functionality of OpenType variation fonts (i.e., using <a href="ft2-multiple_masters.html#FT_Set_Var_Design_Coordinates">FT_Set_Var_Design_Coordinates</a> and friends), call this function <b>after</b> setting an instance since the return values can change.</p>

<h4>since</h4>
<p>2.3.0</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

</body>
</html>
reference/ft2-glyph_management.html000064400000065617151706766400013433 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF;
         width: 87%;
         margin: auto; }

  div.section { width: 75%;
                margin: auto; }
  div.section hr { margin: 4ex 0 1ex 0; }
  div.section h4 { background-color: #EEEEFF;
                   font-size: medium;
                   font-style: oblique;
                   font-weight: bold;
                   margin: 3ex 0 1.5ex 9%;
                   padding: 0.3ex 0 0.3ex 1%; }
  div.section p { margin: 1.5ex 0 1.5ex 10%; }
  div.section pre { margin: 3ex 0 3ex 9%;
                    background-color: #D6E8FF;
                    padding: 2ex 0 2ex 1%; }
  div.section table.fields { width: 90%;
                             margin: 1.5ex 0 1.5ex 10%; }
  div.section table.toc { width: 95%;
                          margin: 1.5ex 0 1.5ex 5%; }
  div.timestamp { text-align: center;
                  font-size: 69%;
                  margin: 1.5ex 0 1.5ex 0; }

  h1 { text-align: center; }
  h3 { font-size: medium;
       margin: 4ex 0 1.5ex 0; }

  p { text-align: justify; }

  pre.colored { color: blue; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  table.fields td.val { font-weight: bold;
                        text-align: right;
                        width: 30%;
                        vertical-align: baseline;
                        padding: 1ex 1em 1ex 0; }
  table.fields td.desc { vertical-align: baseline;
                         padding: 1ex 0 1ex 1em; }
  table.fields td.desc p:first-child { margin: 0; }
  table.fields td.desc p { margin: 1.5ex 0 0 0; }
  table.index { margin: 6ex auto 6ex auto;
                border: 0;
                border-collapse: separate;
                border-spacing: 1em 0.3ex; }
  table.index tr { padding: 0; }
  table.index td { padding: 0; }
  table.index-toc-link { width: 100%;
                         border: 0;
                         border-spacing: 0;
                         margin: 1ex 0 1ex 0; }
  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
                                 font-size: 83%;
                                 text-align: left; }
  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
                                   font-size: 83%;
                                   text-align: center; }
  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
                                  font-size: 83%;
                                  text-align: right; }
  table.synopsis { margin: 6ex auto 6ex auto;
                   border: 0;
                   border-collapse: separate;
                   border-spacing: 2em 0.6ex; }
  table.synopsis tr { padding: 0; }
  table.synopsis td { padding: 0; }
  table.toc td.link { width: 30%;
                      text-align: right;
                      vertical-align: baseline;
                      padding: 1ex 1em 1ex 0; }
  table.toc td.desc { vertical-align: baseline;
                      padding: 1ex 0 1ex 1em;
                      text-align: left; }
  table.toc td.desc p:first-child { margin: 0;
                                    text-align: left; }
  table.toc td.desc p { margin: 1.5ex 0 0 0;
                        text-align: left; }

</style>
</head>
<body>

<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
<h1>FreeType-2.9.1 API Reference</h1>

<h1 id="glyph_management">Glyph Management</h1>
<h2>Synopsis</h2>
<table class="synopsis">
<tr><td><a href="#FT_Glyph">FT_Glyph</a></td><td><a href="#FT_OutlineGlyphRec">FT_OutlineGlyphRec</a></td><td><a href="#FT_Glyph_Get_CBox">FT_Glyph_Get_CBox</a></td></tr>
<tr><td><a href="#FT_GlyphRec">FT_GlyphRec</a></td><td><a href="#FT_Get_Glyph">FT_Get_Glyph</a></td><td><a href="#FT_Glyph_To_Bitmap">FT_Glyph_To_Bitmap</a></td></tr>
<tr><td><a href="#FT_BitmapGlyph">FT_BitmapGlyph</a></td><td><a href="#FT_Glyph_Copy">FT_Glyph_Copy</a></td><td><a href="#FT_Done_Glyph">FT_Done_Glyph</a></td></tr>
<tr><td><a href="#FT_BitmapGlyphRec">FT_BitmapGlyphRec</a></td><td><a href="#FT_Glyph_Transform">FT_Glyph_Transform</a></td><td></td></tr>
<tr><td><a href="#FT_OutlineGlyph">FT_OutlineGlyph</a></td><td><a href="#FT_Glyph_BBox_Mode">FT_Glyph_BBox_Mode</a></td><td></td></tr>
</table>


<p>This section contains definitions used to manage glyph data through generic FT_Glyph objects. Each of them can contain a bitmap, a vector outline, or even images in other formats.</p>

<div class="section">
<h3 id="FT_Glyph">FT_Glyph</h3>
<p>Defined in FT_GLYPH_H (freetype/ftglyph.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_GlyphRec_*  <b>FT_Glyph</b>;
</pre>

<p>Handle to an object used to model generic glyph images. It is a pointer to the <a href="ft2-glyph_management.html#FT_GlyphRec">FT_GlyphRec</a> structure and can contain a glyph bitmap or pointer.</p>

<h4>note</h4>
<p>Glyph objects are not owned by the library. You must thus release them manually (through <a href="ft2-glyph_management.html#FT_Done_Glyph">FT_Done_Glyph</a>) <i>before</i> calling <a href="ft2-base_interface.html#FT_Done_FreeType">FT_Done_FreeType</a>.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_GlyphRec">FT_GlyphRec</h3>
<p>Defined in FT_GLYPH_H (freetype/ftglyph.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_GlyphRec_
  {
    <a href="ft2-base_interface.html#FT_Library">FT_Library</a>             library;
    <span class="keyword">const</span> FT_Glyph_Class*  clazz;
    <a href="ft2-basic_types.html#FT_Glyph_Format">FT_Glyph_Format</a>        format;
    <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>              advance;

  } <b>FT_GlyphRec</b>;
</pre>

<p>The root glyph structure contains a given glyph image plus its advance width in 16.16 fixed-point format.</p>

<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to the FreeType library object.</p>
</td></tr>
<tr><td class="val" id="clazz">clazz</td><td class="desc">
<p>A pointer to the glyph's class. Private.</p>
</td></tr>
<tr><td class="val" id="format">format</td><td class="desc">
<p>The format of the glyph's image.</p>
</td></tr>
<tr><td class="val" id="advance">advance</td><td class="desc">
<p>A 16.16 vector that gives the glyph's advance width.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_BitmapGlyph">FT_BitmapGlyph</h3>
<p>Defined in FT_GLYPH_H (freetype/ftglyph.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_BitmapGlyphRec_*  <b>FT_BitmapGlyph</b>;
</pre>

<p>A handle to an object used to model a bitmap glyph image. This is a sub-class of <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a>, and a pointer to <a href="ft2-glyph_management.html#FT_BitmapGlyphRec">FT_BitmapGlyphRec</a>.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_BitmapGlyphRec">FT_BitmapGlyphRec</h3>
<p>Defined in FT_GLYPH_H (freetype/ftglyph.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_BitmapGlyphRec_
  {
    <a href="ft2-glyph_management.html#FT_GlyphRec">FT_GlyphRec</a>  root;
    <a href="ft2-basic_types.html#FT_Int">FT_Int</a>       left;
    <a href="ft2-basic_types.html#FT_Int">FT_Int</a>       top;
    <a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a>    bitmap;

  } <b>FT_BitmapGlyphRec</b>;
</pre>

<p>A structure used for bitmap glyph images. This really is a &lsquo;sub-class&rsquo; of <a href="ft2-glyph_management.html#FT_GlyphRec">FT_GlyphRec</a>.</p>

<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="root">root</td><td class="desc">
<p>The root <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> fields.</p>
</td></tr>
<tr><td class="val" id="left">left</td><td class="desc">
<p>The left-side bearing, i.e., the horizontal distance from the current pen position to the left border of the glyph bitmap.</p>
</td></tr>
<tr><td class="val" id="top">top</td><td class="desc">
<p>The top-side bearing, i.e., the vertical distance from the current pen position to the top border of the glyph bitmap. This distance is positive for upwards&nbsp;y!</p>
</td></tr>
<tr><td class="val" id="bitmap">bitmap</td><td class="desc">
<p>A descriptor for the bitmap.</p>
</td></tr>
</table>

<h4>note</h4>
<p>You can typecast an <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> to <a href="ft2-glyph_management.html#FT_BitmapGlyph">FT_BitmapGlyph</a> if you have &lsquo;glyph-&gt;format == FT_GLYPH_FORMAT_BITMAP&rsquo;. This lets you access the bitmap's contents easily.</p>
<p>The corresponding pixel buffer is always owned by <a href="ft2-glyph_management.html#FT_BitmapGlyph">FT_BitmapGlyph</a> and is thus created and destroyed with it.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_OutlineGlyph">FT_OutlineGlyph</h3>
<p>Defined in FT_GLYPH_H (freetype/ftglyph.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_OutlineGlyphRec_*  <b>FT_OutlineGlyph</b>;
</pre>

<p>A handle to an object used to model an outline glyph image. This is a sub-class of <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a>, and a pointer to <a href="ft2-glyph_management.html#FT_OutlineGlyphRec">FT_OutlineGlyphRec</a>.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_OutlineGlyphRec">FT_OutlineGlyphRec</h3>
<p>Defined in FT_GLYPH_H (freetype/ftglyph.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_OutlineGlyphRec_
  {
    <a href="ft2-glyph_management.html#FT_GlyphRec">FT_GlyphRec</a>  root;
    <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>   outline;

  } <b>FT_OutlineGlyphRec</b>;
</pre>

<p>A structure used for outline (vectorial) glyph images. This really is a &lsquo;sub-class&rsquo; of <a href="ft2-glyph_management.html#FT_GlyphRec">FT_GlyphRec</a>.</p>

<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="root">root</td><td class="desc">
<p>The root <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> fields.</p>
</td></tr>
<tr><td class="val" id="outline">outline</td><td class="desc">
<p>A descriptor for the outline.</p>
</td></tr>
</table>

<h4>note</h4>
<p>You can typecast an <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> to <a href="ft2-glyph_management.html#FT_OutlineGlyph">FT_OutlineGlyph</a> if you have &lsquo;glyph-&gt;format == FT_GLYPH_FORMAT_OUTLINE&rsquo;. This lets you access the outline's content easily.</p>
<p>As the outline is extracted from a glyph slot, its coordinates are expressed normally in 26.6 pixels, unless the flag <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a> was used in <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a>() or <a href="ft2-base_interface.html#FT_Load_Char">FT_Load_Char</a>().</p>
<p>The outline's tables are always owned by the object and are destroyed with it.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Get_Glyph">FT_Get_Glyph</h3>
<p>Defined in FT_GLYPH_H (freetype/ftglyph.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Get_Glyph</b>( <a href="ft2-base_interface.html#FT_GlyphSlot">FT_GlyphSlot</a>  slot,
                <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a>     *aglyph );
</pre>

<p>A function used to extract a glyph image from a slot. Note that the created <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> object must be released with <a href="ft2-glyph_management.html#FT_Done_Glyph">FT_Done_Glyph</a>.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="slot">slot</td><td class="desc">
<p>A handle to the source glyph slot.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="aglyph">aglyph</td><td class="desc">
<p>A handle to the glyph object.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>Because &lsquo;*aglyph-&gt;advance.x&rsquo; and '*aglyph-&gt;advance.y' are 16.16 fixed-point numbers, &lsquo;slot-&gt;advance.x&rsquo; and &lsquo;slot-&gt;advance.y&rsquo; (which are in 26.6 fixed-point format) must be in the range ]-32768;32768[.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Glyph_Copy">FT_Glyph_Copy</h3>
<p>Defined in FT_GLYPH_H (freetype/ftglyph.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Glyph_Copy</b>( <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a>   source,
                 <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a>  *target );
</pre>

<p>A function used to copy a glyph image. Note that the created <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> object must be released with <a href="ft2-glyph_management.html#FT_Done_Glyph">FT_Done_Glyph</a>.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="source">source</td><td class="desc">
<p>A handle to the source glyph object.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="target">target</td><td class="desc">
<p>A handle to the target glyph object. 0&nbsp;in case of error.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Glyph_Transform">FT_Glyph_Transform</h3>
<p>Defined in FT_GLYPH_H (freetype/ftglyph.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Glyph_Transform</b>( <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a>    glyph,
                      <a href="ft2-basic_types.html#FT_Matrix">FT_Matrix</a>*  matrix,
                      <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>*  delta );
</pre>

<p>Transform a glyph image if its format is scalable.</p>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="glyph">glyph</td><td class="desc">
<p>A handle to the target glyph object.</p>
</td></tr>
</table>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="matrix">matrix</td><td class="desc">
<p>A pointer to a 2x2 matrix to apply.</p>
</td></tr>
<tr><td class="val" id="delta">delta</td><td class="desc">
<p>A pointer to a 2d vector to apply. Coordinates are expressed in 1/64th of a pixel.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code (if not 0, the glyph format is not scalable).</p>

<h4>note</h4>
<p>The 2x2 transformation matrix is also applied to the glyph's advance vector.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Glyph_BBox_Mode">FT_Glyph_BBox_Mode</h3>
<p>Defined in FT_GLYPH_H (freetype/ftglyph.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">enum</span>  FT_Glyph_BBox_Mode_
  {
    <a href="ft2-glyph_management.html#FT_GLYPH_BBOX_UNSCALED">FT_GLYPH_BBOX_UNSCALED</a>  = 0,
    <a href="ft2-glyph_management.html#FT_GLYPH_BBOX_SUBPIXELS">FT_GLYPH_BBOX_SUBPIXELS</a> = 0,
    <a href="ft2-glyph_management.html#FT_GLYPH_BBOX_GRIDFIT">FT_GLYPH_BBOX_GRIDFIT</a>   = 1,
    <a href="ft2-glyph_management.html#FT_GLYPH_BBOX_TRUNCATE">FT_GLYPH_BBOX_TRUNCATE</a>  = 2,
    <a href="ft2-glyph_management.html#FT_GLYPH_BBOX_PIXELS">FT_GLYPH_BBOX_PIXELS</a>    = 3

  } <b>FT_Glyph_BBox_Mode</b>;


  /* these constants are deprecated; use the corresponding */
  /* `<b>FT_Glyph_BBox_Mode</b>' values instead                   */
#define ft_glyph_bbox_unscaled   <a href="ft2-glyph_management.html#FT_GLYPH_BBOX_UNSCALED">FT_GLYPH_BBOX_UNSCALED</a>
#define ft_glyph_bbox_subpixels  <a href="ft2-glyph_management.html#FT_GLYPH_BBOX_SUBPIXELS">FT_GLYPH_BBOX_SUBPIXELS</a>
#define ft_glyph_bbox_gridfit    <a href="ft2-glyph_management.html#FT_GLYPH_BBOX_GRIDFIT">FT_GLYPH_BBOX_GRIDFIT</a>
#define ft_glyph_bbox_truncate   <a href="ft2-glyph_management.html#FT_GLYPH_BBOX_TRUNCATE">FT_GLYPH_BBOX_TRUNCATE</a>
#define ft_glyph_bbox_pixels     <a href="ft2-glyph_management.html#FT_GLYPH_BBOX_PIXELS">FT_GLYPH_BBOX_PIXELS</a>
</pre>

<p>The mode how the values of <a href="ft2-glyph_management.html#FT_Glyph_Get_CBox">FT_Glyph_Get_CBox</a> are returned.</p>

<h4>values</h4>
<table class="fields">
<tr><td class="val" id="FT_GLYPH_BBOX_UNSCALED">FT_GLYPH_BBOX_UNSCALED</td><td class="desc">
<p>Return unscaled font units.</p>
</td></tr>
<tr><td class="val" id="FT_GLYPH_BBOX_SUBPIXELS">FT_GLYPH_BBOX_SUBPIXELS</td><td class="desc">
<p>Return unfitted 26.6 coordinates.</p>
</td></tr>
<tr><td class="val" id="FT_GLYPH_BBOX_GRIDFIT">FT_GLYPH_BBOX_GRIDFIT</td><td class="desc">
<p>Return grid-fitted 26.6 coordinates.</p>
</td></tr>
<tr><td class="val" id="FT_GLYPH_BBOX_TRUNCATE">FT_GLYPH_BBOX_TRUNCATE</td><td class="desc">
<p>Return coordinates in integer pixels.</p>
</td></tr>
<tr><td class="val" id="FT_GLYPH_BBOX_PIXELS">FT_GLYPH_BBOX_PIXELS</td><td class="desc">
<p>Return grid-fitted pixel coordinates.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Glyph_Get_CBox">FT_Glyph_Get_CBox</h3>
<p>Defined in FT_GLYPH_H (freetype/ftglyph.h).</p>
<pre>
  FT_EXPORT( <span class="keyword">void</span> )
  <b>FT_Glyph_Get_CBox</b>( <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a>  glyph,
                     <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>   bbox_mode,
                     <a href="ft2-basic_types.html#FT_BBox">FT_BBox</a>  *acbox );
</pre>

<p>Return a glyph's &lsquo;control box&rsquo;. The control box encloses all the outline's points, including Bezier control points. Though it coincides with the exact bounding box for most glyphs, it can be slightly larger in some situations (like when rotating an outline that contains Bezier outside arcs).</p>
<p>Computing the control box is very fast, while getting the bounding box can take much more time as it needs to walk over all segments and arcs in the outline. To get the latter, you can use the &lsquo;ftbbox&rsquo; component, which is dedicated to this single task.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="glyph">glyph</td><td class="desc">
<p>A handle to the source glyph object.</p>
</td></tr>
<tr><td class="val" id="mode">mode</td><td class="desc">
<p>The mode that indicates how to interpret the returned bounding box values.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="acbox">acbox</td><td class="desc">
<p>The glyph coordinate bounding box. Coordinates are expressed in 1/64th of pixels if it is grid-fitted.</p>
</td></tr>
</table>

<h4>note</h4>
<p>Coordinates are relative to the glyph origin, using the y&nbsp;upwards convention.</p>
<p>If the glyph has been loaded with <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a>, &lsquo;bbox_mode&rsquo; must be set to <a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_UNSCALED</a> to get unscaled font units in 26.6 pixel format. The value <a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_SUBPIXELS</a> is another name for this constant.</p>
<p>If the font is tricky and the glyph has been loaded with <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a>, the resulting CBox is meaningless. To get reasonable values for the CBox it is necessary to load the glyph at a large ppem value (so that the hinting instructions can properly shift and scale the subglyphs), then extracting the CBox, which can be eventually converted back to font units.</p>
<p>Note that the maximum coordinates are exclusive, which means that one can compute the width and height of the glyph image (be it in integer or 26.6 pixels) as:</p>
<pre class="colored">
  width  = bbox.xMax - bbox.xMin;
  height = bbox.yMax - bbox.yMin;
</pre>
<p>Note also that for 26.6 coordinates, if &lsquo;bbox_mode&rsquo; is set to <a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_GRIDFIT</a>, the coordinates will also be grid-fitted, which corresponds to:</p>
<pre class="colored">
  bbox.xMin = FLOOR(bbox.xMin);
  bbox.yMin = FLOOR(bbox.yMin);
  bbox.xMax = CEILING(bbox.xMax);
  bbox.yMax = CEILING(bbox.yMax);
</pre>
<p>To get the bbox in pixel coordinates, set &lsquo;bbox_mode&rsquo; to <a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_TRUNCATE</a>.</p>
<p>To get the bbox in grid-fitted pixel coordinates, set &lsquo;bbox_mode&rsquo; to <a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_PIXELS</a>.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Glyph_To_Bitmap">FT_Glyph_To_Bitmap</h3>
<p>Defined in FT_GLYPH_H (freetype/ftglyph.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Glyph_To_Bitmap</b>( <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a>*       the_glyph,
                      <a href="ft2-base_interface.html#FT_Render_Mode">FT_Render_Mode</a>  render_mode,
                      <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>*      origin,
                      <a href="ft2-basic_types.html#FT_Bool">FT_Bool</a>         destroy );
</pre>

<p>Convert a given glyph object to a bitmap glyph object.</p>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="the_glyph">the_glyph</td><td class="desc">
<p>A pointer to a handle to the target glyph.</p>
</td></tr>
</table>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="render_mode">render_mode</td><td class="desc">
<p>An enumeration that describes how the data is rendered.</p>
</td></tr>
<tr><td class="val" id="origin">origin</td><td class="desc">
<p>A pointer to a vector used to translate the glyph image before rendering. Can be&nbsp;0 (if no translation). The origin is expressed in 26.6 pixels.</p>
</td></tr>
<tr><td class="val" id="destroy">destroy</td><td class="desc">
<p>A boolean that indicates that the original glyph image should be destroyed by this function. It is never destroyed in case of error.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>This function does nothing if the glyph format isn't scalable.</p>
<p>The glyph image is translated with the &lsquo;origin&rsquo; vector before rendering.</p>
<p>The first parameter is a pointer to an <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> handle, that will be <i>replaced</i> by this function (with newly allocated data). Typically, you would use (omitting error handling):</p>
<p></p>
<pre class="colored">
  FT_Glyph        glyph;
  FT_BitmapGlyph  glyph_bitmap;


  // load glyph
  error = FT_Load_Char( face, glyph_index, FT_LOAD_DEFAULT );

  // extract glyph image
  error = FT_Get_Glyph( face-&gt;glyph, &amp;glyph );

  // convert to a bitmap (default render mode + destroying old)
  if ( glyph-&gt;format != FT_GLYPH_FORMAT_BITMAP )
  {
    error = FT_Glyph_To_Bitmap( &amp;glyph, FT_RENDER_MODE_NORMAL,
                                0, 1 );
    if ( error ) // `glyph' unchanged
      ...
  }

  // access bitmap content by typecasting
  glyph_bitmap = (FT_BitmapGlyph)glyph;

  // do funny stuff with it, like blitting/drawing
  ...

  // discard glyph image (bitmap or not)
  FT_Done_Glyph( glyph );
</pre>
<p></p>
<p>Here another example, again without error handling:</p>
<p></p>
<pre class="colored">
  FT_Glyph  glyphs[MAX_GLYPHS]


  ...

  for ( idx = 0; i &lt; MAX_GLYPHS; i++ )
    error = FT_Load_Glyph( face, idx, FT_LOAD_DEFAULT ) ||
            FT_Get_Glyph ( face-&gt;glyph, &amp;glyph[idx] );

  ...

  for ( idx = 0; i &lt; MAX_GLYPHS; i++ )
  {
    FT_Glyph  bitmap = glyphs[idx];


    ...

    // after this call, `bitmap' no longer points into
    // the `glyphs' array (and the old value isn't destroyed)
    FT_Glyph_To_Bitmap( &amp;bitmap, FT_RENDER_MODE_MONO, 0, 0 );

    ...

    FT_Done_Glyph( bitmap );
  }

  ...

  for ( idx = 0; i &lt; MAX_GLYPHS; i++ )
    FT_Done_Glyph( glyphs[idx] );
</pre>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Done_Glyph">FT_Done_Glyph</h3>
<p>Defined in FT_GLYPH_H (freetype/ftglyph.h).</p>
<pre>
  FT_EXPORT( <span class="keyword">void</span> )
  <b>FT_Done_Glyph</b>( <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a>  glyph );
</pre>

<p>Destroy a given glyph.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="glyph">glyph</td><td class="desc">
<p>A handle to the target glyph object.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

</body>
</html>
reference/ft2-glyph_stroker.html000064400000115321151706766400012774 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.9.1 API Reference</title>
<style type="text/css">
  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF;
         width: 87%;
         margin: auto; }

  div.section { width: 75%;
                margin: auto; }
  div.section hr { margin: 4ex 0 1ex 0; }
  div.section h4 { background-color: #EEEEFF;
                   font-size: medium;
                   font-style: oblique;
                   font-weight: bold;
                   margin: 3ex 0 1.5ex 9%;
                   padding: 0.3ex 0 0.3ex 1%; }
  div.section p { margin: 1.5ex 0 1.5ex 10%; }
  div.section pre { margin: 3ex 0 3ex 9%;
                    background-color: #D6E8FF;
                    padding: 2ex 0 2ex 1%; }
  div.section table.fields { width: 90%;
                             margin: 1.5ex 0 1.5ex 10%; }
  div.section table.toc { width: 95%;
                          margin: 1.5ex 0 1.5ex 5%; }
  div.timestamp { text-align: center;
                  font-size: 69%;
                  margin: 1.5ex 0 1.5ex 0; }

  h1 { text-align: center; }
  h3 { font-size: medium;
       margin: 4ex 0 1.5ex 0; }

  p { text-align: justify; }

  pre.colored { color: blue; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  table.fields td.val { font-weight: bold;
                        text-align: right;
                        width: 30%;
                        vertical-align: baseline;
                        padding: 1ex 1em 1ex 0; }
  table.fields td.desc { vertical-align: baseline;
                         padding: 1ex 0 1ex 1em; }
  table.fields td.desc p:first-child { margin: 0; }
  table.fields td.desc p { margin: 1.5ex 0 0 0; }
  table.index { margin: 6ex auto 6ex auto;
                border: 0;
                border-collapse: separate;
                border-spacing: 1em 0.3ex; }
  table.index tr { padding: 0; }
  table.index td { padding: 0; }
  table.index-toc-link { width: 100%;
                         border: 0;
                         border-spacing: 0;
                         margin: 1ex 0 1ex 0; }
  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
                                 font-size: 83%;
                                 text-align: left; }
  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
                                   font-size: 83%;
                                   text-align: center; }
  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
                                  font-size: 83%;
                                  text-align: right; }
  table.synopsis { margin: 6ex auto 6ex auto;
                   border: 0;
                   border-collapse: separate;
                   border-spacing: 2em 0.6ex; }
  table.synopsis tr { padding: 0; }
  table.synopsis td { padding: 0; }
  table.toc td.link { width: 30%;
                      text-align: right;
                      vertical-align: baseline;
                      padding: 1ex 1em 1ex 0; }
  table.toc td.desc { vertical-align: baseline;
                      padding: 1ex 0 1ex 1em;
                      text-align: left; }
  table.toc td.desc p:first-child { margin: 0;
                                    text-align: left; }
  table.toc td.desc p { margin: 1.5ex 0 0 0;
                        text-align: left; }

</style>
</head>
<body>

<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
<h1>FreeType-2.9.1 API Reference</h1>

<h1 id="glyph_stroker">Glyph Stroker</h1>
<h2>Synopsis</h2>
<table class="synopsis">
<tr><td><a href="#FT_Stroker">FT_Stroker</a></td><td><a href="#FT_Stroker_ParseOutline">FT_Stroker_ParseOutline</a></td></tr>
<tr><td>&nbsp;</td><td><a href="#FT_Stroker_Done">FT_Stroker_Done</a></td></tr>
<tr><td><a href="#FT_Stroker_LineJoin">FT_Stroker_LineJoin</a></td><td>&nbsp;</td></tr>
<tr><td><a href="#FT_Stroker_LineCap">FT_Stroker_LineCap</a></td><td><a href="#FT_Stroker_BeginSubPath">FT_Stroker_BeginSubPath</a></td></tr>
<tr><td><a href="#FT_StrokerBorder">FT_StrokerBorder</a></td><td><a href="#FT_Stroker_EndSubPath">FT_Stroker_EndSubPath</a></td></tr>
<tr><td>&nbsp;</td><td>&nbsp;</td></tr>
<tr><td><a href="#FT_Outline_GetInsideBorder">FT_Outline_GetInsideBorder</a></td><td><a href="#FT_Stroker_LineTo">FT_Stroker_LineTo</a></td></tr>
<tr><td><a href="#FT_Outline_GetOutsideBorder">FT_Outline_GetOutsideBorder</a></td><td><a href="#FT_Stroker_ConicTo">FT_Stroker_ConicTo</a></td></tr>
<tr><td>&nbsp;</td><td><a href="#FT_Stroker_CubicTo">FT_Stroker_CubicTo</a></td></tr>
<tr><td><a href="#FT_Glyph_Stroke">FT_Glyph_Stroke</a></td><td>&nbsp;</td></tr>
<tr><td><a href="#FT_Glyph_StrokeBorder">FT_Glyph_StrokeBorder</a></td><td><a href="#FT_Stroker_GetBorderCounts">FT_Stroker_GetBorderCounts</a></td></tr>
<tr><td>&nbsp;</td><td><a href="#FT_Stroker_ExportBorder">FT_Stroker_ExportBorder</a></td></tr>
<tr><td><a href="#FT_Stroker_New">FT_Stroker_New</a></td><td><a href="#FT_Stroker_GetCounts">FT_Stroker_GetCounts</a></td></tr>
<tr><td><a href="#FT_Stroker_Set">FT_Stroker_Set</a></td><td><a href="#FT_Stroker_Export">FT_Stroker_Export</a></td></tr>
<tr><td><a href="#FT_Stroker_Rewind">FT_Stroker_Rewind</a></td><td></td></tr>
</table>


<p>This component generates stroked outlines of a given vectorial glyph. It also allows you to retrieve the &lsquo;outside&rsquo; and/or the &lsquo;inside&rsquo; borders of the stroke.</p>
<p>This can be useful to generate &lsquo;bordered&rsquo; glyph, i.e., glyphs displayed with a coloured (and anti-aliased) border around their shape.</p>

<div class="section">
<h3 id="FT_Stroker">FT_Stroker</h3>
<p>Defined in FT_STROKER_H (freetype/ftstroke.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_StrokerRec_*  <b>FT_Stroker</b>;
</pre>

<p>Opaque handle to a path stroker object.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Stroker_LineJoin">FT_Stroker_LineJoin</h3>
<p>Defined in FT_STROKER_H (freetype/ftstroke.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">enum</span>  FT_Stroker_LineJoin_
  {
    <a href="ft2-glyph_stroker.html#FT_STROKER_LINEJOIN_ROUND">FT_STROKER_LINEJOIN_ROUND</a>          = 0,
    <a href="ft2-glyph_stroker.html#FT_STROKER_LINEJOIN_BEVEL">FT_STROKER_LINEJOIN_BEVEL</a>          = 1,
    <a href="ft2-glyph_stroker.html#FT_STROKER_LINEJOIN_MITER_VARIABLE">FT_STROKER_LINEJOIN_MITER_VARIABLE</a> = 2,
    <a href="ft2-glyph_stroker.html#FT_STROKER_LINEJOIN_MITER">FT_STROKER_LINEJOIN_MITER</a>          = <a href="ft2-glyph_stroker.html#FT_STROKER_LINEJOIN_MITER_VARIABLE">FT_STROKER_LINEJOIN_MITER_VARIABLE</a>,
    <a href="ft2-glyph_stroker.html#FT_STROKER_LINEJOIN_MITER_FIXED">FT_STROKER_LINEJOIN_MITER_FIXED</a>    = 3

  } <b>FT_Stroker_LineJoin</b>;
</pre>

<p>These values determine how two joining lines are rendered in a stroker.</p>

<h4>values</h4>
<table class="fields">
<tr><td class="val" id="FT_STROKER_LINEJOIN_ROUND">FT_STROKER_LINEJOIN_ROUND</td><td class="desc">
<p>Used to render rounded line joins. Circular arcs are used to join two lines smoothly.</p>
</td></tr>
<tr><td class="val" id="FT_STROKER_LINEJOIN_BEVEL">FT_STROKER_LINEJOIN_BEVEL</td><td class="desc">
<p>Used to render beveled line joins. The outer corner of the joined lines is filled by enclosing the triangular region of the corner with a straight line between the outer corners of each stroke.</p>
</td></tr>
<tr><td class="val" id="FT_STROKER_LINEJOIN_MITER_FIXED">FT_STROKER_LINEJOIN_MITER_FIXED</td><td class="desc">
<p>Used to render mitered line joins, with fixed bevels if the miter limit is exceeded. The outer edges of the strokes for the two segments are extended until they meet at an angle. If the segments meet at too sharp an angle (such that the miter would extend from the intersection of the segments a distance greater than the product of the miter limit value and the border radius), then a bevel join (see above) is used instead. This prevents long spikes being created. FT_STROKER_LINEJOIN_MITER_FIXED generates a miter line join as used in PostScript and PDF.</p>
</td></tr>
<tr><td class="val" id="FT_STROKER_LINEJOIN_MITER_VARIABLE">FT_STROKER_LINEJOIN_MITER_VARIABLE</td><td class="desc">
<p></p>
</td></tr>
<tr><td class="val" id="FT_STROKER_LINEJOIN_MITER">FT_STROKER_LINEJOIN_MITER</td><td class="desc">
<p>Used to render mitered line joins, with variable bevels if the miter limit is exceeded. The intersection of the strokes is clipped at a line perpendicular to the bisector of the angle between the strokes, at the distance from the intersection of the segments equal to the product of the miter limit value and the border radius. This prevents long spikes being created. FT_STROKER_LINEJOIN_MITER_VARIABLE generates a mitered line join as used in XPS. FT_STROKER_LINEJOIN_MITER is an alias for FT_STROKER_LINEJOIN_MITER_VARIABLE, retained for backward compatibility.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Stroker_LineCap">FT_Stroker_LineCap</h3>
<p>Defined in FT_STROKER_H (freetype/ftstroke.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">enum</span>  FT_Stroker_LineCap_
  {
    <a href="ft2-glyph_stroker.html#FT_STROKER_LINECAP_BUTT">FT_STROKER_LINECAP_BUTT</a> = 0,
    <a href="ft2-glyph_stroker.html#FT_STROKER_LINECAP_ROUND">FT_STROKER_LINECAP_ROUND</a>,
    <a href="ft2-glyph_stroker.html#FT_STROKER_LINECAP_SQUARE">FT_STROKER_LINECAP_SQUARE</a>

  } <b>FT_Stroker_LineCap</b>;
</pre>

<p>These values determine how the end of opened sub-paths are rendered in a stroke.</p>

<h4>values</h4>
<table class="fields">
<tr><td class="val" id="FT_STROKER_LINECAP_BUTT">FT_STROKER_LINECAP_BUTT</td><td class="desc">
<p>The end of lines is rendered as a full stop on the last point itself.</p>
</td></tr>
<tr><td class="val" id="FT_STROKER_LINECAP_ROUND">FT_STROKER_LINECAP_ROUND</td><td class="desc">
<p>The end of lines is rendered as a half-circle around the last point.</p>
</td></tr>
<tr><td class="val" id="FT_STROKER_LINECAP_SQUARE">FT_STROKER_LINECAP_SQUARE</td><td class="desc">
<p>The end of lines is rendered as a square around the last point.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_StrokerBorder">FT_StrokerBorder</h3>
<p>Defined in FT_STROKER_H (freetype/ftstroke.h).</p>
<pre>
  <span class="keyword">typedef</span> <span class="keyword">enum</span>  FT_StrokerBorder_
  {
    <a href="ft2-glyph_stroker.html#FT_STROKER_BORDER_LEFT">FT_STROKER_BORDER_LEFT</a> = 0,
    <a href="ft2-glyph_stroker.html#FT_STROKER_BORDER_RIGHT">FT_STROKER_BORDER_RIGHT</a>

  } <b>FT_StrokerBorder</b>;
</pre>

<p>These values are used to select a given stroke border in <a href="ft2-glyph_stroker.html#FT_Stroker_GetBorderCounts">FT_Stroker_GetBorderCounts</a> and <a href="ft2-glyph_stroker.html#FT_Stroker_ExportBorder">FT_Stroker_ExportBorder</a>.</p>

<h4>values</h4>
<table class="fields">
<tr><td class="val" id="FT_STROKER_BORDER_LEFT">FT_STROKER_BORDER_LEFT</td><td class="desc">
<p>Select the left border, relative to the drawing direction.</p>
</td></tr>
<tr><td class="val" id="FT_STROKER_BORDER_RIGHT">FT_STROKER_BORDER_RIGHT</td><td class="desc">
<p>Select the right border, relative to the drawing direction.</p>
</td></tr>
</table>

<h4>note</h4>
<p>Applications are generally interested in the &lsquo;inside&rsquo; and &lsquo;outside&rsquo; borders. However, there is no direct mapping between these and the &lsquo;left&rsquo; and &lsquo;right&rsquo; ones, since this really depends on the glyph's drawing orientation, which varies between font formats.</p>
<p>You can however use <a href="ft2-glyph_stroker.html#FT_Outline_GetInsideBorder">FT_Outline_GetInsideBorder</a> and <a href="ft2-glyph_stroker.html#FT_Outline_GetOutsideBorder">FT_Outline_GetOutsideBorder</a> to get these.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Outline_GetInsideBorder">FT_Outline_GetInsideBorder</h3>
<p>Defined in FT_STROKER_H (freetype/ftstroke.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-glyph_stroker.html#FT_StrokerBorder">FT_StrokerBorder</a> )
  <b>FT_Outline_GetInsideBorder</b>( <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>*  outline );
</pre>

<p>Retrieve the <a href="ft2-glyph_stroker.html#FT_StrokerBorder">FT_StrokerBorder</a> value corresponding to the &lsquo;inside&rsquo; borders of a given outline.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="outline">outline</td><td class="desc">
<p>The source outline handle.</p>
</td></tr>
</table>

<h4>return</h4>
<p>The border index. <a href="ft2-glyph_stroker.html#FT_StrokerBorder">FT_STROKER_BORDER_RIGHT</a> for empty or invalid outlines.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Outline_GetOutsideBorder">FT_Outline_GetOutsideBorder</h3>
<p>Defined in FT_STROKER_H (freetype/ftstroke.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-glyph_stroker.html#FT_StrokerBorder">FT_StrokerBorder</a> )
  <b>FT_Outline_GetOutsideBorder</b>( <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>*  outline );
</pre>

<p>Retrieve the <a href="ft2-glyph_stroker.html#FT_StrokerBorder">FT_StrokerBorder</a> value corresponding to the &lsquo;outside&rsquo; borders of a given outline.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="outline">outline</td><td class="desc">
<p>The source outline handle.</p>
</td></tr>
</table>

<h4>return</h4>
<p>The border index. <a href="ft2-glyph_stroker.html#FT_StrokerBorder">FT_STROKER_BORDER_LEFT</a> for empty or invalid outlines.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Glyph_Stroke">FT_Glyph_Stroke</h3>
<p>Defined in FT_STROKER_H (freetype/ftstroke.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Glyph_Stroke</b>( <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a>    *pglyph,
                   <a href="ft2-glyph_stroker.html#FT_Stroker">FT_Stroker</a>   stroker,
                   <a href="ft2-basic_types.html#FT_Bool">FT_Bool</a>      destroy );
</pre>

<p>Stroke a given outline glyph object with a given stroker.</p>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="pglyph">pglyph</td><td class="desc">
<p>Source glyph handle on input, new glyph handle on output.</p>
</td></tr>
</table>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="stroker">stroker</td><td class="desc">
<p>A stroker handle.</p>
</td></tr>
<tr><td class="val" id="destroy">destroy</td><td class="desc">
<p>A Boolean. If&nbsp;1, the source glyph object is destroyed on success.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>The source glyph is untouched in case of error.</p>
<p>Adding stroke may yield a significantly wider and taller glyph depending on how large of a radius was used to stroke the glyph. You may need to manually adjust horizontal and vertical advance amounts to account for this added size.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Glyph_StrokeBorder">FT_Glyph_StrokeBorder</h3>
<p>Defined in FT_STROKER_H (freetype/ftstroke.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Glyph_StrokeBorder</b>( <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a>    *pglyph,
                         <a href="ft2-glyph_stroker.html#FT_Stroker">FT_Stroker</a>   stroker,
                         <a href="ft2-basic_types.html#FT_Bool">FT_Bool</a>      inside,
                         <a href="ft2-basic_types.html#FT_Bool">FT_Bool</a>      destroy );
</pre>

<p>Stroke a given outline glyph object with a given stroker, but only return either its inside or outside border.</p>

<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="pglyph">pglyph</td><td class="desc">
<p>Source glyph handle on input, new glyph handle on output.</p>
</td></tr>
</table>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="stroker">stroker</td><td class="desc">
<p>A stroker handle.</p>
</td></tr>
<tr><td class="val" id="inside">inside</td><td class="desc">
<p>A Boolean. If&nbsp;1, return the inside border, otherwise the outside border.</p>
</td></tr>
<tr><td class="val" id="destroy">destroy</td><td class="desc">
<p>A Boolean. If&nbsp;1, the source glyph object is destroyed on success.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>The source glyph is untouched in case of error.</p>
<p>Adding stroke may yield a significantly wider and taller glyph depending on how large of a radius was used to stroke the glyph. You may need to manually adjust horizontal and vertical advance amounts to account for this added size.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Stroker_New">FT_Stroker_New</h3>
<p>Defined in FT_STROKER_H (freetype/ftstroke.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Stroker_New</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a>   library,
                  <a href="ft2-glyph_stroker.html#FT_Stroker">FT_Stroker</a>  *astroker );
</pre>

<p>Create a new stroker object.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="library">library</td><td class="desc">
<p>FreeType library handle.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="astroker">astroker</td><td class="desc">
<p>A new stroker object handle. NULL in case of error.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Stroker_Set">FT_Stroker_Set</h3>
<p>Defined in FT_STROKER_H (freetype/ftstroke.h).</p>
<pre>
  FT_EXPORT( <span class="keyword">void</span> )
  <b>FT_Stroker_Set</b>( <a href="ft2-glyph_stroker.html#FT_Stroker">FT_Stroker</a>           stroker,
                  <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>             radius,
                  <a href="ft2-glyph_stroker.html#FT_Stroker_LineCap">FT_Stroker_LineCap</a>   line_cap,
                  <a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_Stroker_LineJoin</a>  line_join,
                  <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>             miter_limit );
</pre>

<p>Reset a stroker object's attributes.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="stroker">stroker</td><td class="desc">
<p>The target stroker handle.</p>
</td></tr>
<tr><td class="val" id="radius">radius</td><td class="desc">
<p>The border radius.</p>
</td></tr>
<tr><td class="val" id="line_cap">line_cap</td><td class="desc">
<p>The line cap style.</p>
</td></tr>
<tr><td class="val" id="line_join">line_join</td><td class="desc">
<p>The line join style.</p>
</td></tr>
<tr><td class="val" id="miter_limit">miter_limit</td><td class="desc">
<p>The miter limit for the FT_STROKER_LINEJOIN_MITER_FIXED and FT_STROKER_LINEJOIN_MITER_VARIABLE line join styles, expressed as 16.16 fixed-point value.</p>
</td></tr>
</table>

<h4>note</h4>
<p>The radius is expressed in the same units as the outline coordinates.</p>
<p>This function calls <a href="ft2-glyph_stroker.html#FT_Stroker_Rewind">FT_Stroker_Rewind</a> automatically.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Stroker_Rewind">FT_Stroker_Rewind</h3>
<p>Defined in FT_STROKER_H (freetype/ftstroke.h).</p>
<pre>
  FT_EXPORT( <span class="keyword">void</span> )
  <b>FT_Stroker_Rewind</b>( <a href="ft2-glyph_stroker.html#FT_Stroker">FT_Stroker</a>  stroker );
</pre>

<p>Reset a stroker object without changing its attributes. You should call this function before beginning a new series of calls to <a href="ft2-glyph_stroker.html#FT_Stroker_BeginSubPath">FT_Stroker_BeginSubPath</a> or <a href="ft2-glyph_stroker.html#FT_Stroker_EndSubPath">FT_Stroker_EndSubPath</a>.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="stroker">stroker</td><td class="desc">
<p>The target stroker handle.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Stroker_ParseOutline">FT_Stroker_ParseOutline</h3>
<p>Defined in FT_STROKER_H (freetype/ftstroke.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Stroker_ParseOutline</b>( <a href="ft2-glyph_stroker.html#FT_Stroker">FT_Stroker</a>   stroker,
                           <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>*  outline,
                           <a href="ft2-basic_types.html#FT_Bool">FT_Bool</a>      opened );
</pre>

<p>A convenience function used to parse a whole outline with the stroker. The resulting outline(s) can be retrieved later by functions like <a href="ft2-glyph_stroker.html#FT_Stroker_GetCounts">FT_Stroker_GetCounts</a> and <a href="ft2-glyph_stroker.html#FT_Stroker_Export">FT_Stroker_Export</a>.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="stroker">stroker</td><td class="desc">
<p>The target stroker handle.</p>
</td></tr>
<tr><td class="val" id="outline">outline</td><td class="desc">
<p>The source outline.</p>
</td></tr>
<tr><td class="val" id="opened">opened</td><td class="desc">
<p>A boolean. If&nbsp;1, the outline is treated as an open path instead of a closed one.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>If &lsquo;opened&rsquo; is&nbsp;0 (the default), the outline is treated as a closed path, and the stroker generates two distinct &lsquo;border&rsquo; outlines.</p>
<p>If &lsquo;opened&rsquo; is&nbsp;1, the outline is processed as an open path, and the stroker generates a single &lsquo;stroke&rsquo; outline.</p>
<p>This function calls <a href="ft2-glyph_stroker.html#FT_Stroker_Rewind">FT_Stroker_Rewind</a> automatically.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Stroker_Done">FT_Stroker_Done</h3>
<p>Defined in FT_STROKER_H (freetype/ftstroke.h).</p>
<pre>
  FT_EXPORT( <span class="keyword">void</span> )
  <b>FT_Stroker_Done</b>( <a href="ft2-glyph_stroker.html#FT_Stroker">FT_Stroker</a>  stroker );
</pre>

<p>Destroy a stroker object.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="stroker">stroker</td><td class="desc">
<p>A stroker handle. Can be NULL.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Stroker_BeginSubPath">FT_Stroker_BeginSubPath</h3>
<p>Defined in FT_STROKER_H (freetype/ftstroke.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Stroker_BeginSubPath</b>( <a href="ft2-glyph_stroker.html#FT_Stroker">FT_Stroker</a>  stroker,
                           <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>*  to,
                           <a href="ft2-basic_types.html#FT_Bool">FT_Bool</a>     open );
</pre>

<p>Start a new sub-path in the stroker.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="stroker">stroker</td><td class="desc">
<p>The target stroker handle.</p>
</td></tr>
<tr><td class="val" id="to">to</td><td class="desc">
<p>A pointer to the start vector.</p>
</td></tr>
<tr><td class="val" id="open">open</td><td class="desc">
<p>A boolean. If&nbsp;1, the sub-path is treated as an open one.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>This function is useful when you need to stroke a path that is not stored as an <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a> object.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Stroker_EndSubPath">FT_Stroker_EndSubPath</h3>
<p>Defined in FT_STROKER_H (freetype/ftstroke.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Stroker_EndSubPath</b>( <a href="ft2-glyph_stroker.html#FT_Stroker">FT_Stroker</a>  stroker );
</pre>

<p>Close the current sub-path in the stroker.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="stroker">stroker</td><td class="desc">
<p>The target stroker handle.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>You should call this function after <a href="ft2-glyph_stroker.html#FT_Stroker_BeginSubPath">FT_Stroker_BeginSubPath</a>. If the subpath was not &lsquo;opened&rsquo;, this function &lsquo;draws&rsquo; a single line segment to the start position when needed.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Stroker_LineTo">FT_Stroker_LineTo</h3>
<p>Defined in FT_STROKER_H (freetype/ftstroke.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Stroker_LineTo</b>( <a href="ft2-glyph_stroker.html#FT_Stroker">FT_Stroker</a>  stroker,
                     <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>*  to );
</pre>

<p>&lsquo;Draw&rsquo; a single line segment in the stroker's current sub-path, from the last position.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="stroker">stroker</td><td class="desc">
<p>The target stroker handle.</p>
</td></tr>
<tr><td class="val" id="to">to</td><td class="desc">
<p>A pointer to the destination point.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>You should call this function between <a href="ft2-glyph_stroker.html#FT_Stroker_BeginSubPath">FT_Stroker_BeginSubPath</a> and <a href="ft2-glyph_stroker.html#FT_Stroker_EndSubPath">FT_Stroker_EndSubPath</a>.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Stroker_ConicTo">FT_Stroker_ConicTo</h3>
<p>Defined in FT_STROKER_H (freetype/ftstroke.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Stroker_ConicTo</b>( <a href="ft2-glyph_stroker.html#FT_Stroker">FT_Stroker</a>  stroker,
                      <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>*  control,
                      <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>*  to );
</pre>

<p>&lsquo;Draw&rsquo; a single quadratic Bezier in the stroker's current sub-path, from the last position.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="stroker">stroker</td><td class="desc">
<p>The target stroker handle.</p>
</td></tr>
<tr><td class="val" id="control">control</td><td class="desc">
<p>A pointer to a Bezier control point.</p>
</td></tr>
<tr><td class="val" id="to">to</td><td class="desc">
<p>A pointer to the destination point.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>You should call this function between <a href="ft2-glyph_stroker.html#FT_Stroker_BeginSubPath">FT_Stroker_BeginSubPath</a> and <a href="ft2-glyph_stroker.html#FT_Stroker_EndSubPath">FT_Stroker_EndSubPath</a>.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Stroker_CubicTo">FT_Stroker_CubicTo</h3>
<p>Defined in FT_STROKER_H (freetype/ftstroke.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Stroker_CubicTo</b>( <a href="ft2-glyph_stroker.html#FT_Stroker">FT_Stroker</a>  stroker,
                      <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>*  control1,
                      <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>*  control2,
                      <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>*  to );
</pre>

<p>&lsquo;Draw&rsquo; a single cubic Bezier in the stroker's current sub-path, from the last position.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="stroker">stroker</td><td class="desc">
<p>The target stroker handle.</p>
</td></tr>
<tr><td class="val" id="control1">control1</td><td class="desc">
<p>A pointer to the first Bezier control point.</p>
</td></tr>
<tr><td class="val" id="control2">control2</td><td class="desc">
<p>A pointer to second Bezier control point.</p>
</td></tr>
<tr><td class="val" id="to">to</td><td class="desc">
<p>A pointer to the destination point.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>You should call this function between <a href="ft2-glyph_stroker.html#FT_Stroker_BeginSubPath">FT_Stroker_BeginSubPath</a> and <a href="ft2-glyph_stroker.html#FT_Stroker_EndSubPath">FT_Stroker_EndSubPath</a>.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Stroker_GetBorderCounts">FT_Stroker_GetBorderCounts</h3>
<p>Defined in FT_STROKER_H (freetype/ftstroke.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Stroker_GetBorderCounts</b>( <a href="ft2-glyph_stroker.html#FT_Stroker">FT_Stroker</a>        stroker,
                              <a href="ft2-glyph_stroker.html#FT_StrokerBorder">FT_StrokerBorder</a>  border,
                              <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>          *anum_points,
                              <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>          *anum_contours );
</pre>

<p>Call this function once you have finished parsing your paths with the stroker. It returns the number of points and contours necessary to export one of the &lsquo;border&rsquo; or &lsquo;stroke&rsquo; outlines generated by the stroker.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="stroker">stroker</td><td class="desc">
<p>The target stroker handle.</p>
</td></tr>
<tr><td class="val" id="border">border</td><td class="desc">
<p>The border index.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="anum_points">anum_points</td><td class="desc">
<p>The number of points.</p>
</td></tr>
<tr><td class="val" id="anum_contours">anum_contours</td><td class="desc">
<p>The number of contours.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<h4>note</h4>
<p>When an outline, or a sub-path, is &lsquo;closed&rsquo;, the stroker generates two independent &lsquo;border&rsquo; outlines, named &lsquo;left&rsquo; and &lsquo;right&rsquo;.</p>
<p>When the outline, or a sub-path, is &lsquo;opened&rsquo;, the stroker merges the &lsquo;border&rsquo; outlines with caps. The &lsquo;left&rsquo; border receives all points, while the &lsquo;right&rsquo; border becomes empty.</p>
<p>Use the function <a href="ft2-glyph_stroker.html#FT_Stroker_GetCounts">FT_Stroker_GetCounts</a> instead if you want to retrieve the counts associated to both borders.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Stroker_ExportBorder">FT_Stroker_ExportBorder</h3>
<p>Defined in FT_STROKER_H (freetype/ftstroke.h).</p>
<pre>
  FT_EXPORT( <span class="keyword">void</span> )
  <b>FT_Stroker_ExportBorder</b>( <a href="ft2-glyph_stroker.html#FT_Stroker">FT_Stroker</a>        stroker,
                           <a href="ft2-glyph_stroker.html#FT_StrokerBorder">FT_StrokerBorder</a>  border,
                           <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>*       outline );
</pre>

<p>Call this function after <a href="ft2-glyph_stroker.html#FT_Stroker_GetBorderCounts">FT_Stroker_GetBorderCounts</a> to export the corresponding border to your own <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a> structure.</p>
<p>Note that this function appends the border points and contours to your outline, but does not try to resize its arrays.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="stroker">stroker</td><td class="desc">
<p>The target stroker handle.</p>
</td></tr>
<tr><td class="val" id="border">border</td><td class="desc">
<p>The border index.</p>
</td></tr>
<tr><td class="val" id="outline">outline</td><td class="desc">
<p>The target outline handle.</p>
</td></tr>
</table>

<h4>note</h4>
<p>Always call this function after <a href="ft2-glyph_stroker.html#FT_Stroker_GetBorderCounts">FT_Stroker_GetBorderCounts</a> to get sure that there is enough room in your <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a> object to receive all new data.</p>
<p>When an outline, or a sub-path, is &lsquo;closed&rsquo;, the stroker generates two independent &lsquo;border&rsquo; outlines, named &lsquo;left&rsquo; and &lsquo;right&rsquo;.</p>
<p>When the outline, or a sub-path, is &lsquo;opened&rsquo;, the stroker merges the &lsquo;border&rsquo; outlines with caps. The &lsquo;left&rsquo; border receives all points, while the &lsquo;right&rsquo; border becomes empty.</p>
<p>Use the function <a href="ft2-glyph_stroker.html#FT_Stroker_Export">FT_Stroker_Export</a> instead if you want to retrieve all borders at once.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Stroker_GetCounts">FT_Stroker_GetCounts</h3>
<p>Defined in FT_STROKER_H (freetype/ftstroke.h).</p>
<pre>
  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Stroker_GetCounts</b>( <a href="ft2-glyph_stroker.html#FT_Stroker">FT_Stroker</a>  stroker,
                        <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>    *anum_points,
                        <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>    *anum_contours );
</pre>

<p>Call this function once you have finished parsing your paths with the stroker. It returns the number of points and contours necessary to export all points/borders from the stroked outline/path.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="stroker">stroker</td><td class="desc">
<p>The target stroker handle.</p>
</td></tr>
</table>

<h4>output</h4>
<table class="fields">
<tr><td class="val" id="anum_points">anum_points</td><td class="desc">
<p>The number of points.</p>
</td></tr>
<tr><td class="val" id="anum_contours">anum_contours</td><td class="desc">
<p>The number of contours.</p>
</td></tr>
</table>

<h4>return</h4>
<p>FreeType error code. 0&nbsp;means success.</p>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

<div class="section">
<h3 id="FT_Stroker_Export">FT_Stroker_Export</h3>
<p>Defined in FT_STROKER_H (freetype/ftstroke.h).</p>
<pre>
  FT_EXPORT( <span class="keyword">void</span> )
  <b>FT_Stroker_Export</b>( <a href="ft2-glyph_stroker.html#FT_Stroker">FT_Stroker</a>   stroker,
                     <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>*  outline );
</pre>

<p>Call this function after <a href="ft2-glyph_stroker.html#FT_Stroker_GetBorderCounts">FT_Stroker_GetBorderCounts</a> to export all borders to your own <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a> structure.</p>
<p>Note that this function appends the border points and contours to your outline, but does not try to resize its arrays.</p>

<h4>input</h4>
<table class="fields">
<tr><td class="val" id="stroker">stroker</td><td class="desc">
<p>The target stroker handle.</p>
</td></tr>
<tr><td class="val" id="outline">outline</td><td class="desc">
<p>The target outline handle.</p>
</td></tr>
</table>

<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>

</body>
</html>
tutorial/example1.c000064400000007536151706766400010316 0ustar00/* example1.c                                                      */
/*                                                                 */
/* This small program shows how to print a rotated string with the */
/* FreeType 2 library.                                             */


#include <stdio.h>
#include <string.h>
#include <math.h>

#include <ft2build.h>
#include FT_FREETYPE_H


#define WIDTH   640
#define HEIGHT  480


/* origin is the upper left corner */
unsigned char image[HEIGHT][WIDTH];


/* Replace this function with something useful. */

void
draw_bitmap( FT_Bitmap*  bitmap,
             FT_Int      x,
             FT_Int      y)
{
  FT_Int  i, j, p, q;
  FT_Int  x_max = x + bitmap->width;
  FT_Int  y_max = y + bitmap->rows;


  /* for simplicity, we assume that `bitmap->pixel_mode' */
  /* is `FT_PIXEL_MODE_GRAY' (i.e., not a bitmap font)   */

  for ( i = x, p = 0; i < x_max; i++, p++ )
  {
    for ( j = y, q = 0; j < y_max; j++, q++ )
    {
      if ( i < 0      || j < 0       ||
           i >= WIDTH || j >= HEIGHT )
        continue;

      image[j][i] |= bitmap->buffer[q * bitmap->width + p];
    }
  }
}


void
show_image( void )
{
  int  i, j;


  for ( i = 0; i < HEIGHT; i++ )
  {
    for ( j = 0; j < WIDTH; j++ )
      putchar( image[i][j] == 0 ? ' '
                                : image[i][j] < 128 ? '+'
                                                    : '*' );
    putchar( '\n' );
  }
}


int
main( int     argc,
      char**  argv )
{
  FT_Library    library;
  FT_Face       face;

  FT_GlyphSlot  slot;
  FT_Matrix     matrix;                 /* transformation matrix */
  FT_Vector     pen;                    /* untransformed origin  */
  FT_Error      error;

  char*         filename;
  char*         text;

  double        angle;
  int           target_height;
  int           n, num_chars;


  if ( argc != 3 )
  {
    fprintf ( stderr, "usage: %s font sample-text\n", argv[0] );
    exit( 1 );
  }

  filename      = argv[1];                           /* first argument     */
  text          = argv[2];                           /* second argument    */
  num_chars     = strlen( text );
  angle         = ( 25.0 / 360 ) * 3.14159 * 2;      /* use 25 degrees     */
  target_height = HEIGHT;

  error = FT_Init_FreeType( &library );              /* initialize library */
  /* error handling omitted */

  error = FT_New_Face( library, filename, 0, &face );/* create face object */
  /* error handling omitted */

  /* use 50pt at 100dpi */
  error = FT_Set_Char_Size( face, 50 * 64, 0,
                            100, 0 );                /* set character size */
  /* error handling omitted */

  /* cmap selection omitted;                                        */
  /* for simplicity we assume that the font contains a Unicode cmap */

  slot = face->glyph;

  /* set up matrix */
  matrix.xx = (FT_Fixed)( cos( angle ) * 0x10000L );
  matrix.xy = (FT_Fixed)(-sin( angle ) * 0x10000L );
  matrix.yx = (FT_Fixed)( sin( angle ) * 0x10000L );
  matrix.yy = (FT_Fixed)( cos( angle ) * 0x10000L );

  /* the pen position in 26.6 cartesian space coordinates; */
  /* start at (300,200) relative to the upper left corner  */
  pen.x = 300 * 64;
  pen.y = ( target_height - 200 ) * 64;

  for ( n = 0; n < num_chars; n++ )
  {
    /* set transformation */
    FT_Set_Transform( face, &matrix, &pen );

    /* load glyph image into the slot (erase previous one) */
    error = FT_Load_Char( face, text[n], FT_LOAD_RENDER );
    if ( error )
      continue;                 /* ignore errors */

    /* now, draw to our target surface (convert position) */
    draw_bitmap( &slot->bitmap,
                 slot->bitmap_left,
                 target_height - slot->bitmap_top );

    /* increment pen position */
    pen.x += slot->advance.x;
    pen.y += slot->advance.y;
  }

  show_image();

  FT_Done_Face    ( face );
  FT_Done_FreeType( library );

  return 0;
}

/* EOF */
tutorial/example2.cpp000064400000025320151706766400010646 0ustar00// example2.cpp

// This file demonstrates how to render a coloured glyph with a differently
// coloured outline.
//
// Written Feb. 2009 by Erik Möller,
// with slight modifications by Werner Lemberg
//
// Public domain.
//
// Eric uses similar code in real applications; see
//
//   http://www.timetrap.se
//   http://www.emberwind.se
//
// for more.

#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_STROKER_H

#include <vector>
#include <fstream>
#include <iostream>


#ifdef _MSC_VER
#define MIN __min
#define MAX __max
#else
#define MIN std::min
#define MAX std::max
#endif


// Define some fixed size types.

typedef unsigned char uint8;
typedef unsigned short uint16;
typedef unsigned int uint32;


// Try to figure out what endian this machine is using. Note that the test
// below might fail for cross compilation; additionally, multi-byte
// characters are implementation-defined in C preprocessors.

#if (('1234' >> 24) == '1')
#elif (('4321' >> 24) == '1')
  #define BIG_ENDIAN
#else
  #error "Couldn't determine the endianness!"
#endif


// A simple 32-bit pixel.

union Pixel32
{
  Pixel32()
  : integer(0) { }
  Pixel32(uint8 bi, uint8 gi, uint8 ri, uint8 ai = 255)
  {
    b = bi;
    g = gi;
    r = ri;
    a = ai;
  }

  uint32 integer;

  struct
  {
#ifdef BIG_ENDIAN
    uint8 a, r, g, b;
#else // BIG_ENDIAN
    uint8 b, g, r, a;
#endif // BIG_ENDIAN
  };
};


struct Vec2
{
  Vec2() { }
  Vec2(float a, float b)
  : x(a), y(b) { }

  float x, y;
};


struct Rect
{
  Rect() { }
  Rect(float left, float top, float right, float bottom)
  : xmin(left), xmax(right), ymin(top), ymax(bottom) { }

  void Include(const Vec2 &r)
  {
    xmin = MIN(xmin, r.x);
    ymin = MIN(ymin, r.y);
    xmax = MAX(xmax, r.x);
    ymax = MAX(ymax, r.y);
  }

  float Width() const { return xmax - xmin + 1; }
  float Height() const { return ymax - ymin + 1; }

  float xmin, xmax, ymin, ymax;
};


// TGA Header struct to make it simple to dump a TGA to disc.

#if defined(_MSC_VER) || defined(__GNUC__)
#pragma pack(push, 1)
#pragma pack(1)               // Dont pad the following struct.
#endif

struct TGAHeader
{
  uint8   idLength,           // Length of optional identification sequence.
          paletteType,        // Is a palette present? (1=yes)
          imageType;          // Image data type (0=none, 1=indexed, 2=rgb,
                              // 3=grey, +8=rle packed).
  uint16  firstPaletteEntry,  // First palette index, if present.
          numPaletteEntries;  // Number of palette entries, if present.
  uint8   paletteBits;        // Number of bits per palette entry.
  uint16  x,                  // Horiz. pixel coord. of lower left of image.
          y,                  // Vert. pixel coord. of lower left of image.
          width,              // Image width in pixels.
          height;             // Image height in pixels.
  uint8   depth,              // Image color depth (bits per pixel).
          descriptor;         // Image attribute flags.
};

#if defined(_MSC_VER) || defined(__GNUC__)
#pragma pack(pop)
#endif


bool
WriteTGA(const std::string &filename,
         const Pixel32 *pxl,
         uint16 width,
         uint16 height)
{
  std::ofstream file(filename.c_str(), std::ios::binary);
  if (file)
  {
    TGAHeader header;
    memset(&header, 0, sizeof(TGAHeader));
    header.imageType  = 2;
    header.width = width;
    header.height = height;
    header.depth = 32;
    header.descriptor = 0x20;

    file.write((const char *)&header, sizeof(TGAHeader));
    file.write((const char *)pxl, sizeof(Pixel32) * width * height);

    return true;
  }
  return false;
}


// A horizontal pixel span generated by the FreeType renderer.

struct Span
{
  Span() { }
  Span(int _x, int _y, int _width, int _coverage)
  : x(_x), y(_y), width(_width), coverage(_coverage) { }

  int x, y, width, coverage;
};

typedef std::vector<Span> Spans;


// Each time the renderer calls us back we just push another span entry on
// our list.

void
RasterCallback(const int y,
               const int count,
               const FT_Span * const spans,
               void * const user) 
{
  Spans *sptr = (Spans *)user;
  for (int i = 0; i < count; ++i) 
    sptr->push_back(Span(spans[i].x, y, spans[i].len, spans[i].coverage));
}


// Set up the raster parameters and render the outline.

void
RenderSpans(FT_Library &library,
            FT_Outline * const outline,
            Spans *spans) 
{
  FT_Raster_Params params;
  memset(&params, 0, sizeof(params));
  params.flags = FT_RASTER_FLAG_AA | FT_RASTER_FLAG_DIRECT;
  params.gray_spans = RasterCallback;
  params.user = spans;

  FT_Outline_Render(library, outline, &params);
}


// Render the specified character as a colored glyph with a colored outline
// and dump it to a TGA.

void
WriteGlyphAsTGA(FT_Library &library,
                const std::string &fileName,
                wchar_t ch,
                FT_Face &face,
                int size,
                const Pixel32 &fontCol,
                const Pixel32 outlineCol,
                float outlineWidth)
{
  // Set the size to use.
  if (FT_Set_Char_Size(face, size << 6, size << 6, 90, 90) == 0)
  {
    // Load the glyph we are looking for.
    FT_UInt gindex = FT_Get_Char_Index(face, ch);
    if (FT_Load_Glyph(face, gindex, FT_LOAD_NO_BITMAP) == 0)
    {
      // Need an outline for this to work.
      if (face->glyph->format == FT_GLYPH_FORMAT_OUTLINE)
      {
        // Render the basic glyph to a span list.
        Spans spans;
        RenderSpans(library, &face->glyph->outline, &spans);

        // Next we need the spans for the outline.
        Spans outlineSpans;

        // Set up a stroker.
        FT_Stroker stroker;
        FT_Stroker_New(library, &stroker);
        FT_Stroker_Set(stroker,
                       (int)(outlineWidth * 64),
                       FT_STROKER_LINECAP_ROUND,
                       FT_STROKER_LINEJOIN_ROUND,
                       0);

        FT_Glyph glyph;
        if (FT_Get_Glyph(face->glyph, &glyph) == 0)
        {
          FT_Glyph_StrokeBorder(&glyph, stroker, 0, 1);
          // Again, this needs to be an outline to work.
          if (glyph->format == FT_GLYPH_FORMAT_OUTLINE)
          {
            // Render the outline spans to the span list
            FT_Outline *o =
              &reinterpret_cast<FT_OutlineGlyph>(glyph)->outline;
            RenderSpans(library, o, &outlineSpans);
          }

          // Clean up afterwards.
          FT_Stroker_Done(stroker);
          FT_Done_Glyph(glyph);

          // Now we need to put it all together.
          if (!spans.empty())
          {
            // Figure out what the bounding rect is for both the span lists.
            Rect rect(spans.front().x,
                      spans.front().y,
                      spans.front().x,
                      spans.front().y);
            for (Spans::iterator s = spans.begin();
                 s != spans.end(); ++s)
            {
              rect.Include(Vec2(s->x, s->y));
              rect.Include(Vec2(s->x + s->width - 1, s->y));
            }
            for (Spans::iterator s = outlineSpans.begin();
                 s != outlineSpans.end(); ++s)
            {
              rect.Include(Vec2(s->x, s->y));
              rect.Include(Vec2(s->x + s->width - 1, s->y));
            }

#if 0
            // This is unused in this test but you would need this to draw
            // more than one glyph.
            float bearingX = face->glyph->metrics.horiBearingX >> 6;
            float bearingY = face->glyph->metrics.horiBearingY >> 6;
            float advance = face->glyph->advance.x >> 6;
#endif

            // Get some metrics of our image.
            int imgWidth = rect.Width(),
                imgHeight = rect.Height(),
                imgSize = imgWidth * imgHeight;

            // Allocate data for our image and clear it out to transparent.
            Pixel32 *pxl = new Pixel32[imgSize];
            memset(pxl, 0, sizeof(Pixel32) * imgSize);

            // Loop over the outline spans and just draw them into the
            // image.
            for (Spans::iterator s = outlineSpans.begin();
                 s != outlineSpans.end(); ++s)
              for (int w = 0; w < s->width; ++w)
                pxl[(int)((imgHeight - 1 - (s->y - rect.ymin)) * imgWidth
                          + s->x - rect.xmin + w)] =
                  Pixel32(outlineCol.r, outlineCol.g, outlineCol.b,
                          s->coverage);

            // Then loop over the regular glyph spans and blend them into
            // the image.
            for (Spans::iterator s = spans.begin();
                 s != spans.end(); ++s)
              for (int w = 0; w < s->width; ++w)
              {
                Pixel32 &dst =
                  pxl[(int)((imgHeight - 1 - (s->y - rect.ymin)) * imgWidth
                      + s->x - rect.xmin + w)];
                Pixel32 src = Pixel32(fontCol.r, fontCol.g, fontCol.b,
                                      s->coverage);
                dst.r = (int)(dst.r + ((src.r - dst.r) * src.a) / 255.0f);
                dst.g = (int)(dst.g + ((src.g - dst.g) * src.a) / 255.0f);
                dst.b = (int)(dst.b + ((src.b - dst.b) * src.a) / 255.0f);
                dst.a = MIN(255, dst.a + src.a);
              }

            // Dump the image to disk.
            WriteTGA(fileName, pxl, imgWidth, imgHeight);

            delete [] pxl;
          }
        }
      }
    }
  }
}


int
main(int argc,
     char **argv)
{
  if (argc != 3)
  {
    std::cerr << "Render letter `B' of given font as a TGA image.\n";
    std::cerr << "\n";
    std::cerr << "usage: example2 <font> <TGA-file>\n";
    return 1;
  }

  // Initialize FreeType.
  FT_Library library;
  FT_Init_FreeType(&library);

  // Open up a font file.
  std::ifstream fontFile(argv[1], std::ios::binary);
  if (fontFile)
  {
    // Read the entire file to a memory buffer.
    fontFile.seekg(0, std::ios::end);
    std::fstream::pos_type fontFileSize = fontFile.tellg();
    fontFile.seekg(0);
    unsigned char *fontBuffer = new unsigned char[fontFileSize];
    fontFile.read((char *)fontBuffer, fontFileSize);

    // Create a face from a memory buffer.  Be sure not to delete the memory
    // buffer until you are done using that font as FreeType will reference
    // it directly.
    FT_Face face;
    FT_New_Memory_Face(library, fontBuffer, fontFileSize, 0, &face);

    // Dump out a single glyph to a tga.
    WriteGlyphAsTGA(library,
                    argv[2],
                    L'B',
                    face,
                    100,
                    Pixel32(255, 90, 30),
                    Pixel32(255, 255, 255),
                    3.0f);

    // Now that we are done it is safe to delete the memory.
    delete [] fontBuffer;
  }

  // Clean up the library
  FT_Done_FreeType(library);

  return 1;
}

// Local Variables: 
// coding: utf-8
// End: 
tutorial/example3.cpp000064400000007252151706766400010653 0ustar00// example3.cpp

// This file demonstrates how to use FreeType's stand-alone B/W renderer.
//
// Copy the files ftraster.c, ftimage.h, and ftmisc.h into the same
// directory as this file, then say
//
//   g++ -D STANDALONE_ \
//       -o example3 example3.cpp
//
// You need FreeType version 2.3.10 or newer.
//
// Written Sep. 2009 by Werner Lemberg,
// based on code contributed by Erik Möller.
//
// Public domain.

#include "ftraster.c"
#include <fstream>

// Define an acorn-like shape to test with.
struct Vec2
{
  Vec2(float a, float b) : x(a), y(b) { }

  float x, y;
};

static Vec2 k_shape[] =
{ Vec2(-3, -18), Vec2(0, -12), Vec2(6, -10), Vec2(12, -6), Vec2(12, -4),
  Vec2(11, -4), Vec2(10, -5), Vec2(10, 1), Vec2(9, 6), Vec2(7, 10),
  Vec2(5, 12), Vec2(4, 15), Vec2(3, 14), Vec2(1, 13), Vec2(-1, 13),
  Vec2(-5, 11), Vec2(-8, 8), Vec2(-11, 2), Vec2(-11, -2), Vec2(-14, 0),
  Vec2(-14, -2), Vec2(-11, -7), Vec2(-9, -9), Vec2(-8, -9), Vec2(-5, -12),
  Vec2(-5, -14), Vec2(-7, -15), Vec2(-8, -14), Vec2(-9, -15), Vec2(-9, -17),
  Vec2(-7, -17), Vec2(-6, -18)
};

void*
MY_Alloc_Func(FT_Memory /* memory */,
              long size)
{
  return malloc((size_t)size);
}

void
MY_Free_Func(FT_Memory /* memory */,
             void *block)
{
  free(block);
}

void*
MY_Realloc_Func(FT_Memory /* memory */,
                long /* cur_size */,
                long new_size,
                void* block)
{
  return realloc(block, (size_t)new_size);
}


static FT_Memory mem;


// Render a shape and dump it out as out-mono.pbm (b/w) and
// out-gray.pgm (grayscale).
int
main()
{
  // Set up the memory management.
  mem = new FT_MemoryRec;
  mem->alloc = MY_Alloc_Func;
  mem->free = MY_Free_Func;
  mem->realloc = MY_Realloc_Func;


  // Build an outline manually.
  FT_Outline_ outline;
  outline.n_contours = 1;
  outline.n_points = sizeof (k_shape) / sizeof (Vec2);
  outline.points = new FT_Vector[outline.n_points];
  for (int i = 0; i < outline.n_points; ++i)
  {
    FT_Vector v;
    // Offset it to fit in the image and scale it up 10 times.
    v.x = (20 + k_shape[i].x) * 10 * 64;
    v.y = (20 + k_shape[i].y) * 10 * 64;
    outline.points[i] = v;
  }
  outline.tags = new char[outline.n_points];
  for (int i = 0; i < outline.n_points; ++i)
    outline.tags[i] = 1;
  outline.contours = new short[outline.n_contours];
  outline.contours[0] = outline.n_points - 1;
  outline.flags = 0;


  const int width = 500;
  const int rows = 400;

  // 1 bit per pixel.
  const int pitch_mono = (width + 7) >> 3;


  FT_Bitmap bmp;
  FT_Raster raster;
  FT_Raster_Params params;


  // Allocate a chunk of memory for the render pool.
  const int kRenderPoolSize = 1024 * 1024;
  unsigned char *renderPool = new unsigned char[kRenderPoolSize];


  // Set up a bitmap.
  bmp.buffer = new unsigned char[rows * pitch_mono];
  memset(bmp.buffer, 0, rows * pitch_mono);
  bmp.width = width;
  bmp.rows = rows;
  bmp.pitch = pitch_mono;
  bmp.pixel_mode = FT_PIXEL_MODE_MONO;

  // Set up the necessary raster parameters.
  memset(&params, 0, sizeof (params));
  params.source = &outline;
  params.target = &bmp;

  // Initialize the rasterer and get it to render into the bitmap.
  ft_standard_raster.raster_new(mem, &raster);
  ft_standard_raster.raster_reset(raster, renderPool, kRenderPoolSize);
  ft_standard_raster.raster_render(raster, &params);

  // Dump out the raw image data (in PBM format).
  std::ofstream out_mono("out-mono.pbm", std::ios::binary);
  out_mono << "P4 " << width << " " << rows << "\n";
  out_mono.write((const char *)bmp.buffer, rows * pitch_mono);

  // Cleanup.
  delete[] renderPool;
  delete[] bmp.buffer;
  delete[] outline.points;
  delete[] outline.tags;
  delete[] outline.contours;
  delete mem;

  return 0;
}
tutorial/example4.cpp000064400000013571151706766400010655 0ustar00// example4.cpp

// This file holds the source code of a very simple application using the Qt
// framework to render a single glyph into a window.  For demonstration
// purposes, both direct rendering using a callback and rendering using a
// buffer are implemented (yielding the same output).
//
// Due to a bug in the FreeType's direct rendering support you should use
// version 2.4.3 or newer to get correct results.
//
// Written Sept. 2010 by Róbert Márki <gsmiko@gmail.com>,
// with slight modifications by Werner Lemberg
//
// Public domain.
//
//
// To compile this application, check the `example4.pro' proto-makefile
// whether all paths are fine, then say `qmake example4.pro' followed by
// `make'.
//
// It has been tested with Qt version 4.7.0.

#include <QtGui/QApplication>
#include <QWidget>
#include <QPainter>
#include <QFile>
#include <QImage>
#include <iostream>

#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_GLYPH_H
#include FT_TYPES_H
#include FT_OUTLINE_H
#include FT_RENDER_H


QString g_usageText =
  "usage:\n"
  "example4 FONT_PATH CHARACTER SIZE DIRECT_RENDERING_MODE(1|0)";


#define TRUNC(x) ((x) >> 6)


class Widget : public QWidget
{
  Q_OBJECT

public:
  Widget(const QString& fileName,
         QChar character,
         int pointSize,
         bool directRender,
         QWidget *parent = 0)
  : QWidget(parent), m_directRender(directRender)
  {
    FT_Error error = FT_Err_Ok;
    m_face = 0;
    m_library = 0;

    // For simplicity, the error handling is very rudimentary.
    error = FT_Init_FreeType(&m_library);
    if (!error)
    {
      error = FT_New_Face(m_library,
                          fileName.toAscii().constData(),
                          0,
                          &m_face);
      if (!error)
      {
        error = FT_Set_Char_Size(m_face,
                                 0,
                                 pointSize * 64,
                                 physicalDpiX(),
                                 physicalDpiY());

        if (!error)
        {
          FT_UInt glyph_index = 0;
          glyph_index = FT_Get_Char_Index(m_face,
                                          character.unicode());

          error = FT_Load_Glyph(m_face,
                                glyph_index,
                                FT_LOAD_DEFAULT);

          if (!error)
          {
            FT_Pos left = m_face->glyph->metrics.horiBearingX;
            FT_Pos right = left + m_face->glyph->metrics.width;
            FT_Pos top = m_face->glyph->metrics.horiBearingY;
            FT_Pos bottom = top - m_face->glyph->metrics.height;

            m_glyphRect = QRect(QPoint(TRUNC(left),
                                       -TRUNC(top) + 1),
                                QSize(TRUNC(right - left) + 1,
                                      TRUNC(top - bottom) + 1));
            setFixedSize(m_glyphRect.width(),
                         m_glyphRect.height());
          }
        }
      }
    }
  }

  ~Widget()
  {
    FT_Done_Face(m_face);
    FT_Done_FreeType(m_library);
  }

private:
  FT_Library m_library;
  FT_Face m_face;
  QRect m_glyphRect;
  bool m_directRender;

  // The callback function for direct rendering.
  static void graySpans(int y,
                        int count,
                        const FT_Span_ *spans,
                        void *user)
  {
    QPainter *painter = (QPainter *)user;
    y = -y;

    for (int i = 0; i < count; i++)
    {
      const FT_Span span = spans[i];
      qreal opacity = qreal(span.coverage) / 255.0;

      painter->setOpacity(opacity);

      if (span.len > 1)
        painter->drawLine(span.x, y, span.x + span.len - 1, y);
      else
        painter->drawPoint(span.x, y);
    }
  }

protected:
  void paintEvent(QPaintEvent *event)
  {
    QWidget::paintEvent(event);

    if (m_library && m_face)
    {
      FT_Error error = FT_Err_Ok;
      QPainter painter(this);

      painter.translate(-m_glyphRect.x(),
                        -m_glyphRect.y());

      if (m_directRender)
      {
        // Direct rendering.

        painter.setPen(Qt::black);

        FT_Raster_Params params;

        params.target = 0;
        params.flags = FT_RASTER_FLAG_DIRECT | FT_RASTER_FLAG_AA;
        params.user = &painter;
        params.gray_spans = &Widget::graySpans;
        params.black_spans = 0;
        params.bit_set = 0;
        params.bit_test = 0;

        FT_Outline* outline = &m_face->glyph->outline;

        FT_Outline_Render(m_library,
                          outline,
                          &params);
      }
      else
      {
        // Rendering using a buffer.

        error = FT_Render_Glyph(m_face->glyph,
                                FT_RENDER_MODE_NORMAL);

        QImage glyphImage(m_face->glyph->bitmap.buffer,
                          m_face->glyph->bitmap.width,
                          m_face->glyph->bitmap.rows,
                          m_face->glyph->bitmap.pitch,
                          QImage::Format_Indexed8);

        painter.translate(m_glyphRect.x(),
                          m_glyphRect.y());

        QVector<QRgb> colorTable;
        for (int i = 0; i < 256; ++i)
          colorTable << qRgba(0, 0, 0, i);
        glyphImage.setColorTable(colorTable);

        painter.drawImage(QPoint(0, 0),
                          glyphImage);
      }
    }
  }
};


int main(int argc,
         char **argv)
{
  bool status = false;

  if (argc == 5)
  {
    bool isSizeOk = false;
    QString path = argv[1];
    QChar character = *argv[2];
    int size = QString(argv[3]).toInt(&isSizeOk);
    bool directRender = QString(argv[4]).toInt();

    if (QFile::exists(path) && isSizeOk)
    {
      status = true;
      QApplication a(argc, argv);
      Widget w(path, character, size, directRender);
      w.show();
      return a.exec();
    }
  }

  if (!status)
  {
    std::cout << qPrintable(g_usageText) << std::endl;
    return 0;
  }
}

#include "example4.moc"

// Local Variables: 
// coding: utf-8
// End: 
tutorial/example4.pro000064400000000361151706766400010664 0ustar00# example4.pro

QT += core gui
TARGET = example4
TEMPLATE = app
SOURCES += example4.cpp
MOC_DIR = ./moc
LIBS += -lz -lfreetype
INCLUDEPATH += $$MOC_DIR \
               /usr/local/include \
               /usr/local/include/freetype2

# EOF
tutorial/example5.cpp000064400000025513151706766400010655 0ustar00// example5.cpp

// This program is a simple example that prints a character's outline in the
// SVG format to stdout, demonstrating the usage of FT_Outline_Decompose().
//
// Developed by Static Jobs LLC and contributed to the FreeType project.
//
// Copyright (c) 2016 Static Jobs LLC
//   IT and software engineering jobs in the US, Canada and the UK
//   https://www.staticjobs.com
//
// License: MIT (see below)
//
// The source code was reformatted by Werner Lemberg, also including a few
// minor code changes and comments for didactic purposes.
//
// On a Unix box like GNU/Linux or OS X, compile with
//
//    g++ -o example5 example5.cpp `freetype-config --cflags --libs`
//
// or
//
//    g++ -o example5 example5.cpp `pkg-config freetype2 --cflags --libs`
//
// on the command line.
//
// On other platforms that don't have the `freetype-config' shell script or
// the `pkg-config' tool, you have to pass the necessary compiler flags
// manually.


// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
// OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
// THE USE OR OTHER DEALINGS IN THE SOFTWARE.


#include <iostream>
#include <sstream>
#include <stdexcept>
#include <cstring>
#include <cctype>

#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_OUTLINE_H
#include FT_BBOX_H


using namespace std;


struct FreeTypeLibrary
{
  FreeTypeLibrary();
  ~FreeTypeLibrary();

  FT_Library m_ftLibrary;
};


inline
FreeTypeLibrary::FreeTypeLibrary()
{
  FT_Error error = FT_Init_FreeType(&m_ftLibrary);

  if (error)
    throw runtime_error("Couldn't initialize the library:"
                        " FT_Init_FreeType() failed");
}


inline
FreeTypeLibrary::~FreeTypeLibrary()
{
  FT_Done_FreeType(m_ftLibrary);
}


struct FreeTypeFace
{
  FreeTypeFace(const FreeTypeLibrary &library,
               const char *filename);
  ~FreeTypeFace();

  FT_Face m_ftFace;
};


inline
FreeTypeFace::FreeTypeFace(const FreeTypeLibrary &library,
                           const char *filename)
{
  // For simplicity, always use the first face index.
  FT_Error error = FT_New_Face(library.m_ftLibrary, filename, 0, &m_ftFace);

  if (error)
    throw runtime_error("Couldn't load the font file:"
                        " FT_New_Face() failed");
}


inline FreeTypeFace::~FreeTypeFace()
{
  FT_Done_Face(m_ftFace);
}


class OutlinePrinter
{
public:
  OutlinePrinter(const char *filename);
  int Run(const char *symbol);

private:
  void LoadGlyph(const char *symbol) const;
  bool OutlineExists() const;
  void FlipOutline() const;
  void ExtractOutline();
  void ComputeViewBox();
  void PrintSVG() const;

  static int MoveToFunction(const FT_Vector *to,
                            void *user);
  static int LineToFunction(const FT_Vector *to,
                            void *user);
  static int ConicToFunction(const FT_Vector *control,
                             const FT_Vector *to,
                             void *user);
  static int CubicToFunction(const FT_Vector *controlOne,
                             const FT_Vector *controlTwo,
                             const FT_Vector *to,
                             void *user);

private:
  // These two lines initialize the library and the face;
  // the order is important!
  FreeTypeLibrary m_library;
  FreeTypeFace m_face;

  ostringstream m_path;

  // These four variables are for the `viewBox' attribute.
  FT_Pos m_xMin;
  FT_Pos m_yMin;
  FT_Pos m_width;
  FT_Pos m_height;
};


inline
OutlinePrinter::OutlinePrinter(const char *filename)
: m_face(m_library, filename),
  m_xMin(0),
  m_yMin(0),
  m_width(0),
  m_height(0)
{
  // Empty body.
}


int
OutlinePrinter::Run(const char *symbol)
{
  LoadGlyph(symbol);

  // Check whether outline exists.
  bool outlineExists = OutlineExists();

  if (!outlineExists) // Outline doesn't exist.
    throw runtime_error("Outline check failed.\n"
                        "Please, inspect your font file or try another one,"
                        " for example LiberationSerif-Bold.ttf");

  FlipOutline();

  ExtractOutline();

  ComputeViewBox();

  PrintSVG();

  return 0;
}


void
OutlinePrinter::LoadGlyph(const char *symbol) const
{
  FT_ULong code = symbol[0];

  // For simplicity, use the charmap FreeType provides by default;
  // in most cases this means Unicode.
  FT_UInt index = FT_Get_Char_Index(m_face.m_ftFace, code);

  FT_Error error = FT_Load_Glyph(m_face.m_ftFace,
                                 index,
                                 FT_LOAD_NO_SCALE | FT_LOAD_NO_BITMAP);

  if (error)
    throw runtime_error("Couldn't load the glyph: FT_Load_Glyph() failed");
}


// While working on this example, we found fonts with no outlines for
// printable characters such as `A', i.e., `outline.n_contours' and
// `outline.n_points' were zero.  FT_Outline_Check() returned `true'.
// FT_Outline_Decompose() also returned `true' without walking the outline. 
// That is, we had no way of knowing whether the outline existed and could
// be (or was) decomposed.  Therefore, we implemented this workaround to
// check whether the outline does exist and can be decomposed.
bool
OutlinePrinter::OutlineExists() const
{
  FT_Face face = m_face.m_ftFace;
  FT_GlyphSlot slot = face->glyph;
  FT_Outline &outline = slot->outline;

  if (slot->format != FT_GLYPH_FORMAT_OUTLINE)
    return false; // Should never happen.  Just an extra check.

  if (outline.n_contours <= 0 || outline.n_points <= 0)
    return false; // Can happen for some font files.

  FT_Error error = FT_Outline_Check(&outline);

  return error == 0;
}


// FreeType and SVG use opposite vertical directions.
void
OutlinePrinter::FlipOutline() const
{
  const FT_Fixed multiplier = 65536L;

  FT_Matrix matrix;

  matrix.xx = 1L * multiplier;
  matrix.xy = 0L * multiplier;
  matrix.yx = 0L * multiplier;
  matrix.yy = -1L * multiplier;

  FT_Face face = m_face.m_ftFace;
  FT_GlyphSlot slot = face->glyph;
  FT_Outline &outline = slot->outline;

  FT_Outline_Transform(&outline, &matrix);
}


void
OutlinePrinter::ExtractOutline()
{
  m_path << "  <path d='\n";

  FT_Outline_Funcs callbacks;

  callbacks.move_to = MoveToFunction;
  callbacks.line_to = LineToFunction;
  callbacks.conic_to = ConicToFunction;
  callbacks.cubic_to = CubicToFunction;

  callbacks.shift = 0;
  callbacks.delta = 0;

  FT_Face face = m_face.m_ftFace;
  FT_GlyphSlot slot = face->glyph;
  FT_Outline &outline = slot->outline;

  FT_Error error = FT_Outline_Decompose(&outline, &callbacks, this);

  if (error)
    throw runtime_error("Couldn't extract the outline:"
                        " FT_Outline_Decompose() failed");

  m_path << "          '\n"
            "        fill='red'/>\n";
}


void
OutlinePrinter::ComputeViewBox()
{
  FT_Face face = m_face.m_ftFace;
  FT_GlyphSlot slot = face->glyph;
  FT_Outline &outline = slot->outline;

  FT_BBox boundingBox;

  FT_Outline_Get_BBox(&outline, &boundingBox);

  FT_Pos xMin = boundingBox.xMin;
  FT_Pos yMin = boundingBox.yMin;
  FT_Pos xMax = boundingBox.xMax;
  FT_Pos yMax = boundingBox.yMax;

  m_xMin = xMin;
  m_yMin = yMin;
  m_width = xMax - xMin;
  m_height = yMax - yMin;
}


void
OutlinePrinter::PrintSVG() const
{
  cout << "<svg xmlns='http://www.w3.org/2000/svg'\n"
          "     xmlns:xlink='http://www.w3.org/1999/xlink'\n"
          "     viewBox='"
       << m_xMin << ' ' << m_yMin << ' ' << m_width << ' ' << m_height
       << "'>\n"
       << m_path.str()
       << "</svg>"
       << endl;
}


int
OutlinePrinter::MoveToFunction(const FT_Vector *to,
                               void *user)
{
  OutlinePrinter *self = static_cast<OutlinePrinter *>(user);

  FT_Pos x = to->x;
  FT_Pos y = to->y;

  self->m_path << "           "
                  "M " << x << ' ' << y << '\n';

  return 0;
}


int
OutlinePrinter::LineToFunction(const FT_Vector *to,
                               void *user)
{
  OutlinePrinter *self = static_cast<OutlinePrinter *>(user);

  FT_Pos x = to->x;
  FT_Pos y = to->y;

  self->m_path << "           "
                  "L " << x << ' ' << y << '\n';

  return 0;
}


int
OutlinePrinter::ConicToFunction(const FT_Vector *control,
                                const FT_Vector *to,
                                void *user)
{
  OutlinePrinter *self = static_cast<OutlinePrinter *>(user);

  FT_Pos controlX = control->x;
  FT_Pos controlY = control->y;

  FT_Pos x = to->x;
  FT_Pos y = to->y;

  self->m_path << "           "
                  "Q " << controlX << ' ' << controlY << ", "
                       << x << ' ' << y << '\n';

  return 0;
}


int
OutlinePrinter::CubicToFunction(const FT_Vector *controlOne,
                                const FT_Vector *controlTwo,
                                const FT_Vector *to,
                                void *user)
{
  OutlinePrinter *self = static_cast<OutlinePrinter *>(user);

  FT_Pos controlOneX = controlOne->x;
  FT_Pos controlOneY = controlOne->y;

  FT_Pos controlTwoX = controlTwo->x;
  FT_Pos controlTwoY = controlTwo->y;

  FT_Pos x = to->x;
  FT_Pos y = to->y;

  self->m_path << "           "
                  "C " << controlOneX << ' ' << controlOneY << ", "
                       << controlTwoX << ' ' << controlTwoY << ", "
                       << x << ' ' << y << '\n';

  return 0;
}


int
main(int argc,
     char **argv)
{
  if (argc != 3)
  {
    const char *program = argv[0];

    cerr << "This program prints a single character's outline"
            " in the SVG format to stdout.\n"
            "Usage: " << program << " font symbol\n"
            "Example: " << program << " LiberationSerif-Bold.ttf A" << endl;

    return 1;
  }

  const char *symbol = argv[2];

  // For simplicity, only accept single-byte characters like `A'.
  if (strlen(symbol) != 1 || isspace(*symbol))
  {
    cerr << "Error: '" << symbol
         << "' is not a single printable character" << endl;

    return 2;
  }

  int status;

  try
  {
    const char *filename = argv[1];

    OutlinePrinter printer(filename);

    status = printer.Run(symbol);
  }
  catch (const exception &e)
  {
    cerr << "Error: " << e.what() << endl;

    status = 3;
  }

  return status;
}

// EOF
tutorial/example5.svg000064400000006130151706766400010664 0ustar00<svg xmlns='http://www.w3.org/2000/svg'
     xmlns:xlink='http://www.w3.org/1999/xlink'
     viewBox='107 -1364 1691 1753'>
  <path d='
           M 1798 -752
           Q 1798 -649, 1769 -555
           Q 1741 -461, 1691 -380
           Q 1642 -300, 1574 -234
           Q 1506 -168, 1427 -121
           Q 1348 -75, 1260 -50
           Q 1173 -25, 1085 -25
           Q 1020 -25, 989 -59
           Q 959 -93, 957 -150
           Q 932 -129, 904 -106
           Q 877 -84, 844 -66
           Q 811 -48, 772 -36
           Q 734 -25, 686 -25
           Q 643 -25, 608 -43
           Q 574 -61, 550 -94
           Q 526 -128, 513 -175
           Q 500 -223, 500 -283
           Q 500 -353, 516 -426
           Q 533 -499, 566 -567
           Q 599 -636, 648 -697
           Q 698 -758, 764 -805
           Q 815 -842, 863 -865
           Q 912 -888, 962 -901
           Q 1013 -914, 1067 -919
           Q 1122 -924, 1184 -924
           Q 1232 -924, 1282 -920
           Q 1332 -917, 1367 -913
           L 1246 -372
           Q 1241 -352, 1237 -330
           Q 1233 -308, 1230 -286
           Q 1227 -265, 1225 -246
           Q 1223 -227, 1223 -215
           Q 1223 -192, 1231 -175
           Q 1240 -159, 1273 -159
           Q 1326 -159, 1372 -183
           Q 1418 -208, 1456 -250
           Q 1494 -293, 1523 -350
           Q 1553 -407, 1573 -473
           Q 1593 -539, 1603 -610
           Q 1614 -681, 1614 -751
           Q 1614 -875, 1576 -970
           Q 1539 -1066, 1469 -1131
           Q 1399 -1196, 1300 -1229
           Q 1202 -1263, 1079 -1263
           Q 956 -1263, 850 -1230
           Q 744 -1198, 656 -1138
           Q 568 -1079, 500 -996
           Q 433 -914, 386 -814
           Q 339 -714, 315 -599
           Q 291 -485, 291 -363
           Q 291 -235, 327 -118
           Q 364 -1, 439 88
           Q 514 178, 627 231
           Q 741 284, 895 284
           Q 986 284, 1063 270
           Q 1141 256, 1207 232
           Q 1273 208, 1329 176
           Q 1386 144, 1436 109
           L 1480 173
           Q 1424 218, 1361 257
           Q 1298 296, 1223 325
           Q 1148 355, 1059 372
           Q 970 389, 864 389
           Q 680 389, 538 330
           Q 397 272, 301 170
           Q 205 68, 156 -69
           Q 107 -206, 107 -362
           Q 107 -505, 140 -635
           Q 173 -765, 234 -876
           Q 296 -987, 383 -1077
           Q 470 -1168, 578 -1231
           Q 687 -1295, 814 -1329
           Q 941 -1364, 1083 -1364
           Q 1261 -1364, 1395 -1320
           Q 1529 -1277, 1618 -1197
           Q 1708 -1117, 1753 -1004
           Q 1798 -891, 1798 -752
           M 740 -316
           Q 740 -244, 761 -206
           Q 783 -169, 811 -169
           Q 831 -169, 853 -175
           Q 875 -182, 896 -192
           Q 917 -202, 935 -214
           Q 953 -226, 965 -237
           L 1085 -798
           Q 1078 -800, 1058 -801
           Q 1039 -803, 1024 -803
           Q 975 -803, 931 -789
           Q 888 -776, 852 -733
           Q 832 -709, 812 -666
           Q 792 -623, 776 -567
           Q 760 -512, 750 -447
           Q 740 -383, 740 -316
          '
        fill='red'/>
</svg>
tutorial/index.html000064400000013436151706766400010427 0ustar00<!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 Tutorial</title>
</head>


<body>

<div id="top"
     class="bar">
  <h1><a href="http://freetype.org/index.html">FreeType</a> Tutorial</h1>
</div>


<div id="wrapper">

<div class="colmask leftmenu">
  <div class="colright">
    <div class="col1wrap">
      <div class="col1">


        <!-- ************************************************** -->

        <div id="introduction">
          <p>This tutorial presents a step-by-step introduction into
            the FreeType library, covering the most basic needs.</p>
        </div>

        <!-- ************************************************** -->

        <div id="contents">
          <h3><a href="step1.html">I. Simple Glyph Loading</a></h3>
          <ul>
            <li>
              <a href="step1.html#section-1">1. Header Files</a>
            </li>
            <li>
              <a href="step1.html#section-2">2. Library
                Initialization</a>
            </li>
            <li>
              <a href="step1.html#section-3">3. Loading a Font
                Face</a>
            </li>
            <li>
              <a href="step1.html#section-4">4. Accessing the Face
                Data</a>
            </li>
            <li>
              <a href="step1.html#section-5">5. Setting the Current
                Pixel Size</a>
            </li>
            <li>
              <a href="step1.html#section-6">6. Loading a Glyph
                Image</a>
            </li>
            <li>
              <a href="step1.html#section-7">7. Simple Text
                Rendering</a>
            </li>
          </ul>

          <h3><a href="step2.html">II. Managing Glyphs</a></h3>
          <ul>
            <li>
              <a href="step2.html#section-1">1. Glyph Metrics</a>
            </li>
            <li>
              <a href="step2.html#section-2">2. Managing Glyph
                Images</a>
            </li>
            <li>
              <a href="step2.html#section-3">3. Global Glyph
                Metrics</a>
            </li>
            <li>
              <a href="step2.html#section-4">4. Simple Text Rendering:
                Kerning and Centering</a>
            </li>
            <li>
              <a href="step2.html#section-5">5. Advanced Text
                Rendering: Transformation and Centering and
                Kerning</a>
            </li>
            <li>
              <a href="step2.html#section-6">6. Accessing Metrics in
                Design Font Units, and Scaling Them</a>
            </li>
            <li>
              <a href="step2.html#conclusion">Conclusion</a>
            </li>
          </ul>

          <h3><a href="step3.html">III. Examples</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>
      &nbsp; <!-- separate primary from secondary entries -->
    </li>

    <li class="secondary">
      <a href="index.html" class="current">FreeType Tutorial</a>
    </li>
    <li class="tertiary">
      <a href="step1.html">Simple Glyph Loading</a>
    </li>
    <li class="tertiary">
      <a href="step2.html">Managing Glyphs</a>
    </li>
    <li class="tertiary">
      <a href="step3.html">Examples</a>
    </li>
  </ul>
</div>

</div> <!-- id="wrapper" -->

<div id="TOC-bottom">
</div>

</body>
</html>
tutorial/metrics.png000064400000004250151706766400010600 0ustar00�PNG


IHDR���)�-PLTE���
��>IDATh���Kl���GHJ��eXrHQ������*���B� ��M�e�i�T�CF�Rؔ6C���.4H�"1��Zd)	J�C�G�NQ����y��gg���c���i������q��Ka�i垖&!�
+���!l/��	V����(в/�}��'�Z���C��+���{��#�&�����1��/��+�wpnjd����De�H@�!�X��9u$���	�+5&%�,��6q.�X:���&�b>bT._9K"J�G�U��6�V�H-����UxMG�����k͝�}��?�(#����="���
�h����_�g`�ޟ�Mcd[;z��v������E#�Sވ��xK�(Ƶ�m�oz�Z:TNJ!�h[�z�ce\
�j��sUk��mE��,��4����݆���0N��{C-�i�o��w�v!E�t/�%J�ϐ�g���I-TO
M���aH/5���ғ��E�6M�"��毚��R4|�d����g��ӧ:W�Rד\�9Qix��3��a�7rJ�5�m�*�6qꏖ�Gd�8^�����kl��\�Ql]�[H�8BG���`V/-��}�K�g���f�C U,�f���[/d�J��;�{�/����\�I�^�s����`��W�T�UD�W�8z���*�+�Q��Kb�c`�e�{<�8�����M���a��_)!zO�&e�w|�h�sDe�s�R�'��T�e�G$����������g�~�S�BA��n�����?���D|E�<J8̫��ߤ|,�VV]b=��3~��BB,|u⫅��~"�ջ�@ym��n�H`V�N�&r-��葥�gH�	6n�@y}����sI�)�����#|��anC
^�9���a��:��	IǶ�h�!��$b�Q("��e�(�ϛo�	x�
EH]"L$�m3q!d�,&"CD�-N(����B�����C���[�JM}q㜮#��"�|f�O�sK��C�h[�;��z��tmQ�.�Q�آ��/V����ӊGd�7ƒrf�G{���ٌxDaqngo%�EV�w'���(�{���]-���!.lD6�^Q��M�[�p{�ń��ѳZĿ��r��g^O-���Vow��qA��/��mA�*Q�ÄP"z���0j=BR����-�hr��,L���l�B��0E�81���Z
@hn�c�2^v8VN(�"�,Ps�J�C�))f����J�:�	؄��"/���HwMT�}�p]�	��vt�E1(�n����c�벅�k��4�#KH_����No�0�*�څ�E�h����ުф�r����^���.!O�^L��*f���;k�R��"�Zݠ�s�%~���J�}�B���D����5=Bh�W��7r���GH�C\>���&�hs�.G]�,� I
��R�Ơ0����C��$�UYXTt��W�[d�"���CE�M�(�z��7T��d�qؓÆ��u�&���`���y�!�PD��Z� @��C#�Ȇ����D���K푳^����Q�B$3���.՞r=4>��"BƠSPGT��� �
�b!PHDĜ�!�=�(�D���V�9[\b��'ڬ�bE.�X#���.���*�%*l�ma}ɘ��ʜ�ZW]ku��̑�G>��"tbCy�8�X�.F�{��;V��bUڀG�Օ/��q�x�J3�s�M���ΔRMj���Ƈ��E6����;>�8ӟZ/N�;Wgס&J�w��.�f���<28>�UF�����$�;>�u�����	��3����yYX�N��ɹ��=���w�9��vM|���A��]���&>�ݪ����[0�,L�z���9��?�qu�����3�N�߹��յi>�yw5P8��WG%.��OK&!R'� �s����E�׼~�"�Hr�(]�<�v��<�8��j������en�#��D/eX�o�8z�~�r��
7�Ns�I>�p�N��!"��R[�#7k���&G'~p��ޚ�!�����&�w9�ؘ:;���qz�i�e^Z\�P�tEXtAuthorDavid Turner��IEND�B`�tutorial/metrics2.png000064400000003475151706766400010672 0ustar00�PNG


IHDR&�p�4PLTE���
���IDATh���MlE��o�%�i�\ajDZ�	9�H9T��q��U���4-q �޴�r���H-�Z� .�8�?JD�pv)'$��R�evg׻뙝��T��'�n�O;�7o�;<��=$�|��`3�d�2�R5�B1DT���澺R�r����'?��"lՕ����[OG�R���펏��Y��+�-L�0d���s+]���}9u�d2��N9/�~�0��DT�$�bhS(cs�vO)opU�+�~��o��*z���q�#��S,a���\��#�J�>��O�l��,f/�)�V���`�o�۽G	�?�:�-��A��p_��;�`�_���_D����eNMDA�ⶔ,�"�-�$�ײ�E���@�T
R�#�~�lV'��A��N���NNb���/����kX��6�w�Z�q��X��$ {��}BA�j�3�B�ٙ#�.��#�e+�i�A�jW_�8_�������n%q�����پ̯�^��`���}W�ݯ�leX��S��+������/���bA��>��5Ir�p)���US�
��j���V)Gf�mF��*��ꠐB�ϫ���~���|dq��OSK�C�I�2̟Y�#�ŅK��{��ڋЭ��ҩVy��>�K�TSA�Z���f"�㲩�|�0P$�m��[YS%���]U}��ϱ���M%��
j�(7�~>�!B�3�5��{PT��P%T$SYw#ؑ}�{H
�Q��dͶ�*�T~�LU6V�VM�*�k;���j*�U
SՙJz�!�Bz�ڪ�cJz��[
nK��%�:����Pe�\��:�T�9-�B%B1J�T_�Pc+4�68
-[Ÿ���"��o�Vt��x*�o��0��|�q�kb�vB)�Ŀ�&SM��X6�.X�?%�:g�0G��Ҷ�}8�[�]m�ǫ��Ǝ���3�h�CK�7�t���Hl�j���5�Z�ˋQ�,tT!�s2J��e�Q�.���x�����Yi�R�-}m���S5�B?�|*Sݥ��e+��(Z���2����B[5�T�S����U+f��Mv]��.��Sq��T9e{���D���I�
��s����P����Jb�sXA�ڲ~�1�U��_MS
��Y�J����r�c��`��"��l��"
2�n�^r���o�k�U�
9
��[��Q�؇��8�/�K�}�K�f;��`�P�b!�Q-��.�Y�V�=JǪ�T����/WU�•�U�z���鹱����>H�*�T�{��i�j��q�Y������B�hͲw�y�Jn�/M���J��=Z��!��!
߷���HH�tɮ�Q�O �#;u���)�/�Ɇ����g��n��`�P���+���y�3�L��<A���&T,v��E��U_�п@yfաҳ#)��4����դ���UE��S�>�_��3���NE�&�@g��`��6��j'{��߱_������*kn��e�4�)*���]���{�F헤7���g�2�~�z=Q�����w(�����;�SޱBY����C��6�c���z����:K!"�Dl5�P}b�n���#��J��Y
5��7�r��2�R�*0�)��R��Pc!�1�,)95|�B�R�2��ЎB|�B
��|Q�6�A`��Pc�U��8ܬ��g�,���[��2����g)��}�ﳕ=��z�F^(��Bj/x�Y��cW��ExtEXtAuthorDavid Turner��IEND�B`�tutorial/step1.html000064400000130457151706766400010357 0ustar00<!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 Tutorial / I</title>
</head>


<body>

<div id="top"
     class="bar">
  <h1><a href="http://freetype.org/index.html">FreeType</a>
    Tutorial&nbsp;/&nbsp;I</h1>
</div>


<div id="wrapper">

<div class="colmask leftmenu">
  <div class="colright">
    <div class="col1wrap">
      <div class="col1">


        <!-- ************************************************** -->

        <div id="simple-glyph-loading">
          <h2>I. Simple Glyph Loading</h2>

          <h3 id="section-1">1. Header Files</h3>

          <p>The following are instructions required to compile an
            application that uses the FreeType&nbsp;2 library.</p>

          <ol>
            <li class="emph">
              <p>Locate the FreeType&nbsp;2 <code>include</code>
                directory.</p>

              <p>You have to add it to your compilation include
                path.</p>

              <p>In Unix-like environments you can run the
                <code>freetype-config</code> script with
                the <code>--cflags</code> option to retrieve the
                appropriate compilation flags.  This script can also
                be used to check the version of the library that is
                installed on your system, as well as the required
                librarian and linker flags.</p>

              <p>An alternative solution is <code>pkg-config</code>;
                say</p>

              <pre>
pkg-config --cflags freetype2</pre>

              <p>to get the compilation flags.</p>
            </li>

            <li class="emph">
              <p>Include the file named <code>ft2build.h</code>.</p>

              <p>It contains various macro declarations that are later
                used to <code>#include</code> the appropriate public
                FreeType&nbsp;2 header files.</p>
            </li>

            <li class="emph">
              <p>Include the main FreeType&nbsp;2 API header file.</p>

              <p>You should do that using the
                macro <code>FT_FREETYPE_H</code>, like in the
                following example.</p>

              <pre>
#include &lt;ft2build.h&gt;
#include FT_FREETYPE_H</pre>

              <p><code>FT_FREETYPE_H</code> is a special macro defined
                in file <code>ftheader.h</code>.  It contains some
                installation-specific macros to name other public
                header files of the FreeType&nbsp;2 API.</p>

              <p>You can
                read <a href="../reference/ft2-header_file_macros.html">this
                  section of the FreeType&nbsp;2 API Reference</a> for a
                complete listing of the header macros.</p>
            </li>
          </ol>

          <p>The use of macros in <code>#include</code> statements is
            ANSI-compliant.  It is used for several reasons.</p>

          <ul>
            <li>It avoids conflicts with (deprecated) FreeType 1.x
              public header files.</li>

            <li>The macro names are not limited to the DOS 8.3 file
              naming limit; names
              like <code>FT_MULTIPLE_MASTERS_H</code>
              or <code>FT_SFNT_NAMES_H</code> are a lot more readable
              and explanatory than the real file names
              <code>ftmm.h</code> and <code>ftsnames.h</code>.</li>

            <li>It allows special installation tricks that will not be
              discussed here.</li>
          </ul>


          <h3 id="section-2">2. Library Initialization</h3>

          <p>To initialize the FreeType library, create a variable of
            type <a href="../reference/ft2-base_interface.html#FT_Library"><code>FT_Library</code></a>
            named, for example, <code>library</code>, and call the
            function <a href="../reference/ft2-base_interface.html#FT_Init_FreeType"><code>FT_Init_FreeType</code></a>.</p>

          <pre>
#include &lt;ft2build.h&gt;
#include FT_FREETYPE_H

FT_Library  library;


...

error = FT_Init_FreeType( &amp;library );
if ( error )
{
  ... an error occurred during library initialization ...
}</pre>

          <p>This function is in charge of</p>

          <ul>
            <li>creating a new instance of the FreeType&nbsp;2 library
              and setting the handle <code>library</code> to it,
              and</li>

            <li>loading each module that FreeType knows about in the
              library.  Among others, your new <code>library</code>
              object is able to handle TrueType, Type&nbsp;1,
              CID-keyed &amp; OpenType/CFF fonts gracefully.</li>
          </ul>

          <p>As you can see, the function returns an error code, like
            most other functions of the FreeType API.  An error code
            of&nbsp;0 (also known
            as <code>FT_Err_Ok</code>) <em>always</em> means that the
            operation was successful; otherwise, the value describes
            the error, and <code>library</code> is set to NULL.</p>

          <p>A list of all FreeType error codes can be found in
            file <code>fterrdef.h</code>.</p>


          <h3 id="section-3">3. Loading a Font Face</h3>

          <h4>a. From a Font File</h4>

          <p>Create a new <code>face</code> object by
            calling <a href="../reference/ft2-base_interface.html#FT_New_Face"><code>FT_New_Face</code></a>.
            A <em>face</em> describes a given typeface and style.  For
            example, &lsquo;Times New Roman Regular&rsquo; and
            &lsquo;Times New Roman Italic&rsquo; correspond to two
            different faces.</p>

          <pre>
FT_Library  library;   <span class="comment">/* handle to library     */</span>
FT_Face     face;      <span class="comment">/* handle to face object */</span>


error = FT_Init_FreeType( &amp;library );
if ( error ) { ... }

error = FT_New_Face( library,
                     "/usr/share/fonts/truetype/arial.ttf",
                     0,
                     &amp;face );
if ( error == FT_Err_Unknown_File_Format )
{
  ... the font file could be opened and read, but it appears
  ... that its font format is unsupported
}
else if ( error )
{
  ... another error code means that the font file could not
  ... be opened or read, or that it is broken...
}</pre>

          <p>As you can certainly imagine, <code>FT_New_Face</code>
            opens a font file, then tries to extract one face from it.
            Its parameters are as follows.</p>

          <dl>
            <dt>library</dt>
            <dd>A handle to the FreeType library instance where the
              face object is created.</dd>

            <dt>filepathname</dt>
            <dd>The font file pathname (a standard C string).</dd>

            <dt>face_index</dt>
            <dd>
              <p>Certain font formats allow several font faces to be
                embedded in a single file.</p>

              <p>This index tells which face you want to load.  An
                error is returned if its value is too large.</p>

              <p>Index&nbsp;0 always works, though.</p>
            </dd>

            <dt>face</dt>
            <dd>
              <p>A <em>pointer</em> to the handle that is set to
                describe the new face object.</p>

              <p>It is set to NULL in case of error.</p>
            </dd>
          </dl>

          <p>To know how many faces a given font file contains, set
            <code>face_index</code> to&nbsp;<code>-1</code>, then
            check the value of <code>face-&gt;num_faces</code>, which
            indicates how many faces are embedded in the font
            file.</p>

          <h4>b. From Memory</h4>

          <p>In the case where you have already loaded the font file
            into memory, you can similarly create a new face object
            for it by
            calling <a href="../reference/ft2-base_interface.html#FT_New_Memory_Face"><code>FT_New_Memory_Face</code></a>.</p>

          <pre>
FT_Library  library;   <span class="comment">/* handle to library     */</span>
FT_Face     face;      <span class="comment">/* handle to face object */</span>


error = FT_Init_FreeType( &amp;library );
if ( error ) { ... }

error = FT_New_Memory_Face( library,
                            buffer,    <span class="comment">/* first byte in memory */</span>
                            size,      <span class="comment">/* size in bytes        */</span>
                            0,         <span class="comment">/* face_index           */</span>
                            &amp;face );
if ( error ) { ... }</pre>

          <p>As you can see, <code>FT_New_Memory_Face</code> takes a
            pointer to the font file buffer and its size in bytes
            instead of a file pathname.  Other than that, it has
            exactly the same semantics as
            <code>FT_New_Face</code>.</p>

          <p>Note that you must not deallocate the font file buffer
            before calling
            <a href="../reference/ft2-base_interface.html#FT_Done_Face"><code>FT_Done_Face</code></a>.</p>

          <h4>c. From Other Sources (Compressed Files, Network,
            etc.)</h4>

          <p>There are cases where using a file pathname or preloading
            the file into memory is not sufficient.  With
            FreeType&nbsp;2, it is possible to provide your own
            implementation of I/O routines.</p>

          <p>This is done through
            the <a href="../reference/ft2-base_interface.html#FT_Open_Face"><code>FT_Open_Face</code></a>
            function, which can be used to open a new font face with a
            custom input stream, select a specific driver for opening,
            or even pass extra parameters to the font driver when
            creating the object.  We advise you to look up
            the <a href="../reference/ft2-toc.html">FreeType&nbsp;2
            reference manual</a> in order to learn how to use it.</p>


          <h3 id="section-4">4. Accessing the Face Data</h3>

          <p>A <em>face object</em> models all information that
            globally describes the face.  Usually, this data can be
            accessed directly by dereferencing a handle, like
            in <code>face&minus;&gt;num_glyphs</code>.</p>

          <p>The complete list of available fields is in
            the <a href="../reference/ft2-base_interface.html#FT_FaceRec"><code>FT_FaceRec</code></a>
            structure description.  However, we describe here a few of
            them in more detail.</p>

          <dl>
            <dt>num_glyphs</dt>
            <dd>This variable gives the number of <em>glyphs</em>
              available in the font face.  A glyph is a character
              image, nothing more – it thus doesn't necessarily
              correspond to a <em>character code</em>.</dd>

            <dt>face_flags</dt>
            <dd>A 32-bit integer containing bit flags that describe
              some face properties.  For example, the flag
              <code>FT_FACE_FLAG_SCALABLE</code> indicates that the
              face's font format is scalable and that glyph images can
              be rendered for all character pixel sizes.  For more
              information on face flags, please read
              the <a href="../reference/ft2-base_interface.html#FT_FACE_FLAG_XXX">FreeType&nbsp;2
              API Reference</a>.</dd>

            <dt>units_per_EM</dt>
            <dd>This field is only valid for scalable formats (it is
              set to&nbsp;0 otherwise).  It indicates the number of
              font units covered by the EM.</dd>

            <dt>num_fixed_sizes</dt>
            <dd>This field gives the number of embedded bitmap strikes
              in the current face.  A <em>strike</em> is a series of
              glyph images for a given character pixel size.  For
              example, a font face could include strikes for pixel
              sizes 10, 12, and&nbsp;14.  Note that even scalable font
              formats can have embedded bitmap strikes!</dd>

            <dt>available_sizes</dt>
            <dd>
              <p>A pointer to an array
                of <a href="../reference/ft2-base_interface.html#FT_Bitmap_Size"><code>FT_Bitmap_Size</code></a>
                elements.  Each <code>FT_Bitmap_Size</code> indicates
                the horizontal and vertical <em>character pixel
                sizes</em> for each of the strikes that are present in
                the face.</p>

              <p class="warning">Note that, generally speaking, these
                are <em>not</em> the <em>cell size</em> of the bitmap
                strikes.</p>
            </dd>
          </dl>


          <h3 id="section-5">5. Setting the Current Pixel Size</h3>

          <p>FreeType&nbsp;2 uses <em>size objects</em> to model all
            information related to a given character size for a given
            face.  For example, a size object holds the value of
            certain metrics like the ascender or text height,
            expressed in 1/64th of a pixel, for a character size of
            12&nbsp;points (however, those values are rounded to
            integers, i.e., multiples of 64).</p>

          <p>When the <code>FT_New_Face</code> function is called (or
            one of its siblings), it <em>automatically</em> creates a
            new size object for the returned face.  This size object
            is directly accessible as
            <code>face&minus;&gt;size</code>.</p>

          <p class="note">NOTE: A single face object can deal with one
            or more size objects at a time; however, this is something
            that few programmers really need to do.  We have thus
            decided to make this feature available through additional
            functions.</p>

          <p>When a new face object is created, all elements are set
            to&nbsp;0 during initialization.  To populate the
            structure with sensible values, you should
            call <a href="../reference/ft2-base_interface.html#FT_Set_Char_Size"><code>FT_Set_Char_Size</code></a>.
            Here is an example, setting the character size to 16pt for
            a 300&times;300dpi device:</p>

          <pre>
error = FT_Set_Char_Size(
          face,    <span class="comment">/* handle to face object           */</span>
          0,       <span class="comment">/* char_width in 1/64th of points  */</span>
          16*64,   <span class="comment">/* char_height in 1/64th of points */</span>
          300,     <span class="comment">/* horizontal device resolution    */</span>
          300 );   <span class="comment">/* vertical device resolution      */</span></pre>

          <p>Some notes.</p>

          <ul>
            <li>The character widths and heights are specified in
              1/64th of points.  A point is a <em>physical</em>
              distance, equaling 1/72th of an inch.  Normally, it is
              not equivalent to a pixel.</li>

            <li>Value of&nbsp;0 for the character width means
              &lsquo;same as character height&rsquo;, value of&nbsp;0
              for the character height means &lsquo;same as character
              width&rsquo;.  Otherwise, it is possible to specify
              different character widths and heights.</li>

            <li>The horizontal and vertical device resolutions are
              expressed in <em>dots-per-inch</em>, or <em>dpi</em>.
              Standard values are 72 or 96&nbsp;dpi for display
              devices like the screen.  The resolution is used to
              compute the character pixel size from the character
              point size.</li>

            <li>Value of&nbsp;0 for the horizontal resolution means
              &lsquo;same as vertical resolution&rsquo;, value
              of&nbsp;0 for the vertical resolution means &lsquo;same
              as horizontal resolution&rsquo;.  If both values are
              zero, 72&nbsp;dpi is used for both dimensions.</li>

            <li>The first argument is a handle to a face object, not a
              size object.</li>
          </ul>

          <p>This function computes the (possibly fractional)
            character pixel size that corresponds to the character
            width and height and device resolutions.  A common acronym
            for the pixel size is <em>ppem</em> (pixel per em).</p>

          <p>If you want to specify the (integer) pixel sizes
            yourself, you can call
            <a href="../reference/ft2-base_interface.html#FT_Set_Pixel_Sizes"><code>FT_Set_Pixel_Sizes</code></a>.</p>

          <pre>
error = FT_Set_Pixel_Sizes(
          face,   <span class="comment">/* handle to face object */</span>
          0,      <span class="comment">/* pixel_width           */</span>
          16 );   <span class="comment">/* pixel_height          */</span></pre>

          <p>This example sets the character pixel sizes to
            16&times;16&nbsp;pixels.  As previously, a value of&nbsp;0
            for one of the dimensions means &lsquo;same as the
            other&rsquo;.</p>

          <p>Note that both functions return an error code.  Usually,
            an error occurs with a fixed-size font format (like FNT or
            PCF) when trying to set the pixel size to a value that is
            not listed in the <code>face-&gt;fixed_sizes</code>
            array.</p>

          <p>Be aware that fractional ppem values are not always
            supported.  For example, the native bytecode engine for
            hinting TrueType fonts (TTFs) only supports integer ppem
            values, and FreeType rounds fractional ppem values
            accordingly.</p>


          <h3 id="section-6">6. Loading a Glyph Image</h3>

          <h4>a. Converting a Character Code Into a Glyph Index</h4>

          <p>Normally, an application wants to load a glyph image
            based on its <em>character code</em>, which is a unique
            value that defines the character for a
            given <em>encoding</em>.  For example, code&nbsp;65 (0x41)
            represents character &lsquo;A&rsquo; in ASCII
            encoding.</p>

          <p>A face object contains one or more tables, called
            <em>charmaps</em>, to convert character codes to glyph
            indices.  For example, most older TrueType fonts contain
            two charmaps: One is used to convert Unicode character
            codes to glyph indices, the other one is used to convert
            Apple Roman encoding to glyph indices.  Such fonts can
            then be used either on Windows (which uses Unicode) and
            old MacOS versions (which use Apple Roman).  Note also
            that a given charmap might not map to all the glyphs
            present in the font.</p>

          <p>By default, when a new face object is created, FreeType
            tries to select a Unicode charmap.  It emulates a Unicode
            charmap if the font doesn't contain such a charmap, based
            on glyph names.  Note that it is possible that the
            emulation misses glyphs if glyph names are non-standard.
            For some fonts like symbol fonts, no Unicode emulation is
            possible at all.</p>

          <p>Later on we will describe how to look for specific
            charmaps in a face.  For now, we assume that the face
            contains at least a Unicode charmap that was selected
            during a call to <code>FT_New_Face</code>.  To convert a
            Unicode character code to a font glyph index, we use
            <a href="../reference/ft2-base_interface.html#FT_Get_Char_Index"><code>FT_Get_Char_Index</code></a>.</p>

          <pre>
glyph_index = FT_Get_Char_Index( face, charcode );</pre>

          <p>This code line looks up the glyph index corresponding to
            the given <code>charcode</code> in the charmap that is
            currently selected for the face.  You should use the
            UTF-32 representation form of Unicode; for example, if you
            want to load character U+1F028, use value 0x1F028 as the
            value for <code>charcode</code>.

          <p>If no charmap was selected, the function returns
            the charcode.</p>

          <p>Note that this is one of the rare FreeType functions that
            do not return an error code.  However, when a given
            character code has no glyph image in the face,
            value&nbsp;0 is returned.  By convention, it always
            corresponds to a special glyph image called
            the <em>missing glyph</em>, which is commonly displayed as
            a box or a space.</p>

          <h4>b. Loading a Glyph From the Face</h4>

          <p>Once you have a glyph index, you can load the
            corresponding glyph image.  The latter can be stored in
            various formats within the font file.  For fixed-size
            formats like FNT or PCF, each image is a bitmap.  Scalable
            formats like TrueType or CFF use vectorial shapes
            (<em>outlines</em>) to describe each glyph.  Some formats
            may have even more exotic ways of representing glyphs
            (e.g., MetaFont – but this format is not supported).
            Fortunately, FreeType&nbsp;2 is flexible enough to support
            any kind of glyph format through a simple API.</p>

          <p>The glyph image is always stored in a special object called a
            <em>glyph slot</em>.  As its name suggests, a glyph slot
            is a container that is able to hold one glyph image at a
            time, be it a bitmap, an outline, or something else.  Each
            face object has a single glyph slot object that can be
            accessed as <code>face-&gt;glyph</code>.  Its fields are
            explained by
            the <a href="../reference/ft2-base_interface.html#FT_GlyphSlotRec"><code>FT_GlyphSlotRec</code></a>
            structure documentation.</p>

          <p>Loading a glyph image into the slot is performed by
            calling <a href="../reference/ft2-base_interface.html#FT_Load_Glyph"><code>FT_Load_Glyph</code></a>.</p>

          <pre>
error = FT_Load_Glyph(
          face,          <span class="comment">/* handle to face object */</span>
          glyph_index,   <span class="comment">/* glyph index           */</span>
          load_flags );  <span class="comment">/* load flags, see below */</span></pre>

          <p>The <code>load_flags</code> value is a set of bit flags
            to indicate some special operations.  The default value
            <code>FT_LOAD_DEFAULT</code> is&nbsp;0.</p>

          <p>This function tries to load the corresponding glyph image
            from the face.</p>

          <ul>
            <li>If a bitmap is found for the corresponding glyph and
              pixel size, it is loaded into the slot.  Embedded
              bitmaps are always favoured over native image formats,
              because we assume that they are higher-quality versions
              of the same glyph.  This can be changed by using
              the <code>FT_LOAD_NO_BITMAP</code> flag.</li>

            <li>Otherwise, a native image for the glyph is loaded.  It
              is also scaled to the current pixel size, as well as
              hinted for certain formats like TrueType and
              Type&nbsp;1.</li>
          </ul>

          <p>The
            field <code>face&minus;&gt;glyph&minus;&gt;format</code>
            describes the format used for storing the glyph image in
            the slot.  If it is
            not <code>FT_GLYPH_FORMAT_BITMAP</code>, one can
            immediately convert it to a bitmap
            through <a href="../reference/ft2-base_interface.html#FT_Render_Glyph"><code>FT_Render_Glyph</code></a>.</p>

          <pre>
error = FT_Render_Glyph( face-&gt;glyph,   <span class="comment">/* glyph slot  */</span>
                         render_mode ); <span class="comment">/* render mode */</span></pre>

          <p>The parameter <code>render_mode</code> is a set of bit
            flags to specify how to render the glyph image.
            <code>FT_RENDER_MODE_NORMAL</code>, the default, renders
            an anti-aliased coverage bitmap with 256 gray levels (also
            called a <em>pixmap</em>), as this is the default.  You
            can alternatively use <code>FT_RENDER_MODE_MONO</code> if
            you want to generate a 1-bit monochrome bitmap.  More
            values are available for
            the <a href="../reference/ft2-base_interface.html#FT_Render_Mode"><code>FT_Render_Mode</code></a>
            enumeration value.</p>

          <p>Once you have a bitmapped glyph image, you can access it
            directly through <code>glyph-&gt;bitmap</code> (a simple
            descriptor for bitmaps or pixmaps), and position it
            through <code>glyph-&gt;bitmap_left</code> and
            <code>glyph-&gt;bitmap_top</code>.  For optimal rendering
            on a screen the bitmap should be used as an alpha channel
            in linear blending with gamma correction.</p>

          <p>Note that <code>bitmap_left</code> is the horizontal
            distance from the current pen position to the leftmost
            border of the glyph bitmap, while <code>bitmap_top</code>
            is the vertical distance from the pen position (on the
            baseline) to the topmost border of the glyph
            bitmap.  <em>It is positive to indicate an upwards
            distance</em>.</p>

          <h4>c. Using Other Charmaps</h4>

          <p>As said before, when a new face object is created, it
            looks for a Unicode charmap and select it.  The currently
            selected charmap can be accessed
            via <code>face-&gt;charmap</code>.  This field is NULL if
            no charmap is selected, which typically happens when you
            create a new <code>FT_Face</code> object from a font file
            that doesn't contain a Unicode charmap (which is rather
            infrequent today).</p>

          <p>There are two ways to select a different charmap with
            FreeType.  It's easiest if the encoding you need already
            has a corresponding enumeration defined
            in <code>FT_FREETYPE_H</code>, for
            example <code>FT_ENCODING_BIG5</code>.  In this case, you
            can call
            <a href="../reference/ft2-base_interface.html#FT_Select_Charmap"><code>FT_Select_Charmap</code></a>.</p>

          <pre>
error = FT_Select_Charmap(
          face,               <span class="comment">/* target face object */</span>
          FT_ENCODING_BIG5 ); <span class="comment">/* encoding           */</span></pre>

          <p>Another way is to manually parse the list of charmaps for
            the face; this is accessible through the
            fields <code>num_charmaps</code> and
            <code>charmaps</code> (notice the &lsquo;s&rsquo;) of the
            face object.  As you could expect, the first is the number
            of charmaps in the face, while the second is <em>a table
            of pointers to the charmaps</em> embedded in the face.</p>

          <p>Each charmap has a few visible fields to describe it more
            precisely.  The most important ones are
            <code>charmap-&gt;platform_id</code>
            and <code>charmap-&gt;encoding_id</code>, defining a pair
            of values that describe the charmap in a rather generic
            way: Each value pair corresponds to a given encoding.  For
            example, the pair (3,1) corresponds to Unicode.  The list
            is defined in the OpenType specification; you can also use
            the file <code>FT_TRUETYPE_IDS_H</code>, which defines
            several helpful constants to deal with them.  Note that we
            use the OpenType enumeration values for non-OpenType fonts
            also (by defining additional constants where
            necessary).</p>

          <p>To select a specific encoding, you need to find a
            corresponding value pair in the specification, then look
            for it in the charmaps list.</p>

          <pre>
FT_CharMap  found = 0;
FT_CharMap  charmap;
int         n;


for ( n = 0; n &lt; face-&gt;num_charmaps; n++ )
{
  charmap = face-&gt;charmaps[n];
  if ( charmap-&gt;platform_id == my_platform_id &amp;&amp;
       charmap-&gt;encoding_id == my_encoding_id )
  {
    found = charmap;
    break;
  }
}

if ( !found ) { ... }

<span class="comment">/* now, select the charmap for the face object */</span>
error = FT_Set_Charmap( face, found );
if ( error ) { ... }</pre>

          <p>Once a charmap has been selected, either through
            <code>FT_Select_Charmap</code>
            or <a href="../reference/ft2-base_interface.html#FT_Set_Charmap"><code>FT_Set_Charmap</code></a>,
            it is used by all subsequent calls
            to <code>FT_Get_Char_Index</code>.</p>

          <h4>d. Glyph Transformations</h4>

          <p>It is possible to specify an affine transformation with
            <a href="../reference/ft2-base_interface.html#FT_Set_Transform"><code>FT_Set_Transform</code></a>,
            to be applied to glyph images when they are loaded.  Of
            course, this only works for scalable (vectorial) font
            formats.</p>

          <pre>
error = FT_Set_Transform(
          face,       <span class="comment">/* target face object    */</span>
          &amp;matrix,    <span class="comment">/* pointer to 2x2 matrix */</span>
          &amp;delta );   <span class="comment">/* pointer to 2d vector  */</span></pre>

          <p>This function sets the current transformation for a given
            face object.  Its second parameter is a pointer to an
            <a href="../reference/ft2-basic_types.html#FT_Matrix"><code>FT_Matrix</code></a>
            structure that describes a 2&times;2 affine matrix.  The
            third parameter is a pointer to
            an <a href="../reference/ft2-basic_types.html#FT_Vector"><code>FT_Vector</code></a>
            structure, describing a two-dimensional vector that
            translates the glyph image <em>after</em> the 2&times;2
            transformation.</p>

          <p>Note that the matrix pointer can be set to NULL, in which
            case the identity transformation is used.  Coefficients of
            the matrix are otherwise in 16.16 fixed-point units.</p>

          <p>The vector pointer can also be set to NULL (in which case
            a delta of (0,0) is used).  The vector coordinates are
            expressed in 1/64th of a pixel (also known as 26.6
            fixed-point numbers).</p>

          <p class="warning">The transformation is applied to every
            glyph that is loaded through <code>FT_Load_Glyph</code>
            and is <em>completely independent of any hinting
            process</em>.  This means that you won't get the same
            results if you load a glyph at the size of 24&nbsp;pixels,
            or a glyph at the size of 12&nbsp;pixels scaled by&nbsp;2
            through a transformation, because the hints are computed
            differently (except if you have disabled hints).</p>

          <p>If you ever need to use a non-orthogonal transformation
            with optimal hints, you first have to decompose your
            transformation into a scaling part and a rotation/shearing
            part.  Use the scaling part to compute a new character
            pixel size, then the other one to call
            <code>FT_Set_Transform</code>.  This is explained in more
            detail in part&nbsp;II of this tutorial.</p>

          <p class="warning">Rotation usually disables hinting.</p>

          <p>Loading a glyph bitmap with a non-identity transformation
            works; the transformation is ignored in this case.</p>


          <h3 id="section-7">7. Simple Text Rendering</h3>

          <p>We now present a simple example to render a string of
            8-bit Latin-1 text, assuming a face that contains a
            Unicode charmap.</p>

          <p>The idea is to create a loop that loads one glyph image
            on each iteration, converts it to a pixmap, draws it on
            the target surface, then increments the current pen
            position.</p>

          <h4 id="basic-code">a. Basic Code</h4>

          <p>The following code performs our simple text rendering
            with the functions previously described.</p>

          <pre>
FT_GlyphSlot  slot = face-&gt;glyph;  <span class="comment">/* a small shortcut */</span>
int           pen_x, pen_y, n;


... initialize library ...
... create face object ...
... set character size ...

pen_x = 300;
pen_y = 200;

for ( n = 0; n &lt; num_chars; n++ )
{
  FT_UInt  glyph_index;


  <span class="comment">/* retrieve glyph index from character code */</span>
  glyph_index = FT_Get_Char_Index( face, text[n] );

  <span class="comment">/* load glyph image into the slot (erase previous one) */</span>
  error = FT_Load_Glyph( face, glyph_index, FT_LOAD_DEFAULT );
  if ( error )
    continue;  <span class="comment">/* ignore errors */</span>

  <span class="comment">/* convert to an anti-aliased bitmap */</span>
  error = FT_Render_Glyph( face-&gt;glyph, FT_RENDER_MODE_NORMAL );
  if ( error )
    continue;

  <span class="comment">/* now, draw to our target surface */</span>
  my_draw_bitmap( &amp;slot-&gt;bitmap,
                  pen_x + slot-&gt;bitmap_left,
                  pen_y - slot-&gt;bitmap_top );

  <span class="comment">/* increment pen position */</span>
  pen_x += slot-&gt;advance.x >> 6;
  pen_y += slot-&gt;advance.y >> 6; <span class="comment">/* not useful for now */</span>
}</pre>

          <p>This code needs a few explanations.</p>

          <ul>
            <li>We define a handle named <code>slot</code> that points
              to the face object's glyph slot.  (The
              type <a href="../reference/ft2-base_interface.html#FT_GlyphSlot"><code>FT_GlyphSlot</code></a>
              is a pointer).  That is a convenience to avoid using
              <code>face-&gt;glyph-&gt;XXX</code> every time.</li>

            <li>We increment the pen position with the vector
              <code>slot-&gt;advance</code>, which correspond to the
              glyph's <em>advance width</em> (also known as
              its <em>escapement</em>).  The advance vector is
              expressed in 1/64th of pixels, and is truncated to
              integer pixels on each iteration.</li>

            <li>The function <code>my_draw_bitmap</code> is not part
              of FreeType but must be provided by the application to
              draw the bitmap to the target surface.  In this example,
              it takes a pointer to
              an <a href="../reference/ft2-basic_types.html#FT_Bitmap"><code>FT_Bitmap</code></a>
              descriptor and the position of its top-left corner as
              arguments.  For ideal rendering on a screen this
              function should perform linear blending with gamma
              correction, using the bitmap as an alpha channel.</li>

            <li>The value of <code>slot-&gt;bitmap_top</code> is
              positive for an <em>upwards</em> vertical distance.
              Assuming that the coordinates taken
              by <code>my_draw_bitmap</code> use the opposite
              convention (increasing&nbsp;Y corresponds to downwards
              scanlines), we subtract it from <code>pen_y</code>,
              instead of adding to it.</li>
          </ul>

          <h4>b.Refined code</h4>

          <p>The following code is a refined version of the example
            above.  It uses features and functions of FreeType that
            have not yet been introduced, and which are explained
            below.</p>

          <pre>
FT_GlyphSlot  slot = face-&gt;glyph;  <span class="comment">/* a small shortcut */</span>
FT_UInt       glyph_index;
int           pen_x, pen_y, n;


... initialize library ...
... create face object ...
... set character size ...

pen_x = 300;
pen_y = 200;

for ( n = 0; n &lt; num_chars; n++ )
{
  <span class="comment">/* load glyph image into the slot (erase previous one) */</span>
  error = FT_Load_Char( face, text[n], FT_LOAD_RENDER );
  if ( error )
    continue;  <span class="comment">/* ignore errors */</span>

  <span class="comment">/* now, draw to our target surface */</span>
  my_draw_bitmap( &amp;slot-&gt;bitmap,
                  pen_x + slot-&gt;bitmap_left,
                  pen_y - slot-&gt;bitmap_top );

  <span class="comment">/* increment pen position */</span>
  pen_x += slot-&gt;advance.x >> 6;
}</pre>

          <p>We have reduced the size of our code, but it does exactly
            the same thing.</p>

          <ul>
            <li>We use the
              function <a href="../reference/ft2-base_interface.html#FT_Load_Char"><code>FT_Load_Char</code></a>
              instead of <code>FT_Load_Glyph</code>.  As you probably
              imagine, it is equivalent to
              calling <code>FT_Get_Char_Index</code>, then
              <code>FT_Load_Glyph</code>.</li>

            <li>
              <p>We do not use <code>FT_LOAD_DEFAULT</code> for the
                loading mode, but the bit
                flag <code>FT_LOAD_RENDER</code>.  It indicates that
                the glyph image must be immediately converted to an
                anti-aliased bitmap.  This is of course a shortcut
                that avoids calling <code>FT_Render_Glyph</code>
                explicitly but is strictly equivalent.</p>

              <p>Note that you can also specify that you want a
                monochrome bitmap instead by using the
                additional <code>FT_LOAD_MONOCHROME</code> load
                flag.</p>
            </li>
          </ul>

          <h4 id="transformed-text">c. More Advanced Rendering</h4>

          <p>Let us try to render transformed text now (for example
            through a rotation).  We can do this
            using <code>FT_Set_Transform</code>.</p>

          <pre>
FT_GlyphSlot  slot;
FT_Matrix     matrix;              <span class="comment">/* transformation matrix */</span>
FT_UInt       glyph_index;
FT_Vector     pen;                 <span class="comment">/* untransformed origin */</span>
int           n;


... initialize library ...
... create face object ...
... set character size ...

slot = face-&gt;glyph;                <span class="comment">/* a small shortcut */</span>

<span class="comment">/* set up matrix */</span>
matrix.xx = (FT_Fixed)( cos( angle ) * 0x10000L );
matrix.xy = (FT_Fixed)(-sin( angle ) * 0x10000L );
matrix.yx = (FT_Fixed)( sin( angle ) * 0x10000L );
matrix.yy = (FT_Fixed)( cos( angle ) * 0x10000L );

<span class="comment">/* the pen position in 26.6 cartesian space coordinates */</span>
<span class="comment">/* start at (300,200)                                   */</span>
pen.x = 300 * 64;
pen.y = ( my_target_height - 200 ) * 64;

for ( n = 0; n &lt; num_chars; n++ )
{
  <span class="comment">/* set transformation */</span>
  FT_Set_Transform( face, &amp;matrix, &amp;pen );

  <span class="comment">/* load glyph image into the slot (erase previous one) */</span>
  error = FT_Load_Char( face, text[n], FT_LOAD_RENDER );
  if ( error )
    continue;  <span class="comment">/* ignore errors */</span>

  <span class="comment">/* now, draw to our target surface (convert position) */</span>
  my_draw_bitmap( &amp;slot-&gt;bitmap,
                  slot-&gt;bitmap_left,
                  my_target_height - slot-&gt;bitmap_top );

  <span class="comment">/* increment pen position */</span>
  pen.x += slot-&gt;advance.x;
  pen.y += slot-&gt;advance.y;
}</pre>

          <p>Some remarks.</p>

          <ul>
            <li>We now use a vector of type <code>FT_Vector</code> to
              store the pen position, with coordinates expressed as
              1/64th of pixels, hence a multiplication.  The position
              is expressed in cartesian space.</li>

            <li>Glyph images are always loaded, transformed, and
              described in the cartesian coordinate system within
              FreeType (which means that increasing&nbsp;Y corresponds
              to upper scanlines), unlike the system typically used
              for bitmaps (where the topmost scanline has
              coordinate&nbsp;0).  We must thus convert between the
              two systems when we define the pen position, and when we
              compute the topleft position of the bitmap.</li>

            <li>We set the transformation on each glyph to indicate
              the rotation matrix as well as a delta that moves the
              transformed image to the current pen position (in
              cartesian space, not bitmap space).  As a consequence,
              the values of <code>bitmap_left</code>
              and <code>bitmap_top</code> correspond to the bitmap
              origin in target space pixels.  We thus don't
              add <code>pen.x</code> or <code>pen.y</code> to their
              values when calling <code>my_draw_bitmap</code>.</li>

            <li>The advance width is always returned transformed,
              which is why it can be directly added to the current pen
              position.  Note that it is <em>not</em> rounded this
              time.</li>
          </ul>

          <p>A complete source code example can be found
            <a href="example1.c">here</a>.</p>

          <p>It is important to note that, while this example is a bit
            more complex than the previous one, it is strictly
            equivalent for the case where the transformation is the
            identity.  Hence it can be used as a replacement (but a
            more powerful one).</p>

          <p>The still present few shortcomings will be explained, and
            solved, in the next part of this tutorial.</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>
      &nbsp; <!-- separate primary from secondary entries -->
    </li>

    <li class="secondary">
      <a href="index.html">FreeType Tutorial</a>
    </li>
    <li class="tertiary">
      <a href="step1.html" class="current">Simple Glyph Loading</a>
    </li>
    <li class="tertiary">
      <a href="step2.html">Managing Glyphs</a>
    </li>
    <li class="tertiary">
      <a href="step3.html">Examples</a>
    </li>
  </ul>
</div>

</div> <!-- id="wrapper" -->

<div id="TOC-bottom">
</div>

</body>
</html>
tutorial/step2.html000064400000175456151706766400010370 0ustar00<!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 Tutorial / II</title>
</head>


<body>

<div id="top"
     class="bar">
  <h1><a href="http://freetype.org/index.html">FreeType</a>
    Tutorial&nbsp;/&nbsp;II</h1>
</div>


<div id="wrapper">

<div class="colmask leftmenu">
  <div class="colright">
    <div class="col1wrap">
      <div class="col1">


        <!-- ************************************************** -->

        <div id="simple-glyph-loading">
          <h2>II. Managing Glyphs</h2>


          <h3 id="section-1">1. Glyph Metrics</h3>

          <p>Glyph metrics are, as the name suggests, certain
            distances associated with each glyph that describe how to
            position this glyph while creating a text layout.</p>

          <p>There are usually two sets of metrics for a single glyph:
            Those used to represent glyphs in horizontal text layouts
            (Latin, Cyrillic, Arabic, Hebrew, etc.), and those used to
            represent glyphs in vertical text layouts (Chinese,
            Japanese, Korean, Mongolian, etc.).</p>

          <p>Note that only a few font formats provide vertical
            metrics.  You can test whether a given face object
            contains them by using the
            macro <a href="../reference/ft2-base_interface.html#FT_HAS_VERTICAL"><code>FT_HAS_VERTICAL</code></a>,
            which returns true if appropriate.</p>

          <p>Individual glyph metrics can be accessed by first loading
            the glyph in a face's glyph slot, then accessing them
            through the <code>face-&gt;glyph-&gt;metrics</code>
            structure, whose type
            is <a href="../reference/ft2-base_interface.html#FT_Glyph_Metrics"><code>FT_Glyph_Metrics</code></a>.
            We will discuss this in more detail below; for now, we
            only note that it contains the following fields.</p>

          <dl>
            <dt>width</dt>
            <dd>This is the width of the glyph image's bounding box.
              It is independent of the layout direction.</dd>

            <dt>height</dt>
            <dd>This is the height of the glyph image's bounding box.
              It is independent of the layout direction.  Be careful
              not to confuse it with the &lsquo;height&rsquo; field in
              the <a href="../reference/ft2-base_interface.html#FT_Size_Metrics">
                <code>FT_Size_Metrics</code></a> structure.</dd>

            <dt>horiBearingX</dt>
            <dd>For <em>horizontal text layouts</em>, this is the
              horizontal distance from the current cursor position to
              the leftmost border of the glyph image's bounding
              box.</dd>

            <dt>horiBearingY</dt>
            <dd>For <em>horizontal text layouts</em>, this is the
              vertical distance from the current cursor position (on
              the baseline) to the topmost border of the glyph image's
              bounding box.</dd>

            <dt>horiAdvance</dt>
            <dd>For <em>horizontal text layouts</em>, this is the
              horizontal distance to increment the pen position when
              the glyph is drawn as part of a string of text.</dd>

            <dt>vertBearingX</dt>
            <dd>For <em>vertical text layouts</em>, this is the
              horizontal distance from the current cursor position to
              the leftmost border of the glyph image's bounding
              box.</dd>

            <dt>vertBearingY</dt>
            <dd>For <em>vertical text layouts</em>, this is the
              vertical distance from the current cursor position (on
              the baseline) to the topmost border of the glyph image's
              bounding box.</dd>

            <dt>vertAdvance</dt>
            <dd>For <em>vertical text layouts</em>, this is the
              vertical distance used to increment the pen position
              when the glyph is drawn as part of a string of
              text.</dd>
          </dl>

          <p class="warning">As not all fonts do contain vertical
            metrics, the values of <code>vertBearingX</code>,
            <code>vertBearingY</code> and <code>vertAdvance</code>
            should not be considered reliable
            if <code>FT_HAS_VERTICAL</code> returns false.</p>

          <p>The following graphics illustrate the metrics more
            clearly.  In case a distance is directed, it is marked
            with a single arrow, indicating a positive value.  The
            first image displays horizontal metrics, where the
            baseline is the horizontal axis.</p>

          <div class="figure">
            <img src="metrics.png"
                 alt="horizontal layout"
                 width=388
                 height=253>
          </div>

          <p>For vertical text layouts, the baseline is vertical,
            identical to the vertical axis.  Contrary to all other
            arrows, <code>bearingX</code> shows a negative value in
            this image.</p>

          <div class="figure">
            <img src="metrics2.png"
                 alt="vertical layout"
                 width=294
                 height=278>
          </div>

          <p>The metrics found
            in <code>face-&gt;glyph-&gt;metrics</code> are normally
            expressed in 26.6 pixel format (i.e., 1/64th of pixels),
            unless you use the <code>FT_LOAD_NO_SCALE</code> flag when
            calling <code>FT_Load_Glyph</code>
            or <code>FT_Load_Char</code>.  In this case, the metrics
            are expressed in original font units.</p>

          <p>The glyph slot object has also a few other interesting
            fields that eases a developer's work.  You can access them
            through <code>face-&gt;glyph-&gt;xxx</code>,
            where <code>xxx</code> is one of the following fields.</p>

          <dl>
            <dt>advance</dt>
            <dd>This field is a <code>FT_Vector</code> that holds the
              transformed advance for the glyph.  That is useful when
              you are using a transformation
              through <code>FT_Set_Transform</code>, as shown in the
              <a href="step1.html#transformed-text">rotated text
              example</a> of part&nbsp;I.  Other than that, its value
              is by default (metrics.horiAdvance,0), unless you
              specify <code>FT_LOAD_VERTICAL</code> when loading the
              glyph image; it is then (0,metrics.vertAdvance).</dd>

            <dt>linearHoriAdvance</dt>
            <dd>This field contains the linearly scaled value of the
              glyph's horizontal advance width.  Indeed, the value of
              <code>metrics.horiAdvance</code> that is returned in the
              glyph slot is normally rounded to integer pixel
              coordinates (i.e., being a multiple of&nbsp;64) by the
              font driver that actually loads the glyph
              image.  <code>linearHoriAdvance</code> is a 16.16
              fixed-point number that gives the value of the original
              glyph advance width in 1/65536th of pixels.  It can be
              use to perform pseudo device-independent text
              layouts.</dd>

            <dt>linearVertAdvance</dt>
            <dd>This is the similar to <code>linearHoriAdvance</code>
              but for the glyph's vertical advance height.  Its value
              is only reliable if the font face contains vertical
              metrics.</dd>
          </dl>


          <h3 id="section-2">2. Managing Glyph Images</h3>

          <p>The glyph image that is loaded in a glyph slot can be
            converted into a bitmap, either by
            using <code>FT_LOAD_RENDER</code> when loading it, or by
            calling <a href="../reference/ft2-base_interface.html#FT_Render_Glyph"><code>FT_Render_Glyph</code></a>.
            Each time you load a new glyph image, the previous one is
            erased from the glyph slot.</p>

          <p>There are situations, however, where you may need to
            extract this image from the glyph slot in order to cache
            it within your application, and even perform additional
            transformations and measures on it before converting it to
            a bitmap.</p>

          <p>The FreeType&nbsp;2 API has a specific extension that is
            capable of dealing with glyph images in a flexible and
            generic way.  To use it, you first need to include
            the <a href="../reference/ft2-header_file_macros.html#FT_GLYPH_H"><code>FT_GLYPH_H</code></a>
            header file.</p>

          <pre>
#include FT_GLYPH_H</pre>

          <h4>a.Extracting the Glyph Image</h4>

          <p>You can extract a single glyph image very easily.  Here
            some code that shows how to do it.</p>

          <pre>
FT_Glyph  glyph; <span class="comment">/* a handle to the glyph image */</span>


...
error = FT_Load_Glyph( face, glyph_index, FT_LOAD_NORMAL );
if ( error ) { ... }

error = FT_Get_Glyph( face-&gt;glyph, &amp;glyph );
if ( error ) { ... }</pre>

          <p>The following steps are performed.</p>

          <ul>
            <li>Create a variable named <code>glyph</code>, of
              type <a href="../reference/ft2-glyph_management.html#FT_Glyph"><code>FT_Glyph</code></a>.
              This is a handle (pointer) to an individual glyph
              image.</li>

            <li>Load the glyph image in the normal way into the face's
              glyph slot.  We don't use <code>FT_LOAD_RENDER</code>
              because we want to grab a scalable glyph image that we
              can transform later on.</li>

            <li>Copy the glyph image from the slot into a
              new <code>FT_Glyph</code> object by
              calling <a href="../reference/ft2-glyph_management.html#FT_Get_Glyph"><code>FT_Get_Glyph</code></a>.
              This function returns an error code and
              sets <code>glyph</code>.</li>
          </ul>

          <p>It is important to note that the extracted glyph is in
            the same format as the original one that is still in the
            slot.  For example, if we are loading a glyph from a
            TrueType font file, the glyph image is really a scalable
            vector outline.  You can access the
            field <code>glyph-&gt;format</code> if you want to know
            exactly how the glyph is modeled and stored.</p>

          <p>A new glyph object can be destroyed with a call
            to <a href="../reference/ft2-glyph_management.html#FT_Done_Glyph"><code>FT_Done_Glyph</code></a>.</p>

          <p>The glyph object contains exactly one glyph image and a
            2D vector representing the glyph's advance in 16.16
            fixed-point coordinates.  The latter can be accessed
            directly as <code>glyph-&gt;advance</code></p>

          <p class="warning">Note that unlike other FreeType objects,
            the library doesn't keep a list of all allocated glyph
            objects.  This means you have to destroy them yourself
            instead of relying on <code>FT_Done_FreeType</code> doing
            all the clean-up.</p>

          <h4>b. Transforming &amp; Copying the Glyph Image</h4>

          <p>If the glyph image is scalable (i.e.,
            if <code>glyph-&gt;format</code> is not equal
            to <code>FT_GLYPH_FORMAT_BITMAP</code>), it is possible to
            transform the image anytime by a call
            to <a href="../reference/ft2-glyph_management.html#FT_Glyph_Transform"><code>FT_Glyph_Transform</code></a>.</p>

          <p>You can also copy a single glyph image
            with <a href="../reference/ft2-glyph_management.html#FT_Glyph_Copy"><code>FT_Glyph_Copy</code></a>.</p>

          <pre>
FT_Glyph   glyph, glyph2;
FT_Matrix  matrix;
FT_Vector  delta;


... load glyph image in `glyph' ...

<span class="comment">/* copy glyph to glyph2 */</span>

error = FT_Glyph_Copy( glyph, &amp;glyph2 );
if ( error ) { ... could not copy (out of memory) ... }

<span class="comment">/* translate `glyph' */</span>

delta.x = -100 * 64; <span class="comment">/* coordinates are in 26.6 pixel format */</span>
delta.y =   50 * 64;

FT_Glyph_Transform( glyph, 0, &amp;delta );

<span class="comment">/* transform glyph2 (horizontal shear) */</span>

matrix.xx = 0x10000L;
matrix.xy = 0.12 * 0x10000L;
matrix.yx = 0;
matrix.yy = 0x10000L;

FT_Glyph_Transform( glyph2, &amp;matrix, 0 );</pre>

          <p>Note that the 2&times;2 transformation matrix is always
            applied to the 16.16 advance vector in the glyph; you thus
            don't need to recompute it.</p>

          <h4>c. Measuring the Glyph Image</h4>

          <p>You can also retrieve the control (bounding) box of any
            glyph image (scalable or not) through
            the <a href="../reference/ft2-glyph_management.html#FT_Glyph_Get_CBox"><code>FT_Glyph_Get_CBox</code></a>
            function.</p>

          <pre>
FT_BBox  bbox;


...
FT_Glyph_Get_CBox( glyph, <em>bbox_mode</em>, &amp;bbox );</pre>

          <p>Coordinates are relative to the glyph origin (0,0), using
            the y&nbsp;upwards convention.  This function takes a
            special argument, the <em>bbox mode</em>, to indicate how
            box coordinates are expressed.</p>

          <p>If the glyph has been loaded
            with <code>FT_LOAD_NO_SCALE</code>, <code>bbox_mode</code>
            must be set to <code>FT_GLYPH_BBOX_UNSCALED</code> to get
            unscaled font units in 26.6 pixel format.  The
            value <code>FT_GLYPH_BBOX_SUBPIXELS</code> is another name
            for this constant.</p>

          <p>Note that the box's maximum coordinates are exclusive,
            which means that you can always compute the width and
            height of the glyph image (regardless of using integer or
            26.6 coordinates) with a simple subtraction.</p>

          <pre class="example">
width  = bbox.xMax - bbox.xMin;
height = bbox.yMax - bbox.yMin;</pre>

          <p>Note also that for 26.6 coordinates, if
            <code>FT_GLYPH_BBOX_GRIDFIT</code> is used as the bbox
            mode, the coordinates are also grid-fitted, which
            corresponds to the following four lines of
            pseudo-code.</p>

          <pre class="example">
bbox.xMin = FLOOR( bbox.xMin )
bbox.yMin = FLOOR( bbox.yMin )
bbox.xMax = CEILING( bbox.xMax )
bbox.yMax = CEILING( bbox.yMax )</pre>

          <p>To get the bbox in <em>integer</em> pixel coordinates,
            set <code>bbox_mode</code>
            to <code>FT_GLYPH_BBOX_TRUNCATE</code>.</p>

          <p>Finally, to get the bounding box in grid-fitted pixel
            coordinates, set <code>bbox_mode</code>
            to <code>FT_GLYPH_BBOX_PIXELS</code>.</p>

          <p>[Computing <em>exact</em> bounding boxes can be done with
            function <a href="../reference/ft2-outline_processing.html#FT_Outline_Get_BBox"><code>FT_Outline_Get_BBox</code></a>,
            at the cost of slower execution.  You probably don't need
            it with the possible exception of rotated glyphs.]</p>

          <h4>d. Converting the Glyph Image to a Bitmap</h4>

          <p>You may need to convert the glyph object to a bitmap once
            you have conveniently cached or transformed it.  This can
            be done easily with
            the <a href="../reference/ft2-glyph_management.html"><code>FT_Glyph_To_Bitmap</code></a>
            function, which handles any glyph object.</p>

          <pre>
FT_Vector  origin;


origin.x = 32; <span class="comment">/* 1/2 pixel in 26.6 format */</span>
origin.y = 0;

error = FT_Glyph_To_Bitmap(
          &amp;glyph,
          <em>render_mode</em>,
          &amp;origin,
          1 );          <span class="comment">/* destroy original image == true */</span></pre>

          <p>Some notes.</p>

          <ul>
            <li>The first parameter is the address of the source
              glyph's handle.  When the function is called, it reads
              it to access the source glyph object.  After the call,
              the handle points to a <em>new</em> glyph object that
              contains the rendered bitmap.</li>

            <li>The second parameter is a standard render mode to
              specify what kind of bitmap we want.  For example, it
              can be <code>FT_RENDER_MODE_DEFAULT</code> for an 8-bit
              anti-aliased pixmap, or <code>FT_RENDER_MODE_MONO</code>
              for a 1-bit monochrome bitmap.</li>

            <li>The third parameter is a pointer to a two-dimensional
              vector to translate the source glyph image before the
              conversion.  After the call, the source image is
              translated back to its original position (and is thus
              left unchanged).  If you do not need to translate the
              source glyph before rendering, set this pointer
              to NULL.</li>

            <li>The last parameter is a boolean that indicates whether
              the source glyph object should be destroyed by the
              function.  If false, the original glyph object is never
              destroyed, even if its handle is lost (it is up to
              client applications to keep it).</li>
          </ul>

          <p>The new glyph object always contains a bitmap (if no
            error is returned), and you must <em>typecast</em> its
            handle to the <code>FT_BitmapGlyph</code> type in order to
            access its content.  This type is a sort of
            &lsquo;subclass&rsquo; of <code>FT_Glyph</code> that
            contains additional fields
            (see <a href="../reference/ft2-glyph_management.html#FT_BitmapGlyphRec"><code>FT_BitmapGlyphRec</code></a>).</p>

          <dl>
            <dt>left</dt>
            <dd>Just like the <code>bitmap_left</code> field of a
              glyph slot, this is the horizontal distance from the
              glyph origin (0,0) to the leftmost pixel of the glyph
              bitmap.  It is expressed in integer pixels.</dd>

            <dt>top</dt>
            <dd>Just like the <code>bitmap_top</code> field of a glyph
              slot, this is the vertical distance from the glyph
              origin (0,0) to the topmost pixel of the glyph bitmap
              (more precise, to the pixel just above the bitmap).
              This distance is expressed in integer pixels, and is
              positive for upwards&nbsp;y.</dd>

            <dt>bitmap</dt>
            <dd>This is a bitmap descriptor for the glyph object, just
              like the <code>bitmap</code> field in a glyph slot.</dd>
          </dl>


          <h3 id="section-3">3. Global Glyph Metrics</h3>

          <p>Unlike glyph metrics, global metrics are used to describe
            distances and features of a whole font face.  They can be
            expressed either in 26.6 pixel format or in (unscaled)
            font units for scalable formats.</p>

          <h4> a. Design global metrics</h4>

          <p>For scalable formats, all global metrics are expressed in
            font units in order to be later scaled to the device
            space, according to the rules described in the last
            section of this tutorial part.  You can access them
            directly as fields of an <code>FT_Face</code> handle.</p>

          <p>However, you need to check that the font face's format is
            scalable before using them.  One can do it with
            macro <code>FT_IS_SCALABLE</code>, which returns true when
            appropriate.</p>

          <p>Here a table of the global design metrics for scalable
            faces.</p>

          <dl>
            <dt>units_per_EM</dt>
            <dd>This is the size of the EM square for the font face.
              It is used by scalable formats to scale design
              coordinates to device pixels, as described in the last
              section of this tutorial part.  Its value usually is
              2048 (for TrueType) or 1000 (for Type&nbsp;1 or CFF),
              but other values are possible, too.  It is set to&nbsp;1
              for fixed-size formats like FNT, FON, PCF, or BDF.</dd>

            <dt>bbox</dt>
            <dd>The global bounding box is defined as the smallest
              rectangle that can enclose all the glyphs in a font
              face.</dd>

            <dt>ascender</dt>
            <dd>The ascender is the vertical distance from the
              horizontal baseline to the highest
              &lsquo;character&rsquo; coordinate in a font face.
              Unfortunately, font formats don't define the ascender in
              a uniform way.  For some formats, it represents the
              ascent of all capital latin characters (without
              accents), for others it is the ascent of the highest
              accented character, and finally, other formats define it
              as being equal to <code>bbox.yMax</code>.</dd>

            <dt>descender</dt>
            <dd>The descender is the vertical distance from the
              horizontal baseline to the lowest
              &lsquo;character&rsquo; coordinate in a font face.
              Unfortunately, font formats don't define the descender
              in a uniform way.  For some formats, it represents the
              descent of all capital latin characters (without
              accents), for others it is the ascent of the lowest
              accented character, and finally, other formats define it
              as being equal to <code>bbox.yMin</code>.  This field is
              negative for values below the baseline.</dd>

            <dt>height</dt>
            <dd>This field represents a <em>default line spacing</em>
              (i.e., the baseline-to-baseline distance) when writing
              text with this font.  Note that it usually is larger
              than the sum of the ascender and descender taken as
              absolute values.  There is also no guarantee that no
              glyphs extend above or below subsequent baselines when
              using this distance &ndash; think of it as a value the
              designer of the font finds appropriate.</dd>

            <dt>max_advance_width</dt>
            <dd>This field gives the maximum horizontal cursor advance
              for all glyphs in the font.  It can be used to quickly
              compute the maximum advance width of a string of
              text.  <em>It doesn't correspond to the maximum glyph
                image width!</em></dd>

            <dt>max_advance_height</dt>
            <dd>Same as <code>max_advance_width</code> but for
              vertical text layout.</dd>

            <dt>underline_position</dt>
            <dd>When displaying or rendering underlined text, this
              value corresponds to the vertical position, relative to
              the baseline, of the underline bar's center.  It is
              negative if it is below the baseline.</dd>

            <dt>underline_thickness</dt>
            <dd>When displaying or rendering underlined text, this
              value corresponds to the vertical thickness of the
              underline.</dd>
          </dl>

          <p>Notice that the values of the ascender and the descender
            are not reliable (due to various discrepancies in font
            formats), unfortunately.</p>

          <h4>b. Scaled Global Metrics</h4>

          <p>Each size object also contains a scaled version of some
            of the global metrics described above, to be directly
            accessed through
            the <code>face-&gt;size-&gt;metrics</code> structure (of
            type <a href="../reference/ft2-base_interface.html#FT_Size_Metrics">
              <code>FT_Size_Metrics</code></a>).  <em>No grid-fitting
            is performed for those values</em>.  They are also
            completely independent of any hinting process.  In other
            words, don't rely on them to get exact metrics at the
            pixel level.  They are expressed in 26.6 pixel format but
            rounded for historical reasons.</p>

          <dl>
            <dt>ascender</dt>
            <dd>The scaled version of the original design ascender;
              rounded up to an integer value.</dd>

            <dt>descender</dt>
            <dd>The scaled version of the original design descender,
              rounded down to an integer value.</dd>

            <dt>height</dt>
            <dd>
              <p>The scaled version of the original design text height
                (the vertical distance from one baseline to the next).
                This is probably the only field you should really use
                in this structure.  It is rounded to an integer
                value.</p>

              <p>Be careful not to confuse it with the
                &lsquo;height&rsquo; field in
                the <a href="../reference/ft2-base_interface.html#FT_Glyph_Metrics"><code>FT_Glyph_Metrics</code></a>
                structure.</p>
            </dd>

            <dt>max_advance</dt>
            <dd>The scaled version of the original design maximum
              advance, rounded to an integer value.</dd>
          </dl>

          <p>Note that the <code>face-&gt;size-&gt;metrics</code>
            structure contains other fields that are used to scale
            design coordinates to device space.  They are described in
            the last section.</p>

          <h4>c. Kerning</h4>

          <p>Kerning is the process of adjusting the position of two
            subsequent glyph images in a string of text in order to
            improve the general appearance of text.  For example, if a
            glyph for an uppercase &lsquo;A&rsquo; is followed by a
            glyph for an uppercase &lsquo;V&rsquo;, the space between
            the two glyphs can be slightly reduced to avoid extra
            &lsquo;diagonal whitespace&rsquo;.</p>

          <p>Note that in theory kerning can happen both in the
            horizontal and vertical direction between two glyphs;
            however, it only happens in a single direction in nearly
            all cases.</p>

          <p>Not all font formats contain kerning information, and not
            all kerning formats are supported by FreeType; in
            particular, for TrueType fonts, the API can only access
            kerning via the &lsquo;kern&rsquo;
            table.  <span class="important">OpenType kerning via the
            &lsquo;GPOS&rsquo; table is not supported!</span>  You
            need a higher-level library
            like <a href="http://www.harfbuzz.org">HarfBuzz</a>,
            <a href="http://www.pango.org">Pango</a>,
            or <a href="http://www.icu-project.org">ICU</a>, since
            GPOS kerning requires contextual string handling.</p>

          <p>Sometimes, the font file is associated with an additional
            file that contains various glyph metrics, including
            kerning, but no glyph images.  A good example is the
            Type&nbsp;1 format where glyph images are stored in files
            with extension <code>.pfa</code> or <code>.pfb</code>,
            while kerning metrics can be found in files with extension
            <code>.afm</code> or <code>.pfm</code>.</p>

          <p>FreeType&nbsp;2 allows you to deal with this, by
            providing
            the <a href="../reference/ft2-base_interface.html#FT_Attach_File"><code>FT_Attach_File</code></a>
            and <a href="../reference/ft2-base_interface.html#FT_Attach_Stream"><code>FT_Attach_Stream</code></A>
            APIs.  Both functions are used to load additional metrics
            into a face object by reading them from an additional
            format-specific file.  Here an example, opening a
            Type&nbsp;1 font.</p>

          <pre>
error = FT_New_Face( library, "/usr/share/fonts/cour.pfb",
                     0, &amp;face );
if ( error ) { ... }

error = FT_Attach_File( face, "/usr/share/fonts/cour.afm" );
if ( error )
{ ... could not read kerning and additional metrics ... }</pre>

          <p>Note that <code>FT_Attach_Stream</code> is similar to
            <code>FT_Attach_File</code> except that it doesn't take a
            C&nbsp;string to name the extra file but
            an <a href="../reference/ft2-system_interface.html#FT_StreamRec"><code>FT_Stream</code></a>
            handle.  Also, <em>reading a metrics file is in no way
            mandatory</em>.</p>

          <p>Finally, the file attachment APIs are very generic and
            can be used to load any kind of extra information for a
            given face.  The nature of the additional content is
            entirely font format specific.</p>

          <p>FreeType&nbsp;2 allows you to retrieve the kerning
            information between two glyphs through
            the <a href="../reference/ft2-base_interface.html#FT_Get_Kerning"><code>FT_Get_Kerning</code></a>
            function.</p>

          <pre>
FT_Vector  kerning;


...
error = FT_Get_Kerning( face,          <span class="comment">/* handle to face object */</span>
                        left,          <span class="comment">/* left glyph index      */</span>
                        right,         <span class="comment">/* right glyph index     */</span>
                        <em>kerning_mode</em>,  <span class="comment">/* kerning mode          */</span>
                        &amp;kerning );    <span class="comment">/* target vector         */</span></pre>

          <p>This function takes a handle to a face object, the
            indices of the left and right glyph for which the kerning
            value is desired, an integer, called the <em>kerning
            mode</em>, and a pointer to a destination vector that
            receives the corresponding distances.</p>

          <p>The kerning mode is very similar to the <em>bbox
            mode</em> described in a previous section.  It is a
            enumeration that indicates how the kerning distances are
            expressed in the target vector.</p>

          <p>The default value is <code>FT_KERNING_DEFAULT</code>,
            which has value&nbsp;0.  It corresponds to kerning
            distances expressed in 26.6 grid-fitted pixels (which
            means that the values are multiples of 64).  For scalable
            formats, this means that the design kerning distance is
            scaled, then rounded.</p>

          <p>The value <code>FT_KERNING_UNFITTED</code> corresponds to
            kerning distances expressed in 26.6 unfitted pixels (i.e.,
            that do not correspond to integer coordinates).  It is the
            design kerning distance that is scaled without
            rounding.</p>

          <p>Finally, the value <code>FT_KERNING_UNSCALED</code>
            indicates to return the design kerning distance, expressed
            in font units.  You can later scale it to the device space
            using the computations explained in the last section of
            this part.</p>

          <p>Note that the &lsquo;left&rsquo; and &lsquo;right&rsquo;
            positions correspond to the <em>visual order</em> of the
            glyphs in the string of text.  This is important for
            bidirectional or right-to-left text.</p>


          <h3 id="section-4">4. Simple Text Rendering: Kerning and Centering</h3>

          <p>In order to show off what we have just learned, we now
            demonstrate how to modify
            the <a href="step1.html#basic-code">example code</a> that
            was provided in part&nbsp;I to render a string of text,
            and enhance it to support kerning and delayed
            rendering.</p>

          <h4>a. Kerning Support</h4>

          <p>Adding support for kerning to our code is trivial, as
            long as we consider that we are still dealing with a
            left-to-right script like Latin.  We simply need to
            retrieve the kerning distance between two glyphs in order
            to alter the pen position appropriately.</p>

          <pre>
FT_GlyphSlot  slot = face-&gt;glyph;  <span class="comment">/* a small shortcut */</span>
FT_UInt       glyph_index;
FT_Bool       use_kerning;
FT_UInt       previous;
int           pen_x, pen_y, n;


... initialize library ...
... create face object ...
... set character size ...

pen_x = 300;
pen_y = 200;

use_kerning = FT_HAS_KERNING( face );
previous    = 0;

for ( n = 0; n &lt; num_chars; n++ )
{
  <span class="comment">/* convert character code to glyph index */</span>
  glyph_index = FT_Get_Char_Index( face, text[n] );

  <span class="comment">/* retrieve kerning distance and move pen position */</span>
  if ( use_kerning &amp;&amp; previous &amp;&amp; glyph_index )
  {
    FT_Vector  delta;


    FT_Get_Kerning( face, previous, glyph_index,
                    FT_KERNING_DEFAULT, &amp;delta );

    pen_x += delta.x &gt;&gt; 6;
  }

  <span class="comment">/* load glyph image into the slot (erase previous one) */</span>
  error = FT_Load_Glyph( face, glyph_index, FT_LOAD_RENDER );
  if ( error )
    continue;  <span class="comment">/* ignore errors */</span>

  <span class="comment">/* now draw to our target surface */</span>
  my_draw_bitmap( &amp;slot-&gt;bitmap,
                  pen_x + slot-&gt;bitmap_left,
                  pen_y - slot-&gt;bitmap_top );

  <span class="comment">/* increment pen position */</span>
  pen_x += slot->advance.x &gt;&gt; 6;

  <span class="comment">/* record current glyph index */</span>
  previous = glyph_index;
}</pre>

          <p>We are done.  Some notes.</p>

          <ul>
            <li>As kerning is determined by glyph indices, we need to
              explicitly convert our character codes into glyph
              indices, then later call <code>FT_Load_Glyph</code>
              instead of <code>FT_Load_Char</code>.</li>

            <li>We use a boolean named <code>use_kerning</code>, which
              is set to the result of the
              macro <code>FT_HAS_KERNING</code>.  It is certainly
              faster not to call <code>FT_Get_Kerning</code> when we
              know that the font face does not contain kerning
              information.</li>

            <li>We move the position of the pen <em>before</em> a new
              glyph is drawn.</li>

            <li>We initialize the variable <code>previous</code> with
              the value&nbsp;0, which always corresponds to the
              &lsquo;missing glyph&rsquo; (also
              called <code>.notdef</code> in the PostScript world).
              There is never any kerning distance associated with this
              glyph.</li>

            <li>We do not check the error code returned by
              <code>FT_Get_Kerning</code>.  This is because the
              function always sets the content of <code>delta</code>
              to (0,0) if an error occurs.</li>
          </ul>

          <h4>b. Centering</h4>

          <p>Our code begins to become interesting but it is still a
            bit too simple for normal use.  For example, the position
            of the pen is determined before we do the rendering;
            normally, you would rather determine the layout of the
            text and measure it before computing its final position
            (centering, etc.), or perform things like
            word-wrapping.</p>

          <p>Let us now decompose our text rendering function into two
            distinct but successive parts: The first one positions
            individual glyph images on the baseline, while the second
            one renders the glyphs.  As we will see, this has many
            advantages.</p>

          <p>We thus start by storing individual glyph images, as well
            as their position on the baseline.</p>

          <pre>
FT_GlyphSlot  slot = face-&gt;glyph;   <span class="comment">/* a small shortcut */</span>
FT_UInt       glyph_index;
FT_Bool       use_kerning;
FT_UInt       previous;
int           pen_x, pen_y, n;

FT_Glyph      glyphs[MAX_GLYPHS];   <span class="comment">/* glyph image    */</span>
FT_Vector     pos   [MAX_GLYPHS];   <span class="comment">/* glyph position */</span>
FT_UInt       num_glyphs;


... initialize library ...
... create face object ...
... set character size ...

pen_x = 0;   <span class="comment">/* start at (0,0) */</span>
pen_y = 0;

num_glyphs  = 0;
use_kerning = FT_HAS_KERNING( face );
previous    = 0;

for ( n = 0; n &lt; num_chars; n++ )
{
  <span class="comment">/* convert character code to glyph index */</span>
  glyph_index = FT_Get_Char_Index( face, text[n] );

  <span class="comment">/* retrieve kerning distance and move pen position */</span>
  if ( use_kerning &amp;&amp; previous &amp;&amp; glyph_index )
  {
    FT_Vector  delta;


    FT_Get_Kerning( face, previous, glyph_index,
                    FT_KERNING_DEFAULT, &amp;delta );

    pen_x += delta.x &gt;&gt; 6;
  }

  <span class="comment">/* store current pen position */</span>
  pos[num_glyphs].x = pen_x;
  pos[num_glyphs].y = pen_y;

  <span class="comment">/* load glyph image into the slot without rendering */</span>
  error = FT_Load_Glyph( face, glyph_index, FT_LOAD_DEFAULT );
  if ( error )
    continue;  <span class="comment">/* ignore errors, jump to next glyph */</span>

  <span class="comment">/* extract glyph image and store it in our table */</span>
  error = FT_Get_Glyph( face-&gt;glyph, &amp;glyphs[num_glyphs] );
  if ( error )
    continue;  <span class="comment">/* ignore errors, jump to next glyph */</span>

  <span class="comment">/* increment pen position */</span>
  pen_x += slot->advance.x &gt;&gt; 6;

  <span class="comment">/* record current glyph index */</span>
  previous = glyph_index;

  <span class="comment">/* increment number of glyphs */</span>
  num_glyphs++;
}</pre>

          <p>This is a very slight variation of our previous code; we
            extract each glyph image from the slot, then store it,
            along with the corresponding position, in our tables.</p>

          <p>Note also that <code>pen_x</code> contains the total
            advance for the string of text.  We can now compute the
            bounding box of the text string with a simple
            function.</p>

          <pre>
void  compute_string_bbox( FT_BBox  *abbox )
{
  FT_BBox  bbox;
  FT_BBox  glyph_bbox;


  <span class="comment">/* initialize string bbox to "empty" values */</span>
  bbox.xMin = bbox.yMin =  32000;
  bbox.xMax = bbox.yMax = -32000;

  <span class="comment">/* for each glyph image, compute its bounding box, */</span>
  <span class="comment">/* translate it, and grow the string bbox          */</span>
  for ( n = 0; n &lt; num_glyphs; n++ )
  {
    FT_Glyph_Get_CBox( glyphs[n], ft_glyph_bbox_pixels,
                       &amp;glyph_bbox );

    glyph_bbox.xMin += pos[n].x;
    glyph_bbox.xMax += pos[n].x;
    glyph_bbox.yMin += pos[n].y;
    glyph_bbox.yMax += pos[n].y;

    if ( glyph_bbox.xMin &lt; bbox.xMin )
      bbox.xMin = glyph_bbox.xMin;

    if ( glyph_bbox.yMin &lt; bbox.yMin )
      bbox.yMin = glyph_bbox.yMin;

    if ( glyph_bbox.xMax &gt; bbox.xMax )
      bbox.xMax = glyph_bbox.xMax;

    if ( glyph_bbox.yMax &gt; bbox.yMax )
      bbox.yMax = glyph_bbox.yMax;
  }

  <span class="comment">/* check that we really grew the string bbox */</span>
  if ( bbox.xMin &gt; bbox.xMax )
  {
    bbox.xMin = 0;
    bbox.yMin = 0;
    bbox.xMax = 0;
    bbox.yMax = 0;
  }

  <span class="comment">/* return string bbox */</span>
  *abbox = bbox;
}</pre>

          <p>The resulting bounding box dimensions are expressed in
            integer pixels and can then be used to compute the final
            pen position before rendering the string.</p>

          <p class="warning">In general, the above function
            does <em>not</em> compute an exact bounding box of a
            string!  As soon as hinting is involved, glyph
            dimensions <em>must</em> be derived from the resulting
            outlines.  For anti-aliased pixmaps,
            <code>FT_Outline_Get_BBox</code> then yields proper
            results.  In case you need 1-bit monochrome bitmaps, it is
            even necessary to actually render the glyphs because the
            rules for the conversion from outline to bitmap can also
            be controlled by hinting instructions
            (cf. <a href="https://www.microsoft.com/typography/TrueTypeScanConversion.mspx">dropout
            control</a>).</p>

          <pre>
<span class="comment">/* compute string dimensions in integer pixels */</span>
string_width  = string_bbox.xMax - string_bbox.xMin;
string_height = string_bbox.yMax - string_bbox.yMin;

<span class="comment">/* compute start pen position in 26.6 Cartesian pixels */</span>
start_x = ( ( my_target_width  - string_width  ) / 2 ) * 64;
start_y = ( ( my_target_height - string_height ) / 2 ) * 64;

for ( n = 0; n &lt; num_glyphs; n++ )
{
  FT_Glyph   image;
  FT_Vector  pen;


  image = glyphs[n];

  pen.x = start_x + pos[n].x;
  pen.y = start_y + pos[n].y;

  error = FT_Glyph_To_Bitmap( &amp;image, FT_RENDER_MODE_NORMAL,
                              &amp;pen, 0 );
  if ( !error )
  {
    FT_BitmapGlyph  bit = (FT_BitmapGlyph)image;


    my_draw_bitmap( bit-&gt;bitmap,
                    bit-&gt;left,
                    my_target_height - bit-&gt;top );

    FT_Done_Glyph( image );
  }
}</pre>

          <p>Some remarks.</p>

          <ul>
            <li>The pen position is expressed in the Cartesian space
              (i.e., y&nbsp;upwards).</li>

            <li>We call <code>FT_Glyph_To_Bitmap</code> with
              the <code>destroy</code> parameter set to&nbsp;0
              (false), in order to avoid destroying the original glyph
              image.  The new glyph bitmap is accessed through
              <code>image</code> after the call and is typecast to
              <code>FT_BitmapGlyph</code>.</li>

            <li>We use translation when
              calling <code>FT_Glyph_To_Bitmap</code>.  This ensures
              that the <code>left</code> and <code>top</code> fields
              of the bitmap glyph object are already set to the
              correct pixel coordinates in the Cartesian space.</li>

            <li>Of course, we still need to convert pixel coordinates
              from Cartesian to device space before rendering, hence
              the <code>my_target_height - bitmap->top</code> in the
              call to <code>my_draw_bitmap</code>.</li>
          </ul>

          <p>The same loop can be used to render the string anywhere
            on our display surface, without the need to reload our
            glyph images each time.</p>


          <h3 id="section-5">5. Advanced Text Rendering:
            Transformation and Centering and Kerning</h3>

          <p>We are now going to modify our code in order to be able
            to easily transform the rendered string, for example, to
            rotate it.  First, some minor improvements.</p>

          <h4>a. Packing and Translating Glyphs</h4>

          <p>We start by packing the information related to a single
            glyph image into a single structure instead of parallel
            arrays.</p>

          <pre>
typedef struct  TGlyph_
{
  FT_UInt    index;  <span class="comment">/* glyph index                  */</span>
  FT_Vector  pos;    <span class="comment">/* glyph origin on the baseline */</span>
  FT_Glyph   image;  <span class="comment">/* glyph image                  */</span>

} TGlyph, *PGlyph;</pre>

          <p>We also translate each glyph image directly after it is
            loaded to its position on the baseline at load time.  As
            we will see, this has several advantages.  Here is our new
            glyph sequence loader.</p>

          <pre>
FT_GlyphSlot  slot = face-&gt;glyph;  <span class="comment">/* a small shortcut */</span>
FT_UInt       glyph_index;
FT_Bool       use_kerning;
FT_UInt       previous;
int           pen_x, pen_y, n;

TGlyph        glyphs[MAX_GLYPHS];  <span class="comment">/* glyphs table */</span>
PGlyph        glyph;               <span class="comment">/* current glyph in table */</span>
FT_UInt       num_glyphs;


... initialize library ...
... create face object ...
... set character size ...

pen_x = 0;   <span class="comment">/* start at (0,0) */</span>
pen_y = 0;

num_glyphs  = 0;
use_kerning = FT_HAS_KERNING( face );
previous    = 0;

glyph = glyphs;
for ( n = 0; n &lt; num_chars; n++ )
{
  glyph-&gt;index = FT_Get_Char_Index( face, text[n] );

  if ( use_kerning &amp;&amp; previous &amp;&amp; glyph->index )
  {
    FT_Vector  delta;


    FT_Get_Kerning( face, previous, glyph-&gt;index,
                    FT_KERNING_MODE_DEFAULT, &amp;delta );

    pen_x += delta.x &gt;&gt; 6;
  }

  <span class="comment">/* store current pen position */</span>
  glyph->pos.x = pen_x;
  glyph->pos.y = pen_y;

  error = FT_Load_Glyph( face, glyph_index, FT_LOAD_DEFAULT );
  if ( error ) continue;

  error = FT_Get_Glyph( face-&gt;glyph, &amp;glyph-&gt;image );
  if ( error ) continue;

  <span class="comment">/* translate the glyph image now */</span>
  FT_Glyph_Transform( glyph-&gt;image, 0, &amp;glyph-&gt;pos );

  pen_x   += slot->advance.x &gt;&gt; 6;
  previous = glyph->index;

  <span class="comment">/* increment number of glyphs */</span>
  glyph++;
}

<span class="comment">/* count number of glyphs loaded */</span>
num_glyphs = glyph - glyphs;</pre>

          <p>Note that translating glyphs now has several advantages.
            The first one is that we don't need to translate the glyph
            bbox when we compute the string's bounding box.</p>

          <pre>
void  compute_string_bbox( FT_BBox  *abbox )
{
  FT_BBox  bbox;


  bbox.xMin = bbox.yMin =  32000;
  bbox.xMax = bbox.yMax = -32000;

  for ( n = 0; n &lt; num_glyphs; n++ )
  {
    FT_BBox  glyph_bbox;


    FT_Glyph_Get_CBox( glyphs[n], ft_glyph_bbox_pixels,
                       &amp;glyph_bbox );

    if (glyph_bbox.xMin &lt; bbox.xMin)
      bbox.xMin = glyph_bbox.xMin;

    if (glyph_bbox.yMin &lt; bbox.yMin)
      bbox.yMin = glyph_bbox.yMin;

    if (glyph_bbox.xMax &gt; bbox.xMax)
      bbox.xMax = glyph_bbox.xMax;

    if (glyph_bbox.yMax &gt; bbox.yMax)
      bbox.yMax = glyph_bbox.yMax;
  }

  if ( bbox.xMin > bbox.xMax )
  {
    bbox.xMin = 0;
    bbox.yMin = 0;
    bbox.xMax = 0;
    bbox.yMax = 0;
  }

  *abbox = bbox;
}</pre>

          <p>With the above modifications,
            the <code>compute_string_bbox</code> function can now
            compute the bounding box of a transformed glyph string,
            which allows further code simplications.</p>

          <pre>
FT_BBox    bbox;
FT_Matrix  matrix;
FT_Vector  delta;


... load glyph sequence ...
... set up `matrix' and `delta' ...

<span class="comment">/* transform glyphs */</span>
for ( n = 0; n &lt; num_glyphs; n++ )
  FT_Glyph_Transform( glyphs[n].image, &amp;matrix, &amp;delta );

<span class="comment">/* compute bounding box of transformed glyphs */</span>
compute_string_bbox( &amp;bbox );</pre>

          <h4>b. Rendering a Transformed Glyph Sequence</h4>

          <p>However, directly transforming the glyphs in our sequence
            is not a good idea if we want to reuse them in order to
            draw the text string with various angles or
            transformations.  It is better to perform the affine
            transformation just before the glyph is rendered.</p>

          <pre>
FT_Vector  start;
FT_Matrix  matrix;

FT_Glyph   image;
FT_Vector  pen;
FT_BBox    bbox;


<span class="comment">/* get bbox of original glyph sequence */</span>
compute_string_bbox( &amp;string_bbox );

<span class="comment">/* compute string dimensions in integer pixels */</span>
string_width  = (string_bbox.xMax - string_bbox.xMin) / 64;
string_height = (string_bbox.yMax - string_bbox.yMin) / 64;

<span class="comment">/* set up start position in 26.6 Cartesian space */</span>
start.x = ( ( my_target_width  - string_width  ) / 2 ) * 64;
start.y = ( ( my_target_height - string_height ) / 2 ) * 64;

<span class="comment">/* set up transform (a rotation here) */</span>
matrix.xx = (FT_Fixed)( cos( angle ) * 0x10000L );
matrix.xy = (FT_Fixed)(-sin( angle ) * 0x10000L );
matrix.yx = (FT_Fixed)( sin( angle ) * 0x10000L );
matrix.yy = (FT_Fixed)( cos( angle ) * 0x10000L );

pen = start;

for ( n = 0; n &lt; num_glyphs; n++ )
{
  <span class="comment">/* create a copy of the original glyph */</span>
  error = FT_Glyph_Copy( glyphs[n].image, &amp;image );
  if ( error ) continue;

  <span class="comment">/* transform copy (this will also translate it to the */</span>
  <span class="comment">/* correct position                                   */</span>
  FT_Glyph_Transform( image, &amp;matrix, &amp;pen );

  <span class="comment">/* check bounding box; if the transformed glyph image      */</span>
  <span class="comment">/* is not in our target surface, we can avoid rendering it */</span>
  FT_Glyph_Get_CBox( image, ft_glyph_bbox_pixels, &amp;bbox );
  if ( bbox.xMax &lt;= 0 || bbox.xMin &gt;= my_target_width  ||
       bbox.yMax &lt;= 0 || bbox.yMin &gt;= my_target_height )
    continue;

  <span class="comment">/* convert glyph image to bitmap (destroy the glyph copy!) */</span>
  error = FT_Glyph_To_Bitmap(
            &amp;image,
            FT_RENDER_MODE_NORMAL,
            0,                  <span class="comment">/* no additional translation */</span>
            1 );                <span class="comment">/* destroy copy in "image"   */</span>
  if ( !error )
  {
    FT_BitmapGlyph  bit = (FT_BitmapGlyph)image;


    my_draw_bitmap( bit-&gt;bitmap,
                    bit-&gt;left,
                    my_target_height - bit-&gt;top );

    <span class="comment">/* increment pen position --                       */</span>
    <span class="comment">/* we don't have access to a slot structure,       */</span>
    <span class="comment">/* so we have to use advances from glyph structure */</span>
    <span class="comment">/* (which are in 16.16 fixed float format)         */</span>
    pen.x += image.advance.x >> 10;
    pen.y += image.advance.y >> 10;

    FT_Done_Glyph( image );
  }
}</pre>

          <p>There are a few changes compared to the original version
            of this code.</p>

          <ul>
            <li>We keep the original glyph images untouched; instead,
              we transform a copy.</li>

            <li>We perform clipping computations in order to avoid
              rendering and drawing glyphs that are not within our
              target surface.</li>

            <li>We always destroy the copy when calling
              <code>FT_Glyph_To_Bitmap</code> in order to get rid of
              the transformed scalable image.  Note that the image is
              not destroyed if the function returns an error code
              (which is why <code>FT_Done_Glyph</code> is only called
              within the compound statement).</li>

            <li>The translation of the glyph sequence to the start pen
              position is integrated into the call
              to <code>FT_Glyph_Transform</code> instead
              of <code>FT_Glyph_To_Bitmap</code>.</li>
          </ul>

          <p>It is possible to call this function several times to
            render the string with different angles, or even change
            the way <code>start</code> is computed in order to move it
            to different place.</p>

          <p>This code is the basis of the FreeType&nbsp;2
            demonstration program
            named <a href="http://git.savannah.gnu.org/cgit/freetype/freetype2-demos.git/tree/src/ftstring.c"><code>ftstring.c</code></a>.
            It could be easily extended to perform advanced text
            layout or word-wrapping in the first part, without
            changing the second one.</p>

          <p>Note, however, that a normal implementation would use a
            glyph cache in order to reduce memory needs.  For example,
            let us assume that our text string is
            &lsquo;FreeType&rsquo;.  We would store three identical
            glyph images in our table for the letter &lsquo;e&rsquo;,
            which isn't optimal (especially when you consider longer
            lines of text, or even whole pages).</p>

          <p>A FreeType demo program that shows how glyph caching can
            be implemented
            is <a href="http://git.savannah.gnu.org/cgit/freetype/freetype2-demos.git/tree/src/ftview.c"><code>ftview.c</code></a>.
            In general, &lsquo;ftview&rsquo; is the main program used
            by the FreeType developer team to check the validity of
            loading, parsing, and rendering fonts.</p>

          <p>Another very useful demo program
            is <a href="http://git.savannah.gnu.org/cgit/freetype/freetype2-demos.git/tree/src/ftdiff.c"><code>ftdiff.c</code></a>,
            demonstrating the use and the optical results of the
            various rendering and hinting modes provided by FreeType.
            In particular, it also demonstrates how to do sub-pixel
            positioning (for unhinted glyphs and &lsquo;light&rsquo;
            hinting mode) &ndash; all code in this tutorial assumes
            integer coordinates.</p>


          <h3 id="section-6">6. Accessing Metrics in Design Font
            Units, and Scaling Them</h3>

          <p>Scalable font formats usually store a single vectorial
            image, called an <em>outline</em>, for each glyph in a
            face.  Each outline is defined in an abstract grid called
            the <em>design space</em>, with coordinates expressed in
            <em>font units</em>.  When a glyph image is loaded, the
            font driver usually scales the outline to device space
            according to the current character pixel size found in
            an <a href="../reference/ft2-base_interface.html#FT_Size"><code>FT_Size</code></a>
            object.  The driver may also modify the scaled outline in
            order to significantly improve its appearance on a
            pixel-based surface (a process known as <em>hinting</em>
            or <em>grid-fitting</em>).</p>

          <p>This section describes how design coordinates are scaled
            to the device space, and how to read glyph outlines and
            metrics in font units.  This is important for a number of
            things.</p>

          <ul>
            <li>&lsquo;True&rsquo; WYSIWYG text layout.</li>
            <li>Accessing font content for conversion or analysis
              purposes.</li>
          </ul>

          <h4>a. Scaling Distances to Device Space</h4>

          <p>Design coordinates are scaled to the device space using a
            simple scaling transformation whose coefficients are
            computed with the help of the <em>character pixel
            size</em>.</p>

          <pre class="example">
  device_x = design_x * x_scale
  device_y = design_y * y_scale

  x_scale  = pixel_size_x / EM_size
  y_scale  = pixel_size_y / EM_size</pre>

          <p>Here, the value <code>EM_size</code> is font-specific and
            corresponds to the size of an abstract square of the
            design space (called the <em>EM</em>), which is used by
            font designers to create glyph images.  It is thus
            expressed in font units.  It is also accessible directly
            for scalable font formats
            as <code>face-&gt;units_per_EM</code>.  You should check
            that a font face contains scalable glyph images by using
            the <code>FT_IS_SCALABLE</code> macro, which returns true
            if appropriate.</p>

          <p>When you call the
            function <a href="../reference/ft2-base_interface.html#FT_Set_Pixel_Sizes"><code>FT_Set_Pixel_Sizes</code></a>,
            you are specifying integer values
            of <code>pixel_size_x</code> and
            <code>pixel_size_y</code> FreeType shall use.  The library
            will immediately compute the values
            of <code>x_scale</code> and
            <code>y_scale</code>.</p>

          <p>When you call the
            function <a href="../reference/ft2-base_interface.html#FT_Set_Char_Size"><code>FT_Set_Char_Size</code></a>,
            you are specifying the character size in
            physical <em>points</em>, which is used, along with the
            device's resolutions, to compute the character pixel size
            and the corresponding scaling factors.  Here, the scaling
            factors can correspond to fractional ppem values.</p>

          <p>Note that after calling any of these two functions, you
            can access the values of the character pixel size and
            scaling factors as fields of
            the <code>face-&gt;size-&gt;metrics</code> structure.</p>

          <dl>
            <dt>x_ppem</dt>
            <dd>The field name stands for &lsquo;x&nbsp;pixels per
              EM&rsquo;; this is the horizontal size rounded to
              integer pixels of the EM square, which also is
              the <em>horizontal character pixel size</em>,
              called <code>pixel_size_x</code> in the above
              example.</dd>

            <dt>y_ppem</dt>
            <dd>The field name stands for &lsquo;y&nbsp;pixels per
              EM&rsquo;; this is the vertical size rounded to integer
              pixels of the EM square, which also is the <em>vertical
              character pixel size</em>,
              called <code>pixel_size_y</code> in the above
              example.</dd>

            <dt>x_scale</dt>
            <dd>This is a 16.16 fixed-point scale to directly scale
              horizontal distances from design space to 1/64th of
              device pixels.</dd>

            <dt>y_scale</dt>
            <dd>This is a 16.16 fixed-point scale to directly scale
              vertical distances from design space to 1/64th of device
              pixels.</dd>
          </dl>

          <p>You can scale a distance expressed in font units to 26.6
            pixel format directly with the help of
            the <a href="../reference/ft2-computations.html#FT_MulFix"><code>FT_MulFix</code></a>
            function.</p>

          <pre>
<span class="comment">/* convert design distances to 1/64th of pixels */</span>
pixels_x = FT_MulFix( design_x, face-&gt;size-&gt;metrics.x_scale );
pixels_y = FT_MulFix( design_y, face-&gt;size-&gt;metrics.y_scale );</pre>

          <p>Alternatively, you can also scale the value directly by
            using doubles.</p>

          <pre>
FT_Size_Metrics*  metrics = &amp;face-&gt;size-&gt;metrics; <span class="comment">/* shortcut */</span>
double            pixels_x, pixels_y;
double            x_scale, y_scale;


<span class="comment">/* compute floating point scale factors */</span>
x_scale = face-&gt;size-&gt;metrics.x_scale / 65536.0;
y_scale = face-&gt;size-&gt;metrics.y_scale / 65536.0;

<span class="comment">/* convert design distances to floating point pixels */</span>
pixels_x = design_x * x_scale;
pixels_y = design_y * y_scale;</pre>

          <h4>b. Accessing Design Metrics (Glyph &amp; Global)</h4>

          <p>You can access glyph metrics in font units simply by
            specifying the <code>FT_LOAD_NO_SCALE</code> bit flag
            in <code>FT_Load_Glyph</code>
            or <code>FT_Load_Char</code>.  The metrics returned
            in <code>face-&gt;glyph-&gt;metrics</code> will all be in
            font units.</p>

          <p>You can access unscaled kerning data using the
            <code>FT_KERNING_MODE_UNSCALED</code> mode.</p>

          <p>Finally, a few global metrics are available directly in
            font units as fields of the <code>FT_Face</code> handle,
            as described in <a href="#section-3">section&nbsp;3</a> of
            this part.</p>


          <h3 id="conclusion">Conclusion</h3>

          <p>This is the end of the second part of the FreeType
            tutorial.  You are now able to access glyph metrics,
            manage glyph images, and render text much more
            intelligently (kerning, measuring, transforming &amp;
            caching); this is sufficient knowledge to build a pretty
            decent text service on top of FreeType.</p>

          <p>The demo programs in the &lsquo;ft2demos&rsquo; bundle
            (especially &lsquo;ftview&rsquo;) are a kind of reference
            implementation, and are a good resource to turn to for
            answers.  They also show how to use additional features,
            such as the glyph stroker and cache.</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>
      &nbsp; <!-- separate primary from secondary entries -->
    </li>

    <li class="secondary">
      <a href="index.html">FreeType Tutorial</a>
    </li>
    <li class="tertiary">
      <a href="step1.html">Simple Glyph Loading</a>
    </li>
    <li class="tertiary">
      <a href="step2.html" class="current">Managing Glyphs</a>
    </li>
    <li class="tertiary">
      <a href="step3.html">Examples</a>
    </li>
  </ul>
</div>

</div> <!-- id="wrapper" -->

<div id="TOC-bottom">
</div>

</body>
</html>
tutorial/step3.html000064400000012614151706766400010353 0ustar00<!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 Tutorial / III</title>
</head>


<body>

<div id="top"
     class="bar">
  <h1><a href="http://freetype.org/index.html">FreeType</a>
    Tutorial&nbsp;/&nbsp;III</h1>
</div>


<div id="wrapper">

<div class="colmask leftmenu">
  <div class="colright">
    <div class="col1wrap">
      <div class="col1">


        <!-- ************************************************** -->

        <div id="examples">
          <h2>III. Examples</h2>

          <p>For completeness, here again a link to
            the <a href="example1.c">example</a> used and explained in
            the <a href="step1.html">first part of the
            tutorial</a>.</p>

          <p><a href="mailto:erik@timetrap.se">Erik Möller</a>
            contributed a very nice C++ example that shows renderer
            callbacks in action to draw a coloured glyph with a
            differently coloured outline.  The source code can be
            found <a href="example2.cpp">here</a>.</p>

          <p><a href="example3.cpp">Another example</a> demonstrates
            how to use FreeType's stand-alone B/W rasterizer,
            <tt>ftraster.c</tt>.  You need files from FreeType version
            2.3.10 or newer.</p>

          <p><a href="mailto:gsmiko@gmail.com">Róbert Márki</a>
            contributed a small
            <a href="example4.cpp">Qt demonstration program</a>
            (together with its <a href="example4.pro">qmake file</a>)
            that shows both direct rendering with a callback and
            rendering with a buffer, yielding the same result.  You
            need FreeType 2.4.3 or newer.</p>

          <p><a href="example5.cpp">Here</a> is some simple C++ code
            (contributed
            by <a href="https://www.staticjobs.com">Static Jobs
            LLC</a>) that
            uses <a href="../reference/ft2-outline_processing.html#FT_Outline_Decompose"><tt>FT_Outline_Decompose</tt></a>
            to convert a glyph outline to the SVG format.  As an
            example, here is the <a href="example5.svg">resulting
              file</a> of the call</p>

          <pre>
example5 LiberationSerif-Bold.ttf @</pre>

          <p>(you can find the Liberation font
            family <a href="https://fedorahosted.org/liberation-fonts/">here</a>).</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>
      &nbsp; <!-- separate primary from secondary entries -->
    </li>

    <li class="secondary">
      <a href="index.html">FreeType Tutorial</a>
    </li>
    <li class="tertiary">
      <a href="step1.html">Simple Glyph Loading</a>
    </li>
    <li class="tertiary">
      <a href="step2.html">Managing Glyphs</a>
    </li>
    <li class="tertiary">
      <a href="step3.html" class="current">Examples</a>
    </li>
  </ul>
</div>

</div> <!-- id="wrapper" -->

<div id="TOC-bottom">
</div>

</body>
</html>
CHANGES000064400000567656151706766400005604 0ustar00CHANGES BETWEEN 2.9 and 2.9.1

  I. IMPORTANT BUG FIXES

    - Type  1  fonts  containing   flex  features  were  not  rendered
      correctly (bug introduced in version 2.9).

    - CVE-2018-6942: Older  FreeType versions  can crash  with certain
      malformed variation fonts.

        http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-6942


  II. MISCELLANEOUS

    - Bug fix: Multiple calls to `FT_Get_MM_Var' returned garbage.

    - The base  extensions `ftlcdfil' and  `ftfntfmt' are now  part of
      the  base  module  (and  thus no  longer  configurable  in  file
      `modules.cfg').

    - Emboldening of bitmaps didn't work correctly sometimes,  showing
      various artifacts (bug introduced in version 2.8.1).

    - Use  of  the `freetype-config'  script  to  get compilation  and
      linking  options   is  deprecated   since  it   doesn't  support
      cross-compiling, among other  deficiencies.  Instead, you should
      use the `pkg-config' interface.

      The `configure'  script no longer installs  `freetype-config' by
      default.  For  backwards compatibility,  a new  configure option
      `--enable-freetype-config'   is  provided   that  reverts   this
      decision.

    - The auto-hinter script ranges have  been updated for Unicode 11.
      No support  for new scripts  have been added, however,  with the
      exception of Georgian Mtavruli.

    - Support for cmake has been improved.

    - The next  release will  remove support for  Position Independent
      Code  as  needed  by  systems that  prohibit  automatic  address
      fixups, such  as BREW.  [Compilation with  modern compilers that
      use flags like `-fPIC' or `-fPIE' is not affected.]


======================================================================

CHANGES BETWEEN 2.8.1 and 2.9

  I. IMPORTANT BUG FIXES

    - Advance width values of variation fonts were often wrong.

    - More fixes for variation font support; you should update to this
      version if you want to support them.


  II. IMPORTANT CHANGES

    - As a GSoC project, Ewald Hew extended the new (Adobe) CFF engine
      to  handle  Type  1  fonts  also,  thus  greatly  improving  the
      rendering of  this format.   This is the  new default.   The old
      engine   is  still   available   if   the  configuration   macro
      `T1_CONFIG_OPTION_OLD_ENGINE'    gets    defined;   using    the
      `hinting-engine' property  of the `type1' driver  module you can
      then switch between the two engines.

    - A new function,  `FT_Set_Named_Instance', can be used  to set or
      change the current named instance.

    - Starting  with   this  FreeType  version,   resetting  variation
      coordinates  will   return  to  the  currently   selected  named
      instance.  Previously, FreeType returned to the base font (i.e.,
      no instance set).


  III. MISCELLANEOUS

    - The `face_flags' field of the `FT_Face' structure has a new bit,
      `FT_FACE_FLAG_VARIATION', which  is set if a  variation font has
      been      altered      with      `FT_Set_MM_Design_Coordinates',
      `FT_Set_Var_Design_Coordinates',                              or
      `FT_Set_Var_Blend_Coordinates'.

    - If  the  current  face  is  a  named  instance,  the  new  macro
      `FT_IS_NAMED_INSTANCE' returns true.

    - `FT_IS_VARIATION' is  a new macro  that returns true  whenever a
      face object has  been altered by `FT_Set_MM_Design_Coordinates',
      `FT_Set_Var_Design_Coordinates',                              or
      `FT_Set_Var_Blend_Coordinates'.

    - Changing  the  design  coordinates  of  a  variation  font  with
      `FT_Set_Var_Design_Coordinates'                               or
      `FT_Set_Var_Blend_Coordinates'  does  not  influence  the  named
      instance index value (only `FT_Set_Named_Instance' does that).

    - Special PostScript  names for named instances  are only returned
      if the  named instance is set  with `FT_Set_Named_Instance' (and
      the font  has corresponding  entries in  its `fvar'  table).  If
      `FT_IS_VARIATION'  returns  true,  the  algorithmically  derived
      PostScript name is provided, not  looking up special entries for
      named instances.

    - A new function  `FT_Done_MM_Var' is provided to  free the memory
      returned in a call to `FT_Get_MM_Var'.

    - On  platforms  using  the   `configure'  script,  the  installed
      `ftoption.h' file  now correctly reflects  configuration options
      like `--with-harfbuzz'.

    - Better  support to  build FreeType  as  a DLL  on Windows  using
      Visual C.

    - All data specific to driver modules is now collected in a single
      file,      `FT_DRIVER_H'.      Consequently,      the     macros
      `FT_AUTOHINTER_H',   `FT_CFF_DRIVER_H',  `FT_TRUETYPE_DRIVER_H',
      and `FT_PCF_DRIVER_H' still work but are deprecated.

    - Some fuzzer fixes to better reject malformed fonts.

    - The `ftbench' demo program has a new test for opening a new face
      and loading some glyphs.

    - The `ftbench' demo program has a  new option `-j' to specify the
      last glyph index to be used in the tests.

    - The  `ftgrid' demo  program has  a new  option `-n'  to suppress
      display of named instances of variation fonts.

    - The `ttdebug' demo program can now  show a stack trace (key `K')
      and switch  between hexadecimal and decimal  display of integers
      (key `I').


======================================================================

CHANGES BETWEEN 2.8 and 2.8.1

  I. IMPORTANT BUG FIXES

    - B/W  hinting   of  TrueType   fonts  didn't  work   properly  if
      interpreter version 38 or 40 was selected.

    - Some severe  problems within the handling  of TrueType Variation
      Fonts were found and fixed.

    - Function `FT_Set_Var_Design_Coordinates' didn't correctly handle
      the case with less input coordinates than axes.


  II. IMPORTANT CHANGES

    - By  default,  FreeType  now offers  high  quality  LCD-optimized
      output without  resorting to ClearType techniques  of resolution
      tripling and  filtering.  In  this method, called  Harmony, each
      color channel  is generated separately after  shifting the glyph
      outline, capitalizing  on the fact  that the color grids  on LCD
      panels  are shifted  by  a third  of a  pixel.   This output  is
      indistinguishable from ClearType with a light 3-tap filter.


  III. MISCELLANEOUS

    - Using the  new function `FT_Get_Var_Axis_Flags',  an application
      can access the `flags' field  of a variation axis (introduced in
      OpenType version 1.8.2)

    - More sanity checks.

    - The  internal representation  of buffers  for LCD  rendering has
      changed (to be more precise, the amount of padding gets computed
      differently).  Applications  that use  the FreeType API  are not
      affected.

    - To  reset all  design axis  values of  a variation  font to  its
      default values you can now say

        error = FT_Set_Var_Design_Coordinates( face, 0, NULL );

      This  also works  with functions  `FT_Set_MM_Design_Coordinates'
      and `FT_Set_MM_Blend_Coordinates'.

    - FreeType  now synthesizes  a  missing Unicode  cmap for  (older)
      TrueType fonts also if glyph names are available.

    - FreeType  has  improved  handling   of  BDF  fonts  without  the
      `POINT_SIZE', `RESOLUTION_X', or  `RESOLUTION_Y' properties; the
      library now  uses the values of  the `SIZE' keyword if  they are
      missing.   Previously,   `SIZE'  was  completely   ignored,  and
      FreeType used heuristic values instead.

    - Multiple calls to `FT_Bitmap_Convert' do work now as advertised.
      Previously,  they failed with an assertion error if there was an
      empty bitmap between non-empty ones.

    - The warping option  has moved  from `light'  to `normal' hinting
      where  it replaces  the original hinting algorithm.  The `light'
      mode is now always void of any hinting in x-direction.

    - 16bit  compiler  support is  now  officially  ended.  We  didn't
      provide any maintenance  since many years,  and given that there
      were no error  or problem reports either it seems  that it is no
      longer needed.

    - The `ftgrid'  demo program  can now toggle  the display  of grid
      lines with the `G' key.

    - The `ftgrid' demo  program can toggle a different  set of colors
      (suitable to color-blind people) with the `C' key.

    - The `ftgrid'  demo program  now supports  the `-e'  command line
      option to select a cmap.

    - The `ftdump' demo program has a  new command line option `-t' to
      output the SFNT table list.


======================================================================

CHANGES BETWEEN 2.7.1 and 2.8

  I. IMPORTANT CHANGES

    - Support for OpenType Variation Fonts is now complete.   The last
      missing part was handling the `VVAR' and `MVAR' tables, which is
      available with this release.

    - A new  function `FT_Face_Properties' allows the  control of some
      module  and   library  properties  per  font.    Currently,  the
      following properties can be  handled: stem darkening, LCD filter
      weights, and the random seed for the `random' CFF operator.

    - The PCF change to show more `colourful' family names (introduced
      in version 2.7.1) was too radical; it can now be configured with
      PCF_CONFIG_OPTION_LONG_FAMILY_NAMES   at   compile   time.    If
      activated, it can  be switched off at run time  with the new pcf
      property  `no-long-family-names'.  If  the `FREETYPE_PROPERTIES'
      environment variable is available, you can say

        FREETYPE_PROPERTIES=pcf:no-long-family-names=1

    - Support  for  the  following  scripts  has  been  added  to  the
      auto-hinter.

        Adlam, Avestan, Bamum, Buhid, Carian, Chakma, Coptic, Cypriot,
        Deseret, Glagolitic, Gothic, Kayah, Lisu, N'Ko, Ol Chiki, Old
        Turkic, Osage, Osmanya, Saurashtra, Shavian, Sundanese, Tai
        Viet, Tifinagh, Unified Canadian Syllabics, Vai


  II. IMPORTANT BUG FIXES

    - `Light' auto-hinting  mode no  longer uses TrueType  metrics for
      TrueType  fonts.   This bug  was  introduced  in version  2.4.6,
      causing   horizontal  scaling   also.    Almost  all   GNU/Linux
      distributions (with Fedora as  a notable exception) disabled the
      corresponding patch for good reasons; chances are thus high that
      you won't notice a difference.

      If  optical backward  compatibility for  legacy applications  is
      necessary, you might enable the AF_CONFIG_OPTION_TT_SIZE_METRICS
      configuration option.   However, it  is strongly  recommended to
      avoid that, adjusting font sizes instead.

    - Global size  metrics values  in the  `FT_Size_Metrics' structure
      can be  different for TrueType  fonts.  Reason is that  in older
      FreeType  versions  the  metrics  were  rounded  differently  to
      integer pixels compared  to all other font  formats, yielding an
      inconsistent behaviour if you used non-native hinting.  Starting
      with this  version, global size  metrics for TrueType  fonts are
      handled the same as other  font formats: `ascender' gets rounded
      up,  `descender'  gets  rounded  down,  `height'  gets  normally
      rounded, and `max_advance' gets normally rounded, too.

      If you need more precise values of (global) ascender, descender,
      height, or  `max_advance', please take the  corresponding values
      from the `FT_Face' structure and scale them manually.

    - If a TrueType font gets loaded with FT_LOAD_NO_HINTING, FreeType
      now scales  the font linearly  again (bug introduced  in version
      2.4.6).

    - CVE-2017-8105,  CVE-2017-8287:  Older   FreeType  versions  have
      out-of-bounds  writes  caused  by  heap-based  buffer  overflows
      related to Type 1 fonts.

        https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-8105
        https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-8287


  III. MISCELLANEOUS

    - A  new function  `FT_Set_Default_Properties' has  been added  to
      parse    the    `FREETYPE_PROPERTIES'    environment    variable
      (previously, it  was internal only).   `FT_Init_FreeType' always
      call this  function, but  `FT_New_Library' does not  (similar to
      `FT_Add_Default_Modules').

    - To be in sync with OpenType version 1.7 and newer, macros

        FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY,
        FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY,
        TT_NAME_ID_PREFERRED_FAMILY
        TT_NAME_ID_PREFERRED_SUBFAMILY

      are renamed to

        FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY,
        FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY,
        TT_NAME_ID_TYPOGRAPHIC_FAMILY
        TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY

      The old macro names are deprecated (but still available).

    - Support for SFNT `name' tables has been improved.

      . Format  1 `name' tables  are now supported.  Use  new function
        `FT_Get_Sfnt_LangTag' to access associated language tags.

      . Language, encoding, and name IDs have been updated to OpenType
        version 1.8.1.

    - The new CFF  engine now handles the `random'  operator.  All CFF
      opcodes are now supported.

    - The CFF module  has a new property `random-seed'  to control the
      pseudo-random number generation for the `random' operator.

    - The `freetype-config' script is now a wrapper of `pkg-config' if
      this program is available in the path.

    - FT_LOAD_TARGET_LCD  is now  a  variant of  FT_LOAD_TARGET_LIGHT;
      this should provide better rendering results.

    - A mode to display  light auto-hinting with  subpixel positioning
      has been added to `ftdiff'.


======================================================================

CHANGES BETWEEN 2.7 and 2.7.1

  I. IMPORTANT CHANGES

    - Support for the new CFF2 font format as introduced with OpenType
      1.8 has been contributed by Dave Arnolds from Adobe.

    - Preliminary support for variation fonts as specified in OpenType
      1.8 (in addition to the  already existing support for Adobe's MM
      and Apple's  GX formats).  Dave Arnolds  contributed handling of
      advance  width change  variation;  more will  come  in the  next
      version.


  II. IMPORTANT BUG FIXES

    - Handling of  raw CID fonts was partially  broken (bug introduced
      in 2.6.4).

    - CVE-2016-10328:  Older  FreeType versions had  an  out-of-bounds
      write caused by a heap-based  buffer overflow related to the CFF
      fonts.

        https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-10328


  III. MISCELLANEOUS

    - Some limits for TrueType  bytecode execution have been tightened
      to  speed   up  FreeType's  handling  of   malformed  fonts,  in
      particular to quickly abort endless loops.

      - The  number of  twilight points  can no  longer be  set to  an
        arbitrarily large value.

      - The total number of jump  opcode instructions (like JMPR) with
        negative arguments  is dynamically restricted; the  same holds
        for the total number of iterations in LOOPCALL opcodes.

      The dynamic limits are based on  the number of points in a glyph
      and the number of CVT entries.  Please report if you encounter a
      font where the selected values are not adequate.

    - PCF family names are made more `colourful'; they now include the
      foundry  and information  whether they contain  wide characters.
      For example,  you no longer get `Fixed' but  rather `Sony Fixed'
      or `Misc Fixed Wide'.

    - A new  function `FT_Get_Var_Blend_Coordinates'  (with its  alias
      name  `FT_Get_MM_Blend_Coordinates') to retrieve the  normalized
      blend  coordinates of the currently  selected variation instance
      has been added to the Multiple Masters interface.

    - A new  function `FT_Get_Var_Design_Coordinates' to  retrieve the
      design coordinates of the  currently selected variation instance
      has been added to the Multiple Masters interface.

    - A new load flag `FT_LOAD_BITMAP_METRICS_ONLY' to retrieve bitmap
      information without loading the (embedded) bitmap itself.

    - Retrieving   advance   widths   from   bitmap   strikes   (using
      `FT_Get_Advance' and `FT_Get_Advances') have been sped up.

    - The  usual round  of  fuzzer fixes  to  better reject  malformed
      fonts.

    - The `ftmulti' demo program can now switch engines with key `H'.

    - The  `ftstring'  demo  program   can  now  show  some  built-in,
      non-latin sample strings (to be selected with the TAB key).

    - The  `ftview'  demo program  can  now  switch between  a  font's
      charmaps using the TAB key.


======================================================================

CHANGES BETWEEN 2.6.5 and 2.7

  I. IMPORTANT CHANGES

    - As announced earlier, the 2.7.x series now uses the new subpixel
      hinting  mode as  the  default, emulating  a  modern version  of
      ClearType.

      This change inevitably leads to different rendering results, and
      you   might   change   the   `TT_CONFIG_OPTION_SUBPIXEL_HINTING'
      configuration option to  adapt it to your taste (or  use the new
      `FREETYPE_PROPERTIES'    environment    variable).    See    the
      corresponding entry  below for  version 2.6.4, which  gives more
      information.

    - A new option  `FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES' has been
      introduced.   If  set (which  is  the  default), an  environment
      variable  `FREETYPE_PROPERTIES' can  be used  to control  driver
      properties.  Example:

        FREETYPE_PROPERTIES=truetype:interpreter-version=35 \
                            cff:no-stem-darkening=1 \
                            autofitter:warping=1

      This allows to select, say, the subpixel hinting mode at runtime
      for a given application.  See file `ftoption.h' for more.


  II. IMPORTANT BUG FIXES

    - After  loading a  named instance  of  a GX  variation font,  the
      `face_index'  value  in  the returned  `FT_Face'  structure  now
      correctly holds the named instance  index in the upper 16bits as
      documented.


  III. MISCELLANEOUS

    - A new macro `FT_IS_NAMED_INSTANCE' to  test whether a given face
      is a named instance.

    - More fixes to GX font handling.

    - Apple's   `GETVARIATION'  bytecode   operator  (needed   for  GX
      variation font support) has been implemented.

    - Another round  of fuzzer fixes,  mainly to reject  invalid fonts
      faster.

    - Handling of raw CID fonts  was broken (bug introduced in version
      2.6.4).

    - The smooth rasterizer has been streamlined  to make it faster by
      approx. 20%.

    - The `ftgrid'  demo program now  understands command  line option
      `-d' to give start-up design coordinates.

    - The `ftdump' demo program has  a new command line option `-p' to
      dump TrueType bytecode instructions.


======================================================================

CHANGES BETWEEN 2.6.4 and 2.6.5

  I. IMPORTANT BUG FIXES

    - Compilation works again  on Mac OS X (bug introduced  in version
      2.6.4).


  II. IMPORTANT CHANGES

    - The new  subpixel hinting  mode is now  disabled by  default; it
      will  be enabled  by default  in the  forthcoming 2.7.x  series.
      Main reason for reverting this feature is the principle of least
      surprise: a  sudden change in  appearance of all fonts  (even if
      the rendering improves  for almost all recent  fonts) should not
      be expected in a new micro version of a series.


======================================================================

CHANGES BETWEEN 2.6.3 and 2.6.4

  I. IMPORTANT CHANGES

    - A new  subpixel hinting  mode has  been contributed  by Nikolaus
      Waxweiler, which is now the  default rendering mode for TrueType
      fonts.  It implements  (almost everything of) version  40 of the
      bytecode engine.

      The existing code  base in FreeType (the  `Infinality code') was
      stripped to the bare minimum  and all configurability removed in
      the  name  of speed  and  simplicity.   The configurability  was
      mainly aimed  at legacy  fonts like Arial,  Times New  Roman, or
      Courier.  [Legacy fonts are fonts  that modify vertical stems to
      achieve clean black-and-white bitmaps.]  The new mode focuses on
      applying a minimal set of rules to all fonts indiscriminately so
      that modern and web fonts  render well while legacy fonts render
      okay.

      Activation  of the  subpixel hinting  support can  be controlled
      with   the   `TT_CONFIG_OPTION_SUBPIXEL_HINTING'   configuration
      option  at compile  time: If  set to  value 1,  you get  the old
      Infinality  mode  (which  was  never  the  default  due  to  its
      slowness).  Value 2 activates the new subpixel hinting mode, and
      value 3 activates both.  The default is value 2.

      At run time,  you can select the subpixel hinting  mode with the
      `interpreter-version'  property (provided  you have  compiled in
      the corresponding hinting mode); see `ftttdrv.h' for more.

    - Support  for  the  following  scripts  has  been  added  to  the
      auto-hinter.

        Armenian, Cherokee, Ethiopic, Georgian, Gujarati, Gurmukhi,
        Malayalam, Sinhala, Tamil


  II. MISCELLANEOUS

    - Type 42 fonts as created by LilyPond are now supported.

    - Minor rendering improvements in the auto-hinter.

    - For experimental  reasons, the old  CFF engine now  supports all
      CFF operators except `random', including the deprecated Multiple
      Masters  instructions.  This  allows the  display of  fonts like
      `ITCGaramondMM-It.otf' (without font variations, though).

    - Another round of fixes to improve handling of invalid fonts.

    - The `ftgrid' demo program now displays the rendered pixels also;
      this can be switched off with the `b' key.  Selection of various
      LCD filtering modes can be done with the `L' key.

    - The demo programs  have been extended to allow  selection of all
      available TrueType bytecode engines.

    - A very early beta version of a new, Qt based demo program called
      `ftinspect'  is  part  of  the   source  code  bundle;  it  will
      eventually supersede  the other  demo programs.   Currently, you
      have to compile  it manually with `qmake; make';  note that many
      features are still missing.


======================================================================

CHANGES BETWEEN 2.6.2 and 2.6.3

  I. IMPORTANT CHANGES

    - Khmer,  Myanmar, Bengali,  and Kannada  script support  has been
      added to the auto-hinter.


  II. MISCELLANEOUS

    - Better  support of  Indic  scripts like  Devanagari  by using  a
      top-to-bottom hinting flow.

    - All  FreeType macros  starting  with two  underscores have  been
      renamed to  avoid a violation of  both the C and  C++ standards.
      Example: Header  macros of the  form `__FOO_H__' are  now called
      `FOO_H_'.  In most cases,  this should be completely transparent
      to the user.   The exception to this  is `__FTERRORS_H__', which
      must be  sometimes undefined by  the user to get  FreeType error
      strings:  Both this  form and  the new  `FTERRORS_H_' macro  are
      accepted for backward compatibility.

    - Minor improvements mainly to the Type 1 driver.

    - The  new CFF  engine now  supports all  Type 2  operators except
      `random'.

    - The macro `_STANDALONE_', used for  compiling the B/W and smooth
      rasterizers  as   stand-alone  modules,  has  been   renamed  to
      `STANDALONE_', since macro names starting with an underscore and
      followed by an uppercase letter are reserved in both C and C++.

    - Function  `FT_Library_SetLcdFilterWeights'  now  also  activates
      custom LCD filter weights (instead of just adjusting them).

    - Support for  `unpatented hinting'  has been  completely removed:
      Consequently,  the two  functions `FT_Face_CheckTrueTypePatents'
      and  `FT_Face_SetUnpatentedHinting'  now  return  always  false,
      doing nothing.

    - The `ftgamma' demo  program has been modernized;  the gamma grid
      display has been moved from `ftview' to this program.

    - In `ftview',  it is now possible to cycle through  the available
      LCD filtering modes.


======================================================================

CHANGES BETWEEN 2.6.1 and 2.6.2

  I. IMPORTANT CHANGES

    - The auto-hinter now supports stem darkening, to be controlled by
      the    new   `no-stem-darkening'    and   `darkening-parameters'
      properties.   This is  an  experimental  feature contributed  by
      Nikolaus Waxweiler, and  the interface might change  in a future
      release.

    - By default, stem darkening is now switched off (for both the CFF
      engine and the  auto-hinter).  The main reason is  that you need
      linear  alpha  blending  and  gamma correction  to  get  correct
      rendering results, and  the latter is not yet  available in most
      freely  available  rendering  stacks like  X11.   Applying  stem
      darkening without proper gamma correction  leads to far too dark
      rendering results.

    - The   meaning  of   `FT_RENDER_MODE_LIGHT'  has   been  slightly
      modified.   It  now  essentially  means `no  hinting  along  the
      horizontal  axis'; in  particular,  no change  of glyph  advance
      widths.  Consequently, the auto-hinter  is used for all scalable
      font  formats  except  for  CFF.    It  is  planned  that  other
      font-specific rendering engines (TrueType, Type 1) will follow.


  II. MISCELLANEOUS

    - The default  LCD filter  has been changed  to be  normalized and
      color-balanced.

    - For    better    compatibility   with    FontConfig,    function
      `FT_Library_SetLcdFilter'  accepts   a  new   enumeration  value
      `FT_LCD_FILTER_LEGACY1'   (which  has   the   same  meaning   as
      `FT_LCD_FILTER_LEGACY').

    - A large number of bugs have been detected by using the libFuzzer
      framework,  which should  further  improve  handling of  invalid
      fonts.  Thanks again to Kostya Serebryany and Bungeman!

    - `TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES',  a   new  configuration
      option, controls the maximum number of executed opcodes within a
      bytecode program.  You don't want to change this except for very
      special  situations (e.g.,  making a  library fuzzer  spend less
      time to handle broken fonts).

    - The smooth renderer has been made faster.

    - The `ftstring' demo program now supports subpixel rendering; use
      key `l' to cycle through the LCD modes.

    - The `ftstring'  demo program now supports  colour rendering; use
      the `space' key to cycle through various colour combinations.

    - The graphical demo programs now use a default gamma value of 1.8
      (instead of 1.2).


======================================================================

CHANGES BETWEEN 2.6 and 2.6.1

  I. IMPORTANT BUG FIXES

    - It turned  out that for CFFs  only the advance widths  should be
      taken from the  `htmx' table, not the side  bearings.  This bug,
      introduced in  version 2.6.0, makes  it necessary to  upgrade if
      you are using  CFFs; otherwise, you get cropped  glyphs with GUI
      interfaces like GTK or Qt.

    - Accessing Type 42 fonts returned  incorrect results if the glyph
      order of the embedded TrueType font differs from the glyph order
      of the Type 42 charstrings table.


  II. IMPORTANT CHANGES

    - The header  file layout  has been  changed (again),  moving  all
      header files except `ft2build.h' into a subdirectory tree.

      Doing so  reduces the  possibility of  header file  name clashes
      (e.g., FTGL's  `FTGlyph.h' with FreeType's `ftglyph.h')  on case
      insensitive file systems like Mac OS X or Windows.

      Applications  that  use  (a)  the  `freetype-config'  script  or
      FreeType's `freetype2.pc' file for pkg-config to get the include
      directory  for the  compiler,  and (b)  the  documented way  for
      header inclusion like

        #include <ft2build.h>
        #include FT_FREETYPE_H
        ...

      don't need any change to the source code.

    - Simple access  to named instances  in GX variation fonts  is now
      available (in addition to the  previous method via FreeType's MM
      interface).   In  the `FT_Face'  structure,  bits  16-30 of  the
      `face_index' field hold the current named instance index for the
      given face  index, and bits  16-30 of `style_flags'  contain the
      number of  instances for  the given face  index.  `FT_Open_Face'
      and friends also understand the  extended bits of the face index
      parameter.

      You need to enable  TT_CONFIG_OPTION_GX_VAR_SUPPORT for this new
      feature.  Otherwise, bits  16-30 of the two fields  are zero (or
      are ignored).

    - Lao script support has been added to the auto-hinter.


  III. MISCELLANEOUS

    - The auto-hinter's Arabic script support has been enhanced.

    - Superscript-like and  subscript-like glyphs  as used  by various
      phonetic alphabets like the IPA  are now better supported by the
      auto-hinter.

    - The TrueType bytecode interpreter now runs slightly faster.

    - Improved support for builds with cmake.

    - The  function  `FT_CeilFix'  now   always  rounds  towards  plus
      infinity.

    - The  function  `FT_FloorFix'  now always  rounds  towards  minus
      infinity.

    - A  new load  flag `FT_LOAD_COMPUTE_METRICS'  has been  added; it
      makes FreeType  ignore pre-computed  metrics, as needed  by font
      validating  or  font  editing  programs.  Right  now,  only  the
      TrueType  module supports  it  to ignore  data  from the  `hdmx'
      table.

    - Another round of bug fixes  to better handle broken fonts, found
      by Kostya Serebryany <kcc@google.com>.


======================================================================

CHANGES BETWEEN 2.5.5 and 2.6

  I. IMPORTANT CHANGES

    - Behdad  Esfahbod contributed  code  for improved  thread-safety,
      which results in the following model.

      * An `FT_Face' object can only be safely used from one thread at
        a time.

      * An `FT_Library'  object can  now be used  without modification
        from multiple threads at the same time.

      * `FT_Face' creation and destruction  with the same `FT_Library'
        object can only be done from one thread at a time.

      One can use a single  `FT_Library' object across threads as long
      as a mutex lock is used around `FT_New_Face' and `FT_Done_Face'.
      Any calls to `FT_Load_Glyph' and similar API are safe and do not
      need the lock  to be held as  long as the same  `FT_Face' is not
      used from multiple threads at the same time.

    - Thai script support has been added to the auto-hinter.

    - Arabic script support has been added to the auto-hinter.

    - Following OpenType version 1.7,  advance widths and side bearing
      values in  CFFs (wrapped  in an SFNT  structure) are  now always
      taken from the `hmtx' table.

    - Following OpenType  version 1.7, the  PostScript font name  of a
      CFF font (wrapped in an SFNT structure) is now always taken from
      the `name'  table.  This is  also true for  OpenType Collections
      (i.e., TTCs using  CFFs subfonts instead of TTFs),  where it may
      have a significant difference.

    - Fonts natively hinted for  ClearType are now supported, properly
      handling selector index 3 of the INSTCTRL bytecode instruction.

    - Major improvements to the GX TrueType variation font handling.


  II. MISCELLANEOUS

    - A new auto-hinter  property `warping' can switch on  and off the
      warping code  if this  experimental feature  is compiled  in (by
      defining  the AF_CONFIG_OPTION_USE_WARPER  configuration option;
      by default  this option is  now enabled but warping  is switched
      off).

      The AF_CONFIG_OPTION_USE_WARPER option itself is an old feature,
      available   since  2006.    Warping   only   works  in   `light'
      auto-hinting mode.   The idea of  the code is to  slightly scale
      and  shift a  glyph  along the  non-hinted  dimension (which  is
      usually the horizontal axis) so that as much of its segments are
      aligned  (more or  less) to  the grid.   To find  out a  glyph's
      optimal   scaling   and   shifting  value,   various   parameter
      combinations are tried and scored.

      See  file  `ftautoh.h' for  more;  the  demo programs  `ftdiff',
      `ftview', and `ftgrid' can toggle warping with key `w'.

    - Some  fields  in  the  `FTC_ImageTypeRec'  structure  have  been
      changed from signed to unsigned  type, which better reflects the
      actual usage.  It is also an additional means to protect against
      malformed input.

      This  change doesn't  break  the ABI;  however,  it might  cause
      compiler warnings.

    - Function `FT_Bitmap_New'  has been renamed  to `FT_Bitmap_Init',
      since  this name  better reflects  its  function.   For backward
      compatibility, the old function name is still available.

    - Function   `FT_Get_X11_Font_Format'   has    been   renamed   to
      `FT_Get_Font_Format',  since  this   name  better  reflects  its
      function.  For backward compatibility,  the old function name is
      still available.

      Additionally, the header  file macro for this  function has been
      renamed to  `FT_FONT_FORMATS_H' (the old name  `FT_XFREE86_H' is
      retained for backward compatibility).

    - Various improvements to the `ftgrid' demo program.

      . It  can  now  display  GX and  MM  fonts  while  interactively
        manipulating the axes (with keys F2, F3, and F4).

      . Anti-aliasing rendering  modes can now be  selected (with keys
        F5 and F6).

      . The display of point numbers can be toggled with key `D'.

    - Various improvements to the `ftdump' demo program.

      . It now displays information on MM and GX variation axes.

      . New  command line option  `-u' makes  it output data  in utf-8
        encoding.

    - The `ftmulti'  demo program can  now handle up  to six MM  or GX
      axes.


======================================================================

CHANGES BETWEEN 2.5.4 and 2.5.5

  I. IMPORTANT BUG FIXES

    - Handling of  uncompressed PCF files works again (bug  introduced
      in version 2.5.4).


======================================================================

CHANGES BETWEEN 2.5.3 and 2.5.4

  I. IMPORTANT BUG FIXES

    - A   variant  of   vulnerability  CVE-2014-2240   was  identified
      (cf.  https://savannah.nongnu.org/bugs/?43661) and  fixed in the
      new CFF driver.  All users should upgrade.

    - The new auto-hinter code using HarfBuzz crashed for some invalid
      fonts.

    - Many fixes to better protect against malformed input.


  II. IMPORTANT CHANGES

    - Full auto-hinter support of the Devanagari script.

    - Experimental auto-hinter support of the Telugu script.

    - CFF stem darkening behaviour can now be controlled at build time
      using the eight macros

        CFF_CONFIG_OPTION_DARKENING_PARAMETER_{X,Y}{1,2,3,4}    .

    - Some fields in the `FT_Bitmap'  structure have been changed from
      signed to unsigned type, which better reflects the actual usage.
      It  is also  an additional  means to  protect against  malformed
      input.

      This  change doesn't  break  the ABI;  however,  it might  cause
      compiler warnings.


  III. MISCELLANEOUS

    - Improvements to  the auto-hinter's algorithm to  recognize stems
      and local extrema.

    - Function `FT_Get_SubGlyph_Info' always returned an error even in
      case of success.

    - Version  2.5.1 introduced  major bugs  in  the cjk  part of  the
      auto-hinter, which are now fixed.

    - The  `FT_Sfnt_Tag'  enumeration  values  have  been  changed  to
      uppercase,  e.g.  `FT_SFNT_HEAD'.   The lowercase  variants  are
      deprecated.    This  is   for  orthogonality   with  all   other
      enumeration (and enumeration-like) values in FreeType.

    - `cmake' now supports builds of FreeType as an OS X framework and
      for iOS.

    - Improved project files for vc2010, introducing a property file.

    - The  documentation generator  for  the API  reference  has  been
      updated to produce  better HTML code (with proper  CSS).  At the
      same time, the documentation got a better structure.

    - The FT_LOAD_BITMAP_CROP flag is obsolete;  it is not used by any
      driver.

    - The  TrueType  DELTAP[123]  bytecode instructions  now  work  in
      subpixel hinting  mode as described in  the ClearType whitepaper
      (i.e., for touched points in the non-subpixel direction).

    - Many small improvements to the internal arithmetic routines.


======================================================================

CHANGES BETWEEN 2.5.2 and 2.5.3

  I. IMPORTANT BUG FIXES

    - A vulnerability (CVE-2014-2240) was  identified and fixed in the
      new  CFF driver  (cf.  https://savannah.nongnu.org/bugs/?41697).
      All users should upgrade.

    - More  bug  fixes related  to  correct  positioning of  composite
      glyphs.

    - Many fixes to better protect against malformed input.


  II. IMPORTANT CHANGES

    - FreeType can now use the HarfBuzz library to greatly improve the
      auto-hinting of  fonts that  use OpenType features:  Many glyphs
      that are part  of such features but don't have  cmap entries are
      now handled  properly, for  example small caps  or superscripts.
      Define the configuration  macro FT_CONFIG_OPTION_USE_HARFBUZZ to
      activate HarfBuzz support.

      You need HarfBuzz version 0.9.19 or newer.

      Note that HarfBuzz depends on  FreeType; this currently causes a
      chicken-and-egg problem  that can be  solved as follows  in case
      HarfBuzz is not yet installed on your system.

        1. Compile  and  install  FreeType without  the  configuration
           macro FT_CONFIG_OPTION_USE_HARFBUZZ.

        2. Compile and install HarfBuzz.

        3. Define  macro  FT_CONFIG_OPTION_USE_HARFBUZZ, then  compile
           and install FreeType again.

      With FreeType's  `configure' script the procedure  boils down to
      configure, build, and install FreeType, then configure, compile,
      and  install  HarfBuzz,  then configure,  compile,  and  install
      FreeType again (after executing `make distclean').

    - All  libraries FreeType  depends on  are now  checked using  the
      `pkg-config' configuration files  first, followed by alternative
      methods.

    - The  new  value  `auto'  for the  various  `--with-XXX'  library
      options   (for   example   `--with-harfbuzz=auto')   makes   the
      `configure' script automatically link to the libraries it finds.
      This is now the default.

    - In case FreeType's `configure' script  can't find a library, you
      can  pass environment  variables to  circumvent pkg-config,  and
      those variables  have been  harmonized as  a consequence  of the
      changes mentioned above:

        LIBZ           -> removed; use LIBZ_CFLAGS and LIBZ_LIBS
        LIBBZ2         -> removed; use BZIP2_CFLAGS and BZIP2_LIBS
        LIBPNG_LDFLAGS -> LIBPNG_LIBS

      `./configure --help' shows all available environment variables.

    - The `freetype-config'  script now understands  option `--static'
      to emit static linking information.


======================================================================

CHANGES BETWEEN 2.5.1 and 2.5.2

  I. IMPORTANT BUG FIXES

    - Improving the display of some broken TrueType fonts introduced a
      bug  that made  FreeType crash  on some  popular (but  not fully
      conformant) fonts like `ahronbd.ttf'.

    - Another round of improvements to correct positioning and hinting
      of composite glyphs in TrueType fonts.


  II. MISCELLANEOUS

    - Version  2.5.1  introduced a  bug  in  handling embedded  bitmap
      strikes of  TrueType fonts,  causing garbage display  under some
      circumstances.

    - The   `ftgrid'   demo   program    couldn't   be   compiled   in
      non-development builds.


======================================================================

CHANGES BETWEEN 2.5 and 2.5.1

  I. IMPORTANT BUG FIXES

    - For  some WinFNT  files,  the last  glyph  wasn't displayed  but
      incorrectly marked as invalid.

    - The vertical size of glyphs was  incorrectly set after a call to
      `FT_GlyphSlot_Embolden', resulting in clipped glyphs.

    - Many fields of the `PCLT' table in SFNT based fonts (if accessed
      with `FT_Get_Sfnt_Table') were computed incorrectly.

    - In TrueType fonts,  hinting of composite glyphs  could sometimes
      deliver  incorrect positions  of  components or  even  distorted
      shapes.


  II. IMPORTANT CHANGES

    - WOFF font format support has been added.

    - The auto-hinter now supports Hebrew.  Greek and Cyrillic support
      has been improved.

    - Support for the forthcoming `OS/2'  SFNT table version 5, as can
      be found e.g. in the `Sitka' font family for Windows 8.1.

    - The header  file layout  has been changed.   After installation,
      all files are now located in `<prefix>/include/freetype2'.

      Applications  that  use   (a)  `freetype-config'  or  FreeType's
      `pkg-config' file to get the include directory for the compiler,
      and (b) the documented way for header inclusion like

        #include <ft2build.h>
        #include FT_FREETYPE_H
        ...

      don't need any change to the source code.


  III. MISCELLANEOUS

    - The stem  darkening feature  of the  new CFF  engine can  now be
      fine-tuned with the new `darkening-parameters' property.

    - `ftgrid' has been updated to toggle various engines with the `H'
      key, similar to `ftview' and `ftdiff'.

    - The functionality of `ttdebug' has been greatly enhanced.

      . It now displays twilight, storage, and control value data; key
        `T' shows the twilight point  table, key `S' the storage data,
        and key `C' the control value table.

      . Some  keys  have  been  reassigned  from  lowercase  to  their
        uppercase equivalents; for example `q'  to quit the program is
        now `Q'.

      . Key `f' finishes the current function.

      . Key `R' restarts the debugger.

      . Keys `b' and `p' set a breakpoint.

      . Key `B' provides a function call backtrace.

    - Better support of ARMv7 and x86_64 processors.

    - Apple's `sbix' color bitmap format is now supported.

    - Improved   auto-hinter  rendering   for  many   TrueType  fonts,
      especially in the range 20-40ppem.

    - A  new face  flag  `FT_FACE_FLAG_COLOR' has  been  added (to  be
      accessed with the macro `FT_HAS_COLOR').

    - `FT_Gzip_Uncompress'   (modeled    after   zlib's   `uncompress'
      function)  has been  added; this  is a  by-product of  the newly
      added WOFF support.

    - Support for  a build with  `cmake' has been contributed  by John
      Cary <cary@txcorp.com>.

    - Support for x64  builds with Visual C++ has  been contributed by
      Kenneth Miller <kennethadammiller@yahoo.com>

    - Manual pages for most demo programs have been added.

    - The GETINFO bytecode instruction for TrueType fonts was buggy if
      used to retrieve subpixel hinting information.  It was necessary
      to set  selector bit 6  to get  results for selector  bits 7-10,
      which is wrong.

    - Improved computation  of emulated vertical metrics  for TrueType
      fonts.

    - Fixed horizontal start-up position of vertical phantom points in
      TrueType bytecode.


======================================================================

CHANGES BETWEEN 2.4.12 and 2.5

  I. IMPORTANT BUG FIXES

    - The cache manager function `FTC_Manager_Reset'  didn't flush the
      cache.


  II. IMPORTANT CHANGES

    - Behdad Esfahbod  (on behalf  of Google) contributed  support for
      color embedded bitmaps (eg. color emoji).

      A  new  load  flag,  FT_LOAD_COLOR, makes  FreeType  load  color
      embedded-bitmaps, following this draft specification

        https://color-emoji.googlecode.com/git/specification/v1.html

      which defines two new SFNT  tables, `CBDT' and `CBLC' (named and
      modeled  after  `EBDT'  and `EBLC',  respectively).   The  color
      bitmaps  are  stored in  the  new  FT_PIXEL_MODE_BGRA format  to
      represent BGRA  pre-multiplied sRGB  images.  If PNG  support is
      available,  PNG color  images as  defined in  the same  proposed
      specification are supported also.

      Note that  color bitmaps  are converted  to grayscale  if client
      didn't ask for color.

    - As  announced in  the  previous release,  the  old FreeType  CFF
      engine  is now  disabled by  default.  It  can be  conditionally
      compiled     by     defining     the     configuration     macro
      CFF_CONFIG_OPTION_OLD_ENGINE.

    - As announced in the previous release,  all code related to macro
      FT_CONFIG_OPTION_OLD_INTERNALS  has been removed,  thus becoming
      obsolete.


  III. MISCELLANEOUS

    - The  property API  (`FT_Property_Get' and  `FT_Property_Set') is
      now declared as stable.

      The  exception,   however,  are  the   experimental  auto-hinter
      properties `glyph-to-script-map' and `fallback-script' which are
      subject to change in a forthcoming release.

    - `ftview' has been updated to  support color embedded bitmaps; it
      can be toggled on and off  with key `c'.  The small cache toggle
      is now key `K'.

    - It  is now  possible  to  control the  version  of the  TrueType
      hinting engine  using the new `interpreter-version'  property of
      the  `truetype' module:  Versions 35  and 38  (the default)  are
      supported,  which  roughly  corresponds to  disable  and  enable
      subpixel hinting support, respectively.

      In  both  `ftview'  and  `ftdiff',  switching  between  the  two
      versions  can be  done  with  key `H'.   In  the `ftbench'  demo
      program, command line option `-H'  has been extended to activate
      the non-default interpreter version.

    - The `ttdebug' program has been further improved.  In particular,
      it accepts a new command line  option `-H' to select the hinting
      engine.

    - `ftdump's verbose option has been renamed to `-V'.  For all demo
      programs, `-v' now shows version information.

    - Another round of TrueType subpixel hinting fixes.

    - The `apinames' tool can now create an import file for NetWare.

    - 64bit compilation of the new CFF engine was buggy.

    - Some fixes to improve robustness in memory-tight situations.


======================================================================

CHANGES BETWEEN 2.4.11 and 2.4.12

    - We have another CFF parsing and hinting engine!  Written by Dave
      Arnold <darnold@adobe.com>,  this work  has been  contributed by
      Adobe in  collaboration with Google.   It is vastly  superior to
      the old CFF engine, and it  will replace it in the next release.
      Right  now,  it  is  still  off by  default,  and  you  have  to
      explicitly select it using  the new `hinting-engine' property of
      the cff driver:

        ...
        #include FT_MODULE_H
        #include FT_CFF_DRIVER_H

        FT_Library  library;
        int         engine = FT_CFF_HINTING_ADOBE;


        ...
        FT_Property_Set( library, "cff", "hinting-engine", &engine );

      The code has  a (mature) beta status; we encourage  all users to
      test it and report any problems.

      In case you want to activate the new CFF engine unconditionally,
      apply this patch:

--- snip ---
diff --git a/src/cff/cffobjs.c b/src/cff/cffobjs.c
index ebcf189..3f2ce6b 100644
--- a/src/cff/cffobjs.c
+++ b/src/cff/cffobjs.c
@@ -1056,7 +1056,7 @@


     /* set default property values */
-    driver->hinting_engine    = FT_CFF_HINTING_FREETYPE;
+    driver->hinting_engine    = FT_CFF_HINTING_ADOBE;
     driver->no_stem_darkening = FALSE;

     return FT_Err_Ok;
--- snip ---

    - The  macro FT_CONFIG_OPTION_OLD_INTERNALS  is no  longer set  by
      default.  In  the next  release, we  will completely  remove the
      associated code.   Please update your  programs in case  you are
      still using this macro.


  II. MISCELLANEOUS

    - The  (top-level)  `configure'  script   now  respects  the  MAKE
      environment variable  to specify a `make' binary.   For backward
      compatibility, GNUMAKE still overrides MAKE, though.

    - The `ftview'  and `ftdiff'  demo programs have  been redesigned,
      showing  more options  permanently  on the  screen, among  other
      minor improvements.

    - Using the `H'  key, it is now possible to  select the CFF engine
      in both `ftview' and `ftdiff'.

    - The new command line option `-H' for `ftbench' selects the Adobe
      CFF engine.

    - It is  now possible  to directly select  the LCD  rendering mode
      with the keys `A'-`F' in  `ftview'.  The key mapping for cycling
      through LCD modes  has been changed from `K' and  `L' to `k' and
      `l', and  toggling custom LCD  filtering is no longer  mapped to
      key `F' but to key `L'.

    - In `ftdiff',  key `x' toggles  between layout modes:  Either use
      the  advance width  (this is  new and  now the  default) or  the
      bounding box information to determine line breaks.

    - For all demo  tools, the new command line option  `-v' shows the
      version.

    - For the demo tools with a GUI, the new command line options `-w'
      and `-h' select  the width and the height of  the output window,
      respectively.

    - The `ttdebug' program was broken and has been reactivated.  Note
      that this program is not compiled by default.


======================================================================

CHANGES BETWEEN 2.4.10 and 2.4.11

  I. IMPORTANT BUG FIXES

    - Some vulnerabilities in the  BDF implementation have been fixed.
      Users of this font format should upgrade.


  II. IMPORTANT CHANGES

    - Subpixel  hinting support  has been  contributed by  Infinality,
      based on Greg Hitchcock's whitepaper at

        https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx

      Originally, it was a separate patch available from

        http://www.infinality.net/blog/

      and which has been integrated.

      Note that  ClearType support is not  completely implemented!  In
      particular,  full support  for the  options `compatible_widths',
      `symmetrical_smoothing,  and  `bgr'  (via the  GETINFO  bytecode
      instruction) is missing.

      Activation of  subpixel hinting  support can be  controlled with
      the `TT_CONFIG_OPTION_SUBPIXEL_HINTING' configuration option; it
      is switched off by default.  This feature is still experimental;
      we welcome test reports!

    - Support for OpenType collections (OTC) has been added.

    - Pure CFF fonts within an SFNT wrapper are now supported.


  III. MISCELLANEOUS

    - Minor rendering improvements to the auto-hinter.

    - `FT_GlyphSlot_Oblique' now uses a shear angle of 12°.

    - Experimental support  to handle `property modules',  for example
      to control the  behaviour of the auto-hinter.   The API consists
      of two new functions, `FT_Property_Set' and `FT_Property_Get'.

      The code is  still subject to change and should  not be used for
      production.

    - The `ftdiff' demo program now supports UTF-8 encoded input files
      for option `-f'.

    - Using keys `r' and `R', you can now adjust the stroker radius in
      the `ftview' demo program.

    - Other, minor fixes and improvements.


======================================================================

CHANGES BETWEEN 2.4.9 and 2.4.10

  I. IMPORTANT BUG FIXES

    - Incremental glyph loading as needed by ghostscript was broken.


  II. MISCELLANEOUS

    - A new  function `FT_Outline_EmboldenXY',  contributed by  Alexei
      Podtelezhnikov.

    - In the `ftview' demo program, key `e' has been replaced with `x'
      and `y' to  embolden in  the horizontal and  vertical direction,
      respectively.

    - The glyph  spacing computation  in `FT_GlyphSlot_Embolden'  (and
      similar code in `ftview') has been improved.

    - Minor  improvements to  the TrueType  bytecode  interpreter  and
      glyph loader, the auto-hinter, and the B/W rasterizer.


======================================================================

CHANGES BETWEEN 2.4.8 and 2.4.9

  I. IMPORTANT BUG FIXES

    - Another round of fixes to better handle invalid fonts.   Many of
      them are vulnerabilities  (see CVE-2012-1126 up to CVE-2012-1144
      and SA48320) so all users should upgrade.


  II. MISCELLANEOUS

    - The `ENCODING -1 <n>' format of BDF fonts is now supported.

    - For BDF fonts,  support for the whole Unicode encoding range has
      been added.

    - Better TTF support for x_ppem != y_ppem.

    - `FT_Get_Advances' sometimes returned bogus values.

    - The  demo  programs  no  longer  recognize  and  handle  default
      suffixes; you now have to always specify the complete font name.

    - Better rendering and LCD mode cycling added to `ftview'.


======================================================================

CHANGES BETWEEN 2.4.7 and 2.4.8

  I. IMPORTANT BUG FIXES

    - Some vulnerabilities in handling CID-keyed PostScript fonts have
      been fixed; see CVE-2011-3439.


  II. MISCELLANEOUS

    - Chris Liddell contributed a new API, `FT_Get_PS_Font_Value',  to
      retrieve most of the dictionary keys in Type 1 fonts.


======================================================================

CHANGES BETWEEN 2.4.6 and 2.4.7

  I. IMPORTANT BUG FIXES

    - Some  vulnerabilities in handling Type 1 fonts  have been fixed;
      see CVE-2011-3256.


  II. MISCELLANEOUS

    - FreeType  now properly  handles ZapfDingbats  glyph names  while
      constructing a Unicode character map (for fonts which don't have
      one).


======================================================================

CHANGES BETWEEN 2.4.5 and 2.4.6

  I. IMPORTANT BUG FIXES

    - For TrueType based fonts, the ascender and descender values were
      incorrect sometimes  (off by a pixel if the ppem value was not a
      multiple of 5).   Depending on the use you might now  experience
      a different  layout; the  change should  result in  better, more
      consistent line spacing.

    - Fix CVE-2011-0226  which causes a  vulnerability while  handling
      Type 1 fonts.

    - BDF fonts  containing  glyphs with negative values  for ENCODING
      were  incorrectly  rejected.  This  bug has  been introduced  in
      FreeType version 2.2.0.

    - David Bevan contributed a major revision of the FreeType stroker
      code:

      . The behaviour of FT_STROKER_LINEJOIN_BEVEL has been corrected.

      . A new  line join style,  FT_STROKER_LINEJOIN_MITER_FIXED,  has
        been introduced to support PostScript and PDF miter joins.

      . FT_STROKER_LINEJOIN_MITER_VARIABLE  has been introduced  as an
        alias for FT_STROKER_LINEJOIN_MITER.

      . Various stroking glitches has been fixed.


  II. MISCELLANEOUS

      - SFNT bitmap fonts which contain an outline glyph for `.notdef'
        only no longer set the FT_FACE_FLAG_SCALABLE flag.


======================================================================

CHANGES BETWEEN 2.4.4 and 2.4.5

  I. IMPORTANT BUG FIXES

    - A rendering regression  for second-order Bézier curves  has been
      fixed, introduced in 2.4.3.


  II. IMPORTANT CHANGES

    - If autohinting  is not  explicitly disabled,  FreeType now  uses
      the autohinter if  a TrueType based font doesn't  contain native
      hints.

    - The load flag FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH  has been made
      redundant and  is simply ignored;  this means that FreeType  now
      ignores the global advance width value in TrueType fonts.


  III. MISCELLANEOUS

    - `FT_Sfnt_Table_Info' can now return the number of SFNT tables of
      a font.

    - Support for PCF files compressed with bzip2 has been contributed
      by Joel  Klinghed.  To  make this  work, the  OS must  provide a
      bzip2 library.

    - Bradley  Grainger  contributed  project  and  solution  files in
      Visual Studio 2010 format.

    - Again some fixes to better handle broken fonts.

    - Some improvements to the B/W rasterizer.

    - Fixes to the cache module to improve robustness.

    - Just  Fill Bugs contributed (experimental) code to compute  blue
      zones for CJK Ideographs, improving the alignment of  horizontal
      stems at the top or bottom edges.

    - The `ftgrid' demo program  can now display  autohinter segments,
      to be toggled on and off with key `s'.


======================================================================

CHANGES BETWEEN 2.4.3 and 2.4.4

  I. IMPORTANT BUG FIXES

    - UVS support (TrueType/OpenType cmap format 14) support is fixed.
      This regression has been introduced in version 2.4.0.


  II. MISCELLANEOUS

    - Detect tricky fonts (e.g. MingLiU)  by the lengths and checksums
      of Type42-persistent subtables (`cvt ', `fpgm', and `prep') when
      a TrueType font without family name is given.  The previous fix,
      introduced in 2.4.3,  was too rigorous,  causing many  subsetted
      fonts (mainly  from PDF files) displayed badly  because FreeType
      forced  rendering with  the TrueType bytecode engine  instead of
      the autohinter.

    - Better support for 64bit platforms.

    - More fixes to improve handling of broken fonts.


======================================================================

CHANGES BETWEEN 2.4.2 and 2.4.3

  I. IMPORTANT BUG FIXES

    - Fix rendering of certain cubic, S-shaped arcs.   This regression
      has been introduced in version 2.4.0.


  II. MISCELLANEOUS

    - To  fix  the  above  mentioned  rendering  issue,  a  new spline
      flattening algorithm  has been  introduced which  speeds up both
      conic and cubic arcs.

    - Handling of broken fonts has been further improved.


======================================================================

CHANGES BETWEEN 2.4.1 and 2.4.2

  I. IMPORTANT BUG FIXES

    - A stack overflow in CFF Type2 CharStrings interpreter is fixed.

    - Handling Type 42 font deallocation was broken; additionally, the
      library is now more robust against malformed Type 42 fonts.


  II. MISCELLANEOUS

    - Two new functions,  `FT_Reference_Library' (in FT_MODULE_H)  and
      `FT_Reference_Face'  (in  FT_FREETYPE_H),  have  been  added  to
      simplify life-cycle management.  A counter gets initialized to 1
      at the  time an  FT_Library (or  FT_Face) structure  is created.
      The  two  new   functions  increment  the  respective   counter.
      `FT_Done_Library' and `FT_Done_Face' then only destroy a library
      or face if the counter is 1, otherwise they simply decrement the
      counter.


======================================================================

CHANGES BETWEEN 2.4.0 and 2.4.1

  I. IMPORTANT CHANGES

    - A serious bug in the  CFF font module prevented  display of many
      glyphs in CFF fonts like `MinionPro-Regular.otf'.


======================================================================

CHANGES BETWEEN 2.3.12 and 2.4.0

  I. IMPORTANT CHANGES

    - Since May  2010, all  patents  regarding  the TrueType  bytecode
      interpreter have expired worldwide.  Consequently, we now define
      TT_CONFIG_OPTION_BYTECODE_INTERPRETER by  default (and  undefine
      TT_CONFIG_OPTION_UNPATENTED_HINTING).

    - A new function `FT_Library_SetLcdFilterWeights' is available  to
      adjust the filter weights set by `FT_Library_SetLcdFilter'.


  II. MISCELLANEOUS

    - Thanks to many reports from Robert Święcki, FreeType's stability
      in handling broken or damaged fonts is much improved.

    - Support  for LCD  filter  control has  been  added to  the  demo
      programs `ftdiff' and `ftview'.


======================================================================

CHANGES BETWEEN 2.3.11 and 2.3.12

  I. IMPORTANT CHANGES

    - For  `FT_Open_Face',  new  parameters  are  available  to ignore
      preferred family names: FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY and
      FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY.


  II. MISCELLANEOUS

    - Support  for  incremental  font  loading  (controlled  with  the
      FT_CONFIG_OPTION_INCREMENTAL macro) is now active by default.

    - Better support for vertical metrics.

    - Various minor bug fixes.


======================================================================

CHANGES BETWEEN 2.3.10 and 2.3.11

  I. IMPORTANT BUG FIXES

    - Version 2.3.10 broke PCF support.


======================================================================

CHANGES BETWEEN 2.3.10 and 2.3.9

  I. IMPORTANT BUG FIXES

    - If all  ASCII digits in a  font have the  same (unscaled) width,
      the autohinter respects this and won't change it.

    - TrueType fonts  are now  rasterized correctly  if the horizontal
      and vertical resolution differ.

    - Type 1 fonts are now handled with increased precision internally
      to avoid serious rounding issues if non-integral coordinates are
      encountered.

    - Horizontally  condensed CFF  fonts (using the font  matrix) were
      rendered  incorrectly.   This  bug  has  been  introduced  after
      release 2.3.5.


  II. IMPORTANT CHANGES

    - Support for the SFNT cmap 13 table format (as defined by the new
      OpenType 1.6 specification) has been added.

    - B/W rasterization  of well-hinted TrueType  fonts at small sizes
      has been greatly improved.

    - Calculation  of  vertical  metrics in  OpenType  fonts has  been
      improved.


  III. MISCELLANEOUS

    - It  is now  possible to  change  the emboldening  factor in  the
      `ftview' demo program with keys `e' and `E'.

    - It is  now possible  to change the  slant value in  the `ftview'
      demo program with keys `s' and `S'.

    - The  5-levels  grayscale  mode of  the `ftraster'  module (which
      FreeType doesn't use by default) was broken since version 2.3.0.

    - Compilation of the  `ftgrays' and `ftraster' modules  was broken
      in stand-alone mode.

    - Various fixes for compilation on 64bit and 16bit architectures.


======================================================================

CHANGES BETWEEN 2.3.9 and 2.3.8

  I. IMPORTANT BUG FIXES

    - Very unfortunately, FreeType 2.3.8 contained a change that broke
      its  official ABI.  The  end result  is  that programs  compiled
      against previous versions of the library, but dynamically linked
      to  2.3.8 can  experience  memory corruption  if  they call  the
      `FT_Get_PS_Font_Info' function.

      We recommend all users to  upgrade to 2.3.9 as soon as possible,
      or to downgrade to a previous  release of the library if this is
      not an option.

      The  origin of the  bug is  that a  new field  was added  to the
      publicly  defined  `PS_FontInfoRec'  structure.   Unfortunately,
      objects of this  type can be stack or  heap allocated by callers
      of   `FT_Get_PS_Font_Info',  resulting   in   a  memory   buffer
      overwrite with its implementation in 2.3.8.

      If  you want to  know whether  your code  is vulnerable  to this
      issue,  simply  search  for  the  substrings  `PS_FontInfo'  and
      `PS_Font_Info' in your source code.  If none is found, your code
      is safe and is not affected.

      The FreeType team apologizes for the problem.

    - The POSIX support  of MacOS resource-fork fonts  (Suitcase fonts
      and LaserWriter Type1 PostScript fonts) was broken in 2.3.8.  If
      FreeType2 is built without Carbon framework, these fonts are not
      handled correctly.  Version 2.3.7 didn't have this bug.

    - `FT_Get_Advance' (and `FT_Get_Advances') returned bad values for
      almost all font formats except TrueType fonts.

    - Fix a bug  in the SFNT  kerning table  loader/parser which could
      crash the engine if certain malformed tables were encountered.

    - Composite SFNT bitmaps are now handled correctly.


  II. IMPORTANT CHANGES

    - The   new  functions   `FT_Get_CID_Is_Internally_CID_keyed'  and
      `FT_Get_CID_From_Glyph_Index'  can be  used to  access CID-keyed
      CFF fonts  via CID  values.  This code  has been  contributed by
      Michael Toftdal.


  III. MISCELLANEOUS

    - `FT_Outline_Get_InsideBorder'  returns   FT_STROKER_BORDER_RIGHT
      for empty outlines.  This was incorrectly documented.

    - The `ftview' demo program now supports UTF-8 encoded strings.


======================================================================

CHANGES BETWEEN 2.3.8 and 2.3.7

  I. IMPORTANT BUG FIXES

    - CID-keyed fonts in an SFNT wrapper were not handled correctly.

    - The smooth renderer produced truncated images (on the right) for
      outline parts with negative horizontal values.  Most fonts don't
      contain outlines left  to the y coordinate axis, but  the effect
      was very noticeable for outlines processed with FT_Glyph_Stroke,
      using thick strokes.

    - `FT_Get_TrueType_Engine_Type'  returned a  wrong  value if  both
      configuration  macros  TT_CONFIG_OPTION_BYTECODE_INTERPRETER and
      TT_CONFIG_OPTION_UNPATENTED_HINTING were defined.

    - The  `face_index'  field  in   the  `FT_Face'  structure  wasn't
      initialized properly after calling FT_Open_Face and friends with
      a positive face index for CFFs,  WinFNTs, and, most importantly,
      for TrueType Collections (TTCs).


  II. IMPORTANT CHANGES

    - Rudimentary support for Type 1  fonts and CID-keyed Type 1 fonts
      in an SFNT wrapper has been  added -- such fonts are used on the
      Mac.  The core  SFNT tables `TYP1' and `CID '  are passed to the
      PS Type 1  and CID-keyed PS font drivers;  other tables (`ALMX',
      `BBOX', etc.) are not supported yet.

    - A  new interface  to extract  advance values  of glyphs  without
      loading their outlines has been added.  The functions are called
      `FT_Get_Advance' and `FT_Get_Advances'; they are defined in file
      `ftadvanc.h' (to be accessed as FT_ADVANCES_H).

    - A new function `FT_Get_FSType_Flags' (in FT_FREETYPE_H) has been
      contributed  by   David  Bevan  to  access   the  embedding  and
      subsetting restriction information of fonts.


  III. MISCELLANEOUS

    - FT_MulFix is now an inlined function; by default, assembler code
      is provided for x86 and ARM.  See FT_CONFIG_OPTION_INLINE_MULFIX
      and FT_CONFIG_OPTION_NO_ASSEMBLER (in ftoption.h) for more.

    - The handling of `tricky' fonts  (this is, fonts which don't work
      with the  autohinter, needing the font  format's hinting engine)
      has been generalized and changed slightly:

      . A new  face flag  FT_FACE_FLAG_TRICKY indicates that  the font
        format's  hinting engine is  necessary for  correct rendering.
        The macro FT_IS_TRICKY can be used to check this flag.

      . FT_LOAD_NO_HINTING is now ignored for tricky fonts.  To really
        force  raw  loading  of  such fonts  (without  hinting),  both
        FT_LOAD_NO_HINTING  and FT_LOAD_NO_AUTOHINT  must  be used  --
        this is something which you probably never want to do.

      . Tricky  TrueType fonts  always use  the  bytecode interpreter,
        either the patented or unpatented version.

    - The  function  `FT_GlyphSlot_Own_Bitmap'  has  been  moved  from
      FT_SYNTHESIS_H to FT_BITMAP_H; it  is now part of the `official'
      API.   (The functions  in  FT_SYNTHESIS_H are  still subject  to
      change, however.)

    - In the  `ftdiff'  demo  program you  can now  toggle the  use of
      FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH with key `a'.


======================================================================

CHANGES BETWEEN 2.3.7 and 2.3.6

  I. IMPORTANT BUG FIXES

    - If the library  was compiled on an i386  platform using gcc, and
      compiler  option -O3 was  given, `FT_MulFix'  sometimes returned
      incorrect  results   which  could  have   caused  problems  with
      `FT_Request_Metrics'   and  `FT_Select_Metrics',   returning  an
      incorrect descender size.

    - Pure CFFs without  subfonts were scaled incorrectly  if the font
      matrix  was  non-standard.  This  bug  has  been  introduced  in
      version 2.3.6.

    - The  `style_name'  field  in  the  `FT_FaceRec'  structure often
      contained  a wrong  value for  Type 1  fonts.  This misbehaviour
      has been  introduced  in  version  2.3.6  while  trying  to  fix
      another   problem.   [Note,  however,   that   this   value   is
      informative only  since  the  used  algorithm to  extract  it is
      very simplistic.]


  II. IMPORTANT CHANGES

    - Two      new      macros,      FT_OUTLINE_SMART_DROPOUTS     and
      FT_OUTLINE_EXCLUDE_STUBS,  have been introduced.   Together with
      FT_OUTLINE_IGNORE_DROPOUTS (which  was ignored previously) it is
      now possible to control the dropout mode  of the `raster' module
      (for B&W rasterization),   using  the   `flags'  field   in  the
      `FT_Outline' structure.

    - The TrueType bytecode interpreter now passes the dropout mode to
      the B&W rasterizer.  This greatly increases the output for small
      ppem values of many fonts like `pala.ttf'.


======================================================================

CHANGES BETWEEN 2.3.6 and 2.3.5

  I. IMPORTANT BUG FIXES

    - A  bunch of  potential security  problems have  been found.  All
      users should update.

    - Microsoft  Unicode  cmaps  in  TrueType  fonts  are  now  always
      preferred over Apple cmaps.  This is not a bug per se, but there
      exist some buggy  fonts created for MS which  have broken  Apple
      cmaps.  This affects  only the automatic  selection of FreeType;
      it's always possible to manually select an Apple Unicode cmap if
      desired.

    - Many bug fixes to the TrueType bytecode interpreter.

    - Improved Mac support.

    - Subsetted CID-keyed CFFs are now supported correctly.

    - CID-keyed CFFs with subfonts which are scaled in a  non-standard
      way are now handled correctly.

    - A call to FT_Open_Face with `face_index' < 0 crashed FreeType if
      the font was a Windows (bitmap) FNT/FON.


  II. IMPORTANT CHANGES

    - The new function `FT_Get_CID_Registry_Ordering_Supplement' gives
      access to  those fields in a CID-keyed font.  The code  has been
      contributed by Derek Clegg.

    - George Williams  contributed  code  to validate  the new  `MATH'
      OpenType  table (within  the `otvalid'  module).  The  `ftvalid'
      demo program has been extended accordingly.

    - An API for cmap 14 support  (for Unicode Variant Selectors, UVS)
      has been contributed by George Williams.

    - A new face flag FT_FACE_FLAG_CID_KEYED has been added,  together
      with a macro FT_IS_CID_KEYED which evaluates to 1 if the font is
      CID-keyed.


  III. MISCELLANEOUS

    - Build support for symbian has been contributed.

    - Better WGL4 glyph name support, contributed by Sergey Tolstov.

    - Debugging output of the  various FT_TRACEX macros is now sent to
      stderr.

    - The `ftview' demo program now provides artificial slanting too.

    - The `ftvalid' demo  program has a new  option `-f' to select the
      font index.


======================================================================

CHANGES BETWEEN 2.3.5 and 2.3.4

  I. IMPORTANT BUG FIXES

    - Some subglyphs in TrueType fonts were handled incorrectly due to
      a missing graphics state reinitialization.

    - Large .Z files  (as distributed with some X11  packages) weren't
      handled correctly, making FreeType increase the heap stack in an
      endless loop.

    - A large  number of  bugs have  been fixed  to avoid  crashes and
      endless loops with invalid fonts.


  II. IMPORTANT CHANGES

    - The  two new  cache functions  `FTC_ImageCache_LookupScaler' and
      `FTC_SBit_Cache_LookupScaler' have been added to allow lookup of
      glyphs using an  `FTC_Scaler' object;  this makes it possible to
      use fractional pixel sizes in the cache.  The demo programs have
      been updated accordingly to use this feature.

    - A new API  `FT_Get_CMap_Format' has been added to  get the  cmap
      format  of a  TrueType font.   This  is useful  in handling  PDF
      files.  The code has been contributed by Derek Clegg.

    - The  auto-hinter  now  produces  better  output  by  default for
      non-Latin scripts  like Indic.   This was done by  using the CJK
      hinting module  as the default instead of the Latin one.  Thanks
      to Rahul Bhalerao for this suggestion.

    - A new API `FT_Face_CheckTrueTypePatents'  has been added to find
      out  whether  a  given  TrueType  font  uses  patented  bytecode
      instructions.   The  `ft2demos' bundle  contains a  new  program
      called `ftpatchk' which demonstrates its usage.

    - A  new  API  `FT_Face_SetUnpatentedHinting'  has  been  added to
      enable or disable the unpatented hinter.

    - Support for Windows FON files in PE format  has been contributed
      by Dmitry Timoshkov.


  III. MISCELLANEOUS

    - Vincent Richomme contributed Visual C++ project files for Pocket
      PCs.


======================================================================

CHANGES BETWEEN 2.3.4 and 2.3.3

  I. IMPORTANT BUG FIXES

    - A serious  bug  in  the  handling  of bitmap  fonts (and  bitmap
      strikes of outline fonts) has been introduced in 2.3.3.


======================================================================

CHANGES BETWEEN 2.3.3 and 2.3.2

  I. IMPORTANT BUG FIXES

    - Remove a serious regression in the TrueType bytecode interpreter
      that was introduced  in version 2.3.2.  Note that  this does not
      disable  the  improvements  introduced  to  the  interpreter  in
      version 2.3.2,  only some ill  cases that occurred  with certain
      fonts (though a few popular ones).

    - The auto-hinter now  ignores single-point contours for computing
      blue zones.   This bug  created `wavy' baselines  when rendering
      text  with  various  fonts  that  use these  contours  to  model
      mark-attach points  (these are points that  are never rasterized
      and are placed outside of the glyph's real outline).

    - The `rsb_delta' and `lsb_delta' glyph slot fields are now set to
      zero for mono-spaced fonts.  Otherwise code that uses them would
      essentially ruin the fixed-advance property.

    - Fix  CVE-2007-1351 which  can  cause an  integer overflow  while
      parsing  BDF fonts,  leading to  a potentially  exploitable heap
      overflow condition.


  II. MISCELLANEOUS

    - Fixed compilation issues on some 64-bit platforms (see ChangeLog
      for details).

    - A new demo  program `ftdiff' has been added  to compare TrueType
      hinting, FreeType's auto  hinting, and rendering without hinting
      in three columns.


======================================================================

CHANGES BETWEEN 2.3.2 and 2.3.1

  I. IMPORTANT BUG FIXES

    - FreeType  returned incorrect  kerning information  from TrueType
      fonts when the bytecode  interpreter was enabled.  This happened
      due to a typo introduced in version 2.3.0.

    - Negative  kerning  values  from   PFM  files  are  now  reported
      correctly  (they were read  as 16-bit  unsigned values  from the
      file).

    - Fixed  a small  memory leak  when `FT_Init_FreeType'  failed for
      some reason.

    - The Postscript hinter placed and sized very thin and ghost stems
      incorrectly.

    - The TrueType bytecode  interpreter has been fixed to  get rid of
      most of the  rare differences seen in comparison  to the Windows
      font loader.


  II. IMPORTANT CHANGES

    - The auto-hinter  now better deals  with serifs and  corner cases
      (e.g.,  glyph '9'  in Arial  at 9pt,  96dpi).  It  also improves
      spacing  adjustments and doesn't  change widths  for non-spacing
      glyphs.

    - Many   Mac-specific   functions   are  deprecated   (but   still
      available);  modern replacements  have been  provided  for them.
      See the documentation in file `ftmac.h'.


======================================================================

CHANGES BETWEEN 2.3.1 and 2.3.0

  I. IMPORTANT BUG FIXES

    - The TrueType interpreter sometimes returned incorrect horizontal
      metrics due to a bug in the handling of the SHZ instruction.

    - A typo  in  a  security  check  introduced  after  version 2.2.1
      prevented FreeType to render some glyphs in CFF fonts.


======================================================================

CHANGES BETWEEN 2.3.0 and 2.2.1

  I. IMPORTANT BUG FIXES

    - The  PCF font  loader  is  now much  more  robust while  loading
      malformed font files.

    - Various memory leaks have been found and fixed.

    - The TrueType name loader now deals properly with some fonts that
      encode their  names in UTF-16 (the specification  was vague, and
      the code incorrectly assumed UCS-4).

    - Fixed the TrueType bytecode  loader to deal properly with subtle
      monochrome/gray  issues  when   scaling  the  CVT.   Some  fonts
      exhibited bad rendering artifacts otherwise.

    - `FT_GlyphSlot_Embolden' now  supports vertical layouts correctly
      (it mangled the vertical advance height).

    - Fixed byte  endian issues  of `ftmac.c' to  support Mac OS  X on
      i386.

    - The  PFR  font loader  no  longer  erroneously  tags font  files
      without any outlines as FT_FACE_FLAG_SCALABLE.


  II. NEW API FUNCTIONS

    - `FT_Library_SetLcdFilter' allows you  to select a special filter
      to be  applied to the bitmaps generated  by `FT_Render_Glyph' if
      one of the FT_RENDER_MODE_LCD and FT_RENDER_MODE_LCD_V modes has
      been  selected.  This filter  is used  to reduce  color fringes;
      several  settings are  available  through the  FT_LCD_FILTER_XXX
      enumeration.

      Its  declaration   and  documentation  can  be   found  in  file
      `include/freetype/ftlcdfil.h'   (to  be   accessed   with  macro
      FT_LCD_FILTER_H).

      *IMPORTANT*:     This      function     returns     an     error
      (FT_Err_Unimplemented_Feature) in default  builds of the library
      for patent reasons.  See below.

    - `FT_Get_Gasp'  allows you  to query  the flags  of  the TrueType
      `gasp' table for  a given character pixel size.   This is useful
      to duplicate  the text rendering  of MS Windows when  the native
      bytecode  interpreter is  enabled (which  isn't the  default for
      other patent reasons).

      Its  declaration   and  documentation  can  be   found  in  file
      `include/freetype/ftgasp.h'   (to   be   accessed   with   macro
      FT_GASP_H).


  III. IMPORTANT CHANGES

    - The auto-hinter has been tuned a lot to improve its results with
      serif fonts, resulting in much better font rendering of many web
      pages.

    - The unpatented  hinter is now part  of the default  build of the
      library; we  have added  code to automatically  support `tricky'
      fonts that need it.

      This means  that FreeType should `just work'  with certain Asian
      fonts, like  MingLiU, which cannot properly be  loaded without a
      bytecode interpreter,  but which fortunately  do not use  any of
      the patented  bytecode opcodes.  We detect these  fonts by name,
      so please  report any font file  that doesn't seem  to work with
      FreeType, and  we shall do what we  can to support it  in a next
      release.

      Note  that  the API  hasn't  changed,  so  you can  still  force
      unpatented hinting with a special parameter to `FT_Open_Face' as
      well.  This  might be useful in  same cases; for  example, a PDF
      reader might present  a user option to activate  it to deal with
      certain  `tricky'   embedded  fonts  which   cannot  be  clearly
      identified.

      If you are  a developer for embedded systems,  you might want to
      *disable*  the   feature  to  save  code   space  by  undefining
      TT_CONFIG_OPTION_UNPATENTED_HINTING in file `ftoption.h'.

    - LCD-optimized rendering is now  *disabled* in all default builds
      of  the  library,  mainly   due  to  patent  issues.   For  more
      information see:

      https://lists.gnu.org/archive/html/freetype/2006-09/msg00064.html

      A  new  configuration macro  FT_CONFIG_OPTION_SUBPIXEL_RENDERING
      has been introduced in  `ftoption.h'; manually define it in this
      file if you want to re-enable the feature.

      The  change only  affects the  implementation, not  the FreeType
      API.  This means that clients don't need to be modified, because
      the library still generates  LCD decimated bitmaps, but with the
      added constraint that R=G=B on each triplet.

      The  displayed result  should  be equal  to normal  anti-aliased
      rendering.

      Additionally,  if   FT_CONFIG_OPTION_SUBPIXEL_RENDERING  is  not
      defined, the new  `FT_Library_SetLcdFilter' function returns the
      FT_Err_Unimplemented_Feature error code.

    - Some computation bugs in  the TrueType bytecode interpreter were
      found,  which  allow us  to  get rid  of  very  subtle and  rare
      differences we had experienced with the Windows renderer.

    - It is now possible to cross-compile the library easily.  See the
      file `docs/INSTALL.CROSS' for details.

    - The file `src/base/ftmac.c' now contains code for Mac OS X only;
      its  deprecated function  `FT_GetFile_From_Mac_Font_Name' always
      returns an  error even if the QuickDraw  framework is available.
      The previous version has been moved to `builds/mac/ftmac.c'.

      Selecting  configure option `--with-quickdraw-carbon'  makes the
      build process use the original `ftmac.c' file instead of the Mac
      OS X-only version.


  IV. MISCELLANEOUS

    - Various performance and memory footprint optimizations have been
      performed on  the TrueType and CFF font  loaders, sometimes with
      very drastic  benefits (e.g., the  TrueType loader is  now about
      25% faster;  FreeType should use  less heap memory  under nearly
      all conditions).

    - The anti-aliased rasterizer has been optimized and is now 15% to
      25%  percent  faster than  in  previous  versions, depending  on
      content.

    - The Type 1 loader has been improved; as an example, it now skips
      top-level dictionaries properly.

    - Better support for Mac  fonts on POSIX systems, plus compilation
      fixes for Mac OS X on ppc64 where `ftmac.c' cannot be built.

    - Configuration  without `--with-old-mac-fonts'  does  not include
      `ftmac.c' (this was the behaviour in FreeType version 2.1.10).

    - The TrueTypeGX validator (gxvalid) checks the order of glyph IDs
      in the kern table.


======================================================================

CHANGES BETWEEN 2.2.1 and 2.2

  I. IMPORTANT BUG FIXES

    - Various integer overflows have been fixed.

    - PFB fonts with MacOS resource fork weren't  handled correctly on
      non-MacOS platforms.


======================================================================

CHANGES BETWEEN 2.2 and 2.1.10

(not released officially)

  I. IMPORTANT BUG FIXES

    - Vertical metrics for SFNT fonts were incorrect sometimes.

    - The FT_HAS_KERNING macro always returned 0.

    - CFF OpenType  fonts didn't  return correct vertical  metrics for
      glyphs with outlines.

    - If FreeType was compiled without hinters, all font formats based
      on PS outlines weren't scaled correctly.


  II. IMPORTANT CHANGES

    - Version 2.2 no longer exposes its internals, this is, the header
      files  located in  the `include/freetype/internal'  directory of
      the source package are not  copied anymore by the `make install'
      command.  Consequently, a number of rogue clients which directly
      access  FreeType's  internal   functions  and  structures  won't
      compile without modification.

      We provide  patches for  most of those  rogue clients.   See the
      following page for more information:

        https://www.freetype.org/freetype2/patches/rogue-patches.html

      Note that, as  a convenience to our Unix  desktop users, version
      2.2 is *binary* compatible with FreeType 2.1.7, which means that
      installing this  release on  an existing distribution  shall not
      break any working desktop.

    - FreeType's build  mechanism has been redesigned.   With GNU make
      it  is  now  sufficient  in   most  cases  to  edit  two  files:
      `modules.cfg',  to  select   the  library  components,  and  the
      configuration  file  `include/freetype/config/ftoption.h' (which
      can be copied to the objects directory).  Removing unused module
      directories   to    prevent   its   compilation    and   editing
      `include/freetype/config/ftmodule.h' is no longer necessary.

    - The  LIGHT  hinting algorithm  produces  more pleasant  results.
      Also, using the  FT_LOAD_TARGET_LIGHT flags within FT_Load_Glyph
      always forces auto-hinting, as a special exception.  This allows
      you to experiment with it  even if you have enabled the TrueType
      bytecode interpreter in your build.

    - The auto hinter now employs a new algorithm for CJK fonts, based
      on Akito  Hirai's patch.   Note that this  only works  for fonts
      with a Unicode charmap at the moment.

    - The following callback function  types have changed slightly (by
      adding the `const' keyword where appropriate):

        FT_Outline_MoveToFunc
        FT_Outline_LineToFunc
        FT_Outline_ConicToFunc
        FT_Outline_CubicToFunc
        FT_SpanFunc
        FT_Raster_RenderFunc

        FT_Glyph_TransformFunc
        FT_Renderer_RenderFunc
        FT_Renderer_TransformFunc

      Note that this doesn't affect binary backward compatibility.

    - On MacOS,  new APIs have  been added as replacements  for legacy
      APIs:  `FT_New_Face_From_FSRef'  for  `FT_New_Face_From_FSSpec',
      and              `FT_GetFile_From_Mac_ATS_Name'              for
      `FT_GetFile_From_Mac_Name'.  Legacy APIs are still available, if
      FreeType is built without disabling them.

    - A new  API `FT_Select_Size'  has been added  to select  a bitmap
      strike  by its  index.   Code using  other  functions to  select
      bitmap strikes should be updated to use this function.

    - A  new API  `FT_Get_SubGlyph_Info'  has been  added to  retrieve
      subglyph data.  This can be  used by rogue clients which used to
      access the internal headers to get the corresponding data.

    - In 2.1.10, the behaviour of `FT_Set_Pixel_Sizes' was changed for
      BDF/PCF fonts,  and only  for them.  This  causes inconsistency.
      In this release,  we undo the change.  The  intent of the change
      in 2.1.10  is to allow  size selection through  real dimensions,
      which can now be done through `FT_Request_Size'.

    - Some security  issues were discovered  and fixed in the  CFF and
      Type  1 loader, causing  crashes of  FreeType by  malformed font
      files.


  III. MISCELLANEOUS

    - The documentation  for FT_LOAD_TARGET_XXX and FT_RENDER_MODE_XXX
      values now better reflects its usage and differences: One set is
      used to specify the hinting algorithm, the other to specify  the
      pixel rendering mode.

    - `FT_New_Face' and `FT_New_Face_From_FSSpec' in ftmac.c have been
      changed to count supported scalable faces (sfnt, LWFN) only, and
      to  return the  number of  available faces  via face->num_faces.
      Unsupported bitmap faces (fbit, NFNT) are ignored.

    - builds/unix/configure  has been  improved for  MacOS X.   It now
      automatically checks available  functions in Carbon library, and
      prepare to use newest  functions by default.  Options to specify
      the  dependencies of  each Carbon  APIs (FSSpec,  FSRef, old/new
      QuickDraw, ATS)  are available too.  By manual  disabling of all
      QuickDraw   functionality,  FreeType   can   be  built   without
      `deprecated   function'   warnings    on   MacOS   10.4.x,   but
      FT_GetFile_Mac_Name  in  ftmac.c  then  is changed  to  a  dummy
      function, and returns an `unimplemented' error.  For details see
      builds/mac/README.

    - SFNT cmap handling has been  improved, mainly to run much faster
      with CJK fonts.

    - A   new  function   `FT_Get_TrueType_Engine_Type   (declared  in
      `FT_MODULE_H')  is  provided  to  determine the  status  of  the
      TrueType   bytecode  interpreter   compiled  into   the  library
      (patented, unpatented, unimplemented).

    - Vertical metrics of glyphs are  synthesized if the font does not
      provide such information.  You can tell whether  the metrics are
      synthesized or not by checking the FT_FACE_FLAG_VERTICAL flag of
      the face.

    - The demo programs  `ftview' and  `ftstring' have been  rewritten
      for better readability.   `ftview' has a new switch `-p' to test
      FT_New_Memory_Face (instead of FT_New_Face).

    - FreeType now honours bit 1 in the `head' table of TrueType fonts
      (meaning `left sidebearing point at x=0').  This helps with some
      buggy fonts.

    - Rudimentary support for Adobe's new `SING Glyphlet' format.  See

        https://www.adobe.com/content/dam/acom/en/devnet/font/pdfs/5148.SING_Tutorial.pdf

      for more information.

    - The `ftdump'  program from the `ft2demos' bundle  now shows some
      information about charmaps.  It  also supports a new switch `-v'
      to increase verbosity.

    - Better AFM support.  This includes track kerning support.


======================================================================

CHANGES BETWEEN 2.1.10 and 2.1.9

  I. IMPORTANT BUG FIXES

    - The size comparison for BDF and PCF files could fail sometimes.

    - Some  CFF files  were still not  loaded  correctly.   Patch from
      Derek Noonburg.

    - The stroker still had some serious bugs.

    - Boris  Letocha  fixed a  bug in  the  TrueType interpreter:  The
      NPUSHW instruction wasn't skipped correctly in IF clauses.  Some
      fonts like `Helvetica 75 Bold' failed.

    - Another  serious  bug  in  handling  TrueType hints  caused many
      distortions.  It has been introduced in version 2.1.8, and it is
      highly recommended to upgrade.

    - FreeType didn't properly parse empty Type 1 glyphs.

    - An unbound dynamic buffer growth was fixed in the PFR loader.

    - Several bugs have been fixed in the cache sub-system.

    - FreeType behaved incorrectly when resizing two distinct but very
      close character pixel sizes through `FT_Set_Char_Size' (Savannah
      bug #12263).

    - The auto-hinter didn't work properly for fonts without a Unicode
      charmap -- it even refused to load the glyphs.


  II. IMPORTANT CHANGES

    - Many fixes have been applied to drastically reduce the amount of
      heap   memory   used   by   FreeType,   especially   when  using
      memory-mapped font files  (which is the default on Unix  systems
      which support them).

    - The auto-hinter  has been replaced with a new module, called the
      `auto-fitter'.  It consumes  less memory  than its  predecessor,
      and it is  prepared to support non-latin scripts  better in next
      releases.

    - George Williams  contributed code to read  kerning data from PFM
      files.

    - FreeType   now   uses    the   TT_NAME_ID_PREFERRED_FAMILY   and
      TT_NAME_ID_PREFERRED_SUBFAMILY   strings   (if   available)  for
      setting  family  and  style in SFNT  fonts  (patch from Kornfeld
      Eliyahu Peter).

    - A  new  API `FT_Sfnt_Table_Info'  (in FT_TRUETYPE_TABLES_H)  has
      been added to retrieve name and size information of SFNT tables.

    - A new API `FT_OpenType_Validate' (in FT_OPENTYPE_VALIDATE_H) has
      been added to validate OpenType tables  (BASE, GDEF, GPOS, GSUB,
      JSTF).   After validation  it is  no longer  necessary to  check
      for errors in those tables while accessing them.

      Note that  this module might  be moved to another library in the
      future  to avoid  a tight  dependency between  FreeType and  the
      OpenType specification.

    - A new API in FT_BITMAP_H  (`FT_Bitmap_New', `FT_Bitmap_Convert',
      `FT_Bitmap_Copy',  `FT_Bitmap_Embolden',  `FT_Bitmap_Done')  has
      been added.   Its  use is  to convert an  FT_Bitmap structure in
      1bpp, 2bpp,  4bpp, or 8bpp  format into  another 8bpp FT_Bitmap,
      probably using a different pitch, and to further manipulate it.

    - A new  API `FT_Outline_Embolden'  (in FT_OUTLINE_H) gives  finer
      control how outlines are emboldened.

    - `FT_GlyphSlot_Embolden' (in FT_SYNTHESIS_H)  now handles bitmaps
      also (code contributed  by Chia I Wu).  Note that this  function
      is still experimental and may be replaced with a better API.

    - The method  how BDF and PCF  bitmap fonts  are accessed has been
      refined.   Formerly,   FT_Set_Pixel_Sizes  and  FT_Set_Char_Size
      were  synonyms in  FreeType's  BDF and PCF interface.  This  has
      changed now.  FT_Set_Pixel_Sizes  should be  used to  select the
      actual  font dimensions  (the `strike',  which is the sum of the
      `FONT_ASCENT'    and    `FONT_DESCENT'    properties),     while
      FT_Set_Char_Size  selects  the  `nominal' size  (the `PIXELSIZE'
      property).  In both functions, the width parameter is ignored.


  III. MISCELLANEOUS

    - The BDF driver  no longer converts  all returned bitmaps  with a
      depth of 2bpp or 4bpp to a depth of 8bpp.  The documentation has
      not  mentioned  this  explicitly,  but  implementors  might have
      relied on this after looking into the source files.

    - A new option `--ftversion' has been  added to freetype-config to
      return the FreeType version.

    - The  memory  debugger  has  been  updated   to  dump  allocation
      statistics on  all allocation  sources in the library.   This is
      useful to  spot greedy  allocations when  loading and processing
      fonts.

    - We removed a huge array of constant pointers to constant strings
      in the `psnames' module.   The problem was that  compilations in
      PIC mode (i.e.,  when generating a  Unix shared object/dll)  put
      the array  into the non-shared  writable section of  the library
      since absolute pointers are not relocatable by nature.

      This reduces the memory consumption by approximately 16KByte per
      process linked  to FreeType.   We now also store  the array in a
      compressed form (as a trie) which saves about 20KByte of code as
      well.

    - Kirill  Smelkov provided  patches to make  src/raster/ftraster.c
      compile stand-alone again.


======================================================================

CHANGES BETWEEN 2.1.9 and 2.1.8

  I. IMPORTANT BUG FIXES

    - The function  `FT_Get_CharMap_Index' was only declared,  without
      any  real  code.   For  consistency,  it  has  been  renamed  to
      `FT_Get_Charmap_Index'.   (This function is needed  to implement
      cmap caches.)

    - `FT_Outline_Get_BBox'  sometimes returned  incorrect values  for
      conic outlines (e.g., for TrueType fonts).

    - Handling of `bhed' table has been fixed.

    - The TrueType driver with enabled byte code interpreter sometimes
      returned artifacts due to incorrect rounding.  This bug has been
      introduced after version 2.1.4.

    - The BDF driver dropped the last glyph in the font.

    - The BDF driver now uses the DEFAULT_CHAR property (if available)
      to select a glyph shape for the undefined glyph.

    - The stroker failed for closed outlines and single points.


  II. IMPORTANT CHANGES

    - George  Williams   contributed  code  to   handle  Apple's  font
      distortion technology found in GX fonts (`avar', `cvar', `fvar',
      and `gvar' tables;  the Multiple Masters  API has been  slightly
      extended to cope with the new functionality).

    - The `FT_GlyphSlotRec' structure has been extended:  The elements
      `lsb_delta' and  `rsb_delta' give the difference  between hinted
      and  unhinted  left and right  side bearings  if autohinting  is
      active.  Using those values can improve the inter-letter spacing
      considerably.   See the documentation of  `FT_GlyphSlotRec'  and
      the `ftstring' demo program how to use it.

    - Loading TrueType and Type 1 fonts has been made much faster.

    - The stroker is  no longer experimental (but the  cache subsystem
      still is).


  III. MISCELLANEOUS

    - A new  documentation file  `formats.txt' describes various  font
      formats supported (and not supported) by FreeType.


======================================================================

CHANGES BETWEEN 2.1.8 and 2.1.7

  I. IMPORTANT BUG FIXES

    - The native  TrueType hinter contained some  bugs which prevented
      some fonts to be rendered correctly, most notably Legendum.otf.

    - The PostScript hinter now produces improved results.

    - The  linear advance  width  and height  values were  incorrectly
      rounded,  making  them virtually  unusable  if  not loaded  with
      FT_LOAD_LINEAR_DESIGN.

    - Indexing CID-keyed CFF fonts is  now working: The glyph index is
      correctly  treated as a  CID, similar  to FreeType's  CID driver
      module.  Note that CID CMap support is still missing.

    - The FT_FACE_FLAG_GLYPH_NAMES flag  is now  set correctly for all
      font formats.

    - Some subsetted Type 1  fonts weren't parsed correctly.  This bug
      has been introduced in 2.1.7.  In summary, the Type 1 parser has
      become more robust.

    - Non-decimal numbers weren't parsed correctly in PS fonts.

    - The WinFNT driver now correctly reports FT_ENCODING_NONE for all
      but one encoding.  Use  the new FT_WinFNT_ID_XXX values together
      with `FT_Get_WinFNT_Header' to get the WinFNT charset ID.

    - The descender metrics (face->size->metrics.descender) for WinFNT
      bitmap fonts had the wrong sign.

    - The (emulated) `seac' support for CFF fonts was broken.

    - The `flex' operator didn't work for CFF fonts.

    - PS glyphs  which  use  the   `hintmask'  operator  haven't  been
      rendered correctly in some cases.

    - Metrics for BDF and PCF bitmap font formats have been fixed.

    - Autohinting  is now  disabled for  glyphs  which  are vertically
      distorted  or mirrored  (using a  transformation matrix).   This
      fixes a bug which produced zero-height glyphs.

    - The   `freetype-config'   script   now  handles   --prefix   and
      --exec-prefix correctly; it also  returns the proper --rpath (or
      -R) value if FreeType has been built as a shared library.


  II. IMPORTANT CHANGES

    - Both  PCF  and BDF  drivers  now  handle  the SETWIDTH_NAME  and
      ADD_STYLE_NAME    properties.     Values    are   appended    to
      face->style_name; example: `Bold SemiCondensed'.

    - The PCF driver now handles bitmap  fonts compressed with the LZW
      algorithm (extension .pcf.Z, compressed with `compress').

    - A  new  API   function  `FT_Get_CMap_Language_ID'  (declared  in
      `tttables.h')  is  available  to   get  the  language  ID  of  a
      TrueType/SFNT cmap.

    - The hexadecimal format of  data after the `StartData' command in
      CID-keyed Type 1 fonts is now supported.  While this can't occur
      in  file-based   fonts,  it  can   happen  in  document-embedded
      resources of PostScript documents.

    - Embedded bitmaps in SFNT-based CFF fonts are now supported.

    - A simple  API is  now available  to control  FreeType's  tracing
      mechanism if compiled  with FT_DEBUG_LEVEL_TRACE.   See the file
      `ftdebug.h' for more details.

    - YAMATO Masatake contributed improved  handling of MacOS resource
      forks on non-MacOS platforms (for example, Linux can mount MacOS
      file systems).

    - Support for MacOS has been improved; there is now a new function
      `FT_New_Face_From_FSSpec'  similar to `FT_New_Face'  except that
      it accepts an FSSpec instead of a path.

    - The cache sub-system has been rewritten.

      - There is now support for deinstallation of faces.

      - A new  API function `FTC_Manager_RemoveFaceID'  has been added
        to  delete  all  `idle'  nodes  that  correspond  to  a  given
        FTC_FaceID.  All `locked' nodes  (i.e., those with a reference
        count > 0), will be modified to prevent them from appearing in
        further  lookups (they  will  be cleaned  normally when  their
        reference count reaches 0).

      - There  is  now  support  for point  scaling  (i.e.,  providing
        character sizes in points + dpis, instead of pixels).

      - Three abstract cache classes are now available:

          FTC_GCache:  Used to store  one glyph  item per  cache node,
                      with the ability to group common attributes into
                      `families'.      This    replaces     the    old
                      FTC_GlyphCache class.

          FTC_ICache: Used to store one FT_Glyph per cache node.  This
                      extends  FTC_GCache.  Family  definition, family
                      comparison, and  glyph loading are  however left
                      to sub-classes.

          FTC_SCache: Used to  store up to 16 small  bitmaps per cache
                      node.    This    extends   FTC_GCache.    Family
                      definition, family  comparison and glyph loading
                      are however left to sub-classes.

      - The file `src/cache/ftcbasic.c' implements:

          FTC_ImageCache: Extends    FTC_ICache;   implements   family
                          definitions and glyph loading similar to the
                          old API.

          FTC_SBitCache: Extends    FTC_SCache,    implements   family
                         definitions and glyph  loading similar to the
                         old API

        Client  applications  should  be  able to  extend  FTC_GCache,
        FTC_ICache, or FTC_SCache much more easily (i.e., less code to
        write, and  less callbacks).  For example,  one could envision
        caches  that are  capable of  storing  transformed (obliqued),
        stroked,   emboldened,   or   colored   glyph   images.    Use
        `ftcbasic.c' as an example.

      - All public  APIs are now  in `include/freetype/ftcache.h', (to
        be    accessed   as    `FT_CACHE_H').     The   contents    of
        `include/freetype/cache/' is only  needed by applications that
        wish to implement their own caches.

      - There were some major performance improvements through the use
        of  various programming  tricks.   Cache hits  are  up to  70%
        faster than in the old code.

      - The  FTC_CMapCache has  been simplified.  Charmaps can only be
        accessed by  index right now.  There  is also a  new API named
        `FT_Charmap_GetIndex' for this purpose.

      - The  demo programs  have been  updated to  the new  code.  The
        previous versions will not work with the current one.

      - Using  an invalid face  index in FT_Open_Face and friends  now
        causes an error even if the font contains a single face only.


  III. MISCELLANEOUS

    - Wolfgang Domröse contributed support files for building FreeType
      on the Atari using the PureC compiler.  Note that the Atari is a
      16bit platform.

    - Vitaliy Pasternak contributed project files for VS.NET 2003.


======================================================================

CHANGES BETWEEN 2.1.7 and 2.1.6

  I. IMPORTANT BUG FIXES

    - Updated  to newest  libtool  version, fixing  build problems  on
      various platforms.

    - On  Unix  platforms,  `make  install' didn't  copy  the  correct
      `ftconfig.h' file.

  Note that version 2.1.7  contains the same library  C source code as
  version 2.1.6.


======================================================================

CHANGES BETWEEN 2.1.6 and 2.1.5

  I. IMPORTANT BUG FIXES

    - The PFR  font driver didn't  load kerning tables  correctly, and
      the functions in FT_PFR_H didn't work at all.

    - Type 1 font  files in  binary format  (PFB) with  an end-of-file
      indicator weren't accepted by the FreeType engine.

    - Fonts which contain /PaintType  and /StrokeWidth no longer cause
      a segfault.  This bug has been introduced in version 2.1.5.

    - Fonts  loaded  with   FT_LOAD_RENDER  no  longer  cause  strange
      results.  This bug has been introduced in version 2.1.5.

    - Some  Windows   (bitmap)  FNT/FON  files   couldn't  be  handled
      correctly.


  II. IMPORTANT CHANGES

    - The internal  module API  has been heavily  changed in  favor of
      massive simplifications within the font engine.  This also means
      that authors of third-party modules must adapt their code to the
      new scheme.

      NOTE:  THE NEW SCHEME IS NOT COMPLETED YET.  PLEASE WAIT UNTIL A
      FINAL ANNOUNCEMENT!

    - The PostScript  parser has been enhanced to  handle comments and
      strings   correctly.   Additionally,   more  syntax   forms  are
      recognized.

    - Added the  optional unpatented hinting system  for TrueType.  It
      allows  typefaces which  need hinting  to produce  correct glyph
      forms (e.g., Chinese typefaces  from Dynalab) to work acceptably
      without infringing Apple patents.   This system is compiled only
      if  TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING  is  defined  in
      ftoption.h (activated by default).


  III. MISCELLANEOUS

    - There  is now  a guard  in the  public header  files  to protect
      against inclusion of freetype.h from FreeType 1.

    - Direct inclusion of freetype.h  and other public header files no
      longer works.  You have to use the documented scheme

        #include <ft2build.h>
        #include FT_FREETYPE_H

      to load freetype.h with  a symbolic name.  This protects against
      renaming  of public  header  files (which  shouldn't happen  but
      actually  has, avoiding two  public header  files with  the same
      name).


======================================================================

CHANGES BETWEEN 2.1.5 and 2.1.4

  I. IMPORTANT BUG FIXES

    - Parsing the /CIDFontName field  now removes the leading slash to
      be in sync with other font drivers.

    - gzip support was buggy.  Some fonts could not be read.

    - Fonts which  have nested subglyphs  more than one level  deep no
      longer cause a segfault.

    - Creation of synthetic  cmaps for fonts in CFF  format was broken
      partially.

    - Numeric  font  dictionary entries  for  synthetic  fonts are  no
      longer overwritten.

    - The font matrix  wasn't applied to the advance  width for Type1,
      CID, and  CFF fonts.  This caused problems  when loading certain
      synthetic Type 1 fonts like `Helvetica Narrow'.

    - The test  for the charset registry  in BDF and PCF  fonts is now
      case-insensitive.

    - FT_Vector_Rotate  sometimes  returned   strange  values  due  to
      rounding errors.

    - The  PCF  driver  now  returns  the  correct  number  of  glyphs
      (including an artificial `notdef' glyph at index 0).

    - FreeType now  supports buggy CMaps  which are contained  in many
      CJK fonts from Dynalab.

    - Opening  an invalid  font  on a  Mac  caused a  segfault due  to
      double-freeing memory.

    - BDF  fonts  with  more   than  32768  glyphs  weren't  supported
      properly.


  II. IMPORTANT CHANGES

    - Accessing bitmap font formats has been synchronized.  To do that
      the FT_Bitmap_Size  structure has  been extended to  contain new
      fields `size', `x_ppem', and `y_ppem'.

    - The FNT driver now returns multiple faces, not multiple strikes.

    - The `psnames'  module has been  updated to the Adobe  Glyph List
      version 2.0.

    - The `psnames' module now understands `uXXXX[X[X]]' glyph names.

    - The algorithm for guessing the font style has been improved.

    - For fonts in SFNT format, root->height is no longer increased if
      the line gap  is zero.  There exist fonts  (containing e.g. form
      drawing  characters) which  intentionally have  a zero  line gap
      value.

    - ft_glyph_bbox_xxx  flags   are  now  deprecated   in  favour  of
      FT_GLYPH_BBOX_XXX.

    - ft_module_xxx   flags   are   now   deprecated  in   favour   of
      FT_MODULE_XXX.

    - FT_ENCODING_MS_{SJIS,GB2312,BIG5,WANSUNG,JOHAB}      are     now
      deprecated               in               favour              of
      FT_ENCODING_{SJIS,GB2312,BIG5,WANSUNG,JOHAB}  -- those encodings
      are not specific to Microsoft.


  III. MISCELLANEOUS

    - The  autohinter  has been  further  improved;  for example,  `m'
      glyphs now retain its vertical symmetry.

    - Partial support of Mac fonts on non-Mac platforms.

    - `make   refdoc'   (after   first   `make')   builds   the   HTML
      documentation.  You need Python for this.

    - The make build system should  now work more reliably on DOS-like
      platforms.

    - Support for  EMX gcc  and Watson C/C++  compilers on  MS-DOS has
      been added.

    - Better VMS build support.

    - Support for the pkg-config  package by providing a `freetype.pc'
      file.

    - New configure option --with-old-mac-fonts for Darwin.

    - Some source files have been  renamed (mainly to fit into the 8.3
      naming scheme).


======================================================================

CHANGES BETWEEN 2.1.4 and 2.1.3

  I. IMPORTANT BUG FIXES

    - Updated  to newest  libtool  version, fixing  build problems  on
      various platforms.

    - A fix  in the Gzip stream  reader: It couldn't  read certain .gz
      files properly due to a  small typo.  In certain cases, FreeType
      could  also loop  endlessly  when trying  to  load tiny  gzipped
      files.

    - The configure script now tries  to use the system-wide zlib when
      it  finds one  (instead of  the  copy found  in src/gzip).   And
      `freetype-config' has  been updated to return  relevant flags in
      this case when invoked with `--libs' (e.g. `-lzlib').

    - Certain fonts couldn't be loaded  by 2.1.3 because they lacked a
      Unicode   charmap  (e.g.   SYMBOL.TTF).    FreeType  erroneously
      rejected them.

    - The CFF loader was modified to accept fonts which only contain a
      subset of  their reference charset.  This  prevented the correct
      use of PDF-embedded fonts.

    - The logic to detect Unicode charmaps has been modified.  This is
      required to  support fonts which include both  16-bit and 32-bit
      charmaps (like very  recent asian ones) using the  new 10 and 12
      SFNT formats.

    - The TrueType  loader now limits  the depth of  composite glyphs.
      This is necessary to prevent broken fonts to break the engine by
      blowing the stack with recursive glyph definitions.

    - The CMap cache is now  capable of managing UCS-4 character codes
      that   are   mapped   through   extended  charmaps   in   recent
      TrueType/OpenType fonts.

    - The   cache  sub-system   now  properly   manages  out-of-memory
      conditions  instead of  blindly  reporting them  to the  caller.
      This means that it will try to empty the cache before restarting
      its allocations to see if that can help.

    - The  PFR driver  didn't return  the list  of  available embedded
      bitmaps properly.

    - There was  a nasty  memory leak when  using embedded  bitmaps in
      certain font formats.


  II. IMPORTANT CHANGES

    - David Chester  contributed some enhancements  to the auto-hinter
      that  significantly increase  the  quality of  its output.   The
      Postscript hinter was also improved in several ways.

    - The FT_RENDER_MODE_LIGHT render mode was implemented.

    - A new  API function called `FT_Get_BDF_Property'  has been added
      to FT_BDF_H to  retrieve BDF properties from BDF  _and_ PCF font
      files.   THIS  IS  STILL  EXPERIMENTAL,  since  it  hasn't  been
      properly tested yet.

    - A Windows FNT specific API has been added, mostly to access font
      headers.  This is used by Wine.

    - TrueType tables  without an `hmtx' table are  now tolerated when
      an  incremental interface  is  used.  This  happens for  certain
      Type42 fonts passed from Ghostscript to FreeType.

    - The PFR font driver is  now capable of returning the font family
      and style  names when  they are available  (instead of  the sole
      `FontID').   This  is  performed  by parsing  an  *undocumented*
      portion of the font file!


  III. MISCELLANEOUS

    - The path stroker in FT_STROKER_H has entered beta stage.  It now
      works very  well, but  its interface might  change a bit  in the
      future.  More on this in later releases.

    - The documentation for  FT_Size_Metrics didn't appear properly in
      the API reference.

    - The file docs/VERSION.DLL has been updated to explain versioning
      with FreeType  (i.e., comparing release/libtool/so  numbers, and
      how to use them in autoconf scripts).

    - The  installation  documentation  has been  seriously  revamped.
      Everything is now in the `docs' directory.


======================================================================

CHANGES BETWEEN 2.1.3 and 2.1.2

  I. IMPORTANT BUG FIXES

    - FT_Vector_Transform  had  been  incorrectly modified  in  2.1.2,
      resulting  in  incorrect   transformations  being  applied  (for
      example, rotations were processed in opposite angles).

    - The format  8 and 12 TrueType charmap  enumeration routines have
      been fixed (FT_Get_Next_Char returned invalid values).

    - The  PFR font driver  returned incorrect  advance widths  if the
      outline  and metrics resolution  defined in  the font  file were
      different.

    - FT_Glyph_To_Bitmap now returns  successfully when called with an
      FT_BitmapGlyph argument (it previously returned an error).

    - A bug  in the Type 1  loader that prevented  valid font bounding
      boxes to be loaded from multiple master fonts.

    - The SFNT  validation code has been rewritten.   FreeType can now
      load `broken'  fonts that were  usable on Windows, but  not with
      previous versions of the library.

    - The computation of bearings in the BDF driver has been fixed.

    - The Postscript hinter crashed when trying to hint certain glyphs
      (more precisely,  when trying to  apply hints to an  empty glyph
      outline).

    - The  TrueType glyph  loader  now supports  composites in  `Apple
      format'  (they differ slightly  from Microsoft/OpenType  ones in
      the way transformation offsets are computed).

    - FreeType was  very slow at opening certain  asian CID/CFF fonts,
      due to  fixed increment  in dynamic array  re-allocations.  This
      has  been changed  to  exponential behaviour  to get  acceptable
      performance.



  II. IMPORTANT CHANGES

    - The PCF driver now supports gzip-compressed font files natively.
      This means that  you will be able to use  all these bitmap fonts
      that  come with  XFree86 with  FreeType (and  libXft/libXft2, by
      extension).

    - The  automatic and  postscript hinters  have both  been updated.
      This  results in  a relatively  important increase  of rendering
      quality since  many nasty defaults have been suppressed.  Please
      visit the web page:

        https://www.freetype.org/hinting/smooth-hinting.html

      for additional details on this topic.

    - The `load_flags' parameter of `FT_Load_Glyph' is now an FT_Int32
      (instead  of just  being  an FT_Int).   This  breaks source  and
      binary  compatibility for  16bit systems  only,  while retaining
      both of them for 32 and 64 bit ones.

      Some new flags have been added consequently:

        FT_LOAD_NO_AUTOHINT   :: Disable the use of the auto-hinter
                                 (but not native format hinters).

        FT_LOAD_TARGET_NORMAL :: Hint and render for normal
                                 anti-aliased displays.

        FT_LOAD_TARGET_MONO   :: Hint and render for 1-bit displays.

        FT_LOAD_TARGET_LCD    :: Hint and render for horizontal RGB or
                                 BGR subpixel displays (like LCD
                                 screens).  THIS IS STILL
                                 EXPERIMENTAL!

        FT_LOAD_TARGET_LCD_V  :: Same as FT_LOAD_TARGET_LCD, for
                                 vertical subpixel displays (like
                                 rotated LCD screens).  THIS IS STILL
                                 EXPERIMENTAL!

      FT_LOAD_MONOCHROME   is  still   supported,  but   only  affects
      rendering, not the hinting.

      Note that the `ftview'  demo program available in the `ft2demos'
      package  has been  updated to  support LCD-optimized  display on
      non-paletted displays (under Win32 and X11).

    - The  PFR  driver  now  supports embedded  bitmaps  (all  formats
      supported), and returns correct kerning metrics for all glyphs.

    - The TrueType charmap loader  now supports certain `broken' fonts
      that load under Windows without problems.

    - The cache API has been slightly modified (it's still a beta!):

       - The type  FTC_ImageDesc has been removed; it  is now replaced
         by  FTC_ImageTypeRec.   Note that  one  of  its  fields is  a
         `load_flag' parameter for FT_Load_Glyph.

       - The  field  `num_grays' of  FT_SBitRec  has  been changed  to
         `max_grays'  in  order to  fit  within  a  single byte.   Its
         maximum value is thus 255 (instead of 256 as previously).


  III. MISCELLANEOUS

    - Added support  for the  DESTDIR variable during  `make install'.
      This simplifies packaging of FreeType.

    - Included modified  copies of the  ZLib sources in  `src/gzip' in
      order to support  gzip-compressed PCF fonts.  We do  not use the
      system-provided  zlib  for  now,   though  this  is  a  probable
      enhancement for future releases.

    - The DocMaker tool used to generate the on-line API reference has
      been   completely    rewritten.    It   is    now   located   in
      `src/tools/docmaker/docmaker.py'.  Features:

        - better cross-referenced output
        - more polished output
        - uses Python regular expressions  (though it didn't speed the
          program)
        - much  more  modular structure,  which  allows for  different
          `backends'  in  order to  generate  HTML,  XML, or  whatever
          format.

      One can regenerate the API reference by calling:

         python src/tools/docmaker/docmaker.py \
                --prefix=ft2 \
                --title=FreeType-2.1.3 \
                --output=<outputdirectory>
                include/freetype/*.h \
                include/freetype/config/*.h \
                include/freetype/cache/*.h

    - A new, experimental, support for incremental font loading (i.e.,
      loading  of fonts  where the  glyphs are  not in  the  font file
      itself, but provided by an external component, like a Postscript
      interpreter) has been added by Graham Asher.  This is still work
      in progress, however.

    - A new,  EXPERIMENTAL, path stroker  has been added.   It doesn't
      suffer  from  severe  rounding  errors  and  treat  bezier  arcs
      directly.  Still work in progress (i.e. not part of the official
      API).   See  the file  <freetype/ftstroker.h>  for  some of  the
      details.

    - The massive  re-formatting of sources and  internal re-design is
      still under-way.  Many  internal functions, constants, and types
      have been renamed.


======================================================================

CHANGES BETWEEN 2.1.2 and 2.1.1

  I. IMPORTANT BUG FIXES

    - Many  font drivers didn't  select a  Unicode charmap  by default
      when a new face  was opened (with the FT_CONFIG_OPTION_USE_CMAPS
      options enabled),  causing many applications  to not be  able to
      display text correctly with the 2.1.x releases.

    - The  PFR driver had  a bug  in its  composite loading  code that
      produces incorrectly placed accents with many fonts.

    - The Type42 driver crashed sometimes due to a nasty bug.

    - The Type 1 custom encoding  charmap didn't handle the case where
      the first glyph index wasn't 0.

    - A  serious  typo  in  the  TrueType  composite  loader  produced
      incorrectly placed  glyphs in fonts  like `Wingdings' and  a few
      others.


  II. MISCELLANEOUS

    - The Win32  Visual C++ project  file has been updated  to include
      the PFR driver as well.

    - `freetype.m4' is  now installed by default by  `make install' on
      Unix systems.

    - The function  FT_Get_PS_Font_Info now works with  CID and Type42
      fonts as well.


======================================================================

CHANGES BETWEEN 2.1.1 and 2.1.0

  I. IMPORTANT BUG FIXES

    - The  `version_info'  returned   by  `freetype-config'  in  2.1.0
      returned an invalid value.  It now returns 9:1:3 (2.0.9 returned
      9:0:3).

    - Version 2.1.0  couldn't be linked against  applications on Win32
      and  Amiga systems  due  to  a new  debug  function that  wasn't
      properly   propagated  to   the  system-specific   directory  in
      `builds'.

    - Various MacOS and Mac OS X specific fixes.

    - Fixed  a bug in  the TrueType  charmap validation  routines that
      made version  2.1.0 too restrictive  -- many popular  fonts have
      been rejected.

    - There was  still a very small difference  between the monochrome
      glyph bitmaps produced by FreeType 1.x and FreeType 2.x with the
      bytecode  interpreter enabled.   This was  caused by  an invalid
      flag setting in the TrueType glyph loader, making the rasterizer
      change  its  drop-out   control  mode.   Now  the results should
      _really_ be completely identical.

    - The TrueType name table loader has been improved to support many
      popular  though buggy Asian  fonts.  It  now ignores  empty name
      entries,  invalid  pointer offsets  and  a  few other  incorrect
      subtleties.  Moreover,  name strings  are now loaded  on demand,
      which reduces the memory load  of many faces (e.g. the ARIAL.TTF
      font file contains a 10kByte name table with 70 names).

    - Fixed a bug in the Postscript hinter that prevented family blues
      substitution to happen correctly.


  II. NEW FEATURES

    - Three new font drivers in this release:

      * A  BDF  font driver,  contributed  by  Franco Zappa  Nardelli,
        heavily  modified   by  Werner  Lemberg.    It  also  supports
        anti-aliased bitmaps (using a slightly extended BDF format).

      * A Type42  font driver, contributed by Roberto  Alameda.  It is
        still experimental but seems to work relatively well.

      * A PFR  font driver, contributed  by David Turner  himself.  It
        doesn't  support PFR  hinting --  note that  BitStream  has at
        least two patents on this format!


  III. MISCELLANEOUS

    - The  cache  sub-system has  been  optimized  in important  ways.
      Cache hits are now significantly faster.  For example, using the
      CMap cache is about  twice faster than calling FT_Get_Char_Index
      on most platforms.  Similarly, using an SBit cache is about five
      times faster  than loading the  bitmaps from a bitmap  file, and
      300 to  500 times  faster than generating  them from  a scalable
      format.

      Note that  you should recompile  your sources if you  designed a
      custom  cache  class for  the  FT2  Cache  subsystem, since  the
      changes performed are source, but not binary, compatible.


======================================================================

CHANGES BETWEEN 2.1.0 and 2.0.9

  I. IMPORTANT BUG FIXES

    - The  TrueType bytecode  interpreter  has been  fixed to  produce
      _exactly_ the same output as FreeType 1.x.  Previous differences
      were due  to slightly distinct  fixed-point computation routines
      used to perform dot products and vector length measurements.

      It seems  that native TrueType hinting  is _extremely_ sensitive
      to  rounding errors.  The  required vector  computation routines
      have been optimized and placed within the `ttinterp.c' file.

    - Fixed the parsing of accelerator tables in the PCF font driver.

    - Fixed the Type1 glyph loader  routine used to compute the font's
      maximum advance width.


  II. NEW FEATURES

    - The `configure' script used on Unix systems has been modified to
      check  that  GNU  Make  is  being used  to  build  the  library.
      Otherwise,  it  will display  a  message  proposing  to use  the
      GNUMAKE environment variable to name it.

      The Unix-specific file README.UNX has been modified accordingly.


  III. MISCELLANEOUS

    - The  FreeType  License in  `docs/FTL.TXT'  has  been updated  to
      include  a  proposed preferred  disclaimer.   If  you are  using
      FreeType in your products, you are encouraged (but not mandated)
      to use the following text in your documentation:

      """
        Portions of this software are copyright © 1996-2002 The
        FreeType Project (www.freetype.org).  All rights reserved.
      """

    - The default size of the render pool has been reduced to 16kByte.
      This  shouldn't result  in any  noticeable  performance penalty,
      unless you are  using the engine as-is to  render very large and
      complex glyphs.

    - The  FreeType 2  redesign has  begun.  More  information  can be
      found at this URL:

        https://www.freetype.org/freetype2/redesign.html

      The following  internal changes  have been performed  within the
      sources of this release:

        - Many   internal  types   have  been   renamed   to  increase
          consistency.   The  following  should  be true,  except  for
          public types:

            * All structure  types have a name ending  in `Rec' (short
              for `record').

            * A  pointer-to-structure type  has the  same name  as the
              structure, _without_ the `Rec' suffix.

              Example:

                typedef struct FooRec_
                {
                  ...

                } FooRec, *Foo;

        - Many   internal  macros  have   been  renamed   to  increase
          consistency.  The following should be true:

            * All  macros  have a  name  beginning  with `FT_'.   This
              required a few changes like

                ALLOC   => FT_ALLOC
                FREE    => FT_FREE
                REALLOC => FT_REALLOC

            * All  macros are completely  UPPERCASE.  This  required a
              few changes like:

                READ_Short  => FT_READ_SHORT
                NEXT_Short  => FT_NEXT_SHORT
                GET_ULongLE => FT_GET_ULONG_LE
                MEM_Set     => FT_MEM_SET
                MEM_Copy    => FT_MEM_COPY
                etc.

            * Whenever   possible,   all   macro  names   follow   the
              FT_<OBJECT>_<METHOD> pattern.  For example

                ACCESS_Frame   => FT_FRAME_ENTER
                FORGET_Frame   => FT_FRAME_EXIT
                EXTRACT_Frame  => FT_FRAME_EXTRACT
                RELEASE_Frame  => FT_FRAME_RELEASE

                FILE_Pos       => FT_STREAM_POS
                FILE_Seek      => FT_STREAM_SEEK
                FILE_Read      => FT_STREAM_READ
                FILE_ReadAt    => FT_STREAM_READ_AT
                READ_Fields    => FT_STREAM_READ_FIELDS

        - Many  internal functions  have  been renamed  to follow  the
          FT_<Object>_<Method> pattern.  For example:

            FT_Seek_Stream       => FT_Stream_Seek
            FT_Read_Stream_At    => FT_Stream_ReadAt
            FT_Done_Stream       => FT_Stream_Close
            FT_New_Stream        => FT_Stream_Open
            FT_New_Memory_Stream => FT_Stream_OpenMemory
            FT_Extract_Frame     => FT_Stream_ExtractFrame

          Note that method names do not contain `_'.

        - The FT_ALLOC_ARRAY  and FT_REALLOC_ARRAY have  been replaced
          with  FT_NEW_ARRAY and  FT_RENEW_ARRAY which  do not  take a
          type  as the  fourth argument.   Instead, the  array element
          type  size is computed  automatically from  the type  of the
          target pointer used.

        - A  new object  class, FT_CMap,  has been  introduced.  These
          internal  objects are  used to  model character  maps.  This
          eases  the support  of additional  charmap types  within the
          engine.

        - A new  configuration file named `ftstdlib.h'  has been added
          to `include/freetype/config'.  It  is used to define aliases
          for  _every_ routine  of the  ISO  C library  that the  font
          engine   uses.    Each    aliases   has   a   `ft_'   prefix
          (e.g. `ft_strlen' is an alias for `strlen').

          This is  used to  ease the porting  of FreeType 2  to exotic
          runtime environments where the ISO C Library isn't available
          (e.g.  XFree86 extension modules).

      More details are available in the `ChangeLog' file.


======================================================================

CHANGES BETWEEN 2.0.9 and 2.0.8

  I. IMPORTANT BUG FIXES

    - Certain fonts like `foxjump.ttf' contain broken name tables with
      invalid entries and wild offsets.  This caused FreeType to crash
      when trying to load them.

      The  SFNT `name'  table  loader has  been  fixed to  be able  to
      support these strange fonts.

      Moreover, the code  in charge of processing this  table has been
      changed  to always favour  Windows-formatted entries  over other
      ones.  Hence,  a font that works  on Windows but not  on the Mac
      will  load cleanly in  FreeType and  report accurate  values for
      Family & PostScript names.

    - The CID font driver has been fixed.  It unfortunately returned a
      Postscript   Font   name   with   a   leading   slash,   as   in
      `/MunhwaGothic-Regular'.

    - FreeType  2 should now  compile fine  on AIX  4.3.3 as  a shared
      library.

    - A  bug  in the  Postscript  hinter  has  been found  and  fixed,
      removing un-even stem widths at small pixel sizes (like 14-17).

      This  improves the  quality of  a certain  number  of Postscript
      fonts.


  II. NEW FEATURES

    - A  new function  named  `FT_Library_Version' has  been added  to
      return  the current  library's major,  minor, and  patch version
      numbers.   This is  important since  the  macros FREETYPE_MAJOR,
      FREETYPE_MINOR,  and  FREETYPE_PATCH  cannot  be used  when  the
      library is dynamically linked by a program.

    - Two   new  APIs   have  been   added:   `FT_Get_First_Char'  and
      `FT_Get_Next_Char'.

      Together,  these can  be used  to iterate  efficiently  over the
      currently  selected  charmap of  a  given  face.   Read the  API
      reference for more details.


  III. MISCELLANEOUS

    - The FreeType sources are  under heavy internal re-factoring.  As
      a consequence,  we have created  a branch named `STABLE'  on the
      CVS to hold all future releases/fixes in the 2.0.x family.

      The  HEAD  branch  now  contains  the  re-factored  sources  and
      shouldn't  be used for  testing or  packaging new  releases.  In
      case you  would like  to access the  2.0.9 sources from  our CVS
      repository, use the tag `VER-2-0-9'.


======================================================================

CHANGES BETWEEN 2.0.8 and 2.0.7

  I. IMPORTANT BUG FIXES

    - There was  a small but  nasty bug in  `freetype-config.in' which
      caused the `freetype-config' script to fail on Unix.

      This didn't prevent the installation  of the library or even its
      execution, but caused problems  when trying to compile many Unix
      packages that depend on it.

    - Some TrueType or OpenType fonts embedded in PDF documents do not
      have  a  'cmap',  'post'  and  'name'  as  is  required  by  the
      specification.  FreeType no longer refuses to load such fonts.

    - Various fixes to the PCF font driver.


======================================================================

CHANGES BETWEEN 2.0.7 and 2.0.6

  I. IMPORTANT BUG FIXES

    - Fixed  two  bugs in  the  Type 1  font  driver.   The first  one
      resulted in a memory leak in subtle cases.  The other one caused
      FreeType to crash when  trying to load `.gsf' files (Ghostscript
      so-called Postscript fonts).

      (This  made _many_  KDE applications  crash on  certain systems.
       FreeType _is_ becoming a critical system component on Linux :-)

    - Fixed a memory leak in the CFF font driver.

    - Fixed a memory leak in the PCF font driver.

    - Fixed       the        Visual       C++       project       file
      `builds/win32/visualc/freetype.dsp' since  it didn't include the
      Postscript hinter component, causing errors at build time.

    - Fixed a  small rendering bug  in the anti-aliased  renderer that
      only  occurred when  trying to  draw  thin (less  than 1  pixel)
      strokes.

    - Fixed  `builds/unix/freetype2.a4' which  is used  to  generate a
      valid `freetype2.m4' for use with autoconf.

    - Fixed the OpenVMS Makefiles.


  II. MISCELLANEOUS

    - Added  `configure'  and   `install'  scripts  to  the  top-level
      directory.  A GNU-style installation is thus now easily possible
      with

        ./configure  <options>
        make
        make install


======================================================================

CHANGES BETWEEN 2.0.6 and 2.0.5

  I. IMPORTANT BUG FIXES

    - It wasn't possible to load embedded bitmaps when the auto-hinter
      was used.  This is now fixed.

    - The TrueType  font driver  didn't load some  composites properly
      (the  sub-glyphs  were  slightly  shifted,  and  this  was  only
      noticeable when using monochrome rendering).

    - Various  fixes  to the  auto-hinter.   They  merely improve  the
      output of sans-serif fonts.   Note that there are still problems
      with serifed fonts and composites (accented characters).

    - All scalable  font drivers erroneously  returned un-fitted glyph
      advances when hinting was  requested.  This created problems for
      a number  of layout applications.  This  is a very  old bug that
      got  undetected mainly  because most  test/demo  program perform
      rounding explicitly or implicitly (through the cache).

    - `FT_Glyph_To_Bitmap' did erroneously  modify the source glyph in
      certain cases.

    - `glnames.py'  still contained  a bug  that made  FreeType return
      invalid names for certain glyphs.

    - The  library crashed  when  loading certain  Type  1 fonts  like
      `sadn.pfb'  (`Stalingrad  Normal'),   which  appear  to  contain
      pathetic font info dictionaries.

    - The TrueType glyph  loader is now much more  paranoid and checks
      everything when loading a given glyph image.  This was necessary
      to avoid problems (crashes and/or memory overwrites) with broken
      fonts that came from a really buggy automatic font converter.


  II. IMPORTANT UPDATES AND NEW FEATURES

    - Important updates to the Mac-specific parts of the library.

    - The caching sub-system has  been completely re-designed, and its
      API has  evolved (the  old one is  still supported  for backward
      compatibility).

      The documentation for it is  not yet completed, sorry.  For now,
      you are encouraged to continue  using the old API.  However, the
      ftview  demo program in  the ft2demos  package has  already been
      updated to use the new caching functions.

    - A new charmap cache is provided too.  See `FTC_CMapCache'.  This
      is useful to perform  character code -> glyph index translations
      quickly, without the need for an opened FT_Face.

    - A NEW POSTSCRIPT HINTER module  has been added to support native
      hints in  the following  formats: PostScript Type  1, PostScript
      CID, and CFF/CEF.

      Please test!  Note that  the auto-hinter produces better results
      for a number of  badly-hinted fonts (mostly auto-generated ones)
      though.

    - A memory debugger is now  part of the standard FreeType sources.
      To      enable      it,      define      FT_DEBUG_MEMORY      in
      <freetype/config/ftoption.h>, and recompile the library.

      Additionally, define  the _environment_ variable FT_DEBUG_MEMORY
      and run any program using FreeType.  When the library is exited,
      a  summary  of memory  footprints  and  possible  leaks will  be
      displayed.

      This works transparently with  _any_ program that uses FreeType.
      However, you  will need a lot  of memory to  use this (allocated
      blocks are never  released to the heap to  detect double deletes
      easily).


  III. MISCELLANEOUS

    - We  are  aware  of  subtle  differences between  the  output  of
      FreeType  versions   1  and  2  when  it   comes  to  monochrome
      TrueType-hinted glyphs.   These are  most probably due  to small
      differences in the monochrome rasterizers and will be worked out
      in an upcoming release.

    - We have decided to fork the sources in a `stable' branch, and an
      `unstable' one, since FreeType  is becoming a critical component
      of many Unix systems.

      The next  bug-fix releases of  the library will be  named 2.0.7,
      2.0.8, etc.,  while the `2.1'  branch will contain a  version of
      the sources where we will start major reworking of the library's
      internals, in order to produce FreeType 2.2.0 (or even 3.0) in a
      more distant future.

      We  also hope  that this  scheme will  allow much  more frequent
      releases than in the past.


======================================================================

CHANGES BETWEEN 2.0.5 and 2.0.4

  NOTE THAT 2.0.5 DOES NOT CONTAIN THE POSTSCRIPT HINTER.  THIS MODULE
  WILL BE PART OF THE NEXT RELEASE (EITHER 2.0.6 or 2.1)

  - Fixed a bug that made  certain glyphs, like `Cacute', `cacute' and
    `lslash'  unavailable from Unicode  charmaps of  Postscript fonts.
    This prevented the correct display of Polish text, for example.

  - The kerning table of Type 1 fonts was loaded by FreeType, when its
    AFM    file    was    attached    to    its    face,    but    the
    FT_FACE_FLAG_HAS_KERNING   bit  flags   was  not   set  correctly,
    preventing FT_Get_Kerning to return meaningful values.

  - Improved  SFNT (TrueType  & OpenType)  charmap  support.  Slightly
    better performance, as well as support for the new formats defined
    by the OpenType 1.3 specification (8, 10, and 12)

  - Fixed a  serious typo in `src/base/ftcalc.c'  which caused invalid
    computations in certain rare cases, producing ugly artefacts.

  - The  size  of the  EM  square is  computed  with  a more  accurate
    algorithm for Postscript fonts.   The old one caused slight errors
    with embedded fonts found in PDF documents.

  - Fixed  a  bug in  the  cache  manager  that prevented  normal  LRU
    behaviour  within the cache  manager, causing  unnecessary reloads
    (for FT_Face and FT_Size objects only).

  - Added  a new  function named  `FT_Get_Name_Index' to  retrieve the
    glyph index of a given glyph name, when found in a face.

  - Added  a new function  named `FT_Get_Postscript_Name'  to retrieve
    the `unique' Postscript font name of a given face.

  - Added   a   new   public   header  size   named   FT_SIZES_H   (or
    <freetype/ftsizes.h>) providing  new FT_Size-management functions:
    FT_New_Size, FT_Activate_Size, FT_Done_Size.

  - Fixed a  reallocation bug that  generated a dangling  pointer (and
    possibly    memory    leaks)    with    Postscript    fonts    (in
    src/psaux/psobjs.c).

  - Many fixes for 16-bit correctness.

  - Removed many pedantic compiler warnings from the sources.

  - Added an Amiga build directory in `builds/amiga'.


======================================================================

CHANGES BETWEEN 2.0.4 and 2.0.3

  - Fixed a rather annoying bug that was introduced in 2.0.3.  Namely,
    the font  transformation set through  FT_Set_Transform was applied
    twice to auto-hinted glyphs, resulting in incorrectly rotated text
    output.

  - Fixed _many_  compiler warnings.   FT2 should now  compile cleanly
    with Visual  C++'s most pedantic warning level  (/W4).  It already
    compiled fine with GCC and a few other compilers.

  - Fixed a bug  that prevented the linear advance  width of composite
    TrueType glyphs to be correctly returned.

  - Fixed    the    Visual    C++    project    files    located    in
    `builds/win32/visualc' (previous versions  used older names of the
    library).

  - Many  32-bit constants  have an  `L' appended  to their  value, in
    order to improve the 16-bitness  of the code.  Someone is actually
    trying to use FT2 on an Atari ST machine!

  - Updated  the  `builds/detect.mk' file  in  order to  automatically
    build FT2  on AIX systems.   AIX uses `/usr/sbin/init'  instead of
    `/sbin/init' and wasn't previously  detected as a Unix platform by
    the FreeType build system.

  - Updated  the  Unix-specific  portions  of the  build  system  (new
    libtool version, etc.).

  - The  SFNT kerning  loader now  ensures  that the  table is  sorted
    (since some problem fonts do not meet this requirement).


=======================================================================

CHANGES BETWEEN 2.0.3 and 2.0.2

  I. CHANGES TO THE MODULES / FONT DRIVERS

    - THE  AUTO-HINTER HAS  BEEN SLIGHTLY  IMPROVED, in  order  to fix
      several annoying artefacts, mainly:

        - Blue  zone alignment  of  horizontal stems  wasn't performed
          correctly, resulting in artefacts  like the `d' being placed
          one pixel below the `b' in some fonts like Time New Roman.

        - Overshoot thresholding  wasn't performed correctly, creating
          unpleasant artefacts at large character pixel sizes.

        - Composite glyph loading has  been simplified.  This gets rid
          of  various artefacts  where the  components of  a composite
          glyphs were not correctly spaced.

      These are  the last changes to the  current auto-hinting module.
      A new  hinting sub-system is currently  in the work  in order to
      support native hints  in Type 1 / CFF /  OpenType fonts, as well
      as globally improve rendering.

    - The  PCF  driver has  been  fixed.   It  reported invalid  glyph
      dimensions for the fonts available on Solaris.

    - The Type  1, CID and CFF  drivers have been modified  to fix the
      computation of the EM size.

    - The Type 1  driver has been fixed to avoid  a dangerous bug that
      crashed the library with non-conforming fonts (i.e. ones that do
      not place the .notdef glyph at position 0).

    - The TrueType  driver had a  rather subtle bug  (dangling pointer
      when loading  composite glyphs) that could crash  the library in
      rare occasions!


  II. HIGH-LEVEL API CHANGES

    - The error  code enumeration values have been  changed.  An error
      value  is decomposed  in  a  generic error  code,  and a  module
      number.  see <freetype/fterrors.h> for details.

    - A   new  public   header   file  has   been  introduced,   named
      FT_TRIGONOMETRY_H    (include/freetype/fttrigon.h),    providing
      trigonometric functions to  compute sines, cosines, arctangents,
      etc. with 16.16 fixed precision.  The implementation is based on
      the CORDIC  algorithm and is very fast  while being sufficiently
      accurate.


  III. INTERNALS

    - Added  BeOS-specific files  in the  old build  sub-system.  Note
      that no changes were required to compile the library with Jam.

    - The  configuration  is now  capable  of automatically  detecting
      64-bit integers  on a set  of predefined compilers  (GCC, Visual
      C++, Borland C++) and will use them by default.  This provides a
      small performance boost.

    - A  small memory leak  that happened  when opening  0-sized files
      (duh!)  have been fixed.

    - Fixed bezier  stack depth  bug in the  routines provided  by the
      FT_BBOX_H  header   file.   Also  fixed  similar   bugs  in  the
      rasterizers.

    - The outline bounding  box code has been rewritten  to use direct
      computations,  instead of  bezier sub-division,  to  compute the
      exact bounding box of glyphs.   This is slightly slower but more
      accurate.

    - The build system has been  improved and fixed, mainly to support
      `make'  on Windows  2000  correctly, avoid  problems with  `make
      distclean' on non Unix systems, etc.

    - Hexadecimal  constants  have been  suffixed  with  `U' to  avoid
      problems with certain compilers on 64-bit platforms.

    - A new directory named `src/tools' has been created.  It contains
      Python scripts and simple unit test programs used to develop the
      library.

    - The DocMaker tool has been  moved from `docs' to `src/tools' and
      has been updated with the following:

         - Now accepts the `--title=XXXX' or `-t XXXX' option from the
           command line to set the project's name in the generated API
           reference.

         - Now accepts the `--output=DIR'  or `-o DIR' option from the
           command line to set  the output directory for all generated
           HTML files.

         - Now accepts the `--prefix=XXXX' or `-p XXX' option from the
           command  line  to  set  the  file prefix  to  use  for  all
           generated HTML files.

         - Now generates the current  time/data on each generated page
           in order to distinguish between versions.

      DocMaker  can be  used with  other  projects now,  not only  FT2
      (e.g. MLib, FTLayout, etc.).


======================================================================

CHANGES BETWEEN 2.0.2 and 2.0.1

  I. CHANGES TO THE MODULES / FONT DRIVERS

    - THE TRUETYPE BYTECODE INTERPRETER IS NOW TURNED OFF, in order to
      avoid legal problems  with the Apple patents.  It  seems that we
      mistakenly  turned this option  on in  previous releases  of the
      build.

      Note that if  you want to use the  bytecode interpreter in order
      to get high-quality TrueType  rendering, you will need to toggle
      by        hand        the        definition        of        the
      TT_CONFIG_OPTION_BYTECODE_INTERPRETER   macro    in   the   file
      `include/freetype/config/ftoption.h'.

    - The CFF driver has been improved by Tom Kacvinsky and Sander van
      der Wal:

      * Support for `seac' emulation.
      * Support for `dotsection'.
      * Support for retrieving glyph names through
        `FT_Get_Glyph_Name'.

      The first two items are necessary to correctly a large number of
      Type 1 fonts converted to the CFF formats by Adobe Acrobat.

    - The Type 1 driver was also improved by Tom & others:

      * Better EM size computation.
      * Better support for synthetic (transformed) fonts.
      * The  Type 1  driver returns  the charstrings  corresponding to
        each glyph in the  `glyph->control_data' field after a call to
        `FT_Load_Glyph' (thanks Ha Shao).

    - Various other bugfixes, including the following:

      * Fixed a nasty memory leak in the Type 1 driver.
      * The autohinter  and the pcf  driver used static  writable data
        when they shouldn't.
      * Many casts were added to  make the code more 64-bits safe.  It
        also now compiles on Windows XP 64-bits without warnings.
      * Some incorrect writable statics were removed in the `autohint'
        and `pcf' drivers.  FreeType 2 now compiles on Epoc again.


  II. CHANGES TO THE HIGH-LEVEL API

    - The library header files inclusion scheme has been changed.  The
      old scheme looked like:

        #include <freetype/freetype.h>
        #include <freetype/ftglyph.h>
        #include <freetype/ftcache.h>
        #include <freetype/cache/ftimage.h>

      Now you should use:

        #include <ft2build.h>
        #include FT_FREETYPE_H
        #include FT_GLYPH_H
        #include FT_CACHE_H
        #include FT_CACHE_IMAGE_H

      NOTE THAT  THE OLD  INCLUSION SCHEME WILL  STILL WORK  WITH THIS
      RELEASE.  HOWEVER, WE  DO NOT GUARANTEE THAT THIS  WILL STILL BE
      TRUE IN THE NEXT ONE (A.K.A. FREETYPE 2.1).

      The  file <ft2build.h>  is used  to define  the  header filename
      macros.  The complete and  commented list of macros is available
      in the API reference under the section name `Header File Macros'
      in Chapter I.

      For more information, see section I of the following document:

        https://www.freetype.org/freetype2/docs/tutorial/step1.html

    - Many, many comments have been added to the public source file in
      order to  automatically generate  the API Reference  through the
      `docmaker.py' Python script.

      The latter has been updated  to support the grouping of sections
      in chapters and better index sort.  See:

        https://www.freetype.org/freetype2/docs/reference/ft2-toc.html


  III. CHANGES TO THE BUILD PROCESS

    - If you  are not  building FreeType 2  with its own  build system
      (but with your own Makefiles or project files), you will need to
      be  aware that  the  build  process has  changed  a little  bit.

      You don't  need to put the  `src' directory in  the include path
      when  compiling  any FT2  component.   Instead,  simply put  the
      component's directory in the current include path.

      So, if you were doing something like:

        cc -c -Iinclude -Isrc src/base/ftbase.c

      change the line to:

        cc -c -Iinclude -Isrc/base src/base/ftbase.c

      If you were doing something like:

        cd src/base
        cc -c -I../../include -I.. ftbase.c

      change it to:

        cd src/base
        cc -c -I../../include ftbase.c


======================================================================

CHANGES BETWEEN 2.0.1 and 2.0

  2.0.1 introduces a few changes:

    - Fixed many bugs related to  the support of CFF / OpenType fonts.
      These  formats are  now much  better supported  though  there is
      still work planned to  deal with charset tables and PDF-embedded
      CFF files that use the old `seac' command.

    - The  library could not  be compiled  in debug  mode with  a very
      small  number   of  C  compilers   whose  pre-processors  didn't
      implement the `##'  directive correctly (i.e. per se  the ANSI C
      specification!)  An elegant fix was found.

    - Added  support for  the  free Borland  command-line C++  Builder
      compiler.   Use `make  setup bcc32'.   Also fixed  a  few source
      lines that generated new warnings with BCC32.

    - Fixed a bug in FT_Outline_Get_BBox when computing the extrema of
      a conic Bezier arc.

    - Updated the INSTALL file to add IDE compilation.

    - Other  minor bug  fixes,  from  invalid Type  1  style flags  to
      correct   support   of  synthetic   (obliqued)   fonts  in   the
      auto-hinter, better support for embedded bitmaps in a SFNT font.

    - Fixed some problems with `freetype-config'.

  Finally, the `standard' scheme for including FreeType headers is now
  gradually changing,  but this will  be explained in a  later release
  (probably 2.0.2).

  And very  special thanks to Tom Kacvinsky  and YAMANO-UCHI Hidetoshi
  for their contributions!


======================================================================

CHANGES BETWEEN beta8 and 2.0

  - Changed  the default  installation  path for  public headers  from
    `include/freetype' to `include/freetype2'.

    Also added a new `freetype-config' that is automatically generated
    and installed  on Unix and  Cygwin systems.  The script  itself is
    used to retrieve the current  install path, C compilation flags as
    well as linker flags.

  - Fixed several small bugs:

    * Incorrect max advance width for fixed-pitch Type 1 fonts.
    * Incorrect glyph names for certain TrueType fonts.
    * The  glyph advance  was not  copied when  FT_Glyph_To_Bitmap was
      called.
    * The  linearHoriAdvance  and  linearVertAdvance  fields  were not
      correctly returned for glyphs processed by the auto-hinter.
    * `type1z'  renamed back to  `type1'; the  old `type1'  module has
      been removed.

  - Revamped the  build system  to make it  a lot more  generic.  This
    will  allow us  to  re-use  nearly un-modified  in  lots of  other
    projects (including FreeType Layout).

  - Changed `cid' to use `psaux' too.

  - Added the  cache sub-system.  See <freetype/ftcache.h>  as well as
    the sources  in `src/cache'.  Note  that it compiles but  is still
    untested for now.

  - Updated `docs/docmaker.py', a draft  API reference is available at
    http://www.freetype.org/ft2api.html.

  - Changed `type1' to use `psaux'.

  - Created a  new module named  `psaux' to hold  the Type 1 &  Type 2
    parsing routines.  It should be  used by `type1', `cid', and `cff'
    in the future.

  - Fixed an important bug in `FT_Glyph_Get_CBox'.

  - Fixed  some compiler  warnings  that happened  since the  TrueType
    bytecode decoder was deactivated by default.

  - Fixed two memory leaks:

    * The    memory   manager   (16    bytes)   isn't    released   in
      FT_Done_FreeType!
    * Using custom input streams, the  copy of the original stream was
      never released.

  - Fixed the  auto-hinter by performing automatic  computation of the
    `filling direction' of each glyph.   This is done through a simple
    and  fast approximation, and  seems to  work (problems  spotted by
    Werner though).  The Arphic fonts are a lot nicer though there are
    still a lot of things to do to handle Asian fonts correctly.


======================================================================

BETA-8 (RELEASE CANDIDATE) CHANGES

  - Deactivated the TrueType bytecode interpreter by default.

  - Deactivated the `src/type1' font driver.  Now `src/type1z' is used
    by default.

  - Updates to the build system.  We now compile the library correctly
    under  Unix  system  through  `configure' which  is  automatically
    called on the first `make' invocation.

  - Added the auto-hinting module!  Fixing some bugs here and there.

  - Found some bugs in the  composite loader (seac) of the Type1-based
    font drivers.

  - Renamed the directory `freetype2/config' to `freetype2/builds' and
    updated all relevant files.

  - Found a memory leak in the `type1' driver.

  - Incorporated Tom's patches to  support flex operators correctly in
    OpenType/CFF fonts.  Now all I need is to support pure CFF and CEF
    fonts to be done with this driver :-)

  - Added the  Windows FNT/FON driver in `src/winfonts'.   For now, it
    always  `simulates'   a  Unicode  charmap,  so   it  shouldn't  be
    considered completed right now.

    It  is there  to be  more a  proof of  concept than  anything else
    anyway.  The driver is a single  C source file, that compiles to 3
    Kb of code.

    I'm  still working on  the PCF/BDF  drivers, but  I'm too  lazy to
    finish them now.

  - CHANGES TO THE HIGH-LEVEL API

    * FT_Get_Kerning has a new parameter that allows you to select the
      coordinates of the kerning  vector (font units, scaled, scaled +
      grid-fitted).
    * The  outline functions are  now in <freetype/ftoutln.h>  and not
      part of <freetype/freetype.h> anymore.
    * <freetype/ftmodule.h>    now     contains    declarations    for
       FT_New_Library, FT_Done_Library, FT_Add_Default_Modules.
    * The so-called convenience  functions have moved from `ftoutln.c'
      to  `ftglyph.c',  and  are  thus available  with  this  optional
      component    of   the   library.     They   are    declared   in
      <freetype/ftglyph.h> now.
    * Anti-aliased  rendering is now  the default  for FT_Render_Glyph
      (i.e. corresponds to render_mode == 0 == ft_render_mode_normal).
      To generate a monochrome bitmap, use ft_render_mode_mono, or the
      FT_LOAD_MONOCHROME     flag    in    FT_Load_Glyph/FT_Load_Char.
      FT_LOAD_ANTI_ALIAS is still defined, but values to 0.
    * <freetype/freetype.h>  now include <freetype/config/ftconfig.h>,
      solving a few headaches :-)
    * The type FT_GlyphSlotRec has now a `library' field.

  - CHANGES TO THE `ftglyph.h' API

    This API has  been severely modified in order  to make it simpler,
    clearer, and more  efficient.  It certainly now looks  like a real
    `glyph factory'  object, and allows client  applications to manage
    (i.e.  transform,  bbox  and  render) glyph  images  without  ever
    knowing their original format.

  - Added  support  for CID-keyed  fonts  to  the  CFF driver.   Maybe
    support for pure CFF + CEF fonts should come in?

  - Cleaned up  source code in order  to avoid two  functions with the
    same name.  Also  changed the names of the  files in `type1z' from
    `t1XXXX' to `z1XXXX' in order to avoid any conflicts.

    `make multi' now works well :-)

    Also removed the use of `cidafm' for now, even if the source files
    are  still there.  This  functionality will  certainly  go into  a
    specific module.

  - ADDED SUPPORT FOR THE AUTO-HINTER

    It  works :-) I  have a  demo program  which simply  is a  copy of
    `ftview'       that      does       a      `FT_Add_Module(library,
    &autohinter_module_class)' after  library initialization, and Type
    1 & OpenType/CFF fonts are now hinted.

    CID  fonts are  not hinted,  as they  include no  charmap  and the
    auto-hinter doesn't include  `generic' global metrics computations
    yet.

    Now, I need to release this thing to the FreeType 2 source.

  - CHANGES TO THE RENDERER MODULES

    The  monochrome  and smooth  renderers  are  now  in two  distinct
    directories, namely `src/raster1' and `src/smooth'.  Note that the
    old `src/renderer' is now gone.

    I ditched  the 5-gray-levels renderers.  Basically,  it involved a
    simple #define toggle in 'src/raster1/ftraster.c'.

    FT_Render_Glyph,  FT_Outline_Render  &  FT_Outline_Get_Bitmap  now
    select the best renderer  available, depending on render mode.  If
    the current renderer for a  given glyph image format isn't capable
    of supporting  the render mode, another  one will be  found in the
    library's list.   This means that client applications  do not need
    to  switch or  set  the  renderers themselves  (as  in the  latest
    change), they'll get what they want automatically.  At last.

    Changed the demo programs accordingly.

  - MAJOR INTERNAL REDESIGN:

    A lot of internal modifications  have been performed lately on the
    source in order to provide the following enhancements:

    * More generic module support:

      The FT_Module  type is  now defined to  represent a handle  to a
      given  module.   The  file  <freetype/ftmodule.h>  contains  the
      FT_Module_Class definition, as well as the module-loading public
      API.

      The  FT_Driver type  is still  defined, and  still  represents a
      pointer to  a font driver.  Note that  FT_Add_Driver is replaced
      by FT_Add_Module, FT_Get_Driver by FT_Get_Module, etc.

    * Support for generic glyph image types:

      The FT_Renderer  type is a pointer  to a module  used to perform
      various operations on glyph image.

      Each renderer is  capable of handling images in  a single format
      (e.g. ft_glyph_format_outline).  Its functions are used to:

      - transform an glyph image
      - render a glyph image into a bitmap
      - return the control box (dimensions) of a given glyph image

      The scan converters `ftraster.c' and `ftgrays.c' have been moved
      to the new directory `src/renderer', and are used to provide two
      default renderer modules.

      One corresponds  to the `standard' scan-converter,  the other to
      the `smooth' one.

      he  current  renderer  can  be  set  through  the  new  function
      FT_Set_Renderer.

      The old raster-related function FT_Set_Raster, FT_Get_Raster and
      FT_Set_Raster_Mode have now disappeared, in favor of the new:

        FT_Get_Renderer
        FT_Set_Renderer

      See the file <freetype/ftrender.h> for more details.

      These  changes  were  necessary  to properly  support  different
      scalable formats in the future, like bi-color glyphs, etc.

    * Glyph loader object:

      A  new  internal  object,  called  a  'glyph  loader'  has  been
      introduced in the base layer.  It is used by all scalable format
      font drivers to load glyphs and composites.

      This object  has been  created to reduce  the code size  of each
      driver,  as  each  one  of  them  basically  re-implemented  its
      functionality.

      See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
      more information.

    * FT_GlyphSlot has new fields:

      In  order   to  support  extended  features   (see  below),  the
      FT_GlyphSlot structure has a few new fields:

      linearHoriAdvance:

        This  field  gives  the   linearly  scaled  (i.e.  scaled  but
        unhinted) advance  width for the  glyph, expressed as  a 16.16
        fixed pixel value.  This is useful to perform WYSIWYG text.

      linearVertAdvance:
        This field  gives the linearly  scaled advance height  for the
        glyph  (relevant in  vertical  glyph layouts  only).  This  is
        useful to perform WYSIWYG text.

        Note that  the two above field replace  the removed `metrics2'
        field in the glyph slot.

      advance:
        This field is a vector  that gives the transformed advance for
        the glyph.   By default, it corresponds to  the advance width,
        unless  FT_LOAD_VERTICAL_LAYOUT  was  specified  when  calling
        FT_Load_Glyph or FT_Load_Char.

      bitmap_left:
        This  field gives  the  distance in  integer  pixels from  the
        current pen position  to the left-most pixel of  a glyph image
        IF IT IS  A BITMAP.  It is only valid  when the `format' field
        is set to `ft_glyph_format_bitmap', for example, after calling
        the new function FT_Render_Glyph.

      bitmap_top:
        This  field gives  the  distance in  integer  pixels from  the
        current pen position (located on the baseline) to the top-most
        pixel of the  glyph image IF IT IS  A BITMAP.  Positive values
        correspond to upwards Y.

      loader:
        This  is a  new  private  field for  the  glyph slot.   Client
        applications should not touch it.


    * Support for transforms and direct rendering in FT_Load_Glyph:

      Most of the functionality found in <freetype/ftglyph.h> has been
      moved to the core library.  Hence, the following:

      - A   transform   can   be   specified  for   a   face   through
        FT_Set_Transform.  this transform  is applied by FT_Load_Glyph
        to  scalable glyph  images (i.e.  NOT TO  BITMAPS)  before the
        function returns, unless the bit flag FT_LOAD_IGNORE_TRANSFORM
        was set in the load flags.

      - Once  a  glyph image  has  been  loaded,  it can  be  directly
        converted  to  a  bitmap  by  using  the  new  FT_Render_Glyph
        function.  Note that this  function takes the glyph image from
        the glyph slot,  and converts it to a  bitmap whose properties
        are returned  in `face.glyph.bitmap', `face.glyph.bitmap_left'
        and `face.glyph.bitmap_top'.  The  original native image might
        be lost after the conversion.

      - When using the new  bit flag FT_LOAD_RENDER, the FT_Load_Glyph
        and   FT_Load_Char   functions   will   call   FT_Render_Glyph
        automatically when needed.

  - Reformatted all  modules source  code in order  to get rid  of the
    basic data types redefinitions (i.e. `TT_Int' instead of `FT_Int',
    `T1_Fixed'  instead  of  `FT_Fixed').  Hence  the  format-specific
    prefixes like  `TT_', `T1_',  `T2_' and `CID_'  are only  used for
    relevant structures.


======================================================================

OLD CHANGES FOR BETA 7

  - bug-fixed the  OpenType/CFF parser.  It  now loads and displays my
    two  fonts nicely,  but I'm  pretty certain  that more  testing is
    needed :-)

  - fixed the crummy Type 1 hinter, it now handles accented characters
    correctly (well, the accent is  not always well placed, but that's
    another problem..)

  - added the CID-keyed Type 1 driver in `src/cid'.  Works pretty well
    for only 13 Kb of code  ;-) Doesn't read AFM files though, nor the
    really useful CMAP files..

  - fixed  two  bugs  in  the  smooth  renderer  (src/base/ftgrays.c).
    Thanks to Boris Letocha for spotting them and providing a fix.

  - fixed potential `divide by zero' bugs in ftcalc.c.

  - added source  code for  the OpenType/CFF driver  (still incomplete
    though..)

  - modified the  SFNT driver slightly  to perform more  robust header
    checks  in TT_Load_SFNT_Header.  This prevents certain  font files
    (e.g.  some  Type  1  Multiple  Masters)  from  being  incorrectly
    `recognized' as TrueType font files..

  - moved a lot of stuff from  the TrueType driver to the SFNT module,
    this   allows   greater   code   re-use   between   font   drivers
    (e.g. TrueType, OpenType, Compact-TrueType, etc..)

  - added a tiny segment cache to the SFNT Charmap 4 decoder, in order
    to minimally speed it up..

  - added  support for  Multiple Master  fonts in  `type1z'.  There is
    also a new file named <freetype/ftmm.h> which defines functions to
    manage them from client applications.

    The new file `src/base/ftmm.c' is also optional to the engine..

  - various  formatting changes (e.g.  EXPORT_DEF ->  FT_EXPORT_DEF) +
    small bug fixes in FT_Load_Glyph, the `type1' driver, etc..

  - a minor fix to the Type 1 driver to let them apply the font matrix
    correctly (used for many oblique fonts..)

  - some fixes for 64-bit systems (mainly changing some FT_TRACE calls
    to use %p instead of %lx).  Thanks to Karl Robillard.

  - fixed  some bugs  in  the sbit  loader (src/base/sfnt/ttsbit.c)  +
    added  a new flag,  FT_LOAD_CROP_BITMAP to  query that  bitmaps be
    cropped when  loaded from a file  (maybe I should  move the bitmap
    cropper to the base layer ??).

  - changed the default  number of gray levels of  the smooth renderer
    to 256  (instead of  the previous 128).  Of course, the  human eye
    can't see any difference ;-)

  - removed TT_MAX_SUBGLYPHS,  there is no static limit  on the number
    of subglyphs in a TrueType font now..


======================================================================

OLD CHANGES 16 May 2000

  - tagged `BETA-6'  in the  CVS tree.  This one is a  serious release
    candidate even though it doesn't incorporate the auto-hinter yet..

  - various obsolete files were removed, and copyright header updated

  - finally  updated  the  standard   raster  to  fix  the  monochrome
    rendering bug + re-enable  support for 5-gray levels anti-aliasing
    (suck, suck..)

  - created new header files, and modified sources accordingly:

     <freetype/fttypes.h>
       - simple FreeType types, without the API
     <freetype/internal/ftmemory.h>
       - definition of memory-management macros

  - added   the   `DSIG'   (OpenType   Digital   Signature)   tag   to
    <freetype/tttags.h>

  - light update/cleaning of the build system + changes to the sources
    in  order  to  get  rid  of _all_  compiler  warnings  with  three
    compilers, i.e:

    gcc with `-ansi -pedantic -Wall -W', Visual C++ with `/W3 /WX' and
    LCC

    IMPORTANT NOTE FOR WIN32-LCC USERS:
    |
    |  It seems the C pre-processor  that comes with LCC is broken, it
    |  doesn't  recognize  the  ANSI  standard  directives  #  and  ##
    |  correctly   when  one  of   the  argument  is  a  macro.  Also,
    |  something like:
    |
    |     #define F(x)  print##x
    |
    |     F(("hello"))
    |
    |  will get incorrectly translated to:
    |
    |     print "hello")
    |
    |  by its pre-processor.  For this reason, you simply cannot build
    |  FreeType 2 in debug mode with this compiler..

  - yet  another massive grunt work.  I've  changed the  definition of
    the EXPORT_DEF,  EXPORT_FUNC, BASE_DEF &  BASE_FUNC macros.  These
    now take an argument, which is the function's return value type.

    This  is necessary to  compile FreeType  as a  DLL on  Windows and
    OS/2.  Depending on the compiler used, a compiler-specific keyword
    like  __export or __system  must be  placed before  (VisualC++) or
    after (BorlandC++) the type..

    Of course, this needed a lot of changes throughout the source code
    to make it compile again...  All cleaned up now, apparently..

    Note also  that there is a  new EXPORT_VAR macro  defined to allow
    the   _declaration_    of   an   exportable    public   (constant)
    variable.  This  is  the   case  of  the  raster  interfaces  (see
    ftraster.h and ftgrays.h), as well as each module's interface (see
    sfdriver.h, psdriver.h, etc..)

  - new feature: it  is now possible to pass  extra parameters to font
                 drivers  when creating  a new  face object.  For now,
                 this capability is unused.  It could however prove to
                 be useful in a near future..

      the FT_Open_Args structure was  changes, as well as the internal
      driver interface  (the specific `init_face'  module function has
      now a different signature).

  - updated the tutorial (not finished though).

  - updated the top-level BUILD  document

  - fixed  a  potential memory  leak  that  could  occur when  loading
    embedded bitmaps.

  - added     the     declaration     of     FT_New_Memory_Face     in
    <freetype/freetype.h>, as  it was  missing from the  public header
    (the implementation was already in `ftobjs.c').

  - the file <freetype/fterrors.h> has been seriously updated in order
    to allow  the automatic generation  of error message tables.   See
    the comments within it for more information.

  - major directory  hierarchy re-organisation.  This was done for two
    things:

      * first,  to ease  the `manual'  compilation of  the  library by
        requiring at lot less include paths :-)

      * second,  to  allow  external  programs to  effectively  access
        internal  data  fields.  For example,  this  can be  extremely
        useful if  someone wants  to write a  font producer or  a font
        manager on top of FreeType.

    Basically, you  should now use  the 'freetype/' prefix  for header
    inclusion, as in:

        #include <freetype/freetype.h>
        #include <freetype/ftglyph.h>

    Some new include sub-directories are available:

     a. the  `freetype/config' directory,  contains two files  used to
        configure  the  build  of  the  library.  Client  applications
        should  not need  to look  at these  normally, but they can if
        they want.

        #include <freetype/config/ftoption.h>
        #include <freetype/config/ftconfig.h>

     b. the `freetype/internal'  directory, contains header files that
        describes library  internals.  These are the header files that
        were  previously  found  in  the `src/base'  and  `src/shared'
        directories.


    As  usual, the build  system and  the demos  have been  updated to
    reflect the change..

    Here's a layout of the new directory hierarchy:

    TOP_DIR
      include/
         freetype/
            freetype.h
            ...
            config/
              ftoption.h
              ftconfig.h
              ftmodule.h

            internal/
              ftobjs.h
              ftstream.h
              ftcalc.h
              ...

      src/
         base/
            ...

         sfnt/
         psnames/
         truetype/
         type1/
         type1z/


    Compiling a module is now  much easier, for example, the following
    should work when in the TOP_DIR directory on an ANSI build:

       gcc -c -I./include -I./src/base src/base/ftbase.c
       gcc -c -I./include -I./src/sfnt src/sfnt/sfnt.c
       etc..

    (of course, using -Iconfig/<system> if you provide system-specific
     configuration files).

  - updated the structure of FT_Outline_Funcs in order to allow direct
    coordinate scaling within  the outline decomposition routine (this
    is  important for virtual  `on' points  with TrueType  outlines) +
    updates to the rasters to support this..

  - updated  the OS/2  table  loading code  in `src/sfnt/ttload.c'  in
    order to support version 2 of the table (see OpenType 1.2 spec)

  - created  `include/tttables.h'  and  `include/t1tables.h' to  allow
    client applications to access some of  the SFNT and T1 tables of a
    face  with  a  procedural  interface (see  `FT_Get_Sfnt_Table')  +
    updates to internal source files to reflect the change..

  - some  cleanups in  the source  code to  get rid  of  warnings when
    compiling with the `-Wall -W -ansi -pedantic' options in gcc.

  - debugged and moved the smooth renderer to `src/base/ftgrays.c' and
    its header to `include/ftgrays.h'

  - updated TT_MAX_SUBGLYPHS  to 96 as some CJK  fonts have composites
    with up to 80 sub-glyphs !! Thanks to Werner


======================================================================

OLD CHANGES - 14-apr-2000

  - fixed  a bug  in  the  TrueType glyph  loader  that prevented  the
    correct loading of some CJK glyphs in mingli.ttf

  - improved the standard Type 1 hinter in `src/type1'

  - fixed two bugs  in the experimental Type 1  driver in `src/type1z'
    to handle the new XFree86 4.0 fonts (and a few other ones..)

  - the smooth  renderer is now  complete and supports  sub-banding to
    render large glyphs  at high speed.  However, it is still  located
    in `demos/src/ftgrays.c' and should move to the  library itself in
    the next  beta.  NOTE: The  smooth  renderer  doesn't  compile  in
    stand-alone mode anymore, but this should be fixed RSN..

  - introduced convenience  functions to  more easily deal  with glyph
    images, see  `include/ftglyph.h' for more details, as  well as the
    new  demo program  named `demos/src/ftstring.c'  that demonstrates
    its use

  - implemented  FT_LOAD_NO_RECURSE in  both the  TrueType and  Type 1
    drivers  (this  is required  by  the  auto-hinter  to improve  its
    results).

  - changed   the  raster   interface,  in   order  to   allow  client
    applications  to   provide  their   own  span-drawing   callbacks.
    However,   only   the   smooth   renderer   supports   this.   See
    `FT_Raster_Params' in the file `include/ftimage.h'.

  - fixed  a small bug  in FT_MulFix  that caused  incorrect transform
    computation!

  - Note: The tutorial is out-of-date.


======================================================================

OLD CHANGES - 12-mar-2000

  - changed  the  layout  of  configuration  files  :  now,  all  ANSI
    configuration         files         are         located         in
    `freetype2/config'.  System-specific over-rides  can be  placed in
    `freetype2/config/<system>'.

  - moved all configuration macros to `config/ftoption.h'

  - improvements in the Type 1 driver with AFM support

  - changed the fields  in the FT_Outline structure :  the old `flags'
    array is re-named `tags', while all ancient flags are encoded into
    a single unsigned int named `flags'.

  - introduced     new      flags     in     FT_Outline.flags     (see
    ft_outline_.... enums in `ftimage.h').

  - changed outline functions to `FT_Outline_<action>' syntax

  - added a smooth anti-alias renderer to the demonstration programs

  - added Mac graphics driver (thanks Just)

  - FT_Open_Face  changed  in  order   to  received  a  pointer  to  a
    FT_Open_Args descriptor..

  - various  cleanups,  a  few  more API  functions  implemented  (see
    FT_Attach_File)

  - updated some docs


======================================================================

OLD CHANGES - 22-feb-2000

  - introduced the `psnames' module.  It is used to:

      o convert  a Postscript glyph  name into the  equivalent Unicode
        character code (used by the  Type 1 driver(s) to synthesize on
        the fly a Unicode charmap).

      o provide an  interface to retrieve the Postscript  names of the
        Macintosh,  Adobe  Standard &  Adobe  Expert character  codes.
        (the Macintosh  names are  used by the  SFNT-module postscript
        names support routines, while the other two tables are used by
        the Type 1 driver(s)).

  - introduced the `type1z' alternate Type 1 driver.  This is a (still
    experimental) driver  for the Type  1 format that  will ultimately
    replace the one  in `src/type1'.  It uses pattern matching to load
    data from the font, instead of a finite  state analyzer.  It works
    much better than the `old' driver with `broken' fonts.  It is also
    much smaller (under 15 Kb).

  - the  Type 1  drivers (both  in `src/type1'  and  `src/type1z') are
    nearly  complete.  They  both  provide automatic  Unicode  charmap
    synthesis through  the `psnames' module.  No re-encoding vector is
    needed.  (note  that they  still  leak  memory  due to  some  code
    missing, and I'm getting lazy).

    Trivial AFM support has been added to read kerning information but
    wasn't exactly tested as it should ;-)

  - The TrueType  glyph loader has  been seriously rewritten  (see the
    file  `src/truetype/ttgload.c'.  It is now  much, much  simpler as
    well as  easier to read,  maintain and understand  :-) Preliminary
    versions introduced a  memory leak that has been  reported by Jack
    Davis, and is now fixed..

  - introduced  the new  `ft_glyph_format_plotter', used  to represent
    stroked outlines  like Windows `Vector' fonts, and  certain Type 1
    fonts  like `Hershey'.  The corresponding  raster will  be written
    soon.

  - FT_New_Memory_Face  is  gone.  Likewise,  FT_Open_Face has  a  new
    interface that uses a structure  to describe the input stream, the
    driver (if required), etc..


TODO

  - Write FT_Get_Glyph_Bitmap and FT_Load_Glyph_Bitmap

  - Add a function like FT_Load_Character(face, char_code, load_flags)
    that  would   really  embed  a  call   to  FT_Get_Char_Index  then
    FT_Load_Glyph to ease developer's work.

  - Update the tutorial!

  - consider adding  support for Multiple  Master fonts in the  Type 1
    drivers.

  - Test the AFM routines of the  Type 1 drivers to check that kerning
    information is returned correctly.

  - write a decent auto-gridding component  !! We need this to release
    FreeType 2.0 gold !


less urgent needs:

  - add a CFF/Type2 driver
  - add a BDF driver
  - add a FNT/PCF/HBF driver
  - add a Speedo driver from the X11 sources


======================================================================

OLDER CHANGES - 27-jan-2000

  - updated the  `sfnt' module  interface to allow  several SFNT-based
    drivers to co-exist peacefully

  - updated  the `T1_Face'  type  to better  separate Postscript  font
    content  from the  rest of  the FT_Face  structure.  Might be used
    later by the CFF/Type2 driver..

  - added an experimental replacement Type 1 driver featuring advanced
    (and speedy) pattern matching to retrieve the data from postscript
    fonts.

  - very minor  changes in the implementation  of FT_Set_Char_Size and
    FT_Set_Pixel_Sizes (they now implement default to lighten the font
    driver's code).


======================================================================

OLD MESSAGE

This file summarizes the changes  that occurred  since the last `beta'
of FreeType 2. Because the list is important, it has been divided into
separate sections:

Table Of Contents:

    I   High-Level Interface (easier !)
   II   Directory Structure
  III   Glyph Image Formats
   IV   Build System
    V   Portability
   VI   Font Drivers


----------------------------------------------------------------------

High-Level Interface:

  The high-level API has been considerably simplified.  Here is how:

    - resource objects have disappeared.  this means that face objects
      can now be created with  a single function call (see FT_New_Face
      and FT_Open_Face)

    - when calling  either FT_New_Face  & FT_Open_Face, a  size object
      and a glyph slot object  are automatically created for the face,
      and can  be accessed  through `face->glyph' and  `face->size' if
      one really  needs to.   In most cases,  there's no need  to call
      FT_New_Size or FT_New_Glyph.

    - similarly,  FT_Load_Glyph  now  only  takes  a  `face'  argument
      (instead  of a  glyph  slot  and a  size).  Also,  its  `result'
      parameter is  gone, as the glyph  image type is  returned in the
      field `face->glyph.format'

    - the list  of available  charmaps is directly  accessible through
      `face->charmaps', counting `face->num_charmaps'  elements.  Each
      charmap  has an  'encoding'  field which  specifies which  known
      encoding it deals with.  Valid values are, for example:

          ft_encoding_unicode      (for ASCII, Latin-1 and Unicode)
          ft_encoding_apple_roman
          ft_encoding_sjis
          ft_encoding_adobe_standard
          ft_encoding_adobe_expert

      other  values may  be added  in the  future.  Each charmap still
      holds  its `platform_id'  and `encoding_id'  values in  case the
      encoding is too exotic for the current library


----------------------------------------------------------------------

Directory Structure:

  Should seem obvious to most of you:

     freetype/
         config/        -- configuration sub-makefiles
            ansi/
            unix/       -- platform-specific configuration files
            win32/
            os2/
            msdos/

         include/       -- public header  files, those to  be included
                           directly by client apps

         src/           -- sources of the library
           base/        -- the base layer
           sfnt/        -- the sfnt `driver'  (see the drivers section
                           below)
           truetype/    -- the truetype driver
           type1/       -- the type1 driver
           shared/      -- some header files shared between drivers

         demos/         -- demos/tools

         docs/          -- documentation (a bit empty for now)


----------------------------------------------------------------------

Glyph Image Formats:

  Drivers are now able to  register new glyph image formats within the
  library.  For  now, the  base layer supports  of course  bitmaps and
  vector  outlines, but  one  could imagine  something different  like
  colored bitmaps, bi-color vectors or whatever else (Metafonts anyone
  ??).

  See  the   file  `include/ftimage.h'.   Note  also  that   the  type
  FT_Raster_Map  is gone,  and  is now  replaced  by FT_Bitmap,  which
  should encompass all known bitmap types.

  Each new  image format  must provide at  least one `raster',  i.e. a
  module capable of  transforming the glyph image into a bitmap.  It's
  also possible  to change the default  raster used for  a given glyph
  image format.

  The default outline  scan-converter now uses 128 levels  of grays by
  default,  which tends  to smooth  many  things.  Note that the  demo
  programs have been updated significantly in order to display these..


----------------------------------------------------------------------

Build system:

  You still need  GNU Make to build the library.  The build system has
  been very seriously re-vamped in order to provide things like :

   - automatic host platform  detection (reverting to 'config/ansi' if
     it is not detected, with pseudo-standard compilation flags)

   - the ability to compile from the Makefiles with very different and
     exotic compilers.  Note that linking the library can be difficult
     for some platforms.

     For example, the file `config/win32/lcclib.bat' is invoked by the
     build system to create the `.lib' file with LCC-Win32 because its
     librarian  has too  many flaws  to be  invoked directly  from the
     Makefile.

  Here's how it works:

  - the first time you type `make',  the build system runs a series of
    sub-makefiles  in order  to detect  your host  platform.  It  then
    dumps what it found, and creates a file called `config.mk' in  the
    current  directory.  This is a  sub-Makefile used  to  define many
    important Make variables used to build the library.

  - the second time, the build system detects the `config.mk' then use
    it  to  build the  library.  All object  files  go  into 'obj'  by
    default,  as well  as the  library file,  but this  can  easily be
    changed.

  Note that  you can run `make  setup' to force  another host platform
  detection  even   if  a  `config.mk'  is  present   in  the  current
  directory.  Another solution  is  simply to  delete  the file,  then
  re-run make.

  Finally, the  default compiler  for all platforms  is gcc  (for now,
  this will hopefully changed in the future).  You can however specify
  a different  compiler by specifying  it after the 'setup'  target as
  in:

      gnumake setup lcc         on Win32 to use the LCC compiler
      gnumake setup visualc     on Win32 to use Visual C++

  See  the file  `config/<system>/detect.mk' for  a list  of supported
  compilers for your platforms.

  It should be relatively easy  to write new detection rules files and
  config.mk..

  Finally, to  build the demo programs,  go to `demos'  and launch GNU
  Make, it will use the `config.mk'  in the top directory to build the
  test programs..


----------------------------------------------------------------------

Portability:

  In  the  previous  beta,  a  single FT_System  object  was  used  to
  encompass  all  low-level  operations like  thread  synchronisation,
  memory management and i/o access.  This has been greatly simplified:

    - thread synchronisation  has been dropped, for  the simple reason
      that the library  is already re-entrant, and that  if you really
      need  two  threads accessing  the  same  FT_Library, you  should
      really synchronize access to it yourself with a simple mutex.

    - memory  management is  performed  through a  very simple  object
      called `FT_Memory',  which really is a table  containing a table
      of pointers to  functions like malloc, realloc and  free as well
      as some user data (closure).

    - resources have disappeared (they created more problems than they
      solved), and  i/o management have  been simplified greatly  as a
      result.  Streams are  defined through  FT_Stream objects,  which
      can be either memory-based or disk-based.

      Note that  each face  has its own  stream, which is  closed only
      when  the  face object  is  destroyed.  Hence,  a function  like
      TT_Flush_Face in 1.x cannot be directly  supported.  However, if
      you really need something like  this, you can easily tailor your
      own streams  to achieve the same  feature at a  lower level (and
      use FT_Open_Face instead of FT_New_Face to create the face).

  See the file  `include/ftsystem.h' for more details, as  well as the
  implementations found in `config/unix' and `config/ansi'.


----------------------------------------------------------------------

Font Drivers:

  The  Font Driver  interface has  been modified  in order  to support
  extensions & versioning.


  The  list of  the font  drivers that  are statically  linked  to the
  library at compile time is  managed through a new configuration file
  called `config/<platform>/ftmodule.h'.

  This  file is  autogenerated  when  invoking  `make modules'.   This
  target  will  parse  all  sub-directories  of  'src', looking  for a
  `module.mk' rules  file, used  to describe  the driver to  the build
  system.

  Hence, one  should call  `make modules' each  time a font  driver is
  added or removed from the `src' directory.

  Finally, this  version  provides  a `pseudo-driver'  in  `src/sfnt'.
  This  driver  doesn't  support  font  files  directly, but  provides
  services used by all TrueType-like font drivers.  Hence, its code is
  shared between  the TrueType & OpenType  font formats,  and possibly
  more formats to come if we're lucky..


----------------------------------------------------------------------

Extensions support:

  The extensions support is inspired by the one found in 1.x.

  Now, each font driver has  its own `extension registry', which lists
  which extensions  are available  for the font  faces managed  by the
  driver.

  Extension ids are  now strings, rather than 4-byte  tags, as this is
  usually more readable.

  Each extension has:
    - some data, associated to each face object
    - an interface (table of function pointers)

  An extension  that is format-specific should  simply register itself
  to the correct font driver.  Here is some example code:

   // Registering an extensions
   //
   FT_Error  FT_Init_XXXX_Extension( FT_Library  library )
   {
     FT_DriverInterface*  tt_driver;

     driver = FT_Get_Driver( library, "truetype" );
     if (!driver) return FT_Err_Unimplemented_Feature;

     return FT_Register_Extension( driver, &extension_class );
   }


   // Implementing the extensions
   //
   FT_Error  FT_Proceed_Extension_XXX( FT_Face  face )
   {
     FT_XXX_Extension            ext;
     FT_XXX_Extension_Interface  ext_interface;

     ext = FT_Get_Extension( face, "extensionid", &ext_interface );
     if (!ext) return error;

     return ext_interface->do_it(ext);
   }

------------------------------------------------------------------------

Copyright 2000-2018 by
David Turner, Robert Wilhelm, and Werner Lemberg.

This  file  is  part  of the  FreeType  project, and may  only be  used,
modified,  and  distributed  under  the  terms of  the FreeType  project
license, LICENSE.TXT.   By continuing to use, modify, or distribute this
file you  indicate that  you have  read the  license and understand  and
accept it fully.


Local Variables:
version-control: never
coding: utf-8
End:

--- end of CHANGES ---
formats.txt000064400000021773151706766400007006 0ustar00This  file contains  a list  of various  font formats.   It gives  the
reference document and whether it is supported in FreeType 2.

Table fields
------------

  wrapper format
    The format used to represent the font data.  In the table below it
    is  used only  if the  font format  differs.  Possible  values are

      SFNT  binary
      PFB   binary
      PS    a text header, followed by  binary or text data
      LZW   compressed with  either `gzip' or `compress'
      BZ2   compressed with `bzip2'.

  font format
    How the font is to be accessed, possibly after converting the file
    type and wrapper  format into a generic form.   Bitmap formats are
    `BDF',  `PCF', and  one form  of `WINFNT';  all others  are vector
    formats.   `PS' indicates  third-order,  `TT' second-order  Bézier
    curves.

  font type
    Sub-formats of the  font format.  `SBIT' and  `MACSBIT' are bitmap
    formats,  `MM' and  `VAR' support  optical axes.   `CFF2' supports
    optical axes also.

  glyph access
    If  not specified,  the glyph  access  is `standard'  to the  font
    format.   Values are  `CID' for  CID-keyed fonts,  `SYNTHETIC' for
    fonts that  are modified  versions of  other fonts  by means  of a
    transformation matrix, and  `TYPE_0' for PS fonts which  are to be
    accessed in a tree-like structure.

  FreeType driver
    The module in the FreeType library which handles the specific font
    format.  A missing  entry means that FreeType  doesn't support the
    font format (yet).


Notes
-----

  The  SFNT  container  format also  provides  `collections'  (usually
  having the file extension `.ttc'  or `.otc').  A collection contains
  multiple font faces that share some tables to avoid redundancy, thus
  reducing the file  size.  In FreeType, elements of  a collection can
  be accessed with a proper face index.

  Both  the GX  and the  OpenType 1.8  variation fonts  provide `named
  instances'.  FreeType  maps them to  face indices (they can  also be
  accessed with the standard MM interface).

  Other  font  formats  (not  using the  SFNT  wrapper)  also  provide
  multiple faces  within one  file; they are  marked with  an asterisk
  (`*') in the table below.

  FreeType can  be configured to  support Mac  files (on older  Mac OS
  versions, a `file' is stored as a data and a resource fork, this is,
  within two  separate data chunks).  If  a file can't be  opened as a
  font, FreeType then checks whether it  is a resource fork, trying to
  extract  the contained  font data  from  either a  `POST' or  `sfnt'
  resource.


Please  send additions  and/or  corrections to  wl@gnu.org  or to  the
FreeType   developer's   list    at   freetype-devel@nongnu.org   (for
subscribers only).   If you can  provide a  font example for  a format
which isn't supported yet please send a mail too.


  wrapper font    font    glyph      FreeType reference
  format  format  type    access     driver   documents
 -----------------------------------------------------------------------------

  ---     BDF     ---     ---        bdf      5005.BDF_Spec.pdf, X11


  SFNT    PS      TYPE_1  ---        type1    Type 1 GX Font Format
                                              (for the Mac) [3]
  SFNT    PS      TYPE_1  CID        cid      5180.sfnt.pdf (for the Mac)
                                              [3]
  SFNT    PS      CFF     ---        cff      OT spec, 5176.CFF.pdf
                                              (`OTTO' format)
  SFNT    PS      CFF     CID        cff      OT spec, 5176.CFF.pdf
  SFNT    PS      CFF     SYNTHETIC  ---      OT spec, 5176.CFF.pdf
  SFNT    PS      CFF2    ---        cff      OT spec 1.8

  SFNT    TT      SBIT    ---        sfnt     XFree86 (bitmaps only;
                                              with `head' table)
  SFNT    TT      MACSBIT ---        sfnt     OT spec (for the Mac;
                                              bitmaps only; `bhed' table)
  SFNT    TT      ---     ---        truetype OT spec (`normal' TT font)
  SFNT    TT      VAR     ---        truetype GX spec (`?var' tables)
  SFNT    TT      VAR     ---        truetype OT spec 1.8
                                              (`?var' + `?VAR' tables)


  ---     PS      TYPE_1  ---        type1    T1_SPEC.pdf
                                              (PFA, Type 1 font resource)
  PFB     PS      TYPE_1  ---        type1    T1_SPEC.pdf,
                                              5040.Download_Fonts.pdf
                                              (`normal' Type 1 font)
  ---     PS      TYPE_1  CID        cid      PLRM.pdf (CID Font Type 0;
                                              Type 9 font)
  ---     PS      MM      ---        type1    5015.Type1_Supp.pdf
                                              (Multiple Masters)
  ---     PS      CFF     ---        cff      5176.CFF.pdf (`pure' CFF)
  ---     PS*     CFF     CID        cff      5176.CFF.pdf (`pure' CFF)
  ---     PS      CFF     SYNTHETIC  ---      5176.CFF.pdf (`pure' CFF)
  ---     PS      CFF/MM  ---        cff      old 5167.CFF.pdf (`pure' CFF)
                                              [3]
  ---     PS*     CFF/MM  CID        cff      old 5167.CFF.pdf (`pure' CFF)
                                              [3]
  ---     PS      CFF/MM  SYNTHETIC  ---      old 5167.CFF.pdf (`pure' CFF)
                                              [3]
  PS      PS      CFF     ---        ---      PLRM.pdf (Type 2) [1]
  PS      PS*     CFF     CID        ---      PLRM.pdf (Type 2) [1]
  PS      PS      CFF     SYNTHETIC  ---      PLRM.pdf (Type 2) [1]
  PS      PS      CFF/MM  ---        ---      PLRM.pdf (Type 2) [1]
  PS      PS*     CFF/MM  CID        ---      PLRM.pdf (Type 2) [1]
  PS      PS      CFF/MM  SYNTHETIC  ---      PLRM.pdf (Type 2) [1]
  ---     PS      ---     TYPE_0     ---      PLRM.pdf
  ---     PS      TYPE_3  ---        ---      PLRM.pdf (never supported)
  ---     PS      TYPE_3  CID        ---      PLRM.pdf (CID Font Type 1;
                                              Type 10 font; never supported)
  PS      PS      TYPE_14 ---        ---      PLRM.pdf (Chameleon font;
                                              Type 14 font; never supported?)
  ---     PS      TYPE_32 CID        ---      PLRM.pdf (CID Font Type 4;
                                              Type 32 font; never supported?)
  PS      TT      ---     ---        type42   5012.Type42_Spec.pdf
                                              (Type 42 font)
  PS      TT      ---     CID        ---      PLRM.pdf (CID Font Type 2;
                                              Type 11 font)


  ?       ?       CEF     ?          cff      ?


  ---     PCF     ---     ---        pcf      X11 [4]
  LZW     PCF     ---     ---        pcf      X11 [4]
  BZ2     PCF     ---     ---        pcf      X11 [4]


  ---     PFR*    PFR0    ---        pfr      [2]
  ---     PFR     PFR1    ---        ---      (undocumented, proprietary;
                                              probably never supported)


  ---     WINFNT* ---     ---        winfonts Windows developer's notes [5]
  ---     WINFNT  VECTOR  ---        ---      Windows developer's notes [5]


[1] Support should  be rather simple since this is  identical to `CFF'
    but in a PS wrapper.

[2] The  official  PFR  specification  is  no  longer  available,  but
    archive.org has archived it:

      https://web.archive.org/web/20091014062300/http://www.bitstream.com/font_rendering/products/truedoc/pfrspec.html
      https://web.archive.org/web/20081115152605/http://www.bitstream.com/font_rendering/pdfs/pfrspec1.3.pdf

    The syntax  of the  auxiliary data  is not  defined there,  but is
    partially defined in MHP 1.0.3 (also called ETSI TS 101812 V1.3.1)
    section 7.4.

      http://www.etsi.org/
      http://webapp.etsi.org/workprogram/Report_WorkItem.asp?WKI_ID=18799

[3] Support  is rudimentary  currently; some  tables or  data are  not
    loaded yet.

[4] See

      THE X WINDOW SYSTEM SERVER: X VERSION 11, RELEASE 5
      Elias Israel, Erik Fortune, Digital Press, 1992
      ISBN 1-55558-096-3

    for a specification given in Appendix D on pgs. 436-450.  However,
    this information might be out  of date; unfortunately, there is no
    PCF specification available online, and this book is out of print.
    George Williams deduced  the font format from the  X11 sources and
    documented it for his FontForge font editor:

      https://fontforge.github.io/pcf-format.html

[5] This is from MS Windows 3; see Microsoft's Knowledge Base article at

      https://support.microsoft.com/kb/65123

------------------------------------------------------------------------

Copyright 2004-2018 by
David Turner, Robert Wilhelm, and Werner Lemberg.

This  file is  part  of the  FreeType  project, and  may  only be  used,
modified,  and  distributed under  the  terms  of  the FreeType  project
license, LICENSE.TXT.  By continuing  to use, modify, or distribute this
file  you indicate that  you have  read the  license and  understand and
accept it fully.


--- end of formats.txt ---

Local Variables:
coding: utf-8
End:
ft2faq.html000064400000060140151706766400006632 0ustar00<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>
  <meta http-equiv="Content-Type"
        content="text/html; charset=US-ASCII">
  <meta name="description"
        content="FreeType FAQ">
  <link rel="stylesheet"
        href="css/freetype.css">
  <title>FreeType&nbsp;2 FAQ</title>
</head>

<body text="#000000"
      bgcolor="#FFFFFF"
      link="#0000EF"
      vlink="#51188E"
      alink="#FF0000">

<table width="100%"
       border="0"
       cellspacing="0"
       cellpadding="5">
  <tr>
    <td bgcolor="#06425F">
      <a href="http://freetype.org/index.html">
        <img src="image/fond3.jpg"
             align="right"
             border="0"
             hspace="0"
             vspace="0"
             alt="FreeType Homepage">
      </a>
    </td>
  </tr>

  <tr>
    <td bgcolor="#06425F">
      <h1 class="intro">FREETYPE&nbsp;2 FAQ</h1>
    </td>
  </tr>

  <tr>
    <td bgcolor="#669999">
      &nbsp;&nbsp;&nbsp;&nbsp;<a href="#general"
                                 class="index">General</a>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#builds"
                                             class="index">Compilation &amp;
                                             Configuration</a>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#autohint"
                                             class="index">The FreeType&nbsp;2
                                             auto-hinter</a>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#other"
                                              class="index">Other</a>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#FFFFFF">|</font>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="documentation.html"
                                                   class="index">FreeType&nbsp;2
                                                   documentation</a>
    </td>
  </tr>
</table>

<table align="center"
       width="80%">
  <tr>
    <td>
      <h1 class="section">Table of Contents</h1>

      <ul>
        <li><a href="#general">General questions</a>
          <ul>
            <li>
              <a href="#general-what">What is FreeType&nbsp;2?</a>
            </li>
            <li>
              <a href="#general-uses">What can I do with
              FreeType&nbsp;2?</a>
            </li>
            <li>
              <a href="#general-donts">What can I not do with
              FreeType&nbsp;2?</a>
            </li>
            <li>
              <a href="#general-portability">How portable is
              FreeType&nbsp;2?</a>
            </li>
            <li>
              <a href="#general-freetype1">What are the differences between
              FreeType&nbsp;1.x and FreeType&nbsp;2?</a>
            </li>
            <li>
              <a href="#general-ft1">Is FreeType&nbsp;2 backwards compatible
              to FreeType&nbsp;1.x?</a>
            </li>
            <li>
              <a href="#general-edit">Can I use FreeType&nbsp;2 to edit
              fonts or create new ones?</a>
            </li>
          </ul>
        </li>

        <li><a href="#builds">Compilation &amp; Configuration</a>
          <ul>
            <li>
              <a href="#builds-compile">How do I compile the FreeType&nbsp;2
              library?</a>
            </li>
            <li>
              <a href="#builds-config">How do I configure my library
              build?</a>
            </li>
            <li>
              <a href="#builds-differences">Why does FreeType render
              differently on different platforms?</a>
            </li>
          </ul>
        </li>

        <li>
          <a href="#autohint">The FreeType&nbsp;2 auto-hinter</a>
          <ul>
            <li>
              <a href="#autohint-work">How does the auto-hinter work?</a>
            </li>
            <li>
              <a href="#autohint-other-scripts">Why doesn't the auto-hinter
              work well with my script?</a>
            </li>
          </ul>
        </li>

        <li>
          <a href="#other">Other questions</a>
          <ul>
            <li>
              <a href="#other-depth">Can I use FreeType to draw text on a
              pixmap with arbitrary depth?</a>
            </li>
            <li>
              <a href="#other-color">How can I set the colour of text
              rendered by FreeType?</a>
            </li>
            <li>
              <a href="#other-size">I set the pixel size to 8&times;8, but
              the resulting glyphs are larger (or smaller) than that. 
              Why?</a>
            </li>
            <li>
              <a href="#other-bbox">How can I compute the bounding box of a
              text string without loading its glyphs before?</a>
            </li>
            <li>
              <a href="#other-antialias">Which anti-aliasing algorithm is
              used by FreeType&nbsp;2?</a>
            </li>
            <li>
              <a href="#other-opentype">When will FreeType&nbsp;2 support
              OpenType?</a>
            </li>
          </ul>
        </li>
      </ul>

      <p><a href="#top"
            class="index">
        <img src="image/top.gif"
             width="35"
             height="19"
             align="right"
             border="0"
             hspace="0"
             vspace="0"
             alt="Top"></a></p>

      <hr>

      <h1 class="section">
        <a name="general">
          General questions
        </a>
      </h1>

      <a name="general-what"></a>
      <h3>
        What is FreeType&nbsp;2?
      </h3>

      <p>It is a software library that can be used by all kinds of
      applications to access the contents of font files.  Most notably, it
      supports the following &lsquo;features&rsquo;:</p>

      <ul>
        <li>
          <p>It provides a uniform interface to access font files.  It
          supports both bitmap and scalable formats, including TrueType,
          OpenType, Type1, CID, CFF, Windows FON/FNT, X11 PCF, and
          others.</p>
        </li>

        <li>
          <p>It supports high-speed anti-aliased glyph bitmap generation
          with 256 gray levels.</p>
        </li>

        <li>
          <p>It is extremely modular, each font format being supported by a
          specific module.  A build of the library can be tailored to
          support only the formats you need, thus reducing code size (a
          minimal anti-aliasing build of FreeType can be less than 30KB)</p>
        </li>
      </ul>

      <hr>

      <a name="general-uses"></a>
      <h3>
        What can I do with FreeType&nbsp;2?
      </h3>

      <p>FreeType&nbsp;2 is already used in many products.  For example, it
      serves as a font rendering engine</p>

      <ul>
        <li>
          in graphics subsystem and libraries to display text
        </li>
        <li>
          in text layout and pagination services to measure and eventually
          render text
        </li>
        <li>
          in font inspection and conversion tools
        </li>
      </ul>

      <p>Generally speaking, the library allows you to access and manage
      the contents of font files in a very easy way.</p>

      <hr>

      <a name="general-donts"></a>
      <h3>
        What can I not do with FreeType&nbsp;2?
      </h3>

      <p>FreeType&nbsp;2 doesn't try to perform a number of sophisticated
      things, because it focuses on being an excellent <em>font
      service</em>.</p>

      <p>This means that the following features are not supported directly
      by the library, even though they can be more or less implemented on
      top of it, or by using it:</p>

      <ul>
        <li>
          <p><b>rendering glyphs to arbitrary surfaces</b><br>
          FreeType&nbsp;2 doesn't try to be a graphics library and thus only
          supports two pixel formats when rendering glyphs: monochrome 1-bit
          bitmaps, or 8-bit gray-level pixmaps.</p>

          <p>If you need to draw glyphs to other kinds of surfaces (for
          example, a 24-bit RGB pixmap), you need to use your favorite
          graphics library to do just that.</p>

          <p><em>Note however that in the case of rendering scalable glyph
          outlines to anti-aliased pixmaps, an application can also provide
          its own rendering callback in order to draw or compose directly
          the anti-aliased glyph on any target surface.</em></p>
        </li>

        <li>
          <p><b>glyph caching</b><br>
          Each time you request a glyph image from a font, FreeType&nbsp;2
          does it by parsing the relevant portion of the font file or font
          stream and interpreting it according to its font format.  This can
          be very slow for certain formats, including scalable ones like
          TrueType or Type&nbsp;1.</p>

          <p>Any decent text-rendering sub-system must thus be capable of
          caching glyph data in order to reach appropriate rendering
          speed.</p>

          <p><em>Note that we provide a caching sub-system with
          FreeType&nbsp;2 since version 2.0.1 which has become quite stable
          at the time of this writing (version 2.2.1).  However, it might
          not suit your needs.</em></p>
        </li>

        <li>
          <p><b>text layout</b><br>
          The library doesn't support text layout operations.  Sophisticated
          features like glyph substitution, positioning (kerning),
          justification, bi-directional ordering, etc.m are not part of a
          <em>font service</em> in itself.  They must be handled one level
          higher.</p>
        </li>
      </ul>

      <hr>

      <a name="general-portability"></a>
      <h3>
        How portable is FreeType&nbsp;2?
      </h3>

      <p>The FreeType 2 source code is <em>extremely</em> portable for the
      following reasons:</p>

      <ul>
        <li>
          <p>Everything is written in standard ANSI&nbsp;C.</p>
        </li>
        <li>
          <p>We are very pedantic to avoid any kinds of compiler warnings. 
          The current source code has been compiled with many compilers
          without producing a single warning.</p>
        </li>
        <li>
          <p>The library doesn't use any static writable data at all, making
          it an ideal choice on various embedded systems (e.g., it can be
          run from ROM directly).  It is completely thread-safe too.</p>
        </li>
      </ul>

      <p>We have made great efforts to ensure that the library is efficient,
      compact, and customizable.</p>

      <hr>

      <a name="general-freetype1"></a>
      <h3>
        What are the differences between FreeType&nbsp;1.x and
        FreeType&nbsp;2?
      </h3>

      <p>The biggest differences are as follows.</p>

      <ul>
        <li>
          <p>FreeType&nbsp;1 only supports the TrueType format, while
          FreeType&nbsp;2 supports a lot more.</p>
        </li>

        <li>
          <p>The FreeType&nbsp;2 API is simpler as well as more powerful
          than the FreeType&nbsp;1 API.</p>
        </li>

        <li>
          <p>FreeType&nbsp;1 includes an extension to support OpenType text
          layout processing.  This support hasn't become part of
          FreeType&nbsp;2; a much improved version is now part of the <a
          href="http://www.pango.org">Pango</a> library.</p>
        </li>
      </ul>

      <hr>

      <a name="general-ft1"></a>
      <h3>
        Is FreeType&nbsp;2 backwards compatible with FreeType&nbsp;1.x?
      </h3>

      <p>Short answer: No.  However, transition from 1.x to&nbsp;2 should be
      rather straightforward.</p>

      <p>The FreeType&nbsp;2 API is a lot simpler than the one in&nbsp;1.x
      while being much more powerful.  We thus encourage you to adapt your
      source code to it as this should not involve much work.</p>

      <hr>

      <a name="general-edit"></a>
      <h3>
        Can I use FreeType&nbsp;2 to edit fonts or create new ones?
      </h3>

      <p>No.  The library has been specifically designed to <em>read</em>
      font files with small code size and very low memory usage.</p>

      <p>A good, freely available font editor is <a
      href="http://fontforge.org/">FontForge</a>.</p>

      <p><a href="#top"
            class="index">
        <img src="image/top.gif"
             width="35"
             height="19"
             align="right"
             border="0"
             hspace="0"
             vspace="0"
             alt="Top"></a></p>

      <hr>

      <h1 class="section">
        <a name="builds">
          Compilation &amp; Configuration
        </a>
      </h1>

      <a name="builds-compile"></a>
      <h3>
        How do I compile the FreeType&nbsp;2 library?
      </h3>

      <p>The library can be compiled in various ways, and detailed
      documentation is available in documentation directory of the
      FreeType&nbsp;2 source tree.</p>

      <p>For compilation on the command line, GNU make is necessary; other
      build tools won't work.  The source bundle also comes with project
      files for some graphical IDEs like Visual C; note, however, that those
      files are sometimes not up to date since it is contributed code not
      used by the core developers.</p>

      <hr>

      <a name="builds-config"></a>
      <h3>
        How do I configure my build of the library?
      </h3>

      <p>This is fully described in the file <tt>CUSTOMIZATION</tt> in
      FreeType's documentation directory.  Basically, you have to edit the
      header file <tt>ftoption.h</tt> for compile-time options and to select
      the modules with the file <tt>modules.cfg</tt>.  Finally, it is
      possible to replace the standard system interface (dealing with memory
      allocation and stream I/O) with a custom one.</p>

      <hr>

      <a name="builds-differences"></a>
      <h3>
        Why does FreeType render differently on different platforms?
      </h3>

      <p>Different distributions compile FreeType with different options. 
      The developer version of a distribution's FreeType package, which is
      needed to compile your program against FreeType, includes the file
      <tt>ftoption.h</tt>.  Compare each platform's copy of
      <tt>ftoption.h</tt> to find the differences.</p>

      <p><a href="#top"
            class="index">
        <img src="image/top.gif"
             width="35"
             height="19"
             align="right"
             border="0"
             hspace="0"
             vspace="0"
             alt="Top"></a></p>

      <hr>

      <h1 class="section">
        <a name="autohint">
          The FreeType&nbsp;2 auto-hinter
        </a>
      </h1>

      <a name="autohint-work"></a>
      <h3>
        How does the auto-hinter work?
      </h3>

      <p><em>Please note that the name of auto-hinter module is
      <b>autofit</b>, which is a reimplementation of the old autohint
      module.</em></p>

      <p>A rather complete description of the hinting algorithm (which is
      slightly out of date regarding the internal structures) can be found
      in the TUG-boat article <a
      href="http://www.tug.org/TUGboat/Articles/tb24-3/lemberg.pdf">Real-Time
      Grid Fitting of Typographic Outlines</a>.</p>

      <p>The auto-hinter performs grid-fitting on scalable font formats that
      use B&eacute;zier outlines as their primary glyph image format (this
      means nearly all scalable font formats today).  If a given font driver
      doesn't provide its own hinter, the auto-hinter is used by default. 
      If a format-specific hinter is provided, it is still possible to use
      the auto-hinter using the <tt>FT_LOAD_FORCE_AUTOHINT</tt> bit flag
      when calling <tt>FT_Load_Glyph()</tt>.</p>

      <p>Currently, the auto-hinter doesn't use external hints to do its
      job, as it automatically computes global metrics (when it
      &lsquo;opens&rsquo; a font for the first time) and glyph
      &lsquo;hints&rsquo; from their outline.

      <hr>

      <a name="autohint-other-scripts"></a>
      <h3>
        Why doesn't the auto-hinter work well with my script?
      </h3>

      <p>The auto-hinter was first designed to manage and hint Latin-based
      fonts, as they consist of most of the fonts available today.  It now
      supports Asian fonts, but not other complex scripts like Arabic.</p>

      <p>Hinting various scripts isn't really more difficult than Latin,
      just different, with a set of different constraints, which must be
      hard-coded into the autofit module.  Volunteers welcome!</p>

      <p><a href="#top"
            class="index">
        <img src="image/top.gif"
             width="35"
             height="19"
             align="right"
             border="0"
             hspace="0"
             vspace="0"
             alt="Top"></a></p>

      <hr>

      <h1 class="section">
        <a name="other">
          Other questions
        </a>
      </h1>

      <a name="other-depth"></a>
      <h3>
        Can I use FreeType to draw text on a pixmap with arbitrary depth?
      </h3>

      <p>Not directly, as FreeType is a font library, not a general-purpose
      graphics library or text rendering service.  However, note that the
      anti-aliased renderer allows you to convert a vectorial glyph outline
      into a list of &lsquo;spans&rsquo; (i.e., horizontal pixel segments
      with the same coverage) that can be rendered through user-provided
      callbacks.</p>

      <p>By providing the appropriate span callback, you can render
      anti-aliased text to any kind of surface.  You can also use any
      colour, fill pattern or fill image if you want to.  This process is
      called <em>direct rendering</em>.</p>

      <p>A complete example is given at the end of the <a
      href="tutorial/step3.html">FreeType&nbsp;2 tutorial</a>.

      <p>Note that direct rendering is <em>not</em> available with
      monochrome output, as the current renderer uses a two-pass algorithm
      to generate glyphs with correct drop-out control.</p>

      <hr>

      <a name="other-color"></a>
      <h3>
        How can I set the colour of text rendered by FreeType?
      </h3>

      <p>Basically, you can't do that, because FreeType is simply a font
      library.  In general, you need to use your favorite graphics library
      to draw the FreeType glyphs with the appropriate colour.</p>

      <p>Note that for anti-aliased glyphs, you can &lsquo;set the
      colour&rsquo; by using <em>direct rendering</em> as described in <a
      href="#other-depth">this answer</a>.</p>

      <hr>

      <a name="other-size"></a>
      <h3>
        I set the pixel size to 8&times;8, but the resulting glyphs are
        larger (or smaller) than that.  Why?
      </h3>

      <p>A lot of people have difficulties to understand this topic, because
      they think of glyphs as fixed-width or fixed-height
      &lsquo;cells&rsquo;, like those of fonts used in terminals/consoles. 
      This assumption is not valid with most &lsquo;modern&rsquo; font
      formats, even for bitmapped-based ones like <b>PCF</b> or
      <b>BDF</b>.</p>

      <p>Be aware that the <em>character size</em> that is set either
      through <tt>FT_Set_Char_Size()</tt> or <tt>FT_Set_Pixel_Sizes()</tt>
      isn't directly related to the dimension of the generated glyph
      bitmaps!</p>

      <p>Rather, the character size is indeed the size of <em>an abstract
      square</em>, called the <em>EM</em>, used by typographers to design
      fonts.  Scaling two distinct fonts to the same character size, be it
      expressed in points or pixels, generally results in bitmaps with
      <em>distinct dimensions</em>!</p>

      <p>Note that historically, the EM corresponded to the width of a
      capital &lsquo;M&rsquo; in Latin typefaces.  However, later
      improvements in typography led to designs that greatly deviate from
      this rule.  Today, it is not possible to connect the EM size to a
      specific font &lsquo;feature&rsquo; in a reliable way.</p>

      <hr>

      <a name="other-bbox"></a>
      <h3>
        How can I compute the bounding box of a text string without loading
        its glyphs before?
      </h3>

      <p>This is not possible in general.  Reason is that hinting distorts
      the glyph shape for optimal rasterization, and this process sometimes
      creates outlines which have considerably different metrics.  The
      TrueType format provides the (optional) &lsquo;hdmx&rsquo; table which
      contains device horizontal metrics for selected pixel sizes, but even
      here the vertical metrics are missing.</p>

      <p>It is probably best to use both a glyph and a metrics cache to
      avoid recomputation.</p>

      <hr>

      <a name="other-antialias"></a>
      <h3>
        Which anti-aliasing algorithm is used by FreeType&nbsp;2?
      </h3>

      <p>The algorithm has been specifically designed for FreeType.  It is
      based on ideas that were originally found in the implementation of the
      <a href="http://www.levien.com/libart/">libArt</a> graphics library to
      compute the <em>exact pixel coverage</em> of a vector image with no
      sub-sampling and filtering.</p>

      <p>However, these two implementations are radically distinct and use
      vastly different models.  The FreeType&nbsp;2 renderer is optimized
      specifically for rendering small complex shapes, like glyphs, at very
      high speed while using very few memory.  On the other hand, libArt has
      been designed for general shape and polygon processing, especially
      large ones.</p>

      <p>The FreeType&nbsp;2 anti-aliasing renderer is indeed
      <em>faster</em> than the monochrome renderer for small character sizes
      (typically &lt;20&nbsp;pixels).  The reason is that the monochrome
      renderer must perform two passes on the outline in order to perform
      drop-out control according to the TrueType specification.</p>

      <hr>

      <a name="other-opentype"></a>
      <h3>
        When will FreeType&nbsp;2 support OpenType?
      </h3>

      <p>Well, the engine already reads OpenType/CFF files perfectly.  What
      it doesn't do is handling &lsquo;OpenType Layout&rsquo; tables.</p>

      <p>FreeType&nbsp;1 comes with a set of extensions that are used to
      load and manage OpenType Layout tables.  It even has a demonstration
      program named <tt>ftstrtto</tt> to show its capabilities.  However,
      this code is no longer maintained, and we strongly advise to not use
      it.</p>

      <p>For FreeType&nbsp;2, we have decided that the layout operations
      provided through these tables are better placed in a specific
      text-layout library like <a href="http://www.pango.org">Pango</a>.</p>

      <p><a href="#top"
            class="index">
        <img src="image/top.gif"
             width="35"
             height="19"
             align="right"
             border="0"
             hspace="0"
             vspace="0"
             alt="Top"></a></p>
      </td>
    </tr>
  </table>

<font size=-3>Last update: 25-Feb-2011</font>

<table width="100%"
       border="0"
       cellspacing="0"
       cellpadding="5">
  <tr>
    <td bgcolor="#669999">
      &nbsp;&nbsp;&nbsp;&nbsp;<a href="#general"
                                class="index">General</a>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#builds"
                                             class="index">Compilation &amp;
                                             Configuration</a>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#autohint"
                                             class="index">The FreeType&nbsp;2
                                             auto-hinter</a>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#other"
                                             class="index">Other</a>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#FFFFFF">|</font>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="documentation.html"
                                                   class="index">FreeType&nbsp;
                                                   documentation</a>
    </td>
  </tr>

  <tr>
    <td bgcolor="#06425F">
      <a href="http://freetype.org/index.html">
        <img src="image/fond3.jpg"
             align="right"
             border="0"
             hspace="0"
             vspace="0"
             alt="FreeType Homepage">
      </a>
    </td>
  </tr>
</table>

</body>
</html>