/programs/develop/libraries/menuetlibc/include/freetype/freetype.h |
---|
0,0 → 1,1147 |
/******************************************************************* |
* |
* freetype.h |
* |
* High-level interface specification. |
* |
* Copyright 1996-1999 by |
* David Turner, Robert Wilhelm, and Werner Lemberg. |
* |
* This file is part of the FreeType project and may only be used, |
* modified, and distributed under the terms of the FreeType project |
* license, LICENSE.TXT. By continuing to use, modify, or distribute |
* this file you indicate that you have read the license and |
* understand and accept it fully. |
* |
* Note: |
* |
* This is the only file that should be included by client |
* application sources. All other types and functions defined |
* in the `tt*.h' files are library internals and should not be |
* included. |
* |
******************************************************************/ |
#ifndef FREETYPE_H |
#define FREETYPE_H |
#define TT_FREETYPE_MAJOR 1 |
#define TT_FREETYPE_MINOR 3 |
#include "fterrid.h" |
#include "ftnameid.h" |
/* To make freetype.h independent from configuration files we check */ |
/* whether EXPORT_DEF has been defined already. */ |
#ifndef EXPORT_DEF |
#define EXPORT_DEF extern |
#endif |
/* The same for TT_Text. If you define the HAVE_TT_TEXT macro, you */ |
/* have to provide a typedef declaration for TT_Text before */ |
/* including this file. */ |
#ifndef HAVE_TT_TEXT |
#define HAVE_TT_TEXT |
typedef char TT_Text; /* The data type to represent */ |
/* file name string elements. */ |
#endif |
#ifdef __cplusplus |
extern "C" { |
#endif |
/*******************************************************************/ |
/* */ |
/* FreeType types definitions. */ |
/* */ |
/* All these begin with a 'TT_' prefix. */ |
/* */ |
/*******************************************************************/ |
typedef int TT_Bool; |
typedef signed long TT_Fixed; /* signed fixed 16.16 float */ |
typedef signed short TT_FWord; /* distance in FUnits */ |
typedef unsigned short TT_UFWord; /* unsigned distance */ |
typedef char TT_String; |
typedef signed char TT_Char; |
typedef unsigned char TT_Byte; |
typedef signed short TT_Short; |
typedef unsigned short TT_UShort; |
typedef int TT_Int; |
typedef unsigned int TT_UInt; |
typedef signed long TT_Long; |
typedef unsigned long TT_ULong; |
typedef signed short TT_F2Dot14; /* Signed fixed float 2.14 used for */ |
/* unit vectors, with layout */ |
/* */ |
/* s : 1 -- sign bit */ |
/* m : 1 -- integer bit */ |
/* f : 14 -- unsigned fractional */ |
/* */ |
/* `s:m' is the 2-bit signed int */ |
/* value to which the positive */ |
/* fractional part should be added. */ |
typedef signed long TT_F26Dot6; /* 26.6 fixed float, used for */ |
/* glyph points pixel coordinates. */ |
typedef signed long TT_Pos; /* Point position, expressed either */ |
/* in fractional pixels or notional */ |
/* units, depending on context. */ |
/* For example, glyph coordinates */ |
/* returned by TT_Load_Glyph() are */ |
/* expressed in font units if */ |
/* scaling wasn't requested, and */ |
/* in 26.6 fractional pixels if it */ |
/* was. */ |
struct TT_UnitVector_ /* guess what... */ |
{ |
TT_F2Dot14 x; |
TT_F2Dot14 y; |
}; |
typedef struct TT_UnitVector_ TT_UnitVector; |
struct TT_Vector_ /* simple vector type */ |
{ |
TT_F26Dot6 x; |
TT_F26Dot6 y; |
}; |
typedef struct TT_Vector_ TT_Vector; |
/* A simple 2x2 matrix used for transformations. */ |
/* You should use 16.16 fixed floats. */ |
/* */ |
/* x' = xx*x + xy*y */ |
/* y' = yx*x + yy*y */ |
/* */ |
struct TT_Matrix_ |
{ |
TT_Fixed xx, xy; |
TT_Fixed yx, yy; |
}; |
typedef struct TT_Matrix_ TT_Matrix; |
/* A structure used to describe the source glyph to the renderer. */ |
struct TT_Outline_ |
{ |
TT_Short n_contours; /* number of contours in glyph */ |
TT_UShort n_points; /* number of points in the glyph */ |
TT_Vector* points; /* the outline's points */ |
TT_Byte* flags; /* the points flags */ |
TT_UShort* contours; /* the contour end points */ |
/* The following flag indicates that the outline owns the arrays it */ |
/* refers to. Typically, this is true of outlines created from the */ |
/* TT_New_Outline() API, while it isn't for those returned by */ |
/* TT_Get_Glyph_Outline(). */ |
TT_Bool owner; /* The outline owns the coordinates, */ |
/* flags and contours array it uses. */ |
/* The following flags are set automatically by */ |
/* TT_Get_Glyph_Outline(). Their meaning is the following: */ |
/* */ |
/* high_precision If true, the scan-line converter will use a */ |
/* higher precision to render bitmaps (i.e., a */ |
/* 1/1024 pixel precision). This is important for */ |
/* small ppem sizes. */ |
/* */ |
/* second_pass If true, the scan-line converter performs a */ |
/* second sweep phase dedicated to find vertical */ |
/* drop-outs. If false, only horizontal drop-outs */ |
/* will be checked during the first vertical */ |
/* sweep (yes, this is a bit confusing but it is */ |
/* really the way it should work). This is */ |
/* important for small ppems too. */ |
/* */ |
/* dropout_mode Specifies the TrueType drop-out mode to use for */ |
/* continuity checking. Valid values are 0 (no */ |
/* check), 1, 2, 4, and 5. */ |
/* */ |
/* Most of the engine's users will safely ignore these fields... */ |
TT_Bool high_precision; /* high precision rendering */ |
TT_Bool second_pass; /* two sweeps rendering */ |
TT_Char dropout_mode; /* dropout mode */ |
}; |
typedef struct TT_Outline_ TT_Outline; |
/* A structure used to describe a simple bounding box. */ |
struct TT_BBox_ |
{ |
TT_Pos xMin; |
TT_Pos yMin; |
TT_Pos xMax; |
TT_Pos yMax; |
}; |
typedef struct TT_BBox_ TT_BBox; |
/* A structure used to return glyph metrics. */ |
/* */ |
/* The `bearingX' isn't called `left-side bearing' anymore because */ |
/* it has different meanings depending on the glyph's orientation. */ |
/* */ |
/* The same is true for `bearingY', which is the top-side bearing */ |
/* defined by the TT_Spec, i.e., the distance from the baseline to */ |
/* the top of the glyph's bbox. According to our current convention, */ |
/* this is always the same as `bbox.yMax' but we make it appear for */ |
/* consistency in its proper field. */ |
/* */ |
/* The `advance' field is the advance width for horizontal layout, */ |
/* and advance height for vertical layouts. */ |
struct TT_Glyph_Metrics_ |
{ |
TT_BBox bbox; /* glyph bounding box */ |
TT_Pos bearingX; /* left-side bearing */ |
TT_Pos bearingY; /* top-side bearing, per se the TT spec */ |
TT_Pos advance; /* advance width (or height) */ |
}; |
typedef struct TT_Glyph_Metrics_ TT_Glyph_Metrics; |
/* A structure used to return horizontal _and_ vertical glyph */ |
/* metrics. */ |
/* */ |
/* A glyph can be used either in a horizontal or vertical layout. */ |
/* Its glyph metrics vary with orientation. The TT_Big_Glyph_Metrics */ |
/* structure is used to return _all_ metrics in one call. */ |
struct TT_Big_Glyph_Metrics_ |
{ |
TT_BBox bbox; /* glyph bounding box */ |
TT_Pos horiBearingX; /* left side bearing in horizontal layouts */ |
TT_Pos horiBearingY; /* top side bearing in horizontal layouts */ |
TT_Pos vertBearingX; /* left side bearing in vertical layouts */ |
TT_Pos vertBearingY; /* top side bearing in vertical layouts */ |
TT_Pos horiAdvance; /* advance width for horizontal layout */ |
TT_Pos vertAdvance; /* advance height for vertical layout */ |
/* The following fields represent unhinted scaled metrics values. */ |
/* They can be useful for applications needing to do some device */ |
/* independent placement of glyphs. */ |
/* */ |
/* Applying these metrics to hinted glyphs will most surely ruin */ |
/* the grid fitting performed by the bytecode interpreter. These */ |
/* values are better used to compute accumulated positioning */ |
/* distances. */ |
TT_Pos linearHoriBearingX; /* linearly scaled horizontal lsb */ |
TT_Pos linearHoriAdvance; /* linearly scaled horizontal advance */ |
TT_Pos linearVertBearingY; /* linearly scaled vertical tsb */ |
TT_Pos linearVertAdvance; /* linearly scaled vertical advance */ |
}; |
typedef struct TT_Big_Glyph_Metrics_ TT_Big_Glyph_Metrics; |
/* A structure used to return instance metrics. */ |
struct TT_Instance_Metrics_ |
{ |
TT_F26Dot6 pointSize; /* char. size in points (1pt = 1/72 inch) */ |
TT_UShort x_ppem; /* horizontal pixels per EM square */ |
TT_UShort y_ppem; /* vertical pixels per EM square */ |
TT_Fixed x_scale; /* 16.16 to convert from EM units to 26.6 pix */ |
TT_Fixed y_scale; /* 16.16 to convert from EM units to 26.6 pix */ |
TT_UShort x_resolution; /* device horizontal resolution in dpi */ |
TT_UShort y_resolution; /* device vertical resolution in dpi */ |
}; |
typedef struct TT_Instance_Metrics_ TT_Instance_Metrics; |
/* Flow constants: */ |
/* */ |
/* The flow of a bitmap refers to the way lines are oriented */ |
/* within the bitmap data, i.e., the orientation of the Y */ |
/* coordinate axis. */ |
/* */ |
/* For example, if the first bytes of the bitmap pertain to */ |
/* its top-most line, then the flow is `down'. If these bytes */ |
/* pertain to its lowest line, the the flow is `up'. */ |
#define TT_Flow_Down -1 /* bitmap is oriented from top to bottom */ |
#define TT_Flow_Up 1 /* bitmap is oriented from bottom to top */ |
#define TT_Flow_Error 0 /* an error occurred during rendering */ |
/* A structure used to describe the target bitmap or pixmap to the */ |
/* renderer. Note that there is nothing in this structure that */ |
/* gives the nature of the buffer. */ |
/* */ |
/* IMPORTANT NOTE: */ |
/* */ |
/* In the case of a pixmap, the `width' and `cols' fields must */ |
/* have the _same_ values, and _must_ be padded to 32-bits, i.e., */ |
/* be a multiple of 4. Clipping problems will arise otherwise, */ |
/* if not even page faults! */ |
/* */ |
/* The typical settings are: */ |
/* */ |
/* - for a WxH bitmap: */ |
/* */ |
/* rows = H */ |
/* cols = (W+7) / 8 */ |
/* width = W */ |
/* flow = your_choice */ |
/* */ |
/* - for a WxH pixmap: */ |
/* */ |
/* rows = H */ |
/* cols = (W+3) & ~3 */ |
/* width = cols */ |
/* flow = your_choice */ |
struct TT_Raster_Map_ |
{ |
int rows; /* number of rows */ |
int cols; /* number of columns (bytes) per row */ |
int width; /* number of pixels per line */ |
int flow; /* bitmap orientation */ |
void* bitmap; /* bit/pixmap buffer */ |
long size; /* bit/pixmap size in bytes */ |
}; |
typedef struct TT_Raster_Map_ TT_Raster_Map; |
/* ------ The font header TrueType table structure ------ */ |
struct TT_Header_ |
{ |
TT_Fixed Table_Version; |
TT_Fixed Font_Revision; |
TT_Long CheckSum_Adjust; |
TT_Long Magic_Number; |
TT_UShort Flags; |
TT_UShort Units_Per_EM; |
TT_Long Created [2]; |
TT_Long Modified[2]; |
TT_FWord xMin; |
TT_FWord yMin; |
TT_FWord xMax; |
TT_FWord yMax; |
TT_UShort Mac_Style; |
TT_UShort Lowest_Rec_PPEM; |
TT_Short Font_Direction; |
TT_Short Index_To_Loc_Format; |
TT_Short Glyph_Data_Format; |
}; |
typedef struct TT_Header_ TT_Header; |
/* ------ The horizontal header TrueType table structure ------ */ |
/*******************************************************/ |
/* This structure is the one defined by the TrueType */ |
/* specification, plus two fields used to link the */ |
/* font-units metrics to the header. */ |
struct TT_Horizontal_Header_ |
{ |
TT_Fixed Version; |
TT_FWord Ascender; |
TT_FWord Descender; |
TT_FWord Line_Gap; |
TT_UFWord advance_Width_Max; /* advance width maximum */ |
TT_FWord min_Left_Side_Bearing; /* minimum left-sb */ |
TT_FWord min_Right_Side_Bearing; /* minimum right-sb */ |
TT_FWord xMax_Extent; /* xmax extents */ |
TT_FWord caret_Slope_Rise; |
TT_FWord caret_Slope_Run; |
TT_Short Reserved0, |
Reserved1, |
Reserved2, |
Reserved3, |
Reserved4; |
TT_Short metric_Data_Format; |
TT_UShort number_Of_HMetrics; |
/* The following fields are not defined by the TrueType specification */ |
/* but they're used to connect the metrics header to the relevant */ |
/* `HMTX' or `VMTX' table. */ |
void* long_metrics; |
void* short_metrics; |
}; |
typedef struct TT_Horizontal_Header_ TT_Horizontal_Header; |
/*******************************************************/ |
/* This structure is the one defined by the TrueType */ |
/* specification. Note that it has exactly the same */ |
/* layout as the horizontal header (both are loaded */ |
/* by the same function). */ |
struct TT_Vertical_Header_ |
{ |
TT_Fixed Version; |
TT_FWord Ascender; |
TT_FWord Descender; |
TT_FWord Line_Gap; |
TT_UFWord advance_Height_Max; /* advance height maximum */ |
TT_FWord min_Top_Side_Bearing; /* minimum left-sb or top-sb */ |
TT_FWord min_Bottom_Side_Bearing; /* minimum right-sb or bottom-sb */ |
TT_FWord yMax_Extent; /* xmax or ymax extents */ |
TT_FWord caret_Slope_Rise; |
TT_FWord caret_Slope_Run; |
TT_FWord caret_Offset; |
TT_Short Reserved1, |
Reserved2, |
Reserved3, |
Reserved4; |
TT_Short metric_Data_Format; |
TT_UShort number_Of_VMetrics; |
/* The following fields are not defined by the TrueType specification */ |
/* but they're used to connect the metrics header to the relevant */ |
/* `HMTX' or `VMTX' table. */ |
void* long_metrics; |
void* short_metrics; |
}; |
typedef struct TT_Vertical_Header_ TT_Vertical_Header; |
/* ------ The OS/2 table ------ */ |
/************************************************************************/ |
/* Note that since FreeType 1.3, we support Mac fonts which do not have */ |
/* an OS/2 table. In this case the `version' field will be set to */ |
/* 0xFFFF by the table loader; all other fields should be 0. */ |
struct TT_OS2_ |
{ |
TT_UShort version; /* 0x0001 */ |
TT_FWord xAvgCharWidth; |
TT_UShort usWeightClass; |
TT_UShort usWidthClass; |
TT_Short fsType; |
TT_FWord ySubscriptXSize; |
TT_FWord ySubscriptYSize; |
TT_FWord ySubscriptXOffset; |
TT_FWord ySubscriptYOffset; |
TT_FWord ySuperscriptXSize; |
TT_FWord ySuperscriptYSize; |
TT_FWord ySuperscriptXOffset; |
TT_FWord ySuperscriptYOffset; |
TT_FWord yStrikeoutSize; |
TT_FWord yStrikeoutPosition; |
TT_Short sFamilyClass; |
TT_Byte panose[10]; |
TT_ULong ulUnicodeRange1; /* Bits 0-31 */ |
TT_ULong ulUnicodeRange2; /* Bits 32-63 */ |
TT_ULong ulUnicodeRange3; /* Bits 64-95 */ |
TT_ULong ulUnicodeRange4; /* Bits 96-127 */ |
TT_Char achVendID[4]; |
TT_UShort fsSelection; |
TT_UShort usFirstCharIndex; |
TT_UShort usLastCharIndex; |
TT_Short sTypoAscender; |
TT_Short sTypoDescender; |
TT_Short sTypoLineGap; |
TT_UShort usWinAscent; |
TT_UShort usWinDescent; |
/* only version 1 tables: */ |
TT_ULong ulCodePageRange1; /* Bits 0-31 */ |
TT_ULong ulCodePageRange2; /* Bits 32-63 */ |
}; |
typedef struct TT_OS2_ TT_OS2; |
/* ------ The PostScript table ------ */ |
struct TT_Postscript_ |
{ |
TT_Fixed FormatType; |
TT_Fixed italicAngle; |
TT_FWord underlinePosition; |
TT_FWord underlineThickness; |
TT_ULong isFixedPitch; |
TT_ULong minMemType42; |
TT_ULong maxMemType42; |
TT_ULong minMemType1; |
TT_ULong maxMemType1; |
/* Glyph names follow in the file, but we don't */ |
/* load them by default. See the ftxpost.c extension. */ |
}; |
typedef struct TT_Postscript_ TT_Postscript; |
/* ------ The horizontal device metrics table (`hdmx') ------ */ |
struct TT_Hdmx_Record_ |
{ |
TT_Byte ppem; |
TT_Byte max_width; |
TT_Byte* widths; |
}; |
typedef struct TT_Hdmx_Record_ TT_Hdmx_Record; |
struct TT_Hdmx_ |
{ |
TT_UShort version; |
TT_Short num_records; |
TT_Hdmx_Record* records; |
}; |
typedef struct TT_Hdmx_ TT_Hdmx; |
/* A structure used to describe face properties. */ |
struct TT_Face_Properties_ |
{ |
TT_UShort num_Glyphs; /* number of glyphs in face */ |
TT_UShort max_Points; /* maximum number of points in a glyph */ |
TT_UShort max_Contours; /* maximum number of contours in a glyph */ |
TT_UShort num_CharMaps; /* number of charmaps in the face */ |
TT_UShort num_Names; /* number of name records in the face */ |
TT_ULong num_Faces; /* 1 for normal TrueType files, and the */ |
/* number of embedded faces for TrueType */ |
/* collections */ |
TT_Header* header; /* TrueType header table */ |
TT_Horizontal_Header* horizontal; /* TrueType horizontal header */ |
TT_OS2* os2; /* TrueType OS/2 table */ |
TT_Postscript* postscript; /* TrueType Postscript table */ |
TT_Hdmx* hdmx; /* TrueType hor. dev. metr. table */ |
TT_Vertical_Header* vertical; /* TT Vertical header, if present */ |
}; |
typedef struct TT_Face_Properties_ TT_Face_Properties; |
/* Here are the definitions of the handle types used for FreeType's */ |
/* most common objects accessed by the client application. We use */ |
/* a simple trick: */ |
/* */ |
/* Each handle type is a structure that only contains one */ |
/* pointer. The advantage of structures is that they are */ |
/* mutually exclusive types. We could have defined the */ |
/* following types: */ |
/* */ |
/* typedef void* TT_Stream; */ |
/* typedef void* TT_Face; */ |
/* typedef void* TT_Instance; */ |
/* typedef void* TT_Glyph; */ |
/* typedef void* TT_CharMap; */ |
/* */ |
/* but these would have allowed lines like: */ |
/* */ |
/* stream = instance; */ |
/* */ |
/* in the client code this would be a severe bug, unnoticed */ |
/* by the compiler! */ |
/* */ |
/* Thus, we enforce type checking with a simple language */ |
/* trick... */ |
/* */ |
/* NOTE: Some macros are defined in tttypes.h to perform */ |
/* automatic type conversions for library hackers... */ |
struct TT_Engine_ { void* z; }; |
struct TT_Stream_ { void* z; }; |
struct TT_Face_ { void* z; }; |
struct TT_Instance_ { void* z; }; |
struct TT_Glyph_ { void* z; }; |
struct TT_CharMap_ { void* z; }; |
typedef struct TT_Engine_ TT_Engine; /* engine instance */ |
typedef struct TT_Stream_ TT_Stream; /* stream handle type */ |
typedef struct TT_Face_ TT_Face; /* face handle type */ |
typedef struct TT_Instance_ TT_Instance; /* instance handle type */ |
typedef struct TT_Glyph_ TT_Glyph; /* glyph handle type */ |
typedef struct TT_CharMap_ TT_CharMap; /* character map handle type */ |
/* Almost all functions return an error code of this type. */ |
typedef long TT_Error; |
/*******************************************************************/ |
/* */ |
/* FreeType API */ |
/* */ |
/* All these begin with a `TT_' prefix. */ |
/* */ |
/* Most of them are implemented in the `ttapi.c' source file. */ |
/* */ |
/*******************************************************************/ |
/* Get version information. */ |
EXPORT_DEF |
TT_Error TT_FreeType_Version( int *major, |
int *minor ); |
/* Initialize the engine. */ |
EXPORT_DEF |
TT_Error TT_Init_FreeType( TT_Engine* engine ); |
/* Finalize the engine, and release all allocated objects. */ |
EXPORT_DEF |
TT_Error TT_Done_FreeType( TT_Engine engine ); |
/* Set the gray level palette. This is an array of 5 bytes used */ |
/* to produce the font smoothed pixmaps. By convention: */ |
/* */ |
/* palette[0] = background (white) */ |
/* palette[1] = light */ |
/* palette[2] = medium */ |
/* palette[3] = dark */ |
/* palette[4] = foreground (black) */ |
/* */ |
EXPORT_DEF |
TT_Error TT_Set_Raster_Gray_Palette( TT_Engine engine, |
TT_Byte* palette ); |
/* ----------------------- face management ----------------------- */ |
/* Open a new TrueType font file, and returns a handle for */ |
/* it in variable '*face'. */ |
/* */ |
/* Note: The file can be either a TrueType file (*.ttf) or */ |
/* a TrueType collection (*.ttc, in this case, only */ |
/* the first face is opened). The number of faces in */ |
/* the same collection can be obtained in the face's */ |
/* properties, using TT_Get_Face_Properties() and the */ |
/* `max_Faces' field. */ |
EXPORT_DEF |
TT_Error TT_Open_Face( TT_Engine engine, |
const TT_Text* fontPathName, |
TT_Face* face ); |
/* Open a TrueType font file located inside a collection. */ |
/* The font is assigned by its index in `fontIndex'. */ |
EXPORT_DEF |
TT_Error TT_Open_Collection( TT_Engine engine, |
const TT_Text* collectionPathName, |
TT_ULong fontIndex, |
TT_Face* face ); |
/* Return face properties in the `properties' structure. */ |
/* */ |
/* Note that since version 1.3, we support font files with no */ |
/* OS/2 table (mainly old Mac fonts). In this case, the OS/2 */ |
/* `version' field will be set to 0xFFFF, and all other fields */ |
/* will be zeroed. */ |
EXPORT_DEF |
TT_Error TT_Get_Face_Properties( TT_Face face, |
TT_Face_Properties* properties ); |
/* Set a face object's generic pointer */ |
EXPORT_DEF |
TT_Error TT_Set_Face_Pointer( TT_Face face, |
void* data ); |
/* Get a face object's generic pointer */ |
EXPORT_DEF |
void* TT_Get_Face_Pointer( TT_Face face ); |
/* Close a face's file handle to save system resources. The file */ |
/* will be re-opened automatically on the next disk access. */ |
EXPORT_DEF |
TT_Error TT_Flush_Face( TT_Face face ); |
/* Get a face's glyph metrics expressed in font units. Returns any */ |
/* number of arrays. Set the fields to NULL if you are not interested */ |
/* by a given array. */ |
EXPORT_DEF |
TT_Error TT_Get_Face_Metrics( TT_Face face, |
TT_UShort firstGlyph, |
TT_UShort lastGlyph, |
TT_Short* leftBearings, |
TT_UShort* widths, |
TT_Short* topBearings, |
TT_UShort* heights ); |
/* Close a given font object, destroying all associated */ |
/* instances. */ |
EXPORT_DEF |
TT_Error TT_Close_Face( TT_Face face ); |
/* Get font or table data. */ |
EXPORT_DEF |
TT_Error TT_Get_Font_Data( TT_Face face, |
TT_ULong tag, |
TT_Long offset, |
void* buffer, |
TT_Long* length ); |
/* A simple macro to build table tags from ASCII chars */ |
#define MAKE_TT_TAG( _x1, _x2, _x3, _x4 ) \ |
(((TT_ULong)_x1 << 24) | \ |
((TT_ULong)_x2 << 16) | \ |
((TT_ULong)_x3 << 8) | \ |
(TT_ULong)_x4) |
/* ----------------------- instance management -------------------- */ |
/* Open a new font instance and returns an instance handle */ |
/* for it in `*instance'. */ |
EXPORT_DEF |
TT_Error TT_New_Instance( TT_Face face, |
TT_Instance* instance ); |
/* Set device resolution for a given instance. The values are */ |
/* given in dpi (Dots Per Inch). Default is 96 in both directions. */ |
EXPORT_DEF |
TT_Error TT_Set_Instance_Resolutions( TT_Instance instance, |
TT_UShort xResolution, |
TT_UShort yResolution ); |
/* Set the pointsize for a given instance. Default is 10pt. */ |
EXPORT_DEF |
TT_Error TT_Set_Instance_CharSize( TT_Instance instance, |
TT_F26Dot6 charSize ); |
EXPORT_DEF |
TT_Error TT_Set_Instance_CharSizes( TT_Instance instance, |
TT_F26Dot6 charWidth, |
TT_F26Dot6 charHeight ); |
#define TT_Set_Instance_PointSize( ins, ptsize ) \ |
TT_Set_Instance_CharSize( ins, ptsize*64L ) |
EXPORT_DEF |
TT_Error TT_Set_Instance_PixelSizes( TT_Instance instance, |
TT_UShort pixelWidth, |
TT_UShort pixelHeight, |
TT_F26Dot6 pointSize ); |
/* This function has been deprecated! Do not use it, as it */ |
/* doesn't work reliably. You can perfectly control hinting */ |
/* yourself when loading glyphs, then apply transforms as usual. */ |
EXPORT_DEF |
TT_Error TT_Set_Instance_Transform_Flags( TT_Instance instance, |
TT_Bool rotated, |
TT_Bool stretched ); |
/* Return instance metrics in `metrics'. */ |
EXPORT_DEF |
TT_Error TT_Get_Instance_Metrics( TT_Instance instance, |
TT_Instance_Metrics* metrics ); |
/* Set an instance's generic pointer. */ |
EXPORT_DEF |
TT_Error TT_Set_Instance_Pointer( TT_Instance instance, |
void* data ); |
/* Get an instance's generic pointer. */ |
EXPORT_DEF |
void* TT_Get_Instance_Pointer( TT_Instance instance ); |
/* Close a given instance object, destroying all associated data. */ |
EXPORT_DEF |
TT_Error TT_Done_Instance( TT_Instance instance ); |
/* ----------------------- glyph management ----------------------- */ |
/* Create a new glyph object related to the given `face'. */ |
EXPORT_DEF |
TT_Error TT_New_Glyph( TT_Face face, |
TT_Glyph* glyph ); |
/* Discard (and destroy) a given glyph object. */ |
EXPORT_DEF |
TT_Error TT_Done_Glyph( TT_Glyph glyph ); |
#define TTLOAD_SCALE_GLYPH 1 |
#define TTLOAD_HINT_GLYPH 2 |
#define TTLOAD_PEDANTIC 128 |
#define TTLOAD_IGNORE_GLOBAL_ADVANCE_WIDTH 256 |
#define TTLOAD_DEFAULT (TTLOAD_SCALE_GLYPH | TTLOAD_HINT_GLYPH) |
/* Load and process (scale/transform and hint) a glyph from the */ |
/* given `instance'. The glyph and instance handles must be */ |
/* related to the same face object. The glyph index can be */ |
/* computed with a call to TT_Char_Index(). */ |
/* */ |
/* The 'load_flags' argument is a combination of the macros */ |
/* TTLOAD_SCALE_GLYPH and TTLOAD_HINT_GLYPH. Hinting will be */ |
/* applied only if the scaling is selected. */ |
/* */ |
/* If scaling is off (i.e., load_flags = 0), the returned */ |
/* outlines are in EM square coordinates (also called FUnits), */ |
/* extracted directly from the font with no hinting. Other */ |
/* glyph metrics are also in FUnits. */ |
/* */ |
/* If scaling is on, the returned outlines are in fractional */ |
/* pixel units (i.e. TT_F26Dot6 = 26.6 fixed floats). */ |
/* */ |
/* NOTE: The glyph index must be in the range 0..num_glyphs-1, */ |
/* where `num_glyphs' is the total number of glyphs in */ |
/* the font file (given in the face properties). */ |
EXPORT_DEF |
TT_Error TT_Load_Glyph( TT_Instance instance, |
TT_Glyph glyph, |
TT_UShort glyphIndex, |
TT_UShort loadFlags ); |
/* Return glyph outline pointers in `outline'. Note that the returned */ |
/* pointers are owned by the glyph object, and will be destroyed with */ |
/* it. The client application should _not_ change the pointers. */ |
EXPORT_DEF |
TT_Error TT_Get_Glyph_Outline( TT_Glyph glyph, |
TT_Outline* outline ); |
/* Copy the glyph metrics into `metrics'. */ |
EXPORT_DEF |
TT_Error TT_Get_Glyph_Metrics( TT_Glyph glyph, |
TT_Glyph_Metrics* metrics ); |
/* Copy the glyph's big metrics into `metrics'. */ |
/* Necessary to obtain vertical metrics. */ |
EXPORT_DEF |
TT_Error TT_Get_Glyph_Big_Metrics( TT_Glyph glyph, |
TT_Big_Glyph_Metrics* metrics ); |
/* Render the glyph into a bitmap, with given position offsets. */ |
/* */ |
/* Note: Only use integer pixel offsets to preserve the fine */ |
/* hinting of the glyph and the `correct' anti-aliasing */ |
/* (where vertical and horizontal stems aren't grayed). This */ |
/* means that `xOffset' and `yOffset' must be multiples */ |
/* of 64! */ |
EXPORT_DEF |
TT_Error TT_Get_Glyph_Bitmap( TT_Glyph glyph, |
TT_Raster_Map* map, |
TT_F26Dot6 xOffset, |
TT_F26Dot6 yOffset ); |
/* Render the glyph into a pixmap, with given position offsets. */ |
/* */ |
/* Note: Only use integer pixel offsets to preserve the fine */ |
/* hinting of the glyph and the `correct' anti-aliasing */ |
/* (where vertical and horizontal stems aren't grayed). This */ |
/* means that `xOffset' and `yOffset' must be multiples */ |
/* of 64! */ |
EXPORT_DEF |
TT_Error TT_Get_Glyph_Pixmap( TT_Glyph glyph, |
TT_Raster_Map* map, |
TT_F26Dot6 xOffset, |
TT_F26Dot6 yOffset ); |
/* ----------------------- outline support ------------------------ */ |
/* Allocate a new outline. Reserve space for `numPoints' and */ |
/* `numContours'. */ |
EXPORT_DEF |
TT_Error TT_New_Outline( TT_UShort numPoints, |
TT_Short numContours, |
TT_Outline* outline ); |
/* Release an outline. */ |
EXPORT_DEF |
TT_Error TT_Done_Outline( TT_Outline* outline ); |
/* Copy an outline into another one. */ |
EXPORT_DEF |
TT_Error TT_Copy_Outline( TT_Outline* source, |
TT_Outline* target ); |
/* Render an outline into a bitmap. */ |
EXPORT_DEF |
TT_Error TT_Get_Outline_Bitmap( TT_Engine engine, |
TT_Outline* outline, |
TT_Raster_Map* map ); |
/* Render an outline into a pixmap. */ |
EXPORT_DEF |
TT_Error TT_Get_Outline_Pixmap( TT_Engine engine, |
TT_Outline* outline, |
TT_Raster_Map* map ); |
/* Return an outline's bounding box -- this function is slow as it */ |
/* performs a complete scan-line process, without drawing, to get */ |
/* the most accurate values. */ |
EXPORT_DEF |
TT_Error TT_Get_Outline_BBox( TT_Outline* outline, |
TT_BBox* bbox ); |
/* Apply a transformation to a glyph outline. */ |
EXPORT_DEF |
void TT_Transform_Outline( TT_Outline* outline, |
TT_Matrix* matrix ); |
/* Apply a translation to a glyph outline. */ |
EXPORT_DEF |
void TT_Translate_Outline( TT_Outline* outline, |
TT_F26Dot6 xOffset, |
TT_F26Dot6 yOffset ); |
/* Apply a transformation to a vector. */ |
EXPORT_DEF |
void TT_Transform_Vector( TT_F26Dot6* x, |
TT_F26Dot6* y, |
TT_Matrix* matrix ); |
/* Compute A*B/C with 64 bits intermediate precision. */ |
EXPORT_DEF |
TT_Long TT_MulDiv( TT_Long A, |
TT_Long B, |
TT_Long C ); |
/* Compute A*B/0x10000 with 64 bits intermediate precision. */ |
/* Useful to multiply by a 16.16 fixed float value. */ |
EXPORT_DEF |
TT_Long TT_MulFix( TT_Long A, |
TT_Long B ); |
/* ----------------- character mapping support --------------- */ |
/* Return the number of character mappings found in this file. */ |
/* Returns -1 in case of failure (invalid face handle). */ |
/* */ |
/* DON'T USE THIS FUNCTION! IT HAS BEEN DEPRECATED! */ |
/* */ |
/* It is retained for backwards compatibility only and will */ |
/* fail on 16bit systems. */ |
/* */ |
/* You can now get the charmap count in the `num_CharMaps' */ |
/* field of a face's properties. */ |
/* */ |
EXPORT_DEF |
int TT_Get_CharMap_Count( TT_Face face ); |
/* Return the ID of charmap number `charmapIndex' of a given face */ |
/* used to enumerate the charmaps present in a TrueType file. */ |
EXPORT_DEF |
TT_Error TT_Get_CharMap_ID( TT_Face face, |
TT_UShort charmapIndex, |
TT_UShort* platformID, |
TT_UShort* encodingID ); |
/* Look up the character maps found in `face' and return a handle */ |
/* for the one matching `platformID' and `platformEncodingID' */ |
/* (see the TrueType specs relating to the `cmap' table for */ |
/* information on these ID numbers). Returns an error code. */ |
/* In case of failure, the handle is set to NULL and is invalid. */ |
EXPORT_DEF |
TT_Error TT_Get_CharMap( TT_Face face, |
TT_UShort charmapIndex, |
TT_CharMap* charMap ); |
/* Translate a character code through a given character map */ |
/* and return the corresponding glyph index to be used in */ |
/* a TT_Load_Glyph() call. This function returns 0 in case */ |
/* of failure. */ |
EXPORT_DEF |
TT_UShort TT_Char_Index( TT_CharMap charMap, |
TT_UShort charCode ); |
/* --------------------- names table support ------------------- */ |
/* Return the number of name strings found in the name table. */ |
/* Returns -1 in case of failure (invalid face handle). */ |
/* */ |
/* DON'T USE THIS FUNCTION! IT HAS BEEN DEPRECATED! */ |
/* */ |
/* It is retained for backwards compatibility only and will */ |
/* fail on 16bit systems. */ |
/* */ |
/* You can now get the number of name strings in a face with */ |
/* the `num_Names' field of its properties. */ |
EXPORT_DEF |
int TT_Get_Name_Count( TT_Face face ); |
/* Return the ID of the name number `nameIndex' of a given face */ |
/* used to enumerate the charmaps present in a TrueType file. */ |
EXPORT_DEF |
TT_Error TT_Get_Name_ID( TT_Face face, |
TT_UShort nameIndex, |
TT_UShort* platformID, |
TT_UShort* encodingID, |
TT_UShort* languageID, |
TT_UShort* nameID ); |
/* Return the address and length of the name number `nameIndex' */ |
/* of a given face in the variables `stringPtr' resp. `length'. */ |
/* The string is part of the face object and shouldn't be */ |
/* written to or released. */ |
/* */ |
/* Note that for an invalid platform ID a null pointer will be */ |
/* returned. */ |
EXPORT_DEF |
TT_Error TT_Get_Name_String( TT_Face face, |
TT_UShort nameIndex, |
TT_String** stringPtr, |
TT_UShort* length ); |
#ifdef __cplusplus |
} |
#endif |
#endif /* FREETYPE_H */ |
/* END */ |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/programs/develop/libraries/menuetlibc/include/freetype/ft_conf.h |
---|
0,0 → 1,130 |
/* This file is part of the FreeType project */ |
/* ft_conf.h for MSDOS */ |
/* we need the following because there are some typedefs in this file */ |
#ifndef FT_CONF_H |
#define FT_CONF_H |
/* Define to empty if the keyword does not work. */ |
/* #undef const */ |
/* Define if you have a working `mmap' system call. */ |
#undef HAVE_MMAP |
/* Define if you have the <stdlib.h> header file. */ |
#define HAVE_STDLIB_H |
/* Define if you have the getpagesize function. */ |
#define HAVE_GETPAGESIZE |
/* Define if you have the memcpy function. */ |
#define HAVE_MEMCPY |
/* Define if you have the memmove function. */ |
#define HAVE_MEMMOVE |
/* Define if you have the valloc function. */ |
#undef HAVE_VALLOC |
/* Define if you have the <fcntl.h> header file. */ |
#define HAVE_FCNTL_H |
/* Define if you have the <unistd.h> header file. */ |
#if defined( __EMX__ ) || defined( __DJGPP__ ) || defined( __GO32__ ) |
/* some compilers are known to have <unistd.h>; */ |
/* add yours if needed, and report to us the update. */ |
#define HAVE_UNISTD_H |
#else |
/* most MS-DOS compilers lack <unistd.h> */ |
#undef HAVE_UNISTD_H |
#endif |
/* Define if you need <conio.h> for console I/O functions. */ |
#ifdef __EMX__ |
#define HAVE_CONIO_H |
#endif |
/* Define if you have the <locale.h> header file. */ |
#undef HAVE_LOCALE_H |
/* Define if you have the <libintl.h> header file. */ |
#undef HAVE_LIBINTL_H |
/* Define if you have the libintl library. */ |
#undef HAVE_LIBINTL |
#define HAVE_PRINT_FUNCTION 1 |
#define Print( format, ap ) |
#include <limits.h> |
#if UINT_MAX == 0xFFFF |
#define SIZEOF_INT 2 |
#elif UINT_MAX == 0xFFFFFFFF |
#define SIZEOF_INT 4 |
#else |
#error "Unsupported number of bytes in `int' type!" |
#endif |
#define SIZEOF_LONG 4 |
#define TT_CONFIG_OPTION_EXTEND_ENGINE |
#define TT_CONFIG_OPTION_GRAY_SCALING |
#undef TT_CONFIG_OPTION_NO_INTERPRETER |
#define TT_CONFIG_OPTION_INTERPRETER_SWITCH |
#undef TT_CONFIG_OPTION_STATIC_INTERPRETER |
#undef TT_CONFIG_OPTION_STATIC_RASTER |
#undef TT_CONFIG_OPTION_THREAD_SAFE |
#undef DEBUG_LEVEL_TRACE |
#undef DEBUG_LEVEL_ERROR |
#if SIZEOF_INT == 4 |
typedef signed int TT_Int32; |
typedef unsigned int TT_Word32; |
#elif SIZEOF_LONG == 4 |
typedef signed long TT_Int32; |
typedef unsigned long TT_Word32; |
#else |
#error "no 32bit type found" |
#endif |
#if SIZEOF_LONG == 8 |
/* LONG64 must be defined when a 64-bit type is available */ |
/* INT64 must then be defined to this type.. */ |
#define LONG64 |
#define INT64 long |
#else |
/* GCC provides the non-ANSI 'long long' 64-bit type. You can activate */ |
/* by defining the TT_USE_LONG_LONG macro in 'ft_conf.h'. Note that this */ |
/* will produce many -ansi warnings during library compilation. */ |
#ifdef TT_USE_LONG_LONG |
#define LONG64 |
#define INT64 long long |
#endif /* TT_USE_LONG_LONG */ |
#endif |
#endif /* FT_CONF_H */ |
/* END */ |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/programs/develop/libraries/menuetlibc/include/freetype/fterrid.h |
---|
0,0 → 1,161 |
/******************************************************************* |
* |
* fterrid.h |
* |
* TrueType Error ID definitions |
* |
* Copyright 1996-1999 by |
* David Turner, Robert Wilhelm, and Werner Lemberg. |
* |
* This file is part of the FreeType project, and may only be used |
* modified and distributed under the terms of the FreeType project |
* license, LICENSE.TXT. By continuing to use, modify, or distribute |
* this file you indicate that you have read the license and |
* understand and accept it fully. |
* |
******************************************************************/ |
#ifndef FREETYPE_H |
#error "Don't include this file! Use freetype.h instead." |
#endif |
#ifndef FTERRID_H |
#define FTERRID_H |
/************************ error codes declaration **************/ |
/* The error codes are grouped in 'classes' used to indicate the */ |
/* 'level' at which the error happened. */ |
/* The class is given by an error code's high byte. */ |
/* ------------- Success is always 0 -------- */ |
#define TT_Err_Ok 0 |
/* -------- High-level API error codes ------ */ |
#define TT_Err_Invalid_Face_Handle 0x001 |
#define TT_Err_Invalid_Instance_Handle 0x002 |
#define TT_Err_Invalid_Glyph_Handle 0x003 |
#define TT_Err_Invalid_CharMap_Handle 0x004 |
#define TT_Err_Invalid_Result_Address 0x005 |
#define TT_Err_Invalid_Glyph_Index 0x006 |
#define TT_Err_Invalid_Argument 0x007 |
#define TT_Err_Could_Not_Open_File 0x008 |
#define TT_Err_File_Is_Not_Collection 0x009 |
#define TT_Err_Table_Missing 0x00A |
#define TT_Err_Invalid_Horiz_Metrics 0x00B |
#define TT_Err_Invalid_CharMap_Format 0x00C |
#define TT_Err_Invalid_PPem 0x00D |
#define TT_Err_Invalid_Vert_Metrics 0x00E |
#define TT_Err_Invalid_File_Format 0x010 |
#define TT_Err_Invalid_Engine 0x020 |
#define TT_Err_Too_Many_Extensions 0x021 |
#define TT_Err_Extensions_Unsupported 0x022 |
#define TT_Err_Invalid_Extension_Id 0x023 |
#define TT_Err_No_Vertical_Data 0x030 |
#define TT_Err_Max_Profile_Missing 0x080 |
#define TT_Err_Header_Table_Missing 0x081 |
#define TT_Err_Horiz_Header_Missing 0x082 |
#define TT_Err_Locations_Missing 0x083 |
#define TT_Err_Name_Table_Missing 0x084 |
#define TT_Err_CMap_Table_Missing 0x085 |
#define TT_Err_Hmtx_Table_Missing 0x086 |
#define TT_Err_OS2_Table_Missing 0x087 |
#define TT_Err_Post_Table_Missing 0x088 |
#define TT_Err_Glyf_Table_Missing 0x089 |
/* -------- Memory component error codes ---- */ |
/* this error indicates that an operation cannot */ |
/* be performed due to memory exhaustion. */ |
#define TT_Err_Out_Of_Memory 0x100 |
/* -------- File component error codes ------ */ |
/* these error codes indicate that the file could */ |
/* not be accessed properly. Usually, this means */ |
/* a broken font file! */ |
#define TT_Err_Invalid_File_Offset 0x200 |
#define TT_Err_Invalid_File_Read 0x201 |
#define TT_Err_Invalid_Frame_Access 0x202 |
/* -------- Glyph loader error codes -------- */ |
/* Produced only by the glyph loader, these error */ |
/* codes indicate a broken glyph in a font file. */ |
#define TT_Err_Too_Many_Points 0x300 |
#define TT_Err_Too_Many_Contours 0x301 |
#define TT_Err_Invalid_Composite 0x302 |
#define TT_Err_Too_Many_Ins 0x303 |
/* --- bytecode interpreter error codes ----- */ |
/* These error codes are produced by the TrueType */ |
/* bytecode interpreter. They usually indicate a */ |
/* broken font file, a broken glyph within a font */ |
/* file, or a bug in the interpreter! */ |
#define TT_Err_Invalid_Opcode 0x400 |
#define TT_Err_Too_Few_Arguments 0x401 |
#define TT_Err_Stack_Overflow 0x402 |
#define TT_Err_Code_Overflow 0x403 |
#define TT_Err_Bad_Argument 0x404 |
#define TT_Err_Divide_By_Zero 0x405 |
#define TT_Err_Storage_Overflow 0x406 |
#define TT_Err_Cvt_Overflow 0x407 |
#define TT_Err_Invalid_Reference 0x408 |
#define TT_Err_Invalid_Distance 0x409 |
#define TT_Err_Interpolate_Twilight 0x40A |
#define TT_Err_Debug_OpCode 0x40B |
#define TT_Err_ENDF_In_Exec_Stream 0x40C |
#define TT_Err_Out_Of_CodeRanges 0x40D |
#define TT_Err_Nested_DEFS 0x40E |
#define TT_Err_Invalid_CodeRange 0x40F |
#define TT_Err_Invalid_Displacement 0x410 |
#define TT_Err_Execution_Too_Long 0x411 |
/* ------ internal failure error codes ----- */ |
/* These error codes are produced when an incoherent */ |
/* library state has been detected. These reflect a */ |
/* severe bug in the engine! (Or a major overwrite */ |
/* of your application into the library's data.) */ |
#define TT_Err_Nested_Frame_Access 0x500 |
#define TT_Err_Invalid_Cache_List 0x501 |
#define TT_Err_Could_Not_Find_Context 0x502 |
#define TT_Err_Unlisted_Object 0x503 |
/* ---- scan-line converter error codes ----- */ |
/* These error codes are produced by the raster component. */ |
/* They indicate that an outline structure was incoherently */ |
/* setup, or that you're trying to render an horribly */ |
/* complex glyph! */ |
#define TT_Err_Raster_Pool_Overflow 0x600 |
#define TT_Err_Raster_Negative_Height 0x601 |
#define TT_Err_Raster_Invalid_Value 0x602 |
#define TT_Err_Raster_Not_Initialized 0x603 |
#endif /* FTERRID_H */ |
/* END */ |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/programs/develop/libraries/menuetlibc/include/freetype/ftnameid.h |
---|
0,0 → 1,628 |
/******************************************************************* |
* |
* ftnameid.h |
* |
* TrueType Name ID definitions |
* |
* Copyright 1996-1999 by |
* David Turner, Robert Wilhelm, and Werner Lemberg. |
* |
* This file is part of the FreeType project, and may only be used |
* modified and distributed under the terms of the FreeType project |
* license, LICENSE.TXT. By continuing to use, modify, or distribute |
* this file you indicate that you have read the license and |
* understand and accept it fully. |
* |
******************************************************************/ |
#ifndef FREETYPE_H |
#error "Don't include this file! Use freetype.h instead." |
#endif |
#ifndef FTNAMEID_H |
#define FTNAMEID_H |
/* |
* possible values for the 'Platform' identifier code in the name |
* records of the TTF "name" table |
*/ |
#define TT_PLATFORM_APPLE_UNICODE 0 |
#define TT_PLATFORM_MACINTOSH 1 |
#define TT_PLATFORM_ISO 2 |
#define TT_PLATFORM_MICROSOFT 3 |
/* |
* possible values of the platform specific encoding identifier field in |
* the name records of the TTF "name" table when the 'Platform' identifier |
* code is TT_PLATFORM_APPLE_UNICODE |
*/ |
#define TT_APPLE_ID_DEFAULT 0 |
#define TT_APPLE_ID_UNICODE_1_1 1 |
#define TT_APPLE_ID_ISO_10646 2 |
#define TT_APPLE_ID_UNICODE_2_0 3 |
/* |
* possible values of the platform specific encoding identifier field in |
* the name records of the TTF "name" table when the 'Platform' identifier |
* code is TT_PLATFORM_MACINTOSH |
*/ |
#define TT_MAC_ID_ROMAN 0 |
#define TT_MAC_ID_JAPANESE 1 |
#define TT_MAC_ID_TRADITIONAL_CHINESE 2 |
#define TT_MAC_ID_KOREAN 3 |
#define TT_MAC_ID_ARABIC 4 |
#define TT_MAC_ID_HEBREW 5 |
#define TT_MAC_ID_GREEK 6 |
#define TT_MAC_ID_RUSSIAN 7 |
#define TT_MAC_ID_RSYMBOL 8 |
#define TT_MAC_ID_DEVANAGARI 9 |
#define TT_MAC_ID_GURMUKHI 10 |
#define TT_MAC_ID_GUJARATI 11 |
#define TT_MAC_ID_ORIYA 12 |
#define TT_MAC_ID_BENGALI 13 |
#define TT_MAC_ID_TAMIL 14 |
#define TT_MAC_ID_TELUGU 15 |
#define TT_MAC_ID_KANNADA 16 |
#define TT_MAC_ID_MALAYALAM 17 |
#define TT_MAC_ID_SINHALESE 18 |
#define TT_MAC_ID_BURMESE 19 |
#define TT_MAC_ID_KHMER 20 |
#define TT_MAC_ID_THAI 21 |
#define TT_MAC_ID_LAOTIAN 22 |
#define TT_MAC_ID_GEORGIAN 23 |
#define TT_MAC_ID_ARMENIAN 24 |
#define TT_MAC_ID_MALDIVIAN 25 |
#define TT_MAC_ID_SIMPLIFIED_CHINESE 25 |
#define TT_MAC_ID_TIBETAN 26 |
#define TT_MAC_ID_MONGOLIAN 27 |
#define TT_MAC_ID_GEEZ 28 |
#define TT_MAC_ID_SLAVIC 29 |
#define TT_MAC_ID_VIETNAMESE 30 |
#define TT_MAC_ID_SINDHI 31 |
#define TT_MAC_ID_UNINTERP 32 |
/* |
* possible values of the platform specific encoding identifier field in |
* the name records of the TTF "name" table when the 'Platform' identifier |
* code is TT_PLATFORM_ISO |
*/ |
#define TT_ISO_ID_7BIT_ASCII 0 |
#define TT_ISO_ID_10646 1 |
#define TT_ISO_ID_8859_1 2 |
/* |
* possible values of the platform specific encoding identifier field in |
* the name records of the TTF "name" table when the 'Platform' identifier |
* code is TT_PLATFORM_MICROSOFT |
*/ |
#define TT_MS_ID_SYMBOL_CS 0 |
#define TT_MS_ID_UNICODE_CS 1 |
#define TT_MS_ID_SJIS 2 |
#define TT_MS_ID_GB2312 3 |
#define TT_MS_ID_BIG_5 4 |
#define TT_MS_ID_WANSUNG 5 |
#define TT_MS_ID_JOHAB 6 |
/* |
* possible values of the language identifier field in the name records of |
* the TTF "name" table when the 'Platform' identifier code is |
* TT_PLATFORM_MACINTOSH |
* |
* the canonical source for the Apple assigned Language ID's is at |
* http://fonts.apple.com/TTRefMan/RM06/Chap6name.html |
*/ |
#define TT_MAC_LANGID_ENGLISH 0 |
#define TT_MAC_LANGID_FRENCH 1 |
#define TT_MAC_LANGID_GERMAN 2 |
#define TT_MAC_LANGID_ITALIAN 3 |
#define TT_MAC_LANGID_DUTCH 4 |
#define TT_MAC_LANGID_SWEDISH 5 |
#define TT_MAC_LANGID_SPANISH 6 |
#define TT_MAC_LANGID_DANISH 7 |
#define TT_MAC_LANGID_PORTUGUESE 8 |
#define TT_MAC_LANGID_NORWEGIAN 9 |
#define TT_MAC_LANGID_HEBREW 10 |
#define TT_MAC_LANGID_JAPANESE 11 |
#define TT_MAC_LANGID_ARABIC 12 |
#define TT_MAC_LANGID_FINNISH 13 |
#define TT_MAC_LANGID_GREEK 14 |
#define TT_MAC_LANGID_ICELANDIC 15 |
#define TT_MAC_LANGID_MALTESE 16 |
#define TT_MAC_LANGID_TURKISH 17 |
#define TT_MAC_LANGID_CROATIAN 18 |
#define TT_MAC_LANGID_CHINESE_TRADITIONAL 19 |
#define TT_MAC_LANGID_URDU 20 |
#define TT_MAC_LANGID_HINDI 21 |
#define TT_MAC_LANGID_THAI 22 |
#define TT_MAC_LANGID_KOREAN 23 |
#define TT_MAC_LANGID_LITHUANIAN 24 |
#define TT_MAC_LANGID_POLISH 25 |
#define TT_MAC_LANGID_HUNGARIAN 26 |
#define TT_MAC_LANGID_ESTONIAN 27 |
#define TT_MAC_LANGID_LETTISH 28 |
#define TT_MAC_LANGID_SAAMISK 29 |
#define TT_MAC_LANGID_FAEROESE 30 |
#define TT_MAC_LANGID_FARSI 31 |
#define TT_MAC_LANGID_RUSSIAN 32 |
#define TT_MAC_LANGID_CHINESE_SIMPLIFIED 33 |
#define TT_MAC_LANGID_FLEMISH 34 |
#define TT_MAC_LANGID_IRISH 35 |
#define TT_MAC_LANGID_ALBANIAN 36 |
#define TT_MAC_LANGID_ROMANIAN 37 |
#define TT_MAC_LANGID_CZECH 38 |
#define TT_MAC_LANGID_SLOVAK 39 |
#define TT_MAC_LANGID_SLOVENIAN 40 |
#define TT_MAC_LANGID_YIDDISH 41 |
#define TT_MAC_LANGID_SERBIAN 42 |
#define TT_MAC_LANGID_MACEDONIAN 43 |
#define TT_MAC_LANGID_BULGARIAN 44 |
#define TT_MAC_LANGID_UKRAINIAN 45 |
#define TT_MAC_LANGID_BYELORUSSIAN 46 |
#define TT_MAC_LANGID_UZBEK 47 |
#define TT_MAC_LANGID_KAZAKH 48 |
#define TT_MAC_LANGID_AZERBAIJANI 49 |
#define TT_MAC_LANGID_AZERBAIJANI_ARABIC_SCRIPT 50 |
#define TT_MAC_LANGID_ARMENIAN 51 |
#define TT_MAC_LANGID_GEORGIAN 52 |
#define TT_MAC_LANGID_MOLDAVIAN 53 |
#define TT_MAC_LANGID_KIRGHIZ 54 |
#define TT_MAC_LANGID_TAJIKI 55 |
#define TT_MAC_LANGID_TURKMEN 56 |
#define TT_MAC_LANGID_MONGOLIAN 57 |
#define TT_MAC_LANGID_MONGOLIAN_CYRILLIC_SCRIPT 58 |
#define TT_MAC_LANGID_PASHTO 59 |
#define TT_MAC_LANGID_KURDISH 60 |
#define TT_MAC_LANGID_KASHMIRI 61 |
#define TT_MAC_LANGID_SINDHI 62 |
#define TT_MAC_LANGID_TIBETAN 63 |
#define TT_MAC_LANGID_NEPALI 64 |
#define TT_MAC_LANGID_SANSKRIT 65 |
#define TT_MAC_LANGID_MARATHI 66 |
#define TT_MAC_LANGID_BENGALI 67 |
#define TT_MAC_LANGID_ASSAMESE 68 |
#define TT_MAC_LANGID_GUJARATI 69 |
#define TT_MAC_LANGID_PUNJABI 70 |
#define TT_MAC_LANGID_ORIYA 71 |
#define TT_MAC_LANGID_MALAYALAM 72 |
#define TT_MAC_LANGID_KANNADA 73 |
#define TT_MAC_LANGID_TAMIL 74 |
#define TT_MAC_LANGID_TELUGU 75 |
#define TT_MAC_LANGID_SINHALESE 76 |
#define TT_MAC_LANGID_BURMESE 77 |
#define TT_MAC_LANGID_KHMER 78 |
#define TT_MAC_LANGID_LAO 79 |
#define TT_MAC_LANGID_VIETNAMESE 80 |
#define TT_MAC_LANGID_INDONESIAN 81 |
#define TT_MAC_LANGID_TAGALOG 82 |
#define TT_MAC_LANGID_MALAY_ROMAN_SCRIPT 83 |
#define TT_MAC_LANGID_MALAY_ARABIC_SCRIPT 84 |
#define TT_MAC_LANGID_AMHARIC 85 |
#define TT_MAC_LANGID_TIGRINYA 86 |
#define TT_MAC_LANGID_GALLA 87 |
#define TT_MAC_LANGID_SOMALI 88 |
#define TT_MAC_LANGID_SWAHILI 89 |
#define TT_MAC_LANGID_RUANDA 90 |
#define TT_MAC_LANGID_RUNDI 91 |
#define TT_MAC_LANGID_CHEWA 92 |
#define TT_MAC_LANGID_MALAGASY 93 |
#define TT_MAC_LANGID_ESPERANTO 94 |
#define TT_MAC_LANGID_WELSH 128 |
#define TT_MAC_LANGID_BASQUE 129 |
#define TT_MAC_LANGID_CATALAN 130 |
#define TT_MAC_LANGID_LATIN 131 |
#define TT_MAC_LANGID_QUECHUA 132 |
#define TT_MAC_LANGID_GUARANI 133 |
#define TT_MAC_LANGID_AYMARA 134 |
#define TT_MAC_LANGID_TATAR 135 |
#define TT_MAC_LANGID_UIGHUR 136 |
#define TT_MAC_LANGID_DZONGKHA 137 |
#define TT_MAC_LANGID_JAVANESE 138 |
#define TT_MAC_LANGID_SUNDANESE 139 |
#define TT_MAC_LANGID_SCOTTISH_GAELIC 140 |
#define TT_MAC_LANGID_IRISH_GAELIC 141 |
#define TT_MAC_LANGID_BRETON 142 |
#define TT_MAC_LANGID_INUKTITUT 143 |
/* |
* possible values of the language identifier field in the name records of |
* the TTF "name" table when the 'Platform' identifier code is |
* TT_PLATFORM_MICROSOFT |
* |
* the canonical source for the MS assigned LCID's is at |
* http://www.microsoft.com/typography/OTSPEC/lcid-cp.txt |
*/ |
#define TT_MS_LANGID_ARABIC_SAUDI_ARABIA 0x0401 |
#define TT_MS_LANGID_ARABIC_IRAQ 0x0801 |
#define TT_MS_LANGID_ARABIC_EGYPT 0x0c01 |
#define TT_MS_LANGID_ARABIC_LIBYA 0x1001 |
#define TT_MS_LANGID_ARABIC_ALGERIA 0x1401 |
#define TT_MS_LANGID_ARABIC_MOROCCO 0x1801 |
#define TT_MS_LANGID_ARABIC_TUNISIA 0x1c01 |
#define TT_MS_LANGID_ARABIC_OMAN 0x2001 |
#define TT_MS_LANGID_ARABIC_YEMEN 0x2401 |
#define TT_MS_LANGID_ARABIC_SYRIA 0x2801 |
#define TT_MS_LANGID_ARABIC_JORDAN 0x2c01 |
#define TT_MS_LANGID_ARABIC_LEBANON 0x3001 |
#define TT_MS_LANGID_ARABIC_KUWAIT 0x3401 |
#define TT_MS_LANGID_ARABIC_UAE 0x3801 |
#define TT_MS_LANGID_ARABIC_BAHRAIN 0x3c01 |
#define TT_MS_LANGID_ARABIC_QATAR 0x4001 |
#define TT_MS_LANGID_BULGARIAN_BULGARIA 0x0402 |
#define TT_MS_LANGID_CATALAN_SPAIN 0x0403 |
#define TT_MS_LANGID_CHINESE_TAIWAN 0x0404 |
#define TT_MS_LANGID_CHINESE_PRC 0x0804 |
#define TT_MS_LANGID_CHINESE_HONG_KONG 0x0c04 |
#define TT_MS_LANGID_CHINESE_SINGAPORE 0x1004 |
#define TT_MS_LANGID_CHINESE_MACAU 0x1404 |
#define TT_MS_LANGID_CZECH_CZECH_REPUBLIC 0x0405 |
#define TT_MS_LANGID_DANISH_DENMARK 0x0406 |
#define TT_MS_LANGID_GERMAN_GERMANY 0x0407 |
#define TT_MS_LANGID_GERMAN_SWITZERLAND 0x0807 |
#define TT_MS_LANGID_GERMAN_AUSTRIA 0x0c07 |
#define TT_MS_LANGID_GERMAN_LUXEMBOURG 0x1007 |
#define TT_MS_LANGID_GERMAN_LIECHTENSTEI 0x1407 |
#define TT_MS_LANGID_GREEK_GREECE 0x0408 |
#define TT_MS_LANGID_ENGLISH_UNITED_STATES 0x0409 |
#define TT_MS_LANGID_ENGLISH_UNITED_KINGDOM 0x0809 |
#define TT_MS_LANGID_ENGLISH_AUSTRALIA 0x0c09 |
#define TT_MS_LANGID_ENGLISH_CANADA 0x1009 |
#define TT_MS_LANGID_ENGLISH_NEW_ZEALAND 0x1409 |
#define TT_MS_LANGID_ENGLISH_IRELAND 0x1809 |
#define TT_MS_LANGID_ENGLISH_SOUTH_AFRICA 0x1c09 |
#define TT_MS_LANGID_ENGLISH_JAMAICA 0x2009 |
#define TT_MS_LANGID_ENGLISH_CARIBBEAN 0x2409 |
#define TT_MS_LANGID_ENGLISH_BELIZE 0x2809 |
#define TT_MS_LANGID_ENGLISH_TRINIDAD 0x2c09 |
#define TT_MS_LANGID_ENGLISH_ZIMBABWE 0x3009 |
#define TT_MS_LANGID_ENGLISH_PHILIPPINES 0x3409 |
#define TT_MS_LANGID_SPANISH_SPAIN_TRADITIONAL_SORT 0x040a |
#define TT_MS_LANGID_SPANISH_MEXICO 0x080a |
#define TT_MS_LANGID_SPANISH_SPAIN_INTERNATIONAL_SORT 0x0c0a |
#define TT_MS_LANGID_SPANISH_GUATEMALA 0x100a |
#define TT_MS_LANGID_SPANISH_COSTA_RICA 0x140a |
#define TT_MS_LANGID_SPANISH_PANAMA 0x180a |
#define TT_MS_LANGID_SPANISH_DOMINICAN_REPUBLIC 0x1c0a |
#define TT_MS_LANGID_SPANISH_VENEZUELA 0x200a |
#define TT_MS_LANGID_SPANISH_COLOMBIA 0x240a |
#define TT_MS_LANGID_SPANISH_PERU 0x280a |
#define TT_MS_LANGID_SPANISH_ARGENTINA 0x2c0a |
#define TT_MS_LANGID_SPANISH_ECUADOR 0x300a |
#define TT_MS_LANGID_SPANISH_CHILE 0x340a |
#define TT_MS_LANGID_SPANISH_URUGUAY 0x380a |
#define TT_MS_LANGID_SPANISH_PARAGUAY 0x3c0a |
#define TT_MS_LANGID_SPANISH_BOLIVIA 0x400a |
#define TT_MS_LANGID_SPANISH_EL_SALVADOR 0x440a |
#define TT_MS_LANGID_SPANISH_HONDURAS 0x480a |
#define TT_MS_LANGID_SPANISH_NICARAGUA 0x4c0a |
#define TT_MS_LANGID_SPANISH_PUERTO_RICO 0x500a |
#define TT_MS_LANGID_FINNISH_FINLAND 0x040b |
#define TT_MS_LANGID_FRENCH_FRANCE 0x040c |
#define TT_MS_LANGID_FRENCH_BELGIUM 0x080c |
#define TT_MS_LANGID_FRENCH_CANADA 0x0c0c |
#define TT_MS_LANGID_FRENCH_SWITZERLAND 0x100c |
#define TT_MS_LANGID_FRENCH_LUXEMBOURG 0x140c |
#define TT_MS_LANGID_FRENCH_MONACO 0x180c |
#define TT_MS_LANGID_HEBREW_ISRAEL 0x040d |
#define TT_MS_LANGID_HUNGARIAN_HUNGARY 0x040e |
#define TT_MS_LANGID_ICELANDIC_ICELAND 0x040f |
#define TT_MS_LANGID_ITALIAN_ITALY 0x0410 |
#define TT_MS_LANGID_ITALIAN_SWITZERLAND 0x0810 |
#define TT_MS_LANGID_JAPANESE_JAPAN 0x0411 |
#define TT_MS_LANGID_KOREAN_EXTENDED_WANSUNG_KOREA 0x0412 |
#define TT_MS_LANGID_KOREAN_JOHAB_KOREA 0x0812 |
#define TT_MS_LANGID_DUTCH_NETHERLANDS 0x0413 |
#define TT_MS_LANGID_DUTCH_BELGIUM 0x0813 |
#define TT_MS_LANGID_NORWEGIAN_NORWAY_BOKMAL 0x0414 |
#define TT_MS_LANGID_NORWEGIAN_NORWAY_NYNORSK 0x0814 |
#define TT_MS_LANGID_POLISH_POLAND 0x0415 |
#define TT_MS_LANGID_PORTUGUESE_BRAZIL 0x0416 |
#define TT_MS_LANGID_PORTUGUESE_PORTUGAL 0x0816 |
#define TT_MS_LANGID_RHAETO_ROMANIC_SWITZERLAND 0x0417 |
#define TT_MS_LANGID_ROMANIAN_ROMANIA 0x0418 |
#define TT_MS_LANGID_MOLDAVIAN_MOLDAVIA 0x0818 |
#define TT_MS_LANGID_RUSSIAN_RUSSIA 0x0419 |
#define TT_MS_LANGID_RUSSIAN_MOLDAVIA 0x0819 |
#define TT_MS_LANGID_CROATIAN_CROATIA 0x041a |
#define TT_MS_LANGID_SERBIAN_SERBIA_LATIN 0x081a |
#define TT_MS_LANGID_SERBIAN_SERBIA_CYRILLIC 0x0c1a |
#define TT_MS_LANGID_SLOVAK_SLOVAKIA 0x041b |
#define TT_MS_LANGID_ALBANIAN_ALBANIA 0x041c |
#define TT_MS_LANGID_SWEDISH_SWEDEN 0x041d |
#define TT_MS_LANGID_SWEDISH_FINLAND 0x081d |
#define TT_MS_LANGID_THAI_THAILAND 0x041e |
#define TT_MS_LANGID_TURKISH_TURKEY 0x041f |
#define TT_MS_LANGID_URDU_PAKISTAN 0x0420 |
#define TT_MS_LANGID_INDONESIAN_INDONESIA 0x0421 |
#define TT_MS_LANGID_UKRAINIAN_UKRAINE 0x0422 |
#define TT_MS_LANGID_BELARUSIAN_BELARUS 0x0423 |
#define TT_MS_LANGID_SLOVENE_SLOVENIA 0x0424 |
#define TT_MS_LANGID_ESTONIAN_ESTONIA 0x0425 |
#define TT_MS_LANGID_LATVIAN_LATVIA 0x0426 |
#define TT_MS_LANGID_LITHUANIAN_LITHUANIA 0x0427 |
#define TT_MS_LANGID_CLASSIC_LITHUANIAN_LITHUANIA 0x0827 |
#define TT_MS_LANGID_MAORI_NEW_ZEALAND 0x0428 |
#define TT_MS_LANGID_FARSI_IRAN 0x0429 |
#define TT_MS_LANGID_VIETNAMESE_VIET_NAM 0x042a |
#define TT_MS_LANGID_ARMENIAN_ARMENIA 0x042b |
#define TT_MS_LANGID_AZERI_AZERBAIJAN_LATIN 0x042c |
#define TT_MS_LANGID_AZERI_AZERBAIJAN_CYRILLIC 0x082c |
#define TT_MS_LANGID_BASQUE_SPAIN 0x042d |
#define TT_MS_LANGID_SORBIAN_GERMANY 0x042e |
#define TT_MS_LANGID_MACEDONIAN_MACEDONIA 0x042f |
#define TT_MS_LANGID_SUTU_SOUTH_AFRICA 0x0430 |
#define TT_MS_LANGID_TSONGA_SOUTH_AFRICA 0x0431 |
#define TT_MS_LANGID_TSWANA_SOUTH_AFRICA 0x0432 |
#define TT_MS_LANGID_VENDA_SOUTH_AFRICA 0x0433 |
#define TT_MS_LANGID_XHOSA_SOUTH_AFRICA 0x0434 |
#define TT_MS_LANGID_ZULU_SOUTH_AFRICA 0x0435 |
#define TT_MS_LANGID_AFRIKAANS_SOUTH_AFRICA 0x0436 |
#define TT_MS_LANGID_GEORGIAN_GEORGIA 0x0437 |
#define TT_MS_LANGID_FAEROESE_FAEROE_ISLANDS 0x0438 |
#define TT_MS_LANGID_HINDI_INDIA 0x0439 |
#define TT_MS_LANGID_MALTESE_MALTA 0x043a |
#define TT_MS_LANGID_SAAMI_LAPONIA 0x043b |
#define TT_MS_LANGID_IRISH_GAELIC_IRELAND 0x043c |
#define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM 0x083c |
#define TT_MS_LANGID_MALAY_MALAYSIA 0x043e |
#define TT_MS_LANGID_MALAY_BRUNEI_DARUSSALAM 0x083e |
#define TT_MS_LANGID_KAZAK_KAZAKSTAN 0x043f |
#define TT_MS_LANGID_SWAHILI_KENYA 0x0441 |
#define TT_MS_LANGID_UZBEK_UZBEKISTAN_LATIN 0x0443 |
#define TT_MS_LANGID_UZBEK_UZBEKISTAN_CYRILLIC 0x0843 |
#define TT_MS_LANGID_TATAR_TATARSTAN 0x0444 |
#define TT_MS_LANGID_BENGALI_INDIA 0x0445 |
#define TT_MS_LANGID_PUNJABI_INDIA 0x0446 |
#define TT_MS_LANGID_GUJARATI_INDIA 0x0447 |
#define TT_MS_LANGID_ORIYA_INDIA 0x0448 |
#define TT_MS_LANGID_TAMIL_INDIA 0x0449 |
#define TT_MS_LANGID_TELUGU_INDIA 0x044a |
#define TT_MS_LANGID_KANNADA_INDIA 0x044b |
#define TT_MS_LANGID_MALAYALAM_INDIA 0x044c |
#define TT_MS_LANGID_ASSAMESE_INDIA 0x044d |
#define TT_MS_LANGID_MARATHI_INDIA 0x044e |
#define TT_MS_LANGID_SANSKRIT_INDIA 0x044f |
#define TT_MS_LANGID_KONKANI_INDIA 0x0457 |
/* |
* possible values of the 'Name' identifier field in the name records of |
* the TTF "name" table. These values are platform independent. |
*/ |
#define TT_NAME_ID_COPYRIGHT 0 |
#define TT_NAME_ID_FONT_FAMILY 1 |
#define TT_NAME_ID_FONT_SUBFAMILY 2 |
#define TT_NAME_ID_UNIQUE_ID 3 |
#define TT_NAME_ID_FULL_NAME 4 |
#define TT_NAME_ID_VERSION_STRING 5 |
#define TT_NAME_ID_PS_NAME 6 |
#define TT_NAME_ID_TRADEMARK 7 |
/* the following values are from the OpenType spec */ |
#define TT_NAME_ID_MANUFACTURER 8 |
#define TT_NAME_ID_DESIGNER 9 |
#define TT_NAME_ID_DESCRIPTION 10 |
#define TT_NAME_ID_VENDOR_URL 11 |
#define TT_NAME_ID_DESIGNER_URL 12 |
#define TT_NAME_ID_LICENSE 13 |
#define TT_NAME_ID_LICENSE_URL 14 |
/* number 15 is reserved */ |
#define TT_NAME_ID_PREFERRED_FAMILY 16 |
#define TT_NAME_ID_PREFERRED_SUBFAMILY 17 |
#define TT_NAME_ID_MAC_FULL_NAME 18 |
/* |
* Bit Mask values for the Unicode Ranges from the TTF "OS2 " table. |
*/ |
/* General Scripts Area */ |
/* Bit 0 C0 Controls and Basic Latin */ |
#define TT_UCR_BASIC_LATIN (1L << 0) /* U+0000-U+007F */ |
/* Bit 1 C1 Controls and Latin-1 Supplement */ |
#define TT_UCR_LATIN1_SUPPLEMENT (1L << 1) /* U+0080-U+00FF */ |
/* Bit 2 Latin Extended-A */ |
#define TT_UCR_LATIN_EXTENDED_A (1L << 2) /* U+0100-U+017F */ |
/* Bit 3 Latin Extended-B */ |
#define TT_UCR_LATIN_EXTENDED_B (1L << 3) /* U+0180-U+024F */ |
/* Bit 4 IPA Extensions */ |
#define TT_UCR_IPA_EXTENSIONS (1L << 4) /* U+0250-U+02AF */ |
/* Bit 5 Spacing Modifier Letters */ |
#define TT_UCR_SPACING_MODIFIER (1L << 5) /* U+02B0-U+02FF */ |
/* Bit 6 Combining Diacritical Marks */ |
#define TT_UCR_COMBINING_DIACRITICS (1L << 6) /* U+0300-U+036F */ |
/* Bit 7 Greek */ |
#define TT_UCR_GREEK (1L << 7) /* U+0370-U+03FF */ |
/* Bit 8 is reserved (was: Greek Symbols and Coptic) */ |
/* Bit 9 Cyrillic */ |
#define TT_UCR_CYRILLIC (1L << 9) /* U+0400-U+04FF */ |
/* Bit 10 Armenian */ |
#define TT_UCR_ARMENIAN (1L << 10) /* U+0530-U+058F */ |
/* Bit 11 Hebrew */ |
#define TT_UCR_HEBREW (1L << 11) /* U+0590-U+05FF */ |
/* Bit 12 is reserved (was: Hebrew Extended) */ |
/* Bit 13 Arabic */ |
#define TT_UCR_ARABIC (1L << 13) /* U+0600-U+06FF */ |
/* Bit 14 is reserved (was: Arabic Extended) */ |
/* Bit 15 Devanagari */ |
#define TT_UCR_DEVANAGARI (1L << 15) /* U+0900-U+097F */ |
/* Bit 16 Bengali */ |
#define TT_UCR_BENGALI (1L << 16) /* U+0980-U+09FF */ |
/* Bit 17 Gurmukhi */ |
#define TT_UCR_GURMUKHI (1L << 17) /* U+0A00-U+0A7F */ |
/* Bit 18 Gujarati */ |
#define TT_UCR_GUJARATI (1L << 18) /* U+0A80-U+0AFF */ |
/* Bit 19 Oriya */ |
#define TT_UCR_ORIYA (1L << 19) /* U+0B00-U+0B7F */ |
/* Bit 20 Tamil */ |
#define TT_UCR_TAMIL (1L << 20) /* U+0B80-U+0BFF */ |
/* Bit 21 Telugu */ |
#define TT_UCR_TELUGU (1L << 21) /* U+0C00-U+0C7F */ |
/* Bit 22 Kannada */ |
#define TT_UCR_KANNADA (1L << 22) /* U+0C80-U+0CFF */ |
/* Bit 23 Malayalam */ |
#define TT_UCR_MALAYALAM (1L << 23) /* U+0D00-U+0D7F */ |
/* Bit 24 Thai */ |
#define TT_UCR_THAI (1L << 24) /* U+0E00-U+0E7F */ |
/* Bit 25 Lao */ |
#define TT_UCR_LAO (1L << 25) /* U+0E80-U+0EFF */ |
/* Bit 26 Georgian */ |
#define TT_UCR_GEORGIAN (1L << 26) /* U+10A0-U+10FF */ |
/* Bit 27 is reserved (was Georgian Extended) */ |
/* Bit 28 Hangul Jamo */ |
#define TT_UCR_HANGUL_JAMO (1L << 28) /* U+1100-U+11FF */ |
/* Bit 29 Latin Extended Additional */ |
#define TT_UCR_LATIN_EXTENDED_ADDITIONAL (1L << 29) /* U+1E00-U+1EFF */ |
/* Bit 30 Greek Extended */ |
#define TT_UCR_GREEK_EXTENDED (1L << 30) /* U+1F00-U+1FFF */ |
/* Symbols Area */ |
/* Bit 31 General Punctuation */ |
#define TT_UCR_GENERAL_PUNCTUATION (1L << 31) /* U+2000-U+206F */ |
/* Bit 32 Superscripts And Subscripts */ |
#define TT_UCR_SUPERSCRIPTS_SUBSCRIPTS (1L << 0) /* U+2070-U+209F */ |
/* Bit 33 Currency Symbols */ |
#define TT_UCR_CURRENCY_SYMBOLS (1L << 1) /* U+20A0-U+20CF */ |
/* Bit 34 Combining Diacritical Marks For Symbols */ |
#define TT_UCR_COMBINING_DIACRITICS_SYMB (1L << 2) /* U+20D0-U+20FF */ |
/* Bit 35 Letterlike Symbols */ |
#define TT_UCR_LETTERLIKE_SYMBOLS (1L << 3) /* U+2100-U+214F */ |
/* Bit 36 Number Forms */ |
#define TT_UCR_NUMBER_FORMS (1L << 4) /* U+2150-U+218F */ |
/* Bit 37 Arrows */ |
#define TT_UCR_ARROWS (1L << 5) /* U+2190-U+21FF */ |
/* Bit 38 Mathematical Operators */ |
#define TT_UCR_MATHEMATICAL_OPERATORS (1L << 6) /* U+2200-U+22FF */ |
/* Bit 39 Miscellaneous Technical */ |
#define TT_UCR_MISCELLANEOUS_TECHNICAL (1L << 7) /* U+2300-U+23FF */ |
/* Bit 40 Control Pictures */ |
#define TT_UCR_CONTROL_PICTURES (1L << 8) /* U+2400-U+243F */ |
/* Bit 41 Optical Character Recognition */ |
#define TT_UCR_OCR (1L << 9) /* U+2440-U+245F */ |
/* Bit 42 Enclosed Alphanumerics */ |
#define TT_UCR_ENCLOSED_ALPHANUMERICS (1L << 10) /* U+2460-U+24FF */ |
/* Bit 43 Box Drawing */ |
#define TT_UCR_BOX_DRAWING (1L << 11) /* U+2500-U+257F */ |
/* Bit 44 Block Elements */ |
#define TT_UCR_BLOCK_ELEMENTS (1L << 12) /* U+2580-U+259F */ |
/* Bit 45 Geometric Shapes */ |
#define TT_UCR_GEOMETRIC_SHAPES (1L << 13) /* U+25A0-U+25FF */ |
/* Bit 46 Miscellaneous Symbols */ |
#define TT_UCR_MISCELLANEOUS_SYMBOLS (1L << 14) /* U+2600-U+26FF */ |
/* Bit 47 Dingbats */ |
#define TT_UCR_DINGBATS (1L << 15) /* U+2700-U+27BF */ |
/* CJK Phonetics and Symbols Area */ |
/* Bit 48 CJK Symbols And Punctuation */ |
#define TT_UCR_CJK_SYMBOLS (1L << 16) /* U+3000-U+303F */ |
/* Bit 49 Hiragana */ |
#define TT_UCR_HIRAGANA (1L << 17) /* U+3040-U+309F */ |
/* Bit 50 Katakana */ |
#define TT_UCR_KATAKANA (1L << 18) /* U+30A0-U+30FF */ |
/* Bit 51 Bopomofo */ |
#define TT_UCR_BOPOMOFO (1L << 19) /* U+3100-U+312F */ |
/* Bit 52 Hangul Compatibility Jamo */ |
#define TT_UCR_HANGUL_COMPATIBILITY_JAMO (1L << 20) /* U+3130-U+318F */ |
/* Bit 53 CJK Miscellaneous */ |
#define TT_UCR_CJK_MISC (1L << 21) /* U+3190-U+319F */ |
/* Bit 54 Enclosed CJK Letters And Months */ |
#define TT_UCR_ENCLOSED_CJK_LETTERS_MONTHS (1L << 22) /* U+3200-U+32FF */ |
/* Bit 55 CJK Compatibility */ |
#define TT_UCR_CJK_COMPATIBILITY (1L << 23) /* U+3300-U+33FF */ |
/* Hangul Syllables Area */ |
/* Bit 56 Hangul */ |
#define TT_UCR_HANGUL (1L << 24) /* U+AC00-U+D7A3 */ |
/* Surrogates Area */ |
/* Bit 57 Surrogates */ |
#define TT_UCR_SURROGATES (1L << 25) /* U+D800-U+DFFF */ |
/* Bit 58 is reserved for Unicode SubRanges */ |
/* CJK Ideographs Area */ |
/* Bit 59 CJK Unified Ideographs */ |
#define TT_UCR_CJK_UNIFIED_IDEOGRAPHS (1L << 27) /* U+4E00-U+9FFF */ |
/* Private Use Area */ |
/* Bit 60 Private Use */ |
#define TT_UCR_PRIVATE_USE (1L << 28) /* U+E000-U+F8FF */ |
/* Compatibility Area and Specials */ |
/* Bit 61 CJK Compatibility Ideographs */ |
#define TT_UCR_CJK_COMPATIBILITY_IDEOGRAPHS (1L << 29) /* U+F900-U+FAFF */ |
/* Bit 62 Alphabetic Presentation Forms */ |
#define TT_UCR_ALPHABETIC_PRESENTATION_FORMS (1L << 30) /* U+FB00-U+FB4F */ |
/* Bit 63 Arabic Presentation Forms-A */ |
#define TT_UCR_ARABIC_PRESENTATIONS_A (1L << 31) /* U+FB50-U+FSFF */ |
/* Bit 64 Combining Half Marks */ |
#define TT_UCR_COMBINING_HALF_MARKS (1L << 0) /* U+FE20-U+FE2F */ |
/* Bit 65 CJK Compatibility Forms */ |
#define TT_UCR_CJK_COMPATIBILITY_FORMS (1L << 1) /* U+FE30-U+FE4F */ |
/* Bit 66 Small Form Variants */ |
#define TT_UCR_SMALL_FORM_VARIANTS (1L << 2) /* U+FE50-U+FE6F */ |
/* Bit 67 Arabic Presentation Forms-B */ |
#define TT_UCR_ARABIC_PRESENTATIONS_B (1L << 3) /* U+FE70-U+FEFF */ |
/* Bit 68 Halfwidth And Fullwidth Forms */ |
#define TT_UCR_HALFWIDTH_FULLWIDTH_FORMS (1L << 4) /* U+FF00-U+FFEF */ |
/* Bit 69 Specials */ |
#define TT_UCR_SPECIALS (1L << 5) /* U+FEFF, |
U+FFF0-U+FFFF */ |
/* Bit 70 Tibetan */ |
#define TT_UCR_TIBETAN (1L << 6) /* U+0F00-U+0FBF */ |
/* Some compilers have a very limited length of identifiers. */ |
#if defined( __TURBOC__ ) && __TURBOC__ < 0x0410 || defined( __PACIFIC__ ) |
#define HAVE_LIMIT_ON_IDENTS |
#endif |
#ifndef HAVE_LIMIT_ON_IDENTS |
/* |
* Here some alias #defines in order to be clearer. |
* |
* These are not always #defined to stay within the 31 character limit |
* which some compilers have. |
* |
* Credits go to Dave Hoo <dhoo@flash.net> for pointing out that modern |
* Borland compilers (read: from BC++ 3.1 on) can increase this limit. |
* If you get a warning with such a compiler, use the -i40 switch. |
*/ |
#define TT_UCR_ARABIC_PRESENTATION_FORMS_A \ |
TT_UCR_ARABIC_PRESENTATIONS_A |
#define TT_UCR_ARABIC_PRESENTATION_FORMS_B \ |
TT_UCR_ARABIC_PRESENTATIONS_B |
#define TT_UCR_COMBINING_DIACRITICAL_MARKS \ |
TT_UCR_COMBINING_DIACRITICS |
#define TT_UCR_COMBINING_DIACRITICAL_MARKS_SYMB \ |
TT_UCR_COMBINING_DIACRITICS_SYMB |
#endif /* ndef HAVE_LIMIT_ON_IDENTS */ |
#endif /* FTNAMEID_H */ |
/* END */ |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/programs/develop/libraries/menuetlibc/include/freetype/header.h |
---|
0,0 → 1,49 |
/******************************************************************* |
* |
* Function : |
* |
* Description : |
* |
* Input : |
* |
* Output : |
* |
* Notes : |
* |
******************************************************************/ |
/******************************************************************* |
* |
* Function : |
* |
* Description : |
* |
* Input : None |
* |
* Output : Error code. |
* |
******************************************************************/ |
/******************************************************************* |
* |
* Function : |
* |
* Description : |
* |
******************************************************************/ |
/******************************************************************* |
* |
* Component Name (e.g. TTRaster.C) + eventually a version number. |
* |
* Component Short Description (e.g. Rasterizer). |
* |
* Copyright 1996 David Turner, Robert Wilhelm and Werner Lemberg. |
* |
* This file is part of the FreeType project, and may only be used |
* modified and distributed under the terms of the FreeType project |
* license, LICENSE.TXT. By continuing to use, modify or distribute |
* this file you indicate that you have read the license and |
* understand and accept it fully. |
* |
******************************************************************/ |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/programs/develop/libraries/menuetlibc/include/freetype/ttcache.h |
---|
0,0 → 1,216 |
/******************************************************************* |
* |
* ttcache.h 1.1 |
* |
* Generic object cache |
* |
* Copyright 1996-1999 by |
* David Turner, Robert Wilhelm, and Werner Lemberg. |
* |
* This file is part of the FreeType project, and may only be used |
* modified and distributed under the terms of the FreeType project |
* license, LICENSE.TXT. By continuing to use, modify, or distribute |
* this file you indicate that you have read the license and |
* understand and accept it fully. |
* |
* |
* This component defines and implements object caches. |
* |
* An object class is a structure layout that encapsulate one |
* given type of data used by the FreeType engine. Each object |
* class is completely described by: |
* |
* - a 'root' or 'leading' structure containing the first |
* important fields of the class. The root structure is |
* always of fixed size. |
* |
* It is implemented as a simple C structure, and may |
* contain several pointers to sub-tables that can be |
* sized and allocated dynamically. |
* |
* Examples: TFace, TInstance, TGlyph & TExecution_Context |
* (defined in 'ttobjs.h') |
* |
* - we make a difference between 'child' pointers and 'peer' |
* pointers. A 'child' pointer points to a sub-table that is |
* owned by the object, while a 'peer' pointer points to any |
* other kind of data the object isn't responsible for. |
* |
* An object class is thus usually a 'tree' of 'child' tables. |
* |
* - each object class needs a constructor and a destructor. |
* |
* A constructor is a function which receives the address of |
* freshly allocated and zeroed object root structure and |
* 'builds' all the valid child data that must be associated |
* to the object before it becomes 'valid'. |
* |
* A destructor does the inverse job: given the address of |
* a valid object, it must discard all its child data and |
* zero its main fields (essentially the pointers and array |
* sizes found in the root fields). |
* |
* |
* Important notes: |
* |
* When the constructor fails to allocate an object, it must |
* return immediately with an error code, and not try to release |
* what it has previously allocated before the error. The cache |
* manager detects the error and calls the destructor on the |
* partial object, before returning the error to the caller (along |
* with a NULL pointer for the "new" object). |
* |
* The destructor must thus be able to deal with "partial objects", |
* i.e., objects where only part of the child tables are allocated, |
* and only release these ones. As the TT_Free() function accepts |
* a NULL parameter (and returns successfuly in this case), no check |
* is really necessary when using the macro 'FREE()'. |
* |
* Currently, there is no check in the cache manager to see if a |
* destructor fails (double error state!). |
* |
* This scheme is more compact and more maintanable than the one |
* where de-allocation code is duplicated in the constructor |
* _and_ the destructor. |
* |
* |
* |
* Changes between 1.1 and 1.0: |
* |
* - introduced the refreshed and finalizer class definition/implementation |
* - inserted an engine instance pointer in the cache structure |
* |
******************************************************************/ |
#ifndef TTCACHE_H |
#define TTCACHE_H |
#include "tttypes.h" |
#include "ttconfig.h" |
#include "ttmutex.h" |
#ifdef __cplusplus |
extern "C" { |
#endif |
typedef TT_Error TConstructor( void* object, |
void* parent ); |
typedef TT_Error TDestructor ( void* object ); |
typedef TConstructor TRefresher; |
typedef TDestructor TFinalizer; |
typedef TConstructor* PConstructor; |
typedef TDestructor* PDestructor; |
typedef TRefresher* PRefresher; |
typedef TFinalizer* PFinalizer; |
/* A Cache class record holds the data necessary to define */ |
/* a cache kind. */ |
struct TCache_Class_ |
{ |
ULong object_size; |
Long idle_limit; |
PConstructor init; |
PDestructor done; |
PRefresher reset; |
PFinalizer finalize; |
}; |
typedef struct TCache_Class_ TCache_Class; |
typedef TCache_Class* PCache_Class; |
/* Simple list node record. A list element is said to be 'unlinked' */ |
/* when it doesn't belong to any list. */ |
struct TList_Element_; |
typedef struct TList_Element_ TList_Element; |
typedef TList_Element* PList_Element; |
struct TList_Element_ |
{ |
PList_Element next; |
void* data; |
}; |
/* Simple singly-linked list record - LIFO style, no tail field */ |
typedef PList_Element TSingle_List; |
struct TCache_ |
{ |
PEngine_Instance engine; |
PCache_Class clazz; /* 'class' is a reserved word in C++ */ |
TMutex* lock; |
TSingle_List active; |
TSingle_List idle; |
Long idle_count; |
}; |
typedef struct TCache_ TCache; |
typedef TCache* PCache; |
/* Returns a new list element, either fresh or recycled. */ |
/* Note: the returned element is unlinked. */ |
/* An object cache holds two lists tracking the active and */ |
/* idle objects that are currently created and used by the */ |
/* engine. It can also be 'protected' by a mutex. */ |
/* Initializes a new cache, of class 'clazz', pointed by 'cache', */ |
/* protected by the 'lock' mutex. Set 'lock' to NULL if the cache */ |
/* doesn't need protection */ |
LOCAL_DEF |
TT_Error Cache_Create( PEngine_Instance engine, |
PCache_Class clazz, |
TCache* cache, |
TMutex* lock ); |
/* Destroys a cache and all its listed objects */ |
LOCAL_DEF |
TT_Error Cache_Destroy( TCache* cache ); |
/* Extracts a new object from the cache */ |
LOCAL_DEF |
TT_Error Cache_New( TCache* cache, |
void** new_object, |
void* parent_object ); |
/* Returns an object to the cache, or discards it depending */ |
/* on the cache class' 'idle_limit' field */ |
LOCAL_DEF |
TT_Error Cache_Done( TCache* cache, void* data ); |
#define CACHE_New( _cache, _newobj, _parent ) \ |
Cache_New( (TCache*)_cache, (void**)&_newobj, (void*)_parent ) |
#define CACHE_Done( _cache, _obj ) \ |
Cache_Done( (TCache*)_cache, (void*)_obj ) |
LOCAL_DEF |
TT_Error TTCache_Init( PEngine_Instance engine ); |
LOCAL_DEF |
TT_Error TTCache_Done( PEngine_Instance engine ); |
#ifdef __cplusplus |
} |
#endif |
#endif /* TTCACHE_H */ |
/* END */ |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/programs/develop/libraries/menuetlibc/include/freetype/ttcalc.h |
---|
0,0 → 1,97 |
/******************************************************************* |
* |
* ttcalc.h |
* |
* Arithmetic Computations (specification). |
* |
* Copyright 1996-1999 by |
* David Turner, Robert Wilhelm, and Werner Lemberg. |
* |
* This file is part of the FreeType project, and may only be used |
* modified and distributed under the terms of the FreeType project |
* license, LICENSE.TXT. By continuing to use, modify, or distribute |
* this file you indicate that you have read the license and |
* understand and accept it fully. |
* |
******************************************************************/ |
#ifndef TTCALC_H |
#define TTCALC_H |
#include "ttconfig.h" |
#include "freetype.h" |
#ifdef __cplusplus |
extern "C" { |
#endif |
#ifdef LONG64 |
typedef INT64 TT_Int64; |
#define ADD_64( x, y, z ) z = x + y |
#define SUB_64( x, y, z ) z = x - y |
#define MUL_64( x, y, z ) z = (TT_Int64)(x) * (y) |
#define DIV_64( x, y ) ( (x) / (y) ) |
#define SQRT_64( x ) Sqrt64( x ) |
#define SQRT_32( x ) Sqrt32( x ) |
LOCAL_DEF TT_Int32 Sqrt64( TT_Int64 l ); |
#else /* LONG64 */ |
struct TT_Int64_ |
{ |
TT_Word32 lo; |
TT_Word32 hi; |
}; |
typedef struct TT_Int64_ TT_Int64; |
#define ADD_64( x, y, z ) Add64( &x, &y, &z ) |
#define SUB_64( x, y, z ) Sub64( &x, &y, &z ) |
#define MUL_64( x, y, z ) MulTo64( x, y, &z ) |
#define DIV_64( x, y ) Div64by32( &x, y ) |
#define SQRT_64( x ) Sqrt64( &x ) |
#define SQRT_32( x ) Sqrt32( x ) |
LOCAL_DEF void Add64( TT_Int64* x, TT_Int64* y, TT_Int64* z ); |
LOCAL_DEF void Sub64( TT_Int64* x, TT_Int64* y, TT_Int64* z ); |
LOCAL_DEF void MulTo64( TT_Int32 x, TT_Int32 y, TT_Int64* z ); |
LOCAL_DEF TT_Int32 Div64by32( TT_Int64* x, TT_Int32 y ); |
LOCAL_DEF int Order64( TT_Int64* z ); |
LOCAL_DEF TT_Int32 Sqrt64( TT_Int64* l ); |
#endif /* LONG64 */ |
/* The two following functions are now part of the API! */ |
/* TT_Long TT_MulDiv( TT_Long a, TT_Long b, TT_Long c ); */ |
/* TT_Long TT_MulFix( TT_Long a, TT_Long b ); */ |
#define INT_TO_F26DOT6( x ) ( (Long)(x) << 6 ) |
#define INT_TO_F2DOT14( x ) ( (Long)(x) << 14 ) |
#define INT_TO_FIXED( x ) ( (Long)(x) << 16 ) |
#define F2DOT14_TO_FIXED( x ) ( (Long)(x) << 2 ) |
#define FLOAT_TO_FIXED( x ) ( (Long)(x * 65536.0) ) |
#define ROUND_F26DOT6( x ) ( x >= 0 ? ( ((x) + 32) & -64) \ |
: ( -((32 - (x)) & -64) ) ) |
#ifdef __cplusplus |
} |
#endif |
#endif /* TTCALC_H */ |
/* END */ |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/programs/develop/libraries/menuetlibc/include/freetype/ttcmap.h |
---|
0,0 → 1,169 |
/******************************************************************* |
* |
* ttcmap.h 1.0 |
* |
* TrueType Character Mappings |
* |
* Copyright 1996-1999 by |
* David Turner, Robert Wilhelm, and Werner Lemberg. |
* |
* This file is part of the FreeType project, and may only be used |
* modified and distributed under the terms of the FreeType project |
* license, LICENSE.TXT. By continuing to use, modify, or distribute |
* this file you indicate that you have read the license and |
* understand and accept it fully. |
* |
* |
******************************************************************/ |
#ifndef TTCMAP_H |
#define TTCMAP_H |
#include "ttconfig.h" |
#include "tttypes.h" |
#ifdef __cplusplus |
extern "C" { |
#endif |
/* format 0 */ |
struct TCMap0_ |
{ |
PByte glyphIdArray; |
}; |
typedef struct TCMap0_ TCMap0; |
typedef TCMap0* PCMap0; |
/* format 2 */ |
struct TCMap2SubHeader_ |
{ |
UShort firstCode; /* first valid low byte */ |
UShort entryCount; /* number of valid low bytes */ |
Short idDelta; /* delta value to glyphIndex */ |
UShort idRangeOffset; /* offset from here to 1st code */ |
}; |
typedef struct TCMap2SubHeader_ TCMap2SubHeader; |
typedef TCMap2SubHeader* PCMap2SubHeader; |
struct TCMap2_ |
{ |
PUShort subHeaderKeys; |
/* high byte mapping table */ |
/* value = subHeader index * 8 */ |
PCMap2SubHeader subHeaders; |
PUShort glyphIdArray; |
UShort numGlyphId; /* control value */ |
}; |
typedef struct TCMap2_ TCMap2; |
typedef TCMap2* PCMap2; |
/* format 4 */ |
struct TCMap4Segment_ |
{ |
UShort endCount; |
UShort startCount; |
Short idDelta; /* in the specs defined as UShort but the |
example there gives negative values... */ |
UShort idRangeOffset; |
}; |
typedef struct TCMap4Segment_ TCMap4Segment; |
typedef TCMap4Segment* PCMap4Segment; |
struct TCMap4_ |
{ |
UShort segCountX2; /* number of segments * 2 */ |
UShort searchRange; /* these parameters can be used */ |
UShort entrySelector; /* for a binary search */ |
UShort rangeShift; |
PCMap4Segment segments; |
PUShort glyphIdArray; |
UShort numGlyphId; /* control value */ |
}; |
typedef struct TCMap4_ TCMap4; |
typedef TCMap4* PCMap4; |
/* format 6 */ |
struct TCMap6_ |
{ |
UShort firstCode; /* first character code of subrange */ |
UShort entryCount; /* number of character codes in subrange */ |
PUShort glyphIdArray; |
}; |
typedef struct TCMap6_ TCMap6; |
typedef TCMap6* PCMap6; |
/* charmap table */ |
struct TCMapTable_ |
{ |
UShort platformID; |
UShort platformEncodingID; |
UShort format; |
UShort length; |
UShort version; |
Bool loaded; |
ULong offset; |
union |
{ |
TCMap0 cmap0; |
TCMap2 cmap2; |
TCMap4 cmap4; |
TCMap6 cmap6; |
} c; |
}; |
typedef struct TCMapTable_ TCMapTable; |
typedef TCMapTable* PCMapTable; |
/* Load character mappings directory when face is loaded. */ |
/* The mappings themselves are only loaded on demand. */ |
LOCAL_DEF |
TT_Error CharMap_Load( PCMapTable table, |
TT_Stream input ); |
/* Destroy one character mapping table */ |
LOCAL_DEF |
TT_Error CharMap_Free( PCMapTable table ); |
/* Use character mapping table to perform mapping */ |
LOCAL_DEF |
UShort CharMap_Index( PCMapTable cmap, |
UShort charCode ); |
/* NOTE: The PFace type isn't defined at this point */ |
#ifdef __cplusplus |
} |
#endif |
#endif /* TTCMAP_H */ |
/* END */ |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/programs/develop/libraries/menuetlibc/include/freetype/ttconfig.h |
---|
0,0 → 1,279 |
/******************************************************************* |
* |
* ttconfig.h 1.0 |
* |
* Configuration settings header file (spec only). |
* |
* Copyright 1996-1999 by |
* David Turner, Robert Wilhelm, and Werner Lemberg. |
* |
* This file is part of the FreeType project, and may only be used |
* modified and distributed under the terms of the FreeType project |
* license, LICENSE.TXT. By continuing to use, modify, or distribute |
* this file you indicate that you have read the license and |
* understand and accept it fully. |
* |
* Notes: |
* |
* All the configuration #define statements have been gathered in |
* this file to allow easy check and modification. |
* |
******************************************************************/ |
#ifndef TTCONFIG_H |
#define TTCONFIG_H |
/* ------------ auto configuration ------------------------------------- */ |
/*************************************************************************/ |
/* Here we include the file ft_conf.h for system dependent stuff. */ |
/* The specific makefile is responsible for providing the right path to */ |
/* this file. */ |
#include "ft_conf.h" |
/**************************************************************************/ |
/* Define TT_CONFIG_THREAD_SAFE if you want to build a thread-safe */ |
/* version of the library. */ |
/* #define TT_CONFIG_OPTION_THREAD_SAFE */ |
/* ------------ general debugging -------------------------------------- */ |
/************************************************************************* |
* |
* There are now three debugging modes: |
* |
* - trace mode: |
* |
* Error and trace messages are sent to the log file |
* (which can be the standard error output). Define |
* DEBUG_LEVEL_TRACE to enable this mode. |
* |
* - error mode: |
* |
* Only error messages are generated. Define |
* DEBUG_LEVEL_ERROR to enable this mode. |
* |
* - release mode: |
* |
* Error messages are neither sent nor generated. The code is |
* free from any debugging parts. |
* |
* |
* Note that you should link the engine with the 'ttdebug' component. |
* in case either DEBUG_LEVEL_TRACE or DEBUG_LEVEL_ERROR is defined. |
* |
* Please consult ttdebug.h for more details. */ |
/* #define DEBUG_LEVEL_TRACE */ |
/* #define DEBUG_LEVEL_ERROR */ |
/* ------------ special debugging -------------------------------------- */ |
/*************************************************************************/ |
/* Define this if you want to generate a special debug version of the */ |
/* rasterizer. This will progressively draw the glyphs while the */ |
/* computations are done directly on the graphics screen... (with */ |
/* inverted glyphs). */ |
/* */ |
/* Use it at your own risk! It is not maintained currently. */ |
/* */ |
/* IMPORTANT: This is reserved to developers willing to debug the */ |
/* rasterizer, which seems working very well in its */ |
/* current state... */ |
/* #define DEBUG_RASTER */ |
/*************************************************************************/ |
/* Define this to have a simple debugger version of RunIns(). */ |
/* */ |
/* Use it at your own risk! It is not maintained currently. */ |
/* #define DEBUG_INTERPRETER */ |
/*************************************************************************/ |
/* Define this to have some housekeeping of allocation and deallocation. */ |
/* */ |
/* Please note that probably not all OS-specific versions of ttmemory.c */ |
/* provide this functionality. */ |
/* #define DEBUG_MEMORY */ |
/*************************************************************************/ |
/* Define this to have bounds checking for file buffer frames. */ |
/* */ |
/* Please note that probably not all OS-specific versions of ttfile.c */ |
/* provide this functionality. */ |
/* #define DEBUG_FILE */ |
/* ------------ arithmetic and processor support ----------------------- */ |
/*************************************************************************/ |
/* Define TT_USE_LONG_LONG if you want to enable the use of the */ |
/* 'long long' 64-bit type provided by gcc and other compilers. Note */ |
/* that : */ |
/* */ |
/* 1. The type isn't ANSI, and thus will produce many warnings */ |
/* during library compilation. */ |
/* */ |
/* 2. Though the generated object files are slightly smaller, the */ |
/* resulting executables are bigger of about 4Kb! gcc must be */ |
/* linking some extra code in there! */ |
/* */ |
/* 3. There is really no speed gain in doing so (but it may help */ |
/* debug the ttcalc component). */ |
/* */ |
/* IMPORTANT NOTE: You don't need to define it on 64-bits machines! */ |
/* */ |
/* NOTE 2 : This flag used to be _GNUC_LONG64_ */ |
/* #define TT_USE_LONG_LONG */ |
/*************************************************************************/ |
/* define ALIGNMENT to your processor/environment preferred alignment */ |
/* size. A value of 8 should work on all current processors, even */ |
/* 64-bits ones. */ |
#define ALIGNMENT 8 |
/* --------------- miscellaneous ----------------------------------- */ |
/*********************************************************************/ |
/* The number of extensions available. Don't change this value */ |
/* except if you add new extensions to the engine. */ |
#define TT_MAX_EXTENSIONS 8 |
/* --------------- automatic setup -- don't touch ------------------ */ |
/*********************************************************************/ |
/* If HAVE_TT_TEXT is defined we don't provide a default typedef for */ |
/* defining TT_Text. */ |
#ifndef HAVE_TT_TEXT |
#define HAVE_TT_TEXT |
typedef char TT_Text; |
#endif |
/*********************************************************************/ |
/* We define NULL in case it's not defined yet. The default */ |
/* location is stdlib.h. */ |
#ifdef HAVE_STDLIB_H |
#include <stdlib.h> |
#endif |
/*********************************************************************/ |
/* Some systems can't use vfprintf for error messages on stderr; if */ |
/* HAVE_PRINT_FUNCTION is defined, the Print macro must be supplied */ |
/* externally (having the same parameters). */ |
/* */ |
/* This is only used by the "ttdebug" component, which should be */ |
/* linked to the engine only in debug mode. */ |
#if defined( DEBUG_LEVEL_TRACE ) || defined( DEBUG_LEVEL_ERROR ) |
#ifndef HAVE_PRINT_FUNCTION |
#define Print( format, ap ) vfprintf( stderr, (format), (ap) ) |
#endif |
#endif |
/********************************************************************/ |
/* */ |
/* I have added the ability to compile the library into a single */ |
/* object file. This gets rids of all the external symbols defined */ |
/* in each component interface, and de-pollutes the name-space. */ |
/* */ |
/* I use two macros, namely LOCAL_FUNC and LOCAL_DEF, which only */ |
/* apply to functions that are internal to the engine, and */ |
/* should never be seen or linked by a client application. */ |
/* */ |
/* LOCAL_DEF used in header (.h) files, to define a function */ |
/* that will be seen by other components. This */ |
/* translates to "extern" in normal mode, and to */ |
/* "static" in single-object mode. */ |
/* */ |
/* LOCAL_FUNC used in implementation (.c) files, just before */ |
/* the function body. This translates to nothing */ |
/* in normal mode, and to "static" in single-object */ |
/* mode. */ |
/* */ |
/* Getting rid of un-necessary symbols makes the "ttcommon" */ |
/* renaming macros hack unnecessary. Moreover, the stripped */ |
/* single object file (freetype.o) is 52 Kb, instead of the */ |
/* previous 57 Kb (size of all combined .o files), and gives */ |
/* a better idea of the engine's real code size. */ |
/* */ |
/* It is called a "MAKE_OPTION" because the macro must be */ |
/* defined in the Makefile, rather than this one. It allows */ |
/* any developer to quickly switch from one mode to the other */ |
/* without messing with "ttconfig.h" each time. */ |
/* */ |
#ifndef TT_MAKE_OPTION_SINGLE_OBJECT |
#define LOCAL_FUNC /* void */ |
#define LOCAL_DEF extern |
#else |
#define LOCAL_FUNC static |
#define LOCAL_DEF static |
#endif |
/*************************************************************************/ |
/* Define EXPORT_DEF and EXPORT_FUNC as needed to build e.g. a DLL. All */ |
/* variables and functions visible from outside have these prefixes. */ |
#ifndef EXPORT_DEF |
#define EXPORT_DEF extern |
#endif |
#ifndef EXPORT_FUNC |
#define EXPORT_FUNC /* void */ |
#endif |
/* -------------- internal (developer) configuration toggles ------------ */ |
#undef TT_STATIC_INTERPRETER |
/* Do not undefine this configuration macro. It is now a default that */ |
/* must be kept in all release builds. */ |
#undef TT_STATIC_RASTER |
/* Define this if you want to generate a static raster. This makes */ |
/* a non re-entrant version of the scan-line converter, which is */ |
/* about 10% faster and 50% bigger than an indirect one! */ |
#endif /* TTCONFIG_H */ |
/* END */ |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/programs/develop/libraries/menuetlibc/include/freetype/ttdebug.h |
---|
0,0 → 1,170 |
/******************************************************************* |
* |
* ttdebug.h |
* |
* Debugging and Logging component (specification) |
* |
* Copyright 1996-1999 by |
* David Turner, Robert Wilhelm, and Werner Lemberg. |
* |
* This file is part of the FreeType project, and may only be used |
* modified and distributed under the terms of the FreeType project |
* license, LICENSE.TXT. By continuing to use, modify, or distribute |
* this file you indicate that you have read the license and |
* understand and accept it fully. |
* |
* |
* This component contains various macros and functions used to |
* ease the debugging of the FreeType engine. Its main purpose |
* is in assertion checking, tracing, and error detection. |
* |
* There are now three debugging modes: |
* |
* - trace mode: |
* |
* Error and trace messages are sent to the log file |
* (which can be the standard error output). Define |
* DEBUG_LEVEL_TRACE to enable this mode. |
* |
* - error mode: |
* |
* Only error messages are generated. Define |
* DEBUG_LEVEL_ERROR to enable this mode. |
* |
* - release mode: |
* |
* Error messages are neither sent nor generated. The code is |
* free from any debugging parts. |
* |
******************************************************************/ |
#ifndef TTDEBUG_H |
#define TTDEBUG_H |
#include "ttconfig.h" |
#include "tttypes.h" |
#ifdef __cplusplus |
extern "C" { |
#endif |
#if defined( DEBUG_LEVEL_TRACE ) |
typedef enum Trace_Component_ |
{ |
trace_any = 0, |
trace_api, |
trace_interp, |
trace_load, |
trace_gload, |
trace_memory, |
trace_file, |
trace_mutex, |
trace_cache, |
trace_calc, |
trace_cmap, |
trace_extend, |
trace_objs, |
trace_raster, |
trace_bitmap, |
trace_max |
} Trace_Component; |
/* Here we define an array to hold the trace levels per component. */ |
/* Since it is globally defined, all array members are set to 0. */ |
/* You should set the values in this array either in your program */ |
/* or with your debugger. */ |
/* */ |
/* Currently, up to eight levels (PTRACE0-PTRACE7, see below) are */ |
/* used in some parts of the engine. */ |
/* */ |
/* For example, to have all tracing messages in the raster */ |
/* component, say */ |
/* */ |
/* #define DEBUG_LEVEL_TRACE */ |
/* #include "ttdebug.h" */ |
/* */ |
/* ... */ |
/* set_tt_trace_levels( trace_raster, 7 ) */ |
/* */ |
/* in your code before initializing the FreeType engine. */ |
/* */ |
/* Maybe it is better to define DEBUG_LEVEL_TRACE in ttconfig.h... */ |
extern char tt_trace_levels[trace_max]; |
/* IMPORTANT: */ |
/* */ |
/* Each component must define the macro TT_COMPONENT */ |
/* to a valid Trace_Component value before using any */ |
/* PTRACEx macro. */ |
/* */ |
#define PTRACE( level, varformat ) \ |
if ( tt_trace_levels[TT_COMPONENT] >= level ) TT_Message##varformat |
#elif defined( DEBUG_LEVEL_ERROR ) |
#define PTRACE( level, varformat ) /* nothing */ |
#else /* RELEASE MODE */ |
#define TT_Assert( condition, action ) /* nothing */ |
#define PTRACE( level, varformat ) /* nothing */ |
#define PERROR( varformat ) /* nothing */ |
#define PANIC( varformat ) /* nothing */ |
#endif |
/************************************************************************/ |
/* */ |
/* Define macros and fuctions that are common to the debug and trace */ |
/* modes. */ |
/* */ |
#if defined( DEBUG_LEVEL_TRACE ) || defined( DEBUG_LEVEL_ERROR ) |
#define TT_Assert( condition, action ) if ( !(condition) ) ( action ) |
void TT_Message( const String* fmt, ... ); |
void TT_Panic ( const String* fmt, ... ); |
/* print a message and exit */ |
const String* Cur_U_Line( void* exec ); |
#define PERROR( varformat ) TT_Message##varformat |
#define PANIC( varformat ) TT_Panic##varformat |
#endif |
#if defined( DEBUG_LEVEL_TRACE ) |
void set_tt_trace_levels( int index, char value ); |
#endif |
#define PTRACE0( varformat ) PTRACE( 0, varformat ) |
#define PTRACE1( varformat ) PTRACE( 1, varformat ) |
#define PTRACE2( varformat ) PTRACE( 2, varformat ) |
#define PTRACE3( varformat ) PTRACE( 3, varformat ) |
#define PTRACE4( varformat ) PTRACE( 4, varformat ) |
#define PTRACE5( varformat ) PTRACE( 5, varformat ) |
#define PTRACE6( varformat ) PTRACE( 6, varformat ) |
#define PTRACE7( varformat ) PTRACE( 7, varformat ) |
#ifdef __cplusplus |
} |
#endif |
#endif /* TTDEBUG_H */ |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/programs/develop/libraries/menuetlibc/include/freetype/ttengine.h |
---|
0,0 → 1,115 |
/******************************************************************* |
* |
* ttengine.h 1.1 |
* |
* Engine instance structure definition. |
* |
* Copyright 1996-1999 by |
* David Turner, Robert Wilhelm, and Werner Lemberg. |
* |
* This file is part of the FreeType project, and may only be used |
* modified and distributed under the terms of the FreeType project |
* license, LICENSE.TXT. By continuing to use, modify, or distribute |
* this file you indicate that you have read the license and |
* understand and accept it fully. |
* |
* New in 1.1 : |
* |
* - added the 'raster_lock' mutex field to synchronize |
* scan-line conversion in thread-safe and re-entrant builds. |
* |
******************************************************************/ |
#ifndef TTENGINE_H |
#define TTENGINE_H |
#include "tttypes.h" |
#include "ttconfig.h" |
#include "freetype.h" |
#include "ttmutex.h" |
#ifdef __cplusplus |
extern "C" { |
#endif |
/********************************************************************/ |
/* */ |
/* The freetype engine instance structure. */ |
/* */ |
/* This structure holds all the data that is necessary to run */ |
/* one instance of the freetype engine. It is needed to get a */ |
/* completely re-entrant version of the library. */ |
/* */ |
/* The goal is to move _all_ component-specific variables, either */ |
/* static or global in the structure; the component initializers */ |
/* and finalizers will all be called with the address of a valid */ |
/* TEngine_Instance. */ |
/* */ |
/********************************************************************/ |
struct TEngine_Instance_ |
{ |
TMutex lock; /* engine lock */ |
void* list_free_elements; |
void* objs_face_class; /* the face cache class */ |
void* objs_instance_class; /* the instance cache class */ |
void* objs_execution_class; /* the context cache class */ |
void* objs_glyph_class; /* the glyph cache class */ |
void* objs_face_cache; /* these caches are used to track */ |
void* objs_exec_cache; /* the current face and execution */ |
/* context objects */ |
void* file_component; /* ttfile implementation dependent */ |
TMutex raster_lock; /* mutex for this engine's render pool */ |
void* raster_component; /* ttraster implementation depedent */ |
Byte raster_palette[5]; /* gray-levels palette for anti-aliasing */ |
void* extension_component; /* extensions dependent */ |
#if 0 |
TT_Glyph_Loader_Callback glCallback; /* glyph loader callback, if any */ |
#endif |
}; |
/* NOTE : The raster's lock is only acquired by the Render_Glyph and */ |
/* Render_Gray_Glyph functions, which always release it on exit */ |
/* They do not lock the engine mutex. This means you shouldn't */ |
/* be concerned about deadlocks between the two mutexes, as these */ |
/* should never appear.. */ |
typedef struct TEngine_Instance_ TEngine_Instance; |
typedef TEngine_Instance* PEngine_Instance; |
#ifdef TT_CONFIG_OPTION_THREAD_SAFE /* for re-entrant builds */ |
#define ENGINE_ARG TEngine_Instance* _engine |
#define ENGINE_ARGS TEngine_Instance* _engine, |
#define ENGINE_VAR _engine |
#define ENGINE_VARS _engine, |
#define ENGINE _engine |
#else /* for thread-safe builds */ |
#define ENGINE_ARG /* void */ |
#define ENGINE_ARGS |
#define ENGINE_VAR |
#define ENGINE_VARS |
#endif /* TT_CONFIG_OPTION_THREAD_SAFE */ |
#ifdef __cplusplus |
} |
#endif |
#endif /* TTENGINE_H */ |
/* END */ |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/programs/develop/libraries/menuetlibc/include/freetype/ttextend.h |
---|
0,0 → 1,168 |
/******************************************************************* |
* |
* ttextend.h 2.0 |
* |
* Extensions Interface. |
* |
* Copyright 1996-1999 by |
* David Turner, Robert Wilhelm, and Werner Lemberg. |
* |
* This file is part of the FreeType project, and may only be used |
* modified and distributed under the terms of the FreeType project |
* license, LICENSE.TXT. By continuing to use, modify, or distribute |
* this file you indicate that you have read the license and |
* understand and accept it fully. |
* |
* This is an updated version of the extension component, now |
* located in the main library's source directory. It allows |
* the dynamic registration/use of various face object extensions |
* through a simple API. |
* |
******************************************************************/ |
#ifndef TTEXTEND_H |
#define TTEXTEND_H |
#include "ttconfig.h" |
#include "tttypes.h" |
#include "ttobjs.h" |
#ifdef __cplusplus |
extern "C" { |
#endif |
/* The extensions don't need to be integrated at compile time into */ |
/* the engine, only at link time. */ |
/* When a new face object is created, the face constructor calls */ |
/* the extension constructor with the following arguments: */ |
/* */ |
/* ext : typeless pointer to the face's extension block. */ |
/* Its size is the one given at registration time */ |
/* in the extension class's 'size' field. */ |
/* */ |
/* face : the parent face object. Note that the extension */ |
/* constructor is called when the face object is */ |
/* built. */ |
typedef TT_Error TExt_Constructor( void* ext, PFace face ); |
/* When a face object is destroyed, the face destructor calls */ |
/* the extension destructor with the following arguments. */ |
/* */ |
/* ext : typeless pointer to the face's extension block. */ |
/* Its size is the one given at registration time */ |
/* in the extension class's 'size' field. */ |
/* */ |
/* face : the parent face object. Note that the extension */ |
/* destructor is called before the actual face object */ |
/* is destroyed. */ |
typedef TT_Error TExt_Destructor ( void* ext, PFace face ); |
typedef TExt_Constructor* PExt_Constructor; |
typedef TExt_Destructor* PExt_Destructor; |
struct TExtension_Class_ |
{ |
Long id; /* extension id */ |
Long size; /* size in bytes of extension record */ |
PExt_Constructor build; /* the extension's class constructor */ |
PExt_Destructor destroy; /* the extension's class destructor */ |
Long offset; /* offset of ext. record in face obj */ |
/* (set by the engine) */ |
}; |
typedef struct TExtension_Class_ TExtension_Class; |
typedef TExtension_Class* PExtension_Class; |
#define Build_Extension_ID( a, b, c, d ) \ |
( ((ULong)(a) << 24) | \ |
((ULong)(b) << 16) | \ |
((ULong)(c) << 8 ) | \ |
(ULong)(d) ) |
/* A note regarding extensions and the single-object compilation */ |
/* mode : */ |
/* */ |
/* When the engine is compiled as a single object file, extensions */ |
/* must remain linkable *after* compile time. In order to do this, */ |
/* we need to export the functions that an extension may need. */ |
/* Fortunately, we can limit ourselves to : */ |
/* */ |
/* o TT_Register_Extension (previously called Extension_Register) */ |
/* which is to be called by each extension on within */ |
/* it TT_Init_XXXX_Extension initializer. */ |
/* */ |
/* o File and frame access functions. Fortunately, these already */ |
/* have their names prefixed by "TT_", so no change was needed */ |
/* except replacing the LOCAL_DEF keyword with EXPORT_DEF */ |
/* */ |
/* o Memory access functions, i.e. TT_Alloc and TT_Free. Again, */ |
/* the change is minimal */ |
/* */ |
/* o the table-lookup function : TT_LookUp_Table, formerly known */ |
/* as Load_TrueType_Table in ttload.c. */ |
/* */ |
/* */ |
/* Other than that, an extension should be able to #include all */ |
/* relevant header files to get access to internal types, but */ |
/* should not call engine internal functions.. */ |
/* */ |
/* If there is a need for a specific internal function call, let */ |
/* me known to see if we need to export it by default.. */ |
/* - DavidT */ |
/* */ |
/* Register a new extension. Called by extension */ |
/* service initializers. */ |
EXPORT_DEF |
TT_Error TT_Register_Extension( PEngine_Instance engine, |
Long id, |
Long size, |
PExt_Constructor create, |
PExt_Destructor destroy ); |
#ifdef TT_CONFIG_OPTION_EXTEND_ENGINE |
/* Initialize the extension component */ |
LOCAL_DEF |
TT_Error TTExtend_Init( PEngine_Instance engine ); |
/* Finalize the extension component */ |
LOCAL_DEF |
TT_Error TTExtend_Done( PEngine_Instance engine ); |
/* Create an extension within a face object. Called by the */ |
/* face object constructor. */ |
LOCAL_DEF |
TT_Error Extension_Create( PFace face ); |
/* Destroy all extensions within a face object. Called by the */ |
/* face object destructor. */ |
LOCAL_DEF |
TT_Error Extension_Destroy( PFace face ); |
#endif |
/* Query an extension block by extension_ID. Called by extension */ |
/* service routines. */ |
EXPORT_DEF |
TT_Error TT_Extension_Get( PFace face, |
Long extension_id, |
void** extension_block ); |
#ifdef __cplusplus |
} |
#endif |
#endif /* TTEXTEND_H */ |
/* END */ |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/programs/develop/libraries/menuetlibc/include/freetype/ttfile.h |
---|
0,0 → 1,271 |
/******************************************************************* |
* |
* ttfile.h 1.3 |
* |
* File I/O Component (specification). |
* |
* Copyright 1996-1999 by |
* David Turner, Robert Wilhelm, and Werner Lemberg. |
* |
* This file is part of the FreeType project, and may only be used |
* modified and distributed under the terms of the FreeType project |
* license, LICENSE.TXT. By continuing to use, modify, or distribute |
* this file you indicate that you have read the license and |
* understand and accept it fully. |
* |
* Changes between 1.3 and 1.2: |
* |
* - all functions report error values now |
* |
* - the stream semantics have also changed |
* |
* Changes between 1.2 and 1.1: |
* |
* - added macros to support re-entrant builds |
* |
* - added the TT_Duplicate_File function to duplicate streams |
* (re-entrant builds only) |
* |
******************************************************************/ |
#ifndef TTFILE_H |
#define TTFILE_H |
#include "ttconfig.h" |
#include "freetype.h" |
#include "ttengine.h" |
#include "ttdebug.h" |
#ifdef __cplusplus |
extern "C" { |
#endif |
/* Initialize file component */ |
LOCAL_DEF |
TT_Error TTFile_Init( PEngine_Instance engine ); |
/* Done with file component */ |
LOCAL_DEF |
TT_Error TTFile_Done( PEngine_Instance engine ); |
/**********************************************************************/ |
/* */ |
/* Stream functions. */ |
/* */ |
/**********************************************************************/ |
/* Open a file and return a stream handle for it. */ |
/* Should only be used for a new face object's main stream. */ |
LOCAL_DEF |
TT_Error TT_Open_Stream( const TT_Text* name, |
TT_Stream* stream ); |
/* Closes, then discards, a stream when it's no longer needed. */ |
/* Should only be used for a stream opend with TT_Open_Stream(). */ |
LOCAL_DEF |
TT_Error TT_Close_Stream( TT_Stream* stream ); |
/* Informs the component that we're going to use the file */ |
/* opened in 'org_stream', and report errors to the 'error' */ |
/* variable. */ |
/* in non re-entrant builds, 'org_stream' is simply copied */ |
/* to 'stream'. Otherwise, the latter is a duplicate handle */ |
/* for the file opened with 'org_stream' */ |
EXPORT_DEF |
TT_Error TT_Use_Stream( TT_Stream org_stream, |
TT_Stream* stream ); |
/* Informs the component that we don't need to perform file */ |
/* operations on the stream 'stream' anymore. This must be */ |
/* used with streams "opened" with TT_Use_Stream() only! */ |
/* in re-entrant builds, this will really discard the stream */ |
EXPORT_DEF |
TT_Error TT_Done_Stream( TT_Stream* stream ); |
/* Closes the stream's file handle to release system resources */ |
/* The function TT_Use_Stream automatically re-activates a */ |
/* flushed stream when it uses one */ |
EXPORT_DEF |
TT_Error TT_Flush_Stream( TT_Stream* stream ); |
/* The macros STREAM_ARGS and STREAM_ARG let us build a thread-safe */ |
/* or re-entrant implementation depending on a single configuration */ |
/*define. */ |
#ifdef TT_CONFIG_OPTION_THREAD_SAFE |
#define STREAM_ARGS TT_Stream stream, |
#define STREAM_ARG TT_Stream stream |
#else |
#define STREAM_ARGS /* void */ |
#define STREAM_ARG void |
#endif /* TT_CONFIG_OPTION_THREAD_SAFE */ |
/****************************************************************/ |
/* */ |
/* File Functions. */ |
/* */ |
/* The following functions perform file operations on the */ |
/* currently 'used' stream. In thread-safe builds, only one */ |
/* stream can be used at a time. Synchronisation is performed */ |
/* through the Use_Stream()/Done_Stream() functions. */ |
/* */ |
/****************************************************************/ |
/* Read 'count' bytes from file into 'buffer' */ |
EXPORT_DEF |
TT_Error TT_Read_File( STREAM_ARGS void* buffer, |
Long count ); |
/* Seek file cursor to a given position */ |
EXPORT_DEF |
TT_Error TT_Seek_File( STREAM_ARGS Long position ); |
/* Skip the next 'distance' bytes in file */ |
EXPORT_DEF |
TT_Error TT_Skip_File( STREAM_ARGS Long distance ); |
/* Read the 'count' bytes at 'position' into 'buffer' */ |
EXPORT_DEF |
TT_Error TT_Read_At_File( STREAM_ARGS Long position, |
void* buffer, |
Long count ); |
/* Return current file position */ |
EXPORT_DEF |
Long TT_File_Pos( STREAM_ARG ); |
/* Return length of a given stream, even if it is flushed */ |
EXPORT_DEF |
Long TT_Stream_Size( TT_Stream stream ); |
/********************************************************************/ |
/* */ |
/* Frame operations. */ |
/* */ |
/* For a comprehensive explanation of frames, please refer to the */ |
/* documentation files. */ |
/* */ |
/********************************************************************/ |
/* Frame type declaration.*/ |
struct TFileFrame_ |
{ |
Byte* address; /* frame buffer */ |
Byte* cursor; /* current cursor position in frame */ |
Long size; /* frame size */ |
}; |
typedef struct TFileFrame_ TFileFrame; |
EXPORT_DEF |
const TFileFrame TT_Null_FileFrame; |
/* The macro ZERO_Frame is used to define and init a frame. */ |
/* It is important to have a default frame of { NULL, NULL, 0 } */ |
/* before a call to TT_Access_Frame(). Otherwise, the call will */ |
/* fail with a TT_Err_Nested_Frame_Accesses error. */ |
#define ZERO_Frame( frame ) \ |
{ \ |
(frame).address = NULL; \ |
(frame).cursor = NULL; \ |
(frame).size = 0; \ |
} |
/* The macros FRAME_ARGS and FRAME_ARG let us build a thread-safe */ |
/* or re-entrant implementation depending on a single configuration */ |
/* define */ |
#ifdef TT_CONFIG_OPTION_THREAD_SAFE |
#define FRAME_ARGS TFileFrame* frame, |
#define FRAME_ARG TFileFrame* frame |
#else |
#define FRAME_ARGS /* void */ |
#define FRAME_ARG void |
#endif /* TT_CONFIG_OPTION_THREAD_SAFE */ |
/* Access the next 'size' bytes from current position. */ |
/* Fails if all bytes cannot be read/accessed. */ |
EXPORT_DEF |
TT_Error TT_Access_Frame( STREAM_ARGS FRAME_ARGS Long size ); |
/* Access the bytes located in the next 'size' bytes of the file. */ |
/* Doesn't fail if less than 'size' bytes are accessible (like */ |
/* at the end of the file). */ |
EXPORT_DEF |
TT_Error TT_Check_And_Access_Frame( STREAM_ARGS FRAME_ARGS Long size ); |
/* Forget frame */ |
EXPORT_DEF |
TT_Error TT_Forget_Frame( FRAME_ARG ); |
/* primitive routines for data accessing */ |
EXPORT_DEF |
Char TT_Get_Char ( FRAME_ARG ); |
EXPORT_DEF |
Short TT_Get_Short( FRAME_ARG ); |
EXPORT_DEF |
Long TT_Get_Long ( FRAME_ARG ); |
#ifdef TT_CONFIG_OPTION_THREAD_SAFE |
#define TT_Get_Byte( frame ) ( (Byte )TT_Get_Char ( frame ) ) |
#define TT_Get_UShort( frame ) ( (UShort)TT_Get_Short( frame ) ) |
#define TT_Get_ULong( frame ) ( (ULong )TT_Get_Long ( frame ) ) |
#else |
#define TT_Get_Byte() ( (Byte )TT_Get_Char () ) |
#define TT_Get_UShort() ( (UShort)TT_Get_Short() ) |
#define TT_Get_ULong() ( (ULong )TT_Get_Long () ) |
#endif /* TT_CONFIG_OPTION_THREAD_SAFE */ |
#ifdef __cplusplus |
} |
#endif |
#endif /* TTFILE_H */ |
/* END */ |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/programs/develop/libraries/menuetlibc/include/freetype/ttgload.h |
---|
0,0 → 1,51 |
/******************************************************************* |
* |
* ttgload.h 1.0 |
* |
* TrueType Glyph Loader. |
* |
* Copyright 1996-1999 by |
* David Turner, Robert Wilhelm, and Werner Lemberg. |
* |
* This file is part of the FreeType project, and may only be used |
* modified and distributed under the terms of the FreeType project |
* license, LICENSE.TXT. By continuing to use, modify, or distribute |
* this file you indicate that you have read the license and |
* understand and accept it fully. |
* |
******************************************************************/ |
#ifndef TTGLOAD_H |
#define TTGLOAD_H |
#include "ttconfig.h" |
#include "tttypes.h" |
#include "ttobjs.h" |
#ifdef __cplusplus |
extern "C" { |
#endif |
LOCAL_DEF |
void TT_Get_Metrics( TT_Horizontal_Header* header, |
UShort index, |
Short* bearing, |
UShort* advance ); |
LOCAL_DEF |
TT_Error Load_TrueType_Glyph( PInstance instance, |
PGlyph glyph, |
UShort glyph_index, |
UShort load_flags ); |
#ifdef __cplusplus |
} |
#endif |
#endif /* TTGLOAD_H */ |
/* END */ |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/programs/develop/libraries/menuetlibc/include/freetype/ttinterp.h |
---|
0,0 → 1,54 |
/******************************************************************* |
* |
* ttinterp.h 2.2 |
* |
* TrueType bytecode intepreter. |
* |
* Copyright 1996-1999 by |
* David Turner, Robert Wilhelm, and Werner Lemberg |
* |
* This file is part of the FreeType project, and may only be used |
* modified and distributed under the terms of the FreeType project |
* license, LICENSE.TXT. By continuing to use, modify, or distribute |
* this file you indicate that you have read the license and |
* understand and accept it fully. |
* |
* |
* Changes between 2.2 and 2.1: |
* |
* - a small bugfix in the Push opcodes |
* |
* Changes between 2.1 and 2.0: |
* |
* - created the TTExec component to take care of all execution |
* context management. The interpreter has now one single |
* function. |
* |
* - made some changes to support re-entrancy. The re-entrant |
* interpreter is smaller! |
* |
******************************************************************/ |
#ifndef TTINTERP_H |
#define TTINTERP_H |
#include "ttconfig.h" |
#include "ttobjs.h" |
#ifdef __cplusplus |
extern "C" { |
#endif |
/* Run instructions in current execution context */ |
LOCAL_DEF TT_Error RunIns( PExecution_Context exc ); |
#ifdef __cplusplus |
} |
#endif |
#endif /* TTINTERP_H */ |
/* END */ |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/programs/develop/libraries/menuetlibc/include/freetype/ttload.h |
---|
0,0 → 1,217 |
/******************************************************************* |
* |
* ttload.h 1.1 |
* |
* TrueType Tables Loader. |
* |
* Copyright 1996-1999 by |
* David Turner, Robert Wilhelm, and Werner Lemberg. |
* |
* This file is part of the FreeType project, and may only be used |
* modified and distributed under the terms of the FreeType project |
* license, LICENSE.TXT. By continuing to use, modify, or distribute |
* this file you indicate that you have read the license and |
* understand and accept it fully. |
* |
* |
* Changes between 1.1 and 1.0 : |
* |
* - add function Load_TrueType_Any used by TT_Get_Font_Data |
* |
******************************************************************/ |
#ifndef TTLOAD_H |
#define TTLOAD_H |
#include "ttconfig.h" |
#include "tttypes.h" |
#include "ttobjs.h" |
#ifdef __cplusplus |
extern "C" { |
#endif |
EXPORT_DEF |
Long TT_LookUp_Table( PFace face, ULong tag ); |
LOCAL_DEF TT_Error Load_TrueType_Directory ( PFace face, |
ULong faceIndex ); |
LOCAL_DEF TT_Error Load_TrueType_MaxProfile ( PFace face ); |
LOCAL_DEF TT_Error Load_TrueType_Gasp ( PFace face ); |
LOCAL_DEF TT_Error Load_TrueType_Header ( PFace face ); |
LOCAL_DEF TT_Error Load_TrueType_Locations ( PFace face ); |
LOCAL_DEF TT_Error Load_TrueType_Names ( PFace face ); |
LOCAL_DEF TT_Error Load_TrueType_CVT ( PFace face ); |
LOCAL_DEF TT_Error Load_TrueType_CMap ( PFace face ); |
LOCAL_DEF TT_Error Load_TrueType_Programs ( PFace face ); |
LOCAL_DEF TT_Error Load_TrueType_OS2 ( PFace face ); |
LOCAL_DEF TT_Error Load_TrueType_PostScript ( PFace face ); |
LOCAL_DEF TT_Error Load_TrueType_Hdmx ( PFace face ); |
LOCAL_DEF TT_Error Load_TrueType_Metrics_Header( PFace face, |
Bool vertical ); |
LOCAL_DEF TT_Error Load_TrueType_Any( PFace face, |
ULong tag, |
Long offset, |
void* buffer, |
Long* length ); |
LOCAL_DEF TT_Error Free_TrueType_Names( PFace face ); |
LOCAL_DEF TT_Error Free_TrueType_Hdmx ( PFace face ); |
/* The following macros are defined to simplify the writing of */ |
/* the various table and glyph loaders. */ |
/* For examples see the code in ttload.c, ttgload.c etc. */ |
#define USE_Stream( original, duplicate ) \ |
( (error = TT_Use_Stream( original, &duplicate )) != TT_Err_Ok ) |
#define DONE_Stream( _stream ) \ |
TT_Done_Stream( &_stream ) |
/* Define a file frame -- use it only when needed */ |
#define DEFINE_A_FRAME TFileFrame frame = TT_Null_FileFrame |
/* Define a stream -- use it only when needed */ |
#define DEFINE_A_STREAM TT_Stream stream |
#ifdef TT_CONFIG_OPTION_THREAD_SAFE /* re-entrant implementation */ |
/* The following macros define the necessary local */ |
/* variables used to access streams and frames. */ |
/* Define stream locals with frame */ |
#define DEFINE_STREAM_LOCALS \ |
TT_Error error; \ |
DEFINE_A_STREAM; \ |
DEFINE_A_FRAME |
/* Define stream locals without frame */ |
#define DEFINE_STREAM_LOCALS_WO_FRAME \ |
TT_Error error; \ |
DEFINE_A_STREAM |
/* Define locals with a predefined stream in reentrant mode -- see ttload.c */ |
#define DEFINE_LOAD_LOCALS( STREAM ) \ |
TT_Error error; \ |
DEFINE_A_STREAM = (STREAM); \ |
DEFINE_A_FRAME |
/* Define locals without frame with a predefined stream - see ttload.c */ |
#define DEFINE_LOAD_LOCALS_WO_FRAME( STREAM ) \ |
TT_Error error; \ |
DEFINE_A_STREAM = (STREAM) |
/* Define all locals necessary to access a font file */ |
#define DEFINE_ALL_LOCALS \ |
TT_Error error; \ |
DEFINE_A_STREAM; \ |
DEFINE_A_FRAME |
#define ACCESS_Frame( _size_ ) \ |
( (error = TT_Access_Frame( stream, \ |
&frame, \ |
(Long)(_size_) )) != TT_Err_Ok ) |
#define CHECK_ACCESS_Frame( _size_ ) \ |
( (error = TT_Check_And_Access_Frame( stream, \ |
&frame, \ |
(Long)(_size_) )) != TT_Err_Ok ) |
#define FORGET_Frame() \ |
( (void)TT_Forget_Frame( &frame ) ) |
#define GET_Byte() TT_Get_Byte ( &frame ) |
#define GET_Char() TT_Get_Char ( &frame ) |
#define GET_UShort() TT_Get_UShort( &frame ) |
#define GET_Short() TT_Get_Short ( &frame ) |
#define GET_Long() TT_Get_Long ( &frame ) |
#define GET_ULong() TT_Get_ULong ( &frame ) |
#define GET_Tag4() TT_Get_ULong ( &frame ) |
#define FILE_Pos() TT_File_Pos ( stream ) |
#define FILE_Seek( _position_ ) \ |
( (error = TT_Seek_File( stream, \ |
(Long)(_position_) )) != TT_Err_Ok ) |
#define FILE_Skip( _distance_ ) \ |
( (error = TT_Skip_File( stream, \ |
(Long)(_distance_) )) != TT_Err_Ok ) |
#define FILE_Read( buffer, count ) \ |
( (error = TT_Read_File ( stream, \ |
buffer, \ |
(Long)(count) )) != TT_Err_Ok ) |
#define FILE_Read_At( pos, buffer, count ) \ |
( (error = TT_Read_At_File( stream, \ |
(Long)(pos), \ |
buffer, \ |
(Long)(count) )) != TT_Err_Ok ) |
#else /* thread-safe implementation */ |
/* Define stream locals with frame -- nothing in thread-safe mode */ |
#define DEFINE_STREAM_LOCALS \ |
TT_Error error |
/* Define stream locals without frame -- nothing in thread-safe mode */ |
#define DEFINE_STREAM_LOCALS_WO_FRAME \ |
TT_Error error |
/* Define locals with a predefined stream in reentrant mode -- see ttload.c */ |
#define DEFINE_LOAD_LOCALS( STREAM ) \ |
TT_Error error |
/* Define locals without frame with a predefined stream - see ttload.c */ |
#define DEFINE_LOAD_LOCALS_WO_FRAME( STREAM ) \ |
TT_Error error |
/* Define all locals necessary to access a font file */ |
#define DEFINE_ALL_LOCALS \ |
TT_Error error; \ |
DEFINE_A_STREAM |
#define ACCESS_Frame( _size_ ) \ |
( (error = TT_Access_Frame( (Long)(_size_) )) != TT_Err_Ok ) |
#define CHECK_ACCESS_Frame( _size_ ) \ |
( (error = TT_Check_And_Access_Frame( (Long)(_size_) )) != TT_Err_Ok ) |
#define FORGET_Frame() \ |
( (void)TT_Forget_Frame() ) |
#define GET_Byte() TT_Get_Byte () |
#define GET_Char() TT_Get_Char () |
#define GET_UShort() TT_Get_UShort() |
#define GET_Short() TT_Get_Short () |
#define GET_Long() TT_Get_Long () |
#define GET_ULong() TT_Get_ULong () |
#define GET_Tag4() TT_Get_ULong () |
#define FILE_Pos() TT_File_Pos() |
#define FILE_Seek( _position_ ) \ |
( (error = TT_Seek_File( (Long)(_position_) )) != TT_Err_Ok ) |
#define FILE_Skip( _distance_ ) \ |
( (error = TT_Skip_File( (Long)(_distance_) )) != TT_Err_Ok ) |
#define FILE_Read( buffer, count ) \ |
( (error = TT_Read_File ( buffer, \ |
(Long)(count) )) != TT_Err_Ok ) |
#define FILE_Read_At( pos, buffer, count ) \ |
( (error = TT_Read_At_File( (Long)(pos), \ |
buffer, \ |
(Long)(count) )) != TT_Err_Ok ) |
#endif /* TT_CONFIG_OPTION_THREAD_SAFE */ |
#ifdef __cplusplus |
} |
#endif |
#endif /* TTLOAD_H */ |
/* END */ |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/programs/develop/libraries/menuetlibc/include/freetype/ttmemory.h |
---|
0,0 → 1,125 |
/******************************************************************* |
* |
* ttmemory.h 1.2 |
* |
* Memory management component (specification). |
* |
* Copyright 1996-1999 by |
* David Turner, Robert Wilhelm, and Werner Lemberg. |
* |
* This file is part of the FreeType project, and may only be used |
* modified and distributed under the terms of the FreeType project |
* license, LICENSE.TXT. By continuing to use, modify, or distribute |
* this file you indicate that you have read the license and |
* understand and accept it fully. |
* |
* Changes between 1.2 and 1.1: |
* |
* - the font pool is gone! All allocations are now performed |
* with malloc() and free(). |
* |
* - introduced the FREE() macro and the Free() function for |
* future use in destructors. |
* |
* - Init_FontPool() is now a macro to allow the compilation of |
* 'legacy' applications (all four test programs have been updated). |
* |
******************************************************************/ |
#ifndef TTMEMORY_H |
#define TTMEMORY_H |
#include "ttconfig.h" |
#include "tttypes.h" |
#include <string.h> |
#ifdef __cplusplus |
extern "C" { |
#endif |
#define MEM_Set( dest, byte, count ) memset( dest, byte, count ) |
#ifdef HAVE_MEMCPY |
#define MEM_Copy( dest, source, count ) memcpy( dest, source, count ) |
#else |
#define MEM_Copy( dest, source, count ) bcopy( source, dest, count ) |
#endif |
#ifdef HAVE_MEMMOVE |
#define MEM_Move( dest, source, count ) memmove( dest, source, count ) |
#else |
#define MEM_Move( dest, source, count ) bcopy( source, dest, count ) |
#endif |
#define MEM_Alloc( _pointer_, _size_ ) \ |
TT_Alloc( _size_, (void**)&(_pointer_) ) |
#define MEM_Realloc( _pointer_, _size_ ) \ |
TT_Realloc( _size_, (void**)&(_pointer_) ) |
#define ALLOC( _pointer_, _size_ ) \ |
( ( error = MEM_Alloc( _pointer_, _size_ ) ) != TT_Err_Ok ) |
#define ALLOC_ARRAY( _pointer_, _count_, _type_ ) \ |
( ( error = MEM_Alloc( _pointer_, \ |
(_count_) * sizeof ( _type_ ) ) ) != TT_Err_Ok ) |
#define REALLOC( _pointer_, _size_ ) \ |
( ( error = MEM_Realloc( _pointer_, _size_ ) ) != TT_Err_Ok ) |
#define REALLOC_ARRAY( _pointer_, _count_, _type_ ) \ |
( (error = MEM_Realloc( _pointer_, \ |
(_count_) * sizeof ( _type_ ) ) ) != TT_Err_Ok ) |
#define FREE( _pointer_ ) \ |
TT_Free( (void**)&(_pointer_) ) |
/* Allocate a block of memory of 'Size' bytes from the heap, and */ |
/* sets the pointer '*P' to its address. If 'Size' is 0, or in */ |
/* case of error, the pointer is always set to NULL. */ |
EXPORT_DEF |
TT_Error TT_Alloc( ULong Size, void** P ); |
#ifdef TT_CONFIG_OPTION_EXTEND_ENGINE |
/* Reallocates a block of memory pointed to by '*P' to 'Size' */ |
/* bytes from the heap, possibly changing '*P'. If 'Size' is 0, */ |
/* TT_Free() is called, if '*P' is NULL, TT_Alloc() is called. */ |
/* '*P' is freed (if it's non-NULL) in case of error. */ |
EXPORT_DEF |
TT_Error TT_Realloc( ULong Size, void** P ); |
#endif /* TT_CONFIG_OPTION_EXTEND_ENGINE */ |
/* Releases a block that was previously allocated through Alloc. */ |
/* Note that the function returns successfully when P or *P are */ |
/* already NULL. The pointer '*P' is set to NULL on exit in */ |
/* case of success. */ |
EXPORT_DEF |
TT_Error TT_Free( void** P ); |
/* For "legacy" applications, that should be re-coded. */ |
/* Note that this won't release the previously allocated font pool. */ |
#define Init_FontPool( x, y ) while( 0 ) { } |
LOCAL_DEF TT_Error TTMemory_Init( void ); |
LOCAL_DEF TT_Error TTMemory_Done( void ); |
#ifdef __cplusplus |
} |
#endif |
#endif /* TTMEMORY_H */ |
/* END */ |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/programs/develop/libraries/menuetlibc/include/freetype/ttmutex.h |
---|
0,0 → 1,59 |
/******************************************************************* |
* |
* ttmutex.h 1.0 |
* |
* Mutual exclusion object / dummy generic interface. |
* |
* Copyright 1996-1999 by |
* David Turner, Robert Wilhelm, and Werner Lemberg. |
* |
* This file is part of the FreeType project, and may only be used |
* modified and distributed under the terms of the FreeType project |
* license, LICENSE.TXT. By continuing to use, modify, or distribute |
* this file you indicate that you have read the license and |
* understand and accept it fully. |
* |
* Note: This file provides a generic interface. The implementation |
* to compile depends on your system and the type of |
* library you want to build (either singly-threaded, |
* thread-safe or re-entrant). |
* |
* Please read the technical documentation for more details. |
* |
******************************************************************/ |
#ifndef TTMUTEX_H |
#define TTMUTEX_H |
#include "ttconfig.h" |
typedef void* TMutex; /* typeless reference to a mutex */ |
#ifdef TT_CONFIG_OPTION_THREAD_SAFE /* thread-safe and re-entrant builds */ |
#define MUTEX_Create( mutex ) TT_Mutex_Create ( &(mutex) ) |
#define MUTEX_Destroy( mutex ) TT_Mutex_Delete ( &(mutex) ) |
#define MUTEX_Lock( mutex ) TT_Mutex_Lock ( &(mutex) ) |
#define MUTEX_Release( mutex ) TT_Mutex_Release( &(mutex) ) |
LOCAL_DEF void TT_Mutex_Create ( TMutex* mutex ); /* Create a new mutex */ |
LOCAL_DEF void TT_Mutex_Delete ( TMutex* mutex ); /* Delete a mutex */ |
LOCAL_DEF void TT_Mutex_Lock ( TMutex* mutex ); /* Lock a mutex. */ |
LOCAL_DEF void TT_Mutex_Release( TMutex* mutex ); /* Release a mutex */ |
#else /* for the single-thread build */ |
#define MUTEX_Create( mutex ) /* nothing */ |
#define MUTEX_Destroy( mutex ) /* nothing */ |
#define MUTEX_Lock( mutex ) /* nothing */ |
#define MUTEX_Release( mutex ) /* nothing */ |
/* No code will be generated for mutex operations */ |
#endif /* TT_CONFIG_OPTION_THREAD_SAFE */ |
#endif /* TTMUTEX_H */ |
/* END */ |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/programs/develop/libraries/menuetlibc/include/freetype/ttobjs.h |
---|
0,0 → 1,873 |
/******************************************************************* |
* |
* ttobjs.h 1.0 |
* |
* Objects definition unit. |
* |
* Copyright 1996-1999 by |
* David Turner, Robert Wilhelm, and Werner Lemberg. |
* |
* This file is part of the FreeType project, and may only be used |
* modified and distributed under the terms of the FreeType project |
* license, LICENSE.TXT. By continuing to use, modify, or distribute |
* this file you indicate that you have read the license and |
* understand and accept it fully. |
* |
******************************************************************/ |
#ifndef TTOBJS_H |
#define TTOBJS_H |
#include "ttconfig.h" |
#include "ttengine.h" |
#include "ttmutex.h" |
#include "ttcache.h" |
#include "tttables.h" |
#include "ttcmap.h" |
#ifdef __cplusplus |
extern "C" { |
#endif |
/* */ |
/* This file contains the definitions and methods of the four */ |
/* kinds of objects managed by the FreeType engine. These are: */ |
/* */ |
/* */ |
/* Face objects: */ |
/* */ |
/* There is always one face object per opened TrueType font */ |
/* file, and only one. The face object contains data that is */ |
/* independent of current transform/scaling/rotation and */ |
/* pointsize, or glyph index. This data is made of several */ |
/* critical tables that are loaded on face object creation. */ |
/* */ |
/* A face object tracks all active and recycled objects of */ |
/* the instance and execution context classes. Destroying a face */ |
/* object will automatically destroy all associated instances. */ |
/* */ |
/* */ |
/* Instance objects: */ |
/* */ |
/* An instance object always relates to a given face object, */ |
/* known as its 'parent' or 'owner', and contains only the */ |
/* data that is specific to one given pointsize/transform of */ |
/* the face. You can only create an instance from a face object. */ |
/* */ |
/* An instance's current transform/pointsize can be changed */ |
/* at any time using a single high-level API call, */ |
/* TT_Reset_Instance(). */ |
/* */ |
/* Execution Context objects: */ |
/* */ |
/* An execution context (or context in short) relates to a face. */ |
/* It contains the data and tables that are necessary to load */ |
/* and hint (i.e. execute the glyph instructions of) one glyph. */ |
/* A context is a transient object that is queried/created on */ |
/* the fly: client applications never deal with them directly. */ |
/* */ |
/* */ |
/* Glyph objects: */ |
/* */ |
/* A glyph object contains only the minimal glyph information */ |
/* needed to render one glyph correctly. This means that a glyph */ |
/* object really contains tables that are sized to hold the */ |
/* contents of _any_ glyph of a given face. A client application */ |
/* can usually create one glyph object for a given face, then use */ |
/* it for all subsequent loads. */ |
/* */ |
/* Here is an example of a client application : */ |
/* (NOTE: No error checking performed here!) */ |
/* */ |
/* */ |
/* TT_Face face; -- face handle */ |
/* TT_Instance ins1, ins2; -- two instance handles */ |
/* TT_Glyph glyph; -- glyph handle */ |
/* */ |
/* TT_Init_FreeType(); */ |
/* */ |
/* -- Initialize the engine. This must be done prior to _any_ */ |
/* operation. */ |
/* */ |
/* TT_Open_Face( "/some/face/name.ttf", &face ); */ |
/* */ |
/* -- create the face object. This call opens the font file */ |
/* */ |
/* TT_New_Instance( face, &ins1 ); */ |
/* TT_New_Instance( face, &ins2 ); */ |
/* */ |
/* TT_Set_Instance_PointSize( ins1, 8 ); */ |
/* TT_Set_Instance_PointSize( ins2, 12 ); */ |
/* */ |
/* -- create two distinct instances of the same face */ |
/* -- ins1 is pointsize 8 at resolution 96 dpi */ |
/* -- ins2 is pointsize 12 at resolution 96 dpi */ |
/* */ |
/* TT_New_Glyph( face, &glyph ); */ |
/* */ |
/* -- create a new glyph object which will receive the contents */ |
/* of any glyph of 'face' */ |
/* */ |
/* TT_Load_Glyph( ins1, glyph, 64, DEFAULT_GLYPH_LOAD ); */ |
/* */ |
/* -- load glyph indexed 64 at pointsize 8 in the 'glyph' object */ |
/* -- NOTE: This call will fail if the instance and the glyph */ |
/* do not relate to the same face object. */ |
/* */ |
/* TT_Get_Outline( glyph, &outline ); */ |
/* */ |
/* -- extract the glyph outline from the object and copies it */ |
/* to the 'outline' record */ |
/* */ |
/* TT_Get_Metrics( glyph, &metrics ); */ |
/* */ |
/* -- extract the glyph metrics and put them into the 'metrics' */ |
/* record */ |
/* */ |
/* TT_Load_Glyph( ins2, glyph, 64, DEFAULT_GLYPH_LOAD ); */ |
/* */ |
/* -- load the same glyph at pointsize 12 in the 'glyph' object */ |
/* */ |
/* */ |
/* TT_Close_Face( &face ); */ |
/* */ |
/* -- destroy the face object. This will destroy 'ins1' and */ |
/* 'ins2'. However, the glyph object will still be available */ |
/* */ |
/* TT_Done_FreeType(); */ |
/* */ |
/* -- Finalize the engine. This will also destroy all pending */ |
/* glyph objects (here 'glyph'). */ |
struct TFace_; |
struct TInstance_; |
struct TExecution_Context_; |
struct TGlyph_; |
typedef struct TFace_ TFace; |
typedef TFace* PFace; |
typedef struct TInstance_ TInstance; |
typedef TInstance* PInstance; |
typedef struct TExecution_Context_ TExecution_Context; |
typedef TExecution_Context* PExecution_Context; |
typedef struct TGlyph_ TGlyph; |
typedef TGlyph* PGlyph; |
/*************************************************************/ |
/* */ |
/* ADDITIONAL SUBTABLES */ |
/* */ |
/* These tables are not precisely defined by the specs */ |
/* but their structures is implied by the TrueType font */ |
/* file layout. */ |
/* */ |
/*************************************************************/ |
/* Graphics State */ |
/* */ |
/* The Graphics State (GS) is managed by the */ |
/* instruction field, but does not come from */ |
/* the font file. Thus, we can use 'int's */ |
/* where needed. */ |
struct TGraphicsState_ |
{ |
UShort rp0; |
UShort rp1; |
UShort rp2; |
TT_UnitVector dualVector; |
TT_UnitVector projVector; |
TT_UnitVector freeVector; |
Long loop; |
TT_F26Dot6 minimum_distance; |
Int round_state; |
Bool auto_flip; |
TT_F26Dot6 control_value_cutin; |
TT_F26Dot6 single_width_cutin; |
TT_F26Dot6 single_width_value; |
Short delta_base; |
Short delta_shift; |
Byte instruct_control; |
Bool scan_control; |
Int scan_type; |
UShort gep0; |
UShort gep1; |
UShort gep2; |
}; |
typedef struct TGraphicsState_ TGraphicsState; |
LOCAL_DEF |
const TGraphicsState Default_GraphicsState; |
/*************************************************************/ |
/* */ |
/* EXECUTION SUBTABLES */ |
/* */ |
/* These sub-tables relate to instruction execution. */ |
/* */ |
/*************************************************************/ |
#define MAX_CODE_RANGES 3 |
/* There can only be 3 active code ranges at once: */ |
/* - the Font Program */ |
/* - the CVT Program */ |
/* - a glyph's instructions set */ |
#define TT_CodeRange_Font 1 |
#define TT_CodeRange_Cvt 2 |
#define TT_CodeRange_Glyph 3 |
struct TCodeRange_ |
{ |
PByte Base; |
ULong Size; |
}; |
typedef struct TCodeRange_ TCodeRange; |
typedef TCodeRange* PCodeRange; |
/* Defintion of a code range */ |
/* */ |
/* Code ranges can be resident to a glyph (i.e. the Font Program) */ |
/* while some others are volatile (Glyph instructions). */ |
/* Tracking the state and presence of code ranges allows function */ |
/* and instruction definitions within a code range to be forgotten */ |
/* when the range is discarded. */ |
typedef TCodeRange TCodeRangeTable[MAX_CODE_RANGES]; |
/* defines a function/instruction definition record */ |
struct TDefRecord_ |
{ |
Int Range; /* in which code range is it located ? */ |
ULong Start; /* where does it start ? */ |
Int Opc; /* function #, or instruction code */ |
Bool Active; /* is it active ? */ |
}; |
typedef struct TDefRecord_ TDefRecord; |
typedef TDefRecord* PDefRecord; |
typedef TDefRecord* PDefArray; |
/* defines a call record, used to manage function calls. */ |
struct TCallRecord_ |
{ |
Int Caller_Range; |
ULong Caller_IP; |
Long Cur_Count; |
ULong Cur_Restart; |
}; |
typedef struct TCallRecord_ TCallRecord; |
typedef TCallRecord* PCallRecord; |
typedef TCallRecord* PCallStack; /* defines a simple call stack */ |
/* This type defining a set of glyph points will be used to represent */ |
/* each zone (regular and twilight) during instructions decoding. */ |
struct TGlyph_Zone_ |
{ |
UShort n_points; /* number of points in zone */ |
Short n_contours; /* number of contours */ |
TT_Vector* org; /* original points coordinates */ |
TT_Vector* cur; /* current points coordinates */ |
Byte* touch; /* current touch flags */ |
UShort* contours; /* contour end points */ |
}; |
typedef struct TGlyph_Zone_ TGlyph_Zone; |
typedef TGlyph_Zone* PGlyph_Zone; |
#ifndef TT_STATIC_INTEPRETER /* indirect implementation */ |
#define EXEC_OPS PExecution_Context exc, |
#define EXEC_OP PExecution_Context exc |
#define EXEC_ARGS exc, |
#define EXEC_ARG exc |
#else /* static implementation */ |
#define EXEC_OPS /* void */ |
#define EXEC_OP /* void */ |
#define EXEC_ARGS /* void */ |
#define EXEC_ARG /* void */ |
#endif |
/* Rounding function, as used by the interpreter */ |
typedef TT_F26Dot6 (*TRound_Function)( EXEC_OPS TT_F26Dot6 distance, |
TT_F26Dot6 compensation ); |
/* Point displacement along the freedom vector routine, as */ |
/* used by the interpreter */ |
typedef void (*TMove_Function)( EXEC_OPS PGlyph_Zone zone, |
UShort point, |
TT_F26Dot6 distance ); |
/* Distance projection along one of the proj. vectors, as used */ |
/* by the interpreter */ |
typedef TT_F26Dot6 (*TProject_Function)( EXEC_OPS TT_Vector* v1, |
TT_Vector* v2 ); |
/* reading a cvt value. Take care of non-square pixels when needed */ |
typedef TT_F26Dot6 (*TGet_CVT_Function)( EXEC_OPS ULong index ); |
/* setting or moving a cvt value. Take care of non-square pixels */ |
/* when needed */ |
typedef void (*TSet_CVT_Function)( EXEC_OPS ULong index, |
TT_F26Dot6 value ); |
/* subglyph transformation record */ |
struct TTransform_ |
{ |
TT_Fixed xx, xy; /* transformation */ |
TT_Fixed yx, yy; /* matrix */ |
TT_F26Dot6 ox, oy; /* offsets */ |
}; |
typedef struct TTransform_ TTransform; |
typedef TTransform* PTransform; |
/* subglyph loading record. Used to load composite components */ |
struct TSubglyph_Record_ |
{ |
Long index; /* subglyph index; initialized with -1 */ |
Bool is_scaled; /* is the subglyph scaled? */ |
Bool is_hinted; /* should it be hinted? */ |
Bool preserve_pps; /* preserve phantom points? */ |
Long file_offset; |
TT_Big_Glyph_Metrics metrics; |
TGlyph_Zone zone; |
Long arg1; /* first argument */ |
Long arg2; /* second argument */ |
UShort element_flag; /* current load element flag */ |
TTransform transform; /* transform */ |
TT_Vector pp1, pp2; /* phantom points */ |
}; |
typedef struct TSubglyph_Record_ TSubglyph_Record; |
typedef TSubglyph_Record* PSubglyph_Record; |
typedef TSubglyph_Record* PSubglyph_Stack; |
/* A note regarding non-squared pixels: */ |
/* */ |
/* (This text will probably go into some docs at some time, for */ |
/* now, it is kept there to explain some definitions in the */ |
/* TIns_Metrics record). */ |
/* */ |
/* The CVT is a one-dimensional array containing values that */ |
/* control certain important characteristics in a font, like */ |
/* the height of all capitals, all lowercase letter, default */ |
/* spacing or stem width/height. */ |
/* */ |
/* These values are found in FUnits in the font file, and must be */ |
/* scaled to pixel coordinates before being used by the CVT and */ |
/* glyph programs. Unfortunately, when using distinct x and y */ |
/* resolutions (or distinct x and y pointsizes), there are two */ |
/* possible scalings. */ |
/* */ |
/* A first try was to implement a 'lazy' scheme where all values */ |
/* were scaled when first used. However, while some values are always */ |
/* used in the same direction, and some other are used in many */ |
/* different circumstances and orientations. */ |
/* */ |
/* I have found a simpler way to do the same, and it even seems to */ |
/* work in most of the cases: */ |
/* */ |
/* - all CVT values are scaled to the maximum ppem size */ |
/* */ |
/* - when performing a read or write in the CVT, a ratio factor */ |
/* is used to perform adequate scaling. Example: */ |
/* */ |
/* x_ppem = 14 */ |
/* y_ppem = 10 */ |
/* */ |
/* we choose ppem = x_ppem = 14 as the CVT scaling size. All cvt */ |
/* entries are scaled to it. */ |
/* */ |
/* x_ratio = 1.0 */ |
/* y_ratio = y_ppem/ppem (< 1.0) */ |
/* */ |
/* we compute the current ratio like: */ |
/* */ |
/* - if projVector is horizontal, */ |
/* ratio = x_ratio = 1.0 */ |
/* - if projVector is vertical, */ |
/* ratop = y_ratio */ |
/* - else, */ |
/* ratio = sqrt((proj.x*x_ratio)^2 + (proj.y*y_ratio)^2) */ |
/* */ |
/* reading a cvt value returns ratio * cvt[index] */ |
/* writing a cvt value in pixels cvt[index] / ratio */ |
/* */ |
/* the current ppem is simply ratio * ppem */ |
/* */ |
/* metrics used by the instance and execution context objects */ |
struct TIns_Metrics_ |
{ |
TT_F26Dot6 pointSize; /* point size. 1 point = 1/72 inch. */ |
UShort x_resolution; /* device horizontal resolution in dpi. */ |
UShort y_resolution; /* device vertical resolution in dpi. */ |
UShort x_ppem; /* horizontal pixels per EM */ |
UShort y_ppem; /* vertical pixels per EM */ |
Long x_scale1; |
Long x_scale2; /* used to scale FUnits to fractional pixels */ |
Long y_scale1; |
Long y_scale2; /* used to scale FUnits to fractional pixels */ |
/* for non-square pixels */ |
Long x_ratio; |
Long y_ratio; |
UShort ppem; /* maximum ppem size */ |
Long ratio; /* current ratio */ |
Long scale1; |
Long scale2; /* scale for ppem */ |
TT_F26Dot6 compensations[4]; /* device-specific compensations */ |
Bool rotated; /* `is the glyph rotated?'-flag */ |
Bool stretched; /* `is the glyph stretched?'-flag */ |
}; |
typedef struct TIns_Metrics_ TIns_Metrics; |
typedef TIns_Metrics* PIns_Metrics; |
/***********************************************************************/ |
/* */ |
/* FreeType Face Type */ |
/* */ |
/***********************************************************************/ |
struct TFace_ |
{ |
/* parent engine instance for the face object */ |
PEngine_Instance engine; |
/* i/o stream */ |
TT_Stream stream; |
/* used only by the threaded builds of the library */ |
TMutex lock; |
/* TrueType collection header, if any was found */ |
TTTCHeader ttcHeader; |
/* maximum profile table, as found in the TrueType file */ |
TMaxProfile maxProfile; |
/* Note: */ |
/* it seems that some maximum values cannot be */ |
/* taken directly from this table, but rather by */ |
/* combining some of its fields; e.g. the max. */ |
/* number of points seems to be given by */ |
/* MAX( maxPoints, maxCompositePoints ) */ |
/* */ |
/* For this reason, we define later our own */ |
/* max values that are used to load and allocate */ |
/* further tables. */ |
TT_Header fontHeader; /* the font header, as */ |
/* found in the TTF file */ |
TT_Horizontal_Header horizontalHeader; /* the horizontal header */ |
Bool verticalInfo; /* True when vertical table */ |
TT_Vertical_Header verticalHeader; /* is present in the font */ |
TT_OS2 os2; /* 'OS/2' table */ |
TT_Postscript postscript; /* 'Post' table */ |
TT_Hdmx hdmx; /* 'Hdmx' table */ |
TName_Table nameTable; /* name table */ |
TGasp gasp; /* the 'gasp' table */ |
/* The directory of TrueType tables for this typeface */ |
UShort numTables; |
PTableDirEntry dirTables; |
/* The directory of character mappings table for */ |
/* this typeface */ |
UShort numCMaps; |
PCMapTable cMaps; |
/* The glyph locations table */ |
ULong numLocations; /* UShort is not enough */ |
#ifndef TT_HUGE_PTR |
PStorage glyphLocations; |
#else |
Storage TT_HUGE_PTR * glyphLocations; |
#endif |
/* NOTE : The "hmtx" is now part of the horizontal header */ |
/* the font program, if any */ |
ULong fontPgmSize; |
PByte fontProgram; |
/* the cvt program, if any */ |
ULong cvtPgmSize; |
PByte cvtProgram; |
/* the original, unscaled, control value table */ |
ULong cvtSize; |
PShort cvt; |
/* The following values _must_ be set by the */ |
/* maximum profile loader */ |
UShort numGlyphs; /* the face's total number of glyphs */ |
UShort maxPoints; /* max glyph points number, simple and composite */ |
UShort maxContours; /* max glyph contours numb, simple and composite */ |
UShort maxComponents; /* max components in a composite glyph */ |
/* the following are object caches to track active */ |
/* and recycled instances and execution contexts */ |
/* objects. See 'ttcache.h' */ |
TCache instances; /* current instances for this face */ |
TCache glyphs; /* current glyph containers for this face */ |
/* A typeless pointer to the face object extensions defined */ |
/* in the 'ttextend.*' files. */ |
void* extension; |
Int n_extensions; /* number of extensions */ |
/* Use extensions to provide additional capabilities to the */ |
/* engine. Read the developer's guide in the documentation */ |
/* directory to know how to do that. */ |
/* a generic pointer for client use - see TT_Set/Get_Face_Pointer */ |
void* generic; |
}; |
/***********************************************************************/ |
/* */ |
/* FreeType Instance Type */ |
/* */ |
/***********************************************************************/ |
struct TInstance_ |
{ |
PFace owner; /* face object */ |
Bool valid; |
TIns_Metrics metrics; |
UShort numFDefs; /* number of function definitions */ |
UShort maxFDefs; |
PDefArray FDefs; /* table of FDefs entries */ |
UShort numIDefs; /* number of instruction definitions */ |
UShort maxIDefs; |
PDefArray IDefs; /* table of IDefs entries */ |
Int maxFunc; /* maximum function definition id */ |
Int maxIns; /* maximum instruction definition id */ |
TCodeRangeTable codeRangeTable; |
TGraphicsState GS; |
TGraphicsState default_GS; |
ULong cvtSize; /* the scaled control value table */ |
PLong cvt; |
ULong storeSize; /* The storage area is now part of the */ |
PLong storage; /* instance */ |
TGlyph_Zone twilight; /* The instance's twilight zone */ |
/* debugging variables */ |
/* When using the debugger, we must keep the */ |
/* execution context tied to the instance */ |
/* object rather than asking it on demand */ |
Bool debug; |
PExecution_Context context; |
/* a generic pointer for client use - see TT_Set/Get_Instance_Pointer */ |
void* generic; |
}; |
/***********************************************************************/ |
/* */ |
/* FreeType Execution Context Type */ |
/* */ |
/***********************************************************************/ |
struct TExecution_Context_ |
{ |
PFace face; |
PInstance instance; |
/* instructions state */ |
TT_Error error; /* last execution error */ |
Long top; /* top of exec. stack */ |
ULong stackSize; /* size of exec. stack */ |
PStorage stack; /* current exec. stack */ |
Long args; |
ULong new_top; /* new top after exec. */ |
TGlyph_Zone zp0, /* zone records */ |
zp1, |
zp2, |
pts, |
twilight; |
TIns_Metrics metrics; /* instance metrics */ |
TGraphicsState GS; /* current graphics state */ |
Int curRange; /* current code range number */ |
PByte code; /* current code range */ |
ULong IP; /* current instruction pointer */ |
ULong codeSize; /* size of current range */ |
Byte opcode; /* current opcode */ |
Int length; /* length of current opcode */ |
Bool step_ins; /* true if the interpreter must */ |
/* increment IP after ins. exec */ |
ULong cvtSize; |
PLong cvt; |
ULong glyphSize; /* glyph instructions buffer size */ |
PByte glyphIns; /* glyph instructions buffer */ |
UShort numFDefs; /* number of function defs */ |
UShort maxFDefs; /* maximum number of function defs */ |
PDefRecord FDefs; /* table of FDefs entries */ |
UShort numIDefs; /* number of instruction defs */ |
UShort maxIDefs; /* maximum number of instruction defs */ |
PDefRecord IDefs; /* table of IDefs entries */ |
Int maxFunc; |
Int maxIns; |
Int callTop, /* top of call stack during execution */ |
callSize; /* size of call stack */ |
PCallStack callStack; /* call stack */ |
UShort maxPoints; /* capacity of this context's "pts" */ |
UShort maxContours; /* record, expressed in points and */ |
/* contours.. */ |
TCodeRangeTable codeRangeTable; /* table of valid coderanges */ |
/* useful for the debugger */ |
ULong storeSize; /* size of current storage */ |
PLong storage; /* storage area */ |
TT_F26Dot6 period; /* values used for the */ |
TT_F26Dot6 phase; /* 'SuperRounding' */ |
TT_F26Dot6 threshold; |
/* this seems to be unused */ |
#if 0 |
Int cur_ppem; /* ppem along the current proj vector */ |
#endif |
Long scale1; /* scaling values along the current */ |
Long scale2; /* projection vector too.. */ |
Bool cached_metrics; /* the ppem is computed lazily. used */ |
/* to trigger computation when needed */ |
Bool instruction_trap; /* If True, the interpreter will */ |
/* exit after each instruction */ |
TGraphicsState default_GS; /* graphics state resulting from */ |
/* the prep program */ |
Bool is_composite; /* ture if the glyph is composite */ |
Bool pedantic_hinting; /* if true, read and write array */ |
/* bounds faults halt the hinting */ |
/* latest interpreter additions */ |
Long F_dot_P; /* dot product of freedom and projection */ |
/* vectors */ |
TRound_Function func_round; /* current rounding function */ |
TProject_Function func_project, /* current projection function */ |
func_dualproj, /* current dual proj. function */ |
func_freeProj; /* current freedom proj. func */ |
TMove_Function func_move; /* current point move function */ |
TGet_CVT_Function func_read_cvt; /* read a cvt entry */ |
TSet_CVT_Function func_write_cvt; /* write a cvt entry (in pixels) */ |
TSet_CVT_Function func_move_cvt; /* incr a cvt entry (in pixels) */ |
ULong loadSize; |
PSubglyph_Stack loadStack; /* loading subglyph stack */ |
}; |
/***********************************************************************/ |
/* */ |
/* FreeType Glyph Object Type */ |
/* */ |
/***********************************************************************/ |
struct TGlyph_ |
{ |
PFace face; |
TT_Big_Glyph_Metrics metrics; |
TT_Outline outline; |
}; |
/* The following type is used to load a font from a collection. */ |
/* See Face_Create in ttobjs.c */ |
struct TFont_Input_ |
{ |
TT_Stream stream; /* input stream */ |
ULong fontIndex; /* index of font in collection */ |
PEngine_Instance engine; /* parent engine instance */ |
}; |
typedef struct TFont_Input_ TFont_Input; |
/********************************************************************/ |
/* */ |
/* Code Range Functions */ |
/* */ |
/********************************************************************/ |
/* Goto a specified coderange */ |
LOCAL_DEF |
TT_Error Goto_CodeRange( PExecution_Context exec, |
Int range, |
ULong IP ); |
#if 0 |
/* Return a pointer to a given coderange record. */ |
/* Used only by the debugger. */ |
LOCAL_DEF |
PCodeRange Get_CodeRange( PExecution_Context exec, |
Int range ); |
#endif |
/* Set a given code range properties */ |
LOCAL_DEF |
TT_Error Set_CodeRange( PExecution_Context exec, |
Int range, |
void* base, |
ULong length ); |
/* Clear a given coderange */ |
LOCAL_DEF |
TT_Error Clear_CodeRange( PExecution_Context exec, Int range ); |
LOCAL_DEF |
PExecution_Context New_Context( PFace face ); |
LOCAL_DEF |
TT_Error Done_Context( PExecution_Context exec ); |
LOCAL_DEF |
TT_Error Context_Load( PExecution_Context exec, |
PFace face, |
PInstance ins ); |
LOCAL_DEF |
TT_Error Context_Save( PExecution_Context exec, |
PInstance ins ); |
LOCAL_DEF |
TT_Error Context_Run( PExecution_Context exec, |
Bool debug ); |
LOCAL_DEF |
TT_Error Instance_Init( PInstance ins ); |
LOCAL_DEF |
TT_Error Instance_Reset( PInstance ins ); |
/********************************************************************/ |
/* */ |
/* Handy scaling functions */ |
/* */ |
/********************************************************************/ |
LOCAL_DEF TT_Pos Scale_X( PIns_Metrics metrics, TT_Pos x ); |
LOCAL_DEF TT_Pos Scale_Y( PIns_Metrics metrics, TT_Pos y ); |
/********************************************************************/ |
/* */ |
/* Component Initializer/Finalizer */ |
/* */ |
/* Called from 'freetype.c' */ |
/* The component must create and register the face, instance and */ |
/* execution context cache classes before any object can be */ |
/* managed. */ |
/* */ |
/********************************************************************/ |
LOCAL_DEF TT_Error TTObjs_Init( PEngine_Instance engine ); |
LOCAL_DEF TT_Error TTObjs_Done( PEngine_Instance engine ); |
#ifdef __cplusplus |
} |
#endif |
#endif /* TTOBJS_H */ |
/* END */ |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/programs/develop/libraries/menuetlibc/include/freetype/ttraster.h |
---|
0,0 → 1,127 |
/******************************************************************* |
* |
* ttraster.h v 1.4 |
* |
* The FreeType glyph rasterizer. |
* |
* Copyright 1996-1999 by |
* David Turner, Robert Wilhelm, and Werner Lemberg |
* |
* This file is part of the FreeType project, and may only be used |
* modified and distributed under the terms of the FreeType project |
* license, LICENSE.TXT. By continuing to use, modify, or distribute |
* this file you indicate that you have read the license and |
* understand and accept it fully. |
* |
* NOTES: |
* |
* This version supports the following: |
* |
* - direct grayscaling |
* - sub-banding |
* - drop-out modes 4 and 5 |
* - second pass for complete drop-out control (bitmap only) |
* - variable precision |
* |
* |
* Changes between 1.4 and 1.3: |
* |
* Mainly performance tunings: |
* |
* - Line_Down() and Bezier_Down() now use the functions Line_Up() |
* and Bezier_Up() to do their work. |
* - optimized Split_Bezier() |
* - optimized linked lists used during sweeps |
* |
* Changes between 1.2 and 1.3: |
* |
* - made the engine optionaly re-entrant. Saves a lot |
* of code for a moderate performance hit. |
* |
******************************************************************/ |
#ifndef TTRASTER_H |
#define TTRASTER_H |
#include "ttconfig.h" |
#include "freetype.h" /* for TT_Outline */ |
#include "ttengine.h" |
#ifdef __cplusplus |
extern "C" { |
#endif |
/* We provide two different builds of the scan-line converter */ |
/* The static build uses global variables and isn't */ |
/* re-entrant. */ |
/* The indirect build is re-entrant but accesses all variables */ |
/* indirectly. */ |
/* */ |
/* As a consequence, the indirect build is about 10% slower */ |
/* than the static one on a _Pentium_ (this could get worse */ |
/* on older processors), but the code size is reduced by */ |
/* more than 30% ! */ |
/* */ |
/* The indirect build is now the default, defined in */ |
/* ttconfig.h. Be careful if you experiment with this. */ |
/* Note also that, though its code can be re-entrant, the */ |
/* component is always used in thread-safe mode. This is */ |
/* simply due to the fact that we want to use a single */ |
/* render pool (of 64 Kb), and not to waste memory. */ |
#ifdef TT_STATIC_RASTER |
#define RAS_ARGS /* void */ |
#define RAS_ARG /* void */ |
#define RAS_VARS /* void */ |
#define RAS_VAR /* void */ |
#else |
#define RAS_ARGS TRaster_Instance* raster, |
#define RAS_ARG TRaster_Instance* raster |
#define RAS_VARS raster, |
#define RAS_VAR raster |
#endif |
struct TRaster_Instance_; |
typedef struct TRaster_Instance_ TRaster_Instance; |
/* Render one glyph in the target bitmap, using drop-out control */ |
/* mode 'scan'. */ |
LOCAL_DEF |
TT_Error Render_Glyph( RAS_ARGS TT_Outline* glyph, |
TT_Raster_Map* target ); |
#ifdef TT_CONFIG_OPTION_GRAY_SCALING |
/* Render one gray-level glyph in the target pixmap. */ |
/* Palette points to an array of 5 colors used for the rendering. */ |
/* Use NULL to reuse the last palette. Default is VGA graylevels. */ |
LOCAL_DEF |
TT_Error Render_Gray_Glyph( RAS_ARGS TT_Outline* glyph, |
TT_Raster_Map* target, |
Byte* palette ); |
#endif |
/* Initialize rasterizer */ |
LOCAL_DEF |
TT_Error TTRaster_Init( PEngine_Instance engine ); |
/* Finalize it */ |
LOCAL_DEF |
TT_Error TTRaster_Done( PEngine_Instance engine ); |
#ifdef __cplusplus |
} |
#endif |
#endif /* TTRASTER_H */ |
/* END */ |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/programs/develop/libraries/menuetlibc/include/freetype/tttables.h |
---|
0,0 → 1,215 |
/******************************************************************* |
* |
* tttables.h 1.1 |
* |
* TrueType Tables structures and handling (specification). |
* |
* Copyright 1996-1999 by |
* David Turner, Robert Wilhelm, and Werner Lemberg. |
* |
* This file is part of the FreeType project, and may only be used |
* modified and distributed under the terms of the FreeType project |
* license, LICENSE.TXT. By continuing to use, modify, or distribute |
* this file you indicate that you have read the license and |
* understand and accept it fully. |
* |
******************************************************************/ |
#ifndef TTTABLES_H |
#define TTTABLES_H |
#include "ttconfig.h" |
#include "tttypes.h" |
#ifdef __cplusplus |
extern "C" { |
#endif |
/***********************************************************************/ |
/* */ |
/* TrueType Table Types */ |
/* */ |
/***********************************************************************/ |
/* TrueType Collection Header */ |
struct TTTCHeader_ |
{ |
ULong Tag; |
TT_Fixed version; |
ULong DirCount; |
PULong TableDirectory; |
}; |
typedef struct TTTCHeader_ TTTCHeader; |
typedef TTTCHeader* PTTCHeader; |
/* TrueType Table Directory type */ |
struct TTableDir_ |
{ |
TT_Fixed version; /* should be 0x10000 */ |
UShort numTables; /* number of tables */ |
UShort searchRange; /* These parameters are only used */ |
UShort entrySelector; /* for a dichotomy search in the */ |
UShort rangeShift; /* directory. We ignore them. */ |
}; |
typedef struct TTableDir_ TTableDir; |
typedef TTableDir* PTableDir; |
/* The 'TableDir' is followed by 'numTables' TableDirEntries */ |
struct TTableDirEntry_ |
{ |
ULong Tag; /* table type */ |
ULong CheckSum; /* table checksum */ |
ULong Offset; /* table file offset */ |
ULong Length; /* table length */ |
}; |
typedef struct TTableDirEntry_ TTableDirEntry; |
typedef TTableDirEntry* PTableDirEntry; |
/* 'cmap' tables */ |
struct TCMapDir_ |
{ |
UShort tableVersionNumber; |
UShort numCMaps; |
}; |
typedef struct TCMapDir_ TCMapDir; |
typedef TCMapDir* PCMapDir; |
struct TCMapDirEntry_ |
{ |
UShort platformID; |
UShort platformEncodingID; |
Long offset; |
}; |
typedef struct TCMapDirEntry_ TCMapDirEntry; |
typedef TCMapDirEntry* PCMapDirEntries; |
/* 'maxp' Maximum Profiles table */ |
struct TMaxProfile_ |
{ |
TT_Fixed version; |
UShort numGlyphs, |
maxPoints, |
maxContours, |
maxCompositePoints, |
maxCompositeContours, |
maxZones, |
maxTwilightPoints, |
maxStorage, |
maxFunctionDefs, |
maxInstructionDefs, |
maxStackElements, |
maxSizeOfInstructions, |
maxComponentElements, |
maxComponentDepth; |
}; |
typedef struct TMaxProfile_ TMaxProfile; |
typedef TMaxProfile* PMaxProfile; |
/* table "gasp" */ |
#define GASP_GRIDFIT 0x01 |
#define GASP_DOGRAY 0x02 |
struct GaspRange_ |
{ |
UShort maxPPEM; |
UShort gaspFlag; |
}; |
typedef struct GaspRange_ GaspRange; |
struct TGasp_ |
{ |
UShort version; |
UShort numRanges; |
GaspRange* gaspRanges; |
}; |
typedef struct TGasp_ TGasp; |
/* table "head" - now defined in freetype.h */ |
/* table "hhea" - now defined in freetype.h */ |
/* tables "HMTX" and "VMTX" */ |
struct TLongMetrics_ |
{ |
UShort advance; |
Short bearing; |
}; |
typedef struct TLongMetrics_ TLongMetrics, *PLongMetrics; |
typedef Short TShortMetrics, *PShortMetrics; |
/* 'loca' location table type */ |
struct TLoca_ |
{ |
UShort Size; |
PStorage Table; |
}; |
typedef struct TLoca_ TLoca; |
/* table "name" */ |
struct TNameRec_ |
{ |
UShort platformID; |
UShort encodingID; |
UShort languageID; |
UShort nameID; |
UShort stringLength; |
UShort stringOffset; |
/* this last field is not defined in the spec */ |
/* but used by the FreeType engine */ |
PByte string; |
}; |
typedef struct TNameRec_ TNameRec; |
struct TName_Table_ |
{ |
UShort format; |
UShort numNameRecords; |
UShort storageOffset; |
TNameRec* names; |
PByte storage; |
}; |
typedef struct TName_Table_ TName_Table; |
#ifdef __cplusplus |
} |
#endif |
#endif /* TTTABLES_H */ |
/* END */ |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/programs/develop/libraries/menuetlibc/include/freetype/tttags.h |
---|
0,0 → 1,61 |
/******************************************************************* |
* |
* tttags.h |
* |
* tags for TrueType tables (specification only). |
* |
* Copyright 1996-1999 by |
* David Turner, Robert Wilhelm, and Werner Lemberg. |
* |
* This file is part of the FreeType project, and may only be used |
* modified and distributed under the terms of the FreeType project |
* license, LICENSE.TXT. By continuing to use, modify, or distribute |
* this file you indicate that you have read the license and |
* understand and accept it fully. |
* |
******************************************************************/ |
#ifndef TTAGS_H |
#define TTAGS_H |
#include "ttconfig.h" |
#include "freetype.h" /* for MAKE_TT_TAG() */ |
#define TTAG_BASE MAKE_TT_TAG( 'B', 'A', 'S', 'E' ) |
#define TTAG_bloc MAKE_TT_TAG( 'b', 'l', 'o', 'c' ) |
#define TTAG_bdat MAKE_TT_TAG( 'b', 'd', 'a', 't' ) |
#define TTAG_cmap MAKE_TT_TAG( 'c', 'm', 'a', 'p' ) |
#define TTAG_cvt MAKE_TT_TAG( 'c', 'v', 't', ' ' ) |
#define TTAG_EBDT MAKE_TT_TAG( 'E', 'B', 'D', 'T' ) |
#define TTAG_EBLC MAKE_TT_TAG( 'E', 'B', 'L', 'C' ) |
#define TTAG_EBSC MAKE_TT_TAG( 'E', 'B', 'S', 'C' ) |
#define TTAG_fpgm MAKE_TT_TAG( 'f', 'p', 'g', 'm' ) |
#define TTAG_gasp MAKE_TT_TAG( 'g', 'a', 's', 'p' ) |
#define TTAG_glyf MAKE_TT_TAG( 'g', 'l', 'y', 'f' ) |
#define TTAG_GDEF MAKE_TT_TAG( 'G', 'D', 'E', 'F' ) |
#define TTAG_GPOS MAKE_TT_TAG( 'G', 'P', 'O', 'S' ) |
#define TTAG_GSUB MAKE_TT_TAG( 'G', 'S', 'U', 'B' ) |
#define TTAG_hdmx MAKE_TT_TAG( 'h', 'd', 'm', 'x' ) |
#define TTAG_head MAKE_TT_TAG( 'h', 'e', 'a', 'd' ) |
#define TTAG_hhea MAKE_TT_TAG( 'h', 'h', 'e', 'a' ) |
#define TTAG_hmtx MAKE_TT_TAG( 'h', 'm', 't', 'x' ) |
#define TTAG_JSTF MAKE_TT_TAG( 'J', 'S', 'T', 'F' ) |
#define TTAG_kern MAKE_TT_TAG( 'k', 'e', 'r', 'n' ) |
#define TTAG_loca MAKE_TT_TAG( 'l', 'o', 'c', 'a' ) |
#define TTAG_LTSH MAKE_TT_TAG( 'L', 'T', 'S', 'H' ) |
#define TTAG_maxp MAKE_TT_TAG( 'm', 'a', 'x', 'p' ) |
#define TTAG_name MAKE_TT_TAG( 'n', 'a', 'm', 'e' ) |
#define TTAG_OS2 MAKE_TT_TAG( 'O', 'S', '/', '2' ) |
#define TTAG_PCLT MAKE_TT_TAG( 'P', 'C', 'L', 'T' ) |
#define TTAG_post MAKE_TT_TAG( 'p', 'o', 's', 't' ) |
#define TTAG_prep MAKE_TT_TAG( 'p', 'r', 'e', 'p' ) |
#define TTAG_ttc MAKE_TT_TAG( 't', 't', 'c', ' ' ) |
#define TTAG_ttcf MAKE_TT_TAG( 't', 't', 'c', 'f' ) |
#define TTAG_VDMX MAKE_TT_TAG( 'V', 'D', 'M', 'X' ) |
#define TTAG_vhea MAKE_TT_TAG( 'v', 'h', 'e', 'a' ) |
#define TTAG_vmtx MAKE_TT_TAG( 'v', 'm', 't', 'x' ) |
#endif /* TTAGS_H */ |
/* END */ |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/programs/develop/libraries/menuetlibc/include/freetype/tttypes.h |
---|
0,0 → 1,150 |
/******************************************************************* |
* |
* tttypes.h |
* |
* Freetype engine's common types specification |
* (this spec has no associated body). |
* |
* Copyright 1996-1999 by |
* David Turner, Robert Wilhelm, and Werner Lemberg. |
* |
* This file is part of the FreeType project, and may only be used |
* modified and distributed under the terms of the FreeType project |
* license, LICENSE.TXT. By continuing to use, modify, or distribute |
* this file you indicate that you have read the license and |
* understand and accept it fully. |
* |
* NOTE: |
* |
* All these declarations are library internals, and *not* part |
* of the high-level interface. See also 'freetype.h'. |
* |
******************************************************************/ |
#ifndef TTTYPES_H |
#define TTTYPES_H |
#include "ttconfig.h" |
#include "freetype.h" |
#ifdef __MACTYPES__ |
#error "<MacTypes.h> have been included, and this prevents the proper\ |
compilation of this library. Please remove the precompiled headers." |
#endif |
typedef char String; |
typedef signed char Char; |
typedef unsigned char Byte; |
typedef unsigned short UShort; |
typedef signed short Short; |
typedef unsigned long ULong; |
typedef signed long Long; |
typedef TT_Int32 Fixed; |
typedef int Int; |
/* Simple access types: pointers and tables */ |
typedef Byte* PByte; |
typedef UShort* PUShort; |
typedef Short* PShort; |
typedef ULong* PULong; |
typedef Long* PLong; |
typedef Fixed* PFixed; |
typedef Int* PInt; |
typedef void* Pointer; |
typedef TT_F26Dot6* PCoordinates; |
typedef unsigned char* PTouchTable; |
#ifndef Bool |
typedef int Bool; /* No boolean type in C */ |
#endif |
#ifndef TRUE |
#define TRUE 1 |
#endif |
#ifndef FALSE |
#define FALSE 0 |
#endif |
#ifndef NULL |
#define NULL (void*)0 |
#endif |
typedef Long Storage; |
typedef Storage* PStorage; |
/* Rounding mode constants */ |
#define TT_Round_Off 5 |
#define TT_Round_To_Half_Grid 0 |
#define TT_Round_To_Grid 1 |
#define TT_Round_To_Double_Grid 2 |
#define TT_Round_Up_To_Grid 4 |
#define TT_Round_Down_To_Grid 3 |
#define TT_Round_Super 6 |
#define TT_Round_Super_45 7 |
/* Touch flag masks */ |
#define TT_Flag_On_Curve 1 |
#define TT_Flag_Touched_X 2 |
#define TT_Flag_Touched_Y 4 |
#define TT_Flag_Touched_Both 6 |
/* Error management constants :) */ |
#define SUCCESS 0 |
#define FAILURE -1 |
/* The min and max functions missing in C. As usual, be careful not to */ |
/* write things like MIN( a++, b++ ) to avoid side effects. */ |
#ifndef MIN |
#define MIN( a, b ) ( (a) < (b) ? (a) : (b) ) |
#endif |
#ifndef MAX |
#define MAX( a, b ) ( (a) > (b) ? (a) : (b) ) |
#endif |
#ifndef ABS |
#define ABS( a ) ( (a) < 0 ? -(a) : (a) ) |
#endif |
/* conversion macros for the handles defined in freetype.h */ |
#define HANDLE_Val( handle ) ((handle).z) |
#define HANDLE_Engine( handle ) ((PEngine_Instance)HANDLE_Val( handle )) |
#define HANDLE_Face( handle ) ((PFace)HANDLE_Val( handle )) |
#define HANDLE_Instance( handle ) ((PInstance)HANDLE_Val( handle )) |
/* HANDLE_Stream( handle ) must be defined in ttfile.c */ |
#define HANDLE_Glyph( handle ) ((PGlyph)HANDLE_Val( handle )) |
#define HANDLE_CharMap( handle ) ((PCMapTable)HANDLE_Val( handle )) |
#define HANDLE_Set( handle, val ) ((handle).z = (void*)(val)) |
#endif /* TTTYPES_H */ |
/* END */ |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |