Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | RSS feed

  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.5.0 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.5.0 API Reference</h1></center>
  39.  
  40. <center><h1>
  41. The TrueType driver
  42. </h1></center>
  43. <h2>Synopsis</h2>
  44. <table align=center cellspacing=5 cellpadding=0 border=0>
  45. <tr><td></td><td><a href="#interpreter-version">interpreter-version</a></td><td></td><td><a href="#TT_INTERPRETER_VERSION_XXX">TT_INTERPRETER_VERSION_XXX</a></td></tr>
  46. </table><br><br>
  47.  
  48. <table align=center width="87%"><tr><td>
  49. <p>While FreeType's TrueType driver doesn't expose API functions by itself, it is possible to control its behaviour with <a href="ft2-module_management.html#FT_Property_Set">FT_Property_Set</a> and <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a>. The following lists the available properties together with the necessary macros and structures.</p>
  50. <p>The TrueType driver's module name is &lsquo;truetype&rsquo;.</p>
  51. </td></tr></table><br>
  52. <table align=center width="75%"><tr><td>
  53. <h4><a name="interpreter-version">interpreter-version</a></h4>
  54. <table align=center width="87%"><tr><td>
  55. <p>Currently, two versions are available which represent the bytecode interpreter with and without subpixel hinting support, respectively. The default is subpixel support if TT_CONFIG_OPTION_SUBPIXEL_HINTING is defined, and no subpixel support otherwise (since it isn't available then).</p>
  56. <p>If subpixel hinting is on, many TrueType bytecode instructions behave differently compared to B/W or grayscale rendering. The main idea is to render at a much increased horizontal resolution, then sampling down the created output to subpixel precision. However, many older fonts are not suited to this and must be specially taken care of by applying (hardcoded) font-specific tweaks.</p>
  57. <p>Details on subpixel hinting and some of the necessary tweaks can be found in Greg Hitchcock's whitepaper at &lsquo;http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx&rsquo;.</p>
  58. <p>The following example code demonstrates how to activate subpixel hinting (omitting the error handling).</p>
  59. <pre class="colored">
  60.  FT_Library  library;
  61.  FT_Face     face;
  62.  FT_UInt     interpreter_version = TT_INTERPRETER_VERSION_38;
  63.  
  64.  
  65.  FT_Init_FreeType( &amp;library );
  66.  
  67.  FT_Property_Set( library, "truetype",
  68.                            "interpreter-version",
  69.                            &amp;interpreter_version );
  70. </pre>
  71. </td></tr></table><br>
  72. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
  73. <p>This property can be used with <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a> also.</p>
  74. </td></tr></table>
  75. </td></tr></table>
  76. <hr width="75%">
  77. <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
  78. <td width="100%"></td>
  79. <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
  80.  
  81. <table align=center width="75%"><tr><td>
  82. <h4><a name="TT_INTERPRETER_VERSION_XXX">TT_INTERPRETER_VERSION_XXX</a></h4>
  83. <table align=center width="87%"><tr><td>
  84. Defined in FT_TRUETYPE_DRIVER_H (freetype/ftttdrv.h).
  85. </td></tr></table><br>
  86. <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
  87.  
  88. #define <a href="ft2-tt_driver.html#TT_INTERPRETER_VERSION_XXX">TT_INTERPRETER_VERSION_35</a>  35
  89. #define <a href="ft2-tt_driver.html#TT_INTERPRETER_VERSION_XXX">TT_INTERPRETER_VERSION_38</a>  38
  90.  
  91. </pre></table><br>
  92. <table align=center width="87%"><tr><td>
  93. <p>A list of constants used for the <a href="ft2-tt_driver.html#interpreter-version">interpreter-version</a> property to select the hinting engine for Truetype fonts.</p>
  94. <p>The numeric value in the constant names represents the version number as returned by the &lsquo;GETINFO&rsquo; bytecode instruction.</p>
  95. </td></tr></table><br>
  96. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td>
  97. <p></p>
  98. <table cellpadding=3 border=0>
  99. <tr valign=top><td colspan=0><b>TT_INTERPRETER_VERSION_35</b></td></tr>
  100. <tr valign=top><td></td><td>
  101. <p>Version&nbsp;35 corresponds to MS rasterizer v.1.7 as used e.g. in Windows&nbsp;98; only grayscale and B/W rasterizing is supported.</p>
  102. </td></tr>
  103. <tr valign=top><td colspan=0><b>TT_INTERPRETER_VERSION_38</b></td></tr>
  104. <tr valign=top><td></td><td>
  105. <p>Version&nbsp;38 corresponds to MS rasterizer v.1.9; it is roughly equivalent to the hinting provided by DirectWrite ClearType (as can be found, for example, in the Internet Explorer&nbsp;9 running on Windows&nbsp;7).</p>
  106. </td></tr>
  107. </table>
  108. </td></tr></table>
  109. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
  110. <p>This property controls the behaviour of the bytecode interpreter and thus how outlines get hinted. It does <b>not</b> control how glyph get rasterized! In particular, it does not control subpixel color filtering.</p>
  111. <p>If FreeType has not been compiled with configuration option FT_CONFIG_OPTION_SUBPIXEL_HINTING, selecting version&nbsp;38 causes an &lsquo;FT_Err_Unimplemented_Feature&rsquo; error.</p>
  112. </td></tr></table>
  113. </td></tr></table>
  114. <hr width="75%">
  115. <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
  116. <td width="100%"></td>
  117. <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
  118.  
  119. </body>
  120. </html>
  121.