⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ft2-basic_types.html

📁 Free type 2.1.0 Documents
💻 HTML
📖 第 1 页 / 共 3 页
字号:
</pre></table><br>
<table align=center width="87%"><tr><td>
<p>THIS TYPE IS DEPRECATED. DO NOT USE IT!</p>
<p>An enumeration type used to describe the format of a bitmap palette, used with ft_pixel_mode_pal4 and ft_pixel_mode_pal8.</p>
</td></tr></table><br>
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
<table cellpadding=3>
<tr valign=top><td><b>ft_palette_mode_rgb</b></td><td>
<p>The palette is an array of 3-bytes RGB records.</p>
</td></tr>
<tr valign=top><td><b>ft_palette_mode_rgba</b></td><td>
<p>The palette is an array of 4-bytes RGBA records.</p>
</td></tr>
</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>As ft_pixel_mode_pal2, pal4 and pal8 are currently unused by FreeType, these types are not handled by the library itself.</p>
</td></tr></table>
</td></tr></table><hr width="75%">
<table align=center width="75%"><tr><td>
<h4><a name="FT_Bitmap">FT_Bitmap</a></h4>
<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>

  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_Bitmap_
  {
    <span class="keyword">int</span>             rows;
    <span class="keyword">int</span>             width;
    <span class="keyword">int</span>             pitch;
    <span class="keyword">unsigned</span> <span class="keyword">char</span>*  buffer;
    <span class="keyword">short</span>           num_grays;
    <span class="keyword">char</span>            pixel_mode;
    <span class="keyword">char</span>            palette_mode;
    <span class="keyword">void</span>*           palette;

  } <b>FT_Bitmap</b>;

</pre></table><br>
<table align=center width="87%"><tr><td>
<p>A structure used to describe a bitmap or pixmap to the raster. Note that we now manage pixmaps of various depths through the `pixel_mode' field.</p>
</td></tr></table><br>
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
<table cellpadding=3>
<tr valign=top><td><b>rows</b></td><td>
<p>The number of bitmap rows.</p>
</td></tr>
<tr valign=top><td><b>width</b></td><td>
<p>The number of pixels in bitmap row.</p>
</td></tr>
<tr valign=top><td><b>pitch</b></td><td>
<p>The pitch's absolute value is the number of bytes taken by one bitmap row, including padding. However, the pitch is positive when the bitmap has a `down' flow, and negative when it has an `up' flow. In all cases, the pitch is an offset to add to a bitmap pointer in order to go down one row.</p>
</td></tr>
<tr valign=top><td><b>buffer</b></td><td>
<p>A typeless pointer to the bitmap buffer. This value should be aligned on 32-bit boundaries in most cases.</p>
</td></tr>
<tr valign=top><td><b>num_grays</b></td><td>
<p>This field is only used with `FT_PIXEL_MODE_GRAY'; it gives the number of gray levels used in the bitmap.</p>
</td></tr>
<tr valign=top><td><b>pixel_mode</b></td><td>
<p>The pixel mode, i.e., how pixel bits are stored. See <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_Pixel_Mode</a> for possible values.</p>
</td></tr>
<tr valign=top><td><b>palette_mode</b></td><td>
<p>This field is intended for paletted pixel modes; it indicates how the palette is stored. Not used currently.</p>
</td></tr>
<tr valign=top><td><b>palette</b></td><td>
<p>A typeless pointer to the bitmap palette; this field is intended for paletted pixel modes. Not used currently.</p>
</td></tr>
</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>For now, the only pixel modes supported by FreeType are mono and grays. However, drivers might be added in the future to support more `colorful' options.</p>
</td></tr></table>
</td></tr></table><hr width="75%">
<table align=center width="75%"><tr><td>
<h4><a name="FT_IMAGE_TAG">FT_IMAGE_TAG</a></h4>
<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>

#ifndef <b>FT_IMAGE_TAG</b>
#define <b>FT_IMAGE_TAG</b>( value, _x1, _x2, _x3, _x4 )  \
          value = ( ( (<span class="keyword">unsigned</span> <span class="keyword">long</span>)_x1 &lt;&lt; 24 ) | \
                    ( (<span class="keyword">unsigned</span> <span class="keyword">long</span>)_x2 &lt;&lt; 16 ) | \
                    ( (<span class="keyword">unsigned</span> <span class="keyword">long</span>)_x3 &lt;&lt; 8  ) | \
                      (<span class="keyword">unsigned</span> <span class="keyword">long</span>)_x4         )
#endif /* <b>FT_IMAGE_TAG</b> */

</pre></table><br>
<table align=center width="87%"><tr><td>
<p>This macro converts four letter tags into an unsigned long.</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>
<p>Since many 16bit compilers don't like 32bit enumerations, you should redefine this macro in case of problems to something like this:</p>
<p>#define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 ) value</p>
<p>to get a simple enumeration without assigning special numbers.</p>
</td></tr></table>
</td></tr></table><hr width="75%">
<table align=center width="75%"><tr><td>
<h4><a name="FT_Glyph_Format">FT_Glyph_Format</a></h4>
<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>

  <span class="keyword">typedef</span> <span class="keyword">enum</span>  FT_Glyph_Format_
  {
    <a href="ft2-basic_types.html#FT_IMAGE_TAG">FT_IMAGE_TAG</a>( <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_NONE</a>, 0, 0, 0, 0 ),

    <a href="ft2-basic_types.html#FT_IMAGE_TAG">FT_IMAGE_TAG</a>( <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_COMPOSITE</a>, 'c', 'o', 'm', 'p' ),
    <a href="ft2-basic_types.html#FT_IMAGE_TAG">FT_IMAGE_TAG</a>( <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_BITMAP</a>,    'b', 'i', 't', 's' ),
    <a href="ft2-basic_types.html#FT_IMAGE_TAG">FT_IMAGE_TAG</a>( <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_OUTLINE</a>,   'o', 'u', 't', 'l' ),
    <a href="ft2-basic_types.html#FT_IMAGE_TAG">FT_IMAGE_TAG</a>( <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_PLOTTER</a>,   'p', 'l', 'o', 't' )

  } <b>FT_Glyph_Format</b>;

</pre></table><br>
<table align=center width="87%"><tr><td>
<p>An enumeration type used to describe the format of a given glyph image. Note that this version of FreeType only supports two image formats, even though future font drivers will be able to register their own format.</p>
</td></tr></table><br>
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td>
<table cellpadding=3>
<tr valign=top><td><b>FT_GLYPH_FORMAT_NONE</b></td><td>
<p>The value 0 is reserved and does describe a glyph format.</p>
</td></tr>
<tr valign=top><td><b>FT_GLYPH_FORMAT_COMPOSITE</b></td><td>
<p>The glyph image is a composite of several other images. This format is <i>only</i> used with <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_RECURSE</a>, and is used to report compound glyphs (like accented characters).</p>
</td></tr>
<tr valign=top><td><b>FT_GLYPH_FORMAT_BITMAP</b></td><td>
<p>The glyph image is a bitmap, and can be described as an <a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a>. You generally need to access the `bitmap' field of the <a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a> structure to read it.</p>
</td></tr>
<tr valign=top><td><b>FT_GLYPH_FORMAT_OUTLINE</b></td><td>
<p>The glyph image is a vertorial outline made of line segments and Bezier arcs; it can be described as an <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>; you generally want to access the `outline' field of the <a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a> structure to read it.</p>
</td></tr>
<tr valign=top><td><b>FT_GLYPH_FORMAT_PLOTTER</b></td><td>
<p>The glyph image is a vectorial path with no inside/outside contours. Some Type 1 fonts, like those in the Hershey family, contain glyphs in this format. These are described as <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>, but FreeType isn't currently capable of rendering them correctly.</p>
</td></tr>
</table>
</td></tr></table>
</td></tr></table><hr width="75%">
<table align=center width="75%"><tr><td>
<h4><a name="ft_glyph_format_xxx">ft_glyph_format_xxx</a></h4>
<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>

#define <a href="ft2-basic_types.html#ft_glyph_format_xxx">ft_glyph_format_none</a>       <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_NONE</a>
#define <a href="ft2-basic_types.html#ft_glyph_format_xxx">ft_glyph_format_composite</a>  <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_COMPOSITE</a>
#define <a href="ft2-basic_types.html#ft_glyph_format_xxx">ft_glyph_format_bitmap</a>     <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_BITMAP</a>
#define <a href="ft2-basic_types.html#ft_glyph_format_xxx">ft_glyph_format_outline</a>    <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_OUTLINE</a>
#define <a href="ft2-basic_types.html#ft_glyph_format_xxx">ft_glyph_format_plotter</a>    <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_PLOTTER</a>

</pre></table><br>
<table align=center width="87%"><tr><td>
<p>A list of decprecated constants. Use the corresponding <a href="ft2-basic_types.html#FT_Glyph_Format">FT_Glyph_Format</a> values instead.</p>
</td></tr></table><br>
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td>
<table cellpadding=3>
<tr valign=top><td><b>ft_glyph_format_none</b></td><td>
<p>see <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_NONE</a></p>
</td></tr>
<tr valign=top><td><b>ft_glyph_format_composite</b></td><td>
<p>see <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_COMPOSITE</a></p>
</td></tr>
<tr valign=top><td><b>ft_glyph_format_bitmap</b></td><td>
<p>see <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_BITMAP</a></p>
</td></tr>
<tr valign=top><td><b>ft_glyph_format_outline</b></td><td>
<p>see <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_OUTLINE</a></p>
</td></tr>
<tr valign=top><td><b>ft_glyph_format_plotter</b></td><td>
<p>see <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_PLOTTER</a></p>
</td></tr>
</table>
</td></tr></table>
</td></tr></table><hr width="75%">
<table align=center width="75%"><tr><td>
<h4><a name="FT_Data">FT_Data</a></h4>
<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>

  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_Data_
  {
    <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>*  pointer;
    <a href="ft2-basic_types.html#FT_Int">FT_Int</a>          length;

  } <b>FT_Data</b>;

</pre></table><br>
<table align=center width="87%"><tr><td>
<p>Read-only binary data represented as a pointer and a length.</p>
</td></tr></table><br>
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
<table cellpadding=3>
<tr valign=top><td><b>pointer</b></td><td>
<p>The data.</p>
</td></tr>
<tr valign=top><td><b>length</b></td><td>
<p>The length of the data in bytes.</p>
</td></tr>
</table>
</td></tr></table>
</td></tr></table><hr width="75%">
<table align=center width="75%"><tr><td>
<h4><a name="FT_Generic_Finalizer">FT_Generic_Finalizer</a></h4>
<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>

  <span class="keyword">typedef</span> <span class="keyword">void</span>  (*<b>FT_Generic_Finalizer</b>)(<span class="keyword">void</span>*  object);

</pre></table><br>
<table align=center width="87%"><tr><td>
<p>Describes a function used to destroy the `client' data of any FreeType object. See the description of the FT_Generic type for details of usage.</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>The address of the FreeType object which is under finalization. Its client data is accessed through its `generic' field.</p>
</td></tr></table>
</td></tr></table><hr width="75%">
<table align=center width="75%"><tr><td>
<h4><a name="FT_Generic">FT_Generic</a></h4>
<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>

  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_Generic_
  {
    <span class="keyword">void</span>*                 data;
    <a href="ft2-basic_types.html#FT_Generic_Finalizer">FT_Generic_Finalizer</a>  finalizer;

  } <b>FT_Generic</b>;

</pre></table><br>
<table align=center width="87%"><tr><td>
<p>Client applications often need to associate their own data to a variety of FreeType core objects. For example, a text layout API might want to associate a glyph cache to a given size object.</p>
<p>Most FreeType object contains a `generic' field, of type FT_Generic, which usage is left to client applications and font servers.</p>
<p>It can be used to store a pointer to client-specific data, as well as the address of a `finalizer' function, which will be called by FreeType when the object is destroyed (for example, the previous client example would put the address of the glyph cache destructor in the `finalizer' field).</p>
</td></tr></table><br>
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
<table cellpadding=3>
<tr valign=top><td><b>data</b></td><td>
<p>A typeless pointer to any client-specified data. This field is completely ignored by the FreeType library.</p>
</td></tr>
<tr valign=top><td><b>finalizer</b></td><td>
<p>A pointer to a `generic finalizer' function, which will be called when the object is destroyed. If this field is set to NULL, no code will be called.</p>
</td></tr>
</table>
</td></tr></table>
</td></tr></table><hr width="75%">
<table align=center width="75%"><tr><td>
<h4><a name="FT_MAKE_TAG">FT_MAKE_TAG</a></h4>
<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>

#define <b>FT_MAKE_TAG</b>( _x1, _x2, _x3, _x4 ) \
          ( ( (<a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>)_x1 &lt;&lt; 24 ) |     \
            ( (<a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>)_x2 &lt;&lt; 16 ) |     \
            ( (<a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>)_x3 &lt;&lt;  8 ) |     \
              (<a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>)_x4         )

</pre></table><br>
<table align=center width="87%"><tr><td>
<p>This macro converts four letter tags which are used to label TrueType tables into an unsigned long to be used within FreeType.</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>
<p>The produced values <b>must</b> be 32bit integers. Don't redefine this macro.</p>
</td></tr></table>
</td></tr></table><hr width="75%">
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -