ft2-mac_specific.html
来自「Free type 2.1.0 Documents」· HTML 代码 · 共 175 行
HTML
175 行
<!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>
Mac Specific Interface
</h1></center>
<h2>Synopsis</h2>
<table align=center cellspacing=5 cellpadding=0 border=0>
<tr><td></td><td><a href="#FT_New_Face_From_FOND">FT_New_Face_From_FOND</a></td><td></td><td><a href="#FT_New_Face_From_FSSpec">FT_New_Face_From_FSSpec</a></td></tr>
<tr><td></td><td><a href="#FT_GetFile_From_Mac_Name">FT_GetFile_From_Mac_Name</a></td><td></td><td></td></tr>
</table><br><br>
<table align=center width="87%"><tr><td>
<p>The following definitions are only available if FreeType is compiled on a Macintosh.</p>
</td></tr></table><br>
<table align=center width="75%"><tr><td>
<h4><a name="FT_New_Face_From_FOND">FT_New_Face_From_FOND</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>FT_New_Face_From_FOND</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
Handle fond,
<a href="ft2-basic_types.html#FT_Long">FT_Long</a> face_index,
<a href="ft2-base_interface.html#FT_Face">FT_Face</a> *aface );
</pre></table><br>
<table align=center width="87%"><tr><td>
<p>Creates a new face object from an FOND resource.</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>library</b></td><td>
<p>A handle to the library resource.</p>
</td></tr>
</table>
</td></tr></table>
<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>fond</b></td><td>
<p>An FOND resource.</p>
</td></tr>
<tr valign=top><td><b>face_index</b></td><td>
<p>Only supported for the -1 `sanity check' special case.</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 a new 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>notes</b></em></td></tr><tr><td>
<p>This function can be used to create FT_Face abjects from fonts that are installed in the system like so:</p>
<pre class="colored">
fond = GetResource( 'FOND', fontName );
error = FT_New_Face_From_FOND( library, fond, 0, &face );
</pre>
</td></tr></table>
</td></tr></table><hr width="75%">
<table align=center width="75%"><tr><td>
<h4><a name="FT_GetFile_From_Mac_Name">FT_GetFile_From_Mac_Name</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>FT_GetFile_From_Mac_Name</b>( <span class="keyword">const</span> <span class="keyword">char</span>* fontName,
FSSpec* pathSpec,
<a href="ft2-basic_types.html#FT_Long">FT_Long</a>* face_index );
</pre></table><br>
<table align=center width="87%"><tr><td>
<p>Returns an FSSpec for the disk file containing the named font.</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>fontName</b></td><td>
<p>Mac OS name of the font (eg. Times New Roman Bold).</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>pathSpec</b></td><td>
<p>FSSpec to the file. For passing to <a href="ft2-base_interface.html#FT_New_Face">FT_New_Face</a>.</p>
</td></tr>
<tr valign=top><td><b>face_index</b></td><td>
<p>Index of the face. For passing to <a href="ft2-base_interface.html#FT_New_Face">FT_New_Face</a>.</p>
</td></tr>
</table>
</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="FT_New_Face_From_FSSpec">FT_New_Face_From_FSSpec</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>FT_New_Face_From_FSSpec</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
<span class="keyword">const</span> FSSpec *spec,
<a href="ft2-basic_types.html#FT_Long">FT_Long</a> face_index,
<a href="ft2-base_interface.html#FT_Face">FT_Face</a> *aface );
</pre></table><br>
<table align=center width="87%"><tr><td>
<p>Creates a new face object from a given resource and typeface index using an FSSpec to the font file.</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>library</b></td><td>
<p>A handle to the library resource.</p>
</td></tr>
</table>
</td></tr></table>
<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>spec</b></td><td>
<p>FSSpec to the font file.</p>
</td></tr>
<tr valign=top><td><b>face_index</b></td><td>
<p>The index of the face within the resource. The first face has index 0.</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 a new 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><a href="ft2-mac_specific.html#FT_New_Face_From_FSSpec">FT_New_Face_From_FSSpec</a> is identical to <a href="ft2-base_interface.html#FT_New_Face">FT_New_Face</a> except it accepts an FSSpec instead of a path.</p>
</td></tr></table>
</td></tr></table><hr width="75%">
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?