/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. p { text-align: justify; }
  12. h1 { text-align: center; }
  13. li { text-align: justify; }
  14. td { padding: 0 0.5em 0 0.5em; }
  15. td.left { padding: 0 0.5em 0 0.5em;
  16. text-align: left; }
  17. a:link { color: #0000EF; }
  18. a:visited { color: #51188E; }
  19. a:hover { color: #FF0000; }
  20. span.keyword { font-family: monospace;
  21. text-align: left;
  22. white-space: pre;
  23. color: darkblue; }
  24. pre.colored { color: blue; }
  25. ul.empty { list-style-type: none; }
  26. </style>
  27. </head>
  28. <body>
  29. <table align=center><tr><td><font size=-1>[<a href="ft2-index.html">Index</a>]</font></td>
  30. <td width="100%"></td>
  31. <td><font size=-1>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
  32. <center><h1>FreeType-2.4.3 API Reference</h1></center>
  33. <center><h1>
  34. Size Management
  35. </h1></center>
  36. <h2>Synopsis</h2>
  37. <table align=center cellspacing=5 cellpadding=0 border=0>
  38. <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>
  39. </table><br><br>
  40. <table align=center width="87%"><tr><td>
  41. <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>
  42. <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>
  43. <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>
  44. <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>
  45. </td></tr></table><br>
  46. <table align=center width="75%"><tr><td>
  47. <h4><a name="FT_New_Size">FT_New_Size</a></h4>
  48. <table align=center width="87%"><tr><td>
  49. Defined in FT_SIZES_H (freetype/ftsizes.h).
  50. </td></tr></table><br>
  51. <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
  52. FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  53. <b>FT_New_Size</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
  54. <a href="ft2-base_interface.html#FT_Size">FT_Size</a>* size );
  55. </pre></table><br>
  56. <table align=center width="87%"><tr><td>
  57. <p>Create a new size object from a given face object.</p>
  58. </td></tr></table><br>
  59. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
  60. <p></p>
  61. <table cellpadding=3 border=0>
  62. <tr valign=top><td><b>face</b></td><td>
  63. <p>A handle to a parent face object.</p>
  64. </td></tr>
  65. </table>
  66. </td></tr></table>
  67. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
  68. <p></p>
  69. <table cellpadding=3 border=0>
  70. <tr valign=top><td><b>asize</b></td><td>
  71. <p>A handle to a new size object.</p>
  72. </td></tr>
  73. </table>
  74. </td></tr></table>
  75. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
  76. <p>FreeType error code. 0&nbsp;means success.</p>
  77. </td></tr></table>
  78. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
  79. <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>
  80. </td></tr></table>
  81. </td></tr></table>
  82. <hr width="75%">
  83. <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
  84. <td width="100%"></td>
  85. <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
  86. <table align=center width="75%"><tr><td>
  87. <h4><a name="FT_Done_Size">FT_Done_Size</a></h4>
  88. <table align=center width="87%"><tr><td>
  89. Defined in FT_SIZES_H (freetype/ftsizes.h).
  90. </td></tr></table><br>
  91. <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
  92. FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  93. <b>FT_Done_Size</b>( <a href="ft2-base_interface.html#FT_Size">FT_Size</a> size );
  94. </pre></table><br>
  95. <table align=center width="87%"><tr><td>
  96. <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>
  97. </td></tr></table><br>
  98. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
  99. <p></p>
  100. <table cellpadding=3 border=0>
  101. <tr valign=top><td><b>size</b></td><td>
  102. <p>A handle to a target size object.</p>
  103. </td></tr>
  104. </table>
  105. </td></tr></table>
  106. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
  107. <p>FreeType error code. 0&nbsp;means success.</p>
  108. </td></tr></table>
  109. </td></tr></table>
  110. <hr width="75%">
  111. <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
  112. <td width="100%"></td>
  113. <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
  114. <table align=center width="75%"><tr><td>
  115. <h4><a name="FT_Activate_Size">FT_Activate_Size</a></h4>
  116. <table align=center width="87%"><tr><td>
  117. Defined in FT_SIZES_H (freetype/ftsizes.h).
  118. </td></tr></table><br>
  119. <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
  120. FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  121. <b>FT_Activate_Size</b>( <a href="ft2-base_interface.html#FT_Size">FT_Size</a> size );
  122. </pre></table><br>
  123. <table align=center width="87%"><tr><td>
  124. <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>
  125. <p>This function can be used to &lsquo;activate&rsquo; a previously created size object.</p>
  126. </td></tr></table><br>
  127. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
  128. <p></p>
  129. <table cellpadding=3 border=0>
  130. <tr valign=top><td><b>size</b></td><td>
  131. <p>A handle to a target size object.</p>
  132. </td></tr>
  133. </table>
  134. </td></tr></table>
  135. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
  136. <p>FreeType error code. 0&nbsp;means success.</p>
  137. </td></tr></table>
  138. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
  139. <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>
  140. </td></tr></table>
  141. </td></tr></table>
  142. <hr width="75%">
  143. <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
  144. <td width="100%"></td>
  145. <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
  146. </body>
  147. </html>