Upload tizen 2.0 beta source
[framework/graphics/freetype.git] / docs / reference / ft2-cache_subsystem.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
3 <html>
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>FreeType-2.4.9 API Reference</title>
7 <style type="text/css">
8   body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
9          color: #000000;
10          background: #FFFFFF; }
11
12   p { text-align: justify; }
13   h1 { text-align: center; }
14   li { text-align: justify; }
15   td { padding: 0 0.5em 0 0.5em; }
16   td.left { padding: 0 0.5em 0 0.5em;
17             text-align: left; }
18
19   a:link { color: #0000EF; }
20   a:visited { color: #51188E; }
21   a:hover { color: #FF0000; }
22
23   span.keyword { font-family: monospace;
24                  text-align: left;
25                  white-space: pre;
26                  color: darkblue; }
27
28   pre.colored { color: blue; }
29
30   ul.empty { list-style-type: none; }
31 </style>
32 </head>
33 <body>
34
35 <table align=center><tr><td><font size=-1>[<a href="ft2-index.html">Index</a>]</font></td>
36 <td width="100%"></td>
37 <td><font size=-1>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
38 <center><h1>FreeType-2.4.9 API Reference</h1></center>
39
40 <center><h1>
41 Cache Sub-System
42 </h1></center>
43 <h2>Synopsis</h2>
44 <table align=center cellspacing=5 cellpadding=0 border=0>
45 <tr><td></td><td><a href="#FTC_Manager">FTC_Manager</a></td><td></td><td><a href="#FTC_CMapCache_New">FTC_CMapCache_New</a></td></tr>
46 <tr><td></td><td><a href="#FTC_FaceID">FTC_FaceID</a></td><td></td><td><a href="#FTC_CMapCache_Lookup">FTC_CMapCache_Lookup</a></td></tr>
47 <tr><td></td><td><a href="#FTC_Face_Requester">FTC_Face_Requester</a></td><td></td><td><a href="#FTC_ImageTypeRec">FTC_ImageTypeRec</a></td></tr>
48 <tr><td></td><td><a href="#FTC_Node">FTC_Node</a></td><td></td><td><a href="#FTC_ImageType">FTC_ImageType</a></td></tr>
49 <tr><td></td><td><a href="#FTC_Manager_New">FTC_Manager_New</a></td><td></td><td><a href="#FTC_ImageCache">FTC_ImageCache</a></td></tr>
50 <tr><td></td><td><a href="#FTC_Manager_Reset">FTC_Manager_Reset</a></td><td></td><td><a href="#FTC_ImageCache_New">FTC_ImageCache_New</a></td></tr>
51 <tr><td></td><td><a href="#FTC_Manager_Done">FTC_Manager_Done</a></td><td></td><td><a href="#FTC_ImageCache_Lookup">FTC_ImageCache_Lookup</a></td></tr>
52 <tr><td></td><td><a href="#FTC_Manager_LookupFace">FTC_Manager_LookupFace</a></td><td></td><td><a href="#FTC_ImageCache_LookupScaler">FTC_ImageCache_LookupScaler</a></td></tr>
53 <tr><td></td><td><a href="#FTC_ScalerRec">FTC_ScalerRec</a></td><td></td><td><a href="#FTC_SBit">FTC_SBit</a></td></tr>
54 <tr><td></td><td><a href="#FTC_Scaler">FTC_Scaler</a></td><td></td><td><a href="#FTC_SBitRec">FTC_SBitRec</a></td></tr>
55 <tr><td></td><td><a href="#FTC_Manager_LookupSize">FTC_Manager_LookupSize</a></td><td></td><td><a href="#FTC_SBitCache">FTC_SBitCache</a></td></tr>
56 <tr><td></td><td><a href="#FTC_Node_Unref">FTC_Node_Unref</a></td><td></td><td><a href="#FTC_SBitCache_New">FTC_SBitCache_New</a></td></tr>
57 <tr><td></td><td><a href="#FTC_Manager_RemoveFaceID">FTC_Manager_RemoveFaceID</a></td><td></td><td><a href="#FTC_SBitCache_Lookup">FTC_SBitCache_Lookup</a></td></tr>
58 <tr><td></td><td><a href="#FTC_CMapCache">FTC_CMapCache</a></td><td></td><td><a href="#FTC_SBitCache_LookupScaler">FTC_SBitCache_LookupScaler</a></td></tr>
59 </table><br><br>
60
61 <table align=center width="87%"><tr><td>
62 <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>
63 <p>Note that all types and functions begin with the &lsquo;FTC_&rsquo; prefix.</p>
64 <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>
65 <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>
66 <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>
67 <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>
68 <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>
69 <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>
70 <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>
71 <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>
72 <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>
73 <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>
74 <p>We hope to also provide a kerning cache in the near future.</p>
75 </td></tr></table><br>
76 <table align=center width="75%"><tr><td>
77 <h4><a name="FTC_Manager">FTC_Manager</a></h4>
78 <table align=center width="87%"><tr><td>
79 Defined in FT_CACHE_H (freetype/ftcache.h).
80 </td></tr></table><br>
81 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
82
83   <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_ManagerRec_*  <b>FTC_Manager</b>;
84
85 </pre></table><br>
86 <table align=center width="87%"><tr><td>
87 <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>
88 <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>
89 <p>The manager is also used to cache &lsquo;nodes&rsquo; of various types while limiting their total memory usage.</p>
90 <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>
91 </td></tr></table><br>
92 </td></tr></table>
93 <hr width="75%">
94 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
95 <td width="100%"></td>
96 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
97
98 <table align=center width="75%"><tr><td>
99 <h4><a name="FTC_FaceID">FTC_FaceID</a></h4>
100 <table align=center width="87%"><tr><td>
101 Defined in FT_CACHE_H (freetype/ftcache.h).
102 </td></tr></table><br>
103 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
104
105   <span class="keyword">typedef</span> <a href="ft2-basic_types.html#FT_Pointer">FT_Pointer</a>  <b>FTC_FaceID</b>;
106
107 </pre></table><br>
108 <table align=center width="87%"><tr><td>
109 <p>An opaque pointer type that is used to identity face objects. The contents of such objects is application-dependent.</p>
110 <p>These pointers are typically used to point to a user-defined structure containing a font file path, and face index.</p>
111 </td></tr></table><br>
112 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
113 <p>Never use NULL as a valid <a href="ft2-cache_subsystem.html#FTC_FaceID">FTC_FaceID</a>.</p>
114 <p>Face IDs are passed by the client to the cache manager, which 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>
115 <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>
116 <p>Failure to do so will result in incorrect behaviour or even memory leaks and crashes.</p>
117 </td></tr></table>
118 </td></tr></table>
119 <hr width="75%">
120 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
121 <td width="100%"></td>
122 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
123
124 <table align=center width="75%"><tr><td>
125 <h4><a name="FTC_Face_Requester">FTC_Face_Requester</a></h4>
126 <table align=center width="87%"><tr><td>
127 Defined in FT_CACHE_H (freetype/ftcache.h).
128 </td></tr></table><br>
129 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
130
131   <span class="keyword">typedef</span> <a href="ft2-basic_types.html#FT_Error">FT_Error</a>
132   (*<b>FTC_Face_Requester</b>)( <a href="ft2-cache_subsystem.html#FTC_FaceID">FTC_FaceID</a>  face_id,
133                          <a href="ft2-base_interface.html#FT_Library">FT_Library</a>  library,
134                          <a href="ft2-basic_types.html#FT_Pointer">FT_Pointer</a>  request_data,
135                          <a href="ft2-base_interface.html#FT_Face">FT_Face</a>*    aface );
136
137 </pre></table><br>
138 <table align=center width="87%"><tr><td>
139 <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>
140 </td></tr></table><br>
141 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
142 <p></p>
143 <table cellpadding=3 border=0>
144 <tr valign=top><td><b>face_id</b></td><td>
145 <p>The face ID to resolve.</p>
146 </td></tr>
147 <tr valign=top><td><b>library</b></td><td>
148 <p>A handle to a FreeType library object.</p>
149 </td></tr>
150 <tr valign=top><td><b>req_data</b></td><td>
151 <p>Application-provided request data (see note below).</p>
152 </td></tr>
153 </table>
154 </td></tr></table>
155 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
156 <p></p>
157 <table cellpadding=3 border=0>
158 <tr valign=top><td><b>aface</b></td><td>
159 <p>A new <a href="ft2-base_interface.html#FT_Face">FT_Face</a> handle.</p>
160 </td></tr>
161 </table>
162 </td></tr></table>
163 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
164 <p>FreeType error code. 0&nbsp;means success.</p>
165 </td></tr></table>
166 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
167 <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>
168 <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>
169 </td></tr></table>
170 </td></tr></table>
171 <hr width="75%">
172 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
173 <td width="100%"></td>
174 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
175
176 <table align=center width="75%"><tr><td>
177 <h4><a name="FTC_Node">FTC_Node</a></h4>
178 <table align=center width="87%"><tr><td>
179 Defined in FT_CACHE_H (freetype/ftcache.h).
180 </td></tr></table><br>
181 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
182
183   <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_NodeRec_*  <b>FTC_Node</b>;
184
185 </pre></table><br>
186 <table align=center width="87%"><tr><td>
187 <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>
188 <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>
189 <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>
190 </td></tr></table><br>
191 </td></tr></table>
192 <hr width="75%">
193 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
194 <td width="100%"></td>
195 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
196
197 <table align=center width="75%"><tr><td>
198 <h4><a name="FTC_Manager_New">FTC_Manager_New</a></h4>
199 <table align=center width="87%"><tr><td>
200 Defined in FT_CACHE_H (freetype/ftcache.h).
201 </td></tr></table><br>
202 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
203
204   FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
205   <b>FTC_Manager_New</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a>          library,
206                    <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>             max_faces,
207                    <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>             max_sizes,
208                    <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>            max_bytes,
209                    <a href="ft2-cache_subsystem.html#FTC_Face_Requester">FTC_Face_Requester</a>  requester,
210                    <a href="ft2-basic_types.html#FT_Pointer">FT_Pointer</a>          req_data,
211                    <a href="ft2-cache_subsystem.html#FTC_Manager">FTC_Manager</a>        *amanager );
212
213 </pre></table><br>
214 <table align=center width="87%"><tr><td>
215 <p>Create a new cache manager.</p>
216 </td></tr></table><br>
217 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
218 <p></p>
219 <table cellpadding=3 border=0>
220 <tr valign=top><td><b>library</b></td><td>
221 <p>The parent FreeType library handle to use.</p>
222 </td></tr>
223 <tr valign=top><td><b>max_faces</b></td><td>
224 <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>
225 </td></tr>
226 <tr valign=top><td><b>max_sizes</b></td><td>
227 <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>
228 </td></tr>
229 <tr valign=top><td><b>max_bytes</b></td><td>
230 <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>
231 </td></tr>
232 <tr valign=top><td><b>requester</b></td><td>
233 <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>
234 </td></tr>
235 <tr valign=top><td><b>req_data</b></td><td>
236 <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>
237 </td></tr>
238 </table>
239 </td></tr></table>
240 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
241 <p></p>
242 <table cellpadding=3 border=0>
243 <tr valign=top><td><b>amanager</b></td><td>
244 <p>A handle to a new manager object. 0&nbsp;in case of failure.</p>
245 </td></tr>
246 </table>
247 </td></tr></table>
248 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
249 <p>FreeType error code. 0&nbsp;means success.</p>
250 </td></tr></table>
251 </td></tr></table>
252 <hr width="75%">
253 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
254 <td width="100%"></td>
255 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
256
257 <table align=center width="75%"><tr><td>
258 <h4><a name="FTC_Manager_Reset">FTC_Manager_Reset</a></h4>
259 <table align=center width="87%"><tr><td>
260 Defined in FT_CACHE_H (freetype/ftcache.h).
261 </td></tr></table><br>
262 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
263
264   FT_EXPORT( <span class="keyword">void</span> )
265   <b>FTC_Manager_Reset</b>( <a href="ft2-cache_subsystem.html#FTC_Manager">FTC_Manager</a>  manager );
266
267 </pre></table><br>
268 <table align=center width="87%"><tr><td>
269 <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>
270 </td></tr></table><br>
271 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
272 <p></p>
273 <table cellpadding=3 border=0>
274 <tr valign=top><td><b>manager</b></td><td>
275 <p>A handle to the manager.</p>
276 </td></tr>
277 </table>
278 </td></tr></table>
279 </td></tr></table>
280 <hr width="75%">
281 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
282 <td width="100%"></td>
283 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
284
285 <table align=center width="75%"><tr><td>
286 <h4><a name="FTC_Manager_Done">FTC_Manager_Done</a></h4>
287 <table align=center width="87%"><tr><td>
288 Defined in FT_CACHE_H (freetype/ftcache.h).
289 </td></tr></table><br>
290 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
291
292   FT_EXPORT( <span class="keyword">void</span> )
293   <b>FTC_Manager_Done</b>( <a href="ft2-cache_subsystem.html#FTC_Manager">FTC_Manager</a>  manager );
294
295 </pre></table><br>
296 <table align=center width="87%"><tr><td>
297 <p>Destroy a given manager after emptying it.</p>
298 </td></tr></table><br>
299 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
300 <p></p>
301 <table cellpadding=3 border=0>
302 <tr valign=top><td><b>manager</b></td><td>
303 <p>A handle to the target cache manager object.</p>
304 </td></tr>
305 </table>
306 </td></tr></table>
307 </td></tr></table>
308 <hr width="75%">
309 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
310 <td width="100%"></td>
311 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
312
313 <table align=center width="75%"><tr><td>
314 <h4><a name="FTC_Manager_LookupFace">FTC_Manager_LookupFace</a></h4>
315 <table align=center width="87%"><tr><td>
316 Defined in FT_CACHE_H (freetype/ftcache.h).
317 </td></tr></table><br>
318 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
319
320   FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
321   <b>FTC_Manager_LookupFace</b>( <a href="ft2-cache_subsystem.html#FTC_Manager">FTC_Manager</a>  manager,
322                           <a href="ft2-cache_subsystem.html#FTC_FaceID">FTC_FaceID</a>   face_id,
323                           <a href="ft2-base_interface.html#FT_Face">FT_Face</a>     *aface );
324
325 </pre></table><br>
326 <table align=center width="87%"><tr><td>
327 <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>
328 </td></tr></table><br>
329 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
330 <p></p>
331 <table cellpadding=3 border=0>
332 <tr valign=top><td><b>manager</b></td><td>
333 <p>A handle to the cache manager.</p>
334 </td></tr>
335 <tr valign=top><td><b>face_id</b></td><td>
336 <p>The ID of the face object.</p>
337 </td></tr>
338 </table>
339 </td></tr></table>
340 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
341 <p></p>
342 <table cellpadding=3 border=0>
343 <tr valign=top><td><b>aface</b></td><td>
344 <p>A handle to the face object.</p>
345 </td></tr>
346 </table>
347 </td></tr></table>
348 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
349 <p>FreeType error code. 0&nbsp;means success.</p>
350 </td></tr></table>
351 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
352 <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>
353 <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 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>
354 <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>
355 <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>
356 <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>
357 </td></tr></table>
358 </td></tr></table>
359 <hr width="75%">
360 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
361 <td width="100%"></td>
362 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
363
364 <table align=center width="75%"><tr><td>
365 <h4><a name="FTC_ScalerRec">FTC_ScalerRec</a></h4>
366 <table align=center width="87%"><tr><td>
367 Defined in FT_CACHE_H (freetype/ftcache.h).
368 </td></tr></table><br>
369 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
370
371   <span class="keyword">typedef</span> <span class="keyword">struct</span>  FTC_ScalerRec_
372   {
373     <a href="ft2-cache_subsystem.html#FTC_FaceID">FTC_FaceID</a>  face_id;
374     <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>     width;
375     <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>     height;
376     <a href="ft2-basic_types.html#FT_Int">FT_Int</a>      pixel;
377     <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>     x_res;
378     <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>     y_res;
379
380   } <b>FTC_ScalerRec</b>;
381
382 </pre></table><br>
383 <table align=center width="87%"><tr><td>
384 <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>
385 </td></tr></table><br>
386 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
387 <p></p>
388 <table cellpadding=3 border=0>
389 <tr valign=top><td><b>face_id</b></td><td>
390 <p>The source face ID.</p>
391 </td></tr>
392 <tr valign=top><td><b>width</b></td><td>
393 <p>The character width.</p>
394 </td></tr>
395 <tr valign=top><td><b>height</b></td><td>
396 <p>The character height.</p>
397 </td></tr>
398 <tr valign=top><td><b>pixel</b></td><td>
399 <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>
400 </td></tr>
401 <tr valign=top><td><b>x_res</b></td><td>
402 <p>Only used when &lsquo;pixel&rsquo; is value&nbsp;0 to indicate the horizontal resolution in dpi.</p>
403 </td></tr>
404 <tr valign=top><td><b>y_res</b></td><td>
405 <p>Only used when &lsquo;pixel&rsquo; is value&nbsp;0 to indicate the vertical resolution in dpi.</p>
406 </td></tr>
407 </table>
408 </td></tr></table>
409 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
410 <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>
411 </td></tr></table>
412 </td></tr></table>
413 <hr width="75%">
414 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
415 <td width="100%"></td>
416 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
417
418 <table align=center width="75%"><tr><td>
419 <h4><a name="FTC_Scaler">FTC_Scaler</a></h4>
420 <table align=center width="87%"><tr><td>
421 Defined in FT_CACHE_H (freetype/ftcache.h).
422 </td></tr></table><br>
423 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
424
425   <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_ScalerRec_*  <b>FTC_Scaler</b>;
426
427 </pre></table><br>
428 <table align=center width="87%"><tr><td>
429 <p>A handle to an <a href="ft2-cache_subsystem.html#FTC_ScalerRec">FTC_ScalerRec</a> structure.</p>
430 </td></tr></table><br>
431 </td></tr></table>
432 <hr width="75%">
433 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
434 <td width="100%"></td>
435 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
436
437 <table align=center width="75%"><tr><td>
438 <h4><a name="FTC_Manager_LookupSize">FTC_Manager_LookupSize</a></h4>
439 <table align=center width="87%"><tr><td>
440 Defined in FT_CACHE_H (freetype/ftcache.h).
441 </td></tr></table><br>
442 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
443
444   FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
445   <b>FTC_Manager_LookupSize</b>( <a href="ft2-cache_subsystem.html#FTC_Manager">FTC_Manager</a>  manager,
446                           <a href="ft2-cache_subsystem.html#FTC_Scaler">FTC_Scaler</a>   scaler,
447                           <a href="ft2-base_interface.html#FT_Size">FT_Size</a>     *asize );
448
449 </pre></table><br>
450 <table align=center width="87%"><tr><td>
451 <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>
452 </td></tr></table><br>
453 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
454 <p></p>
455 <table cellpadding=3 border=0>
456 <tr valign=top><td><b>manager</b></td><td>
457 <p>A handle to the cache manager.</p>
458 </td></tr>
459 <tr valign=top><td><b>scaler</b></td><td>
460 <p>A scaler handle.</p>
461 </td></tr>
462 </table>
463 </td></tr></table>
464 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
465 <p></p>
466 <table cellpadding=3 border=0>
467 <tr valign=top><td><b>asize</b></td><td>
468 <p>A handle to the size object.</p>
469 </td></tr>
470 </table>
471 </td></tr></table>
472 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
473 <p>FreeType error code. 0&nbsp;means success.</p>
474 </td></tr></table>
475 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
476 <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>
477 <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>
478 </td></tr></table>
479 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
480 <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>
481 <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>
482 </td></tr></table>
483 </td></tr></table>
484 <hr width="75%">
485 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
486 <td width="100%"></td>
487 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
488
489 <table align=center width="75%"><tr><td>
490 <h4><a name="FTC_Node_Unref">FTC_Node_Unref</a></h4>
491 <table align=center width="87%"><tr><td>
492 Defined in FT_CACHE_H (freetype/ftcache.h).
493 </td></tr></table><br>
494 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
495
496   FT_EXPORT( <span class="keyword">void</span> )
497   <b>FTC_Node_Unref</b>( <a href="ft2-cache_subsystem.html#FTC_Node">FTC_Node</a>     node,
498                   <a href="ft2-cache_subsystem.html#FTC_Manager">FTC_Manager</a>  manager );
499
500 </pre></table><br>
501 <table align=center width="87%"><tr><td>
502 <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>
503 </td></tr></table><br>
504 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
505 <p></p>
506 <table cellpadding=3 border=0>
507 <tr valign=top><td><b>node</b></td><td>
508 <p>The cache node handle.</p>
509 </td></tr>
510 <tr valign=top><td><b>manager</b></td><td>
511 <p>The cache manager handle.</p>
512 </td></tr>
513 </table>
514 </td></tr></table>
515 </td></tr></table>
516 <hr width="75%">
517 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
518 <td width="100%"></td>
519 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
520
521 <table align=center width="75%"><tr><td>
522 <h4><a name="FTC_Manager_RemoveFaceID">FTC_Manager_RemoveFaceID</a></h4>
523 <table align=center width="87%"><tr><td>
524 Defined in FT_CACHE_H (freetype/ftcache.h).
525 </td></tr></table><br>
526 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
527
528   FT_EXPORT( <span class="keyword">void</span> )
529   <b>FTC_Manager_RemoveFaceID</b>( <a href="ft2-cache_subsystem.html#FTC_Manager">FTC_Manager</a>  manager,
530                             <a href="ft2-cache_subsystem.html#FTC_FaceID">FTC_FaceID</a>   face_id );
531
532 </pre></table><br>
533 <table align=center width="87%"><tr><td>
534 <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>
535 </td></tr></table><br>
536 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
537 <p></p>
538 <table cellpadding=3 border=0>
539 <tr valign=top><td><b>manager</b></td><td>
540 <p>The cache manager handle.</p>
541 </td></tr>
542 <tr valign=top><td><b>face_id</b></td><td>
543 <p>The <a href="ft2-cache_subsystem.html#FTC_FaceID">FTC_FaceID</a> to be removed.</p>
544 </td></tr>
545 </table>
546 </td></tr></table>
547 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
548 <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>
549 <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>
550 </td></tr></table>
551 </td></tr></table>
552 <hr width="75%">
553 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
554 <td width="100%"></td>
555 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
556
557 <table align=center width="75%"><tr><td>
558 <h4><a name="FTC_CMapCache">FTC_CMapCache</a></h4>
559 <table align=center width="87%"><tr><td>
560 Defined in FT_CACHE_H (freetype/ftcache.h).
561 </td></tr></table><br>
562 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
563
564   <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_CMapCacheRec_*  <b>FTC_CMapCache</b>;
565
566 </pre></table><br>
567 <table align=center width="87%"><tr><td>
568 <p>An opaque handle used to model a charmap cache. This cache is to hold character codes -&gt; glyph indices mappings.</p>
569 </td></tr></table><br>
570 </td></tr></table>
571 <hr width="75%">
572 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
573 <td width="100%"></td>
574 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
575
576 <table align=center width="75%"><tr><td>
577 <h4><a name="FTC_CMapCache_New">FTC_CMapCache_New</a></h4>
578 <table align=center width="87%"><tr><td>
579 Defined in FT_CACHE_H (freetype/ftcache.h).
580 </td></tr></table><br>
581 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
582
583   FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
584   <b>FTC_CMapCache_New</b>( <a href="ft2-cache_subsystem.html#FTC_Manager">FTC_Manager</a>     manager,
585                      <a href="ft2-cache_subsystem.html#FTC_CMapCache">FTC_CMapCache</a>  *acache );
586
587 </pre></table><br>
588 <table align=center width="87%"><tr><td>
589 <p>Create a new charmap cache.</p>
590 </td></tr></table><br>
591 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
592 <p></p>
593 <table cellpadding=3 border=0>
594 <tr valign=top><td><b>manager</b></td><td>
595 <p>A handle to the cache manager.</p>
596 </td></tr>
597 </table>
598 </td></tr></table>
599 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
600 <p></p>
601 <table cellpadding=3 border=0>
602 <tr valign=top><td><b>acache</b></td><td>
603 <p>A new cache handle. NULL in case of error.</p>
604 </td></tr>
605 </table>
606 </td></tr></table>
607 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
608 <p>FreeType error code. 0&nbsp;means success.</p>
609 </td></tr></table>
610 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
611 <p>Like all other caches, this one will be destroyed with the cache manager.</p>
612 </td></tr></table>
613 </td></tr></table>
614 <hr width="75%">
615 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
616 <td width="100%"></td>
617 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
618
619 <table align=center width="75%"><tr><td>
620 <h4><a name="FTC_CMapCache_Lookup">FTC_CMapCache_Lookup</a></h4>
621 <table align=center width="87%"><tr><td>
622 Defined in FT_CACHE_H (freetype/ftcache.h).
623 </td></tr></table><br>
624 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
625
626   FT_EXPORT( <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> )
627   <b>FTC_CMapCache_Lookup</b>( <a href="ft2-cache_subsystem.html#FTC_CMapCache">FTC_CMapCache</a>  cache,
628                         <a href="ft2-cache_subsystem.html#FTC_FaceID">FTC_FaceID</a>     face_id,
629                         <a href="ft2-basic_types.html#FT_Int">FT_Int</a>         cmap_index,
630                         <a href="ft2-basic_types.html#FT_UInt32">FT_UInt32</a>      char_code );
631
632 </pre></table><br>
633 <table align=center width="87%"><tr><td>
634 <p>Translate a character code into a glyph index, using the charmap cache.</p>
635 </td></tr></table><br>
636 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
637 <p></p>
638 <table cellpadding=3 border=0>
639 <tr valign=top><td><b>cache</b></td><td>
640 <p>A charmap cache handle.</p>
641 </td></tr>
642 <tr valign=top><td><b>face_id</b></td><td>
643 <p>The source face ID.</p>
644 </td></tr>
645 <tr valign=top><td><b>cmap_index</b></td><td>
646 <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>
647 </td></tr>
648 <tr valign=top><td><b>char_code</b></td><td>
649 <p>The character code (in the corresponding charmap).</p>
650 </td></tr>
651 </table>
652 </td></tr></table>
653 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
654 <p>Glyph index. 0&nbsp;means &lsquo;no glyph&rsquo;.</p>
655 </td></tr></table>
656 </td></tr></table>
657 <hr width="75%">
658 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
659 <td width="100%"></td>
660 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
661
662 <table align=center width="75%"><tr><td>
663 <h4><a name="FTC_ImageTypeRec">FTC_ImageTypeRec</a></h4>
664 <table align=center width="87%"><tr><td>
665 Defined in FT_CACHE_H (freetype/ftcache.h).
666 </td></tr></table><br>
667 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
668
669   <span class="keyword">typedef</span> <span class="keyword">struct</span>  FTC_ImageTypeRec_
670   {
671     <a href="ft2-cache_subsystem.html#FTC_FaceID">FTC_FaceID</a>  face_id;
672     <a href="ft2-basic_types.html#FT_Int">FT_Int</a>      width;
673     <a href="ft2-basic_types.html#FT_Int">FT_Int</a>      height;
674     <a href="ft2-basic_types.html#FT_Int32">FT_Int32</a>    flags;
675
676   } <b>FTC_ImageTypeRec</b>;
677
678 </pre></table><br>
679 <table align=center width="87%"><tr><td>
680 <p>A structure used to model the type of images in a glyph cache.</p>
681 </td></tr></table><br>
682 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
683 <p></p>
684 <table cellpadding=3 border=0>
685 <tr valign=top><td><b>face_id</b></td><td>
686 <p>The face ID.</p>
687 </td></tr>
688 <tr valign=top><td><b>width</b></td><td>
689 <p>The width in pixels.</p>
690 </td></tr>
691 <tr valign=top><td><b>height</b></td><td>
692 <p>The height in pixels.</p>
693 </td></tr>
694 <tr valign=top><td><b>flags</b></td><td>
695 <p>The load flags, as in <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a>.</p>
696 </td></tr>
697 </table>
698 </td></tr></table>
699 </td></tr></table>
700 <hr width="75%">
701 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
702 <td width="100%"></td>
703 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
704
705 <table align=center width="75%"><tr><td>
706 <h4><a name="FTC_ImageType">FTC_ImageType</a></h4>
707 <table align=center width="87%"><tr><td>
708 Defined in FT_CACHE_H (freetype/ftcache.h).
709 </td></tr></table><br>
710 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
711
712   <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_ImageTypeRec_*  <b>FTC_ImageType</b>;
713
714 </pre></table><br>
715 <table align=center width="87%"><tr><td>
716 <p>A handle to an <a href="ft2-cache_subsystem.html#FTC_ImageTypeRec">FTC_ImageTypeRec</a> structure.</p>
717 </td></tr></table><br>
718 </td></tr></table>
719 <hr width="75%">
720 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
721 <td width="100%"></td>
722 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
723
724 <table align=center width="75%"><tr><td>
725 <h4><a name="FTC_ImageCache">FTC_ImageCache</a></h4>
726 <table align=center width="87%"><tr><td>
727 Defined in FT_CACHE_H (freetype/ftcache.h).
728 </td></tr></table><br>
729 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
730
731   <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_ImageCacheRec_*  <b>FTC_ImageCache</b>;
732
733 </pre></table><br>
734 <table align=center width="87%"><tr><td>
735 <p>A handle to an glyph image cache object. They are designed to hold many distinct glyph images while not exceeding a certain memory threshold.</p>
736 </td></tr></table><br>
737 </td></tr></table>
738 <hr width="75%">
739 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
740 <td width="100%"></td>
741 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
742
743 <table align=center width="75%"><tr><td>
744 <h4><a name="FTC_ImageCache_New">FTC_ImageCache_New</a></h4>
745 <table align=center width="87%"><tr><td>
746 Defined in FT_CACHE_H (freetype/ftcache.h).
747 </td></tr></table><br>
748 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
749
750   FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
751   <b>FTC_ImageCache_New</b>( <a href="ft2-cache_subsystem.html#FTC_Manager">FTC_Manager</a>      manager,
752                       <a href="ft2-cache_subsystem.html#FTC_ImageCache">FTC_ImageCache</a>  *acache );
753
754 </pre></table><br>
755 <table align=center width="87%"><tr><td>
756 <p>Create a new glyph image cache.</p>
757 </td></tr></table><br>
758 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
759 <p></p>
760 <table cellpadding=3 border=0>
761 <tr valign=top><td><b>manager</b></td><td>
762 <p>The parent manager for the image cache.</p>
763 </td></tr>
764 </table>
765 </td></tr></table>
766 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
767 <p></p>
768 <table cellpadding=3 border=0>
769 <tr valign=top><td><b>acache</b></td><td>
770 <p>A handle to the new glyph image cache object.</p>
771 </td></tr>
772 </table>
773 </td></tr></table>
774 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
775 <p>FreeType error code. 0&nbsp;means success.</p>
776 </td></tr></table>
777 </td></tr></table>
778 <hr width="75%">
779 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
780 <td width="100%"></td>
781 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
782
783 <table align=center width="75%"><tr><td>
784 <h4><a name="FTC_ImageCache_Lookup">FTC_ImageCache_Lookup</a></h4>
785 <table align=center width="87%"><tr><td>
786 Defined in FT_CACHE_H (freetype/ftcache.h).
787 </td></tr></table><br>
788 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
789
790   FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
791   <b>FTC_ImageCache_Lookup</b>( <a href="ft2-cache_subsystem.html#FTC_ImageCache">FTC_ImageCache</a>  cache,
792                          <a href="ft2-cache_subsystem.html#FTC_ImageType">FTC_ImageType</a>   type,
793                          <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>         gindex,
794                          <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a>       *aglyph,
795                          <a href="ft2-cache_subsystem.html#FTC_Node">FTC_Node</a>       *anode );
796
797 </pre></table><br>
798 <table align=center width="87%"><tr><td>
799 <p>Retrieve a given glyph image from a glyph image cache.</p>
800 </td></tr></table><br>
801 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
802 <p></p>
803 <table cellpadding=3 border=0>
804 <tr valign=top><td><b>cache</b></td><td>
805 <p>A handle to the source glyph image cache.</p>
806 </td></tr>
807 <tr valign=top><td><b>type</b></td><td>
808 <p>A pointer to a glyph image type descriptor.</p>
809 </td></tr>
810 <tr valign=top><td><b>gindex</b></td><td>
811 <p>The glyph index to retrieve.</p>
812 </td></tr>
813 </table>
814 </td></tr></table>
815 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
816 <p></p>
817 <table cellpadding=3 border=0>
818 <tr valign=top><td><b>aglyph</b></td><td>
819 <p>The corresponding <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> object. 0&nbsp;in case of failure.</p>
820 </td></tr>
821 <tr valign=top><td><b>anode</b></td><td>
822 <p>Used to return the address of of the corresponding cache node after incrementing its reference count (see note below).</p>
823 </td></tr>
824 </table>
825 </td></tr></table>
826 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
827 <p>FreeType error code. 0&nbsp;means success.</p>
828 </td></tr></table>
829 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
830 <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>
831 <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>
832 <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>
833 </td></tr></table>
834 </td></tr></table>
835 <hr width="75%">
836 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
837 <td width="100%"></td>
838 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
839
840 <table align=center width="75%"><tr><td>
841 <h4><a name="FTC_ImageCache_LookupScaler">FTC_ImageCache_LookupScaler</a></h4>
842 <table align=center width="87%"><tr><td>
843 Defined in FT_CACHE_H (freetype/ftcache.h).
844 </td></tr></table><br>
845 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
846
847   FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
848   <b>FTC_ImageCache_LookupScaler</b>( <a href="ft2-cache_subsystem.html#FTC_ImageCache">FTC_ImageCache</a>  cache,
849                                <a href="ft2-cache_subsystem.html#FTC_Scaler">FTC_Scaler</a>      scaler,
850                                <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>        load_flags,
851                                <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>         gindex,
852                                <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a>       *aglyph,
853                                <a href="ft2-cache_subsystem.html#FTC_Node">FTC_Node</a>       *anode );
854
855 </pre></table><br>
856 <table align=center width="87%"><tr><td>
857 <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>
858 </td></tr></table><br>
859 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
860 <p></p>
861 <table cellpadding=3 border=0>
862 <tr valign=top><td><b>cache</b></td><td>
863 <p>A handle to the source glyph image cache.</p>
864 </td></tr>
865 <tr valign=top><td><b>scaler</b></td><td>
866 <p>A pointer to a scaler descriptor.</p>
867 </td></tr>
868 <tr valign=top><td><b>load_flags</b></td><td>
869 <p>The corresponding load flags.</p>
870 </td></tr>
871 <tr valign=top><td><b>gindex</b></td><td>
872 <p>The glyph index to retrieve.</p>
873 </td></tr>
874 </table>
875 </td></tr></table>
876 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
877 <p></p>
878 <table cellpadding=3 border=0>
879 <tr valign=top><td><b>aglyph</b></td><td>
880 <p>The corresponding <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> object. 0&nbsp;in case of failure.</p>
881 </td></tr>
882 <tr valign=top><td><b>anode</b></td><td>
883 <p>Used to return the address of of the corresponding cache node after incrementing its reference count (see note below).</p>
884 </td></tr>
885 </table>
886 </td></tr></table>
887 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
888 <p>FreeType error code. 0&nbsp;means success.</p>
889 </td></tr></table>
890 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
891 <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>
892 <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>
893 <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>
894 <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>
895 </td></tr></table>
896 </td></tr></table>
897 <hr width="75%">
898 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
899 <td width="100%"></td>
900 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
901
902 <table align=center width="75%"><tr><td>
903 <h4><a name="FTC_SBit">FTC_SBit</a></h4>
904 <table align=center width="87%"><tr><td>
905 Defined in FT_CACHE_H (freetype/ftcache.h).
906 </td></tr></table><br>
907 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
908
909   <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_SBitRec_*  <b>FTC_SBit</b>;
910
911 </pre></table><br>
912 <table align=center width="87%"><tr><td>
913 <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>
914 </td></tr></table><br>
915 </td></tr></table>
916 <hr width="75%">
917 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
918 <td width="100%"></td>
919 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
920
921 <table align=center width="75%"><tr><td>
922 <h4><a name="FTC_SBitRec">FTC_SBitRec</a></h4>
923 <table align=center width="87%"><tr><td>
924 Defined in FT_CACHE_H (freetype/ftcache.h).
925 </td></tr></table><br>
926 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
927
928   <span class="keyword">typedef</span> <span class="keyword">struct</span>  FTC_SBitRec_
929   {
930     <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>   width;
931     <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>   height;
932     <a href="ft2-basic_types.html#FT_Char">FT_Char</a>   left;
933     <a href="ft2-basic_types.html#FT_Char">FT_Char</a>   top;
934
935     <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>   format;
936     <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>   max_grays;
937     <a href="ft2-basic_types.html#FT_Short">FT_Short</a>  pitch;
938     <a href="ft2-basic_types.html#FT_Char">FT_Char</a>   xadvance;
939     <a href="ft2-basic_types.html#FT_Char">FT_Char</a>   yadvance;
940
941     <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>*  buffer;
942
943   } <b>FTC_SBitRec</b>;
944
945 </pre></table><br>
946 <table align=center width="87%"><tr><td>
947 <p>A very compact structure used to describe a small glyph bitmap.</p>
948 </td></tr></table><br>
949 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
950 <p></p>
951 <table cellpadding=3 border=0>
952 <tr valign=top><td><b>width</b></td><td>
953 <p>The bitmap width in pixels.</p>
954 </td></tr>
955 <tr valign=top><td><b>height</b></td><td>
956 <p>The bitmap height in pixels.</p>
957 </td></tr>
958 <tr valign=top><td><b>left</b></td><td>
959 <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>
960 </td></tr>
961 <tr valign=top><td><b>top</b></td><td>
962 <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>
963 </td></tr>
964 <tr valign=top><td><b>format</b></td><td>
965 <p>The format of the glyph bitmap (monochrome or gray).</p>
966 </td></tr>
967 <tr valign=top><td><b>max_grays</b></td><td>
968 <p>Maximum gray level value (in the range 1 to&nbsp;255).</p>
969 </td></tr>
970 <tr valign=top><td><b>pitch</b></td><td>
971 <p>The number of bytes per bitmap line. May be positive or negative.</p>
972 </td></tr>
973 <tr valign=top><td><b>xadvance</b></td><td>
974 <p>The horizontal advance width in pixels.</p>
975 </td></tr>
976 <tr valign=top><td><b>yadvance</b></td><td>
977 <p>The vertical advance height in pixels.</p>
978 </td></tr>
979 <tr valign=top><td><b>buffer</b></td><td>
980 <p>A pointer to the bitmap pixels.</p>
981 </td></tr>
982 </table>
983 </td></tr></table>
984 </td></tr></table>
985 <hr width="75%">
986 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
987 <td width="100%"></td>
988 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
989
990 <table align=center width="75%"><tr><td>
991 <h4><a name="FTC_SBitCache">FTC_SBitCache</a></h4>
992 <table align=center width="87%"><tr><td>
993 Defined in FT_CACHE_H (freetype/ftcache.h).
994 </td></tr></table><br>
995 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
996
997   <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_SBitCacheRec_*  <b>FTC_SBitCache</b>;
998
999 </pre></table><br>
1000 <table align=center width="87%"><tr><td>
1001 <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>
1002 </td></tr></table><br>
1003 </td></tr></table>
1004 <hr width="75%">
1005 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
1006 <td width="100%"></td>
1007 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
1008
1009 <table align=center width="75%"><tr><td>
1010 <h4><a name="FTC_SBitCache_New">FTC_SBitCache_New</a></h4>
1011 <table align=center width="87%"><tr><td>
1012 Defined in FT_CACHE_H (freetype/ftcache.h).
1013 </td></tr></table><br>
1014 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
1015
1016   FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
1017   <b>FTC_SBitCache_New</b>( <a href="ft2-cache_subsystem.html#FTC_Manager">FTC_Manager</a>     manager,
1018                      <a href="ft2-cache_subsystem.html#FTC_SBitCache">FTC_SBitCache</a>  *acache );
1019
1020 </pre></table><br>
1021 <table align=center width="87%"><tr><td>
1022 <p>Create a new cache to store small glyph bitmaps.</p>
1023 </td></tr></table><br>
1024 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
1025 <p></p>
1026 <table cellpadding=3 border=0>
1027 <tr valign=top><td><b>manager</b></td><td>
1028 <p>A handle to the source cache manager.</p>
1029 </td></tr>
1030 </table>
1031 </td></tr></table>
1032 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
1033 <p></p>
1034 <table cellpadding=3 border=0>
1035 <tr valign=top><td><b>acache</b></td><td>
1036 <p>A handle to the new sbit cache. NULL in case of error.</p>
1037 </td></tr>
1038 </table>
1039 </td></tr></table>
1040 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
1041 <p>FreeType error code. 0&nbsp;means success.</p>
1042 </td></tr></table>
1043 </td></tr></table>
1044 <hr width="75%">
1045 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
1046 <td width="100%"></td>
1047 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
1048
1049 <table align=center width="75%"><tr><td>
1050 <h4><a name="FTC_SBitCache_Lookup">FTC_SBitCache_Lookup</a></h4>
1051 <table align=center width="87%"><tr><td>
1052 Defined in FT_CACHE_H (freetype/ftcache.h).
1053 </td></tr></table><br>
1054 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
1055
1056   FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
1057   <b>FTC_SBitCache_Lookup</b>( <a href="ft2-cache_subsystem.html#FTC_SBitCache">FTC_SBitCache</a>    cache,
1058                         <a href="ft2-cache_subsystem.html#FTC_ImageType">FTC_ImageType</a>    type,
1059                         <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>          gindex,
1060                         <a href="ft2-cache_subsystem.html#FTC_SBit">FTC_SBit</a>        *sbit,
1061                         <a href="ft2-cache_subsystem.html#FTC_Node">FTC_Node</a>        *anode );
1062
1063 </pre></table><br>
1064 <table align=center width="87%"><tr><td>
1065 <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>
1066 </td></tr></table><br>
1067 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
1068 <p></p>
1069 <table cellpadding=3 border=0>
1070 <tr valign=top><td><b>cache</b></td><td>
1071 <p>A handle to the source sbit cache.</p>
1072 </td></tr>
1073 <tr valign=top><td><b>type</b></td><td>
1074 <p>A pointer to the glyph image type descriptor.</p>
1075 </td></tr>
1076 <tr valign=top><td><b>gindex</b></td><td>
1077 <p>The glyph index.</p>
1078 </td></tr>
1079 </table>
1080 </td></tr></table>
1081 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
1082 <p></p>
1083 <table cellpadding=3 border=0>
1084 <tr valign=top><td><b>sbit</b></td><td>
1085 <p>A handle to a small bitmap descriptor.</p>
1086 </td></tr>
1087 <tr valign=top><td><b>anode</b></td><td>
1088 <p>Used to return the address of of the corresponding cache node after incrementing its reference count (see note below).</p>
1089 </td></tr>
1090 </table>
1091 </td></tr></table>
1092 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
1093 <p>FreeType error code. 0&nbsp;means success.</p>
1094 </td></tr></table>
1095 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
1096 <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>
1097 <p>The descriptor's &lsquo;buffer&rsquo; field is set to&nbsp;0 to indicate a missing glyph bitmap.</p>
1098 <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>
1099 <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>
1100 </td></tr></table>
1101 </td></tr></table>
1102 <hr width="75%">
1103 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
1104 <td width="100%"></td>
1105 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
1106
1107 <table align=center width="75%"><tr><td>
1108 <h4><a name="FTC_SBitCache_LookupScaler">FTC_SBitCache_LookupScaler</a></h4>
1109 <table align=center width="87%"><tr><td>
1110 Defined in FT_CACHE_H (freetype/ftcache.h).
1111 </td></tr></table><br>
1112 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
1113
1114   FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
1115   <b>FTC_SBitCache_LookupScaler</b>( <a href="ft2-cache_subsystem.html#FTC_SBitCache">FTC_SBitCache</a>  cache,
1116                               <a href="ft2-cache_subsystem.html#FTC_Scaler">FTC_Scaler</a>     scaler,
1117                               <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>       load_flags,
1118                               <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>        gindex,
1119                               <a href="ft2-cache_subsystem.html#FTC_SBit">FTC_SBit</a>      *sbit,
1120                               <a href="ft2-cache_subsystem.html#FTC_Node">FTC_Node</a>      *anode );
1121
1122 </pre></table><br>
1123 <table align=center width="87%"><tr><td>
1124 <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>
1125 </td></tr></table><br>
1126 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
1127 <p></p>
1128 <table cellpadding=3 border=0>
1129 <tr valign=top><td><b>cache</b></td><td>
1130 <p>A handle to the source sbit cache.</p>
1131 </td></tr>
1132 <tr valign=top><td><b>scaler</b></td><td>
1133 <p>A pointer to the scaler descriptor.</p>
1134 </td></tr>
1135 <tr valign=top><td><b>load_flags</b></td><td>
1136 <p>The corresponding load flags.</p>
1137 </td></tr>
1138 <tr valign=top><td><b>gindex</b></td><td>
1139 <p>The glyph index.</p>
1140 </td></tr>
1141 </table>
1142 </td></tr></table>
1143 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
1144 <p></p>
1145 <table cellpadding=3 border=0>
1146 <tr valign=top><td><b>sbit</b></td><td>
1147 <p>A handle to a small bitmap descriptor.</p>
1148 </td></tr>
1149 <tr valign=top><td><b>anode</b></td><td>
1150 <p>Used to return the address of of the corresponding cache node after incrementing its reference count (see note below).</p>
1151 </td></tr>
1152 </table>
1153 </td></tr></table>
1154 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
1155 <p>FreeType error code. 0&nbsp;means success.</p>
1156 </td></tr></table>
1157 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
1158 <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>
1159 <p>The descriptor's &lsquo;buffer&rsquo; field is set to&nbsp;0 to indicate a missing glyph bitmap.</p>
1160 <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>
1161 <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>
1162 </td></tr></table>
1163 </td></tr></table>
1164 <hr width="75%">
1165 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
1166 <td width="100%"></td>
1167 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
1168
1169 </body>
1170 </html>