Implements a high-level interface to the FreeType library.

lazfreetype.pas implements the high-level interface to the FreeType library. It is based in code provided by the FreeType project (freetype.pas), Copyright 1996 by David Turner, Robert Wilhelm and Werner Lemberg.

From the license at: http://www.freetype.org/license.html

FreeType comes with two licenses from which you can choose the one which fits your needs best.

The FreeType License is the most commonly used one. Full text here: http://www.freetype.org/FTL.TXT. It is a BSD-style license with a credit clause (and thus compatible with GPLv3 but not GPLv2).

The GNU General Public License (GPL), version 2. For all projects which use GPLv2 also or which need a license compatible to the GPLv2.

Initializes the FreeType engine.
Finalizes the FreeType engine, and discards all objects.
Set the gray-level palette used for font-smoothing.

palette is an array of Byte values which define the gray-level palette used in the default rasterizer for the library. palette uses the following convention for bytes values in the array:

Byte Value Usage in a Gray-level Palette
| Byte Position | Contains
0 | Background (White)
1 | Light
2 | Medium
3 | Dark
4 | Foreground (Black)

The return value is a TT_Error type with the error or success status for the routine. The value is TT_Err_Ok if the routine completed successfully.

TT_Gray_Palette TTTypes.TT_Error
Success or error status value returned from the routine.
Values for the gray-level palette.
Opens a new font and returns a handle for it in the _face argument.

TT_Open_Face is a function used to open a TrueType font file or collection. Overloaded variants of the routine are provided using either a file name or a stream as the source for the font face. When the source is a font collection, the first embedded font is loaded.

fontname contains the name for the TrueType font file or collection opened in the routine.

AStream is a TStream instance with the font face loaded in the routine.

_face is updated with the handle for the TrueType font loaded in the routine.

The return value is a TT_Error type which indicates the success or failure of the routine. Please note that success is indicated by the value TT_Err_Ok (0). Any other value indicates an error condition.

Success or error status for the operation.
TrueType font file or collection opened in the routine.
Handle for the font face opened in the routine.
Stream with the font data examined in the routine.
Opens a font file embedded in a collection.

TT_Open_Collection is a function used to open a TrueType font embbedded in a font collection.

fontname is the name of the font collection opend in the routine.

faceIndex is the position of the desired font in the collection.

_face contains the handle for the font loaded in the routine.

The return value is a TT_Error type which indicates the success or failure of the routine. Please note that success is indicated by the value TT_Err_Ok (0). Any other value indicates an error condition.

Success or fail status for the routine.
Font collection examined in the routine.
Position of the desired font embedded in the collection.
Handle for the font face opened in the routine.
Gets properties for the specified font face.

TT_Get_Face_Properties is a TT_Error function used to get properties for the font face specified in _face.

The prop argument is a TT_Face_Properties output parameter where the properties for the TrueType font face are stored. TT_Face_Properties provides access to the following types of information about the TrueType font face:

num_glyphs
  Number of glyphs in the font
max_points
  Maximum number of points needed to represent the glyphs in the font face
max_contours
  Maximum number of closed shapes (or contours) for glyphs defined using the points in the font face
max_faces
  Maximum number of font faces in the header for a TrueType font collection
header
  TrueType font header for the file or collection
horizontal
  Horizontal layout information for glyphs in the font face
vertical
  Vertical layout information for glyphs in the font face
os2
  Metrics for the font face when used on the OS/2 operating system
postscript
  Contains infomation needed to use the font face on Postscript output devices

Success or failure status for the routine. 0 indicates success.
Font face examined in the routine.
Properties for the specified font face.
Sets the pointer to the data for the font face.
Success or failure status for the routine.
Font face updated in the routine.
Pointer to the data assigned to the specified font face.