⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ft2-cache_subsystem.html

📁 Free type 2.1.0 Documents
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<!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=iso-8859-1">
<title>FreeType-2.1.10 API Reference</title>
<style type="text/css">
  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF; }

  p { text-align: justify; }
  h1 { text-align: center; }
  li { text-align: justify; }

  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

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

  pre.colored { color: blue; }

  ul.empty { list-style-type: none; }
</style>
</head>
<body>
<center><h1>FreeType-2.1.10 API Reference</h1></center>

<center><h1>
Cache Sub-System
</h1></center>
<h2>Synopsis</h2>
<table align=center cellspacing=5 cellpadding=0 border=0>
<tr><td></td><td><a href="#FTC_Manager">FTC_Manager</a></td><td></td><td><a href="#FTC_Manager_LookupSize">FTC_Manager_LookupSize</a></td><td></td><td><a href="#FTC_SBitCache_New">FTC_SBitCache_New</a></td></tr>
<tr><td></td><td><a href="#FTC_FaceID">FTC_FaceID</a></td><td></td><td><a href="#FTC_Node_Unref">FTC_Node_Unref</a></td><td></td><td><a href="#FTC_SBitCache_Lookup">FTC_SBitCache_Lookup</a></td></tr>
<tr><td></td><td><a href="#FTC_Face_Requester">FTC_Face_Requester</a></td><td></td><td><a href="#FTC_CMapCache">FTC_CMapCache</a></td><td></td><td><a href="#FTC_CMapCache">FTC_CMapCache</a></td></tr>
<tr><td></td><td><a href="#FTC_FontRec">FTC_FontRec</a></td><td></td><td><a href="#FTC_CMapCache_New">FTC_CMapCache_New</a></td><td></td><td><a href="#FTC_CMapDesc">FTC_CMapDesc</a></td></tr>
<tr><td></td><td><a href="#FTC_Font">FTC_Font</a></td><td></td><td><a href="#FTC_CMapCache_Lookup">FTC_CMapCache_Lookup</a></td><td></td><td><a href="#FTC_CMapType">FTC_CMapType</a></td></tr>
<tr><td></td><td><a href="#FTC_Node">FTC_Node</a></td><td></td><td><a href="#FTC_ImageCache">FTC_ImageCache</a></td><td></td><td><a href="#FTC_CMapIdRec">FTC_CMapIdRec</a></td></tr>
<tr><td></td><td><a href="#FTC_Manager_New">FTC_Manager_New</a></td><td></td><td><a href="#FTC_ImageCache_New">FTC_ImageCache_New</a></td><td></td><td><a href="#FTC_CMapDescRec">FTC_CMapDescRec</a></td></tr>
<tr><td></td><td><a href="#FTC_Manager_Reset">FTC_Manager_Reset</a></td><td></td><td><a href="#FTC_ImageCache_Lookup">FTC_ImageCache_Lookup</a></td><td></td><td><a href="#FTC_CMapCache_New">FTC_CMapCache_New</a></td></tr>
<tr><td></td><td><a href="#FTC_Manager_Done">FTC_Manager_Done</a></td><td></td><td><a href="#FTC_SBit">FTC_SBit</a></td><td></td><td><a href="#FTC_CMapCache_Lookup">FTC_CMapCache_Lookup</a></td></tr>
<tr><td></td><td><a href="#FTC_Manager_LookupFace">FTC_Manager_LookupFace</a></td><td></td><td><a href="#FTC_SBitRec">FTC_SBitRec</a></td><td></td><td><a href="#FTC_Manager_Compress">FTC_Manager_Compress</a></td></tr>
<tr><td></td><td><a href="#FTC_ScalerRec">FTC_ScalerRec</a></td><td></td><td><a href="#FTC_SBitCache">FTC_SBitCache</a></td><td></td><td></td></tr>
</table><br><br>

<table align=center width="87%"><tr><td>
<p>This section describes the FreeType 2 cache sub-system which is still in beta.</p>
</td></tr></table><br>
<table align=center width="75%"><tr><td>
<h4><a name="FTC_Manager">FTC_Manager</a></h4>
<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>

  <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_ManagerRec_*  <b>FTC_Manager</b>;

</pre></table><br>
<table align=center width="87%"><tr><td>
<p>This object 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>
</td></tr></table><br>
</td></tr></table><hr width="75%">
<table align=center width="75%"><tr><td>
<h4><a name="FTC_FaceID">FTC_FaceID</a></h4>
<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>

  <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_FaceIDRec_*  <b>FTC_FaceID</b>;

</pre></table><br>
<table align=center width="87%"><tr><td>
<p>An opaque pointer type that is used to identity face objects. The contents of such objects is application-dependent.</p>
</td></tr></table><br>
</td></tr></table><hr width="75%">
<table align=center width="75%"><tr><td>
<h4><a name="FTC_Face_Requester">FTC_Face_Requester</a></h4>
<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><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>  request_data,
                         <a href="ft2-base_interface.html#FT_Face">FT_Face</a>*    aface );

</pre></table><br>
<table align=center width="87%"><tr><td>
<p>A callback function provided by client applications. It is used 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.</p>
</td></tr></table><br>
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
<table cellpadding=3>
<tr valign=top><td><b>face_id</b></td><td>
<p>The face ID to resolve.</p>
</td></tr>
<tr valign=top><td><b>library</b></td><td>
<p>A handle to a FreeType library object.</p>
</td></tr>
<tr valign=top><td><b>data</b></td><td>
<p>Application-provided request data.</p>
</td></tr>
</table>
</td></tr></table>
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
<table cellpadding=3>
<tr valign=top><td><b>aface</b></td><td>
<p>A new <a href="ft2-base_interface.html#FT_Face">FT_Face</a> handle.</p>
</td></tr>
</table>
</td></tr></table>
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
<p>FreeType error code. 0 means success.</p>
</td></tr></table>
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
<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>
</td></tr></table>
</td></tr></table><hr width="75%">
<table align=center width="75%"><tr><td>
<h4><a name="FTC_FontRec">FTC_FontRec</a></h4>
<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>

  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FTC_FontRec_
  {
    <a href="ft2-cache_subsystem.html#FTC_FaceID">FTC_FaceID</a>  face_id;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>   pix_width;
    <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>   pix_height;

  } <b>FTC_FontRec</b>;

</pre></table><br>
<table align=center width="87%"><tr><td>
<p>A simple structure used to describe a given `font' to the cache manager. Note that a `font' is the combination of a given face with a given character size.</p>
</td></tr></table><br>
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
<table cellpadding=3>
<tr valign=top><td><b>face_id</b></td><td>
<p>The ID of the face to use.</p>
</td></tr>
<tr valign=top><td><b>pix_width</b></td><td>
<p>The character width in integer pixels.</p>
</td></tr>
<tr valign=top><td><b>pix_height</b></td><td>
<p>The character height in integer pixels.</p>
</td></tr>
</table>
</td></tr></table>
</td></tr></table><hr width="75%">
<table align=center width="75%"><tr><td>
<h4><a name="FTC_Font">FTC_Font</a></h4>
<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>

  <span class="keyword">typedef</span> <a href="ft2-cache_subsystem.html#FTC_FontRec">FTC_FontRec</a>*  <b>FTC_Font</b>;

</pre></table><br>
<table align=center width="87%"><tr><td>
<p>A simple handle to an <a href="ft2-cache_subsystem.html#FTC_FontRec">FTC_FontRec</a> structure.</p>
</td></tr></table><br>
</td></tr></table><hr width="75%">
<table align=center width="75%"><tr><td>
<h4><a name="FTC_Node">FTC_Node</a></h4>
<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>

  <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_NodeRec_*  <b>FTC_Node</b>;

</pre></table><br>
<table align=center width="87%"><tr><td>
<p>An opaque handle to a cache node object. Each cache node is reference-counted. A node with a count of 0 might be flushed out of a full cache whenever a lookup request is performed.</p>
<p>If you lookup nodes, you have the ability to "acquire" them, i.e., to increment their reference count. This will prevent the node from being flushed out of the cache until you explicitly "release" 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>
</td></tr></table><br>
</td></tr></table><hr width="75%">
<table align=center width="75%"><tr><td>
<h4><a name="FTC_Manager_New">FTC_Manager_New</a></h4>
<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><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></table><br>
<table align=center width="87%"><tr><td>
<p>Creates a new cache manager.</p>
</td></tr></table><br>
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
<table cellpadding=3>
<tr valign=top><td><b>library</b></td><td>
<p>The parent FreeType library handle to use.</p>
</td></tr>
<tr valign=top><td><b>max_bytes</b></td><td>
<p>Maximum number of bytes to use for cached data. Use 0 for defaults.</p>
</td></tr>
<tr valign=top><td><b>requester</b></td><td>
<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 valign=top><td><b>req_data</b></td><td>
<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>
</td></tr></table>
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
<table cellpadding=3>
<tr valign=top><td><b>amanager</b></td><td>
<p>A handle to a new manager object. 0 in case of failure.</p>
</td></tr>
</table>
</td></tr></table>
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
<p>FreeType error code. 0 means success.</p>
</td></tr></table>
</td></tr></table><hr width="75%">
<table align=center width="75%"><tr><td>
<h4><a name="FTC_Manager_Reset">FTC_Manager_Reset</a></h4>
<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><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></table><br>
<table align=center width="87%"><tr><td>
<p>Empties 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>
</td></tr></table><br>
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
<table cellpadding=3>
<tr valign=top><td><b>manager</b></td><td>
<p>A handle to the manager.</p>
</td></tr>
</table>
</td></tr></table>
</td></tr></table><hr width="75%">
<table align=center width="75%"><tr><td>
<h4><a name="FTC_Manager_Done">FTC_Manager_Done</a></h4>
<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>

  FT_EXPORT( <span class="keyword">void</span> )

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -