summaryrefslogtreecommitdiffstats
path: root/include/freetype/config
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2008-10-21 07:00:00 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2008-10-21 07:00:00 -0700
commita38fc482eeeb2c1929803c233835369dcf1b8781 (patch)
tree73115efff0a679d5d62e2150a35d135651175ec7 /include/freetype/config
parentf463818dd9146e11105c0572fb119e757eb47768 (diff)
downloadandroid_external_freetype-a38fc482eeeb2c1929803c233835369dcf1b8781.tar.gz
android_external_freetype-a38fc482eeeb2c1929803c233835369dcf1b8781.tar.bz2
android_external_freetype-a38fc482eeeb2c1929803c233835369dcf1b8781.zip
Initial Contribution
Diffstat (limited to 'include/freetype/config')
-rw-r--r--include/freetype/config/ftconfig.h122
-rw-r--r--include/freetype/config/ftheader.h50
-rw-r--r--include/freetype/config/ftmodule.h8
-rw-r--r--include/freetype/config/ftoption.h26
4 files changed, 190 insertions, 16 deletions
diff --git a/include/freetype/config/ftconfig.h b/include/freetype/config/ftconfig.h
index 1547f5a..8336be5 100644
--- a/include/freetype/config/ftconfig.h
+++ b/include/freetype/config/ftconfig.h
@@ -45,7 +45,6 @@
FT_BEGIN_HEADER
-
/*************************************************************************/
/* */
/* PLATFORM-SPECIFIC CONFIGURATION MACROS */
@@ -139,12 +138,63 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
- /* IntN types */
+ /* <Section> */
+ /* basic_types */
+ /* */
+ /*************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* <Type> */
+ /* FT_Int16 */
+ /* */
+ /* <Description> */
+ /* A typedef for a 16bit signed integer type. */
+ /* */
+ typedef signed short FT_Int16;
+
+
+ /*************************************************************************/
+ /* */
+ /* <Type> */
+ /* FT_UInt16 */
/* */
- /* Used to guarantee the size of some specific integers. */
+ /* <Description> */
+ /* A typedef for a 16bit unsigned integer type. */
/* */
- typedef signed short FT_Int16;
typedef unsigned short FT_UInt16;
+ /* */
+
+
+ /* this #if 0 ... #endif clause is for documentation purposes */
+#if 0
+
+ /*************************************************************************/
+ /* */
+ /* <Type> */
+ /* FT_Int32 */
+ /* */
+ /* <Description> */
+ /* A typedef for a 32bit signed integer type. The size depends on */
+ /* the configuration. */
+ /* */
+ typedef signed XXX FT_Int32;
+
+
+ /*************************************************************************/
+ /* */
+ /* <Type> */
+ /* FT_UInt32 */
+ /* */
+ /* A typedef for a 32bit unsigned integer type. The size depends on */
+ /* the configuration. */
+ /* */
+ typedef unsigned XXX FT_UInt32;
+
+ /* */
+
+#endif
#if FT_SIZEOF_INT == (32 / FT_CHAR_BIT)
@@ -173,6 +223,68 @@ FT_BEGIN_HEADER
#endif
+#if !defined(FT_CONFIG_OPTION_NO_ASSEMBLER)
+/* provide assembler fragments for performance-critical
+ * functions. these must be defined static __inline__
+ * with GCC
+ */
+#if defined(__GNUC__)
+
+# if defined(__arm__) && !defined(__thumb__)
+# define FT_MULFIX_ASSEMBLER FT_MulFix_arm
+ static __inline__ FT_Int32
+ FT_MulFix_arm( FT_Int32 a, FT_Int32 b )
+ {
+ register FT_Int32 t, t2;
+ asm __volatile__ (
+ "smull %1, %2, %4, %3\n\t" /* (lo=%1,hi=%2) = a*b */
+ "mov %0, %2, asr #31\n\t" /* %0 = (hi >> 31) */
+ "add %0, %0, #0x8000\n\t" /* %0 += 0x8000 */
+ "adds %1, %1, %0\n\t" /* %1 += %0 */
+ "adc %2, %2, #0\n\t" /* %2 += carry */
+ "mov %0, %1, lsr #16\n\t" /* %0 = %1 >> 16 */
+ "orr %0, %2, lsl #16\n\t" /* %0 |= %2 << 16 */
+ : "=r"(a), "=&r"(t2), "=&r"(t)
+ : "r"(a), "r"(b)
+ );
+ return a;
+ }
+# endif
+
+# if defined(i386)
+# define FT__MULFIX_ASSEMBLER FT_MulFix_i386
+ static __inline__ FT_Int32
+ FT_MulFix_i386( FT_Int32 a, FT_Int32 b )
+ {
+ register FT_Int32 result;
+
+ __asm__ __volatile__ (
+ "imul %%edx\n"
+ "movl %%edx, %%ecx\n"
+ "sarl $31, %%ecx\n"
+ "addl $0x8000, %%ecx\n"
+ "addl %%ecx, %%eax\n"
+ "adcl $0, %%edx\n"
+ "shrl $16, %%eax\n"
+ "shll $16, %%edx\n"
+ "addl %%edx, %%eax\n"
+ : "=a"(result)
+ : "a"(a), "d"(b)
+ : "%ecx"
+ );
+ return result;
+ }
+# endif
+
+#endif /* __GNUC__ */
+#endif /* !NO_ASSEMBLER */
+
+#ifdef FT_CONFIG_OPTION_INLINE_MULFIX
+# ifdef FT_MULFIX_ASSEMBLER
+# define FT_MULFIX_INLINED FT_MULFIX_ASSEMBLER
+# endif
+#endif
+
/* determine whether we have a 64-bit int type for platforms without */
/* Autoconf */
@@ -272,7 +384,7 @@ FT_BEGIN_HEADER
#ifndef FT_BASE_DEF
#ifdef __cplusplus
-#define FT_BASE_DEF( x ) x
+#define FT_BASE_DEF( x ) extern "C" x
#else
#define FT_BASE_DEF( x ) x
#endif
diff --git a/include/freetype/config/ftheader.h b/include/freetype/config/ftheader.h
index b957d05..0279a3f 100644
--- a/include/freetype/config/ftheader.h
+++ b/include/freetype/config/ftheader.h
@@ -4,7 +4,7 @@
/* */
/* Build macros of the FreeType 2 library. */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -156,6 +156,7 @@
#define FT_CONFIG_MODULES_H <freetype/config/ftmodule.h>
#endif
+ /* */
/* public headers */
@@ -381,6 +382,18 @@
*
*/
#define FT_BDF_H <freetype/ftbdf.h>
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_CID_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * definitions of an API which access CID font information from a
+ * face.
+ *
+ */
+#define FT_CID_H <freetype/ftcid.h>
/*************************************************************************
@@ -681,6 +694,30 @@
/*************************************************************************
*
* @macro:
+ * FT_UNPATENTED_HINTING_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * FreeType 2 API which performs color filtering for subpixel rendering.
+ */
+#define FT_UNPATENTED_HINTING_H <freetype/ttunpat.h>
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_INCREMENTAL_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * FreeType 2 API which performs color filtering for subpixel rendering.
+ */
+#define FT_INCREMENTAL_H <freetype/ftincrem.h>
+
+
+ /*************************************************************************
+ *
+ * @macro:
* FT_GASP_H
*
* @description:
@@ -690,6 +727,17 @@
#define FT_GASP_H <freetype/ftgasp.h>
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_ADVANCES_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * FreeType 2 API which returns individual and ranged glyph advances
+ */
+#define FT_ADVANCES_H <freetype/ftadvanc.h>
+
/* */
#define FT_ERROR_DEFINITIONS_H <freetype/fterrdef.h>
diff --git a/include/freetype/config/ftmodule.h b/include/freetype/config/ftmodule.h
index d92b0ee..4b629bb 100644
--- a/include/freetype/config/ftmodule.h
+++ b/include/freetype/config/ftmodule.h
@@ -12,14 +12,7 @@
FT_USE_MODULE(autofit_module_class)
FT_USE_MODULE(tt_driver_class)
-FT_USE_MODULE(t1_driver_class)
FT_USE_MODULE(cff_driver_class)
-FT_USE_MODULE(t1cid_driver_class)
-FT_USE_MODULE(pfr_driver_class)
-FT_USE_MODULE(t42_driver_class)
-FT_USE_MODULE(winfnt_driver_class)
-FT_USE_MODULE(pcf_driver_class)
-FT_USE_MODULE(psaux_module_class)
FT_USE_MODULE(psnames_module_class)
FT_USE_MODULE(pshinter_module_class)
FT_USE_MODULE(ft_raster1_renderer_class)
@@ -27,6 +20,5 @@ FT_USE_MODULE(sfnt_module_class)
FT_USE_MODULE(ft_smooth_renderer_class)
FT_USE_MODULE(ft_smooth_lcd_renderer_class)
FT_USE_MODULE(ft_smooth_lcdv_renderer_class)
-FT_USE_MODULE(bdf_driver_class)
/* EOF */
diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h
index 532848d..a92e19b 100644
--- a/include/freetype/config/ftoption.h
+++ b/include/freetype/config/ftoption.h
@@ -4,7 +4,7 @@
/* */
/* User-selectable configuration macros (specification only). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -117,6 +117,26 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
+ /* When this macro is defined, do not try to use an assembler version */
+ /* of performance-critical functions (e.g. FT_MulFix). you should only */
+ /* do that to verify that the assembler function works properly, or even */
+ /* to benchmarks the various implementations... */
+/* #define FT_CONFIG_OPTION_NO_ASSEMBLER */
+
+ /*************************************************************************/
+ /* */
+ /* When this macro is defined, try to use an inlined assembler version */
+ /* of the FT_MulFix function, which appears to be a hotspot when loading */
+ /* and hinting glyphs. */
+ /* */
+ /* note that if your compiler/cpu isn't supported, this will default to */
+ /* the standard and portable implementation found in src/base/ftcalc.c */
+ /* */
+#define FT_CONFIG_OPTION_INLINE_MULFIX
+
+
+ /*************************************************************************/
+ /* */
/* LZW-compressed file support. */
/* */
/* FreeType now handles font files that have been compressed with the */
@@ -436,6 +456,7 @@ FT_BEGIN_HEADER
#define TT_CONFIG_CMAP_FORMAT_8
#define TT_CONFIG_CMAP_FORMAT_10
#define TT_CONFIG_CMAP_FORMAT_12
+#define TT_CONFIG_CMAP_FORMAT_14
/*************************************************************************/
@@ -624,7 +645,8 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
- /* Compile autofit module with CJK script support. */
+ /* Compile autofit module with CJK (Chinese, Japanese, Korean) script */
+ /* support. */
/* */
#define AF_CONFIG_OPTION_CJK