Upgrade to 2.1.4

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4057 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
DarkWyrm
2003-07-24 18:46:44 +00:00
parent 57dd76be4d
commit f5a286efe2
72 changed files with 526 additions and 367 deletions
@@ -373,6 +373,17 @@
#define FT_GZIP_H <freetype/ftgzip.h> #define FT_GZIP_H <freetype/ftgzip.h>
/*************************************************************************/
/* */
/* @macro: */
/* FT_WINFONTS_H */
/* */
/* @description: */
/* A macro used in #include statements to name the file containing */
/* the definitions of an API to support Windows .FNT files */
/* */
#define FT_WINFONTS_H <freetype/ftwinfnt.h>
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* @macro: */ /* @macro: */
@@ -469,6 +469,25 @@ FT_BEGIN_HEADER
/* */ /* */
/*
* the FT_CONFIG_OPTION_CHESTER_XXXX macros are used to toggle some recent
* improvements to the auto-hinter contributed by David Chester. They will
* most likely disappear completely in the next release. For now, you should
* always keep them defined
*
*/
#define FT_CONFIG_OPTION_CHESTER_HINTS
#ifdef FT_CONFIG_OPTION_CHESTER_HINTS
# define FT_CONFIG_CHESTER_SMALL_F
# define FT_CONFIG_CHESTER_ASCENDER
# define FT_CONFIG_CHESTER_SERIF
# define FT_CONFIG_CHESTER_STEM
# define FT_CONFIG_CHESTER_BLUE_SCALE
#endif /* FT_CONFIG_OPTION_CHESTER_HINTS */
FT_END_HEADER FT_END_HEADER
+17 -11
View File
@@ -35,7 +35,7 @@
/* */ /* */
#define FREETYPE_MAJOR 2 #define FREETYPE_MAJOR 2
#define FREETYPE_MINOR 1 #define FREETYPE_MINOR 1
#define FREETYPE_PATCH 3 #define FREETYPE_PATCH 4
#include <ft2build.h> #include <ft2build.h>
@@ -1105,8 +1105,6 @@ FT_BEGIN_HEADER
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* FreeType base size metrics */
/* */
/* <Struct> */ /* <Struct> */
/* FT_Size_Metrics */ /* FT_Size_Metrics */
/* */ /* */
@@ -1135,7 +1133,7 @@ FT_BEGIN_HEADER
/* pixels. Always positive. */ /* pixels. Always positive. */
/* */ /* */
/* descender :: The descender, expressed in 26.6 fixed point */ /* descender :: The descender, expressed in 26.6 fixed point */
/* pixels. Always positive. */ /* pixels. Always negative. */
/* */ /* */
/* height :: The text height, expressed in 26.6 fixed point */ /* height :: The text height, expressed in 26.6 fixed point */
/* pixels. Always positive. */ /* pixels. Always positive. */
@@ -1494,6 +1492,16 @@ FT_BEGIN_HEADER
/* */ /* */
/* FT_OPEN_PARAMS :: Use the `num_params' & `params' field. */ /* FT_OPEN_PARAMS :: Use the `num_params' & `params' field. */
/* */ /* */
/* ft_open_memory :: deprecated. use @FT_OPEN_MEMORY instead */
/* */
/* ft_open_stream :: deprecated. use @FT_OPEN_STREAM instead */
/* */
/* ft_open_pathname :: deprecated. use @FT_OPEN_PATHNAME instead */
/* */
/* ft_open_driver :: deprecated, use @FT_OPEN_DRIVER instead */
/* */
/* ft_open_params :: deprecated, use @FT_OPEN_PARAMS instead */
/* */
/* <Note> */ /* <Note> */
/* The `FT_OPEN_MEMORY', `FT_OPEN_STREAM', and `FT_OPEN_PATHNAME' */ /* The `FT_OPEN_MEMORY', `FT_OPEN_STREAM', and `FT_OPEN_PATHNAME' */
/* flags are mutually exclusive. */ /* flags are mutually exclusive. */
@@ -1508,11 +1516,11 @@ FT_BEGIN_HEADER
} FT_Open_Flags; } FT_Open_Flags;
#define FT_OPEN_MEMORY FT_OPEN_MEMORY #define ft_open_memory FT_OPEN_MEMORY /* deprecated */
#define FT_OPEN_STREAM FT_OPEN_STREAM #define ft_open_stream FT_OPEN_STREAM /* deprecated */
#define FT_OPEN_PATHNAME FT_OPEN_PATHNAME #define ft_open_pathname FT_OPEN_PATHNAME /* deprecated */
#define FT_OPEN_DRIVER FT_OPEN_DRIVER #define ft_open_driver FT_OPEN_DRIVER /* deprecated */
#define FT_OPEN_PARAMS FT_OPEN_PARAMS #define ft_open_params FT_OPEN_PARAMS /* deprecated */
/*************************************************************************/ /*************************************************************************/
@@ -2151,7 +2159,6 @@ FT_BEGIN_HEADER
#define FT_LOAD_TARGET_MONO FT_LOAD_TARGET_( FT_RENDER_MODE_MONO ) #define FT_LOAD_TARGET_MONO FT_LOAD_TARGET_( FT_RENDER_MODE_MONO )
#define FT_LOAD_TARGET_LCD FT_LOAD_TARGET_( FT_RENDER_MODE_LCD ) #define FT_LOAD_TARGET_LCD FT_LOAD_TARGET_( FT_RENDER_MODE_LCD )
#define FT_LOAD_TARGET_LCD_V FT_LOAD_TARGET_( FT_RENDER_MODE_LCD_V ) #define FT_LOAD_TARGET_LCD_V FT_LOAD_TARGET_( FT_RENDER_MODE_LCD_V )
#define FT_LOAD_TARGET_SMOOTH FT_LOAD_TARGET_( FT_RENDER_MODE_SMOOTH )
#define FT_LOAD_DEFAULT 0x0 #define FT_LOAD_DEFAULT 0x0
@@ -2240,7 +2247,6 @@ FT_BEGIN_HEADER
FT_RENDER_MODE_MONO, FT_RENDER_MODE_MONO,
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD,
FT_RENDER_MODE_LCD_V, FT_RENDER_MODE_LCD_V,
FT_RENDER_MODE_SMOOTH,
FT_RENDER_MODE_MAX FT_RENDER_MODE_MAX
+98
View File
@@ -43,6 +43,73 @@ FT_BEGIN_HEADER
/*************************************************************************/ /*************************************************************************/
/**********************************************************************
*
* @enum:
* FT_PropertyType
*
* @description:
* list of BDF property types
*
* @values:
* BDF_PROPERTY_TYPE_NONE ::
* value 0 is used to indicate a missing property
*
* BDF_PROPERTY_TYPE_ATOM ::
* property is a string atom
*
* BDF_PROPERTY_TYPE_INTEGER ::
* property is a 32-bit signed integer
*
* BDF_PROPERTY_TYPE_CARDINAL ::
* property is a 32-bit unsigned integer
*/
typedef enum
{
BDF_PROPERTY_TYPE_NONE = 0,
BDF_PROPERTY_TYPE_ATOM = 1,
BDF_PROPERTY_TYPE_INTEGER = 2,
BDF_PROPERTY_TYPE_CARDINAL = 3
} BDF_PropertyType;
/**********************************************************************
*
* @type: BDF_Property
*
* @description:
* handle to a @BDF_PropertyRec structure used to model a given
* BDF/PCF property
*/
typedef struct BDF_PropertyRec_* BDF_Property;
/**********************************************************************
*
* @struct: BDF_PropertyRec
*
* @description:
* models a given BDF/PCF property
*
* @note:
* type :: property type
* u.atom :: atom string, when type is @BDF_PROPERTY_TYPE_ATOM
* u.integer :: signed integer, when type is @BDF_PROPERTY_TYPE_INTEGER
* u.cardinal :: unsigned integer, when type is @BDF_PROPERTY_TYPE_CARDINAL
*/
typedef struct BDF_PropertyRec_
{
BDF_PropertyType type;
union {
const char* atom;
FT_Int32 integer;
FT_UInt32 cardinal;
} u;
} BDF_PropertyRec;
/********************************************************************** /**********************************************************************
* *
* @function: * @function:
@@ -74,6 +141,37 @@ FT_BEGIN_HEADER
const char* *acharset_encoding, const char* *acharset_encoding,
const char* *acharset_registry ); const char* *acharset_registry );
/**********************************************************************
*
* @function:
* FT_Get_BDF_Property
*
* @description:
* Retrieves a BDF property from a BDF or PCF font file
*
* @input:
* face :: handle to input face
* name :: property name
*
* @output:
* aproperty :: the property
*
* @return:
* FreeType error code. 0 means success.
*
* @note:
* This function works with BDF _and_ PCF fonts. It returns an error
* otherwise. it also returns an error when the property is not in the
* font.
*
* in case of error, "aproperty->type" is always set to
* @BDF_PROPERTY_TYPE_NONE
*/
FT_EXPORT( FT_Error )
FT_Get_BDF_Property( FT_Face face,
const char* prop_name,
BDF_PropertyRec *aproperty );
/* */ /* */
FT_END_HEADER FT_END_HEADER
+81 -162
View File
@@ -31,199 +31,118 @@
/* generic errors */ /* generic errors */
FT_NOERRORDEF_( Ok, 0x00, \ FT_NOERRORDEF_( Ok, 0x00, "no error" )
"no error" )
FT_ERRORDEF_( Cannot_Open_Resource, 0x01, \ FT_ERRORDEF_( Cannot_Open_Resource, 0x01, "cannot open resource" )
"cannot open resource" ) FT_ERRORDEF_( Unknown_File_Format, 0x02, "unknown file format" )
FT_ERRORDEF_( Unknown_File_Format, 0x02, \ FT_ERRORDEF_( Invalid_File_Format, 0x03, "broken file" )
"unknown file format" ) FT_ERRORDEF_( Invalid_Version, 0x04, "invalid FreeType version" )
FT_ERRORDEF_( Invalid_File_Format, 0x03, \ FT_ERRORDEF_( Lower_Module_Version, 0x05, "module version is too low" )
"broken file" ) FT_ERRORDEF_( Invalid_Argument, 0x06, "invalid argument" )
FT_ERRORDEF_( Invalid_Version, 0x04, \ FT_ERRORDEF_( Unimplemented_Feature, 0x07, "unimplemented feature" )
"invalid FreeType version" ) FT_ERRORDEF_( Invalid_Table, 0x08, "broken table" )
FT_ERRORDEF_( Lower_Module_Version, 0x05, \ FT_ERRORDEF_( Invalid_Offset, 0x09, "broken offset within table" )
"module version is too low" )
FT_ERRORDEF_( Invalid_Argument, 0x06, \
"invalid argument" )
FT_ERRORDEF_( Unimplemented_Feature, 0x07, \
"unimplemented feature" )
FT_ERRORDEF_( Invalid_Table, 0x08, \
"broken table" )
FT_ERRORDEF_( Invalid_Offset, 0x09, \
"broken offset within table" )
/* glyph/character errors */ /* glyph/character errors */
FT_ERRORDEF_( Invalid_Glyph_Index, 0x10, \ FT_ERRORDEF_( Invalid_Glyph_Index, 0x10, "invalid glyph index" )
"invalid glyph index" ) FT_ERRORDEF_( Invalid_Character_Code, 0x11, "invalid character code" )
FT_ERRORDEF_( Invalid_Character_Code, 0x11, \ FT_ERRORDEF_( Invalid_Glyph_Format, 0x12, "unsupported glyph image format" )
"invalid character code" ) FT_ERRORDEF_( Cannot_Render_Glyph, 0x13, "cannot render this glyph format" )
FT_ERRORDEF_( Invalid_Glyph_Format, 0x12, \ FT_ERRORDEF_( Invalid_Outline, 0x14, "invalid outline" )
"unsupported glyph image format" ) FT_ERRORDEF_( Invalid_Composite, 0x15, "invalid composite glyph" )
FT_ERRORDEF_( Cannot_Render_Glyph, 0x13, \ FT_ERRORDEF_( Too_Many_Hints, 0x16, "too many hints" )
"cannot render this glyph format" ) FT_ERRORDEF_( Invalid_Pixel_Size, 0x17, "invalid pixel size" )
FT_ERRORDEF_( Invalid_Outline, 0x14, \
"invalid outline" )
FT_ERRORDEF_( Invalid_Composite, 0x15, \
"invalid composite glyph" )
FT_ERRORDEF_( Too_Many_Hints, 0x16, \
"too many hints" )
FT_ERRORDEF_( Invalid_Pixel_Size, 0x17, \
"invalid pixel size" )
/* handle errors */ /* handle errors */
FT_ERRORDEF_( Invalid_Handle, 0x20, \ FT_ERRORDEF_( Invalid_Handle, 0x20, "invalid object handle" )
"invalid object handle" ) FT_ERRORDEF_( Invalid_Library_Handle, 0x21, "invalid library handle" )
FT_ERRORDEF_( Invalid_Library_Handle, 0x21, \ FT_ERRORDEF_( Invalid_Driver_Handle, 0x22, "invalid module handle" )
"invalid library handle" ) FT_ERRORDEF_( Invalid_Face_Handle, 0x23, "invalid face handle" )
FT_ERRORDEF_( Invalid_Driver_Handle, 0x22, \ FT_ERRORDEF_( Invalid_Size_Handle, 0x24, "invalid size handle" )
"invalid module handle" ) FT_ERRORDEF_( Invalid_Slot_Handle, 0x25, "invalid glyph slot handle" )
FT_ERRORDEF_( Invalid_Face_Handle, 0x23, \ FT_ERRORDEF_( Invalid_CharMap_Handle, 0x26, "invalid charmap handle" )
"invalid face handle" ) FT_ERRORDEF_( Invalid_Cache_Handle, 0x27, "invalid cache manager handle" )
FT_ERRORDEF_( Invalid_Size_Handle, 0x24, \ FT_ERRORDEF_( Invalid_Stream_Handle, 0x28, "invalid stream handle" )
"invalid size handle" )
FT_ERRORDEF_( Invalid_Slot_Handle, 0x25, \
"invalid glyph slot handle" )
FT_ERRORDEF_( Invalid_CharMap_Handle, 0x26, \
"invalid charmap handle" )
FT_ERRORDEF_( Invalid_Cache_Handle, 0x27, \
"invalid cache manager handle" )
FT_ERRORDEF_( Invalid_Stream_Handle, 0x28, \
"invalid stream handle" )
/* driver errors */ /* driver errors */
FT_ERRORDEF_( Too_Many_Drivers, 0x30, \ FT_ERRORDEF_( Too_Many_Drivers, 0x30, "too many modules" )
"too many modules" ) FT_ERRORDEF_( Too_Many_Extensions, 0x31, "too many extensions" )
FT_ERRORDEF_( Too_Many_Extensions, 0x31, \
"too many extensions" )
/* memory errors */ /* memory errors */
FT_ERRORDEF_( Out_Of_Memory, 0x40, \ FT_ERRORDEF_( Out_Of_Memory, 0x40, "out of memory" )
"out of memory" ) FT_ERRORDEF_( Unlisted_Object, 0x41, "unlisted object" )
FT_ERRORDEF_( Unlisted_Object, 0x41, \
"unlisted object" )
/* stream errors */ /* stream errors */
FT_ERRORDEF_( Cannot_Open_Stream, 0x51, \ FT_ERRORDEF_( Cannot_Open_Stream, 0x51, "cannot open stream" )
"cannot open stream" ) FT_ERRORDEF_( Invalid_Stream_Seek, 0x52, "invalid stream seek" )
FT_ERRORDEF_( Invalid_Stream_Seek, 0x52, \ FT_ERRORDEF_( Invalid_Stream_Skip, 0x53, "invalid stream skip" )
"invalid stream seek" ) FT_ERRORDEF_( Invalid_Stream_Read, 0x54, "invalid stream read" )
FT_ERRORDEF_( Invalid_Stream_Skip, 0x53, \ FT_ERRORDEF_( Invalid_Stream_Operation, 0x55, "invalid stream operation" )
"invalid stream skip" ) FT_ERRORDEF_( Invalid_Frame_Operation, 0x56, "invalid frame operation" )
FT_ERRORDEF_( Invalid_Stream_Read, 0x54, \ FT_ERRORDEF_( Nested_Frame_Access, 0x57, "nested frame access" )
"invalid stream read" ) FT_ERRORDEF_( Invalid_Frame_Read, 0x58, "invalid frame read" )
FT_ERRORDEF_( Invalid_Stream_Operation, 0x55, \
"invalid stream operation" )
FT_ERRORDEF_( Invalid_Frame_Operation, 0x56, \
"invalid frame operation" )
FT_ERRORDEF_( Nested_Frame_Access, 0x57, \
"nested frame access" )
FT_ERRORDEF_( Invalid_Frame_Read, 0x58, \
"invalid frame read" )
/* raster errors */ /* raster errors */
FT_ERRORDEF_( Raster_Uninitialized, 0x60, \ FT_ERRORDEF_( Raster_Uninitialized, 0x60, "raster uninitialized" )
"raster uninitialized" ) FT_ERRORDEF_( Raster_Corrupted, 0x61, "raster corrupted" )
FT_ERRORDEF_( Raster_Corrupted, 0x61, \ FT_ERRORDEF_( Raster_Overflow, 0x62, "raster overflow" )
"raster corrupted" ) FT_ERRORDEF_( Raster_Negative_Height, 0x63, "negative height while rastering" )
FT_ERRORDEF_( Raster_Overflow, 0x62, \
"raster overflow" )
FT_ERRORDEF_( Raster_Negative_Height, 0x63, \
"negative height while rastering" )
/* cache errors */ /* cache errors */
FT_ERRORDEF_( Too_Many_Caches, 0x70, \ FT_ERRORDEF_( Too_Many_Caches, 0x70, "too many registered caches" )
"too many registered caches" )
/* TrueType and SFNT errors */ /* TrueType and SFNT errors */
FT_ERRORDEF_( Invalid_Opcode, 0x80, \ FT_ERRORDEF_( Invalid_Opcode, 0x80, "invalid opcode" )
"invalid opcode" ) FT_ERRORDEF_( Too_Few_Arguments, 0x81, "too few arguments" )
FT_ERRORDEF_( Too_Few_Arguments, 0x81, \ FT_ERRORDEF_( Stack_Overflow, 0x82, "stack overflow" )
"too few arguments" ) FT_ERRORDEF_( Code_Overflow, 0x83, "code overflow" )
FT_ERRORDEF_( Stack_Overflow, 0x82, \ FT_ERRORDEF_( Bad_Argument, 0x84, "bad argument" )
"stack overflow" ) FT_ERRORDEF_( Divide_By_Zero, 0x85, "division by zero" )
FT_ERRORDEF_( Code_Overflow, 0x83, \ FT_ERRORDEF_( Invalid_Reference, 0x86, "invalid reference" )
"code overflow" ) FT_ERRORDEF_( Debug_OpCode, 0x87, "found debug opcode" )
FT_ERRORDEF_( Bad_Argument, 0x84, \ FT_ERRORDEF_( ENDF_In_Exec_Stream, 0x88, "found ENDF opcode in execution stream" )
"bad argument" ) FT_ERRORDEF_( Nested_DEFS, 0x89, "nested DEFS" )
FT_ERRORDEF_( Divide_By_Zero, 0x85, \ FT_ERRORDEF_( Invalid_CodeRange, 0x8A, "invalid code range" )
"division by zero" ) FT_ERRORDEF_( Execution_Too_Long, 0x8B, "execution context too long" )
FT_ERRORDEF_( Invalid_Reference, 0x86, \ FT_ERRORDEF_( Too_Many_Function_Defs, 0x8C, "too many function definitions" )
"invalid reference" ) FT_ERRORDEF_( Too_Many_Instruction_Defs, 0x8D, "too many instruction definitions" )
FT_ERRORDEF_( Debug_OpCode, 0x87, \ FT_ERRORDEF_( Table_Missing, 0x8E, "SFNT font table missing" )
"found debug opcode" ) FT_ERRORDEF_( Horiz_Header_Missing, 0x8F, "horizontal header (hhea) table missing" )
FT_ERRORDEF_( ENDF_In_Exec_Stream, 0x88, \ FT_ERRORDEF_( Locations_Missing, 0x90, "locations (loca) table missing" )
"found ENDF opcode in execution stream" ) FT_ERRORDEF_( Name_Table_Missing, 0x91, "name table missing" )
FT_ERRORDEF_( Nested_DEFS, 0x89, \ FT_ERRORDEF_( CMap_Table_Missing, 0x92, "character map (cmap) table missing" )
"nested DEFS" ) FT_ERRORDEF_( Hmtx_Table_Missing, 0x93, "horizontal metrics (hmtx) table missing" )
FT_ERRORDEF_( Invalid_CodeRange, 0x8A, \ FT_ERRORDEF_( Post_Table_Missing, 0x94, "PostScript (post) table missing" )
"invalid code range" ) FT_ERRORDEF_( Invalid_Horiz_Metrics, 0x95, "invalid horizontal metrics" )
FT_ERRORDEF_( Execution_Too_Long, 0x8B, \ FT_ERRORDEF_( Invalid_CharMap_Format, 0x96, "invalid character map (cmap) format" )
"execution context too long" ) FT_ERRORDEF_( Invalid_PPem, 0x97, "invalid ppem value" )
FT_ERRORDEF_( Too_Many_Function_Defs, 0x8C, \ FT_ERRORDEF_( Invalid_Vert_Metrics, 0x98, "invalid vertical metrics" )
"too many function definitions" ) FT_ERRORDEF_( Could_Not_Find_Context, 0x99, "could not find context" )
FT_ERRORDEF_( Too_Many_Instruction_Defs, 0x8D, \ FT_ERRORDEF_( Invalid_Post_Table_Format, 0x9A, "invalid PostScript (post) table format" )
"too many instruction definitions" ) FT_ERRORDEF_( Invalid_Post_Table, 0x9B, "invalid PostScript (post) table" )
FT_ERRORDEF_( Table_Missing, 0x8E, \
"SFNT font table missing" )
FT_ERRORDEF_( Horiz_Header_Missing, 0x8F, \
"horizontal header (hhea) table missing" )
FT_ERRORDEF_( Locations_Missing, 0x90, \
"locations (loca) table missing" )
FT_ERRORDEF_( Name_Table_Missing, 0x91, \
"name table missing" )
FT_ERRORDEF_( CMap_Table_Missing, 0x92, \
"character map (cmap) table missing" )
FT_ERRORDEF_( Hmtx_Table_Missing, 0x93, \
"horizontal metrics (hmtx) table missing" )
FT_ERRORDEF_( Post_Table_Missing, 0x94, \
"PostScript (post) table missing" )
FT_ERRORDEF_( Invalid_Horiz_Metrics, 0x95, \
"invalid horizontal metrics" )
FT_ERRORDEF_( Invalid_CharMap_Format, 0x96, \
"invalid character map (cmap) format" )
FT_ERRORDEF_( Invalid_PPem, 0x97, \
"invalid ppem value" )
FT_ERRORDEF_( Invalid_Vert_Metrics, 0x98, \
"invalid vertical metrics" )
FT_ERRORDEF_( Could_Not_Find_Context, 0x99, \
"could not find context" )
FT_ERRORDEF_( Invalid_Post_Table_Format, 0x9A, \
"invalid PostScript (post) table format" )
FT_ERRORDEF_( Invalid_Post_Table, 0x9B, \
"invalid PostScript (post) table" )
/* CFF, CID, and Type 1 errors */ /* CFF, CID, and Type 1 errors */
FT_ERRORDEF_( Syntax_Error, 0xA0, \ FT_ERRORDEF_( Syntax_Error, 0xA0, "opcode syntax error" )
"opcode syntax error" ) FT_ERRORDEF_( Stack_Underflow, 0xA1, "argument stack underflow" )
FT_ERRORDEF_( Stack_Underflow, 0xA1, \
"argument stack underflow" )
/* BDF errors */ /* BDF errors */
FT_ERRORDEF_( Missing_Startfont_Field, 0xB0, \ FT_ERRORDEF_( Missing_Startfont_Field, 0xB0, "`STARTFONT' field missing" )
"`STARTFONT' field missing" ) FT_ERRORDEF_( Missing_Font_Field, 0xB1, "`FONT' field missing" )
FT_ERRORDEF_( Missing_Font_Field, 0xB1, \ FT_ERRORDEF_( Missing_Size_Field, 0xB2, "`SIZE' field missing" )
"`FONT' field missing" ) FT_ERRORDEF_( Missing_Chars_Field, 0xB3, "`CHARS' field missing" )
FT_ERRORDEF_( Missing_Size_Field, 0xB2, \ FT_ERRORDEF_( Missing_Startchar_Field, 0xB4, "`STARTCHAR' field missing" )
"`SIZE' field missing" ) FT_ERRORDEF_( Missing_Encoding_Field, 0xB5, "`ENCODING' field missing" )
FT_ERRORDEF_( Missing_Chars_Field, 0xB3, \ FT_ERRORDEF_( Missing_Bbx_Field, 0xB6, "`BBX' field missing" )
"`CHARS' field missing" )
FT_ERRORDEF_( Missing_Startchar_Field, 0xB4, \
"`STARTCHAR' field missing" )
FT_ERRORDEF_( Missing_Encoding_Field, 0xB5, \
"`ENCODING' field missing" )
FT_ERRORDEF_( Missing_Bbx_Field, 0xB6, \
"`BBX' field missing" )
/* END */ /* END */
+2 -4
View File
@@ -155,12 +155,10 @@
/* this macro is used to define an error */ /* this macro is used to define an error */
#define FT_ERRORDEF_( e, v, s ) \ #define FT_ERRORDEF_( e, v, s ) FT_ERRORDEF( FT_ERR_CAT( FT_ERR_PREFIX, e ), v + FT_ERR_BASE, s )
FT_ERRORDEF( FT_ERR_CAT( FT_ERR_PREFIX, e ), v + FT_ERR_BASE, s )
/* this is only used for FT_Err_Ok, which must be 0! */ /* this is only used for FT_Err_Ok, which must be 0! */
#define FT_NOERRORDEF_( e, v, s ) \ #define FT_NOERRORDEF_( e, v, s ) FT_ERRORDEF( FT_ERR_CAT( FT_ERR_PREFIX, e ), v, s )
FT_ERRORDEF( FT_ERR_CAT( FT_ERR_PREFIX, e ), v, s )
#ifdef FT_ERROR_START_LIST #ifdef FT_ERROR_START_LIST
+1 -1
View File
@@ -483,7 +483,7 @@ FT_BEGIN_HEADER
/* The result is undefined if either `a' or `b' is zero. */ /* The result is undefined if either `a' or `b' is zero. */
/* */ /* */
FT_EXPORT( void ) FT_EXPORT( void )
FT_Matrix_Multiply( FT_Matrix* a, FT_Matrix_Multiply( const FT_Matrix* a,
FT_Matrix* b ); FT_Matrix* b );
+3 -3
View File
@@ -16,8 +16,8 @@
/***************************************************************************/ /***************************************************************************/
#ifndef __FTXF86_H__ #ifndef __FTGZIP_H__
#define __FTXF86_H__ #define __FTGZIP_H__
#include <ft2build.h> #include <ft2build.h>
#include FT_FREETYPE_H #include FT_FREETYPE_H
@@ -83,4 +83,4 @@ FT_BEGIN_HEADER
FT_END_HEADER FT_END_HEADER
#endif /* __FTXF86_H__ */ #endif /* __FTGZIP_H__ */
+10 -9
View File
@@ -174,21 +174,22 @@ FT_BEGIN_HEADER
* vertical :: * vertical ::
* If true, return vertical metrics. * If true, return vertical metrics.
* *
* ametrics ::
* This parameter is used for both input and output.
* The original glyph metrics, if any, in font units. If metrics are
* not available all the values must be set to zero.
*
* @output: * @output:
* ametrics :: * ametrics ::
* The glyph metrics in font units. * The replacement glyph metrics in font units.
*
* afound ::
* True if there are metrics at all.
* *
*/ */
typedef FT_Error typedef FT_Error
(*FT_Incremental_GetGlyphMetricsFunc) (*FT_Incremental_GetGlyphMetricsFunc)
( FT_Incremental incremental, ( FT_Incremental incremental,
FT_UInt glyph_index, FT_UInt glyph_index,
FT_Bool vertical, FT_Bool vertical,
FT_Incremental_MetricsRec *ametrics, FT_Incremental_MetricsRec *ametrics );
FT_Bool *afound );
/************************************************************************** /**************************************************************************
@@ -29,6 +29,7 @@ THE SOFTWARE.
#include <ft2build.h> #include <ft2build.h>
#include FT_FREETYPE_H #include FT_FREETYPE_H
#include FT_BDF_H
FT_BEGIN_HEADER FT_BEGIN_HEADER
@@ -44,6 +45,10 @@ FT_BEGIN_HEADER
} BDF_Public_FaceRec, *BDF_Public_Face; } BDF_Public_FaceRec, *BDF_Public_Face;
typedef FT_Error (*BDF_GetPropertyFunc)( FT_Face face,
const char* prop_name,
BDF_PropertyRec *aproperty );
FT_END_HEADER FT_END_HEADER
@@ -23,6 +23,7 @@
#include <ft2build.h> #include <ft2build.h>
#include FT_FREETYPE_H #include FT_FREETYPE_H
#include FT_WINFONTS_H
FT_BEGIN_HEADER FT_BEGIN_HEADER
@@ -71,57 +72,15 @@ FT_BEGIN_HEADER
#define WINFNT_NE_MAGIC 0x454E #define WINFNT_NE_MAGIC 0x454E
typedef struct WinFNT_HeaderRec_
{
FT_UShort version;
FT_ULong file_size;
FT_Byte copyright[60];
FT_UShort file_type;
FT_UShort nominal_point_size;
FT_UShort vertical_resolution;
FT_UShort horizontal_resolution;
FT_UShort ascent;
FT_UShort internal_leading;
FT_UShort external_leading;
FT_Byte italic;
FT_Byte underline;
FT_Byte strike_out;
FT_UShort weight;
FT_Byte charset;
FT_UShort pixel_width;
FT_UShort pixel_height;
FT_Byte pitch_and_family;
FT_UShort avg_width;
FT_UShort max_width;
FT_Byte first_char;
FT_Byte last_char;
FT_Byte default_char;
FT_Byte break_char;
FT_UShort bytes_per_row;
FT_ULong device_offset;
FT_ULong face_name_offset;
FT_ULong bits_pointer;
FT_ULong bits_offset;
FT_Byte reserved;
FT_ULong flags;
FT_UShort A_space;
FT_UShort B_space;
FT_UShort C_space;
FT_UShort color_table_offset;
FT_Byte reserved2[4];
} WinFNT_HeaderRec, *WinFNT_Header;
typedef struct FNT_FontRec_ typedef struct FNT_FontRec_
{ {
FT_ULong offset; FT_ULong offset;
FT_Int size_shift; FT_Int size_shift;
WinFNT_HeaderRec header; FT_WinFNT_HeaderRec header;
FT_Byte* fnt_frame; FT_Byte* fnt_frame;
FT_ULong fnt_size; FT_ULong fnt_size;
} FNT_FontRec, *FNT_Font; } FNT_FontRec, *FNT_Font;
@@ -322,15 +322,6 @@ FT_BEGIN_HEADER
const char* postscript_name; const char* postscript_name;
FT_F26Dot6 orig_width;
FT_F26Dot6 orig_height;
FT_UInt orig_horz_res;
FT_UInt orig_vert_res;
FT_Fixed orig_x_scale;
FT_Fixed orig_y_scale;
#ifdef FT_CONFIG_OPTION_INCREMENTAL #ifdef FT_CONFIG_OPTION_INCREMENTAL
FT_Incremental_InterfaceRec* incremental_interface; FT_Incremental_InterfaceRec* incremental_interface;
#endif #endif
@@ -471,6 +462,8 @@ FT_BEGIN_HEADER
FT_Get_Module_Interface( FT_Library library, FT_Get_Module_Interface( FT_Library library,
const char* mod_name ); const char* mod_name );
/* */
/*************************************************************************/ /*************************************************************************/
/*************************************************************************/ /*************************************************************************/
@@ -543,6 +536,30 @@ FT_BEGIN_HEADER
FT_BASE( void ) FT_BASE( void )
FT_Done_GlyphSlot( FT_GlyphSlot slot ); FT_Done_GlyphSlot( FT_GlyphSlot slot );
/* */
/*
* free the bitmap of a given glyphslot when needed
* (i.e. only when it was allocated with ft_glyphslot_alloc_bitmap)
*/
FT_BASE( void )
ft_glyphslot_free_bitmap( FT_GlyphSlot slot );
/*
* allocate a new bitmap buffer in a glyph slot
*/
FT_BASE( FT_Error )
ft_glyphslot_alloc_bitmap( FT_GlyphSlot slot,
FT_ULong size );
/*
* set the bitmap buffer in a glyph slot to a given pointer.
* the buffer will not be freed by a later call to ft_glyphslot_free_bitmap
*/
FT_BASE( void )
ft_glyphslot_set_bitmap( FT_GlyphSlot slot,
FT_Pointer buffer );
/*************************************************************************/ /*************************************************************************/
/*************************************************************************/ /*************************************************************************/
@@ -457,6 +457,21 @@ FT_BEGIN_HEADER
(*TT_Free_Table_Func)( TT_Face face ); (*TT_Free_Table_Func)( TT_Face face );
/*************************************************************************/
/* */
/* <FuncType> */
/* SFNT_Load_Table_Func */
/* */
/* <Description> */
/* Loads a given SFNT table in memory */
/* */
typedef FT_Error
(*SFNT_Load_Table_Func)( FT_Face face,
FT_ULong tag,
FT_Long offset,
FT_Byte* buffer,
FT_ULong* length );
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* <Struct> */ /* <Struct> */
+66 -12
View File
@@ -99,18 +99,18 @@ FT_BEGIN_HEADER
* TT_APPLE_ID_UNICODE_1_1 :: * TT_APPLE_ID_UNICODE_1_1 ::
* Unicode 1.1; specifies Hangul characters starting at U+34xx. * Unicode 1.1; specifies Hangul characters starting at U+34xx.
* TT_APPLE_ID_ISO_10646 :: * TT_APPLE_ID_ISO_10646 ::
* Deprecated. * Deprecated (identical to preceding.)
* TT_APPLE_ID_UNICODE_2_0 :: * TT_APPLE_ID_UNICODE_2_0 ::
* Unicode 2.0 and beyond (UTF-16 BMP only). * Unicode 2.0 and beyond (UTF-16 BMP only.)
* TT_APPLE_ID_UNICODE_32 :: * TT_APPLE_ID_UNICODE_32 ::
* UTF-32 (Adobe proposal for OpenType). * Unicode 3.1 and beyond, using UTF-32
*/ */
#define TT_APPLE_ID_DEFAULT 0 /* Unicode 1.0 */ #define TT_APPLE_ID_DEFAULT 0 /* Unicode 1.0 */
#define TT_APPLE_ID_UNICODE_1_1 1 /* specify Hangul at U+34xx */ #define TT_APPLE_ID_UNICODE_1_1 1 /* specify Hangul at U+34xx */
#define TT_APPLE_ID_ISO_10646 2 /* deprecated */ #define TT_APPLE_ID_ISO_10646 2 /* deprecated */
#define TT_APPLE_ID_UNICODE_2_0 3 /* or later */ #define TT_APPLE_ID_UNICODE_2_0 3 /* or later */
#define TT_APPLE_ID_UNICODE_32 4 /* Adobe proposal */ #define TT_APPLE_ID_UNICODE_32 4 /* 2.0 or later, full repertoire */
/*********************************************************************** /***********************************************************************
@@ -257,8 +257,8 @@ FT_BEGIN_HEADER
* Corresponds to Microsoft Johab encoding. See @FT_ENCODING_MS_JOHAB. * Corresponds to Microsoft Johab encoding. See @FT_ENCODING_MS_JOHAB.
* *
* TT_MS_ID_UCS_4 :: * TT_MS_ID_UCS_4 ::
* Corresponds to UCS-4 or UTF-32 charmaps. This is a recent Adobe * Corresponds to UCS-4 or UTF-32 charmaps. This has been added into
* proposal for OpenType. * OpenType specification as of version 1.4 (mid-2001.)
*/ */
#define TT_MS_ID_SYMBOL_CS 0 #define TT_MS_ID_SYMBOL_CS 0
@@ -443,10 +443,15 @@ FT_BEGIN_HEADER
/* of the TTF `name' table if the `platform' identifier code is */ /* of the TTF `name' table if the `platform' identifier code is */
/* TT_PLATFORM_MICROSOFT. */ /* TT_PLATFORM_MICROSOFT. */
/* */ /* */
/* The canonical source for the MS assigned LCID's is at */ /* The canonical source for the MS assigned LCID's used to be at */
/* */ /* */
/* http://www.microsoft.com/typography/OTSPEC/lcid-cp.txt */ /* http://www.microsoft.com/typography/OTSPEC/lcid-cp.txt */
/* */ /* */
/* Now (2002-11-15), the Microsoft site directs to */
/* */
/* http://www.microsoft.com/globaldev/reference/loclanghome.asp */
/* http://support.microsoft.com/support/kb/articles/Q224/8/04.ASP */
/* */
#define TT_MS_LANGID_ARABIC_SAUDI_ARABIA 0x0401 #define TT_MS_LANGID_ARABIC_SAUDI_ARABIA 0x0401
#define TT_MS_LANGID_ARABIC_IRAQ 0x0801 #define TT_MS_LANGID_ARABIC_IRAQ 0x0801
#define TT_MS_LANGID_ARABIC_EGYPT 0x0c01 #define TT_MS_LANGID_ARABIC_EGYPT 0x0c01
@@ -787,8 +792,10 @@ FT_BEGIN_HEADER
/* Bit 7 Greek and Coptic */ /* Bit 7 Greek and Coptic */
#define TT_UCR_GREEK (1L << 7) /* U+0370-U+03FF */ #define TT_UCR_GREEK (1L << 7) /* U+0370-U+03FF */
/* Bit 8 is reserved (was: Greek Symbols and Coptic) */ /* Bit 8 is reserved (was: Greek Symbols and Coptic) */
/* Bit 9 Cyrillic */ /* Bit 9 Cyrillic + */
/* Cyrillic Supplementary */
#define TT_UCR_CYRILLIC (1L << 9) /* U+0400-U+04FF */ #define TT_UCR_CYRILLIC (1L << 9) /* U+0400-U+04FF */
/* U+0500-U+052F */
/* Bit 10 Armenian */ /* Bit 10 Armenian */
#define TT_UCR_ARMENIAN (1L << 10) /* U+0530-U+058F */ #define TT_UCR_ARMENIAN (1L << 10) /* U+0530-U+058F */
/* Bit 11 Hebrew */ /* Bit 11 Hebrew */
@@ -843,10 +850,20 @@ FT_BEGIN_HEADER
#define TT_UCR_LETTERLIKE_SYMBOLS (1L << 3) /* U+2100-U+214F */ #define TT_UCR_LETTERLIKE_SYMBOLS (1L << 3) /* U+2100-U+214F */
/* Bit 36 Number Forms */ /* Bit 36 Number Forms */
#define TT_UCR_NUMBER_FORMS (1L << 4) /* U+2150-U+218F */ #define TT_UCR_NUMBER_FORMS (1L << 4) /* U+2150-U+218F */
/* Bit 37 Arrows */ /* Bit 37 Arrows + */
/* Supplemental Arrows-A + */
/* Supplemental Arrows-B */
#define TT_UCR_ARROWS (1L << 5) /* U+2190-U+21FF */ #define TT_UCR_ARROWS (1L << 5) /* U+2190-U+21FF */
/* Bit 38 Mathematical Operators */ /* U+27F0-U+27FF */
/* U+2900-U+297F */
/* Bit 38 Mathematical Operators + */
/* Supplemental Mathematical Operators + */
/* Miscellaneous Mathematical Symbols-A + */
/* Miscellaneous Mathematical Symbols-B */
#define TT_UCR_MATHEMATICAL_OPERATORS (1L << 6) /* U+2200-U+22FF */ #define TT_UCR_MATHEMATICAL_OPERATORS (1L << 6) /* U+2200-U+22FF */
/* U+2A00-U+2AFF */
/* U+27C0-U+27EF */
/* U+2980-U+29FF */
/* Bit 39 Miscellaneous Technical */ /* Bit 39 Miscellaneous Technical */
#define TT_UCR_MISCELLANEOUS_TECHNICAL (1L << 7) /* U+2300-U+23FF */ #define TT_UCR_MISCELLANEOUS_TECHNICAL (1L << 7) /* U+2300-U+23FF */
/* Bit 40 Control Pictures */ /* Bit 40 Control Pictures */
@@ -872,8 +889,10 @@ FT_BEGIN_HEADER
#define TT_UCR_CJK_SYMBOLS (1L << 16) /* U+3000-U+303F */ #define TT_UCR_CJK_SYMBOLS (1L << 16) /* U+3000-U+303F */
/* Bit 49 Hiragana */ /* Bit 49 Hiragana */
#define TT_UCR_HIRAGANA (1L << 17) /* U+3040-U+309F */ #define TT_UCR_HIRAGANA (1L << 17) /* U+3040-U+309F */
/* Bit 50 Katakana */ /* Bit 50 Katakana + */
/* Katakana Phonetic Extensions */
#define TT_UCR_KATAKANA (1L << 18) /* U+30A0-U+30FF */ #define TT_UCR_KATAKANA (1L << 18) /* U+30A0-U+30FF */
/* U+31F0-U+31FF */
/* Bit 51 Bopomofo + */ /* Bit 51 Bopomofo + */
/* Bopomofo Extended */ /* Bopomofo Extended */
#define TT_UCR_BOPOMOFO (1L << 19) /* U+3100-U+312F */ #define TT_UCR_BOPOMOFO (1L << 19) /* U+3100-U+312F */
@@ -914,11 +933,16 @@ FT_BEGIN_HEADER
/* Kangxi Radicals + */ /* Kangxi Radicals + */
/* Ideographic Description Characters + */ /* Ideographic Description Characters + */
/* CJK Unified Ideographs Extension A */ /* CJK Unified Ideographs Extension A */
/* CJK Unified Ideographs Extension A + */
/* CJK Unified Ideographs Extension B + */
/* Kanbun */
#define TT_UCR_CJK_UNIFIED_IDEOGRAPHS (1L << 27) /* U+4E00-U+9FFF */ #define TT_UCR_CJK_UNIFIED_IDEOGRAPHS (1L << 27) /* U+4E00-U+9FFF */
/* U+2E80-U+2EFF */ /* U+2E80-U+2EFF */
/* U+2F00-U+2FDF */ /* U+2F00-U+2FDF */
/* U+2FF0-U+2FFF */ /* U+2FF0-U+2FFF */
/* U+3400-U+4DB5 */ /* U+3400-U+4DB5 */
/*U+20000-U+2A6DF*/
/* U+3190-U+319F */
/* Private Use Area */ /* Private Use Area */
@@ -927,8 +951,10 @@ FT_BEGIN_HEADER
/* Compatibility Area and Specials */ /* Compatibility Area and Specials */
/* Bit 61 CJK Compatibility Ideographs */ /* Bit 61 CJK Compatibility Ideographs + */
/* CJK Compatibility Ideographs Supplement */
#define TT_UCR_CJK_COMPATIBILITY_IDEOGRAPHS (1L << 29) /* U+F900-U+FAFF */ #define TT_UCR_CJK_COMPATIBILITY_IDEOGRAPHS (1L << 29) /* U+F900-U+FAFF */
/*U+2F800-U+2FA1F*/
/* Bit 62 Alphabetic Presentation Forms */ /* Bit 62 Alphabetic Presentation Forms */
#define TT_UCR_ALPHABETIC_PRESENTATION_FORMS (1L << 30) /* U+FB00-U+FB4F */ #define TT_UCR_ALPHABETIC_PRESENTATION_FORMS (1L << 30) /* U+FB00-U+FB4F */
/* Bit 63 Arabic Presentation Forms-A */ /* Bit 63 Arabic Presentation Forms-A */
@@ -975,6 +1001,34 @@ FT_BEGIN_HEADER
/* Yi Radicals */ /* Yi Radicals */
#define TT_UCR_YI (1L << 19) /* U+A000-U+A48F */ #define TT_UCR_YI (1L << 19) /* U+A000-U+A48F */
/* U+A490-U+A4CF */ /* U+A490-U+A4CF */
/* Bit 84 Tagalog + */
/* Hanunoo + */
/* Buhid + */
/* Tagbanwa */
#define TT_UCR_PHILIPPINE (1L << 20) /* U+1700-U+171F */
/* U+1720-U+173F */
/* U+1740-U+175F */
/* U+1760-U+177F */
/* Bit 85 Old Italic */
#define TT_UCR_OLD_ITALIC (1L << 21) /*U+10300-U+1032F*/
/* Bit 86 Gothic */
#define TT_UCR_GOTHIC (1L << 22) /*U+10330-U+1034F*/
/* Bit 87 Deseret */
#define TT_UCR_DESERET (1L << 23) /*U+10400-U+1044F*/
/* Bit 88 Byzantine Musical Symbols + */
/* Musical Symbols */
#define TT_UCR_MUSICAL_SYMBOLS (1L << 24) /*U+1D000-U+1D0FF*/
/*U+1D100-U+1D1FF*/
/* Bit 89 Mathematical Alphanumeric Symbols */
#define TT_UCR_MATH_ALPHANUMERIC_SYMBOLS (1L << 25) /*U+1D400-U+1D7FF*/
/* Bit 90 Private Use (plane 15) + */
/* Private Use (plane 16) */
#define TT_UCR_PRIVATE_USE_SUPPLEMENTARY (1L << 26) /*U+F0000-U+FFFFD*/
/*U+100000-U+10FFFD*/
/* Bit 91 Variation Selectors */
#define TT_UCR_VARIATION_SELECTORS (1L << 27) /* U+FE00-U+FE0F */
/* Bit 92 Tags */
#define TT_UCR_TAGS (1L << 28) /*U+E0000-U+E007F*/
/*************************************************************************/ /*************************************************************************/
@@ -593,6 +593,63 @@ FT_BEGIN_HEADER
FT_Get_Sfnt_Table( FT_Face face, FT_Get_Sfnt_Table( FT_Face face,
FT_Sfnt_Tag tag ); FT_Sfnt_Tag tag );
/**************************************************************************
*
* <Function>
* FT_Load_Sfnt_Table
*
* <Description>
* Loads any font table into client memory.
*
* <Input>
* face :: handle to source face.
* tag :: the 4-byte tag of the table to load. Use the value 0 if
* you want to access the whole font file. Else, you can use
* one of the definitions found in the @FT_TRUETYPE_TAGS_H
* file, or forge a new one with @FT_MAKE_TAG
*
* offset :: the starting offset in the table (or file if tag == 0)
*
* <Output>
* buffer :: target buffer address. client must ensure that there are
* enough bytes in it.
*
* <InOut>
* length :: if the 'length' parameter is NULL, then try to load the whole
* table, and return an error code if it fails.
*
* else, if '*length' is 0, then exit immediately while returning
* the table's (or file) full size in it.
*
* else, the number of bytes to read from the table or file,
* from the starting offset.
*
* <Return>
* error code. 0 means success
*
* <Note>
* if you need to determine the table's length you should first call this
* function with "*length" set to 0, as in the following example:
*
* {
* FT_ULong length = 0;
*
* error = FT_Load_Sfnt_Table( face, tag, 0, NULL, &length );
* if ( error ) { ... table does not exist ... }
*
* buffer = malloc( length );
* if ( buffer == NULL ) { ... not enough memory ... }
*
* error = FT_Load_Sfnt_Table( face,tag, 0, buffer, &length );
* if ( error ) { ... could not load table ... }
* }
*/
FT_EXPORT( FT_Error )
FT_Load_Sfnt_Table( FT_Face face,
FT_ULong tag,
FT_Long offset,
FT_Byte* buffer,
FT_ULong* length );
/* */ /* */