PageRenderTime 52ms CodeModel.GetById 24ms RepoModel.GetById 1ms app.codeStats 0ms

/source/docs/reference/ft2-gasp_table.html

https://bitbucket.org/liflg/library-freetype
HTML | 190 lines | 164 code | 26 blank | 0 comment | 0 complexity | 2681813241dd46f2dd813ac8878843d6 MD5 | raw file
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  2. "https://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.9.1 API Reference</title>
  7. <style type="text/css">
  8. a:link { color: #0000EF; }
  9. a:visited { color: #51188E; }
  10. a:hover { color: #FF0000; }
  11. body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
  12. color: #000000;
  13. background: #FFFFFF;
  14. width: 87%;
  15. margin: auto; }
  16. div.section { width: 75%;
  17. margin: auto; }
  18. div.section hr { margin: 4ex 0 1ex 0; }
  19. div.section h4 { background-color: #EEEEFF;
  20. font-size: medium;
  21. font-style: oblique;
  22. font-weight: bold;
  23. margin: 3ex 0 1.5ex 9%;
  24. padding: 0.3ex 0 0.3ex 1%; }
  25. div.section p { margin: 1.5ex 0 1.5ex 10%; }
  26. div.section pre { margin: 3ex 0 3ex 9%;
  27. background-color: #D6E8FF;
  28. padding: 2ex 0 2ex 1%; }
  29. div.section table.fields { width: 90%;
  30. margin: 1.5ex 0 1.5ex 10%; }
  31. div.section table.toc { width: 95%;
  32. margin: 1.5ex 0 1.5ex 5%; }
  33. div.timestamp { text-align: center;
  34. font-size: 69%;
  35. margin: 1.5ex 0 1.5ex 0; }
  36. h1 { text-align: center; }
  37. h3 { font-size: medium;
  38. margin: 4ex 0 1.5ex 0; }
  39. p { text-align: justify; }
  40. pre.colored { color: blue; }
  41. span.keyword { font-family: monospace;
  42. text-align: left;
  43. white-space: pre;
  44. color: darkblue; }
  45. table.fields td.val { font-weight: bold;
  46. text-align: right;
  47. width: 30%;
  48. vertical-align: baseline;
  49. padding: 1ex 1em 1ex 0; }
  50. table.fields td.desc { vertical-align: baseline;
  51. padding: 1ex 0 1ex 1em; }
  52. table.fields td.desc p:first-child { margin: 0; }
  53. table.fields td.desc p { margin: 1.5ex 0 0 0; }
  54. table.index { margin: 6ex auto 6ex auto;
  55. border: 0;
  56. border-collapse: separate;
  57. border-spacing: 1em 0.3ex; }
  58. table.index tr { padding: 0; }
  59. table.index td { padding: 0; }
  60. table.index-toc-link { width: 100%;
  61. border: 0;
  62. border-spacing: 0;
  63. margin: 1ex 0 1ex 0; }
  64. table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
  65. font-size: 83%;
  66. text-align: left; }
  67. table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
  68. font-size: 83%;
  69. text-align: center; }
  70. table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
  71. font-size: 83%;
  72. text-align: right; }
  73. table.synopsis { margin: 6ex auto 6ex auto;
  74. border: 0;
  75. border-collapse: separate;
  76. border-spacing: 2em 0.6ex; }
  77. table.synopsis tr { padding: 0; }
  78. table.synopsis td { padding: 0; }
  79. table.toc td.link { width: 30%;
  80. text-align: right;
  81. vertical-align: baseline;
  82. padding: 1ex 1em 1ex 0; }
  83. table.toc td.desc { vertical-align: baseline;
  84. padding: 1ex 0 1ex 1em;
  85. text-align: left; }
  86. table.toc td.desc p:first-child { margin: 0;
  87. text-align: left; }
  88. table.toc td.desc p { margin: 1.5ex 0 0 0;
  89. text-align: left; }
  90. </style>
  91. </head>
  92. <body>
  93. <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
  94. <h1>FreeType-2.9.1 API Reference</h1>
  95. <h1 id="gasp_table">Gasp Table</h1>
  96. <h2>Synopsis</h2>
  97. <table class="synopsis">
  98. <tr><td><a href="#FT_GASP_XXX">FT_GASP_XXX</a></td><td><a href="#FT_Get_Gasp">FT_Get_Gasp</a></td><td></td><td></td><td></td><td></td></tr>
  99. </table>
  100. <p>The function <a href="ft2-gasp_table.html#FT_Get_Gasp">FT_Get_Gasp</a> can be used to query a TrueType or OpenType font for specific entries in its &lsquo;gasp&rsquo; table, if any. This is mainly useful when implementing native TrueType hinting with the bytecode interpreter to duplicate the Windows text rendering results.</p>
  101. <div class="section">
  102. <h3 id="FT_GASP_XXX">FT_GASP_XXX</h3>
  103. <p>Defined in FT_GASP_H (freetype/ftgasp.h).</p>
  104. <pre>
  105. #define <a href="ft2-gasp_table.html#FT_GASP_NO_TABLE">FT_GASP_NO_TABLE</a> -1
  106. #define <a href="ft2-gasp_table.html#FT_GASP_DO_GRIDFIT">FT_GASP_DO_GRIDFIT</a> 0x01
  107. #define <a href="ft2-gasp_table.html#FT_GASP_DO_GRAY">FT_GASP_DO_GRAY</a> 0x02
  108. #define <a href="ft2-gasp_table.html#FT_GASP_SYMMETRIC_GRIDFIT">FT_GASP_SYMMETRIC_GRIDFIT</a> 0x04
  109. #define <a href="ft2-gasp_table.html#FT_GASP_SYMMETRIC_SMOOTHING">FT_GASP_SYMMETRIC_SMOOTHING</a> 0x08
  110. </pre>
  111. <p>A list of values and/or bit-flags returned by the <a href="ft2-gasp_table.html#FT_Get_Gasp">FT_Get_Gasp</a> function.</p>
  112. <h4>values</h4>
  113. <table class="fields">
  114. <tr><td class="val" id="FT_GASP_NO_TABLE">FT_GASP_NO_TABLE</td><td class="desc">
  115. <p>This special value means that there is no GASP table in this face. It is up to the client to decide what to do.</p>
  116. </td></tr>
  117. <tr><td class="val" id="FT_GASP_DO_GRIDFIT">FT_GASP_DO_GRIDFIT</td><td class="desc">
  118. <p>Grid-fitting and hinting should be performed at the specified ppem. This <b>really</b> means TrueType bytecode interpretation. If this bit is not set, no hinting gets applied.</p>
  119. </td></tr>
  120. <tr><td class="val" id="FT_GASP_DO_GRAY">FT_GASP_DO_GRAY</td><td class="desc">
  121. <p>Anti-aliased rendering should be performed at the specified ppem. If not set, do monochrome rendering.</p>
  122. </td></tr>
  123. <tr><td class="val" id="FT_GASP_SYMMETRIC_SMOOTHING">FT_GASP_SYMMETRIC_SMOOTHING</td><td class="desc">
  124. <p>If set, smoothing along multiple axes must be used with ClearType.</p>
  125. </td></tr>
  126. <tr><td class="val" id="FT_GASP_SYMMETRIC_GRIDFIT">FT_GASP_SYMMETRIC_GRIDFIT</td><td class="desc">
  127. <p>Grid-fitting must be used with ClearType's symmetric smoothing.</p>
  128. </td></tr>
  129. </table>
  130. <h4>note</h4>
  131. <p>The bit-flags &lsquo;FT_GASP_DO_GRIDFIT&rsquo; and &lsquo;FT_GASP_DO_GRAY&rsquo; are to be used for standard font rasterization only. Independently of that, &lsquo;FT_GASP_SYMMETRIC_SMOOTHING&rsquo; and &lsquo;FT_GASP_SYMMETRIC_GRIDFIT&rsquo; are to be used if ClearType is enabled (and &lsquo;FT_GASP_DO_GRIDFIT&rsquo; and &lsquo;FT_GASP_DO_GRAY&rsquo; are consequently ignored).</p>
  132. <p>&lsquo;ClearType&rsquo; is Microsoft's implementation of LCD rendering, partly protected by patents.</p>
  133. <h4>since</h4>
  134. <p>2.3.0</p>
  135. <hr>
  136. <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
  137. <div class="section">
  138. <h3 id="FT_Get_Gasp">FT_Get_Gasp</h3>
  139. <p>Defined in FT_GASP_H (freetype/ftgasp.h).</p>
  140. <pre>
  141. FT_EXPORT( <a href="ft2-basic_types.html#FT_Int">FT_Int</a> )
  142. <b>FT_Get_Gasp</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
  143. <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> ppem );
  144. </pre>
  145. <p>For a TrueType or OpenType font file, return the rasterizer behaviour flags from the font's &lsquo;gasp&rsquo; table corresponding to a given character pixel size.</p>
  146. <h4>input</h4>
  147. <table class="fields">
  148. <tr><td class="val" id="face">face</td><td class="desc">
  149. <p>The source face handle.</p>
  150. </td></tr>
  151. <tr><td class="val" id="ppem">ppem</td><td class="desc">
  152. <p>The vertical character pixel size.</p>
  153. </td></tr>
  154. </table>
  155. <h4>return</h4>
  156. <p>Bit flags (see <a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_XXX</a>), or <a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_NO_TABLE</a> if there is no &lsquo;gasp&rsquo; table in the face.</p>
  157. <h4>note</h4>
  158. <p>If you want to use the MM functionality of OpenType variation fonts (i.e., using <a href="ft2-multiple_masters.html#FT_Set_Var_Design_Coordinates">FT_Set_Var_Design_Coordinates</a> and friends), call this function <b>after</b> setting an instance since the return values can change.</p>
  159. <h4>since</h4>
  160. <p>2.3.0</p>
  161. <hr>
  162. <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
  163. </body>
  164. </html>