forked from minhngoc25a/freetype2
Finishing David's latest changes (there were some errors in it).
This commit is contained in:
parent
54e7574946
commit
dc72aff43d
|
@ -15,8 +15,8 @@
|
|||
|
||||
SEP := /
|
||||
CLEAN_LIBRARY := $(DELETE) $@
|
||||
|
||||
include $(TOP)/builds/compiler/gcc.mk
|
||||
include $(TOP)/builds/dos/dos-def.mk
|
||||
|
||||
# EOF
|
||||
|
||||
|
|
|
@ -145,42 +145,53 @@
|
|||
|
||||
#ifdef FT_MAKE_OPTION_SINGLE_OBJECT
|
||||
|
||||
#define LOCAL_DEF static
|
||||
#define LOCAL_FUNC static
|
||||
#define FT_LOCAL static
|
||||
#define FT_LOCAL_DEF static
|
||||
|
||||
#else
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define LOCAL_DEF extern "C"
|
||||
#define LOCAL_FUNC extern "C"
|
||||
#define FT_LOCAL extern "C"
|
||||
#define FT_LOCAL_DEF extern "C"
|
||||
#else
|
||||
#define LOCAL_DEF extern
|
||||
#define LOCAL_FUNC extern
|
||||
#define FT_LOCAL extern
|
||||
#define FT_LOCAL_DEF extern
|
||||
#endif
|
||||
|
||||
#endif /* FT_MAKE_OPTION_SINGLE_OBJECT */
|
||||
|
||||
|
||||
#ifndef BASE_DEF
|
||||
#ifndef FT_BASE
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define BASE_DEF( x ) extern "C" x
|
||||
#define FT_BASE( x ) extern "C" x
|
||||
#else
|
||||
#define BASE_DEF( x ) extern x
|
||||
#define FT_BASE( x ) extern x
|
||||
#endif
|
||||
|
||||
#endif /* !BASE_DEF */
|
||||
#endif /* !FT_BASE */
|
||||
|
||||
|
||||
#ifndef BASE_FUNC
|
||||
#ifndef FT_BASE_DEF
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define BASE_FUNC( x ) extern "C" x
|
||||
#define FT_BASE_DEF( x ) extern "C" x
|
||||
#else
|
||||
#define BASE_FUNC( x ) extern x
|
||||
#define FT_BASE_DEF( x ) extern x
|
||||
#endif
|
||||
|
||||
#endif /* !BASE_FUNC */
|
||||
#endif /* !FT_BASE_DEF */
|
||||
|
||||
|
||||
#ifndef FT_EXPORT
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define FT_EXPORT( x ) extern "C" x
|
||||
#else
|
||||
#define FT_EXPORT( x ) extern x
|
||||
#endif
|
||||
|
||||
#endif /* !FT_EXPORT */
|
||||
|
||||
|
||||
#ifndef FT_EXPORT_DEF
|
||||
|
@ -194,17 +205,6 @@
|
|||
#endif /* !FT_EXPORT_DEF */
|
||||
|
||||
|
||||
#ifndef FT_EXPORT_FUNC
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define FT_EXPORT_FUNC( x ) extern "C" x
|
||||
#else
|
||||
#define FT_EXPORT_FUNC( x ) extern x
|
||||
#endif
|
||||
|
||||
#endif /* !FT_EXPORT_FUNC */
|
||||
|
||||
|
||||
#ifndef FT_EXPORT_VAR
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -215,6 +215,10 @@
|
|||
|
||||
#endif /* !FT_EXPORT_VAR */
|
||||
|
||||
/* The following macros are needed to compile the library with a */
|
||||
/* C++ compiler. Note that we do this for convenience -- please */
|
||||
/* don't ask for more C++ features. */
|
||||
/* */
|
||||
|
||||
/* This is special. Within C++, you must specify `extern "C"' for */
|
||||
/* functions which are used via function pointers, and you also */
|
||||
|
@ -222,21 +226,26 @@
|
|||
/* assure C linkage -- it's not possible to have (local) anonymous */
|
||||
/* functions which are accessed by (global) function pointers. */
|
||||
/* */
|
||||
/* */
|
||||
/* FT_CALLBACK_DEF is used to _define_ a callback function. */
|
||||
/* */
|
||||
/* FT_CALLBACK_TABLE is used to _declare_ a constant variable that */
|
||||
/* contains pointers to callback functions. */
|
||||
/* */
|
||||
/* FT_CALLBACK_TABLE_DEF is used to _define_ a constant variable */
|
||||
/* that contains pointers to callback functions. */
|
||||
/* */
|
||||
#ifdef __cplusplus
|
||||
|
||||
#define LOCAL_VAR extern "C"
|
||||
|
||||
#define LOCAL_FUNC_X extern "C"
|
||||
|
||||
#define FT_CPLUSPLUS( x ) extern "C" x
|
||||
#define FT_CALLBACK_DEF extern "C"
|
||||
#define FT_CALLBACK_TABLE extern "C"
|
||||
#define FT_CALLBACK_TABLE_DEF extern "C"
|
||||
|
||||
#else
|
||||
|
||||
#define LOCAL_VAR extern
|
||||
|
||||
#define LOCAL_FUNC_X static
|
||||
|
||||
#define FT_CPLUSPLUS( x ) x
|
||||
#define FT_CALLBACK_DEF static
|
||||
#define FT_CALLBACK_TABLE extern
|
||||
#define FT_CALLBACK_TABLE_DEF
|
||||
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
|
|
@ -229,9 +229,9 @@
|
|||
|
||||
#endif /* !FT_EXPORT_VAR */
|
||||
|
||||
/* the following macros are needed to compile the library with a */
|
||||
/* C++ compiler. Werner insisted on being able to do that even */
|
||||
/* though we explicitely do not support C++ compilation */
|
||||
/* The following macros are needed to compile the library with a */
|
||||
/* C++ compiler. Note that we do this for convenience -- please */
|
||||
/* don't ask for more C++ features. */
|
||||
/* */
|
||||
|
||||
/* This is special. Within C++, you must specify `extern "C"' for */
|
||||
|
@ -241,13 +241,13 @@
|
|||
/* functions which are accessed by (global) function pointers. */
|
||||
/* */
|
||||
/* */
|
||||
/* FT_CALLBACK_DEF is used to _define_ a callback function */
|
||||
/* FT_CALLBACK_DEF is used to _define_ a callback function. */
|
||||
/* */
|
||||
/* FT_CALLBACK_TABLE is used to _declare_ a constant variable */
|
||||
/* that contains pointers to callback functions */
|
||||
/* FT_CALLBACK_TABLE is used to _declare_ a constant variable that */
|
||||
/* contains pointers to callback functions. */
|
||||
/* */
|
||||
/* FT_CALLBACK_TABLE_DEF is used to _define_ a constant variable */
|
||||
/* that contains pointers to callback functions */
|
||||
/* that contains pointers to callback functions. */
|
||||
/* */
|
||||
#ifdef __cplusplus
|
||||
|
||||
|
|
|
@ -393,21 +393,22 @@
|
|||
/*************************************************************************/
|
||||
/*************************************************************************/
|
||||
|
||||
/*********************************************************************
|
||||
*
|
||||
* <Type>
|
||||
* FT_Face_Internal
|
||||
*
|
||||
* <Description>
|
||||
* an opaque handle to a FT_Face_InternalRec structure, used to
|
||||
* model private data of a given FT_Face object.
|
||||
*
|
||||
* this fields might change between releases of FreeType 2 and
|
||||
* are not generally available to client applications
|
||||
*
|
||||
*/
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Type> */
|
||||
/* FT_Face_Internal */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* An opaque handle to an FT_Face_InternalRec structure, used to */
|
||||
/* model private data of a given FT_Face object. */
|
||||
/* */
|
||||
/* This field might change between releases of FreeType 2 and are */
|
||||
/* not generally available to client applications. */
|
||||
/* */
|
||||
typedef struct FT_Face_InternalRec_* FT_Face_Internal;
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* FreeType base face class */
|
||||
|
@ -571,24 +572,10 @@
|
|||
/* */
|
||||
/* sizes_list :: The list of child sizes for this face. */
|
||||
/* */
|
||||
/* max_points :: The maximal number of points used to store */
|
||||
/* the vectorial outline of any glyph in this */
|
||||
/* face. If this value cannot be known in */
|
||||
/* advance, or if the face isn't scalable, */
|
||||
/* this should be set to 0. Only relevant for */
|
||||
/* scalable formats. */
|
||||
/* */
|
||||
/* max_contours :: The maximal number of contours used to */
|
||||
/* store the vectorial outline of any glyph in */
|
||||
/* this face. If this value cannot be known */
|
||||
/* in advance, or if the face isn't scalable, */
|
||||
/* this should be set to 0. Only relevant for */
|
||||
/* scalable formats. */
|
||||
/* */
|
||||
/* internal :: a pointer to internal fields of the face */
|
||||
/* internal :: A pointer to internal fields of the face */
|
||||
/* object. These fields can change freely */
|
||||
/* between releases of FreeType and are not */
|
||||
/* publicly available.. */
|
||||
/* publicly available. */
|
||||
/* */
|
||||
typedef struct FT_FaceRec_
|
||||
{
|
||||
|
@ -611,7 +598,7 @@
|
|||
|
||||
FT_Generic generic;
|
||||
|
||||
/*# the following are only relevant for scalable outlines */
|
||||
/*# the following are only relevant to scalable outlines */
|
||||
FT_BBox bbox;
|
||||
|
||||
FT_UShort units_per_EM;
|
||||
|
@ -850,17 +837,18 @@
|
|||
#define FT_STYLE_FLAG_BOLD 2
|
||||
|
||||
|
||||
/*********************************************************************
|
||||
*
|
||||
* <Type>
|
||||
* FT_Size_Internal
|
||||
*
|
||||
* <Description>
|
||||
* an opaque handle to a FT_Size_InternalRec structure, used to
|
||||
* model private data of a given FT_Size object.
|
||||
*/
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Type> */
|
||||
/* FT_Size_Internal */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* An opaque handle to an FT_Size_InternalRec structure, used to */
|
||||
/* model private data of a given FT_Size object. */
|
||||
/* */
|
||||
typedef struct FT_Size_InternalRec_* FT_Size_Internal;
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* FreeType base size metrics */
|
||||
|
@ -969,7 +957,6 @@
|
|||
FT_Size_Metrics metrics; /* size metrics */
|
||||
FT_Size_Internal internal;
|
||||
|
||||
|
||||
} FT_SizeRec;
|
||||
|
||||
|
||||
|
@ -989,15 +976,15 @@
|
|||
typedef struct FT_SubGlyph_ FT_SubGlyph;
|
||||
|
||||
|
||||
/*********************************************************************
|
||||
*
|
||||
* <Type>
|
||||
* FT_Slot_Internal
|
||||
*
|
||||
* <Description>
|
||||
* an opaque handle to a FT_Slot_InternalRec structure, used to
|
||||
* model private data of a given FT_GlyphSlot object.
|
||||
*/
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Type> */
|
||||
/* FT_Slot_Internal */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* An opaque handle to an FT_Slot_InternalRec structure, used to */
|
||||
/* model private data of a given FT_GlyphSlot object. */
|
||||
/* */
|
||||
typedef struct FT_Slot_InternalRec_* FT_Slot_Internal;
|
||||
|
||||
|
||||
|
|
|
@ -16,9 +16,13 @@
|
|||
/***************************************************************************/
|
||||
|
||||
|
||||
/* NOTE: include this file after <freetype/freetype.h> and after the
|
||||
Mac-specific <Types.h> header (or any other Mac header that includes
|
||||
<Types.h>); we use Handle type. */
|
||||
/***************************************************************************/
|
||||
/* */
|
||||
/* NOTE: Include this file after <freetype/freetype.h> and after the */
|
||||
/* Mac-specific <Types.h> header (or any other Mac header that */
|
||||
/* includes <Types.h>); we use Handle type. */
|
||||
/* */
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
#ifndef FT_MAC_H
|
||||
|
|
|
@ -130,8 +130,7 @@
|
|||
} FT_Extension_Class;
|
||||
|
||||
|
||||
FT_EXPORT( FT_Error ) FT_Register_Extension(
|
||||
FT_Driver driver,
|
||||
FT_EXPORT( FT_Error ) FT_Register_Extension( FT_Driver driver,
|
||||
FT_Extension_Class* clazz );
|
||||
|
||||
|
||||
|
@ -161,8 +160,7 @@
|
|||
|
||||
|
||||
/* return an extension's data & interface according to its ID */
|
||||
FT_EXPORT( void* ) FT_Get_Extension(
|
||||
FT_Face face,
|
||||
FT_EXPORT( void* ) FT_Get_Extension( FT_Face face,
|
||||
const char* extension_id,
|
||||
void** extension_interface );
|
||||
|
||||
|
|
|
@ -75,6 +75,7 @@
|
|||
#define ABS( a ) ( (a) < 0 ? -(a) : (a) )
|
||||
#endif
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Struct> */
|
||||
|
@ -97,27 +98,36 @@
|
|||
/* FT_Face_InternalRec */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* this structure contains the internal fields of each FT_Face */
|
||||
/* object. These fields may change between different releases */
|
||||
/* of FreeType. */
|
||||
/* This structure contains the internal fields of each FT_Face */
|
||||
/* object. These fields may change between different releases of */
|
||||
/* FreeType. */
|
||||
/* */
|
||||
/* <Fields> */
|
||||
/* transform_matrix :: A 2x2 matrix of 16.16 coefficients used */
|
||||
/* to transform glyph outlines after they are */
|
||||
/* loaded from the font. Only used by the */
|
||||
/* convenience functions. */
|
||||
/* max_points :: The maximal number of points used to store the */
|
||||
/* vectorial outline of any glyph in this face. */
|
||||
/* If this value cannot be known in advance, or */
|
||||
/* if the face isn't scalable, this should be set */
|
||||
/* to 0. Only relevant for scalable formats. */
|
||||
/* */
|
||||
/* transform_delta :: A translation vector used to transform */
|
||||
/* glyph outlines after they are loaded from */
|
||||
/* the font. Only used by the convenience */
|
||||
/* max_contours :: The maximal number of contours used to store */
|
||||
/* the vectorial outline of any glyph in this */
|
||||
/* face. If this value cannot be known in */
|
||||
/* advance, or if the face isn't scalable, this */
|
||||
/* should be set to 0. Only relevant for */
|
||||
/* scalable formats. */
|
||||
/* */
|
||||
/* transform_matrix :: A 2x2 matrix of 16.16 coefficients used to */
|
||||
/* transform glyph outlines after they are loaded */
|
||||
/* from the font. Only used by the convenience */
|
||||
/* functions. */
|
||||
/* */
|
||||
/* transform_delta :: A translation vector used to transform glyph */
|
||||
/* outlines after they are loaded from the font. */
|
||||
/* Only used by the convenience functions. */
|
||||
/* */
|
||||
/* transform_flags :: Some flags used to classify the transform. */
|
||||
/* Only used by the convenience functions. */
|
||||
/* */
|
||||
/* */
|
||||
/* */
|
||||
/* */
|
||||
typedef struct FT_Face_InternalRec_
|
||||
{
|
||||
FT_UShort max_points;
|
||||
|
@ -136,25 +146,25 @@
|
|||
/* FT_Slot_InternalRec */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* this structure contains the internal fields of each FT_GlyphSlot */
|
||||
/* object. These fields may change between different releases */
|
||||
/* of FreeType. */
|
||||
/* This structure contains the internal fields of each FT_GlyphSlot */
|
||||
/* object. These fields may change between different releases of */
|
||||
/* FreeType. */
|
||||
/* */
|
||||
/* <Fields> */
|
||||
/* loader :: the glyph loader object used to load */
|
||||
/* outlines in the glyph slot */
|
||||
/* loader :: The glyph loader object used to load outlines */
|
||||
/* into the glyph slot. */
|
||||
/* */
|
||||
/* glyph_transformed :: boolean. set to TRUE when the loaded glyph */
|
||||
/* glyph_transformed :: Boolean. Set to TRUE when the loaded glyph */
|
||||
/* must be transformed through a specific */
|
||||
/* font transform. this is _not_ the same as */
|
||||
/* the face transform set through */
|
||||
/* FT_Set_Transform */
|
||||
/* font transformation. This is _not_ the same */
|
||||
/* as the face transform set through */
|
||||
/* FT_Set_Transform(). */
|
||||
/* */
|
||||
/* glyph_matrix :: the 2x2 matrix corresponding to the glyph */
|
||||
/* transform, when required */
|
||||
/* glyph_matrix :: The 2x2 matrix corresponding to the glyph */
|
||||
/* transformation, if necessary. */
|
||||
/* */
|
||||
/* glyph_delta :: the 2d translation vector corresponding to */
|
||||
/* the glyph transform, when required */
|
||||
/* glyph_delta :: The 2d translation vector corresponding to */
|
||||
/* the glyph transformation, if necessary. */
|
||||
/* */
|
||||
typedef struct FT_Slot_InternalRec_
|
||||
{
|
||||
|
|
|
@ -29,7 +29,8 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
FT_CALLBACK_TABLE( const FT_Module_Class ) autohint_module_class;
|
||||
FT_CALLBACK_TABLE
|
||||
const FT_Module_Class autohint_module_class;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -119,6 +119,7 @@
|
|||
/* */
|
||||
/* <InOut> */
|
||||
/* driver :: A handle to the driver object. */
|
||||
/* */
|
||||
/* class :: A pointer to a class describing the extension. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
|
|
|
@ -617,7 +617,8 @@
|
|||
}
|
||||
|
||||
|
||||
FT_BASE_DEF( FT_Error ) FT_GlyphLoader_Copy_Points( FT_GlyphLoader* target,
|
||||
FT_BASE_DEF( FT_Error ) FT_GlyphLoader_Copy_Points(
|
||||
FT_GlyphLoader* target,
|
||||
FT_GlyphLoader* source )
|
||||
{
|
||||
FT_Error error;
|
||||
|
@ -1069,7 +1070,8 @@
|
|||
|
||||
|
||||
if ( renderer )
|
||||
error = renderer->clazz->transform_glyph( renderer, slot,
|
||||
error = renderer->clazz->transform_glyph(
|
||||
renderer, slot,
|
||||
&internal->transform_matrix,
|
||||
&internal->transform_delta );
|
||||
/* transform advance */
|
||||
|
@ -2073,19 +2075,19 @@
|
|||
/* FreeType error code. 0 means success. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* the values of "pixel_width" and "pixel_height" correspond to */
|
||||
/* the pixel values of the _typographic_ character size, which are */
|
||||
/* NOT necessarily the same as the dimensions of the glyph */
|
||||
/* "bitmap cells". */
|
||||
/* The values of `pixel_width' and `pixel_height' correspond to the */
|
||||
/* pixel values of the _typographic_ character size, which are NOT */
|
||||
/* necessarily the same as the dimensions of the glyph `bitmap */
|
||||
/* cells". */
|
||||
/* */
|
||||
/* The "character size" is really the size of an abstract square */
|
||||
/* called the "EM", used to design the font. However, depending */
|
||||
/* The `character size' is really the size of an abstract square */
|
||||
/* called the `EM', used to design the font. However, depending */
|
||||
/* on the font design, glyphs will be smaller or greater than the */
|
||||
/* EM. */
|
||||
/* */
|
||||
/* this means that setting the pixel size to 8x8 doesn't guarantee */
|
||||
/* in any way that you'll end up with glyph bitmaps that all fit */
|
||||
/* within an 8x8 cell.. far from it.. */
|
||||
/* This means that setting the pixel size to, say, 8x8 doesn't */
|
||||
/* guarantee in any way that you will get glyph bitmaps that all fit */
|
||||
/* within an 8x8 cell (sometimes even far from it). */
|
||||
/* */
|
||||
FT_EXPORT_DEF( FT_Error ) FT_Set_Pixel_Sizes( FT_Face face,
|
||||
FT_UInt pixel_width,
|
||||
|
|
|
@ -26,7 +26,8 @@
|
|||
#endif
|
||||
|
||||
|
||||
FT_CALLBACK_TABLE const FT_Driver_Class cff_driver_class;
|
||||
FT_CALLBACK_TABLE
|
||||
const FT_Driver_Class cff_driver_class;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -151,7 +151,7 @@
|
|||
/* FreeType error code. 0 means success. An error is returned if a */
|
||||
/* reallocation fails. */
|
||||
/* */
|
||||
FT_LOCAL
|
||||
FT_LOCAL_DEF
|
||||
FT_Error PS_Table_Add( PS_Table* table,
|
||||
FT_Int index,
|
||||
void* object,
|
||||
|
|
|
@ -29,7 +29,8 @@
|
|||
#endif
|
||||
|
||||
|
||||
FT_CALLBACK_TABLE const T1_Decoder_Funcs t1_decoder_funcs;
|
||||
FT_CALLBACK_TABLE
|
||||
const T1_Decoder_Funcs t1_decoder_funcs;
|
||||
|
||||
|
||||
FT_LOCAL
|
||||
|
|
|
@ -43,13 +43,17 @@
|
|||
#define FT_COMPONENT trace_ttcmap
|
||||
|
||||
|
||||
FT_CALLBACK_DEF FT_UInt code_to_index0( TT_CMapTable* charmap,
|
||||
FT_CALLBACK_DEF
|
||||
FT_UInt code_to_index0( TT_CMapTable* charmap,
|
||||
FT_ULong char_code );
|
||||
FT_CALLBACK_DEF FT_UInt code_to_index2( TT_CMapTable* charmap,
|
||||
FT_CALLBACK_DEF
|
||||
FT_UInt code_to_index2( TT_CMapTable* charmap,
|
||||
FT_ULong char_code );
|
||||
FT_CALLBACK_DEF FT_UInt code_to_index4( TT_CMapTable* charmap,
|
||||
FT_CALLBACK_DEF
|
||||
FT_UInt code_to_index4( TT_CMapTable* charmap,
|
||||
FT_ULong char_code );
|
||||
FT_CALLBACK_DEF FT_UInt code_to_index6( TT_CMapTable* charmap,
|
||||
FT_CALLBACK_DEF
|
||||
FT_UInt code_to_index6( TT_CMapTable* charmap,
|
||||
FT_ULong char_code );
|
||||
|
||||
|
||||
|
|
|
@ -109,9 +109,11 @@
|
|||
|
||||
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
|
||||
|
||||
FT_LOCAL void TT_Done_GlyphZone( TT_GlyphZone* zone );
|
||||
FT_LOCAL
|
||||
void TT_Done_GlyphZone( TT_GlyphZone* zone );
|
||||
|
||||
FT_LOCAL FT_Error TT_New_GlyphZone( FT_Memory memory,
|
||||
FT_LOCAL
|
||||
FT_Error TT_New_GlyphZone( FT_Memory memory,
|
||||
FT_UShort maxPoints,
|
||||
FT_Short maxContours,
|
||||
TT_GlyphZone* zone );
|
||||
|
|
Loading…
Reference in New Issue