diff options
Diffstat (limited to 'freetype/docs/reference/ft2-auto_hinter.html')
-rw-r--r-- | freetype/docs/reference/ft2-auto_hinter.html | 44 |
1 files changed, 36 insertions, 8 deletions
diff --git a/freetype/docs/reference/ft2-auto_hinter.html b/freetype/docs/reference/ft2-auto_hinter.html index f2cf72a9d..d434ec47c 100644 --- a/freetype/docs/reference/ft2-auto_hinter.html +++ b/freetype/docs/reference/ft2-auto_hinter.html @@ -3,7 +3,7 @@ <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> -<title>FreeType-2.5.0 API Reference</title> +<title>FreeType-2.5.3 API Reference</title> <style type="text/css"> body { font-family: Verdana, Geneva, Arial, Helvetica, serif; color: #000000; @@ -35,16 +35,17 @@ <table align=center><tr><td><font size=-1>[<a href="ft2-index.html">Index</a>]</font></td> <td width="100%"></td> <td><font size=-1>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table> -<center><h1>FreeType-2.5.0 API Reference</h1></center> +<center><h1>FreeType-2.5.3 API Reference</h1></center> <center><h1> The auto-hinter </h1></center> <h2>Synopsis</h2> <table align=center cellspacing=5 cellpadding=0 border=0> -<tr><td></td><td><a href="#glyph-to-script-map">glyph-to-script-map</a></td><td></td><td><a href="#fallback-script">fallback-script</a></td></tr> +<tr><td></td><td><a href="#glyph-to-script-map">glyph-to-script-map</a></td><td></td><td><a href="#default-script">default-script</a></td></tr> <tr><td></td><td><a href="#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_XXX</a></td><td></td><td><a href="#increase-x-height">increase-x-height</a></td></tr> <tr><td></td><td><a href="#FT_Prop_GlyphToScriptMap">FT_Prop_GlyphToScriptMap</a></td><td></td><td><a href="#FT_Prop_IncreaseXHeight">FT_Prop_IncreaseXHeight</a></td></tr> +<tr><td></td><td><a href="#fallback-script">fallback-script</a></td><td></td><td></td></tr> </table><br><br> <table align=center width="87%"><tr><td> @@ -57,7 +58,7 @@ The auto-hinter <p><b>Experimental</b> <b>only</b></p> <p>The auto-hinter provides various script modules to hint glyphs. Examples of supported scripts are Latin or CJK. Before a glyph is auto-hinted, the Unicode character map of the font gets examined, and the script is then determined based on Unicode character ranges, see below.</p> <p>OpenType fonts, however, often provide much more glyphs than character codes (small caps, superscripts, ligatures, swashes, etc.), to be controlled by so-called ‘features’. Handling OpenType features can be quite complicated and thus needs a separate library on top of FreeType.</p> -<p>The mapping between glyph indices and scripts (in the auto-hinter sense, see the <a href="ft2-auto_hinter.html#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_XXX</a> values) is stored as an array with ‘num_glyphs’ elements, as found in the font's <a href="ft2-base_interface.html#FT_Face">FT_Face</a> structure. The ‘glyph-to-script-map’ property returns a pointer to this array which can be modified as needed. Note that the modification should happen before the first glyph gets processed by the auto-hinter so that the global analysis of the font shapes actually uses the modified mapping.</p> +<p>The mapping between glyph indices and scripts (in the auto-hinter sense, see the <a href="ft2-auto_hinter.html#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_XXX</a> values) is stored as an array with ‘num_glyphs’ elements, as found in the font's <a href="ft2-base_interface.html#FT_Face">FT_Face</a> structure. The ‘glyph-to-script-map’ property returns a pointer to this array, which can be modified as needed. Note that the modification should happen before the first glyph gets processed by the auto-hinter so that the global analysis of the font shapes actually uses the modified mapping.</p> <p>The following example code demonstrates how to access it (omitting the error handling).</p> <pre class="colored"> FT_Library library; @@ -87,7 +88,7 @@ The auto-hinter <table align=center width="75%"><tr><td> <h4><a name="FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_XXX</a></h4> <table align=center width="87%"><tr><td> -Defined in FT_AUTOHINTER_H (freetype/ftautoh.h). +Defined in FT_AUTOHINTER_H (ftautoh.h). </td></tr></table><br> <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre> @@ -210,7 +211,7 @@ Defined in FT_AUTOHINTER_H (freetype/ftautoh.h). <table align=center width="75%"><tr><td> <h4><a name="FT_Prop_GlyphToScriptMap">FT_Prop_GlyphToScriptMap</a></h4> <table align=center width="87%"><tr><td> -Defined in FT_AUTOHINTER_H (freetype/ftautoh.h). +Defined in FT_AUTOHINTER_H (ftautoh.h). </td></tr></table><br> <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre> @@ -250,7 +251,34 @@ Defined in FT_AUTOHINTER_H (freetype/ftautoh.h). </td></tr></table><br> <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td> <p>This property can be used with <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a> also.</p> -<p>It's important to use the right timing for changing this value: The creation of the glyph-to-script map which eventually uses the fallback script value gets triggered either by setting or reading a face-specific property like <a href="ft2-auto_hinter.html#glyph-to-script-map">glyph-to-script-map</a>, or by auto-hinting any glyph from that face. In particular, if you have already created an <a href="ft2-base_interface.html#FT_Face">FT_Face</a> structure but not loaded any glyph (using the auto-hinter), a change of the fallback glyph will affect this face.</p> +<p>It's important to use the right timing for changing this value: The creation of the glyph-to-script map that eventually uses the fallback script value gets triggered either by setting or reading a face-specific property like <a href="ft2-auto_hinter.html#glyph-to-script-map">glyph-to-script-map</a>, or by auto-hinting any glyph from that face. In particular, if you have already created an <a href="ft2-base_interface.html#FT_Face">FT_Face</a> structure but not loaded any glyph (using the auto-hinter), a change of the fallback script will affect this face.</p> +</td></tr></table> +</td></tr></table> +<hr width="75%"> +<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td> +<td width="100%"></td> +<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table> + +<table align=center width="75%"><tr><td> +<h4><a name="default-script">default-script</a></h4> +<table align=center width="87%"><tr><td> +<p><b>Experimental</b> <b>only</b></p> +<p>If Freetype gets compiled with FT_CONFIG_OPTION_USE_HARFBUZZ to make the HarfBuzz library access OpenType features for getting better glyph coverages, this property sets the (auto-fitter) script to be used for the default (OpenType) script data of a font's GSUB table. Features for the default script are intended for all scripts not explicitly handled in GSUB; an example is a ‘dlig’ feature, containing the combination of the characters ‘T’, ‘E’, and ‘L’ to form a ‘TEL’ ligature.</p> +<p>By default, this is <a href="ft2-auto_hinter.html#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_LATIN</a>. Using the ‘default-script’ property, this default value can be changed.</p> +<pre class="colored"> + FT_Library library; + FT_UInt default_script = FT_AUTOHINTER_SCRIPT_NONE; + + + FT_Init_FreeType( &library ); + + FT_Property_Set( library, "autofitter", + "default-script", &default_script ); +</pre> +</td></tr></table><br> +<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td> +<p>This property can be used with <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a> also.</p> +<p>It's important to use the right timing for changing this value: The creation of the glyph-to-script map that eventually uses the default script value gets triggered either by setting or reading a face-specific property like <a href="ft2-auto_hinter.html#glyph-to-script-map">glyph-to-script-map</a>, or by auto-hinting any glyph from that face. In particular, if you have already created an <a href="ft2-base_interface.html#FT_Face">FT_Face</a> structure but not loaded any glyph (using the auto-hinter), a change of the default script will affect this face.</p> </td></tr></table> </td></tr></table> <hr width="75%"> @@ -292,7 +320,7 @@ Defined in FT_AUTOHINTER_H (freetype/ftautoh.h). <table align=center width="75%"><tr><td> <h4><a name="FT_Prop_IncreaseXHeight">FT_Prop_IncreaseXHeight</a></h4> <table align=center width="87%"><tr><td> -Defined in FT_AUTOHINTER_H (freetype/ftautoh.h). +Defined in FT_AUTOHINTER_H (ftautoh.h). </td></tr></table><br> <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre> |