aboutsummaryrefslogtreecommitdiff
path: root/freetype/include
diff options
context:
space:
mode:
Diffstat (limited to 'freetype/include')
-rw-r--r--freetype/include/freetype/config/ftconfig.h2
-rw-r--r--freetype/include/freetype/freetype.h36
-rw-r--r--freetype/include/freetype/ftlcdfil.h2
-rw-r--r--freetype/include/freetype/ftmodapi.h35
-rw-r--r--freetype/include/freetype/internal/ftobjs.h31
5 files changed, 101 insertions, 5 deletions
diff --git a/freetype/include/freetype/config/ftconfig.h b/freetype/include/freetype/config/ftconfig.h
index 43d587e02..cbe30f268 100644
--- a/freetype/include/freetype/config/ftconfig.h
+++ b/freetype/include/freetype/config/ftconfig.h
@@ -363,7 +363,7 @@ FT_BEGIN_HEADER
#endif /* __arm__ && !__thumb__ && !( __CC_ARM || __ARMCC__ ) */
-#if defined( i386 )
+#if defined( __i386__ )
#define FT_MULFIX_ASSEMBLER FT_MulFix_i386
/* documentation is in freetype.h */
diff --git a/freetype/include/freetype/freetype.h b/freetype/include/freetype/freetype.h
index e2ab77437..7799b70b1 100644
--- a/freetype/include/freetype/freetype.h
+++ b/freetype/include/freetype/freetype.h
@@ -1952,6 +1952,9 @@ FT_BEGIN_HEADER
/* Each new face object created with this function also owns a */
/* default @FT_Size object, accessible as `face->size'. */
/* */
+ /* See the discussion of reference counters in the description of */
+ /* @FT_Reference_Face. */
+ /* */
FT_EXPORT( FT_Error )
FT_Open_Face( FT_Library library,
const FT_Open_Args* args,
@@ -2019,6 +2022,33 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <Function> */
+ /* FT_Reference_Face */
+ /* */
+ /* <Description> */
+ /* A counter gets initialized to~1 at the time an @FT_Face structure */
+ /* is created. This function increments the counter. @FT_Done_Face */
+ /* then only destroys a face if the counter is~1, otherwise it simply */
+ /* decrements the counter. */
+ /* */
+ /* This function helps in managing life-cycles of structures which */
+ /* reference @FT_Face objects. */
+ /* */
+ /* <Input> */
+ /* face :: A handle to a target face object. */
+ /* */
+ /* <Return> */
+ /* FreeType error code. 0~means success. */
+ /* */
+ /* <Since> */
+ /* 2.4.2 */
+ /* */
+ FT_EXPORT( FT_Error )
+ FT_Reference_Face( FT_Face face );
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
/* FT_Done_Face */
/* */
/* <Description> */
@@ -2031,6 +2061,10 @@ FT_BEGIN_HEADER
/* <Return> */
/* FreeType error code. 0~means success. */
/* */
+ /* <Note> */
+ /* See the discussion of reference counters in the description of */
+ /* @FT_Reference_Face. */
+ /* */
FT_EXPORT( FT_Error )
FT_Done_Face( FT_Face face );
@@ -3774,7 +3808,7 @@ FT_BEGIN_HEADER
*/
#define FREETYPE_MAJOR 2
#define FREETYPE_MINOR 4
-#define FREETYPE_PATCH 1
+#define FREETYPE_PATCH 2
/*************************************************************************/
diff --git a/freetype/include/freetype/ftlcdfil.h b/freetype/include/freetype/ftlcdfil.h
index e23525e1b..45add8675 100644
--- a/freetype/include/freetype/ftlcdfil.h
+++ b/freetype/include/freetype/ftlcdfil.h
@@ -58,7 +58,7 @@ FT_BEGIN_HEADER
/****************************************************************************
*
- * @func:
+ * @enum:
* FT_LcdFilter
*
* @description:
diff --git a/freetype/include/freetype/ftmodapi.h b/freetype/include/freetype/ftmodapi.h
index bceb31595..45bce4d31 100644
--- a/freetype/include/freetype/ftmodapi.h
+++ b/freetype/include/freetype/ftmodapi.h
@@ -252,6 +252,33 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <Function> */
+ /* FT_Reference_Library */
+ /* */
+ /* <Description> */
+ /* A counter gets initialized to~1 at the time an @FT_Library */
+ /* structure is created. This function increments the counter. */
+ /* @FT_Done_Library then only destroys a library if the counter is~1, */
+ /* otherwise it simply decrements the counter. */
+ /* */
+ /* This function helps in managing life-cycles of structures which */
+ /* reference @FT_Library objects. */
+ /* */
+ /* <Input> */
+ /* library :: A handle to a target library object. */
+ /* */
+ /* <Return> */
+ /* FreeType error code. 0~means success. */
+ /* */
+ /* <Since> */
+ /* 2.4.2 */
+ /* */
+ FT_EXPORT( FT_Error )
+ FT_Reference_Library( FT_Library library );
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
/* FT_New_Library */
/* */
/* <Description> */
@@ -275,6 +302,10 @@ FT_BEGIN_HEADER
/* <Return> */
/* FreeType error code. 0~means success. */
/* */
+ /* <Note> */
+ /* See the discussion of reference counters in the description of */
+ /* @FT_Reference_Library. */
+ /* */
FT_EXPORT( FT_Error )
FT_New_Library( FT_Memory memory,
FT_Library *alibrary );
@@ -295,6 +326,10 @@ FT_BEGIN_HEADER
/* <Return> */
/* FreeType error code. 0~means success. */
/* */
+ /* <Note> */
+ /* See the discussion of reference counters in the description of */
+ /* @FT_Reference_Library. */
+ /* */
FT_EXPORT( FT_Error )
FT_Done_Library( FT_Library library );
diff --git a/freetype/include/freetype/internal/ftobjs.h b/freetype/include/freetype/internal/ftobjs.h
index e715b15b3..beae95e31 100644
--- a/freetype/include/freetype/internal/ftobjs.h
+++ b/freetype/include/freetype/internal/ftobjs.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType private base classes (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2008 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2008, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -311,6 +311,12 @@ FT_BEGIN_HEADER
/* in the case when the unpatented hinter is compiled within the */
/* library. */
/* */
+ /* refcount :: */
+ /* A counter initialized to~1 at the time an @FT_Face structure is */
+ /* created. @FT_Reference_Face increments this counter, and */
+ /* @FT_Done_Face only destroys a face if the counter is~1, */
+ /* otherwise it simply decrements it. */
+ /* */
typedef struct FT_Face_InternalRec_
{
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
@@ -328,6 +334,7 @@ FT_BEGIN_HEADER
#endif
FT_Bool ignore_unpatented_hinter;
+ FT_UInt refcount;
} FT_Face_InternalRec;
@@ -805,10 +812,28 @@ FT_BEGIN_HEADER
/* */
/* debug_hooks :: XXX */
/* */
+ /* lcd_filter :: If subpixel rendering is activated, the */
+ /* selected LCD filter mode. */
+ /* */
+ /* lcd_extra :: If subpixel rendering is activated, the number */
+ /* of extra pixels needed for the LCD filter. */
+ /* */
+ /* lcd_weights :: If subpixel rendering is activated, the LCD */
+ /* filter weights, if any. */
+ /* */
+ /* lcd_filter_func :: If subpixel rendering is activated, the LCD */
+ /* filtering callback function. */
+ /* */
/* pic_container :: Contains global structs and tables, instead */
/* of defining them globallly. */
/* */
-
+ /* refcount :: A counter initialized to~1 at the time an */
+ /* @FT_Library structure is created. */
+ /* @FT_Reference_Library increments this counter, */
+ /* and @FT_Done_Library only destroys a library */
+ /* if the counter is~1, otherwise it simply */
+ /* decrements it. */
+ /* */
typedef struct FT_LibraryRec_
{
FT_Memory memory; /* library's memory manager */
@@ -843,6 +868,8 @@ FT_BEGIN_HEADER
FT_PIC_Container pic_container;
#endif
+ FT_UInt refcount;
+
} FT_LibraryRec;