ft2-cache_subsystem.html
来自「嵌入式freetype库的应用文档包含freetype的简要说明和应用examp」· HTML 代码 · 共 951 行 · 第 1/4 页
HTML
951 行
<b>FTC_Manager_Done</b>( <a href="ft2-cache_subsystem.html#FTC_Manager">FTC_Manager</a> manager );</pre></table><br><table align=center width="87%"><tr><td><p>Destroys a given manager after emptying it.</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>manager</b></td><td><p>A handle to the target cache manager object.</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_LookupFace">FTC_Manager_LookupFace</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_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></table><br><table align=center width="87%"><tr><td><p>Retrieves 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></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>manager</b></td><td><p>A handle to the cache manager.</p></td></tr><tr valign=top><td><b>face_id</b></td><td><p>The ID of the face object.</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 handle to the face object.</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 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->size can be 0). If you need a specific `font size', 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></td></tr></table></td></tr></table><hr width="75%"><table align=center width="75%"><tr><td><h4><a name="FTC_ScalerRec">FTC_ScalerRec</a></h4><table align=center width="87%"><tr bgcolor="#D6E8FF"><td><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>, *FTC_Scaler;</pre></table><br><table align=center width="87%"><tr><td><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></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 source face ID.</p></td></tr><tr valign=top><td><b>width</b></td><td><p>The character width.</p></td></tr><tr valign=top><td><b>height</b></td><td><p>The character height.</p></td></tr><tr valign=top><td><b>pixel</b></td><td><p>A Boolean. If TRUE, the `width' and `height' fields are interpreted as integer pixel character sizes. Otherwise, they are expressed as 1/64th of points.</p></td></tr><tr valign=top><td><b>x_res</b></td><td><p>Only used when `pixel' is FALSE to indicate the horizontal resolution in dpi.</p></td></tr><tr valign=top><td><b>y_res</b></td><td><p>Only used when `pixel' is FALSE to indicate the vertical resolution in dpi.</p></td></tr></table></td></tr></table><table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td><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></td></tr></table></td></tr></table><hr width="75%"><table align=center width="75%"><tr><td><h4><a name="FTC_Manager_LookupSize">FTC_Manager_LookupSize</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_LookupSize</b>( <a href="ft2-cache_subsystem.html#FTC_Manager">FTC_Manager</a> manager, FTC_Scaler scaler, <a href="ft2-base_interface.html#FT_Size">FT_Size</a> *asize );</pre></table><br><table align=center width="87%"><tr><td><p>Retrieve the <a href="ft2-base_interface.html#FT_Size">FT_Size</a> object that corresponds to a given ?FTC_Scaler? through a 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>manager</b></td><td><p>A handle to the cache manager.</p></td></tr><tr valign=top><td><b>scaler</b></td><td><p>A scaler handle.</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>asize</b></td><td><p>A handle to the size object.</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 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 `size->face' if you need it. Note that this object is also owned by the manager.</p></td></tr></table></td></tr></table><hr width="75%"><table align=center width="75%"><tr><td><h4><a name="FTC_Node_Unref">FTC_Node_Unref</a></h4><table align=center width="87%"><tr bgcolor="#D6E8FF"><td><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 ); /* remove all nodes belonging to a given face_id */ FT_EXPORT( <span class="keyword">void</span> ) FTC_Manager_RemoveFaceID( <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></table><br><table align=center width="87%"><tr><td><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></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>node</b></td><td><p>The cache node handle.</p></td></tr><tr valign=top><td><b>manager</b></td><td><p>The cache manager handle.</p></td></tr></table></td></tr></table></td></tr></table><hr width="75%"><table align=center width="75%"><tr><td><h4><a name="FTC_CMapCache">FTC_CMapCache</a></h4><table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre> <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_CMapCacheRec_* <b>FTC_CMapCache</b>;</pre></table><br><table align=center width="87%"><tr><td><p>An opaque handle used to manager a charmap cache. This cache is to hold character codes -> glyph indices mappings.</p></td></tr></table><br></td></tr></table><hr width="75%"><table align=center width="75%"><tr><td><h4><a name="FTC_CMapCache_New">FTC_CMapCache_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_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></table><br><table align=center width="87%"><tr><td><p>Creates a new charmap cache.</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>manager</b></td><td><p>A handle to the cache manager.</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>acache</b></td><td><p>A new cache handle. NULL in case of error.</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>Like all other caches, this one will be destroyed with the cache manager.</p></td></tr></table></td></tr></table><hr width="75%"><table align=center width="75%"><tr><td><h4><a name="FTC_CMapCache_Lookup">FTC_CMapCache_Lookup</a></h4><table align=center width="87%"><tr bgcolor="#D6E8FF"><td><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_CMapDesc">FTC_CMapDesc</a> cmap_desc, FT_UInt32 <span class="keyword">char_code</span> );</pre></table><br><table align=center width="87%"><tr><td><p>Translates a character code into a glyph index, using the charmap cache.</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>cache</b></td><td><p>A charmap cache handle.</p></td></tr><tr valign=top><td><b>cmap_desc</b></td><td><p>A charmap descriptor handle.</p></td></tr><tr valign=top><td><b>char_code</b></td><td><p>The character code (in the corresponding charmap).</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>Glyph index. 0 means "no glyph".</p></td></tr></table>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?