Skip to content
This repository
Browse code

Add freetype.framework and edit CMake accordingly. (Close #241)

Freetype version 2.4.11, build for OS X 10.5 and above as universal
binary (i386 + x86_64)
  • Loading branch information...
commit 54bc8644844aaea2209c495f57b240cd371810c6 1 parent 538d49a
Marco Antognini authored January 19, 2013

Showing 73 changed files with 21,254 additions and 8 deletions. Show diff stats Hide diff stats

  1. 1  CMakeLists.txt
  2. 545  extlibs/headers/libfreetype/osx/freetype2/freetype/config/ftconfig.h
  3. 806  extlibs/headers/libfreetype/osx/freetype2/freetype/config/ftheader.h
  4. 20  extlibs/headers/libfreetype/osx/freetype2/freetype/config/ftmodule.h
  5. 827  extlibs/headers/libfreetype/osx/freetype2/freetype/config/ftoption.h
  6. 174  extlibs/headers/libfreetype/osx/freetype2/freetype/config/ftstdlib.h
  7. 3,990  extlibs/headers/libfreetype/osx/freetype2/freetype/freetype.h
  8. 179  extlibs/headers/libfreetype/osx/freetype2/freetype/ftadvanc.h
  9. 349  extlibs/headers/libfreetype/osx/freetype2/freetype/ftautoh.h
  10. 102  extlibs/headers/libfreetype/osx/freetype2/freetype/ftbbox.h
  11. 209  extlibs/headers/libfreetype/osx/freetype2/freetype/ftbdf.h
  12. 0  extlibs/headers/{ → libfreetype/osx/freetype2}/freetype/ftbitmap.h
  13. 102  extlibs/headers/libfreetype/osx/freetype2/freetype/ftbzip2.h
  14. 1,140  extlibs/headers/libfreetype/osx/freetype2/freetype/ftcache.h
  15. 118  extlibs/headers/libfreetype/osx/freetype2/freetype/ftchapters.h
  16. 166  extlibs/headers/libfreetype/osx/freetype2/freetype/ftcid.h
  17. 247  extlibs/headers/libfreetype/osx/freetype2/freetype/fterrdef.h
  18. 207  extlibs/headers/libfreetype/osx/freetype2/freetype/fterrors.h
  19. 128  extlibs/headers/libfreetype/osx/freetype2/freetype/ftgasp.h
  20. 620  extlibs/headers/libfreetype/osx/freetype2/freetype/ftglyph.h
  21. 358  extlibs/headers/libfreetype/osx/freetype2/freetype/ftgxval.h
  22. 102  extlibs/headers/libfreetype/osx/freetype2/freetype/ftgzip.h
  23. 0  extlibs/headers/{ → libfreetype/osx/freetype2}/freetype/ftimage.h
  24. 353  extlibs/headers/libfreetype/osx/freetype2/freetype/ftincrem.h
  25. 213  extlibs/headers/libfreetype/osx/freetype2/freetype/ftlcdfil.h
  26. 277  extlibs/headers/libfreetype/osx/freetype2/freetype/ftlist.h
  27. 99  extlibs/headers/libfreetype/osx/freetype2/freetype/ftlzw.h
  28. 274  extlibs/headers/libfreetype/osx/freetype2/freetype/ftmac.h
  29. 378  extlibs/headers/libfreetype/osx/freetype2/freetype/ftmm.h
  30. 634  extlibs/headers/libfreetype/osx/freetype2/freetype/ftmodapi.h
  31. 156  extlibs/headers/libfreetype/osx/freetype2/freetype/ftmoderr.h
  32. 203  extlibs/headers/libfreetype/osx/freetype2/freetype/ftotval.h
  33. 558  extlibs/headers/libfreetype/osx/freetype2/freetype/ftoutln.h
  34. 172  extlibs/headers/libfreetype/osx/freetype2/freetype/ftpfr.h
  35. 238  extlibs/headers/libfreetype/osx/freetype2/freetype/ftrender.h
  36. 159  extlibs/headers/libfreetype/osx/freetype2/freetype/ftsizes.h
  37. 200  extlibs/headers/libfreetype/osx/freetype2/freetype/ftsnames.h
  38. 751  extlibs/headers/libfreetype/osx/freetype2/freetype/ftstroke.h
  39. 81  extlibs/headers/libfreetype/osx/freetype2/freetype/ftsynth.h
  40. 0  extlibs/headers/{ → libfreetype/osx/freetype2}/freetype/ftsystem.h
  41. 350  extlibs/headers/libfreetype/osx/freetype2/freetype/fttrigon.h
  42. 588  extlibs/headers/libfreetype/osx/freetype2/freetype/fttypes.h
  43. 274  extlibs/headers/libfreetype/osx/freetype2/freetype/ftwinfnt.h
  44. 83  extlibs/headers/libfreetype/osx/freetype2/freetype/ftxf86.h
  45. 662  extlibs/headers/libfreetype/osx/freetype2/freetype/t1tables.h
  46. 1,237  extlibs/headers/libfreetype/osx/freetype2/freetype/ttnameid.h
  47. 777  extlibs/headers/libfreetype/osx/freetype2/freetype/tttables.h
  48. 107  extlibs/headers/libfreetype/osx/freetype2/freetype/tttags.h
  49. 59  extlibs/headers/libfreetype/osx/freetype2/freetype/ttunpat.h
  50. 61  extlibs/headers/libfreetype/osx/ft2build.h
  51. 0  extlibs/headers/{ → libfreetype/windows}/freetype/config/ftconfig.h
  52. 0  extlibs/headers/{ → libfreetype/windows}/freetype/config/ftheader.h
  53. 0  extlibs/headers/{ → libfreetype/windows}/freetype/config/ftmodule.h
  54. 0  extlibs/headers/{ → libfreetype/windows}/freetype/config/ftoption.h
  55. 0  extlibs/headers/{ → libfreetype/windows}/freetype/config/ftstdlib.h
  56. 0  extlibs/headers/{ → libfreetype/windows}/freetype/freetype.h
  57. 227  extlibs/headers/libfreetype/windows/freetype/ftbitmap.h
  58. 0  extlibs/headers/{ → libfreetype/windows}/freetype/fterrdef.h
  59. 0  extlibs/headers/{ → libfreetype/windows}/freetype/fterrors.h
  60. 0  extlibs/headers/{ → libfreetype/windows}/freetype/ftglyph.h
  61. 1,313  extlibs/headers/libfreetype/windows/freetype/ftimage.h
  62. 0  extlibs/headers/{ → libfreetype/windows}/freetype/ftmoderr.h
  63. 0  extlibs/headers/{ → libfreetype/windows}/freetype/ftoutln.h
  64. 347  extlibs/headers/libfreetype/windows/freetype/ftsystem.h
  65. 0  extlibs/headers/{ → libfreetype/windows}/freetype/fttypes.h
  66. 0  extlibs/headers/{ → libfreetype/windows}/freetype/internal/internal.h
  67. 0  extlibs/headers/{ → libfreetype/windows}/ft2build.h
  68. 1  extlibs/libs-osx/Frameworks/freetype.framework/Resources
  69. 20  extlibs/libs-osx/Frameworks/freetype.framework/Versions/A/Resources/Info.plist
  70. BIN  extlibs/libs-osx/Frameworks/freetype.framework/Versions/A/freetype
  71. 1  extlibs/libs-osx/Frameworks/freetype.framework/Versions/Current
  72. 1  extlibs/libs-osx/Frameworks/freetype.framework/freetype
  73. 18  src/SFML/Graphics/CMakeLists.txt
1  CMakeLists.txt
@@ -196,6 +196,7 @@ if(WINDOWS)
196 196
     endif()
197 197
 elseif(MACOSX)
198 198
     install(DIRECTORY extlibs/libs-osx/Frameworks/sndfile.framework DESTINATION ${CMAKE_INSTALL_FRAMEWORK_PREFIX})
  199
+    install(DIRECTORY extlibs/libs-osx/Frameworks/freetype.framework DESTINATION ${CMAKE_INSTALL_FRAMEWORK_PREFIX})
199 200
 
200 201
     if(SFML_INSTALL_XCODE4_TEMPLATES)
201 202
         install(DIRECTORY tools/xcode/templates/SFML DESTINATION /Library/Developer/Xcode/Templates)
545  extlibs/headers/libfreetype/osx/freetype2/freetype/config/ftconfig.h
... ...
@@ -0,0 +1,545 @@
  1
+/* ftconfig.h.  Generated from ftconfig.in by configure.  */
  2
+/***************************************************************************/
  3
+/*                                                                         */
  4
+/*  ftconfig.in                                                            */
  5
+/*                                                                         */
  6
+/*    UNIX-specific configuration file (specification only).               */
  7
+/*                                                                         */
  8
+/*  Copyright 1996-2004, 2006-2009, 2011 by                                */
  9
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
  10
+/*                                                                         */
  11
+/*  This file is part of the FreeType project, and may only be used,       */
  12
+/*  modified, and distributed under the terms of the FreeType project      */
  13
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
  14
+/*  this file you indicate that you have read the license and              */
  15
+/*  understand and accept it fully.                                        */
  16
+/*                                                                         */
  17
+/***************************************************************************/
  18
+
  19
+
  20
+  /*************************************************************************/
  21
+  /*                                                                       */
  22
+  /* This header file contains a number of macro definitions that are used */
  23
+  /* by the rest of the engine.  Most of the macros here are automatically */
  24
+  /* determined at compile time, and you should not need to change it to   */
  25
+  /* port FreeType, except to compile the library with a non-ANSI          */
  26
+  /* compiler.                                                             */
  27
+  /*                                                                       */
  28
+  /* Note however that if some specific modifications are needed, we       */
  29
+  /* advise you to place a modified copy in your build directory.          */
  30
+  /*                                                                       */
  31
+  /* The build directory is usually `freetype/builds/<system>', and        */
  32
+  /* contains system-specific files that are always included first when    */
  33
+  /* building the library.                                                 */
  34
+  /*                                                                       */
  35
+  /*************************************************************************/
  36
+
  37
+
  38
+#ifndef __FTCONFIG_H__
  39
+#define __FTCONFIG_H__
  40
+
  41
+#include <ft2build.h>
  42
+#include FT_CONFIG_OPTIONS_H
  43
+#include FT_CONFIG_STANDARD_LIBRARY_H
  44
+
  45
+
  46
+FT_BEGIN_HEADER
  47
+
  48
+
  49
+  /*************************************************************************/
  50
+  /*                                                                       */
  51
+  /*               PLATFORM-SPECIFIC CONFIGURATION MACROS                  */
  52
+  /*                                                                       */
  53
+  /* These macros can be toggled to suit a specific system.  The current   */
  54
+  /* ones are defaults used to compile FreeType in an ANSI C environment   */
  55
+  /* (16bit compilers are also supported).  Copy this file to your own     */
  56
+  /* `freetype/builds/<system>' directory, and edit it to port the engine. */
  57
+  /*                                                                       */
  58
+  /*************************************************************************/
  59
+
  60
+
  61
+#define HAVE_UNISTD_H 1
  62
+#define HAVE_FCNTL_H 1
  63
+#define HAVE_STDINT_H 1
  64
+
  65
+
  66
+  /* There are systems (like the Texas Instruments 'C54x) where a `char' */
  67
+  /* has 16 bits.  ANSI C says that sizeof(char) is always 1.  Since an  */
  68
+  /* `int' has 16 bits also for this system, sizeof(int) gives 1 which   */
  69
+  /* is probably unexpected.                                             */
  70
+  /*                                                                     */
  71
+  /* `CHAR_BIT' (defined in limits.h) gives the number of bits in a      */
  72
+  /* `char' type.                                                        */
  73
+
  74
+#ifndef FT_CHAR_BIT
  75
+#define FT_CHAR_BIT  CHAR_BIT
  76
+#endif
  77
+
  78
+
  79
+/* #undef FT_USE_AUTOCONF_SIZEOF_TYPES */
  80
+#ifdef FT_USE_AUTOCONF_SIZEOF_TYPES
  81
+
  82
+#define SIZEOF_INT 4
  83
+#define SIZEOF_LONG 4
  84
+#define FT_SIZEOF_INT  SIZEOF_INT
  85
+#define FT_SIZEOF_LONG SIZEOF_LONG
  86
+
  87
+#else /* !FT_USE_AUTOCONF_SIZEOF_TYPES */
  88
+
  89
+  /* Following cpp computation of the bit length of int and long */
  90
+  /* is copied from default include/freetype/config/ftconfig.h.  */
  91
+  /* If any improvement is required for this file, it should be  */
  92
+  /* applied to the original header file for the builders that   */
  93
+  /* does not use configure script.                              */
  94
+
  95
+  /* The size of an `int' type.  */
  96
+#if                                 FT_UINT_MAX == 0xFFFFUL
  97
+#define FT_SIZEOF_INT  (16 / FT_CHAR_BIT)
  98
+#elif                               FT_UINT_MAX == 0xFFFFFFFFUL
  99
+#define FT_SIZEOF_INT  (32 / FT_CHAR_BIT)
  100
+#elif FT_UINT_MAX > 0xFFFFFFFFUL && FT_UINT_MAX == 0xFFFFFFFFFFFFFFFFUL
  101
+#define FT_SIZEOF_INT  (64 / FT_CHAR_BIT)
  102
+#else
  103
+#error "Unsupported size of `int' type!"
  104
+#endif
  105
+
  106
+  /* The size of a `long' type.  A five-byte `long' (as used e.g. on the */
  107
+  /* DM642) is recognized but avoided.                                   */
  108
+#if                                  FT_ULONG_MAX == 0xFFFFFFFFUL
  109
+#define FT_SIZEOF_LONG  (32 / FT_CHAR_BIT)
  110
+#elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFUL
  111
+#define FT_SIZEOF_LONG  (32 / FT_CHAR_BIT)
  112
+#elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFFFFFFFUL
  113
+#define FT_SIZEOF_LONG  (64 / FT_CHAR_BIT)
  114
+#else
  115
+#error "Unsupported size of `long' type!"
  116
+#endif
  117
+
  118
+#endif /* !FT_USE_AUTOCONF_SIZEOF_TYPES */
  119
+
  120
+
  121
+  /* FT_UNUSED is a macro used to indicate that a given parameter is not  */
  122
+  /* used -- this is only used to get rid of unpleasant compiler warnings */
  123
+#ifndef FT_UNUSED
  124
+#define FT_UNUSED( arg )  ( (arg) = (arg) )
  125
+#endif
  126
+
  127
+
  128
+  /*************************************************************************/
  129
+  /*                                                                       */
  130
+  /*                     AUTOMATIC CONFIGURATION MACROS                    */
  131
+  /*                                                                       */
  132
+  /* These macros are computed from the ones defined above.  Don't touch   */
  133
+  /* their definition, unless you know precisely what you are doing.  No   */
  134
+  /* porter should need to mess with them.                                 */
  135
+  /*                                                                       */
  136
+  /*************************************************************************/
  137
+
  138
+
  139
+  /*************************************************************************/
  140
+  /*                                                                       */
  141
+  /* Mac support                                                           */
  142
+  /*                                                                       */
  143
+  /*   This is the only necessary change, so it is defined here instead    */
  144
+  /*   providing a new configuration file.                                 */
  145
+  /*                                                                       */
  146
+#if defined( __APPLE__ ) || ( defined( __MWERKS__ ) && defined( macintosh ) )
  147
+  /* no Carbon frameworks for 64bit 10.4.x */
  148
+  /* AvailabilityMacros.h is available since Mac OS X 10.2,        */
  149
+  /* so guess the system version by maximum errno before inclusion */
  150
+#include <errno.h>
  151
+#ifdef ECANCELED /* defined since 10.2 */
  152
+#include "AvailabilityMacros.h"
  153
+#endif
  154
+#if defined( __LP64__ ) && \
  155
+    ( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 )
  156
+#undef FT_MACINTOSH
  157
+#endif
  158
+
  159
+#elif defined( __SC__ ) || defined( __MRC__ )
  160
+  /* Classic MacOS compilers */
  161
+#include "ConditionalMacros.h"
  162
+#if TARGET_OS_MAC
  163
+#define FT_MACINTOSH 1
  164
+#endif
  165
+
  166
+#endif
  167
+
  168
+
  169
+  /* Fix compiler warning with sgi compiler */
  170
+#if defined( __sgi ) && !defined( __GNUC__ )
  171
+#if defined( _COMPILER_VERSION ) && ( _COMPILER_VERSION >= 730 )
  172
+#pragma set woff 3505
  173
+#endif
  174
+#endif
  175
+
  176
+
  177
+  /*************************************************************************/
  178
+  /*                                                                       */
  179
+  /* IntN types                                                            */
  180
+  /*                                                                       */
  181
+  /*   Used to guarantee the size of some specific integers.               */
  182
+  /*                                                                       */
  183
+  typedef signed short    FT_Int16;
  184
+  typedef unsigned short  FT_UInt16;
  185
+
  186
+#if FT_SIZEOF_INT == 4
  187
+
  188
+  typedef signed int      FT_Int32;
  189
+  typedef unsigned int    FT_UInt32;
  190
+
  191
+#elif FT_SIZEOF_LONG == 4
  192
+
  193
+  typedef signed long     FT_Int32;
  194
+  typedef unsigned long   FT_UInt32;
  195
+
  196
+#else
  197
+#error "no 32bit type found -- please check your configuration files"
  198
+#endif
  199
+
  200
+
  201
+  /* look up an integer type that is at least 32 bits */
  202
+#if FT_SIZEOF_INT >= 4
  203
+
  204
+  typedef int            FT_Fast;
  205
+  typedef unsigned int   FT_UFast;
  206
+
  207
+#elif FT_SIZEOF_LONG >= 4
  208
+
  209
+  typedef long           FT_Fast;
  210
+  typedef unsigned long  FT_UFast;
  211
+
  212
+#endif
  213
+
  214
+
  215
+  /* determine whether we have a 64-bit int type for platforms without */
  216
+  /* Autoconf                                                          */
  217
+#if FT_SIZEOF_LONG == 8
  218
+
  219
+  /* FT_LONG64 must be defined if a 64-bit type is available */
  220
+#define FT_LONG64
  221
+#define FT_INT64  long
  222
+
  223
+#elif defined( _MSC_VER ) && _MSC_VER >= 900  /* Visual C++ (and Intel C++) */
  224
+
  225
+  /* this compiler provides the __int64 type */
  226
+#define FT_LONG64
  227
+#define FT_INT64  __int64
  228
+
  229
+#elif defined( __BORLANDC__ )  /* Borland C++ */
  230
+
  231
+  /* XXXX: We should probably check the value of __BORLANDC__ in order */
  232
+  /*       to test the compiler version.                               */
  233
+
  234
+  /* this compiler provides the __int64 type */
  235
+#define FT_LONG64
  236
+#define FT_INT64  __int64
  237
+
  238
+#elif defined( __WATCOMC__ )   /* Watcom C++ */
  239
+
  240
+  /* Watcom doesn't provide 64-bit data types */
  241
+
  242
+#elif defined( __MWERKS__ )    /* Metrowerks CodeWarrior */
  243
+
  244
+#define FT_LONG64
  245
+#define FT_INT64  long long int
  246
+
  247
+#elif defined( __GNUC__ )
  248
+
  249
+  /* GCC provides the `long long' type */
  250
+#define FT_LONG64
  251
+#define FT_INT64  long long int
  252
+
  253
+#endif /* FT_SIZEOF_LONG == 8 */
  254
+
  255
+
  256
+  /*************************************************************************/
  257
+  /*                                                                       */
  258
+  /* A 64-bit data type will create compilation problems if you compile    */
  259
+  /* in strict ANSI mode.  To avoid them, we disable its use if __STDC__   */
  260
+  /* is defined.  You can however ignore this rule by defining the         */
  261
+  /* FT_CONFIG_OPTION_FORCE_INT64 configuration macro.                     */
  262
+  /*                                                                       */
  263
+#if defined( FT_LONG64 ) && !defined( FT_CONFIG_OPTION_FORCE_INT64 )
  264
+
  265
+#ifdef __STDC__
  266
+
  267
+  /* Undefine the 64-bit macros in strict ANSI compilation mode.  */
  268
+  /* Since `#undef' doesn't survive in configuration header files */
  269
+  /* we use the postprocessing facility of AC_CONFIG_HEADERS to   */
  270
+  /* replace the leading `/' with `#'.                            */
  271
+#undef FT_LONG64
  272
+#undef FT_INT64
  273
+
  274
+#endif /* __STDC__ */
  275
+
  276
+#endif /* FT_LONG64 && !FT_CONFIG_OPTION_FORCE_INT64 */
  277
+
  278
+
  279
+#define FT_BEGIN_STMNT  do {
  280
+#define FT_END_STMNT    } while ( 0 )
  281
+#define FT_DUMMY_STMNT  FT_BEGIN_STMNT FT_END_STMNT
  282
+
  283
+
  284
+#ifndef  FT_CONFIG_OPTION_NO_ASSEMBLER
  285
+  /* Provide assembler fragments for performance-critical functions. */
  286
+  /* These must be defined `static __inline__' with GCC.             */
  287
+
  288
+#if defined( __CC_ARM ) || defined( __ARMCC__ )  /* RVCT */
  289
+#define FT_MULFIX_ASSEMBLER  FT_MulFix_arm
  290
+
  291
+  /* documentation is in freetype.h */
  292
+
  293
+  static __inline FT_Int32
  294
+  FT_MulFix_arm( FT_Int32  a,
  295
+                 FT_Int32  b )
  296
+  {
  297
+    register FT_Int32  t, t2;
  298
+
  299
+
  300
+    __asm
  301
+    {
  302
+      smull t2, t,  b,  a           /* (lo=t2,hi=t) = a*b */
  303
+      mov   a,  t,  asr #31         /* a   = (hi >> 31) */
  304
+      add   a,  a,  #0x8000         /* a  += 0x8000 */
  305
+      adds  t2, t2, a               /* t2 += a */
  306
+      adc   t,  t,  #0              /* t  += carry */
  307
+      mov   a,  t2, lsr #16         /* a   = t2 >> 16 */
  308
+      orr   a,  a,  t,  lsl #16     /* a  |= t << 16 */
  309
+    }
  310
+    return a;
  311
+  }
  312
+
  313
+#endif /* __CC_ARM || __ARMCC__ */
  314
+
  315
+
  316
+#ifdef __GNUC__
  317
+
  318
+#if defined( __arm__ ) && !defined( __thumb__ )    && \
  319
+    !( defined( __CC_ARM ) || defined( __ARMCC__ ) )
  320
+#define FT_MULFIX_ASSEMBLER  FT_MulFix_arm
  321
+
  322
+  /* documentation is in freetype.h */
  323
+
  324
+  static __inline__ FT_Int32
  325
+  FT_MulFix_arm( FT_Int32  a,
  326
+                 FT_Int32  b )
  327
+  {
  328
+    register FT_Int32  t, t2;
  329
+
  330
+
  331
+    __asm__ __volatile__ (
  332
+      "smull  %1, %2, %4, %3\n\t"       /* (lo=%1,hi=%2) = a*b */
  333
+      "mov    %0, %2, asr #31\n\t"      /* %0  = (hi >> 31) */
  334
+      "add    %0, %0, #0x8000\n\t"      /* %0 += 0x8000 */
  335
+      "adds   %1, %1, %0\n\t"           /* %1 += %0 */
  336
+      "adc    %2, %2, #0\n\t"           /* %2 += carry */
  337
+      "mov    %0, %1, lsr #16\n\t"      /* %0  = %1 >> 16 */
  338
+      "orr    %0, %0, %2, lsl #16\n\t"  /* %0 |= %2 << 16 */
  339
+      : "=r"(a), "=&r"(t2), "=&r"(t)
  340
+      : "r"(a), "r"(b) );
  341
+    return a;
  342
+  }
  343
+
  344
+#endif /* __arm__ && !__thumb__ && !( __CC_ARM || __ARMCC__ ) */
  345
+
  346
+#if defined( __i386__ )
  347
+#define FT_MULFIX_ASSEMBLER  FT_MulFix_i386
  348
+
  349
+  /* documentation is in freetype.h */
  350
+
  351
+  static __inline__ FT_Int32
  352
+  FT_MulFix_i386( FT_Int32  a,
  353
+                  FT_Int32  b )
  354
+  {
  355
+    register FT_Int32  result;
  356
+
  357
+
  358
+    __asm__ __volatile__ (
  359
+      "imul  %%edx\n"
  360
+      "movl  %%edx, %%ecx\n"
  361
+      "sarl  $31, %%ecx\n"
  362
+      "addl  $0x8000, %%ecx\n"
  363
+      "addl  %%ecx, %%eax\n"
  364
+      "adcl  $0, %%edx\n"
  365
+      "shrl  $16, %%eax\n"
  366
+      "shll  $16, %%edx\n"
  367
+      "addl  %%edx, %%eax\n"
  368
+      : "=a"(result), "=d"(b)
  369
+      : "a"(a), "d"(b)
  370
+      : "%ecx", "cc" );
  371
+    return result;
  372
+  }
  373
+
  374
+#endif /* i386 */
  375
+
  376
+#endif /* __GNUC__ */
  377
+
  378
+
  379
+#ifdef _MSC_VER /* Visual C++ */
  380
+
  381
+#ifdef _M_IX86
  382
+
  383
+#define FT_MULFIX_ASSEMBLER  FT_MulFix_i386
  384
+
  385
+  /* documentation is in freetype.h */
  386
+
  387
+  static __inline FT_Int32
  388
+  FT_MulFix_i386( FT_Int32  a,
  389
+                  FT_Int32  b )
  390
+  {
  391
+    register FT_Int32  result;
  392
+
  393
+    __asm
  394
+    {
  395
+      mov eax, a
  396
+      mov edx, b
  397
+      imul edx
  398
+      mov ecx, edx
  399
+      sar ecx, 31
  400
+      add ecx, 8000h
  401
+      add eax, ecx
  402
+      adc edx, 0
  403
+      shr eax, 16
  404
+      shl edx, 16
  405
+      add eax, edx
  406
+      mov result, eax
  407
+    }
  408
+    return result;
  409
+  }
  410
+
  411
+#endif /* _M_IX86 */
  412
+
  413
+#endif /* _MSC_VER */
  414
+
  415
+#endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */
  416
+
  417
+
  418
+#ifdef FT_CONFIG_OPTION_INLINE_MULFIX
  419
+#ifdef FT_MULFIX_ASSEMBLER
  420
+#define FT_MULFIX_INLINED  FT_MULFIX_ASSEMBLER
  421
+#endif
  422
+#endif
  423
+
  424
+
  425
+#ifdef FT_MAKE_OPTION_SINGLE_OBJECT
  426
+
  427
+#define FT_LOCAL( x )      static  x
  428
+#define FT_LOCAL_DEF( x )  static  x
  429
+
  430
+#else
  431
+
  432
+#ifdef __cplusplus
  433
+#define FT_LOCAL( x )      extern "C"  x
  434
+#define FT_LOCAL_DEF( x )  extern "C"  x
  435
+#else
  436
+#define FT_LOCAL( x )      extern  x
  437
+#define FT_LOCAL_DEF( x )  x
  438
+#endif
  439
+
  440
+#endif /* FT_MAKE_OPTION_SINGLE_OBJECT */
  441
+
  442
+
  443
+#ifndef FT_BASE
  444
+
  445
+#ifdef __cplusplus
  446
+#define FT_BASE( x )  extern "C"  x
  447
+#else
  448
+#define FT_BASE( x )  extern  x
  449
+#endif
  450
+
  451
+#endif /* !FT_BASE */
  452
+
  453
+
  454
+#ifndef FT_BASE_DEF
  455
+
  456
+#ifdef __cplusplus
  457
+#define FT_BASE_DEF( x )  x
  458
+#else
  459
+#define FT_BASE_DEF( x )  x
  460
+#endif
  461
+
  462
+#endif /* !FT_BASE_DEF */
  463
+
  464
+
  465
+#ifndef FT_EXPORT
  466
+
  467
+#ifdef __cplusplus
  468
+#define FT_EXPORT( x )  extern "C"  x
  469
+#else
  470
+#define FT_EXPORT( x )  extern  x
  471
+#endif
  472
+
  473
+#endif /* !FT_EXPORT */
  474
+
  475
+
  476
+#ifndef FT_EXPORT_DEF
  477
+
  478
+#ifdef __cplusplus
  479
+#define FT_EXPORT_DEF( x )  extern "C"  x
  480
+#else
  481
+#define FT_EXPORT_DEF( x )  extern  x
  482
+#endif
  483
+
  484
+#endif /* !FT_EXPORT_DEF */
  485
+
  486
+
  487
+#ifndef FT_EXPORT_VAR
  488
+
  489
+#ifdef __cplusplus
  490
+#define FT_EXPORT_VAR( x )  extern "C"  x
  491
+#else
  492
+#define FT_EXPORT_VAR( x )  extern  x
  493
+#endif
  494
+
  495
+#endif /* !FT_EXPORT_VAR */
  496
+
  497
+  /* The following macros are needed to compile the library with a   */
  498
+  /* C++ compiler and with 16bit compilers.                          */
  499
+  /*                                                                 */
  500
+
  501
+  /* This is special.  Within C++, you must specify `extern "C"' for */
  502
+  /* functions which are used via function pointers, and you also    */
  503
+  /* must do that for structures which contain function pointers to  */
  504
+  /* assure C linkage -- it's not possible to have (local) anonymous */
  505
+  /* functions which are accessed by (global) function pointers.     */
  506
+  /*                                                                 */
  507
+  /*                                                                 */
  508
+  /* FT_CALLBACK_DEF is used to _define_ a callback function.        */
  509
+  /*                                                                 */
  510
+  /* FT_CALLBACK_TABLE is used to _declare_ a constant variable that */
  511
+  /* contains pointers to callback functions.                        */
  512
+  /*                                                                 */
  513
+  /* FT_CALLBACK_TABLE_DEF is used to _define_ a constant variable   */
  514
+  /* that contains pointers to callback functions.                   */
  515
+  /*                                                                 */
  516
+  /*                                                                 */
  517
+  /* Some 16bit compilers have to redefine these macros to insert    */
  518
+  /* the infamous `_cdecl' or `__fastcall' declarations.             */
  519
+  /*                                                                 */
  520
+#ifndef FT_CALLBACK_DEF
  521
+#ifdef __cplusplus
  522
+#define FT_CALLBACK_DEF( x )  extern "C"  x
  523
+#else
  524
+#define FT_CALLBACK_DEF( x )  static  x
  525
+#endif
  526
+#endif /* FT_CALLBACK_DEF */
  527
+
  528
+#ifndef FT_CALLBACK_TABLE
  529
+#ifdef __cplusplus
  530
+#define FT_CALLBACK_TABLE      extern "C"
  531
+#define FT_CALLBACK_TABLE_DEF  extern "C"
  532
+#else
  533
+#define FT_CALLBACK_TABLE      extern
  534
+#define FT_CALLBACK_TABLE_DEF  /* nothing */
  535
+#endif
  536
+#endif /* FT_CALLBACK_TABLE */
  537
+
  538
+
  539
+FT_END_HEADER
  540
+
  541
+
  542
+#endif /* __FTCONFIG_H__ */
  543
+
  544
+
  545
+/* END */
806  extlibs/headers/libfreetype/osx/freetype2/freetype/config/ftheader.h
... ...
@@ -0,0 +1,806 @@
  1
+/***************************************************************************/
  2
+/*                                                                         */
  3
+/*  ftheader.h                                                             */
  4
+/*                                                                         */
  5
+/*    Build macros of the FreeType 2 library.                              */
  6
+/*                                                                         */
  7
+/*  Copyright 1996-2008, 2010, 2012 by                                     */
  8
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
  9
+/*                                                                         */
  10
+/*  This file is part of the FreeType project, and may only be used,       */
  11
+/*  modified, and distributed under the terms of the FreeType project      */
  12
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
  13
+/*  this file you indicate that you have read the license and              */
  14
+/*  understand and accept it fully.                                        */
  15
+/*                                                                         */
  16
+/***************************************************************************/
  17
+
  18
+#ifndef __FT_HEADER_H__
  19
+#define __FT_HEADER_H__
  20
+
  21
+
  22
+  /*@***********************************************************************/
  23
+  /*                                                                       */
  24
+  /* <Macro>                                                               */
  25
+  /*    FT_BEGIN_HEADER                                                    */
  26
+  /*                                                                       */
  27
+  /* <Description>                                                         */
  28
+  /*    This macro is used in association with @FT_END_HEADER in header    */
  29
+  /*    files to ensure that the declarations within are properly          */
  30
+  /*    encapsulated in an `extern "C" { .. }' block when included from a  */
  31
+  /*    C++ compiler.                                                      */
  32
+  /*                                                                       */
  33
+#ifdef __cplusplus
  34
+#define FT_BEGIN_HEADER  extern "C" {
  35
+#else
  36
+#define FT_BEGIN_HEADER  /* nothing */
  37
+#endif
  38
+
  39
+
  40
+  /*@***********************************************************************/
  41
+  /*                                                                       */
  42
+  /* <Macro>                                                               */
  43
+  /*    FT_END_HEADER                                                      */
  44
+  /*                                                                       */
  45
+  /* <Description>                                                         */
  46
+  /*    This macro is used in association with @FT_BEGIN_HEADER in header  */
  47
+  /*    files to ensure that the declarations within are properly          */
  48
+  /*    encapsulated in an `extern "C" { .. }' block when included from a  */
  49
+  /*    C++ compiler.                                                      */
  50
+  /*                                                                       */
  51
+#ifdef __cplusplus
  52
+#define FT_END_HEADER  }
  53
+#else
  54
+#define FT_END_HEADER  /* nothing */
  55
+#endif
  56
+
  57
+
  58
+  /*************************************************************************/
  59
+  /*                                                                       */
  60
+  /* Aliases for the FreeType 2 public and configuration files.            */
  61
+  /*                                                                       */
  62
+  /*************************************************************************/
  63
+
  64
+  /*************************************************************************/
  65
+  /*                                                                       */
  66
+  /* <Section>                                                             */
  67
+  /*    header_file_macros                                                 */
  68
+  /*                                                                       */
  69
+  /* <Title>                                                               */
  70
+  /*    Header File Macros                                                 */
  71
+  /*                                                                       */
  72
+  /* <Abstract>                                                            */
  73
+  /*    Macro definitions used to #include specific header files.          */
  74
+  /*                                                                       */
  75
+  /* <Description>                                                         */
  76
+  /*    The following macros are defined to the name of specific           */
  77
+  /*    FreeType~2 header files.  They can be used directly in #include    */
  78
+  /*    statements as in:                                                  */
  79
+  /*                                                                       */
  80
+  /*    {                                                                  */
  81
+  /*      #include FT_FREETYPE_H                                           */
  82
+  /*      #include FT_MULTIPLE_MASTERS_H                                   */
  83
+  /*      #include FT_GLYPH_H                                              */
  84
+  /*    }                                                                  */
  85
+  /*                                                                       */
  86
+  /*    There are several reasons why we are now using macros to name      */
  87
+  /*    public header files.  The first one is that such macros are not    */
  88
+  /*    limited to the infamous 8.3~naming rule required by DOS (and       */
  89
+  /*    `FT_MULTIPLE_MASTERS_H' is a lot more meaningful than `ftmm.h').   */
  90
+  /*                                                                       */
  91
+  /*    The second reason is that it allows for more flexibility in the    */
  92
+  /*    way FreeType~2 is installed on a given system.                     */
  93
+  /*                                                                       */
  94
+  /*************************************************************************/
  95
+
  96
+
  97
+  /* configuration files */
  98
+
  99
+  /*************************************************************************
  100
+   *
  101
+   * @macro:
  102
+   *   FT_CONFIG_CONFIG_H
  103
+   *
  104
+   * @description:
  105
+   *   A macro used in #include statements to name the file containing
  106
+   *   FreeType~2 configuration data.
  107
+   *
  108
+   */
  109
+#ifndef FT_CONFIG_CONFIG_H
  110
+#define FT_CONFIG_CONFIG_H  <freetype/config/ftconfig.h>
  111
+#endif
  112
+
  113
+
  114
+  /*************************************************************************
  115
+   *
  116
+   * @macro:
  117
+   *   FT_CONFIG_STANDARD_LIBRARY_H
  118
+   *
  119
+   * @description:
  120
+   *   A macro used in #include statements to name the file containing
  121
+   *   FreeType~2 interface to the standard C library functions.
  122
+   *
  123
+   */
  124
+#ifndef FT_CONFIG_STANDARD_LIBRARY_H
  125
+#define FT_CONFIG_STANDARD_LIBRARY_H  <freetype/config/ftstdlib.h>
  126
+#endif
  127
+
  128
+
  129
+  /*************************************************************************
  130
+   *
  131
+   * @macro:
  132
+   *   FT_CONFIG_OPTIONS_H
  133
+   *
  134
+   * @description:
  135
+   *   A macro used in #include statements to name the file containing
  136
+   *   FreeType~2 project-specific configuration options.
  137
+   *
  138
+   */
  139
+#ifndef FT_CONFIG_OPTIONS_H
  140
+#define FT_CONFIG_OPTIONS_H  <freetype/config/ftoption.h>
  141
+#endif
  142
+
  143
+
  144
+  /*************************************************************************
  145
+   *
  146
+   * @macro:
  147
+   *   FT_CONFIG_MODULES_H
  148
+   *
  149
+   * @description:
  150
+   *   A macro used in #include statements to name the file containing the
  151
+   *   list of FreeType~2 modules that are statically linked to new library
  152
+   *   instances in @FT_Init_FreeType.
  153
+   *
  154
+   */
  155
+#ifndef FT_CONFIG_MODULES_H
  156
+#define FT_CONFIG_MODULES_H  <freetype/config/ftmodule.h>
  157
+#endif
  158
+
  159
+  /* */
  160
+
  161
+  /* public headers */
  162
+
  163
+  /*************************************************************************
  164
+   *
  165
+   * @macro:
  166
+   *   FT_FREETYPE_H
  167
+   *
  168
+   * @description:
  169
+   *   A macro used in #include statements to name the file containing the
  170
+   *   base FreeType~2 API.
  171
+   *
  172
+   */
  173
+#define FT_FREETYPE_H  <freetype/freetype.h>
  174
+
  175
+
  176
+  /*************************************************************************
  177
+   *
  178
+   * @macro:
  179
+   *   FT_ERRORS_H
  180
+   *
  181
+   * @description:
  182
+   *   A macro used in #include statements to name the file containing the
  183
+   *   list of FreeType~2 error codes (and messages).
  184
+   *
  185
+   *   It is included by @FT_FREETYPE_H.
  186
+   *
  187
+   */
  188
+#define FT_ERRORS_H  <freetype/fterrors.h>
  189
+
  190
+
  191
+  /*************************************************************************
  192
+   *
  193
+   * @macro:
  194
+   *   FT_MODULE_ERRORS_H
  195
+   *
  196
+   * @description:
  197
+   *   A macro used in #include statements to name the file containing the
  198
+   *   list of FreeType~2 module error offsets (and messages).
  199
+   *
  200
+   */
  201
+#define FT_MODULE_ERRORS_H  <freetype/ftmoderr.h>
  202
+
  203
+
  204
+  /*************************************************************************
  205
+   *
  206
+   * @macro:
  207
+   *   FT_SYSTEM_H
  208
+   *
  209
+   * @description:
  210
+   *   A macro used in #include statements to name the file containing the
  211
+   *   FreeType~2 interface to low-level operations (i.e., memory management
  212
+   *   and stream i/o).
  213
+   *
  214
+   *   It is included by @FT_FREETYPE_H.
  215
+   *
  216
+   */
  217
+#define FT_SYSTEM_H  <freetype/ftsystem.h>
  218
+
  219
+
  220
+  /*************************************************************************
  221
+   *
  222
+   * @macro:
  223
+   *   FT_IMAGE_H
  224
+   *
  225
+   * @description:
  226
+   *   A macro used in #include statements to name the file containing type
  227
+   *   definitions related to glyph images (i.e., bitmaps, outlines,
  228
+   *   scan-converter parameters).
  229
+   *
  230
+   *   It is included by @FT_FREETYPE_H.
  231
+   *
  232
+   */
  233
+#define FT_IMAGE_H  <freetype/ftimage.h>
  234
+
  235
+
  236
+  /*************************************************************************
  237
+   *
  238
+   * @macro:
  239
+   *   FT_TYPES_H
  240
+   *
  241
+   * @description:
  242
+   *   A macro used in #include statements to name the file containing the
  243
+   *   basic data types defined by FreeType~2.
  244
+   *
  245
+   *   It is included by @FT_FREETYPE_H.
  246
+   *
  247
+   */
  248
+#define FT_TYPES_H  <freetype/fttypes.h>
  249
+
  250
+
  251
+  /*************************************************************************
  252
+   *
  253
+   * @macro:
  254
+   *   FT_LIST_H
  255
+   *
  256
+   * @description:
  257
+   *   A macro used in #include statements to name the file containing the
  258
+   *   list management API of FreeType~2.
  259
+   *
  260
+   *   (Most applications will never need to include this file.)
  261
+   *
  262
+   */
  263
+#define FT_LIST_H  <freetype/ftlist.h>
  264
+
  265
+
  266
+  /*************************************************************************
  267
+   *
  268
+   * @macro:
  269
+   *   FT_OUTLINE_H
  270
+   *
  271
+   * @description:
  272
+   *   A macro used in #include statements to name the file containing the
  273
+   *   scalable outline management API of FreeType~2.
  274
+   *
  275
+   */
  276
+#define FT_OUTLINE_H  <freetype/ftoutln.h>
  277
+
  278
+
  279
+  /*************************************************************************
  280
+   *
  281
+   * @macro:
  282
+   *   FT_SIZES_H
  283
+   *
  284
+   * @description:
  285
+   *   A macro used in #include statements to name the file containing the
  286
+   *   API which manages multiple @FT_Size objects per face.
  287
+   *
  288
+   */
  289
+#define FT_SIZES_H  <freetype/ftsizes.h>
  290
+
  291
+
  292
+  /*************************************************************************
  293
+   *
  294
+   * @macro:
  295
+   *   FT_MODULE_H
  296
+   *
  297
+   * @description:
  298
+   *   A macro used in #include statements to name the file containing the
  299
+   *   module management API of FreeType~2.
  300
+   *
  301
+   */
  302
+#define FT_MODULE_H  <freetype/ftmodapi.h>
  303
+
  304
+
  305
+  /*************************************************************************
  306
+   *
  307
+   * @macro:
  308
+   *   FT_RENDER_H
  309
+   *
  310
+   * @description:
  311
+   *   A macro used in #include statements to name the file containing the
  312
+   *   renderer module management API of FreeType~2.
  313
+   *
  314
+   */
  315
+#define FT_RENDER_H  <freetype/ftrender.h>
  316
+
  317
+
  318
+  /*************************************************************************
  319
+   *
  320
+   * @macro:
  321
+   *   FT_AUTOHINTER_H
  322
+   *
  323
+   * @description:
  324
+   *   A macro used in #include statements to name the file containing
  325
+   *   structures and macros related to the auto-hinting module.
  326
+   *
  327
+   */
  328
+#define FT_AUTOHINTER_H  <freetype/ftautoh.h>
  329
+
  330
+
  331
+  /*************************************************************************
  332
+   *
  333
+   * @macro:
  334
+   *   FT_TYPE1_TABLES_H
  335
+   *
  336
+   * @description:
  337
+   *   A macro used in #include statements to name the file containing the
  338
+   *   types and API specific to the Type~1 format.
  339
+   *
  340
+   */
  341
+#define FT_TYPE1_TABLES_H  <freetype/t1tables.h>
  342
+
  343
+
  344
+  /*************************************************************************
  345
+   *
  346
+   * @macro:
  347
+   *   FT_TRUETYPE_IDS_H
  348
+   *
  349
+   * @description:
  350
+   *   A macro used in #include statements to name the file containing the
  351
+   *   enumeration values which identify name strings, languages, encodings,
  352
+   *   etc.  This file really contains a _large_ set of constant macro
  353
+   *   definitions, taken from the TrueType and OpenType specifications.
  354
+   *
  355
+   */
  356
+#define FT_TRUETYPE_IDS_H  <freetype/ttnameid.h>
  357
+
  358
+
  359
+  /*************************************************************************
  360
+   *
  361
+   * @macro:
  362
+   *   FT_TRUETYPE_TABLES_H
  363
+   *
  364
+   * @description:
  365
+   *   A macro used in #include statements to name the file containing the
  366
+   *   types and API specific to the TrueType (as well as OpenType) format.
  367
+   *
  368
+   */
  369
+#define FT_TRUETYPE_TABLES_H  <freetype/tttables.h>
  370
+
  371
+
  372
+  /*************************************************************************
  373
+   *
  374
+   * @macro:
  375
+   *   FT_TRUETYPE_TAGS_H
  376
+   *
  377
+   * @description:
  378
+   *   A macro used in #include statements to name the file containing the
  379
+   *   definitions of TrueType four-byte `tags' which identify blocks in
  380
+   *   SFNT-based font formats (i.e., TrueType and OpenType).
  381
+   *
  382
+   */
  383
+#define FT_TRUETYPE_TAGS_H  <freetype/tttags.h>
  384
+
  385
+
  386
+  /*************************************************************************
  387
+   *
  388
+   * @macro:
  389
+   *   FT_BDF_H
  390
+   *
  391
+   * @description:
  392
+   *   A macro used in #include statements to name the file containing the
  393
+   *   definitions of an API which accesses BDF-specific strings from a
  394
+   *   face.
  395
+   *
  396
+   */
  397
+#define FT_BDF_H  <freetype/ftbdf.h>
  398
+
  399
+
  400
+  /*************************************************************************
  401
+   *
  402
+   * @macro:
  403
+   *   FT_CID_H
  404
+   *
  405
+   * @description:
  406
+   *   A macro used in #include statements to name the file containing the
  407
+   *   definitions of an API which access CID font information from a
  408
+   *   face.
  409
+   *
  410
+   */
  411
+#define FT_CID_H  <freetype/ftcid.h>
  412
+
  413
+
  414
+  /*************************************************************************
  415
+   *
  416
+   * @macro:
  417
+   *   FT_GZIP_H
  418
+   *
  419
+   * @description:
  420
+   *   A macro used in #include statements to name the file containing the
  421
+   *   definitions of an API which supports gzip-compressed files.
  422
+   *
  423
+   */
  424
+#define FT_GZIP_H  <freetype/ftgzip.h>
  425
+
  426
+
  427
+  /*************************************************************************
  428
+   *
  429
+   * @macro:
  430
+   *   FT_LZW_H
  431
+   *
  432
+   * @description:
  433
+   *   A macro used in #include statements to name the file containing the