Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | 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 CFF 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="#hinting-engine">hinting-engine</a></td><td></td><td><a href="#FT_CFF_HINTING_XXX">FT_CFF_HINTING_XXX</a></td><td></td><td><a href="#no-stem-darkening">no-stem-darkening</a></td></tr>
  46. </table><br><br>
  47.  
  48. <table align=center width="87%"><tr><td>
  49. <p>While FreeType's CFF 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 CFF driver's module name is &lsquo;cff&rsquo;.</p>
  51. </td></tr></table><br>
  52. <table align=center width="75%"><tr><td>
  53. <h4><a name="hinting-engine">hinting-engine</a></h4>
  54. <table align=center width="87%"><tr><td>
  55. <p>Thanks to Adobe, which contributed a new hinting (and parsing) engine, an application can select between &lsquo;freetype&rsquo; and &lsquo;adobe&rsquo; if compiled with CFF_CONFIG_OPTION_OLD_ENGINE. If this configuration macro isn't defined, &lsquo;hinting-engine&rsquo; does nothing.</p>
  56. <p>The default engine is &lsquo;freetype&rsquo; if CFF_CONFIG_OPTION_OLD_ENGINE is defined, and &lsquo;adobe&rsquo; otherwise.</p>
  57. <p>The following example code demonstrates how to select Adobe's hinting engine (omitting the error handling).</p>
  58. <pre class="colored">
  59.  FT_Library  library;
  60.  FT_Face     face;
  61.  FT_UInt     hinting_engine = FT_CFF_HINTING_ADOBE;
  62.  
  63.  
  64.  FT_Init_FreeType( &amp;library );
  65.  
  66.  FT_Property_Set( library, "cff",
  67.                            "hinting-engine", &amp;hinting_engine );
  68. </pre>
  69. </td></tr></table><br>
  70. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
  71. <p>This property can be used with <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a> also.</p>
  72. </td></tr></table>
  73. </td></tr></table>
  74. <hr width="75%">
  75. <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
  76. <td width="100%"></td>
  77. <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
  78.  
  79. <table align=center width="75%"><tr><td>
  80. <h4><a name="FT_CFF_HINTING_XXX">FT_CFF_HINTING_XXX</a></h4>
  81. <table align=center width="87%"><tr><td>
  82. Defined in FT_CFF_DRIVER_H (freetype/ftcffdrv.h).
  83. </td></tr></table><br>
  84. <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
  85.  
  86. #define <a href="ft2-cff_driver.html#FT_CFF_HINTING_XXX">FT_CFF_HINTING_FREETYPE</a>  0
  87. #define <a href="ft2-cff_driver.html#FT_CFF_HINTING_XXX">FT_CFF_HINTING_ADOBE</a>     1
  88.  
  89. </pre></table><br>
  90. <table align=center width="87%"><tr><td>
  91. <p>A list of constants used for the <a href="ft2-cff_driver.html#hinting-engine">hinting-engine</a> property to select the hinting engine for CFF fonts.</p>
  92. </td></tr></table><br>
  93. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td>
  94. <p></p>
  95. <table cellpadding=3 border=0>
  96. <tr valign=top><td colspan=0><b>FT_CFF_HINTING_FREETYPE</b></td></tr>
  97. <tr valign=top><td></td><td>
  98. <p>Use the old FreeType hinting engine.</p>
  99. </td></tr>
  100. <tr valign=top><td><b>FT_CFF_HINTING_ADOBE</b></td><td>
  101. <p>Use the hinting engine contributed by Adobe.</p>
  102. </td></tr>
  103. </table>
  104. </td></tr></table>
  105. </td></tr></table>
  106. <hr width="75%">
  107. <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
  108. <td width="100%"></td>
  109. <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
  110.  
  111. <table align=center width="75%"><tr><td>
  112. <h4><a name="no-stem-darkening">no-stem-darkening</a></h4>
  113. <table align=center width="87%"><tr><td>
  114. <p>By default, the Adobe CFF engine darkens stems at smaller sizes, regardless of hinting, to enhance contrast. Setting this property, stem darkening gets switched off.</p>
  115. <p>Note that stem darkening is never applied if <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a> is set.</p>
  116. <pre class="colored">
  117.  FT_Library  library;
  118.  FT_Face     face;
  119.  FT_Bool     no_stem_darkening = TRUE;
  120.  
  121.  
  122.  FT_Init_FreeType( &amp;library );
  123.  
  124.  FT_Property_Set( library, "cff",
  125.                            "no-stem-darkening", &amp;no_stem_darkening );
  126. </pre>
  127. </td></tr></table><br>
  128. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
  129. <p>This property can be used with <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a> also.</p>
  130. </td></tr></table>
  131. </td></tr></table>
  132. <hr width="75%">
  133. <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
  134. <td width="100%"></td>
  135. <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
  136.  
  137. </body>
  138. </html>
  139.