From 3562e78743202e43aec8727005182a2558117eca Mon Sep 17 00:00:00 2001 From: marha Date: Sun, 28 Jun 2009 22:07:26 +0000 Subject: Checked in the following released items: xkeyboard-config-1.4.tar.gz ttf-bitstream-vera-1.10.tar.gz font-alias-1.0.1.tar.gz font-sun-misc-1.0.0.tar.gz font-sun-misc-1.0.0.tar.gz font-sony-misc-1.0.0.tar.gz font-schumacher-misc-1.0.0.tar.gz font-mutt-misc-1.0.0.tar.gz font-misc-misc-1.0.0.tar.gz font-misc-meltho-1.0.0.tar.gz font-micro-misc-1.0.0.tar.gz font-jis-misc-1.0.0.tar.gz font-isas-misc-1.0.0.tar.gz font-dec-misc-1.0.0.tar.gz font-daewoo-misc-1.0.0.tar.gz font-cursor-misc-1.0.0.tar.gz font-arabic-misc-1.0.0.tar.gz font-winitzki-cyrillic-1.0.0.tar.gz font-misc-cyrillic-1.0.0.tar.gz font-cronyx-cyrillic-1.0.0.tar.gz font-screen-cyrillic-1.0.1.tar.gz font-xfree86-type1-1.0.1.tar.gz font-adobe-utopia-type1-1.0.1.tar.gz font-ibm-type1-1.0.0.tar.gz font-bitstream-type1-1.0.0.tar.gz font-bitstream-speedo-1.0.0.tar.gz font-bh-ttf-1.0.0.tar.gz font-bh-type1-1.0.0.tar.gz font-bitstream-100dpi-1.0.0.tar.gz font-bh-lucidatypewriter-100dpi-1.0.0.tar.gz font-bh-100dpi-1.0.0.tar.gz font-adobe-utopia-100dpi-1.0.1.tar.gz font-adobe-100dpi-1.0.0.tar.gz font-util-1.0.1.tar.gz font-bitstream-75dpi-1.0.0.tar.gz font-bh-lucidatypewriter-75dpi-1.0.0.tar.gz font-adobe-utopia-75dpi-1.0.1.tar.gz font-bh-75dpi-1.0.0.tar.gz bdftopcf-1.0.1.tar.gz font-adobe-75dpi-1.0.0.tar.gz mkfontscale-1.0.6.tar.gz openssl-0.9.8k.tar.gz bigreqsproto-1.0.2.tar.gz xtrans-1.2.2.tar.gz resourceproto-1.0.2.tar.gz inputproto-1.4.4.tar.gz compositeproto-0.4.tar.gz damageproto-1.1.0.tar.gz zlib-1.2.3.tar.gz xkbcomp-1.0.5.tar.gz freetype-2.3.9.tar.gz pthreads-w32-2-8-0-release.tar.gz pixman-0.12.0.tar.gz kbproto-1.0.3.tar.gz evieext-1.0.2.tar.gz fixesproto-4.0.tar.gz recordproto-1.13.2.tar.gz randrproto-1.2.2.tar.gz scrnsaverproto-1.1.0.tar.gz renderproto-0.9.3.tar.gz xcmiscproto-1.1.2.tar.gz fontsproto-2.0.2.tar.gz xextproto-7.0.3.tar.gz xproto-7.0.14.tar.gz libXdmcp-1.0.2.tar.gz libxkbfile-1.0.5.tar.gz libfontenc-1.0.4.tar.gz libXfont-1.3.4.tar.gz libX11-1.1.5.tar.gz libXau-1.0.4.tar.gz libxcb-1.1.tar.gz xorg-server-1.5.3.tar.gz --- freetype/docs/reference/ft2-basic_types.html | 948 +++++++++++++++++++++++++++ 1 file changed, 948 insertions(+) create mode 100644 freetype/docs/reference/ft2-basic_types.html (limited to 'freetype/docs/reference/ft2-basic_types.html') diff --git a/freetype/docs/reference/ft2-basic_types.html b/freetype/docs/reference/ft2-basic_types.html new file mode 100644 index 000000000..9e77145b6 --- /dev/null +++ b/freetype/docs/reference/ft2-basic_types.html @@ -0,0 +1,948 @@ + + + + +FreeType-2.3.9 API Reference + + + + + + +
[Index][TOC]
+

FreeType-2.3.9 API Reference

+ +

+Basic Data Types +

+

Synopsis

+ + + + + + + + + + + + + + + +
FT_ByteFT_OffsetFT_UnitVector
FT_BytesFT_PtrDistFT_F26Dot6
FT_CharFT_StringFT_Pixel_Mode
FT_IntFT_Tagft_pixel_mode_xxx
FT_UIntFT_ErrorFT_Palette_Mode
FT_Int16FT_FixedFT_Bitmap
FT_UInt16FT_PointerFT_IMAGE_TAG
FT_Int32FT_PosFT_Glyph_Format
FT_UInt32FT_Vectorft_glyph_format_xxx
FT_ShortFT_BBoxFT_Data
FT_UShortFT_MatrixFT_Generic_Finalizer
FT_LongFT_FWordFT_Generic
FT_ULongFT_UFWordFT_MAKE_TAG
FT_BoolFT_F2Dot14


+ +
+

This section contains the basic data types defined by FreeType 2, ranging from simple scalar types to bitmap descriptors. More font-specific structures are defined in a different section.

+

+
+

FT_Byte

+
+

A simple typedef for the unsigned char type.

+

+
+
+ + +
[Index][TOC]
+ +
+

FT_Bytes

+
+

A typedef for constant memory areas.

+

+
+
+ + +
[Index][TOC]
+ +
+

FT_Char

+
+

A simple typedef for the signed char type.

+

+
+
+ + +
[Index][TOC]
+ +
+

FT_Int

+
+

A typedef for the int type.

+

+
+
+ + +
[Index][TOC]
+ +
+

FT_UInt

+
+

A typedef for the unsigned int type.

+

+
+
+ + +
[Index][TOC]
+ +
+

FT_Int16

+
+

A typedef for a 16bit signed integer type.

+

+
+
+ + +
[Index][TOC]
+ +
+

FT_UInt16

+
+

A typedef for a 16bit unsigned integer type.

+

+
+
+ + +
[Index][TOC]
+ +
+

FT_Int32

+
+

A typedef for a 32bit signed integer type. The size depends on the configuration.

+

+
+
+ + +
[Index][TOC]
+ +
+

FT_UInt32

+
+
+ + +
[Index][TOC]
+ +
+

FT_Short

+
+

A typedef for signed short.

+

+
+
+ + +
[Index][TOC]
+ +
+

FT_UShort

+
+

A typedef for unsigned short.

+

+
+
+ + +
[Index][TOC]
+ +
+

FT_Long

+
+

A typedef for signed long.

+

+
+
+ + +
[Index][TOC]
+ +
+

FT_ULong

+
+

A typedef for unsigned long.

+

+
+
+ + +
[Index][TOC]
+ +
+

FT_Bool

+
+

A typedef of unsigned char, used for simple booleans. As usual, values 1 and 0 represent true and false, respectively.

+

+
+
+ + +
[Index][TOC]
+ +
+

FT_Offset

+
+

This is equivalent to the ANSI C ‘size_t’ type, i.e., the largest unsigned integer type used to express a file size or position, or a memory block size.

+

+
+
+ + +
[Index][TOC]
+ +
+

FT_PtrDist

+
+

This is equivalent to the ANSI C ‘ptrdiff_t’ type, i.e., the largest signed integer type used to express the distance between two pointers.

+

+
+
+ + +
[Index][TOC]
+ +
+

FT_String

+
+

A simple typedef for the char type, usually used for strings.

+

+
+
+ + +
[Index][TOC]
+ +
+

FT_Tag

+
+

A typedef for 32-bit tags (as used in the SFNT format).

+

+
+
+ + +
[Index][TOC]
+ +
+

FT_Error

+
+

The FreeType error code type. A value of 0 is always interpreted as a successful operation.

+

+
+
+ + +
[Index][TOC]
+ +
+

FT_Fixed

+
+

This type is used to store 16.16 fixed float values, like scaling values or matrix coefficients.

+

+
+
+ + +
[Index][TOC]
+ +
+

FT_Pointer

+
+

A simple typedef for a typeless pointer.

+

+
+
+ + +
[Index][TOC]
+ +
+

FT_Pos

+
+

The type FT_Pos is a 32-bit integer used to store vectorial coordinates. Depending on the context, these can represent distances in integer font units, or 16.16, or 26.6 fixed float pixel coordinates.

+

+
+
+ + +
[Index][TOC]
+ +
+

FT_Vector

+
+Defined in FT_IMAGE_H (freetype/ftimage.h). +

+
+
+  typedef struct  FT_Vector_
+  {
+    FT_Pos  x;
+    FT_Pos  y;
+
+  } FT_Vector;
+
+

+
+

A simple structure used to store a 2D vector; coordinates are of the FT_Pos type.

+

+
fields
+

+ + + +
x +

The horizontal coordinate.

+
y +

The vertical coordinate.

+
+
+
+
+ + +
[Index][TOC]
+ +
+

FT_BBox

+
+Defined in FT_IMAGE_H (freetype/ftimage.h). +

+
+
+  typedef struct  FT_BBox_
+  {
+    FT_Pos  xMin, yMin;
+    FT_Pos  xMax, yMax;
+
+  } FT_BBox;
+
+

+
+

A structure used to hold an outline's bounding box, i.e., the coordinates of its extrema in the horizontal and vertical directions.

+

+
fields
+

+ + + + + +
xMin +

The horizontal minimum (left-most).

+
yMin +

The vertical minimum (bottom-most).

+
xMax +

The horizontal maximum (right-most).

+
yMax +

The vertical maximum (top-most).

+
+
+
+
+ + +
[Index][TOC]
+ +
+

FT_Matrix

+
+Defined in FT_TYPES_H (freetype/fttypes.h). +

+
+
+  typedef struct  FT_Matrix_
+  {
+    FT_Fixed  xx, xy;
+    FT_Fixed  yx, yy;
+
+  } FT_Matrix;
+
+

+
+

A simple structure used to store a 2x2 matrix. Coefficients are in 16.16 fixed float format. The computation performed is:

+
+   x' = x*xx + y*xy                                             
+   y' = x*yx + y*yy                                             
+
+

+
fields
+

+ + + + + +
xx +

Matrix coefficient.

+
xy +

Matrix coefficient.

+
yx +

Matrix coefficient.

+
yy +

Matrix coefficient.

+
+
+
+
+ + +
[Index][TOC]
+ +
+

FT_FWord

+
+

A signed 16-bit integer used to store a distance in original font units.

+

+
+
+ + +
[Index][TOC]
+ +
+

FT_UFWord

+
+

An unsigned 16-bit integer used to store a distance in original font units.

+

+
+
+ + +
[Index][TOC]
+ +
+

FT_F2Dot14

+
+

A signed 2.14 fixed float type used for unit vectors.

+

+
+
+ + +
[Index][TOC]
+ +
+

FT_UnitVector

+
+Defined in FT_TYPES_H (freetype/fttypes.h). +

+
+
+  typedef struct  FT_UnitVector_
+  {
+    FT_F2Dot14  x;
+    FT_F2Dot14  y;
+
+  } FT_UnitVector;
+
+

+
+

A simple structure used to store a 2D vector unit vector. Uses FT_F2Dot14 types.

+

+
fields
+

+ + + +
x +

Horizontal coordinate.

+
y +

Vertical coordinate.

+
+
+
+
+ + +
[Index][TOC]
+ +
+

FT_F26Dot6

+
+

A signed 26.6 fixed float type used for vectorial pixel coordinates.

+

+
+
+ + +
[Index][TOC]
+ +
+

FT_Pixel_Mode

+
+Defined in FT_IMAGE_H (freetype/ftimage.h). +

+
+
+  typedef enum  FT_Pixel_Mode_
+  {
+    FT_PIXEL_MODE_NONE = 0,
+    FT_PIXEL_MODE_MONO,
+    FT_PIXEL_MODE_GRAY,
+    FT_PIXEL_MODE_GRAY2,
+    FT_PIXEL_MODE_GRAY4,
+    FT_PIXEL_MODE_LCD,
+    FT_PIXEL_MODE_LCD_V,
+
+    FT_PIXEL_MODE_MAX      /* do not remove */
+
+  } FT_Pixel_Mode;
+
+

+
+

An enumeration type used to describe the format of pixels in a given bitmap. Note that additional formats may be added in the future.

+

+
values
+

+ + + + + + + + +
FT_PIXEL_MODE_NONE +

Value 0 is reserved.

+
FT_PIXEL_MODE_MONO +

A monochrome bitmap, using 1 bit per pixel. Note that pixels are stored in most-significant order (MSB), which means that the left-most pixel in a byte has value 128.

+
FT_PIXEL_MODE_GRAY +

An 8-bit bitmap, generally used to represent anti-aliased glyph images. Each pixel is stored in one byte. Note that the number of ‘gray’ levels is stored in the ‘num_grays’ field of the FT_Bitmap structure (it generally is 256).

+
FT_PIXEL_MODE_GRAY2 +

A 2-bit per pixel bitmap, used to represent embedded anti-aliased bitmaps in font files according to the OpenType specification. We haven't found a single font using this format, however.

+
FT_PIXEL_MODE_GRAY4 +

A 4-bit per pixel bitmap, representing embedded anti-aliased bitmaps in font files according to the OpenType specification. We haven't found a single font using this format, however.

+
FT_PIXEL_MODE_LCD +

An 8-bit bitmap, representing RGB or BGR decimated glyph images used for display on LCD displays; the bitmap is three times wider than the original glyph image. See also FT_RENDER_MODE_LCD.

+
FT_PIXEL_MODE_LCD_V +

An 8-bit bitmap, representing RGB or BGR decimated glyph images used for display on rotated LCD displays; the bitmap is three times taller than the original glyph image. See also FT_RENDER_MODE_LCD_V.

+
+
+
+
+ + +
[Index][TOC]
+ +
+

ft_pixel_mode_xxx

+
+Defined in FT_IMAGE_H (freetype/ftimage.h). +

+
+
+#define ft_pixel_mode_none   FT_PIXEL_MODE_NONE
+#define ft_pixel_mode_mono   FT_PIXEL_MODE_MONO
+#define ft_pixel_mode_grays  FT_PIXEL_MODE_GRAY
+#define ft_pixel_mode_pal2   FT_PIXEL_MODE_GRAY2
+#define ft_pixel_mode_pal4   FT_PIXEL_MODE_GRAY4
+
+

+
+

A list of deprecated constants. Use the corresponding FT_Pixel_Mode values instead.

+

+
values
+

+ + + + + + +
ft_pixel_mode_none +

See FT_PIXEL_MODE_NONE.

+
ft_pixel_mode_mono +

See FT_PIXEL_MODE_MONO.

+
ft_pixel_mode_grays +

See FT_PIXEL_MODE_GRAY.

+
ft_pixel_mode_pal2 +

See FT_PIXEL_MODE_GRAY2.

+
ft_pixel_mode_pal4 +

See FT_PIXEL_MODE_GRAY4.

+
+
+
+
+ + +
[Index][TOC]
+ +
+

FT_Palette_Mode

+
+Defined in FT_IMAGE_H (freetype/ftimage.h). +

+
+
+  typedef enum  FT_Palette_Mode_
+  {
+    ft_palette_mode_rgb = 0,
+    ft_palette_mode_rgba,
+
+    ft_palette_mode_max   /* do not remove */
+
+  } FT_Palette_Mode;
+
+

+
+

THIS TYPE IS DEPRECATED. DO NOT USE IT!

+

An enumeration type to describe the format of a bitmap palette, used with ft_pixel_mode_pal4 and ft_pixel_mode_pal8.

+

+
values
+

+ + + +
ft_palette_mode_rgb +

The palette is an array of 3-byte RGB records.

+
ft_palette_mode_rgba +

The palette is an array of 4-byte RGBA records.

+
+
+
note
+

As ft_pixel_mode_pal2, pal4 and pal8 are currently unused by FreeType, these types are not handled by the library itself.

+
+
+
+ + +
[Index][TOC]
+ +
+

FT_Bitmap

+
+Defined in FT_IMAGE_H (freetype/ftimage.h). +

+
+
+  typedef struct  FT_Bitmap_
+  {
+    int             rows;
+    int             width;
+    int             pitch;
+    unsigned char*  buffer;
+    short           num_grays;
+    char            pixel_mode;
+    char            palette_mode;
+    void*           palette;
+
+  } FT_Bitmap;
+
+

+
+

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.

+

+
fields
+

+ + + + + + + + + +
rows +

The number of bitmap rows.

+
width +

The number of pixels in bitmap row.

+
pitch +

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.

+
buffer +

A typeless pointer to the bitmap buffer. This value should be aligned on 32-bit boundaries in most cases.

+
num_grays +

This field is only used with FT_PIXEL_MODE_GRAY; it gives the number of gray levels used in the bitmap.

+
pixel_mode +

The pixel mode, i.e., how pixel bits are stored. See FT_Pixel_Mode for possible values.

+
palette_mode +

This field is intended for paletted pixel modes; it indicates how the palette is stored. Not used currently.

+
palette +

A typeless pointer to the bitmap palette; this field is intended for paletted pixel modes. Not used currently.

+
+
+
note
+

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.

+
+
+
+ + +
[Index][TOC]
+ +
+

FT_IMAGE_TAG

+
+Defined in FT_IMAGE_H (freetype/ftimage.h). +

+
+
+#ifndef FT_IMAGE_TAG
+#define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 )  \
+          value = ( ( (unsigned long)_x1 << 24 ) | \
+                    ( (unsigned long)_x2 << 16 ) | \
+                    ( (unsigned long)_x3 << 8  ) | \
+                      (unsigned long)_x4         )
+#endif /* FT_IMAGE_TAG */
+
+

+
+

This macro converts four-letter tags to an unsigned long type.

+

+
note
+

Since many 16-bit compilers don't like 32-bit enumerations, you should redefine this macro in case of problems to something like this:

+
+  #define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 )  value         
+
+

to get a simple enumeration without assigning special numbers.

+
+
+
+ + +
[Index][TOC]
+ +
+

FT_Glyph_Format

+
+Defined in FT_IMAGE_H (freetype/ftimage.h). +

+
+
+  typedef enum  FT_Glyph_Format_
+  {
+    FT_IMAGE_TAG( FT_GLYPH_FORMAT_NONE, 0, 0, 0, 0 ),
+
+    FT_IMAGE_TAG( FT_GLYPH_FORMAT_COMPOSITE, 'c', 'o', 'm', 'p' ),
+    FT_IMAGE_TAG( FT_GLYPH_FORMAT_BITMAP,    'b', 'i', 't', 's' ),
+    FT_IMAGE_TAG( FT_GLYPH_FORMAT_OUTLINE,   'o', 'u', 't', 'l' ),
+    FT_IMAGE_TAG( FT_GLYPH_FORMAT_PLOTTER,   'p', 'l', 'o', 't' )
+
+  } FT_Glyph_Format;
+
+

+
+

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.

+

+
values
+

+ + + + + + + + + +
FT_GLYPH_FORMAT_NONE +

The value 0 is reserved.

+
FT_GLYPH_FORMAT_COMPOSITE
+

The glyph image is a composite of several other images. This format is only used with FT_LOAD_NO_RECURSE, and is used to report compound glyphs (like accented characters).

+
FT_GLYPH_FORMAT_BITMAP +

The glyph image is a bitmap, and can be described as an FT_Bitmap. You generally need to access the ‘bitmap’ field of the FT_GlyphSlotRec structure to read it.

+
FT_GLYPH_FORMAT_OUTLINE
+

The glyph image is a vectorial outline made of line segments and Bézier arcs; it can be described as an FT_Outline; you generally want to access the ‘outline’ field of the FT_GlyphSlotRec structure to read it.

+
FT_GLYPH_FORMAT_PLOTTER
+

The glyph image is a vectorial path with no inside and outside contours. Some Type 1 fonts, like those in the Hershey family, contain glyphs in this format. These are described as FT_Outline, but FreeType isn't currently capable of rendering them correctly.

+
+
+
+
+ + +
[Index][TOC]
+ +
+

ft_glyph_format_xxx

+
+Defined in FT_IMAGE_H (freetype/ftimage.h). +

+
+
+#define ft_glyph_format_none       FT_GLYPH_FORMAT_NONE
+#define ft_glyph_format_composite  FT_GLYPH_FORMAT_COMPOSITE
+#define ft_glyph_format_bitmap     FT_GLYPH_FORMAT_BITMAP
+#define ft_glyph_format_outline    FT_GLYPH_FORMAT_OUTLINE
+#define ft_glyph_format_plotter    FT_GLYPH_FORMAT_PLOTTER
+
+

+
+

A list of deprecated constants. Use the corresponding FT_Glyph_Format values instead.

+

+
values
+

+ + + + + + + + + +
ft_glyph_format_none +

See FT_GLYPH_FORMAT_NONE.

+
ft_glyph_format_composite
+

See FT_GLYPH_FORMAT_COMPOSITE.

+
ft_glyph_format_bitmap +

See FT_GLYPH_FORMAT_BITMAP.

+
ft_glyph_format_outline
+

See FT_GLYPH_FORMAT_OUTLINE.

+
ft_glyph_format_plotter
+

See FT_GLYPH_FORMAT_PLOTTER.

+
+
+
+
+ + +
[Index][TOC]
+ +
+

FT_Data

+
+Defined in FT_TYPES_H (freetype/fttypes.h). +

+
+
+  typedef struct  FT_Data_
+  {
+    const FT_Byte*  pointer;
+    FT_Int          length;
+
+  } FT_Data;
+
+

+
+

Read-only binary data represented as a pointer and a length.

+

+
fields
+

+ + + +
pointer +

The data.

+
length +

The length of the data in bytes.

+
+
+
+
+ + +
[Index][TOC]
+ +
+

FT_Generic_Finalizer

+
+

Describe a function used to destroy the ‘client’ data of any FreeType object. See the description of the FT_Generic type for details of usage.

+

+
input
+

The address of the FreeType object which is under finalization. Its client data is accessed through its ‘generic’ field.

+
+
+
+ + +
[Index][TOC]
+ +
+

FT_Generic

+
+Defined in FT_TYPES_H (freetype/fttypes.h). +

+
+
+  typedef struct  FT_Generic_
+  {
+    void*                 data;
+    FT_Generic_Finalizer  finalizer;
+
+  } FT_Generic;
+
+

+
+

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.

+

Most FreeType object contains a ‘generic’ field, of type FT_Generic, which usage is left to client applications and font servers.

+

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).

+

+
fields
+

+ + + +
data +

A typeless pointer to any client-specified data. This field is completely ignored by the FreeType library.

+
finalizer +

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.

+
+
+
+
+ + +
[Index][TOC]
+ +
+

FT_MAKE_TAG

+
+Defined in FT_TYPES_H (freetype/fttypes.h). +

+
+
+#define FT_MAKE_TAG( _x1, _x2, _x3, _x4 ) \
+          ( ( (FT_ULong)_x1 << 24 ) |     \
+            ( (FT_ULong)_x2 << 16 ) |     \
+            ( (FT_ULong)_x3 <<  8 ) |     \
+              (FT_ULong)_x4         )
+
+

+
+

This macro converts four-letter tags which are used to label TrueType tables into an unsigned long to be used within FreeType.

+

+
note
+

The produced values must be 32-bit integers. Don't redefine this macro.

+
+
+
+ + +
[Index][TOC]
+ + + -- cgit v1.2.3