summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/freetype/docs/reference/ft2-glyph_management.html
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/freetype/docs/reference/ft2-glyph_management.html')
-rw-r--r--src/3rdparty/freetype/docs/reference/ft2-glyph_management.html101
1 files changed, 58 insertions, 43 deletions
diff --git a/src/3rdparty/freetype/docs/reference/ft2-glyph_management.html b/src/3rdparty/freetype/docs/reference/ft2-glyph_management.html
index aff942262..79fc5b6d2 100644
--- a/src/3rdparty/freetype/docs/reference/ft2-glyph_management.html
+++ b/src/3rdparty/freetype/docs/reference/ft2-glyph_management.html
@@ -3,7 +3,7 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.3.6 API Reference</title>
+<title>FreeType-2.3.9 API Reference</title>
<style type="text/css">
body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
color: #000000;
@@ -31,7 +31,11 @@
</style>
</head>
<body>
-<center><h1>FreeType-2.3.6 API Reference</h1></center>
+
+<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.3.9 API Reference</h1></center>
<center><h1>
Glyph Management
@@ -51,14 +55,6 @@ Glyph Management
<table align=center width="75%"><tr><td>
<h4><a name="FT_Glyph">FT_Glyph</a></h4>
<table align=center width="87%"><tr><td>
-Defined in FT_GLYPH_H (freetype/ftglyph.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
- <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_GlyphRec_* <b>FT_Glyph</b>;
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>Handle to an object used to model generic glyph images. It is a pointer to the <a href="ft2-glyph_management.html#FT_GlyphRec">FT_GlyphRec</a> structure and can contain a glyph bitmap or pointer.</p>
</td></tr></table><br>
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
@@ -116,14 +112,6 @@ Defined in FT_GLYPH_H (freetype/ftglyph.h).
<table align=center width="75%"><tr><td>
<h4><a name="FT_BitmapGlyph">FT_BitmapGlyph</a></h4>
<table align=center width="87%"><tr><td>
-Defined in FT_GLYPH_H (freetype/ftglyph.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
- <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_BitmapGlyphRec_* <b>FT_BitmapGlyph</b>;
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A handle to an object used to model a bitmap glyph image. This is a sub-class of <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a>, and a pointer to <a href="ft2-glyph_management.html#FT_BitmapGlyphRec">FT_BitmapGlyphRec</a>.</p>
</td></tr></table><br>
</td></tr></table>
@@ -162,7 +150,7 @@ Defined in FT_GLYPH_H (freetype/ftglyph.h).
<p>The left-side bearing, i.e., the horizontal distance from the current pen position to the left border of the glyph bitmap.</p>
</td></tr>
<tr valign=top><td><b>top</b></td><td>
-<p>The top-side bearing, i.e., the vertical distance from the current pen position to the top border of the glyph bitmap. This distance is positive for upwards-y!</p>
+<p>The top-side bearing, i.e., the vertical distance from the current pen position to the top border of the glyph bitmap. This distance is positive for upwards&nbsp;y!</p>
</td></tr>
<tr valign=top><td><b>bitmap</b></td><td>
<p>A descriptor for the bitmap.</p>
@@ -182,14 +170,6 @@ Defined in FT_GLYPH_H (freetype/ftglyph.h).
<table align=center width="75%"><tr><td>
<h4><a name="FT_OutlineGlyph">FT_OutlineGlyph</a></h4>
<table align=center width="87%"><tr><td>
-Defined in FT_GLYPH_H (freetype/ftglyph.h).
-</td></tr></table><br>
-<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
-
- <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_OutlineGlyphRec_* <b>FT_OutlineGlyph</b>;
-
-</pre></table><br>
-<table align=center width="87%"><tr><td>
<p>A handle to an object used to model an outline glyph image. This is a sub-class of <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a>, and a pointer to <a href="ft2-glyph_management.html#FT_OutlineGlyphRec">FT_OutlineGlyphRec</a>.</p>
</td></tr></table><br>
</td></tr></table>
@@ -228,7 +208,7 @@ Defined in FT_GLYPH_H (freetype/ftglyph.h).
</table>
</td></tr></table>
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>You can typecast a <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> to <a href="ft2-glyph_management.html#FT_OutlineGlyph">FT_OutlineGlyph</a> if you have &lsquo;glyph-&gt;format == FT_GLYPH_FORMAT_OUTLINE&rsquo;. This lets you access the outline's content easily.</p>
+<p>You can typecast an <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> to <a href="ft2-glyph_management.html#FT_OutlineGlyph">FT_OutlineGlyph</a> if you have &lsquo;glyph-&gt;format == FT_GLYPH_FORMAT_OUTLINE&rsquo;. This lets you access the outline's content easily.</p>
<p>As the outline is extracted from a glyph slot, its coordinates are expressed normally in 26.6 pixels, unless the flag <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a> was used in <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>().</p>
<p>The outline's tables are always owned by the object and are destroyed with it.</p>
</td></tr></table>
@@ -251,7 +231,7 @@ Defined in FT_GLYPH_H (freetype/ftglyph.h).
</pre></table><br>
<table align=center width="87%"><tr><td>
-<p>A function used to extract a glyph image from a slot.</p>
+<p>A function used to extract a glyph image from a slot. Note that the created <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> object must be released with <a href="ft2-glyph_management.html#FT_Done_Glyph">FT_Done_Glyph</a>.</p>
</td></tr></table><br>
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
<p></p>
@@ -270,7 +250,7 @@ Defined in FT_GLYPH_H (freetype/ftglyph.h).
</table>
</td></tr></table>
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
-<p>FreeType error code. 0 means success.</p>
+<p>FreeType error code. 0&nbsp;means success.</p>
</td></tr></table>
</td></tr></table>
<hr width="75%">
@@ -305,12 +285,12 @@ Defined in FT_GLYPH_H (freetype/ftglyph.h).
<p></p>
<table cellpadding=3 border=0>
<tr valign=top><td><b>target</b></td><td>
-<p>A handle to the target glyph object. 0 in case of error.</p>
+<p>A handle to the target glyph object. 0&nbsp;in case of error.</p>
</td></tr>
</table>
</td></tr></table>
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
-<p>FreeType error code. 0 means success.</p>
+<p>FreeType error code. 0&nbsp;means success.</p>
</td></tr></table>
</td></tr></table>
<hr width="75%">
@@ -332,7 +312,7 @@ Defined in FT_GLYPH_H (freetype/ftglyph.h).
</pre></table><br>
<table align=center width="87%"><tr><td>
-<p>Transforms a glyph image if its format is scalable.</p>
+<p>Transform a glyph image if its format is scalable.</p>
</td></tr></table><br>
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
<p></p>
@@ -494,7 +474,7 @@ Defined in FT_GLYPH_H (freetype/ftglyph.h).
</table>
</td></tr></table>
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
-<p>Coordinates are relative to the glyph origin, using the Y-upwards convention.</p>
+<p>Coordinates are relative to the glyph origin, using the y&nbsp;upwards convention.</p>
<p>If the glyph has been loaded with <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a>, &lsquo;bbox_mode&rsquo; must be set to <a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_UNSCALED</a> to get unscaled font units in 26.6 pixel format. The value <a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_SUBPIXELS</a> is another name for this constant.</p>
<p>Note that the maximum coordinates are exclusive, which means that one can compute the width and height of the glyph image (be it in integer or 26.6 pixels) as:</p>
<pre class="colored">
@@ -532,7 +512,7 @@ Defined in FT_GLYPH_H (freetype/ftglyph.h).
</pre></table><br>
<table align=center width="87%"><tr><td>
-<p>Converts a given glyph object to a bitmap glyph object.</p>
+<p>Convert a given glyph object to a bitmap glyph object.</p>
</td></tr></table><br>
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
<p></p>
@@ -546,10 +526,10 @@ Defined in FT_GLYPH_H (freetype/ftglyph.h).
<p></p>
<table cellpadding=3 border=0>
<tr valign=top><td><b>render_mode</b></td><td>
-<p>An enumeration that describe how the data is rendered.</p>
+<p>An enumeration that describes how the data is rendered.</p>
</td></tr>
<tr valign=top><td><b>origin</b></td><td>
-<p>A pointer to a vector used to translate the glyph image before rendering. Can be 0 (if no translation). The origin is expressed in 26.6 pixels.</p>
+<p>A pointer to a vector used to translate the glyph image before rendering. Can be&nbsp;0 (if no translation). The origin is expressed in 26.6 pixels.</p>
</td></tr>
<tr valign=top><td><b>destroy</b></td><td>
<p>A boolean that indicates that the original glyph image should be destroyed by this function. It is never destroyed in case of error.</p>
@@ -557,11 +537,12 @@ Defined in FT_GLYPH_H (freetype/ftglyph.h).
</table>
</td></tr></table>
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
-<p>FreeType error code. 0 means success.</p>
+<p>FreeType error code. 0&nbsp;means success.</p>
</td></tr></table>
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
+<p>This function does nothing if the glyph format isn't scalable.</p>
<p>The glyph image is translated with the &lsquo;origin&rsquo; vector before rendering.</p>
-<p>The first parameter is a pointer to an <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> handle, that will be replaced by this function. Typically, you would use (omitting error handling):</p>
+<p>The first parameter is a pointer to an <a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a> handle, that will be <i>replaced</i> by this function (with newly allocated data). Typically, you would use (omitting error handling):</p>
<p></p>
<pre class="colored">
FT_Glyph glyph;
@@ -574,12 +555,12 @@ Defined in FT_GLYPH_H (freetype/ftglyph.h).
// extract glyph image
error = FT_Get_Glyph( face-&gt;glyph, &amp;glyph );
- // convert to a bitmap (default render mode + destroy old)
+ // convert to a bitmap (default render mode + destroying old)
if ( glyph-&gt;format != FT_GLYPH_FORMAT_BITMAP )
{
error = FT_Glyph_To_Bitmap( &amp;glyph, FT_RENDER_MODE_DEFAULT,
0, 1 );
- if ( error ) // glyph unchanged
+ if ( error ) // `glyph' unchanged
...
}
@@ -593,7 +574,41 @@ Defined in FT_GLYPH_H (freetype/ftglyph.h).
FT_Done_Glyph( glyph );
</pre>
<p></p>
-<p>This function does nothing if the glyph format isn't scalable.</p>
+<p>Here another example, again without error handling:</p>
+<p></p>
+<pre class="colored">
+ FT_Glyph glyphs[MAX_GLYPHS]
+
+
+ ...
+
+ for ( idx = 0; i &lt; MAX_GLYPHS; i++ )
+ error = FT_Load_Glyph( face, idx, FT_LOAD_DEFAULT ) ||
+ FT_Get_Glyph ( face-&gt;glyph, &amp;glyph[idx] );
+
+ ...
+
+ for ( idx = 0; i &lt; MAX_GLYPHS; i++ )
+ {
+ FT_Glyph bitmap = glyphs[idx];
+
+
+ ...
+
+ // after this call, `bitmap' no longer points into
+ // the `glyphs' array (and the old value isn't destroyed)
+ FT_Glyph_To_Bitmap( &amp;bitmap, FT_RENDER_MODE_MONO, 0, 0 );
+
+ ...
+
+ FT_Done_Glyph( bitmap );
+ }
+
+ ...
+
+ for ( idx = 0; i &lt; MAX_GLYPHS; i++ )
+ FT_Done_Glyph( glyphs[idx] );
+</pre>
</td></tr></table>
</td></tr></table>
<hr width="75%">
@@ -613,7 +628,7 @@ Defined in FT_GLYPH_H (freetype/ftglyph.h).
</pre></table><br>
<table align=center width="87%"><tr><td>
-<p>Destroys a given glyph.</p>
+<p>Destroy a given glyph.</p>
</td></tr></table><br>
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
<p></p>