PageRenderTime 29ms CodeModel.GetById 12ms app.highlight 12ms RepoModel.GetById 1ms app.codeStats 0ms

/modules/freetype2/docs/reference/ft2-sizes_management.html

http://github.com/zpao/v8monkey
HTML | 164 lines | 147 code | 17 blank | 0 comment | 0 complexity | 6f62dfe3daceca41c80c42c302af2962 MD5 | raw file
  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.3 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.3 API Reference</h1></center>
 39
 40<center><h1>
 41Size Management
 42</h1></center>
 43<h2>Synopsis</h2>
 44<table align=center cellspacing=5 cellpadding=0 border=0>
 45<tr><td></td><td><a href="#FT_New_Size">FT_New_Size</a></td><td></td><td><a href="#FT_Done_Size">FT_Done_Size</a></td><td></td><td><a href="#FT_Activate_Size">FT_Activate_Size</a></td><td></td><td></td></tr>
 46</table><br><br>
 47
 48<table align=center width="87%"><tr><td>
 49<p>When creating a new face object (e.g., with <a href="ft2-base_interface.html#FT_New_Face">FT_New_Face</a>), an <a href="ft2-base_interface.html#FT_Size">FT_Size</a> object is automatically created and used to store all pixel-size dependent information, available in the &lsquo;face-&gt;size&rsquo; field.</p>
 50<p>It is however possible to create more sizes for a given face, mostly in order to manage several character pixel sizes of the same font family and style. See <a href="ft2-sizes_management.html#FT_New_Size">FT_New_Size</a> and <a href="ft2-sizes_management.html#FT_Done_Size">FT_Done_Size</a>.</p>
 51<p>Note that <a href="ft2-base_interface.html#FT_Set_Pixel_Sizes">FT_Set_Pixel_Sizes</a> and <a href="ft2-base_interface.html#FT_Set_Char_Size">FT_Set_Char_Size</a> only modify the contents of the current &lsquo;active&rsquo; size; you thus need to use <a href="ft2-sizes_management.html#FT_Activate_Size">FT_Activate_Size</a> to change it.</p>
 52<p>99% of applications won't need the functions provided here, especially if they use the caching sub-system, so be cautious when using these.</p>
 53</td></tr></table><br>
 54<table align=center width="75%"><tr><td>
 55<h4><a name="FT_New_Size">FT_New_Size</a></h4>
 56<table align=center width="87%"><tr><td>
 57Defined in FT_SIZES_H (freetype/ftsizes.h).
 58</td></tr></table><br>
 59<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
 60
 61  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
 62  <b>FT_New_Size</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>   face,
 63               <a href="ft2-base_interface.html#FT_Size">FT_Size</a>*  size );
 64
 65</pre></table><br>
 66<table align=center width="87%"><tr><td>
 67<p>Create a new size object from a given face object.</p>
 68</td></tr></table><br>
 69<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
 70<p></p>
 71<table cellpadding=3 border=0>
 72<tr valign=top><td><b>face</b></td><td>
 73<p>A handle to a parent face object.</p>
 74</td></tr>
 75</table>
 76</td></tr></table>
 77<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
 78<p></p>
 79<table cellpadding=3 border=0>
 80<tr valign=top><td><b>asize</b></td><td>
 81<p>A handle to a new size object.</p>
 82</td></tr>
 83</table>
 84</td></tr></table>
 85<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
 86<p>FreeType error code. 0&nbsp;means success.</p>
 87</td></tr></table>
 88<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
 89<p>You need to call <a href="ft2-sizes_management.html#FT_Activate_Size">FT_Activate_Size</a> in order to select the new size for upcoming calls to <a href="ft2-base_interface.html#FT_Set_Pixel_Sizes">FT_Set_Pixel_Sizes</a>, <a href="ft2-base_interface.html#FT_Set_Char_Size">FT_Set_Char_Size</a>, <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a>, <a href="ft2-base_interface.html#FT_Load_Char">FT_Load_Char</a>, etc.</p>
 90</td></tr></table>
 91</td></tr></table>
 92<hr width="75%">
 93<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
 94<td width="100%"></td>
 95<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
 96
 97<table align=center width="75%"><tr><td>
 98<h4><a name="FT_Done_Size">FT_Done_Size</a></h4>
 99<table align=center width="87%"><tr><td>
100Defined in FT_SIZES_H (freetype/ftsizes.h).
101</td></tr></table><br>
102<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
103
104  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
105  <b>FT_Done_Size</b>( <a href="ft2-base_interface.html#FT_Size">FT_Size</a>  size );
106
107</pre></table><br>
108<table align=center width="87%"><tr><td>
109<p>Discard a given size object. Note that <a href="ft2-base_interface.html#FT_Done_Face">FT_Done_Face</a> automatically discards all size objects allocated with <a href="ft2-sizes_management.html#FT_New_Size">FT_New_Size</a>.</p>
110</td></tr></table><br>
111<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
112<p></p>
113<table cellpadding=3 border=0>
114<tr valign=top><td><b>size</b></td><td>
115<p>A handle to a target size object.</p>
116</td></tr>
117</table>
118</td></tr></table>
119<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
120<p>FreeType error code. 0&nbsp;means success.</p>
121</td></tr></table>
122</td></tr></table>
123<hr width="75%">
124<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
125<td width="100%"></td>
126<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
127
128<table align=center width="75%"><tr><td>
129<h4><a name="FT_Activate_Size">FT_Activate_Size</a></h4>
130<table align=center width="87%"><tr><td>
131Defined in FT_SIZES_H (freetype/ftsizes.h).
132</td></tr></table><br>
133<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
134
135  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
136  <b>FT_Activate_Size</b>( <a href="ft2-base_interface.html#FT_Size">FT_Size</a>  size );
137
138</pre></table><br>
139<table align=center width="87%"><tr><td>
140<p>Even though it is possible to create several size objects for a given face (see <a href="ft2-sizes_management.html#FT_New_Size">FT_New_Size</a> for details), functions like <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a> or <a href="ft2-base_interface.html#FT_Load_Char">FT_Load_Char</a> only use the one which has been activated last to determine the &lsquo;current character pixel size&rsquo;.</p>
141<p>This function can be used to &lsquo;activate&rsquo; a previously created size object.</p>
142</td></tr></table><br>
143<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
144<p></p>
145<table cellpadding=3 border=0>
146<tr valign=top><td><b>size</b></td><td>
147<p>A handle to a target size object.</p>
148</td></tr>
149</table>
150</td></tr></table>
151<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
152<p>FreeType error code. 0&nbsp;means success.</p>
153</td></tr></table>
154<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
155<p>If &lsquo;face&rsquo; is the size's parent face object, this function changes the value of &lsquo;face-&gt;size&rsquo; to the input size handle.</p>
156</td></tr></table>
157</td></tr></table>
158<hr width="75%">
159<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
160<td width="100%"></td>
161<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
162
163</body>
164</html>