2
0
Эх сурвалжийг харах

Update FreeType to 2.9.1

close #15660
volzhs 7 жил өмнө
parent
commit
c9bd739a8b
100 өөрчлөгдсөн 3998 нэмэгдсэн , 705 устгасан
  1. 1 1
      thirdparty/README.md
  2. 1 1
      thirdparty/freetype/FTL.TXT
  3. 94 14
      thirdparty/freetype/include/freetype/config/ftconfig.h
  4. 43 85
      thirdparty/freetype/include/freetype/config/ftheader.h
  5. 40 53
      thirdparty/freetype/include/freetype/config/ftoption.h
  6. 1 1
      thirdparty/freetype/include/freetype/config/ftstdlib.h
  7. 185 85
      thirdparty/freetype/include/freetype/freetype.h
  8. 1 1
      thirdparty/freetype/include/freetype/ftadvanc.h
  9. 2 2
      thirdparty/freetype/include/freetype/ftbbox.h
  10. 1 1
      thirdparty/freetype/include/freetype/ftbdf.h
  11. 2 2
      thirdparty/freetype/include/freetype/ftbitmap.h
  12. 1 1
      thirdparty/freetype/include/freetype/ftbzip2.h
  13. 1 16
      thirdparty/freetype/include/freetype/ftcache.h
  14. 3 0
      thirdparty/freetype/include/freetype/ftchapters.h
  15. 2 2
      thirdparty/freetype/include/freetype/ftcid.h
  16. 1225 0
      thirdparty/freetype/include/freetype/ftdriver.h
  17. 1 1
      thirdparty/freetype/include/freetype/fterrdef.h
  18. 1 1
      thirdparty/freetype/include/freetype/fterrors.h
  19. 1 1
      thirdparty/freetype/include/freetype/ftfntfmt.h
  20. 6 1
      thirdparty/freetype/include/freetype/ftgasp.h
  21. 3 3
      thirdparty/freetype/include/freetype/ftglyph.h
  22. 5 5
      thirdparty/freetype/include/freetype/ftgxval.h
  23. 4 1
      thirdparty/freetype/include/freetype/ftgzip.h
  24. 18 18
      thirdparty/freetype/include/freetype/ftimage.h
  25. 2 13
      thirdparty/freetype/include/freetype/ftincrem.h
  26. 5 18
      thirdparty/freetype/include/freetype/ftlcdfil.h
  27. 1 1
      thirdparty/freetype/include/freetype/ftlist.h
  28. 1 1
      thirdparty/freetype/include/freetype/ftlzw.h
  29. 1 1
      thirdparty/freetype/include/freetype/ftmac.h
  30. 99 11
      thirdparty/freetype/include/freetype/ftmm.h
  31. 12 11
      thirdparty/freetype/include/freetype/ftmodapi.h
  32. 1 1
      thirdparty/freetype/include/freetype/ftmoderr.h
  33. 1 1
      thirdparty/freetype/include/freetype/ftotval.h
  34. 4 7
      thirdparty/freetype/include/freetype/ftoutln.h
  35. 205 0
      thirdparty/freetype/include/freetype/ftparams.h
  36. 4 4
      thirdparty/freetype/include/freetype/ftpfr.h
  37. 2 2
      thirdparty/freetype/include/freetype/ftrender.h
  38. 1 1
      thirdparty/freetype/include/freetype/ftsizes.h
  39. 8 42
      thirdparty/freetype/include/freetype/ftsnames.h
  40. 6 6
      thirdparty/freetype/include/freetype/ftstroke.h
  41. 1 1
      thirdparty/freetype/include/freetype/ftsynth.h
  42. 1 1
      thirdparty/freetype/include/freetype/ftsystem.h
  43. 1 1
      thirdparty/freetype/include/freetype/fttrigon.h
  44. 2 2
      thirdparty/freetype/include/freetype/fttypes.h
  45. 2 2
      thirdparty/freetype/include/freetype/ftwinfnt.h
  46. 1 1
      thirdparty/freetype/include/freetype/internal/autohint.h
  47. 108 0
      thirdparty/freetype/include/freetype/internal/cffotypes.h
  48. 412 0
      thirdparty/freetype/include/freetype/internal/cfftypes.h
  49. 1 1
      thirdparty/freetype/include/freetype/internal/ftcalc.h
  50. 1 1
      thirdparty/freetype/include/freetype/internal/ftdebug.h
  51. 400 0
      thirdparty/freetype/include/freetype/internal/ftdrv.h
  52. 1 1
      thirdparty/freetype/include/freetype/internal/ftgloadr.h
  53. 2 2
      thirdparty/freetype/include/freetype/internal/ftmemory.h
  54. 50 35
      thirdparty/freetype/include/freetype/internal/ftobjs.h
  55. 1 1
      thirdparty/freetype/include/freetype/internal/ftpic.h
  56. 48 0
      thirdparty/freetype/include/freetype/internal/ftpsprop.h
  57. 1 1
      thirdparty/freetype/include/freetype/internal/ftrfork.h
  58. 96 7
      thirdparty/freetype/include/freetype/internal/ftserv.h
  59. 3 3
      thirdparty/freetype/include/freetype/internal/ftstream.h
  60. 4 5
      thirdparty/freetype/include/freetype/internal/fttrace.h
  61. 1 1
      thirdparty/freetype/include/freetype/internal/ftvalid.h
  62. 6 2
      thirdparty/freetype/include/freetype/internal/internal.h
  63. 497 4
      thirdparty/freetype/include/freetype/internal/psaux.h
  64. 1 1
      thirdparty/freetype/include/freetype/internal/pshints.h
  65. 1 1
      thirdparty/freetype/include/freetype/internal/services/svbdf.h
  66. 112 0
      thirdparty/freetype/include/freetype/internal/services/svcfftl.h
  67. 1 1
      thirdparty/freetype/include/freetype/internal/services/svcid.h
  68. 1 1
      thirdparty/freetype/include/freetype/internal/services/svfntfmt.h
  69. 3 3
      thirdparty/freetype/include/freetype/internal/services/svgldict.h
  70. 1 1
      thirdparty/freetype/include/freetype/internal/services/svgxval.h
  71. 1 1
      thirdparty/freetype/include/freetype/internal/services/svkern.h
  72. 1 1
      thirdparty/freetype/include/freetype/internal/services/svmetric.h
  73. 35 22
      thirdparty/freetype/include/freetype/internal/services/svmm.h
  74. 1 1
      thirdparty/freetype/include/freetype/internal/services/svotval.h
  75. 1 1
      thirdparty/freetype/include/freetype/internal/services/svpfr.h
  76. 1 1
      thirdparty/freetype/include/freetype/internal/services/svpostnm.h
  77. 1 1
      thirdparty/freetype/include/freetype/internal/services/svprop.h
  78. 1 1
      thirdparty/freetype/include/freetype/internal/services/svpscmap.h
  79. 1 1
      thirdparty/freetype/include/freetype/internal/services/svpsinfo.h
  80. 1 1
      thirdparty/freetype/include/freetype/internal/services/svsfnt.h
  81. 1 1
      thirdparty/freetype/include/freetype/internal/services/svttcmap.h
  82. 1 1
      thirdparty/freetype/include/freetype/internal/services/svtteng.h
  83. 1 1
      thirdparty/freetype/include/freetype/internal/services/svttglyf.h
  84. 1 1
      thirdparty/freetype/include/freetype/internal/services/svwinfnt.h
  85. 1 1
      thirdparty/freetype/include/freetype/internal/sfnt.h
  86. 1 1
      thirdparty/freetype/include/freetype/internal/t1types.h
  87. 5 7
      thirdparty/freetype/include/freetype/internal/tttypes.h
  88. 10 1
      thirdparty/freetype/include/freetype/t1tables.h
  89. 2 2
      thirdparty/freetype/include/freetype/ttnameid.h
  90. 1 1
      thirdparty/freetype/include/freetype/tttables.h
  91. 1 1
      thirdparty/freetype/include/freetype/tttags.h
  92. 1 1
      thirdparty/freetype/include/ft2build.h
  93. 1 1
      thirdparty/freetype/src/autofit/afangles.c
  94. 7 1
      thirdparty/freetype/src/autofit/afblue.c
  95. 1 1
      thirdparty/freetype/src/autofit/afblue.cin
  96. 8 2
      thirdparty/freetype/src/autofit/afblue.dat
  97. 151 149
      thirdparty/freetype/src/autofit/afblue.h
  98. 1 1
      thirdparty/freetype/src/autofit/afblue.hin
  99. 3 3
      thirdparty/freetype/src/autofit/afcjk.c
  100. 1 1
      thirdparty/freetype/src/autofit/afcjk.h

+ 1 - 1
thirdparty/README.md

@@ -102,7 +102,7 @@ Use UI font variant if available, because it has tight vertical metrics and good
 ## freetype
 ## freetype
 
 
 - Upstream: https://www.freetype.org
 - Upstream: https://www.freetype.org
-- Version: 2.8.1
+- Version: 2.9.1
 - License: FreeType License (BSD-like)
 - License: FreeType License (BSD-like)
 
 
 Files extracted from upstream source:
 Files extracted from upstream source:

+ 1 - 1
thirdparty/freetype/FTL.TXT

@@ -163,7 +163,7 @@ Legal Terms
 
 
   Our home page can be found at
   Our home page can be found at
 
 
-    http://www.freetype.org
+    https://www.freetype.org
 
 
 
 
 --- end of FTL.TXT ---
 --- end of FTL.TXT ---

+ 94 - 14
thirdparty/freetype/include/freetype/config/ftconfig.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    ANSI-specific configuration file (specification only).               */
 /*    ANSI-specific configuration file (specification only).               */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2017 by                                                 */
+/*  Copyright 1996-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -73,11 +73,11 @@ FT_BEGIN_HEADER
 
 
   /* The size of an `int' type.  */
   /* The size of an `int' type.  */
 #if                                 FT_UINT_MAX == 0xFFFFUL
 #if                                 FT_UINT_MAX == 0xFFFFUL
-#define FT_SIZEOF_INT  (16 / FT_CHAR_BIT)
+#define FT_SIZEOF_INT  ( 16 / FT_CHAR_BIT )
 #elif                               FT_UINT_MAX == 0xFFFFFFFFUL
 #elif                               FT_UINT_MAX == 0xFFFFFFFFUL
-#define FT_SIZEOF_INT  (32 / FT_CHAR_BIT)
+#define FT_SIZEOF_INT  ( 32 / FT_CHAR_BIT )
 #elif FT_UINT_MAX > 0xFFFFFFFFUL && FT_UINT_MAX == 0xFFFFFFFFFFFFFFFFUL
 #elif FT_UINT_MAX > 0xFFFFFFFFUL && FT_UINT_MAX == 0xFFFFFFFFFFFFFFFFUL
-#define FT_SIZEOF_INT  (64 / FT_CHAR_BIT)
+#define FT_SIZEOF_INT  ( 64 / FT_CHAR_BIT )
 #else
 #else
 #error "Unsupported size of `int' type!"
 #error "Unsupported size of `int' type!"
 #endif
 #endif
@@ -85,11 +85,11 @@ FT_BEGIN_HEADER
   /* The size of a `long' type.  A five-byte `long' (as used e.g. on the */
   /* The size of a `long' type.  A five-byte `long' (as used e.g. on the */
   /* DM642) is recognized but avoided.                                   */
   /* DM642) is recognized but avoided.                                   */
 #if                                  FT_ULONG_MAX == 0xFFFFFFFFUL
 #if                                  FT_ULONG_MAX == 0xFFFFFFFFUL
-#define FT_SIZEOF_LONG  (32 / FT_CHAR_BIT)
+#define FT_SIZEOF_LONG  ( 32 / FT_CHAR_BIT )
 #elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFUL
 #elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFUL
-#define FT_SIZEOF_LONG  (32 / FT_CHAR_BIT)
+#define FT_SIZEOF_LONG  ( 32 / FT_CHAR_BIT )
 #elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFFFFFFFUL
 #elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFFFFFFFUL
-#define FT_SIZEOF_LONG  (64 / FT_CHAR_BIT)
+#define FT_SIZEOF_LONG  ( 64 / FT_CHAR_BIT )
 #else
 #else
 #error "Unsupported size of `long' type!"
 #error "Unsupported size of `long' type!"
 #endif
 #endif
@@ -236,12 +236,12 @@ FT_BEGIN_HEADER
 
 
 #endif
 #endif
 
 
-#if FT_SIZEOF_INT == (32 / FT_CHAR_BIT)
+#if FT_SIZEOF_INT == ( 32 / FT_CHAR_BIT )
 
 
   typedef signed int      FT_Int32;
   typedef signed int      FT_Int32;
   typedef unsigned int    FT_UInt32;
   typedef unsigned int    FT_UInt32;
 
 
-#elif FT_SIZEOF_LONG == (32 / FT_CHAR_BIT)
+#elif FT_SIZEOF_LONG == ( 32 / FT_CHAR_BIT )
 
 
   typedef signed long     FT_Int32;
   typedef signed long     FT_Int32;
   typedef unsigned long   FT_UInt32;
   typedef unsigned long   FT_UInt32;
@@ -252,12 +252,12 @@ FT_BEGIN_HEADER
 
 
 
 
   /* look up an integer type that is at least 32 bits */
   /* look up an integer type that is at least 32 bits */
-#if FT_SIZEOF_INT >= (32 / FT_CHAR_BIT)
+#if FT_SIZEOF_INT >= ( 32 / FT_CHAR_BIT )
 
 
   typedef int            FT_Fast;
   typedef int            FT_Fast;
   typedef unsigned int   FT_UFast;
   typedef unsigned int   FT_UFast;
 
 
-#elif FT_SIZEOF_LONG >= (32 / FT_CHAR_BIT)
+#elif FT_SIZEOF_LONG >= ( 32 / FT_CHAR_BIT )
 
 
   typedef long           FT_Fast;
   typedef long           FT_Fast;
   typedef unsigned long  FT_UFast;
   typedef unsigned long  FT_UFast;
@@ -267,7 +267,7 @@ FT_BEGIN_HEADER
 
 
   /* determine whether we have a 64-bit int type for platforms without */
   /* determine whether we have a 64-bit int type for platforms without */
   /* Autoconf                                                          */
   /* Autoconf                                                          */
-#if FT_SIZEOF_LONG == (64 / FT_CHAR_BIT)
+#if FT_SIZEOF_LONG == ( 64 / FT_CHAR_BIT )
 
 
   /* FT_LONG64 must be defined if a 64-bit type is available */
   /* FT_LONG64 must be defined if a 64-bit type is available */
 #define FT_LONG64
 #define FT_LONG64
@@ -365,6 +365,14 @@ FT_BEGIN_HEADER
 #endif
 #endif
 
 
 
 
+  /* Use FT_LOCAL and FT_LOCAL_DEF to declare and define, respectively, */
+  /* a function that gets used only within the scope of a module.       */
+  /* Normally, both the header and source code files for such a         */
+  /* function are within a single module directory.                     */
+  /*                                                                    */
+  /* Intra-module arrays should be tagged with FT_LOCAL_ARRAY and       */
+  /* FT_LOCAL_ARRAY_DEF.                                                */
+  /*                                                                    */
 #ifdef FT_MAKE_OPTION_SINGLE_OBJECT
 #ifdef FT_MAKE_OPTION_SINGLE_OBJECT
 
 
 #define FT_LOCAL( x )      static  x
 #define FT_LOCAL( x )      static  x
@@ -386,6 +394,12 @@ FT_BEGIN_HEADER
 #define FT_LOCAL_ARRAY_DEF( x )  const  x
 #define FT_LOCAL_ARRAY_DEF( x )  const  x
 
 
 
 
+  /* Use FT_BASE and FT_BASE_DEF to declare and define, respectively, */
+  /* functions that are used in more than a single module.  In the    */
+  /* current setup this implies that the declaration is in a header   */
+  /* file in the `include/freetype/internal' directory, and the       */
+  /* function body is in a file in `src/base'.                        */
+  /*                                                                  */
 #ifndef FT_BASE
 #ifndef FT_BASE
 
 
 #ifdef __cplusplus
 #ifdef __cplusplus
@@ -408,14 +422,63 @@ FT_BEGIN_HEADER
 #endif /* !FT_BASE_DEF */
 #endif /* !FT_BASE_DEF */
 
 
 
 
+  /*   When compiling FreeType as a DLL or DSO with hidden visibility      */
+  /*   some systems/compilers need a special attribute in front OR after   */
+  /*   the return type of function declarations.                           */
+  /*                                                                       */
+  /*   Two macros are used within the FreeType source code to define       */
+  /*   exported library functions: FT_EXPORT and FT_EXPORT_DEF.            */
+  /*                                                                       */
+  /*     FT_EXPORT( return_type )                                          */
+  /*                                                                       */
+  /*       is used in a function declaration, as in                        */
+  /*                                                                       */
+  /*         FT_EXPORT( FT_Error )                                         */
+  /*         FT_Init_FreeType( FT_Library*  alibrary );                    */
+  /*                                                                       */
+  /*                                                                       */
+  /*     FT_EXPORT_DEF( return_type )                                      */
+  /*                                                                       */
+  /*       is used in a function definition, as in                         */
+  /*                                                                       */
+  /*         FT_EXPORT_DEF( FT_Error )                                     */
+  /*         FT_Init_FreeType( FT_Library*  alibrary )                     */
+  /*         {                                                             */
+  /*           ... some code ...                                           */
+  /*           return FT_Err_Ok;                                           */
+  /*         }                                                             */
+  /*                                                                       */
+  /*   You can provide your own implementation of FT_EXPORT and            */
+  /*   FT_EXPORT_DEF here if you want.                                     */
+  /*                                                                       */
+  /*   To export a variable, use FT_EXPORT_VAR.                            */
+  /*                                                                       */
 #ifndef FT_EXPORT
 #ifndef FT_EXPORT
 
 
-#ifdef __cplusplus
+#ifdef FT2_BUILD_LIBRARY
+
+#if defined( _WIN32 ) && ( defined( _DLL ) || defined( DLL_EXPORT ) )
+#define FT_EXPORT( x )  __declspec( dllexport )  x
+#elif defined( __GNUC__ ) && __GNUC__ >= 4
+#define FT_EXPORT( x )  __attribute__(( visibility( "default" ) ))  x
+#elif defined( __cplusplus )
+#define FT_EXPORT( x )  extern "C"  x
+#else
+#define FT_EXPORT( x )  extern  x
+#endif
+
+#else
+
+#if defined( FT2_DLLIMPORT )
+#define FT_EXPORT( x )  __declspec( dllimport )  x
+#elif defined( __cplusplus )
 #define FT_EXPORT( x )  extern "C"  x
 #define FT_EXPORT( x )  extern "C"  x
 #else
 #else
 #define FT_EXPORT( x )  extern  x
 #define FT_EXPORT( x )  extern  x
 #endif
 #endif
 
 
+#endif
+
 #endif /* !FT_EXPORT */
 #endif /* !FT_EXPORT */
 
 
 
 
@@ -440,6 +503,7 @@ FT_BEGIN_HEADER
 
 
 #endif /* !FT_EXPORT_VAR */
 #endif /* !FT_EXPORT_VAR */
 
 
+
   /* The following macros are needed to compile the library with a   */
   /* The following macros are needed to compile the library with a   */
   /* C++ compiler and with 16bit compilers.                          */
   /* C++ compiler and with 16bit compilers.                          */
   /*                                                                 */
   /*                                                                 */
@@ -451,7 +515,13 @@ FT_BEGIN_HEADER
   /* functions which are accessed by (global) function pointers.     */
   /* 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,        */
+  /* located in the same source code file as the structure that uses */
+  /* it.                                                             */
+  /*                                                                 */
+  /* FT_BASE_CALLBACK and FT_BASE_CALLBACK_DEF are used to declare   */
+  /* and define a callback function, respectively, in a similar way  */
+  /* as FT_BASE and FT_BASE_DEF work.                                */
   /*                                                                 */
   /*                                                                 */
   /* FT_CALLBACK_TABLE is used to _declare_ a constant variable that */
   /* FT_CALLBACK_TABLE is used to _declare_ a constant variable that */
   /* contains pointers to callback functions.                        */
   /* contains pointers to callback functions.                        */
@@ -471,6 +541,16 @@ FT_BEGIN_HEADER
 #endif
 #endif
 #endif /* FT_CALLBACK_DEF */
 #endif /* FT_CALLBACK_DEF */
 
 
+#ifndef FT_BASE_CALLBACK
+#ifdef __cplusplus
+#define FT_BASE_CALLBACK( x )      extern "C"  x
+#define FT_BASE_CALLBACK_DEF( x )  extern "C"  x
+#else
+#define FT_BASE_CALLBACK( x )      extern  x
+#define FT_BASE_CALLBACK_DEF( x )  x
+#endif
+#endif /* FT_BASE_CALLBACK */
+
 #ifndef FT_CALLBACK_TABLE
 #ifndef FT_CALLBACK_TABLE
 #ifdef __cplusplus
 #ifdef __cplusplus
 #define FT_CALLBACK_TABLE      extern "C"
 #define FT_CALLBACK_TABLE      extern "C"

+ 43 - 85
thirdparty/freetype/include/freetype/config/ftheader.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    Build macros of the FreeType 2 library.                              */
 /*    Build macros of the FreeType 2 library.                              */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2017 by                                                 */
+/*  Copyright 1996-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -315,6 +315,19 @@
 #define FT_RENDER_H  <freetype/ftrender.h>
 #define FT_RENDER_H  <freetype/ftrender.h>
 
 
 
 
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_DRIVER_H
+   *
+   * @description:
+   *   A macro used in #include statements to name the file containing
+   *   structures and macros related to the driver modules.
+   *
+   */
+#define FT_DRIVER_H  <freetype/ftdriver.h>
+
+
   /*************************************************************************
   /*************************************************************************
    *
    *
    * @macro:
    * @macro:
@@ -324,8 +337,10 @@
    *   A macro used in #include statements to name the file containing
    *   A macro used in #include statements to name the file containing
    *   structures and macros related to the auto-hinting module.
    *   structures and macros related to the auto-hinting module.
    *
    *
+   *   Deprecated since version 2.9; use @FT_DRIVER_H instead.
+   *
    */
    */
-#define FT_AUTOHINTER_H  <freetype/ftautoh.h>
+#define FT_AUTOHINTER_H  FT_DRIVER_H
 
 
 
 
   /*************************************************************************
   /*************************************************************************
@@ -337,8 +352,10 @@
    *   A macro used in #include statements to name the file containing
    *   A macro used in #include statements to name the file containing
    *   structures and macros related to the CFF driver module.
    *   structures and macros related to the CFF driver module.
    *
    *
+   *   Deprecated since version 2.9; use @FT_DRIVER_H instead.
+   *
    */
    */
-#define FT_CFF_DRIVER_H  <freetype/ftcffdrv.h>
+#define FT_CFF_DRIVER_H  FT_DRIVER_H
 
 
 
 
   /*************************************************************************
   /*************************************************************************
@@ -350,8 +367,10 @@
    *   A macro used in #include statements to name the file containing
    *   A macro used in #include statements to name the file containing
    *   structures and macros related to the TrueType driver module.
    *   structures and macros related to the TrueType driver module.
    *
    *
+   *   Deprecated since version 2.9; use @FT_DRIVER_H instead.
+   *
    */
    */
-#define FT_TRUETYPE_DRIVER_H  <freetype/ftttdrv.h>
+#define FT_TRUETYPE_DRIVER_H  FT_DRIVER_H
 
 
 
 
   /*************************************************************************
   /*************************************************************************
@@ -363,8 +382,10 @@
    *   A macro used in #include statements to name the file containing
    *   A macro used in #include statements to name the file containing
    *   structures and macros related to the PCF driver module.
    *   structures and macros related to the PCF driver module.
    *
    *
+   *   Deprecated since version 2.9; use @FT_DRIVER_H instead.
+   *
    */
    */
-#define FT_PCF_DRIVER_H  <freetype/ftpcfdrv.h>
+#define FT_PCF_DRIVER_H  FT_DRIVER_H
 
 
 
 
   /*************************************************************************
   /*************************************************************************
@@ -554,63 +575,6 @@
 #define FT_CACHE_H  <freetype/ftcache.h>
 #define FT_CACHE_H  <freetype/ftcache.h>
 
 
 
 
-  /*************************************************************************
-   *
-   * @macro:
-   *   FT_CACHE_IMAGE_H
-   *
-   * @description:
-   *   A macro used in #include statements to name the file containing the
-   *   `glyph image' API of the FreeType~2 cache sub-system.
-   *
-   *   It is used to define a cache for @FT_Glyph elements.  You can also
-   *   use the API defined in @FT_CACHE_SMALL_BITMAPS_H if you only need to
-   *   store small glyph bitmaps, as it will use less memory.
-   *
-   *   This macro is deprecated.  Simply include @FT_CACHE_H to have all
-   *   glyph image-related cache declarations.
-   *
-   */
-#define FT_CACHE_IMAGE_H  FT_CACHE_H
-
-
-  /*************************************************************************
-   *
-   * @macro:
-   *   FT_CACHE_SMALL_BITMAPS_H
-   *
-   * @description:
-   *   A macro used in #include statements to name the file containing the
-   *   `small bitmaps' API of the FreeType~2 cache sub-system.
-   *
-   *   It is used to define a cache for small glyph bitmaps in a relatively
-   *   memory-efficient way.  You can also use the API defined in
-   *   @FT_CACHE_IMAGE_H if you want to cache arbitrary glyph images,
-   *   including scalable outlines.
-   *
-   *   This macro is deprecated.  Simply include @FT_CACHE_H to have all
-   *   small bitmaps-related cache declarations.
-   *
-   */
-#define FT_CACHE_SMALL_BITMAPS_H  FT_CACHE_H
-
-
-  /*************************************************************************
-   *
-   * @macro:
-   *   FT_CACHE_CHARMAP_H
-   *
-   * @description:
-   *   A macro used in #include statements to name the file containing the
-   *   `charmap' API of the FreeType~2 cache sub-system.
-   *
-   *   This macro is deprecated.  Simply include @FT_CACHE_H to have all
-   *   charmap-based cache declarations.
-   *
-   */
-#define FT_CACHE_CHARMAP_H  FT_CACHE_H
-
-
   /*************************************************************************
   /*************************************************************************
    *
    *
    * @macro:
    * @macro:
@@ -760,17 +724,6 @@
 #define FT_LCD_FILTER_H  <freetype/ftlcdfil.h>
 #define FT_LCD_FILTER_H  <freetype/ftlcdfil.h>
 
 
 
 
-  /*************************************************************************
-   *
-   * @macro:
-   *   FT_UNPATENTED_HINTING_H
-   *
-   * @description:
-   *   Deprecated.
-   */
-#define FT_UNPATENTED_HINTING_H  <freetype/ttunpat.h>
-
-
   /*************************************************************************
   /*************************************************************************
    *
    *
    * @macro:
    * @macro:
@@ -809,25 +762,30 @@
 
 
   /* */
   /* */
 
 
+  /* These header files don't need to be included by the user. */
 #define FT_ERROR_DEFINITIONS_H  <freetype/fterrdef.h>
 #define FT_ERROR_DEFINITIONS_H  <freetype/fterrdef.h>
+#define FT_PARAMETER_TAGS_H     <freetype/ftparams.h>
 
 
+  /* Deprecated macros. */
+#define FT_UNPATENTED_HINTING_H   <freetype/ftparams.h>
+#define FT_TRUETYPE_UNPATENTED_H  <freetype/ftparams.h>
+
+  /* FT_CACHE_H is the only header file needed for the cache subsystem. */
+#define FT_CACHE_IMAGE_H          FT_CACHE_H
+#define FT_CACHE_SMALL_BITMAPS_H  FT_CACHE_H
+#define FT_CACHE_CHARMAP_H        FT_CACHE_H
 
 
   /* The internals of the cache sub-system are no longer exposed.  We */
   /* The internals of the cache sub-system are no longer exposed.  We */
   /* default to FT_CACHE_H at the moment just in case, but we know of */
   /* default to FT_CACHE_H at the moment just in case, but we know of */
   /* no rogue client that uses them.                                  */
   /* no rogue client that uses them.                                  */
   /*                                                                  */
   /*                                                                  */
-#define FT_CACHE_MANAGER_H           <freetype/ftcache.h>
-#define FT_CACHE_INTERNAL_MRU_H      <freetype/ftcache.h>
-#define FT_CACHE_INTERNAL_MANAGER_H  <freetype/ftcache.h>
-#define FT_CACHE_INTERNAL_CACHE_H    <freetype/ftcache.h>
-#define FT_CACHE_INTERNAL_GLYPH_H    <freetype/ftcache.h>
-#define FT_CACHE_INTERNAL_IMAGE_H    <freetype/ftcache.h>
-#define FT_CACHE_INTERNAL_SBITS_H    <freetype/ftcache.h>
-
-
-#define FT_INCREMENTAL_H          <freetype/ftincrem.h>
-
-#define FT_TRUETYPE_UNPATENTED_H  <freetype/ttunpat.h>
+#define FT_CACHE_MANAGER_H           FT_CACHE_H
+#define FT_CACHE_INTERNAL_MRU_H      FT_CACHE_H
+#define FT_CACHE_INTERNAL_MANAGER_H  FT_CACHE_H
+#define FT_CACHE_INTERNAL_CACHE_H    FT_CACHE_H
+#define FT_CACHE_INTERNAL_GLYPH_H    FT_CACHE_H
+#define FT_CACHE_INTERNAL_IMAGE_H    FT_CACHE_H
+#define FT_CACHE_INTERNAL_SBITS_H    FT_CACHE_H
 
 
 
 
   /*
   /*

+ 40 - 53
thirdparty/freetype/include/freetype/config/ftoption.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    User-selectable configuration macros (specification only).           */
 /*    User-selectable configuration macros (specification only).           */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2017 by                                                 */
+/*  Copyright 1996-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -75,19 +75,21 @@ FT_BEGIN_HEADER
   /*************************************************************************/
   /*************************************************************************/
 
 
 
 
-  /*************************************************************************/
+  /*#***********************************************************************/
   /*                                                                       */
   /*                                                                       */
   /* If you enable this configuration option, FreeType recognizes an       */
   /* If you enable this configuration option, FreeType recognizes an       */
   /* environment variable called `FREETYPE_PROPERTIES', which can be used  */
   /* environment variable called `FREETYPE_PROPERTIES', which can be used  */
   /* to control the various font drivers and modules.  The controllable    */
   /* to control the various font drivers and modules.  The controllable    */
-  /* properties are listed in the section `Controlling FreeType Modules'   */
-  /* in the reference's table of contents; currently there are properties  */
-  /* for the auto-hinter (file `ftautoh.h'), CFF (file `ftcffdrv.h'),      */
-  /* TrueType (file `ftttdrv.h'), and PCF (file `ftpcfdrv.h').             */
+  /* properties are listed in the section @properties.                     */
+  /*                                                                       */
+  /* You have to undefine this configuration option on platforms that lack */
+  /* the concept of environment variables (and thus don't have the         */
+  /* `getenv' function), for example Windows CE.                           */
   /*                                                                       */
   /*                                                                       */
   /* `FREETYPE_PROPERTIES' has the following syntax form (broken here into */
   /* `FREETYPE_PROPERTIES' has the following syntax form (broken here into */
   /* multiple lines for better readability).                               */
   /* multiple lines for better readability).                               */
   /*                                                                       */
   /*                                                                       */
+  /* {                                                                     */
   /*   <optional whitespace>                                               */
   /*   <optional whitespace>                                               */
   /*   <module-name1> ':'                                                  */
   /*   <module-name1> ':'                                                  */
   /*   <property-name1> '=' <property-value1>                              */
   /*   <property-name1> '=' <property-value1>                              */
@@ -95,6 +97,7 @@ FT_BEGIN_HEADER
   /*   <module-name2> ':'                                                  */
   /*   <module-name2> ':'                                                  */
   /*   <property-name2> '=' <property-value2>                              */
   /*   <property-name2> '=' <property-value2>                              */
   /*   ...                                                                 */
   /*   ...                                                                 */
+  /* }                                                                     */
   /*                                                                       */
   /*                                                                       */
   /* Example:                                                              */
   /* Example:                                                              */
   /*                                                                       */
   /*                                                                       */
@@ -211,6 +214,10 @@ FT_BEGIN_HEADER
   /*   Do not #undef this macro here since the build system might define   */
   /*   Do not #undef this macro here since the build system might define   */
   /*   it for certain configurations only.                                 */
   /*   it for certain configurations only.                                 */
   /*                                                                       */
   /*                                                                       */
+  /*   If you use a build system like cmake or the `configure' script,     */
+  /*   options set by those programs have precendence, overwriting the     */
+  /*   value here with the configured one.                                 */
+  /*                                                                       */
 /* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */
 /* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */
 
 
 
 
@@ -227,6 +234,10 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /*                                                                       */
   /*   Define this macro if you want to enable this `feature'.             */
   /*   Define this macro if you want to enable this `feature'.             */
   /*                                                                       */
   /*                                                                       */
+  /*   If you use a build system like cmake or the `configure' script,     */
+  /*   options set by those programs have precendence, overwriting the     */
+  /*   value here with the configured one.                                 */
+  /*                                                                       */
 /* #define FT_CONFIG_OPTION_USE_BZIP2 */
 /* #define FT_CONFIG_OPTION_USE_BZIP2 */
 
 
 
 
@@ -252,6 +263,10 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /*                                                                       */
   /*   Define this macro if you want to enable this `feature'.             */
   /*   Define this macro if you want to enable this `feature'.             */
   /*                                                                       */
   /*                                                                       */
+  /*   If you use a build system like cmake or the `configure' script,     */
+  /*   options set by those programs have precendence, overwriting the     */
+  /*   value here with the configured one.                                 */
+  /*                                                                       */
 /* #define FT_CONFIG_OPTION_USE_PNG */
 /* #define FT_CONFIG_OPTION_USE_PNG */
 
 
 
 
@@ -265,49 +280,11 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /*                                                                       */
   /*   Define this macro if you want to enable this `feature'.             */
   /*   Define this macro if you want to enable this `feature'.             */
   /*                                                                       */
   /*                                                                       */
-/* #define FT_CONFIG_OPTION_USE_HARFBUZZ */
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* DLL export compilation                                                */
-  /*                                                                       */
-  /*   When compiling FreeType as a DLL, some systems/compilers need a     */
-  /*   special keyword in front OR after the return type of function       */
-  /*   declarations.                                                       */
-  /*                                                                       */
-  /*   Two macros are used within the FreeType source code to define       */
-  /*   exported library functions: FT_EXPORT and FT_EXPORT_DEF.            */
-  /*                                                                       */
-  /*     FT_EXPORT( return_type )                                          */
-  /*                                                                       */
-  /*       is used in a function declaration, as in                        */
-  /*                                                                       */
-  /*         FT_EXPORT( FT_Error )                                         */
-  /*         FT_Init_FreeType( FT_Library*  alibrary );                    */
-  /*                                                                       */
+  /*   If you use a build system like cmake or the `configure' script,     */
+  /*   options set by those programs have precendence, overwriting the     */
+  /*   value here with the configured one.                                 */
   /*                                                                       */
   /*                                                                       */
-  /*     FT_EXPORT_DEF( return_type )                                      */
-  /*                                                                       */
-  /*       is used in a function definition, as in                         */
-  /*                                                                       */
-  /*         FT_EXPORT_DEF( FT_Error )                                     */
-  /*         FT_Init_FreeType( FT_Library*  alibrary )                     */
-  /*         {                                                             */
-  /*           ... some code ...                                           */
-  /*           return FT_Err_Ok;                                           */
-  /*         }                                                             */
-  /*                                                                       */
-  /*   You can provide your own implementation of FT_EXPORT and            */
-  /*   FT_EXPORT_DEF here if you want.  If you leave them undefined, they  */
-  /*   will be later automatically defined as `extern return_type' to      */
-  /*   allow normal compilation.                                           */
-  /*                                                                       */
-  /*   Do not #undef these macros here since the build system might define */
-  /*   them for certain configurations only.                               */
-  /*                                                                       */
-/* #define FT_EXPORT(x)      extern x */
-/* #define FT_EXPORT_DEF(x)  x */
+/* #define FT_CONFIG_OPTION_USE_HARFBUZZ */
 
 
 
 
   /*************************************************************************/
   /*************************************************************************/
@@ -678,7 +655,7 @@ FT_BEGIN_HEADER
   /* This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be      */
   /* This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be      */
   /* defined.                                                              */
   /* defined.                                                              */
   /*                                                                       */
   /*                                                                       */
-  /* [1] http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx */
+  /* [1] https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx */
   /*                                                                       */
   /*                                                                       */
 /* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING  1         */
 /* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING  1         */
 #define TT_CONFIG_OPTION_SUBPIXEL_HINTING  2
 #define TT_CONFIG_OPTION_SUBPIXEL_HINTING  2
@@ -698,7 +675,7 @@ FT_BEGIN_HEADER
   /* composite flags array which can be used to disambiguate, but old      */
   /* composite flags array which can be used to disambiguate, but old      */
   /* fonts will not have them.                                             */
   /* fonts will not have them.                                             */
   /*                                                                       */
   /*                                                                       */
-  /*   http://www.microsoft.com/typography/otspec/glyf.htm                 */
+  /*   https://www.microsoft.com/typography/otspec/glyf.htm                */
   /*   https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6glyf.html */
   /*   https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6glyf.html */
   /*                                                                       */
   /*                                                                       */
 #undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED
 #undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED
@@ -795,6 +772,16 @@ FT_BEGIN_HEADER
 #undef T1_CONFIG_OPTION_NO_MM_SUPPORT
 #undef T1_CONFIG_OPTION_NO_MM_SUPPORT
 
 
 
 
+  /*************************************************************************/
+  /*                                                                       */
+  /* T1_CONFIG_OPTION_OLD_ENGINE controls whether the pre-Adobe Type 1     */
+  /* engine gets compiled into FreeType.  If defined, it is possible to    */
+  /* switch between the two engines using the `hinting-engine' property of */
+  /* the type1 driver module.                                              */
+  /*                                                                       */
+/* #define T1_CONFIG_OPTION_OLD_ENGINE */
+
+
   /*************************************************************************/
   /*************************************************************************/
   /*************************************************************************/
   /*************************************************************************/
   /****                                                                 ****/
   /****                                                                 ****/
@@ -810,8 +797,8 @@ FT_BEGIN_HEADER
   /* possible to set up the default values of the four control points that */
   /* possible to set up the default values of the four control points that */
   /* define the stem darkening behaviour of the (new) CFF engine.  For     */
   /* define the stem darkening behaviour of the (new) CFF engine.  For     */
   /* more details please read the documentation of the                     */
   /* more details please read the documentation of the                     */
-  /* `darkening-parameters' property of the cff driver module (file        */
-  /* `ftcffdrv.h'), which allows the control at run-time.                  */
+  /* `darkening-parameters' property (file `ftdriver.h'), which allows the */
+  /* control at run-time.                                                  */
   /*                                                                       */
   /*                                                                       */
   /* Do *not* undefine these macros!                                       */
   /* Do *not* undefine these macros!                                       */
   /*                                                                       */
   /*                                                                       */
@@ -899,7 +886,7 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /*                                                                       */
   /* This experimental option is active only if the rendering mode is      */
   /* This experimental option is active only if the rendering mode is      */
   /* FT_RENDER_MODE_LIGHT; you can switch warping on and off with the      */
   /* FT_RENDER_MODE_LIGHT; you can switch warping on and off with the      */
-  /* `warping' property of the auto-hinter (see file `ftautoh.h' for more  */
+  /* `warping' property of the auto-hinter (see file `ftdriver.h' for more */
   /* information; by default it is switched off).                          */
   /* information; by default it is switched off).                          */
   /*                                                                       */
   /*                                                                       */
 #define AF_CONFIG_OPTION_USE_WARPER
 #define AF_CONFIG_OPTION_USE_WARPER

+ 1 - 1
thirdparty/freetype/include/freetype/config/ftstdlib.h

@@ -5,7 +5,7 @@
 /*    ANSI-specific library and header configuration file (specification   */
 /*    ANSI-specific library and header configuration file (specification   */
 /*    only).                                                               */
 /*    only).                                                               */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2002-2017 by                                                 */
+/*  Copyright 2002-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */

+ 185 - 85
thirdparty/freetype/include/freetype/freetype.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType high-level API and common types (specification only).       */
 /*    FreeType high-level API and common types (specification only).       */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2017 by                                                 */
+/*  Copyright 1996-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -138,6 +138,7 @@ FT_BEGIN_HEADER
   /*    FT_FACE_FLAG_TRICKY                                                */
   /*    FT_FACE_FLAG_TRICKY                                                */
   /*    FT_FACE_FLAG_KERNING                                               */
   /*    FT_FACE_FLAG_KERNING                                               */
   /*    FT_FACE_FLAG_MULTIPLE_MASTERS                                      */
   /*    FT_FACE_FLAG_MULTIPLE_MASTERS                                      */
+  /*    FT_FACE_FLAG_VARIATION                                             */
   /*    FT_FACE_FLAG_GLYPH_NAMES                                           */
   /*    FT_FACE_FLAG_GLYPH_NAMES                                           */
   /*    FT_FACE_FLAG_EXTERNAL_STREAM                                       */
   /*    FT_FACE_FLAG_EXTERNAL_STREAM                                       */
   /*    FT_FACE_FLAG_HINTER                                                */
   /*    FT_FACE_FLAG_HINTER                                                */
@@ -147,14 +148,16 @@ FT_BEGIN_HEADER
   /*    FT_HAS_KERNING                                                     */
   /*    FT_HAS_KERNING                                                     */
   /*    FT_HAS_FIXED_SIZES                                                 */
   /*    FT_HAS_FIXED_SIZES                                                 */
   /*    FT_HAS_GLYPH_NAMES                                                 */
   /*    FT_HAS_GLYPH_NAMES                                                 */
-  /*    FT_HAS_MULTIPLE_MASTERS                                            */
   /*    FT_HAS_COLOR                                                       */
   /*    FT_HAS_COLOR                                                       */
+  /*    FT_HAS_MULTIPLE_MASTERS                                            */
   /*                                                                       */
   /*                                                                       */
   /*    FT_IS_SFNT                                                         */
   /*    FT_IS_SFNT                                                         */
   /*    FT_IS_SCALABLE                                                     */
   /*    FT_IS_SCALABLE                                                     */
   /*    FT_IS_FIXED_WIDTH                                                  */
   /*    FT_IS_FIXED_WIDTH                                                  */
   /*    FT_IS_CID_KEYED                                                    */
   /*    FT_IS_CID_KEYED                                                    */
   /*    FT_IS_TRICKY                                                       */
   /*    FT_IS_TRICKY                                                       */
+  /*    FT_IS_NAMED_INSTANCE                                               */
+  /*    FT_IS_VARIATION                                                    */
   /*                                                                       */
   /*                                                                       */
   /*    FT_STYLE_FLAG_BOLD                                                 */
   /*    FT_STYLE_FLAG_BOLD                                                 */
   /*    FT_STYLE_FLAG_ITALIC                                               */
   /*    FT_STYLE_FLAG_ITALIC                                               */
@@ -648,7 +651,7 @@ FT_BEGIN_HEADER
   /*    FT_ENCODING_MS_SYMBOL ::                                           */
   /*    FT_ENCODING_MS_SYMBOL ::                                           */
   /*      Microsoft Symbol encoding, used to encode mathematical symbols   */
   /*      Microsoft Symbol encoding, used to encode mathematical symbols   */
   /*      and wingdings.  For more information, see                        */
   /*      and wingdings.  For more information, see                        */
-  /*      `http://www.microsoft.com/typography/otspec/recom.htm',          */
+  /*      `https://www.microsoft.com/typography/otspec/recom.htm',         */
   /*      `http://www.kostis.net/charsets/symbol.htm', and                 */
   /*      `http://www.kostis.net/charsets/symbol.htm', and                 */
   /*      `http://www.kostis.net/charsets/wingding.htm'.                   */
   /*      `http://www.kostis.net/charsets/wingding.htm'.                   */
   /*                                                                       */
   /*                                                                       */
@@ -657,7 +660,7 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /*                                                                       */
   /*    FT_ENCODING_SJIS ::                                                */
   /*    FT_ENCODING_SJIS ::                                                */
   /*      Shift JIS encoding for Japanese.  More info at                   */
   /*      Shift JIS encoding for Japanese.  More info at                   */
-  /*      `http://en.wikipedia.org/wiki/Shift_JIS'.  See note on           */
+  /*      `https://en.wikipedia.org/wiki/Shift_JIS'.  See note on          */
   /*      multi-byte encodings below.                                      */
   /*      multi-byte encodings below.                                      */
   /*                                                                       */
   /*                                                                       */
   /*    FT_ENCODING_PRC ::                                                 */
   /*    FT_ENCODING_PRC ::                                                 */
@@ -673,7 +676,7 @@ FT_BEGIN_HEADER
   /*      Corresponds to the Korean encoding system known as Extended      */
   /*      Corresponds to the Korean encoding system known as Extended      */
   /*      Wansung (MS Windows code page 949).                              */
   /*      Wansung (MS Windows code page 949).                              */
   /*      For more information see                                         */
   /*      For more information see                                         */
-  /*      `http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit949.txt'. */
+  /*      `https://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit949.txt'. */
   /*                                                                       */
   /*                                                                       */
   /*    FT_ENCODING_JOHAB ::                                               */
   /*    FT_ENCODING_JOHAB ::                                               */
   /*      The Korean standard character set (KS~C 5601-1992), which        */
   /*      The Korean standard character set (KS~C 5601-1992), which        */
@@ -721,11 +724,12 @@ FT_BEGIN_HEADER
   /*      Same as FT_ENCODING_JOHAB.  Deprecated.                          */
   /*      Same as FT_ENCODING_JOHAB.  Deprecated.                          */
   /*                                                                       */
   /*                                                                       */
   /* <Note>                                                                */
   /* <Note>                                                                */
-  /*    By default, FreeType automatically synthesizes a Unicode charmap   */
-  /*    for PostScript fonts, using their glyph name dictionaries.         */
-  /*    However, it also reports the encodings defined explicitly in the   */
-  /*    font file, for the cases when they are needed, with the Adobe      */
-  /*    values as well.                                                    */
+  /*    By default, FreeType enables a Unicode charmap and tags it with    */
+  /*    FT_ENCODING_UNICODE when it is either provided or can be generated */
+  /*    from PostScript glyph name dictionaries in the font file.          */
+  /*    All other encodings are considered legacy and tagged only if       */
+  /*    explicitly defined in the font file.  Otherwise, FT_ENCODING_NONE  */
+  /*    is used.                                                           */
   /*                                                                       */
   /*                                                                       */
   /*    FT_ENCODING_NONE is set by the BDF and PCF drivers if the charmap  */
   /*    FT_ENCODING_NONE is set by the BDF and PCF drivers if the charmap  */
   /*    is neither Unicode nor ISO-8859-1 (otherwise it is set to          */
   /*    is neither Unicode nor ISO-8859-1 (otherwise it is set to          */
@@ -749,7 +753,7 @@ FT_BEGIN_HEADER
   /*    @FT_Get_CMap_Language_ID to query the Mac language ID that may     */
   /*    @FT_Get_CMap_Language_ID to query the Mac language ID that may     */
   /*    be needed to be able to distinguish Apple encoding variants.  See  */
   /*    be needed to be able to distinguish Apple encoding variants.  See  */
   /*                                                                       */
   /*                                                                       */
-  /*      http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/Readme.txt  */
+  /*      https://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/Readme.txt */
   /*                                                                       */
   /*                                                                       */
   /*    to get an idea how to do that.  Basically, if the language ID      */
   /*    to get an idea how to do that.  Basically, if the language ID      */
   /*    is~0, don't use it, otherwise subtract 1 from the language ID.     */
   /*    is~0, don't use it, otherwise subtract 1 from the language ID.     */
@@ -888,34 +892,41 @@ FT_BEGIN_HEADER
   /*                           are set to~0 if there is only one face in   */
   /*                           are set to~0 if there is only one face in   */
   /*                           the font file.                              */
   /*                           the font file.                              */
   /*                                                                       */
   /*                                                                       */
-  /*                           Bits 16-30 are relevant to GX and OpenType  */
-  /*                           variation fonts only, holding the named     */
-  /*                           instance index for the current face index   */
-  /*                           (starting with value~1; value~0 indicates   */
-  /*                           font access without a named instance).  For */
-  /*                           non-variation fonts, bits 16-30 are         */
-  /*                           ignored.  If we have the third named        */
-  /*                           instance of face~4, say, `face_index' is    */
-  /*                           set to 0x00030004.                          */
+  /*                           [Since 2.6.1] Bits 16-30 are relevant to GX */
+  /*                           and OpenType variation fonts only, holding  */
+  /*                           the named instance index for the current    */
+  /*                           face index (starting with value~1; value~0  */
+  /*                           indicates font access without a named       */
+  /*                           instance).  For non-variation fonts, bits   */
+  /*                           16-30 are ignored.  If we have the third    */
+  /*                           named instance of face~4, say, `face_index' */
+  /*                           is set to 0x00030004.                       */
   /*                                                                       */
   /*                                                                       */
   /*                           Bit 31 is always zero (this is,             */
   /*                           Bit 31 is always zero (this is,             */
   /*                           `face_index' is always a positive value).   */
   /*                           `face_index' is always a positive value).   */
   /*                                                                       */
   /*                                                                       */
+  /*                           [Since 2.9] Changing the design coordinates */
+  /*                           with @FT_Set_Var_Design_Coordinates or      */
+  /*                           @FT_Set_Var_Blend_Coordinates does not      */
+  /*                           influence the named instance index value    */
+  /*                           (only @FT_Set_Named_Instance does that).    */
+  /*                                                                       */
   /*    face_flags          :: A set of bit flags that give important      */
   /*    face_flags          :: A set of bit flags that give important      */
   /*                           information about the face; see             */
   /*                           information about the face; see             */
   /*                           @FT_FACE_FLAG_XXX for the details.          */
   /*                           @FT_FACE_FLAG_XXX for the details.          */
   /*                                                                       */
   /*                                                                       */
   /*    style_flags         :: The lower 16~bits contain a set of bit      */
   /*    style_flags         :: The lower 16~bits contain a set of bit      */
   /*                           flags indicating the style of the face; see */
   /*                           flags indicating the style of the face; see */
-  /*                           @FT_STYLE_FLAG_XXX for the details.  Bits   */
-  /*                           16-30 hold the number of named instances    */
-  /*                           available for the current face if we have a */
-  /*                           GX or OpenType variation (sub)font.  Bit 31 */
-  /*                           is always zero (this is, `style_flags' is   */
-  /*                           always a positive value).  Note that a      */
-  /*                           variation font has always at least one      */
-  /*                           named instance, namely the default          */
-  /*                           instance.                                   */
+  /*                           @FT_STYLE_FLAG_XXX for the details.         */
+  /*                                                                       */
+  /*                           [Since 2.6.1] Bits 16-30 hold the number    */
+  /*                           of named instances available for the        */
+  /*                           current face if we have a GX or OpenType    */
+  /*                           variation (sub)font.  Bit 31 is always zero */
+  /*                           (this is, `style_flags' is always a         */
+  /*                           positive value).  Note that a variation     */
+  /*                           font has always at least one named          */
+  /*                           instance, namely the default instance.      */
   /*                                                                       */
   /*                                                                       */
   /*    num_glyphs          :: The number of glyphs in the face.  If the   */
   /*    num_glyphs          :: The number of glyphs in the face.  If the   */
   /*                           face is scalable and has sbits (see         */
   /*                           face is scalable and has sbits (see         */
@@ -1052,6 +1063,9 @@ FT_BEGIN_HEADER
   /*    `descender', `height', `underline_position', and                   */
   /*    `descender', `height', `underline_position', and                   */
   /*    `underline_thickness'.                                             */
   /*    `underline_thickness'.                                             */
   /*                                                                       */
   /*                                                                       */
+  /*    Especially for TrueType fonts see also the documentation for       */
+  /*    @FT_Size_Metrics.                                                  */
+  /*                                                                       */
   typedef struct  FT_FaceRec_
   typedef struct  FT_FaceRec_
   {
   {
     FT_Long           num_faces;
     FT_Long           num_faces;
@@ -1162,7 +1176,7 @@ FT_BEGIN_HEADER
   /*      interpolating between them.  Supported formats are Adobe MM,     */
   /*      interpolating between them.  Supported formats are Adobe MM,     */
   /*      TrueType GX, and OpenType variation fonts.                       */
   /*      TrueType GX, and OpenType variation fonts.                       */
   /*                                                                       */
   /*                                                                       */
-  /*      See the multiple-masters specific API for details.               */
+  /*      See section @multiple_masters for API details.                   */
   /*                                                                       */
   /*                                                                       */
   /*    FT_FACE_FLAG_GLYPH_NAMES ::                                        */
   /*    FT_FACE_FLAG_GLYPH_NAMES ::                                        */
   /*      The face contains glyph names, which can be retrieved using      */
   /*      The face contains glyph names, which can be retrieved using      */
@@ -1212,8 +1226,15 @@ FT_BEGIN_HEADER
   /*      tricky fonts; they are hard-coded in file `ttobjs.c'.            */
   /*      tricky fonts; they are hard-coded in file `ttobjs.c'.            */
   /*                                                                       */
   /*                                                                       */
   /*    FT_FACE_FLAG_COLOR ::                                              */
   /*    FT_FACE_FLAG_COLOR ::                                              */
-  /*      The face has color glyph tables.  To access color glyphs use     */
-  /*      @FT_LOAD_COLOR.                                                  */
+  /*      [Since 2.5.1] The face has color glyph tables.  To access color  */
+  /*      glyphs use @FT_LOAD_COLOR.                                       */
+  /*                                                                       */
+  /*    FT_FACE_FLAG_VARIATION ::                                          */
+  /*      [Since 2.9] Set if the current face (or named instance) has been */
+  /*      altered with @FT_Set_MM_Design_Coordinates,                      */
+  /*      @FT_Set_Var_Design_Coordinates, or                               */
+  /*      @FT_Set_Var_Blend_Coordinates.  This flag is unset by a call to  */
+  /*      @FT_Set_Named_Instance.                                          */
   /*                                                                       */
   /*                                                                       */
 #define FT_FACE_FLAG_SCALABLE          ( 1L <<  0 )
 #define FT_FACE_FLAG_SCALABLE          ( 1L <<  0 )
 #define FT_FACE_FLAG_FIXED_SIZES       ( 1L <<  1 )
 #define FT_FACE_FLAG_FIXED_SIZES       ( 1L <<  1 )
@@ -1230,6 +1251,7 @@ FT_BEGIN_HEADER
 #define FT_FACE_FLAG_CID_KEYED         ( 1L << 12 )
 #define FT_FACE_FLAG_CID_KEYED         ( 1L << 12 )
 #define FT_FACE_FLAG_TRICKY            ( 1L << 13 )
 #define FT_FACE_FLAG_TRICKY            ( 1L << 13 )
 #define FT_FACE_FLAG_COLOR             ( 1L << 14 )
 #define FT_FACE_FLAG_COLOR             ( 1L << 14 )
+#define FT_FACE_FLAG_VARIATION         ( 1L << 15 )
 
 
 
 
   /*************************************************************************
   /*************************************************************************
@@ -1391,11 +1413,37 @@ FT_BEGIN_HEADER
    *   A macro that returns true whenever a face object is a named instance
    *   A macro that returns true whenever a face object is a named instance
    *   of a GX or OpenType variation font.
    *   of a GX or OpenType variation font.
    *
    *
+   *   [Since 2.9] Changing the design coordinates with
+   *   @FT_Set_Var_Design_Coordinates or @FT_Set_Var_Blend_Coordinates does
+   *   not influence the return value of this macro (only
+   *   @FT_Set_Named_Instance does that).
+   *
+   * @since:
+   *   2.7
+   *
    */
    */
 #define FT_IS_NAMED_INSTANCE( face ) \
 #define FT_IS_NAMED_INSTANCE( face ) \
           ( (face)->face_index & 0x7FFF0000L )
           ( (face)->face_index & 0x7FFF0000L )
 
 
 
 
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_IS_VARIATION( face )
+   *
+   * @description:
+   *   A macro that returns true whenever a face object has been altered
+   *   by @FT_Set_MM_Design_Coordinates, @FT_Set_Var_Design_Coordinates, or
+   *   @FT_Set_Var_Blend_Coordinates.
+   *
+   * @since:
+   *   2.9
+   *
+   */
+#define FT_IS_VARIATION( face ) \
+          ( (face)->face_flags & FT_FACE_FLAG_VARIATION )
+
+
   /*************************************************************************
   /*************************************************************************
    *
    *
    * @macro:
    * @macro:
@@ -1437,6 +1485,9 @@ FT_BEGIN_HEADER
    *   A macro that returns true whenever a face object contains
    *   A macro that returns true whenever a face object contains
    *   tables for color glyphs.
    *   tables for color glyphs.
    *
    *
+   * @since:
+   *   2.5.1
+   *
    */
    */
 #define FT_HAS_COLOR( face ) \
 #define FT_HAS_COLOR( face ) \
           ( (face)->face_flags & FT_FACE_FLAG_COLOR )
           ( (face)->face_flags & FT_FACE_FLAG_COLOR )
@@ -1534,7 +1585,7 @@ FT_BEGIN_HEADER
   /*    to the following.                                                  */
   /*    to the following.                                                  */
   /*                                                                       */
   /*                                                                       */
   /*    {                                                                  */
   /*    {                                                                  */
-  /*      scaled_ascender = FT_MulFix( face->root.ascender,                */
+  /*      scaled_ascender = FT_MulFix( face->ascender,                     */
   /*                                   size_metrics->y_scale );            */
   /*                                   size_metrics->y_scale );            */
   /*    }                                                                  */
   /*    }                                                                  */
   /*                                                                       */
   /*                                                                       */
@@ -1548,6 +1599,43 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /*                                                                       */
   /*    The `FT_Size_Metrics' structure is valid for bitmap fonts also.    */
   /*    The `FT_Size_Metrics' structure is valid for bitmap fonts also.    */
   /*                                                                       */
   /*                                                                       */
+  /*                                                                       */
+  /*    *TrueType* *fonts* *with* *native* *bytecode* *hinting*            */
+  /*                                                                       */
+  /*    All applications that handle TrueType fonts with native hinting    */
+  /*    must be aware that TTFs expect different rounding of vertical font */
+  /*    dimensions.  The application has to cater for this, especially if  */
+  /*    it wants to rely on a TTF's vertical data (for example, to         */
+  /*    properly align box characters vertically).                         */
+  /*                                                                       */
+  /*    Only the application knows _in_ _advance_ that it is going to use  */
+  /*    native hinting for TTFs!  FreeType, on the other hand, selects the */
+  /*    hinting mode not at the time of creating an @FT_Size object but    */
+  /*    much later, namely while calling @FT_Load_Glyph.                   */
+  /*                                                                       */
+  /*    Here is some pseudo code that illustrates a possible solution.     */
+  /*                                                                       */
+  /*    {                                                                  */
+  /*      font_format = FT_Get_Font_Format( face );                        */
+  /*                                                                       */
+  /*      if ( !strcmp( font_format, "TrueType" ) &&                       */
+  /*           do_native_bytecode_hinting         )                        */
+  /*      {                                                                */
+  /*        ascender  = ROUND( FT_MulFix( face->ascender,                  */
+  /*                                      size_metrics->y_scale ) );       */
+  /*        descender = ROUND( FT_MulFix( face->descender,                 */
+  /*                                      size_metrics->y_scale ) );       */
+  /*      }                                                                */
+  /*      else                                                             */
+  /*      {                                                                */
+  /*        ascender  = size_metrics->ascender;                            */
+  /*        descender = size_metrics->descender;                           */
+  /*      }                                                                */
+  /*                                                                       */
+  /*      height      = size_metrics->height;                              */
+  /*      max_advance = size_metrics->max_advance;                         */
+  /*    }                                                                  */
+  /*                                                                       */
   typedef struct  FT_Size_Metrics_
   typedef struct  FT_Size_Metrics_
   {
   {
     FT_UShort  x_ppem;      /* horizontal pixels per EM               */
     FT_UShort  x_ppem;      /* horizontal pixels per EM               */
@@ -1689,17 +1777,13 @@ FT_BEGIN_HEADER
   /*                         @FT_GLYPH_FORMAT_COMPOSITE, but other values  */
   /*                         @FT_GLYPH_FORMAT_COMPOSITE, but other values  */
   /*                         are possible.                                 */
   /*                         are possible.                                 */
   /*                                                                       */
   /*                                                                       */
-  /*    bitmap            :: This field is used as a bitmap descriptor     */
-  /*                         when the slot format is                       */
-  /*                         @FT_GLYPH_FORMAT_BITMAP.  Note that the       */
-  /*                         address and content of the bitmap buffer can  */
-  /*                         change between calls of @FT_Load_Glyph and a  */
-  /*                         few other functions.                          */
+  /*    bitmap            :: This field is used as a bitmap descriptor.    */
+  /*                         Note that the address and content of the      */
+  /*                         bitmap buffer can change between calls of     */
+  /*                         @FT_Load_Glyph and a few other functions.     */
   /*                                                                       */
   /*                                                                       */
   /*    bitmap_left       :: The bitmap's left bearing expressed in        */
   /*    bitmap_left       :: The bitmap's left bearing expressed in        */
-  /*                         integer pixels.  Only valid if the format is  */
-  /*                         @FT_GLYPH_FORMAT_BITMAP, this is, if the      */
-  /*                         glyph slot contains a bitmap.                 */
+  /*                         integer pixels.                               */
   /*                                                                       */
   /*                                                                       */
   /*    bitmap_top        :: The bitmap's top bearing expressed in integer */
   /*    bitmap_top        :: The bitmap's top bearing expressed in integer */
   /*                         pixels.  This is the distance from the        */
   /*                         pixels.  This is the distance from the        */
@@ -1746,7 +1830,9 @@ FT_BEGIN_HEADER
   /*    If @FT_Load_Glyph is called with default flags (see                */
   /*    If @FT_Load_Glyph is called with default flags (see                */
   /*    @FT_LOAD_DEFAULT) the glyph image is loaded in the glyph slot in   */
   /*    @FT_LOAD_DEFAULT) the glyph image is loaded in the glyph slot in   */
   /*    its native format (e.g., an outline glyph for TrueType and Type~1  */
   /*    its native format (e.g., an outline glyph for TrueType and Type~1  */
-  /*    formats).                                                          */
+  /*    formats).  [Since 2.9] The prospective bitmap metrics are          */
+  /*    calculated according to @FT_LOAD_TARGET_XXX and other flags even   */
+  /*    for the outline glyph, even if @FT_LOAD_RENDER is not set.         */
   /*                                                                       */
   /*                                                                       */
   /*    This image can later be converted into a bitmap by calling         */
   /*    This image can later be converted into a bitmap by calling         */
   /*    @FT_Render_Glyph.  This function searches the current renderer for */
   /*    @FT_Render_Glyph.  This function searches the current renderer for */
@@ -1895,8 +1981,8 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /*                                                                       */
   /*    If compilation option FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES is   */
   /*    If compilation option FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES is   */
   /*    set, this function reads the `FREETYPE_PROPERTIES' environment     */
   /*    set, this function reads the `FREETYPE_PROPERTIES' environment     */
-  /*    variable to control driver properties.  See sections @auto_hinter, */
-  /*    @cff_driver, @pcf_driver, and @tt_driver for more.                 */
+  /*    variable to control driver properties.  See section @properties    */
+  /*    for more.                                                          */
   /*                                                                       */
   /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_EXPORT( FT_Error )
   FT_Init_FreeType( FT_Library  *alibrary );
   FT_Init_FreeType( FT_Library  *alibrary );
@@ -1977,8 +2063,8 @@ FT_BEGIN_HEADER
   /*    data :: A pointer to the parameter data.                           */
   /*    data :: A pointer to the parameter data.                           */
   /*                                                                       */
   /*                                                                       */
   /* <Note>                                                                */
   /* <Note>                                                                */
-  /*    The ID and function of parameters are driver-specific.  See the    */
-  /*    various FT_PARAM_TAG_XXX flags for more information.               */
+  /*    The ID and function of parameters are driver-specific.  See        */
+  /*    section @parameter_tags for more information.                      */
   /*                                                                       */
   /*                                                                       */
   typedef struct  FT_Parameter_
   typedef struct  FT_Parameter_
   {
   {
@@ -2155,14 +2241,14 @@ FT_BEGIN_HEADER
   /*                  with value~0).  Set it to~0 if there is only one     */
   /*                  with value~0).  Set it to~0 if there is only one     */
   /*                  face in the font file.                               */
   /*                  face in the font file.                               */
   /*                                                                       */
   /*                                                                       */
-  /*                  Bits 16-30 are relevant to GX and OpenType variation */
-  /*                  fonts only, specifying the named instance index for  */
-  /*                  the current face index (starting with value~1;       */
-  /*                  value~0 makes FreeType ignore named instances).  For */
-  /*                  non-variation fonts, bits 16-30 are ignored.         */
-  /*                  Assuming that you want to access the third named     */
-  /*                  instance in face~4, `face_index' should be set to    */
-  /*                  0x00030004.  If you want to access face~4 without    */
+  /*                  [Since 2.6.1] Bits 16-30 are relevant to GX and      */
+  /*                  OpenType variation fonts only, specifying the named  */
+  /*                  instance index for the current face index (starting  */
+  /*                  with value~1; value~0 makes FreeType ignore named    */
+  /*                  instances).  For non-variation fonts, bits 16-30 are */
+  /*                  ignored.  Assuming that you want to access the third */
+  /*                  named instance in face~4, `face_index' should be set */
+  /*                  to 0x00030004.  If you want to access face~4 without */
   /*                  variation handling, simply set `face_index' to       */
   /*                  variation handling, simply set `face_index' to       */
   /*                  value~4.                                             */
   /*                  value~4.                                             */
   /*                                                                       */
   /*                                                                       */
@@ -2748,6 +2834,10 @@ FT_BEGIN_HEADER
   /*    since its glyph indices are not listed in any of the font's        */
   /*    since its glyph indices are not listed in any of the font's        */
   /*    charmaps.                                                          */
   /*    charmaps.                                                          */
   /*                                                                       */
   /*                                                                       */
+  /*    If no active cmap is set up (i.e., `face->charmap' is zero), the   */
+  /*    call to @FT_Get_Char_Index is omitted, and the function behaves    */
+  /*    identically to @FT_Load_Glyph.                                     */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_EXPORT( FT_Error )
   FT_Load_Char( FT_Face   face,
   FT_Load_Char( FT_Face   face,
                 FT_ULong  char_code,
                 FT_ULong  char_code,
@@ -2869,26 +2959,26 @@ FT_BEGIN_HEADER
    *     Disable the auto-hinter.  See also the note below.
    *     Disable the auto-hinter.  See also the note below.
    *
    *
    *   FT_LOAD_COLOR ::
    *   FT_LOAD_COLOR ::
-   *     Load embedded color bitmap images.  The resulting color bitmaps,
-   *     if available, will have the @FT_PIXEL_MODE_BGRA format.  If the
-   *     flag is not set and color bitmaps are found, they are converted
-   *     to 256-level gray bitmaps transparently, using the
+   *     [Since 2.5] Load embedded color bitmap images.  The resulting color
+   *     bitmaps, if available, will have the @FT_PIXEL_MODE_BGRA format.
+   *     If the flag is not set and color bitmaps are found, they are
+   *     converted to 256-level gray bitmaps transparently, using the
    *     @FT_PIXEL_MODE_GRAY format.
    *     @FT_PIXEL_MODE_GRAY format.
    *
    *
    *   FT_LOAD_COMPUTE_METRICS ::
    *   FT_LOAD_COMPUTE_METRICS ::
-   *     Compute glyph metrics from the glyph data, without the use of
-   *     bundled metrics tables (for example, the `hdmx' table in TrueType
-   *     fonts).  This flag is mainly used by font validating or font
-   *     editing applications, which need to ignore, verify, or edit those
-   *     tables.
+   *     [Since 2.6.1] Compute glyph metrics from the glyph data, without
+   *     the use of bundled metrics tables (for example, the `hdmx' table in
+   *     TrueType fonts).  This flag is mainly used by font validating or
+   *     font editing applications, which need to ignore, verify, or edit
+   *     those tables.
    *
    *
    *     Currently, this flag is only implemented for TrueType fonts.
    *     Currently, this flag is only implemented for TrueType fonts.
    *
    *
    *   FT_LOAD_BITMAP_METRICS_ONLY ::
    *   FT_LOAD_BITMAP_METRICS_ONLY ::
-   *     Request loading of the metrics and bitmap image information of a
-   *     (possibly embedded) bitmap glyph without allocating or copying
-   *     the bitmap image data itself.  No effect if the target glyph is
-   *     not a bitmap image.
+   *     [Since 2.7.1] Request loading of the metrics and bitmap image
+   *     information of a (possibly embedded) bitmap glyph without
+   *     allocating or copying the bitmap image data itself.  No effect if
+   *     the target glyph is not a bitmap image.
    *
    *
    *     This flag unsets @FT_LOAD_RENDER.
    *     This flag unsets @FT_LOAD_RENDER.
    *
    *
@@ -2980,7 +3070,7 @@ FT_BEGIN_HEADER
    *
    *
    *     Advance widths are rounded to integer values; however, using the
    *     Advance widths are rounded to integer values; however, using the
    *     `lsb_delta' and `rsb_delta' fields of @FT_GlyphSlotRec, it is
    *     `lsb_delta' and `rsb_delta' fields of @FT_GlyphSlotRec, it is
-   *     possible to get fractional advance widths for sub-pixel positioning
+   *     possible to get fractional advance widths for subpixel positioning
    *     (which is recommended to use).
    *     (which is recommended to use).
    *
    *
    *     If configuration option AF_CONFIG_OPTION_TT_SIZE_METRICS is active,
    *     If configuration option AF_CONFIG_OPTION_TT_SIZE_METRICS is active,
@@ -3119,13 +3209,13 @@ FT_BEGIN_HEADER
   /*      opacity).                                                        */
   /*      opacity).                                                        */
   /*                                                                       */
   /*                                                                       */
   /*    FT_RENDER_MODE_LCD ::                                              */
   /*    FT_RENDER_MODE_LCD ::                                              */
-  /*      This mode corresponds to horizontal RGB and BGR sub-pixel        */
+  /*      This mode corresponds to horizontal RGB and BGR subpixel         */
   /*      displays like LCD screens.  It produces 8-bit bitmaps that are   */
   /*      displays like LCD screens.  It produces 8-bit bitmaps that are   */
   /*      3~times the width of the original glyph outline in pixels, and   */
   /*      3~times the width of the original glyph outline in pixels, and   */
   /*      which use the @FT_PIXEL_MODE_LCD mode.                           */
   /*      which use the @FT_PIXEL_MODE_LCD mode.                           */
   /*                                                                       */
   /*                                                                       */
   /*    FT_RENDER_MODE_LCD_V ::                                            */
   /*    FT_RENDER_MODE_LCD_V ::                                            */
-  /*      This mode corresponds to vertical RGB and BGR sub-pixel displays */
+  /*      This mode corresponds to vertical RGB and BGR subpixel displays  */
   /*      (like PDA screens, rotated LCD displays, etc.).  It produces     */
   /*      (like PDA screens, rotated LCD displays, etc.).  It produces     */
   /*      8-bit bitmaps that are 3~times the height of the original        */
   /*      8-bit bitmaps that are 3~times the height of the original        */
   /*      glyph outline in pixels and use the @FT_PIXEL_MODE_LCD_V mode.   */
   /*      glyph outline in pixels and use the @FT_PIXEL_MODE_LCD_V mode.   */
@@ -3471,7 +3561,14 @@ FT_BEGIN_HEADER
   /*    retrieve it.  FreeType follows Adobe TechNote #5902, `Generating   */
   /*    retrieve it.  FreeType follows Adobe TechNote #5902, `Generating   */
   /*    PostScript Names for Fonts Using OpenType Font Variations'.        */
   /*    PostScript Names for Fonts Using OpenType Font Variations'.        */
   /*                                                                       */
   /*                                                                       */
-  /*      http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/font/pdfs/5902.AdobePSNameGeneration.html */
+  /*      https://download.macromedia.com/pub/developer/opentype/tech-notes/5902.AdobePSNameGeneration.html */
+  /*                                                                       */
+  /*    [Since 2.9] Special PostScript names for named instances are only  */
+  /*    returned if the named instance is set with @FT_Set_Named_Instance  */
+  /*    (and the font has corresponding entries in its `fvar' table).  If  */
+  /*    @FT_IS_VARIATION returns true, the algorithmically derived         */
+  /*    PostScript name is provided, not looking up special entries for    */
+  /*    named instances.                                                   */
   /*                                                                       */
   /*                                                                       */
   FT_EXPORT( const char* )
   FT_EXPORT( const char* )
   FT_Get_Postscript_Name( FT_Face  face );
   FT_Get_Postscript_Name( FT_Face  face );
@@ -3702,17 +3799,17 @@ FT_BEGIN_HEADER
    *   Note that only a subset of the available properties can be
    *   Note that only a subset of the available properties can be
    *   controlled.
    *   controlled.
    *
    *
-   *   * Stem darkening (@FT_PARAM_TAG_STEM_DARKENING, corresponding to the
-   *     property `no-stem-darkening' provided by the `autofit' and `cff'
-   *     modules; see @no-stem-darkening[autofit] and
-   *     @no-stem-darkening[cff]).
+   *   * @FT_PARAM_TAG_STEM_DARKENING (stem darkening, corresponding to the
+   *     property `no-stem-darkening' provided by the `autofit', `cff',
+   *     `type1', and `t1cid' modules; see @no-stem-darkening).
    *
    *
-   *   * LCD filter weights (@FT_PARAM_TAG_LCD_FILTER_WEIGHTS, corresponding
+   *   * @FT_PARAM_TAG_LCD_FILTER_WEIGHTS (LCD filter weights, corresponding
    *     to function @FT_Library_SetLcdFilterWeights).
    *     to function @FT_Library_SetLcdFilterWeights).
    *
    *
-   *   * Seed value for the CFF `random' operator
-   *     (@FT_PARAM_TAG_RANDOM_SEED, corresponding to the `random-seed'
-   *     property provided by the `cff' module; see @random-seed).
+   *   * @FT_PARAM_TAG_RANDOM_SEED (seed value for the CFF, Type~1, and CID
+   *     `random' operator, corresponding to the `random-seed' property
+   *     provided by the `cff', `type1', and `t1cid' modules; see
+   *     @random-seed).
    *
    *
    *   Pass NULL as `data' in @FT_Parameter for a given tag to reset the
    *   Pass NULL as `data' in @FT_Parameter for a given tag to reset the
    *   option and use the library or module default again.
    *   option and use the library or module default again.
@@ -3775,6 +3872,9 @@ FT_BEGIN_HEADER
    *     FT_Face_Properties( face, 1, &property );
    *     FT_Face_Properties( face, 1, &property );
    *   }
    *   }
    *
    *
+   * @since:
+   *   2.8
+   *
    */
    */
   FT_EXPORT( FT_Error )
   FT_EXPORT( FT_Error )
   FT_Face_Properties( FT_Face        face,
   FT_Face_Properties( FT_Face        face,
@@ -3899,7 +3999,7 @@ FT_BEGIN_HEADER
   /*    and subsetting restrictions associated with a font.                */
   /*    and subsetting restrictions associated with a font.                */
   /*                                                                       */
   /*                                                                       */
   /*    See                                                                */
   /*    See                                                                */
-  /*    http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/FontPolicies.pdf */
+  /*    https://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/FontPolicies.pdf */
   /*    for more details.                                                  */
   /*    for more details.                                                  */
   /*                                                                       */
   /*                                                                       */
   /* <Values>                                                              */
   /* <Values>                                                              */
@@ -3999,9 +4099,9 @@ FT_BEGIN_HEADER
   /*    Sequences' (IVS), collected in the `Ideographic Variation          */
   /*    Sequences' (IVS), collected in the `Ideographic Variation          */
   /*    Database' (IVD).                                                   */
   /*    Database' (IVD).                                                   */
   /*                                                                       */
   /*                                                                       */
-  /*      http://unicode.org/Public/UCD/latest/ucd/StandardizedVariants.txt */
-  /*      http://unicode.org/reports/tr37/                                 */
-  /*      http://unicode.org/ivd/                                          */
+  /*      https://unicode.org/Public/UCD/latest/ucd/StandardizedVariants.txt */
+  /*      https://unicode.org/reports/tr37/                                */
+  /*      https://unicode.org/ivd/                                         */
   /*                                                                       */
   /*                                                                       */
   /*    To date (January 2017), the character with the most ideographic    */
   /*    To date (January 2017), the character with the most ideographic    */
   /*    variations is U+9089, having 32 such IVS.                          */
   /*    variations is U+9089, having 32 such IVS.                          */
@@ -4456,7 +4556,7 @@ FT_BEGIN_HEADER
    *
    *
    */
    */
 #define FREETYPE_MAJOR  2
 #define FREETYPE_MAJOR  2
-#define FREETYPE_MINOR  8
+#define FREETYPE_MINOR  9
 #define FREETYPE_PATCH  1
 #define FREETYPE_PATCH  1
 
 
 
 

+ 1 - 1
thirdparty/freetype/include/freetype/ftadvanc.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    Quick computation of advance widths (specification only).            */
 /*    Quick computation of advance widths (specification only).            */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2008-2017 by                                                 */
+/*  Copyright 2008-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */

+ 2 - 2
thirdparty/freetype/include/freetype/ftbbox.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType exact bbox computation (specification).                     */
 /*    FreeType exact bbox computation (specification).                     */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2017 by                                                 */
+/*  Copyright 1996-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -61,7 +61,7 @@ FT_BEGIN_HEADER
   /*    Compute the exact bounding box of an outline.  This is slower      */
   /*    Compute the exact bounding box of an outline.  This is slower      */
   /*    than computing the control box.  However, it uses an advanced      */
   /*    than computing the control box.  However, it uses an advanced      */
   /*    algorithm that returns _very_ quickly when the two boxes           */
   /*    algorithm that returns _very_ quickly when the two boxes           */
-  /*    coincide.  Otherwise, the outline Bézier arcs are traversed to     */
+  /*    coincide.  Otherwise, the outline Bezier arcs are traversed to     */
   /*    extract their extrema.                                             */
   /*    extract their extrema.                                             */
   /*                                                                       */
   /*                                                                       */
   /* <Input>                                                               */
   /* <Input>                                                               */

+ 1 - 1
thirdparty/freetype/include/freetype/ftbdf.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType API for accessing BDF-specific strings (specification).     */
 /*    FreeType API for accessing BDF-specific strings (specification).     */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2002-2017 by                                                 */
+/*  Copyright 2002-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */

+ 2 - 2
thirdparty/freetype/include/freetype/ftbitmap.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType utility functions for bitmaps (specification).              */
 /*    FreeType utility functions for bitmaps (specification).              */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2004-2017 by                                                 */
+/*  Copyright 2004-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -97,7 +97,7 @@ FT_BEGIN_HEADER
   FT_EXPORT( FT_Error )
   FT_EXPORT( FT_Error )
   FT_Bitmap_Copy( FT_Library        library,
   FT_Bitmap_Copy( FT_Library        library,
                   const FT_Bitmap  *source,
                   const FT_Bitmap  *source,
-                  FT_Bitmap        *target);
+                  FT_Bitmap        *target );
 
 
 
 
   /*************************************************************************/
   /*************************************************************************/

+ 1 - 1
thirdparty/freetype/include/freetype/ftbzip2.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    Bzip2-compressed stream support.                                     */
 /*    Bzip2-compressed stream support.                                     */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2010-2017 by                                                 */
+/*  Copyright 2010-2018 by                                                 */
 /*  Joel Klinghed.                                                         */
 /*  Joel Klinghed.                                                         */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */

+ 1 - 16
thirdparty/freetype/include/freetype/ftcache.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType Cache subsystem (specification).                            */
 /*    FreeType Cache subsystem (specification).                            */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2017 by                                                 */
+/*  Copyright 1996-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -540,13 +540,6 @@ FT_BEGIN_HEADER
                             FTC_FaceID   face_id );
                             FTC_FaceID   face_id );
 
 
 
 
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Section>                                                             */
-  /*    cache_subsystem                                                    */
-  /*                                                                       */
-  /*************************************************************************/
-
   /*************************************************************************
   /*************************************************************************
    *
    *
    * @type:
    * @type:
@@ -623,14 +616,6 @@ FT_BEGIN_HEADER
                         FT_UInt32      char_code );
                         FT_UInt32      char_code );
 
 
 
 
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Section>                                                             */
-  /*    cache_subsystem                                                    */
-  /*                                                                       */
-  /*************************************************************************/
-
-
   /*************************************************************************/
   /*************************************************************************/
   /*************************************************************************/
   /*************************************************************************/
   /*************************************************************************/
   /*************************************************************************/

+ 3 - 0
thirdparty/freetype/include/freetype/ftchapters.h

@@ -76,8 +76,11 @@
 /* <Sections>                                                              */
 /* <Sections>                                                              */
 /*    auto_hinter                                                          */
 /*    auto_hinter                                                          */
 /*    cff_driver                                                           */
 /*    cff_driver                                                           */
+/*    t1_cid_driver                                                        */
 /*    tt_driver                                                            */
 /*    tt_driver                                                            */
 /*    pcf_driver                                                           */
 /*    pcf_driver                                                           */
+/*    properties                                                           */
+/*    parameter_tags                                                       */
 /*                                                                         */
 /*                                                                         */
 /***************************************************************************/
 /***************************************************************************/
 
 

+ 2 - 2
thirdparty/freetype/include/freetype/ftcid.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType API for accessing CID font information (specification).     */
 /*    FreeType API for accessing CID font information (specification).     */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2007-2017 by                                                 */
+/*  Copyright 2007-2018 by                                                 */
 /*  Dereg Clegg and Michael Toftdal.                                       */
 /*  Dereg Clegg and Michael Toftdal.                                       */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -87,7 +87,7 @@ FT_BEGIN_HEADER
   FT_Get_CID_Registry_Ordering_Supplement( FT_Face       face,
   FT_Get_CID_Registry_Ordering_Supplement( FT_Face       face,
                                            const char*  *registry,
                                            const char*  *registry,
                                            const char*  *ordering,
                                            const char*  *ordering,
-                                           FT_Int       *supplement);
+                                           FT_Int       *supplement );
 
 
 
 
   /**********************************************************************
   /**********************************************************************

+ 1225 - 0
thirdparty/freetype/include/freetype/ftdriver.h

@@ -0,0 +1,1225 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftdriver.h                                                             */
+/*                                                                         */
+/*    FreeType API for controlling driver modules (specification only).    */
+/*                                                                         */
+/*  Copyright 2017-2018 by                                                 */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+#ifndef FTDRIVER_H_
+#define FTDRIVER_H_
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+#include FT_PARAMETER_TAGS_H
+
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
+
+FT_BEGIN_HEADER
+
+
+  /**************************************************************************
+   *
+   * @section:
+   *   auto_hinter
+   *
+   * @title:
+   *   The auto-hinter
+   *
+   * @abstract:
+   *   Controlling the auto-hinting module.
+   *
+   * @description:
+   *   While FreeType's auto-hinter doesn't expose API functions by itself,
+   *   it is possible to control its behaviour with @FT_Property_Set and
+   *   @FT_Property_Get.  The following lists the available properties
+   *   together with the necessary macros and structures.
+   *
+   *   Note that the auto-hinter's module name is `autofitter' for
+   *   historical reasons.
+   *
+   *   Available properties are @increase-x-height, @no-stem-darkening
+   *   (experimental), @darkening-parameters (experimental), @warping
+   *   (experimental), @glyph-to-script-map (experimental), @fallback-script
+   *   (experimental), and @default-script (experimental), as documented in
+   *   the @properties section.
+   *
+   */
+
+
+  /**************************************************************************
+   *
+   * @section:
+   *   cff_driver
+   *
+   * @title:
+   *   The CFF driver
+   *
+   * @abstract:
+   *   Controlling the CFF driver module.
+   *
+   * @description:
+   *   While FreeType's CFF driver doesn't expose API functions by itself,
+   *   it is possible to control its behaviour with @FT_Property_Set and
+   *   @FT_Property_Get.
+   *
+   *   The CFF driver's module name is `cff'.
+   *
+   *   Available properties are @hinting-engine, @no-stem-darkening,
+   *   @darkening-parameters, and @random-seed, as documented in the
+   *   @properties section.
+   *
+   *
+   *   *Hinting* *and* *antialiasing* *principles* *of* *the* *new* *engine*
+   *
+   *   The rasterizer is positioning horizontal features (e.g., ascender
+   *   height & x-height, or crossbars) on the pixel grid and minimizing the
+   *   amount of antialiasing applied to them, while placing vertical
+   *   features (vertical stems) on the pixel grid without hinting, thus
+   *   representing the stem position and weight accurately.  Sometimes the
+   *   vertical stems may be only partially black.  In this context,
+   *   `antialiasing' means that stems are not positioned exactly on pixel
+   *   borders, causing a fuzzy appearance.
+   *
+   *   There are two principles behind this approach.
+   *
+   *   1) No hinting in the horizontal direction: Unlike `superhinted'
+   *   TrueType, which changes glyph widths to accommodate regular
+   *   inter-glyph spacing, Adobe's approach is `faithful to the design' in
+   *   representing both the glyph width and the inter-glyph spacing
+   *   designed for the font.  This makes the screen display as close as it
+   *   can be to the result one would get with infinite resolution, while
+   *   preserving what is considered the key characteristics of each glyph.
+   *   Note that the distances between unhinted and grid-fitted positions at
+   *   small sizes are comparable to kerning values and thus would be
+   *   noticeable (and distracting) while reading if hinting were applied.
+   *
+   *   One of the reasons to not hint horizontally is antialiasing for LCD
+   *   screens: The pixel geometry of modern displays supplies three
+   *   vertical subpixels as the eye moves horizontally across each visible
+   *   pixel.  On devices where we can be certain this characteristic is
+   *   present a rasterizer can take advantage of the subpixels to add
+   *   increments of weight.  In Western writing systems this turns out to
+   *   be the more critical direction anyway; the weights and spacing of
+   *   vertical stems (see above) are central to Armenian, Cyrillic, Greek,
+   *   and Latin type designs.  Even when the rasterizer uses greyscale
+   *   antialiasing instead of color (a necessary compromise when one
+   *   doesn't know the screen characteristics), the unhinted vertical
+   *   features preserve the design's weight and spacing much better than
+   *   aliased type would.
+   *
+   *   2) Alignment in the vertical direction: Weights and spacing along the
+   *   y~axis are less critical; what is much more important is the visual
+   *   alignment of related features (like cap-height and x-height).  The
+   *   sense of alignment for these is enhanced by the sharpness of grid-fit
+   *   edges, while the cruder vertical resolution (full pixels instead of
+   *   1/3 pixels) is less of a problem.
+   *
+   *   On the technical side, horizontal alignment zones for ascender,
+   *   x-height, and other important height values (traditionally called
+   *   `blue zones') as defined in the font are positioned independently,
+   *   each being rounded to the nearest pixel edge, taking care of
+   *   overshoot suppression at small sizes, stem darkening, and scaling.
+   *
+   *   Hstems (this is, hint values defined in the font to help align
+   *   horizontal features) that fall within a blue zone are said to be
+   *   `captured' and are aligned to that zone.  Uncaptured stems are moved
+   *   in one of four ways, top edge up or down, bottom edge up or down.
+   *   Unless there are conflicting hstems, the smallest movement is taken
+   *   to minimize distortion.
+   *
+   */
+
+
+  /**************************************************************************
+   *
+   * @section:
+   *   pcf_driver
+   *
+   * @title:
+   *   The PCF driver
+   *
+   * @abstract:
+   *   Controlling the PCF driver module.
+   *
+   * @description:
+   *   While FreeType's PCF driver doesn't expose API functions by itself,
+   *   it is possible to control its behaviour with @FT_Property_Set and
+   *   @FT_Property_Get.  Right now, there is a single property
+   *   @no-long-family-names available if FreeType is compiled with
+   *   PCF_CONFIG_OPTION_LONG_FAMILY_NAMES.
+   *
+   *   The PCF driver's module name is `pcf'.
+   *
+   */
+
+
+  /**************************************************************************
+   *
+   * @section:
+   *   t1_cid_driver
+   *
+   * @title:
+   *   The Type 1 and CID drivers
+   *
+   * @abstract:
+   *   Controlling the Type~1 and CID driver modules.
+   *
+   * @description:
+   *   It is possible to control the behaviour of FreeType's Type~1 and
+   *   Type~1 CID drivers with @FT_Property_Set and @FT_Property_Get.
+   *
+   *   Behind the scenes, both drivers use the Adobe CFF engine for hinting;
+   *   however, the used properties must be specified separately.
+   *
+   *   The Type~1 driver's module name is `type1'; the CID driver's module
+   *   name is `t1cid'.
+   *
+   *   Available properties are @hinting-engine, @no-stem-darkening,
+   *   @darkening-parameters, and @random-seed, as documented in the
+   *   @properties section.
+   *
+   *   Please see the @cff_driver section for more details on the new
+   *   hinting engine.
+   *
+   */
+
+
+  /**************************************************************************
+   *
+   * @section:
+   *   tt_driver
+   *
+   * @title:
+   *   The TrueType driver
+   *
+   * @abstract:
+   *   Controlling the TrueType driver module.
+   *
+   * @description:
+   *   While FreeType's TrueType driver doesn't expose API functions by
+   *   itself, it is possible to control its behaviour with @FT_Property_Set
+   *   and @FT_Property_Get.  The following lists the available properties
+   *   together with the necessary macros and structures.
+   *
+   *   The TrueType driver's module name is `truetype'.
+   *
+   *   A single property @interpreter-version is available, as documented in
+   *   the @properties section.
+   *
+   *   We start with a list of definitions, kindly provided by Greg
+   *   Hitchcock.
+   *
+   *   _Bi-Level_ _Rendering_
+   *
+   *   Monochromatic rendering, exclusively used in the early days of
+   *   TrueType by both Apple and Microsoft.  Microsoft's GDI interface
+   *   supported hinting of the right-side bearing point, such that the
+   *   advance width could be non-linear.  Most often this was done to
+   *   achieve some level of glyph symmetry.  To enable reasonable
+   *   performance (e.g., not having to run hinting on all glyphs just to
+   *   get the widths) there was a bit in the head table indicating if the
+   *   side bearing was hinted, and additional tables, `hdmx' and `LTSH', to
+   *   cache hinting widths across multiple sizes and device aspect ratios.
+   *
+   *   _Font_ _Smoothing_
+   *
+   *   Microsoft's GDI implementation of anti-aliasing.  Not traditional
+   *   anti-aliasing as the outlines were hinted before the sampling.  The
+   *   widths matched the bi-level rendering.
+   *
+   *   _ClearType_ _Rendering_
+   *
+   *   Technique that uses physical subpixels to improve rendering on LCD
+   *   (and other) displays.  Because of the higher resolution, many methods
+   *   of improving symmetry in glyphs through hinting the right-side
+   *   bearing were no longer necessary.  This lead to what GDI calls
+   *   `natural widths' ClearType, see
+   *   http://www.beatstamm.com/typography/RTRCh4.htm#Sec21.  Since hinting
+   *   has extra resolution, most non-linearity went away, but it is still
+   *   possible for hints to change the advance widths in this mode.
+   *
+   *   _ClearType_ _Compatible_ _Widths_
+   *
+   *   One of the earliest challenges with ClearType was allowing the
+   *   implementation in GDI to be selected without requiring all UI and
+   *   documents to reflow.  To address this, a compatible method of
+   *   rendering ClearType was added where the font hints are executed once
+   *   to determine the width in bi-level rendering, and then re-run in
+   *   ClearType, with the difference in widths being absorbed in the font
+   *   hints for ClearType (mostly in the white space of hints); see
+   *   http://www.beatstamm.com/typography/RTRCh4.htm#Sec20.  Somewhat by
+   *   definition, compatible width ClearType allows for non-linear widths,
+   *   but only when the bi-level version has non-linear widths.
+   *
+   *   _ClearType_ _Subpixel_ _Positioning_
+   *
+   *   One of the nice benefits of ClearType is the ability to more crisply
+   *   display fractional widths; unfortunately, the GDI model of integer
+   *   bitmaps did not support this.  However, the WPF and Direct Write
+   *   frameworks do support fractional widths.  DWrite calls this `natural
+   *   mode', not to be confused with GDI's `natural widths'.  Subpixel
+   *   positioning, in the current implementation of Direct Write,
+   *   unfortunately does not support hinted advance widths, see
+   *   http://www.beatstamm.com/typography/RTRCh4.htm#Sec22.  Note that the
+   *   TrueType interpreter fully allows the advance width to be adjusted in
+   *   this mode, just the DWrite client will ignore those changes.
+   *
+   *   _ClearType_ _Backward_ _Compatibility_
+   *
+   *   This is a set of exceptions made in the TrueType interpreter to
+   *   minimize hinting techniques that were problematic with the extra
+   *   resolution of ClearType; see
+   *   http://www.beatstamm.com/typography/RTRCh4.htm#Sec1 and
+   *   https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx.
+   *   This technique is not to be confused with ClearType compatible
+   *   widths.  ClearType backward compatibility has no direct impact on
+   *   changing advance widths, but there might be an indirect impact on
+   *   disabling some deltas.  This could be worked around in backward
+   *   compatibility mode.
+   *
+   *   _Native_ _ClearType_ _Mode_
+   *
+   *   (Not to be confused with `natural widths'.)  This mode removes all
+   *   the exceptions in the TrueType interpreter when running with
+   *   ClearType.  Any issues on widths would still apply, though.
+   *
+   */
+
+
+  /**************************************************************************
+   *
+   * @section:
+   *   properties
+   *
+   * @title:
+   *   Driver properties
+   *
+   * @abstract:
+   *   Controlling driver modules.
+   *
+   * @description:
+   *   Driver modules can be controlled by setting and unsetting properties,
+   *   using the functions @FT_Property_Set and @FT_Property_Get.  This
+   *   section documents the available properties, together with auxiliary
+   *   macros and structures.
+   *
+   */
+
+
+  /**************************************************************************
+   *
+   * @enum:
+   *   FT_HINTING_XXX
+   *
+   * @description:
+   *   A list of constants used for the @hinting-engine property to
+   *   select the hinting engine for CFF, Type~1, and CID fonts.
+   *
+   * @values:
+   *   FT_HINTING_FREETYPE ::
+   *     Use the old FreeType hinting engine.
+   *
+   *   FT_HINTING_ADOBE ::
+   *     Use the hinting engine contributed by Adobe.
+   *
+   * @since:
+   *   2.9
+   *
+   */
+#define FT_HINTING_FREETYPE  0
+#define FT_HINTING_ADOBE     1
+
+  /* these constants (introduced in 2.4.12) are deprecated */
+#define FT_CFF_HINTING_FREETYPE  FT_HINTING_FREETYPE
+#define FT_CFF_HINTING_ADOBE     FT_HINTING_ADOBE
+
+
+  /**************************************************************************
+   *
+   * @property:
+   *   hinting-engine
+   *
+   * @description:
+   *   Thanks to Adobe, which contributed a new hinting (and parsing)
+   *   engine, an application can select between `freetype' and `adobe' if
+   *   compiled with CFF_CONFIG_OPTION_OLD_ENGINE.  If this configuration
+   *   macro isn't defined, `hinting-engine' does nothing.
+   *
+   *   The same holds for the Type~1 and CID modules if compiled with
+   *   T1_CONFIG_OPTION_OLD_ENGINE.
+   *
+   *   For the `cff' module, the default engine is `freetype' if
+   *   CFF_CONFIG_OPTION_OLD_ENGINE is defined, and `adobe' otherwise.
+   *
+   *   For both the `type1' and `t1cid' modules, the default engine is
+   *   `freetype' if T1_CONFIG_OPTION_OLD_ENGINE is defined, and `adobe'
+   *   otherwise.
+   *
+   *   The following example code demonstrates how to select Adobe's hinting
+   *   engine for the `cff' module (omitting the error handling).
+   *
+   *   {
+   *     FT_Library  library;
+   *     FT_UInt     hinting_engine = FT_CFF_HINTING_ADOBE;
+   *
+   *
+   *     FT_Init_FreeType( &library );
+   *
+   *     FT_Property_Set( library, "cff",
+   *                               "hinting-engine", &hinting_engine );
+   *   }
+   *
+   * @note:
+   *   This property can be used with @FT_Property_Get also.
+   *
+   *   This property can be set via the `FREETYPE_PROPERTIES' environment
+   *   variable (using values `adobe' or `freetype').
+   *
+   * @since:
+   *   2.4.12 (for `cff' module)
+   *
+   *   2.9 (for `type1' and `t1cid' modules)
+   *
+   */
+
+
+  /**************************************************************************
+   *
+   * @property:
+   *   no-stem-darkening
+   *
+   * @description:
+   *   All glyphs that pass through the auto-hinter will be emboldened
+   *   unless this property is set to TRUE.  The same is true for the CFF,
+   *   Type~1, and CID font modules if the `Adobe' engine is selected (which
+   *   is the default).
+   *
+   *   Stem darkening emboldens glyphs at smaller sizes to make them more
+   *   readable on common low-DPI screens when using linear alpha blending
+   *   and gamma correction, see @FT_Render_Glyph.  When not using linear
+   *   alpha blending and gamma correction, glyphs will appear heavy and
+   *   fuzzy!
+   *
+   *   Gamma correction essentially lightens fonts since shades of grey are
+   *   shifted to higher pixel values (=~higher brightness) to match the
+   *   original intention to the reality of our screens.  The side-effect is
+   *   that glyphs `thin out'.  Mac OS~X and Adobe's proprietary font
+   *   rendering library implement a counter-measure: stem darkening at
+   *   smaller sizes where shades of gray dominate.  By emboldening a glyph
+   *   slightly in relation to its pixel size, individual pixels get higher
+   *   coverage of filled-in outlines and are therefore `blacker'.  This
+   *   counteracts the `thinning out' of glyphs, making text remain readable
+   *   at smaller sizes.
+   *
+   *   By default, the Adobe engines for CFF, Type~1, and CID fonts darken
+   *   stems at smaller sizes, regardless of hinting, to enhance contrast. 
+   *   Setting this property, stem darkening gets switched off.
+   *
+   *   For the auto-hinter, stem-darkening is experimental currently and
+   *   thus switched off by default (this is, `no-stem-darkening' is set to
+   *   TRUE by default).  Total consistency with the CFF driver is not
+   *   achieved right now because the emboldening method differs and glyphs
+   *   must be scaled down on the Y-axis to keep outline points inside their
+   *   precomputed blue zones.  The smaller the size (especially 9ppem and
+   *   down), the higher the loss of emboldening versus the CFF driver.
+   *
+   *   Note that stem darkening is never applied if @FT_LOAD_NO_SCALE is
+   *   set.
+   *
+   *   {
+   *     FT_Library  library;
+   *     FT_Bool     no_stem_darkening = TRUE;
+   *
+   *
+   *     FT_Init_FreeType( &library );
+   *
+   *     FT_Property_Set( library, "cff",
+   *                               "no-stem-darkening", &no_stem_darkening );
+   *   }
+   *
+   * @note:
+   *   This property can be used with @FT_Property_Get also.
+   *
+   *   This property can be set via the `FREETYPE_PROPERTIES' environment
+   *   variable (using values 1 and 0 for `on' and `off', respectively).
+   *   It can also be set per face using @FT_Face_Properties with
+   *   @FT_PARAM_TAG_STEM_DARKENING.
+   *
+   * @since:
+   *   2.4.12 (for `cff' module)
+   *
+   *   2.6.2 (for `autofitter' module)
+   *
+   *   2.9 (for `type1' and `t1cid' modules)
+   *
+   */
+
+
+  /**************************************************************************
+   *
+   * @property:
+   *   darkening-parameters
+   *
+   * @description:
+   *   By default, the Adobe hinting engine, as used by the CFF, Type~1, and
+   *   CID font drivers, darkens stems as follows (if the
+   *   `no-stem-darkening' property isn't set):
+   *
+   *   {
+   *     stem width <= 0.5px:   darkening amount = 0.4px
+   *     stem width  = 1px:     darkening amount = 0.275px
+   *     stem width  = 1.667px: darkening amount = 0.275px
+   *     stem width >= 2.333px: darkening amount = 0px
+   *   }
+   *
+   *   and piecewise linear in-between.  At configuration time, these four
+   *   control points can be set with the macro
+   *   `CFF_CONFIG_OPTION_DARKENING_PARAMETERS'; the CFF, Type~1, and CID
+   *   drivers share these values.  At runtime, the control points can be
+   *   changed using the `darkening-parameters' property, as the following
+   *   example demonstrates for the Type~1 driver.
+   *
+   *   {
+   *     FT_Library  library;
+   *     FT_Int      darken_params[8] = {  500, 300,   // x1, y1
+   *                                      1000, 200,   // x2, y2
+   *                                      1500, 100,   // x3, y3
+   *                                      2000,   0 }; // x4, y4
+   *
+   *
+   *     FT_Init_FreeType( &library );
+   *
+   *     FT_Property_Set( library, "type1",
+   *                               "darkening-parameters", darken_params );
+   *   }
+   *
+   *   The x~values give the stem width, and the y~values the darkening
+   *   amount.  The unit is 1000th of pixels.  All coordinate values must be
+   *   positive; the x~values must be monotonically increasing; the
+   *   y~values must be monotonically decreasing and smaller than or
+   *   equal to 500 (corresponding to half a pixel); the slope of each
+   *   linear piece must be shallower than -1 (e.g., -.4).
+   *
+   *   The auto-hinter provides this property, too, as an experimental
+   *   feature.  See @no-stem-darkening for more.
+   *
+   * @note:
+   *   This property can be used with @FT_Property_Get also.
+   *
+   *   This property can be set via the `FREETYPE_PROPERTIES' environment
+   *   variable, using eight comma-separated integers without spaces.  Here
+   *   the above example, using `\' to break the line for readability.
+   *
+   *   {
+   *     FREETYPE_PROPERTIES=\
+   *     type1:darkening-parameters=500,300,1000,200,1500,100,2000,0
+   *   }
+   *
+   * @since:
+   *   2.5.1 (for `cff' module)
+   *
+   *   2.6.2 (for `autofitter' module)
+   *
+   *   2.9 (for `type1' and `t1cid' modules)
+   *
+   */
+
+
+  /**************************************************************************
+   *
+   * @property:
+   *   random-seed
+   *
+   * @description:
+   *   By default, the seed value for the CFF `random' operator and the
+   *   similar `0 28 callothersubr pop' command for the Type~1 and CID
+   *   drivers is set to a random value.  However, mainly for debugging
+   *   purposes, it is often necessary to use a known value as a seed so
+   *   that the pseudo-random number sequences generated by `random' are
+   *   repeatable.
+   *
+   *   The `random-seed' property does that.  Its argument is a signed 32bit
+   *   integer; if the value is zero or negative, the seed given by the
+   *   `intitialRandomSeed' private DICT operator in a CFF file gets used
+   *   (or a default value if there is no such operator).  If the value is
+   *   positive, use it instead of `initialRandomSeed', which is
+   *   consequently ignored.
+   *
+   * @note:
+   *   This property can be set via the `FREETYPE_PROPERTIES' environment
+   *   variable.  It can also be set per face using @FT_Face_Properties with
+   *   @FT_PARAM_TAG_RANDOM_SEED.
+   *
+   * @since:
+   *   2.8 (for `cff' module)
+   *
+   *   2.9 (for `type1' and `t1cid' modules)
+   *
+   */
+
+
+  /**************************************************************************
+   *
+   * @property:
+   *   no-long-family-names
+   *
+   * @description:
+   *   If PCF_CONFIG_OPTION_LONG_FAMILY_NAMES is active while compiling
+   *   FreeType, the PCF driver constructs long family names.
+   *
+   *   There are many PCF fonts just called `Fixed' which look completely
+   *   different, and which have nothing to do with each other.  When
+   *   selecting `Fixed' in KDE or Gnome one gets results that appear rather
+   *   random, the style changes often if one changes the size and one
+   *   cannot select some fonts at all.  The improve this situation, the PCF
+   *   module prepends the foundry name (plus a space) to the family name.
+   *   It also checks whether there are `wide' characters; all put together,
+   *   family names like `Sony Fixed' or `Misc Fixed Wide' are constructed.
+   *
+   *   If `no-long-family-names' is set, this feature gets switched off.
+   *
+   *   {
+   *     FT_Library  library;
+   *     FT_Bool     no_long_family_names = TRUE;
+   *
+   *
+   *     FT_Init_FreeType( &library );
+   *
+   *     FT_Property_Set( library, "pcf",
+   *                               "no-long-family-names",
+   *                               &no_long_family_names );
+   *   }
+   *
+   * @note:
+   *   This property can be used with @FT_Property_Get also.
+   *
+   *   This property can be set via the `FREETYPE_PROPERTIES' environment
+   *   variable (using values 1 and 0 for `on' and `off', respectively).
+   *
+   * @since:
+   *   2.8
+   */
+
+
+  /**************************************************************************
+   *
+   * @enum:
+   *   TT_INTERPRETER_VERSION_XXX
+   *
+   * @description:
+   *   A list of constants used for the @interpreter-version property to
+   *   select the hinting engine for Truetype fonts.
+   *
+   *   The numeric value in the constant names represents the version
+   *   number as returned by the `GETINFO' bytecode instruction.
+   *
+   * @values:
+   *   TT_INTERPRETER_VERSION_35 ::
+   *     Version~35 corresponds to MS rasterizer v.1.7 as used e.g. in
+   *     Windows~98; only grayscale and B/W rasterizing is supported.
+   *
+   *   TT_INTERPRETER_VERSION_38 ::
+   *     Version~38 corresponds to MS rasterizer v.1.9; it is roughly
+   *     equivalent to the hinting provided by DirectWrite ClearType (as can
+   *     be found, for example, in the Internet Explorer~9 running on
+   *     Windows~7).  It is used in FreeType to select the `Infinality'
+   *     subpixel hinting code.  The code may be removed in a future
+   *     version.
+   *
+   *   TT_INTERPRETER_VERSION_40 ::
+   *     Version~40 corresponds to MS rasterizer v.2.1; it is roughly
+   *     equivalent to the hinting provided by DirectWrite ClearType (as can
+   *     be found, for example, in Microsoft's Edge Browser on Windows~10).
+   *     It is used in FreeType to select the `minimal' subpixel hinting
+   *     code, a stripped-down and higher performance version of the
+   *     `Infinality' code.
+   *
+   * @note:
+   *   This property controls the behaviour of the bytecode interpreter
+   *   and thus how outlines get hinted.  It does *not* control how glyph
+   *   get rasterized!  In particular, it does not control subpixel color
+   *   filtering.
+   *
+   *   If FreeType has not been compiled with the configuration option
+   *   TT_CONFIG_OPTION_SUBPIXEL_HINTING, selecting version~38 or~40 causes
+   *   an `FT_Err_Unimplemented_Feature' error.
+   *
+   *   Depending on the graphics framework, Microsoft uses different
+   *   bytecode and rendering engines.  As a consequence, the version
+   *   numbers returned by a call to the `GETINFO' bytecode instruction are
+   *   more convoluted than desired.
+   *
+   *   Here are two tables that try to shed some light on the possible
+   *   values for the MS rasterizer engine, together with the additional
+   *   features introduced by it.
+   *
+   *   {
+   *     GETINFO framework               version feature
+   *     -------------------------------------------------------------------
+   *         3   GDI (Win 3.1),            v1.0  16-bit, first version
+   *             TrueImage
+   *        33   GDI (Win NT 3.1),         v1.5  32-bit
+   *             HP Laserjet
+   *        34   GDI (Win 95)              v1.6  font smoothing,
+   *                                             new SCANTYPE opcode
+   *        35   GDI (Win 98/2000)         v1.7  (UN)SCALED_COMPONENT_OFFSET
+   *                                               bits in composite glyphs
+   *        36   MGDI (Win CE 2)           v1.6+ classic ClearType
+   *        37   GDI (XP and later),       v1.8  ClearType
+   *             GDI+ old (before Vista)
+   *        38   GDI+ old (Vista, Win 7),  v1.9  subpixel ClearType,
+   *             WPF                             Y-direction ClearType,
+   *                                             additional error checking
+   *        39   DWrite (before Win 8)     v2.0  subpixel ClearType flags
+   *                                               in GETINFO opcode,
+   *                                             bug fixes
+   *        40   GDI+ (after Win 7),       v2.1  Y-direction ClearType flag
+   *             DWrite (Win 8)                    in GETINFO opcode,
+   *                                             Gray ClearType
+   *   }
+   *
+   *   The `version' field gives a rough orientation only, since some
+   *   applications provided certain features much earlier (as an example,
+   *   Microsoft Reader used subpixel and Y-direction ClearType already in
+   *   Windows 2000).  Similarly, updates to a given framework might include
+   *   improved hinting support.
+   *
+   *   {
+   *      version   sampling          rendering        comment
+   *               x        y       x           y
+   *     --------------------------------------------------------------
+   *       v1.0   normal  normal  B/W           B/W    bi-level
+   *       v1.6   high    high    gray          gray   grayscale
+   *       v1.8   high    normal  color-filter  B/W    (GDI) ClearType
+   *       v1.9   high    high    color-filter  gray   Color ClearType
+   *       v2.1   high    normal  gray          B/W    Gray ClearType
+   *       v2.1   high    high    gray          gray   Gray ClearType
+   *   }
+   *
+   *   Color and Gray ClearType are the two available variants of
+   *   `Y-direction ClearType', meaning grayscale rasterization along the
+   *   Y-direction; the name used in the TrueType specification for this
+   *   feature is `symmetric smoothing'.  `Classic ClearType' is the
+   *   original algorithm used before introducing a modified version in
+   *   Win~XP.  Another name for v1.6's grayscale rendering is `font
+   *   smoothing', and `Color ClearType' is sometimes also called `DWrite
+   *   ClearType'.  To differentiate between today's Color ClearType and the
+   *   earlier ClearType variant with B/W rendering along the vertical axis,
+   *   the latter is sometimes called `GDI ClearType'.
+   *
+   *   `Normal' and `high' sampling describe the (virtual) resolution to
+   *   access the rasterized outline after the hinting process.  `Normal'
+   *   means 1 sample per grid line (i.e., B/W).  In the current Microsoft
+   *   implementation, `high' means an extra virtual resolution of 16x16 (or
+   *   16x1) grid lines per pixel for bytecode instructions like `MIRP'.
+   *   After hinting, these 16 grid lines are mapped to 6x5 (or 6x1) grid
+   *   lines for color filtering if Color ClearType is activated.
+   *
+   *   Note that `Gray ClearType' is essentially the same as v1.6's
+   *   grayscale rendering.  However, the GETINFO instruction handles it
+   *   differently: v1.6 returns bit~12 (hinting for grayscale), while v2.1
+   *   returns bits~13 (hinting for ClearType), 18 (symmetrical smoothing),
+   *   and~19 (Gray ClearType).  Also, this mode respects bits 2 and~3 for
+   *   the version~1 gasp table exclusively (like Color ClearType), while
+   *   v1.6 only respects the values of version~0 (bits 0 and~1).
+   *
+   *   Keep in mind that the features of the above interpreter versions
+   *   might not map exactly to FreeType features or behavior because it is
+   *   a fundamentally different library with different internals.
+   *
+   */
+#define TT_INTERPRETER_VERSION_35  35
+#define TT_INTERPRETER_VERSION_38  38
+#define TT_INTERPRETER_VERSION_40  40
+
+
+  /**************************************************************************
+   *
+   * @property:
+   *   interpreter-version
+   *
+   * @description:
+   *   Currently, three versions are available, two representing the
+   *   bytecode interpreter with subpixel hinting support (old `Infinality'
+   *   code and new stripped-down and higher performance `minimal' code) and
+   *   one without, respectively.  The default is subpixel support if
+   *   TT_CONFIG_OPTION_SUBPIXEL_HINTING is defined, and no subpixel support
+   *   otherwise (since it isn't available then).
+   *
+   *   If subpixel hinting is on, many TrueType bytecode instructions behave
+   *   differently compared to B/W or grayscale rendering (except if `native
+   *   ClearType' is selected by the font).  Microsoft's main idea is to
+   *   render at a much increased horizontal resolution, then sampling down
+   *   the created output to subpixel precision.  However, many older fonts
+   *   are not suited to this and must be specially taken care of by
+   *   applying (hardcoded) tweaks in Microsoft's interpreter.
+   *
+   *   Details on subpixel hinting and some of the necessary tweaks can be
+   *   found in Greg Hitchcock's whitepaper at
+   *   `https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx'.
+   *   Note that FreeType currently doesn't really `subpixel hint' (6x1, 6x2,
+   *   or 6x5 supersampling) like discussed in the paper.  Depending on the
+   *   chosen interpreter, it simply ignores instructions on vertical stems
+   *   to arrive at very similar results.
+   *
+   *   The following example code demonstrates how to deactivate subpixel
+   *   hinting (omitting the error handling).
+   *
+   *   {
+   *     FT_Library  library;
+   *     FT_Face     face;
+   *     FT_UInt     interpreter_version = TT_INTERPRETER_VERSION_35;
+   *
+   *
+   *     FT_Init_FreeType( &library );
+   *
+   *     FT_Property_Set( library, "truetype",
+   *                               "interpreter-version",
+   *                               &interpreter_version );
+   *   }
+   *
+   * @note:
+   *   This property can be used with @FT_Property_Get also.
+   *
+   *   This property can be set via the `FREETYPE_PROPERTIES' environment
+   *   variable (using values `35', `38', or `40').
+   *
+   * @since:
+   *   2.5
+   */
+
+
+  /**************************************************************************
+   *
+   * @property:
+   *   glyph-to-script-map
+   *
+   * @description:
+   *   *Experimental* *only*
+   *
+   *   The auto-hinter provides various script modules to hint glyphs.
+   *   Examples of supported scripts are Latin or CJK.  Before a glyph is
+   *   auto-hinted, the Unicode character map of the font gets examined, and
+   *   the script is then determined based on Unicode character ranges, see
+   *   below.
+   *
+   *   OpenType fonts, however, often provide much more glyphs than
+   *   character codes (small caps, superscripts, ligatures, swashes, etc.),
+   *   to be controlled by so-called `features'.  Handling OpenType features
+   *   can be quite complicated and thus needs a separate library on top of
+   *   FreeType.
+   *
+   *   The mapping between glyph indices and scripts (in the auto-hinter
+   *   sense, see the @FT_AUTOHINTER_SCRIPT_XXX values) is stored as an
+   *   array with `num_glyphs' elements, as found in the font's @FT_Face
+   *   structure.  The `glyph-to-script-map' property returns a pointer to
+   *   this array, which can be modified as needed.  Note that the
+   *   modification should happen before the first glyph gets processed by
+   *   the auto-hinter so that the global analysis of the font shapes
+   *   actually uses the modified mapping.
+   *
+   *   The following example code demonstrates how to access it (omitting
+   *   the error handling).
+   *
+   *   {
+   *     FT_Library                library;
+   *     FT_Face                   face;
+   *     FT_Prop_GlyphToScriptMap  prop;
+   *
+   *
+   *     FT_Init_FreeType( &library );
+   *     FT_New_Face( library, "foo.ttf", 0, &face );
+   *
+   *     prop.face = face;
+   *
+   *     FT_Property_Get( library, "autofitter",
+   *                               "glyph-to-script-map", &prop );
+   *
+   *     // adjust `prop.map' as needed right here
+   *
+   *     FT_Load_Glyph( face, ..., FT_LOAD_FORCE_AUTOHINT );
+   *   }
+   *
+   * @since:
+   *   2.4.11
+   *
+   */
+
+
+  /**************************************************************************
+   *
+   * @enum:
+   *   FT_AUTOHINTER_SCRIPT_XXX
+   *
+   * @description:
+   *   *Experimental* *only*
+   *
+   *   A list of constants used for the @glyph-to-script-map property to
+   *   specify the script submodule the auto-hinter should use for hinting a
+   *   particular glyph.
+   *
+   * @values:
+   *   FT_AUTOHINTER_SCRIPT_NONE ::
+   *     Don't auto-hint this glyph.
+   *
+   *   FT_AUTOHINTER_SCRIPT_LATIN ::
+   *     Apply the latin auto-hinter.  For the auto-hinter, `latin' is a
+   *     very broad term, including Cyrillic and Greek also since characters
+   *     from those scripts share the same design constraints.
+   *
+   *     By default, characters from the following Unicode ranges are
+   *     assigned to this submodule.
+   *
+   *     {
+   *       U+0020 - U+007F  // Basic Latin (no control characters)
+   *       U+00A0 - U+00FF  // Latin-1 Supplement (no control characters)
+   *       U+0100 - U+017F  // Latin Extended-A
+   *       U+0180 - U+024F  // Latin Extended-B
+   *       U+0250 - U+02AF  // IPA Extensions
+   *       U+02B0 - U+02FF  // Spacing Modifier Letters
+   *       U+0300 - U+036F  // Combining Diacritical Marks
+   *       U+0370 - U+03FF  // Greek and Coptic
+   *       U+0400 - U+04FF  // Cyrillic
+   *       U+0500 - U+052F  // Cyrillic Supplement
+   *       U+1D00 - U+1D7F  // Phonetic Extensions
+   *       U+1D80 - U+1DBF  // Phonetic Extensions Supplement
+   *       U+1DC0 - U+1DFF  // Combining Diacritical Marks Supplement
+   *       U+1E00 - U+1EFF  // Latin Extended Additional
+   *       U+1F00 - U+1FFF  // Greek Extended
+   *       U+2000 - U+206F  // General Punctuation
+   *       U+2070 - U+209F  // Superscripts and Subscripts
+   *       U+20A0 - U+20CF  // Currency Symbols
+   *       U+2150 - U+218F  // Number Forms
+   *       U+2460 - U+24FF  // Enclosed Alphanumerics
+   *       U+2C60 - U+2C7F  // Latin Extended-C
+   *       U+2DE0 - U+2DFF  // Cyrillic Extended-A
+   *       U+2E00 - U+2E7F  // Supplemental Punctuation
+   *       U+A640 - U+A69F  // Cyrillic Extended-B
+   *       U+A720 - U+A7FF  // Latin Extended-D
+   *       U+FB00 - U+FB06  // Alphab. Present. Forms (Latin Ligatures)
+   *      U+1D400 - U+1D7FF // Mathematical Alphanumeric Symbols
+   *      U+1F100 - U+1F1FF // Enclosed Alphanumeric Supplement
+   *     }
+   *
+   *   FT_AUTOHINTER_SCRIPT_CJK ::
+   *     Apply the CJK auto-hinter, covering Chinese, Japanese, Korean, old
+   *     Vietnamese, and some other scripts.
+   *
+   *     By default, characters from the following Unicode ranges are
+   *     assigned to this submodule.
+   *
+   *     {
+   *       U+1100 - U+11FF  // Hangul Jamo
+   *       U+2E80 - U+2EFF  // CJK Radicals Supplement
+   *       U+2F00 - U+2FDF  // Kangxi Radicals
+   *       U+2FF0 - U+2FFF  // Ideographic Description Characters
+   *       U+3000 - U+303F  // CJK Symbols and Punctuation
+   *       U+3040 - U+309F  // Hiragana
+   *       U+30A0 - U+30FF  // Katakana
+   *       U+3100 - U+312F  // Bopomofo
+   *       U+3130 - U+318F  // Hangul Compatibility Jamo
+   *       U+3190 - U+319F  // Kanbun
+   *       U+31A0 - U+31BF  // Bopomofo Extended
+   *       U+31C0 - U+31EF  // CJK Strokes
+   *       U+31F0 - U+31FF  // Katakana Phonetic Extensions
+   *       U+3200 - U+32FF  // Enclosed CJK Letters and Months
+   *       U+3300 - U+33FF  // CJK Compatibility
+   *       U+3400 - U+4DBF  // CJK Unified Ideographs Extension A
+   *       U+4DC0 - U+4DFF  // Yijing Hexagram Symbols
+   *       U+4E00 - U+9FFF  // CJK Unified Ideographs
+   *       U+A960 - U+A97F  // Hangul Jamo Extended-A
+   *       U+AC00 - U+D7AF  // Hangul Syllables
+   *       U+D7B0 - U+D7FF  // Hangul Jamo Extended-B
+   *       U+F900 - U+FAFF  // CJK Compatibility Ideographs
+   *       U+FE10 - U+FE1F  // Vertical forms
+   *       U+FE30 - U+FE4F  // CJK Compatibility Forms
+   *       U+FF00 - U+FFEF  // Halfwidth and Fullwidth Forms
+   *      U+1B000 - U+1B0FF // Kana Supplement
+   *      U+1D300 - U+1D35F // Tai Xuan Hing Symbols
+   *      U+1F200 - U+1F2FF // Enclosed Ideographic Supplement
+   *      U+20000 - U+2A6DF // CJK Unified Ideographs Extension B
+   *      U+2A700 - U+2B73F // CJK Unified Ideographs Extension C
+   *      U+2B740 - U+2B81F // CJK Unified Ideographs Extension D
+   *      U+2F800 - U+2FA1F // CJK Compatibility Ideographs Supplement
+   *     }
+   *
+   *   FT_AUTOHINTER_SCRIPT_INDIC ::
+   *     Apply the indic auto-hinter, covering all major scripts from the
+   *     Indian sub-continent and some other related scripts like Thai, Lao,
+   *     or Tibetan.
+   *
+   *     By default, characters from the following Unicode ranges are
+   *     assigned to this submodule.
+   *
+   *     {
+   *       U+0900 - U+0DFF  // Indic Range
+   *       U+0F00 - U+0FFF  // Tibetan
+   *       U+1900 - U+194F  // Limbu
+   *       U+1B80 - U+1BBF  // Sundanese
+   *       U+A800 - U+A82F  // Syloti Nagri
+   *       U+ABC0 - U+ABFF  // Meetei Mayek
+   *      U+11800 - U+118DF // Sharada
+   *     }
+   *
+   *     Note that currently Indic support is rudimentary only, missing blue
+   *     zone support.
+   *
+   * @since:
+   *   2.4.11
+   *
+   */
+#define FT_AUTOHINTER_SCRIPT_NONE   0
+#define FT_AUTOHINTER_SCRIPT_LATIN  1
+#define FT_AUTOHINTER_SCRIPT_CJK    2
+#define FT_AUTOHINTER_SCRIPT_INDIC  3
+
+
+  /**************************************************************************
+   *
+   * @struct:
+   *   FT_Prop_GlyphToScriptMap
+   *
+   * @description:
+   *   *Experimental* *only*
+   *
+   *   The data exchange structure for the @glyph-to-script-map property.
+   *
+   * @since:
+   *   2.4.11
+   *
+   */
+  typedef struct  FT_Prop_GlyphToScriptMap_
+  {
+    FT_Face     face;
+    FT_UShort*  map;
+
+  } FT_Prop_GlyphToScriptMap;
+
+
+  /**************************************************************************
+   *
+   * @property:
+   *   fallback-script
+   *
+   * @description:
+   *   *Experimental* *only*
+   *
+   *   If no auto-hinter script module can be assigned to a glyph, a
+   *   fallback script gets assigned to it (see also the
+   *   @glyph-to-script-map property).  By default, this is
+   *   @FT_AUTOHINTER_SCRIPT_CJK.  Using the `fallback-script' property,
+   *   this fallback value can be changed.
+   *
+   *   {
+   *     FT_Library  library;
+   *     FT_UInt     fallback_script = FT_AUTOHINTER_SCRIPT_NONE;
+   *
+   *
+   *     FT_Init_FreeType( &library );
+   *
+   *     FT_Property_Set( library, "autofitter",
+   *                               "fallback-script", &fallback_script );
+   *   }
+   *
+   * @note:
+   *   This property can be used with @FT_Property_Get also.
+   *
+   *   It's important to use the right timing for changing this value: The
+   *   creation of the glyph-to-script map that eventually uses the
+   *   fallback script value gets triggered either by setting or reading a
+   *   face-specific property like @glyph-to-script-map, or by auto-hinting
+   *   any glyph from that face.  In particular, if you have already created
+   *   an @FT_Face structure but not loaded any glyph (using the
+   *   auto-hinter), a change of the fallback script will affect this face.
+   *
+   * @since:
+   *   2.4.11
+   *
+   */
+
+
+  /**************************************************************************
+   *
+   * @property:
+   *   default-script
+   *
+   * @description:
+   *   *Experimental* *only*
+   *
+   *   If FreeType gets compiled with FT_CONFIG_OPTION_USE_HARFBUZZ to make
+   *   the HarfBuzz library access OpenType features for getting better
+   *   glyph coverages, this property sets the (auto-fitter) script to be
+   *   used for the default (OpenType) script data of a font's GSUB table.
+   *   Features for the default script are intended for all scripts not
+   *   explicitly handled in GSUB; an example is a `dlig' feature,
+   *   containing the combination of the characters `T', `E', and `L' to
+   *   form a `TEL' ligature.
+   *
+   *   By default, this is @FT_AUTOHINTER_SCRIPT_LATIN.  Using the
+   *   `default-script' property, this default value can be changed.
+   *
+   *   {
+   *     FT_Library  library;
+   *     FT_UInt     default_script = FT_AUTOHINTER_SCRIPT_NONE;
+   *
+   *
+   *     FT_Init_FreeType( &library );
+   *
+   *     FT_Property_Set( library, "autofitter",
+   *                               "default-script", &default_script );
+   *   }
+   *
+   * @note:
+   *   This property can be used with @FT_Property_Get also.
+   *
+   *   It's important to use the right timing for changing this value: The
+   *   creation of the glyph-to-script map that eventually uses the
+   *   default script value gets triggered either by setting or reading a
+   *   face-specific property like @glyph-to-script-map, or by auto-hinting
+   *   any glyph from that face.  In particular, if you have already created
+   *   an @FT_Face structure but not loaded any glyph (using the
+   *   auto-hinter), a change of the default script will affect this face.
+   *
+   * @since:
+   *   2.5.3
+   *
+   */
+
+
+  /**************************************************************************
+   *
+   * @property:
+   *   increase-x-height
+   *
+   * @description:
+   *   For ppem values in the range 6~<= ppem <= `increase-x-height', round
+   *   up the font's x~height much more often than normally.  If the value
+   *   is set to~0, which is the default, this feature is switched off.  Use
+   *   this property to improve the legibility of small font sizes if
+   *   necessary.
+   *
+   *   {
+   *     FT_Library               library;
+   *     FT_Face                  face;
+   *     FT_Prop_IncreaseXHeight  prop;
+   *
+   *
+   *     FT_Init_FreeType( &library );
+   *     FT_New_Face( library, "foo.ttf", 0, &face );
+   *     FT_Set_Char_Size( face, 10 * 64, 0, 72, 0 );
+   *
+   *     prop.face  = face;
+   *     prop.limit = 14;
+   *
+   *     FT_Property_Set( library, "autofitter",
+   *                               "increase-x-height", &prop );
+   *   }
+   *
+   * @note:
+   *   This property can be used with @FT_Property_Get also.
+   *
+   *   Set this value right after calling @FT_Set_Char_Size, but before
+   *   loading any glyph (using the auto-hinter).
+   *
+   * @since:
+   *   2.4.11
+   *
+   */
+
+
+  /**************************************************************************
+   *
+   * @struct:
+   *   FT_Prop_IncreaseXHeight
+   *
+   * @description:
+   *   The data exchange structure for the @increase-x-height property.
+   *
+   */
+  typedef struct  FT_Prop_IncreaseXHeight_
+  {
+    FT_Face  face;
+    FT_UInt  limit;
+
+  } FT_Prop_IncreaseXHeight;
+
+
+  /**************************************************************************
+   *
+   * @property:
+   *   warping
+   *
+   * @description:
+   *   *Experimental* *only*
+   *
+   *   If FreeType gets compiled with option AF_CONFIG_OPTION_USE_WARPER to
+   *   activate the warp hinting code in the auto-hinter, this property
+   *   switches warping on and off.
+   *
+   *   Warping only works in `normal' auto-hinting mode replacing it.
+   *   The idea of the code is to slightly scale and shift a glyph along
+   *   the non-hinted dimension (which is usually the horizontal axis) so
+   *   that as much of its segments are aligned (more or less) to the grid.
+   *   To find out a glyph's optimal scaling and shifting value, various
+   *   parameter combinations are tried and scored.
+   *
+   *   By default, warping is off.  The example below shows how to switch on
+   *   warping (omitting the error handling).
+   *
+   *   {
+   *     FT_Library  library;
+   *     FT_Bool     warping = 1;
+   *
+   *
+   *     FT_Init_FreeType( &library );
+   *
+   *     FT_Property_Set( library, "autofitter",
+   *                               "warping", &warping );
+   *   }
+   *
+   * @note:
+   *   This property can be used with @FT_Property_Get also.
+   *
+   *   This property can be set via the `FREETYPE_PROPERTIES' environment
+   *   variable (using values 1 and 0 for `on' and `off', respectively).
+   *
+   *   The warping code can also change advance widths.  Have a look at the
+   *   `lsb_delta' and `rsb_delta' fields in the @FT_GlyphSlotRec structure
+   *   for details on improving inter-glyph distances while rendering.
+   *
+   *   Since warping is a global property of the auto-hinter it is best to
+   *   change its value before rendering any face.  Otherwise, you should
+   *   reload all faces that get auto-hinted in `normal' hinting mode.
+   *
+   * @since:
+   *   2.6
+   *
+   */
+
+
+ /* */
+
+
+FT_END_HEADER
+
+
+#endif /* FTDRIVER_H_ */
+
+
+/* END */

+ 1 - 1
thirdparty/freetype/include/freetype/fterrdef.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType error codes (specification).                                */
 /*    FreeType error codes (specification).                                */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2002-2017 by                                                 */
+/*  Copyright 2002-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */

+ 1 - 1
thirdparty/freetype/include/freetype/fterrors.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType error code handling (specification).                        */
 /*    FreeType error code handling (specification).                        */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2017 by                                                 */
+/*  Copyright 1996-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */

+ 1 - 1
thirdparty/freetype/include/freetype/ftfntfmt.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    Support functions for font formats.                                  */
 /*    Support functions for font formats.                                  */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2002-2017 by                                                 */
+/*  Copyright 2002-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */

+ 6 - 1
thirdparty/freetype/include/freetype/ftgasp.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    Access of TrueType's `gasp' table (specification).                   */
 /*    Access of TrueType's `gasp' table (specification).                   */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2007-2017 by                                                 */
+/*  Copyright 2007-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -29,6 +29,9 @@
 #endif
 #endif
 
 
 
 
+FT_BEGIN_HEADER
+
+
   /***************************************************************************
   /***************************************************************************
    *
    *
    * @section:
    * @section:
@@ -131,6 +134,8 @@
   /* */
   /* */
 
 
 
 
+FT_END_HEADER
+
 #endif /* FTGASP_H_ */
 #endif /* FTGASP_H_ */
 
 
 
 

+ 3 - 3
thirdparty/freetype/include/freetype/ftglyph.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType convenience functions to handle glyphs (specification).     */
 /*    FreeType convenience functions to handle glyphs (specification).     */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2017 by                                                 */
+/*  Copyright 1996-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -347,10 +347,10 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /*                                                                       */
   /* <Description>                                                         */
   /* <Description>                                                         */
   /*    Return a glyph's `control box'.  The control box encloses all the  */
   /*    Return a glyph's `control box'.  The control box encloses all the  */
-  /*    outline's points, including Bézier control points.  Though it      */
+  /*    outline's points, including Bezier control points.  Though it      */
   /*    coincides with the exact bounding box for most glyphs, it can be   */
   /*    coincides with the exact bounding box for most glyphs, it can be   */
   /*    slightly larger in some situations (like when rotating an outline  */
   /*    slightly larger in some situations (like when rotating an outline  */
-  /*    that contains Bézier outside arcs).                                */
+  /*    that contains Bezier outside arcs).                                */
   /*                                                                       */
   /*                                                                       */
   /*    Computing the control box is very fast, while getting the bounding */
   /*    Computing the control box is very fast, while getting the bounding */
   /*    box can take much more time as it needs to walk over all segments  */
   /*    box can take much more time as it needs to walk over all segments  */

+ 5 - 5
thirdparty/freetype/include/freetype/ftgxval.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType API for validating TrueTypeGX/AAT tables (specification).   */
 /*    FreeType API for validating TrueTypeGX/AAT tables (specification).   */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2004-2017 by                                                 */
+/*  Copyright 2004-2018 by                                                 */
 /*  Masatake YAMATO, Redhat K.K,                                           */
 /*  Masatake YAMATO, Redhat K.K,                                           */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
@@ -101,15 +101,15 @@ FT_BEGIN_HEADER
    *   The number of tables checked in this module.  Use it as a parameter
    *   The number of tables checked in this module.  Use it as a parameter
    *   for the `table-length' argument of function @FT_TrueTypeGX_Validate.
    *   for the `table-length' argument of function @FT_TrueTypeGX_Validate.
    */
    */
-#define FT_VALIDATE_GX_LENGTH     (FT_VALIDATE_GX_LAST_INDEX + 1)
+#define FT_VALIDATE_GX_LENGTH  ( FT_VALIDATE_GX_LAST_INDEX + 1 )
 
 
   /* */
   /* */
 
 
   /* Up to 0x1000 is used by otvalid.
   /* Up to 0x1000 is used by otvalid.
      Ox2xxx is reserved for feature OT extension. */
      Ox2xxx is reserved for feature OT extension. */
-#define FT_VALIDATE_GX_START 0x4000
-#define FT_VALIDATE_GX_BITFIELD( tag )                  \
-  ( FT_VALIDATE_GX_START << FT_VALIDATE_##tag##_INDEX )
+#define FT_VALIDATE_GX_START  0x4000
+#define FT_VALIDATE_GX_BITFIELD( tag ) \
+          ( FT_VALIDATE_GX_START << FT_VALIDATE_##tag##_INDEX )
 
 
 
 
  /**********************************************************************
  /**********************************************************************

+ 4 - 1
thirdparty/freetype/include/freetype/ftgzip.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    Gzip-compressed stream support.                                      */
 /*    Gzip-compressed stream support.                                      */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2002-2017 by                                                 */
+/*  Copyright 2002-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -129,6 +129,9 @@ FT_BEGIN_HEADER
   * @note:
   * @note:
   *   This function may return `FT_Err_Unimplemented_Feature' if your build
   *   This function may return `FT_Err_Unimplemented_Feature' if your build
   *   of FreeType was not compiled with zlib support.
   *   of FreeType was not compiled with zlib support.
+  *
+  * @since:
+  *   2.5.1
   */
   */
   FT_EXPORT( FT_Error )
   FT_EXPORT( FT_Error )
   FT_Gzip_Uncompress( FT_Memory       memory,
   FT_Gzip_Uncompress( FT_Memory       memory,

+ 18 - 18
thirdparty/freetype/include/freetype/ftimage.h

@@ -5,7 +5,7 @@
 /*    FreeType glyph image formats and default raster interface            */
 /*    FreeType glyph image formats and default raster interface            */
 /*    (specification).                                                     */
 /*    (specification).                                                     */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2017 by                                                 */
+/*  Copyright 1996-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -169,13 +169,13 @@ FT_BEGIN_HEADER
   /*      @FT_RENDER_MODE_LCD_V.                                           */
   /*      @FT_RENDER_MODE_LCD_V.                                           */
   /*                                                                       */
   /*                                                                       */
   /*    FT_PIXEL_MODE_BGRA ::                                              */
   /*    FT_PIXEL_MODE_BGRA ::                                              */
-  /*      An image with four 8-bit channels per pixel, representing a      */
-  /*      color image (such as emoticons) with alpha channel.  For each    */
-  /*      pixel, the format is BGRA, which means, the blue channel comes   */
-  /*      first in memory.  The color channels are pre-multiplied and in   */
-  /*      the sRGB colorspace.  For example, full red at half-translucent  */
-  /*      opacity will be represented as `00,00,80,80', not `00,00,FF,80'. */
-  /*      See also @FT_LOAD_COLOR.                                         */
+  /*      [Since 2.5] An image with four 8-bit channels per pixel,         */
+  /*      representing a color image (such as emoticons) with alpha        */
+  /*      channel.  For each pixel, the format is BGRA, which means, the   */
+  /*      blue channel comes first in memory.  The color channels are      */
+  /*      pre-multiplied and in the sRGB colorspace.  For example, full    */
+  /*      red at half-translucent opacity will be represented as           */
+  /*      `00,00,80,80', not `00,00,FF,80'.  See also @FT_LOAD_COLOR.      */
   /*                                                                       */
   /*                                                                       */
   typedef enum  FT_Pixel_Mode_
   typedef enum  FT_Pixel_Mode_
   {
   {
@@ -301,11 +301,11 @@ FT_BEGIN_HEADER
   /*                  each outline point's type.                           */
   /*                  each outline point's type.                           */
   /*                                                                       */
   /*                                                                       */
   /*                  If bit~0 is unset, the point is `off' the curve,     */
   /*                  If bit~0 is unset, the point is `off' the curve,     */
-  /*                  i.e., a Bézier control point, while it is `on' if    */
+  /*                  i.e., a Bezier control point, while it is `on' if    */
   /*                  set.                                                 */
   /*                  set.                                                 */
   /*                                                                       */
   /*                                                                       */
   /*                  Bit~1 is meaningful for `off' points only.  If set,  */
   /*                  Bit~1 is meaningful for `off' points only.  If set,  */
-  /*                  it indicates a third-order Bézier arc control point; */
+  /*                  it indicates a third-order Bezier arc control point; */
   /*                  and a second-order control point if unset.           */
   /*                  and a second-order control point if unset.           */
   /*                                                                       */
   /*                                                                       */
   /*                  If bit~2 is set, bits 5-7 contain the drop-out mode  */
   /*                  If bit~2 is set, bits 5-7 contain the drop-out mode  */
@@ -532,7 +532,7 @@ FT_BEGIN_HEADER
   /*    A function pointer type used to describe the signature of a `conic */
   /*    A function pointer type used to describe the signature of a `conic */
   /*    to' function during outline walking or decomposition.              */
   /*    to' function during outline walking or decomposition.              */
   /*                                                                       */
   /*                                                                       */
-  /*    A `conic to' is emitted to indicate a second-order Bézier arc in   */
+  /*    A `conic to' is emitted to indicate a second-order Bezier arc in   */
   /*    the outline.                                                       */
   /*    the outline.                                                       */
   /*                                                                       */
   /*                                                                       */
   /* <Input>                                                               */
   /* <Input>                                                               */
@@ -564,12 +564,12 @@ FT_BEGIN_HEADER
   /*    A function pointer type used to describe the signature of a `cubic */
   /*    A function pointer type used to describe the signature of a `cubic */
   /*    to' function during outline walking or decomposition.              */
   /*    to' function during outline walking or decomposition.              */
   /*                                                                       */
   /*                                                                       */
-  /*    A `cubic to' is emitted to indicate a third-order Bézier arc.      */
+  /*    A `cubic to' is emitted to indicate a third-order Bezier arc.      */
   /*                                                                       */
   /*                                                                       */
   /* <Input>                                                               */
   /* <Input>                                                               */
-  /*    control1 :: A pointer to the first Bézier control point.           */
+  /*    control1 :: A pointer to the first Bezier control point.           */
   /*                                                                       */
   /*                                                                       */
-  /*    control2 :: A pointer to the second Bézier control point.          */
+  /*    control2 :: A pointer to the second Bezier control point.          */
   /*                                                                       */
   /*                                                                       */
   /*    to       :: A pointer to the target end point.                     */
   /*    to       :: A pointer to the target end point.                     */
   /*                                                                       */
   /*                                                                       */
@@ -595,16 +595,16 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /*                                                                       */
   /* <Description>                                                         */
   /* <Description>                                                         */
   /*    A structure to hold various function pointers used during outline  */
   /*    A structure to hold various function pointers used during outline  */
-  /*    decomposition in order to emit segments, conic, and cubic Béziers. */
+  /*    decomposition in order to emit segments, conic, and cubic Beziers. */
   /*                                                                       */
   /*                                                                       */
   /* <Fields>                                                              */
   /* <Fields>                                                              */
   /*    move_to  :: The `move to' emitter.                                 */
   /*    move_to  :: The `move to' emitter.                                 */
   /*                                                                       */
   /*                                                                       */
   /*    line_to  :: The segment emitter.                                   */
   /*    line_to  :: The segment emitter.                                   */
   /*                                                                       */
   /*                                                                       */
-  /*    conic_to :: The second-order Bézier arc emitter.                   */
+  /*    conic_to :: The second-order Bezier arc emitter.                   */
   /*                                                                       */
   /*                                                                       */
-  /*    cubic_to :: The third-order Bézier arc emitter.                    */
+  /*    cubic_to :: The third-order Bezier arc emitter.                    */
   /*                                                                       */
   /*                                                                       */
   /*    shift    :: The shift that is applied to coordinates before they   */
   /*    shift    :: The shift that is applied to coordinates before they   */
   /*                are sent to the emitter.                               */
   /*                are sent to the emitter.                               */
@@ -701,7 +701,7 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /*                                                                       */
   /*    FT_GLYPH_FORMAT_OUTLINE ::                                         */
   /*    FT_GLYPH_FORMAT_OUTLINE ::                                         */
   /*      The glyph image is a vectorial outline made of line segments     */
   /*      The glyph image is a vectorial outline made of line segments     */
-  /*      and Bézier arcs; it can be described as an @FT_Outline; you      */
+  /*      and Bezier arcs; it can be described as an @FT_Outline; you      */
   /*      generally want to access the `outline' field of the              */
   /*      generally want to access the `outline' field of the              */
   /*      @FT_GlyphSlotRec structure to read it.                           */
   /*      @FT_GlyphSlotRec structure to read it.                           */
   /*                                                                       */
   /*                                                                       */

+ 2 - 13
thirdparty/freetype/include/freetype/ftincrem.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType incremental loading (specification).                        */
 /*    FreeType incremental loading (specification).                        */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2002-2017 by                                                 */
+/*  Copyright 2002-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -21,6 +21,7 @@
 
 
 #include <ft2build.h>
 #include <ft2build.h>
 #include FT_FREETYPE_H
 #include FT_FREETYPE_H
+#include FT_PARAMETER_TAGS_H
 
 
 #ifdef FREETYPE_H
 #ifdef FREETYPE_H
 #error "freetype.h of FreeType 1 has been loaded!"
 #error "freetype.h of FreeType 1 has been loaded!"
@@ -331,18 +332,6 @@ FT_BEGIN_HEADER
   typedef FT_Incremental_InterfaceRec*   FT_Incremental_Interface;
   typedef FT_Incremental_InterfaceRec*   FT_Incremental_Interface;
 
 
 
 
-  /***************************************************************************
-   *
-   * @constant:
-   *   FT_PARAM_TAG_INCREMENTAL
-   *
-   * @description:
-   *   A constant used as the tag of @FT_Parameter structures to indicate
-   *   an incremental loading object to be used by FreeType.
-   *
-   */
-#define FT_PARAM_TAG_INCREMENTAL  FT_MAKE_TAG( 'i', 'n', 'c', 'r' )
-
   /* */
   /* */
 
 
 
 

+ 5 - 18
thirdparty/freetype/include/freetype/ftlcdfil.h

@@ -5,7 +5,7 @@
 /*    FreeType API for color filtering of subpixel bitmap glyphs           */
 /*    FreeType API for color filtering of subpixel bitmap glyphs           */
 /*    (specification).                                                     */
 /*    (specification).                                                     */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2006-2017 by                                                 */
+/*  Copyright 2006-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -22,6 +22,7 @@
 
 
 #include <ft2build.h>
 #include <ft2build.h>
 #include FT_FREETYPE_H
 #include FT_FREETYPE_H
+#include FT_PARAMETER_TAGS_H
 
 
 #ifdef FREETYPE_H
 #ifdef FREETYPE_H
 #error "freetype.h of FreeType 1 has been loaded!"
 #error "freetype.h of FreeType 1 has been loaded!"
@@ -280,23 +281,6 @@ FT_BEGIN_HEADER
                                   unsigned char  *weights );
                                   unsigned char  *weights );
 
 
 
 
-  /**************************************************************************
-   *
-   * @constant:
-   *   FT_PARAM_TAG_LCD_FILTER_WEIGHTS
-   *
-   * @description:
-   *   An @FT_Parameter tag to be used with @FT_Face_Properties.  The
-   *   corresponding argument specifies the five LCD filter weights for a
-   *   given face (if using @FT_LOAD_TARGET_LCD, for example), overriding
-   *   the global default values or the values set up with
-   *   @FT_Library_SetLcdFilterWeights.
-   *
-   */
-#define FT_PARAM_TAG_LCD_FILTER_WEIGHTS \
-          FT_MAKE_TAG( 'l', 'c', 'd', 'f' )
-
-
   /*
   /*
    * @type:
    * @type:
    *   FT_LcdFiveTapFilter
    *   FT_LcdFiveTapFilter
@@ -305,6 +289,9 @@ FT_BEGIN_HEADER
    *   A typedef for passing the five LCD filter weights to
    *   A typedef for passing the five LCD filter weights to
    *   @FT_Face_Properties within an @FT_Parameter structure.
    *   @FT_Face_Properties within an @FT_Parameter structure.
    *
    *
+   * @since:
+   *   2.8
+   *
    */
    */
 #define FT_LCD_FILTER_FIVE_TAPS  5
 #define FT_LCD_FILTER_FIVE_TAPS  5
 
 

+ 1 - 1
thirdparty/freetype/include/freetype/ftlist.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    Generic list support for FreeType (specification).                   */
 /*    Generic list support for FreeType (specification).                   */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2017 by                                                 */
+/*  Copyright 1996-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */

+ 1 - 1
thirdparty/freetype/include/freetype/ftlzw.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    LZW-compressed stream support.                                       */
 /*    LZW-compressed stream support.                                       */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2004-2017 by                                                 */
+/*  Copyright 2004-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */

+ 1 - 1
thirdparty/freetype/include/freetype/ftmac.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    Additional Mac-specific API.                                         */
 /*    Additional Mac-specific API.                                         */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2017 by                                                 */
+/*  Copyright 1996-2018 by                                                 */
 /*  Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg.     */
 /*  Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg.     */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */

+ 99 - 11
thirdparty/freetype/include/freetype/ftmm.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType Multiple Master font interface (specification).             */
 /*    FreeType Multiple Master font interface (specification).             */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2017 by                                                 */
+/*  Copyright 1996-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -286,7 +286,7 @@ FT_BEGIN_HEADER
   /* <Output>                                                              */
   /* <Output>                                                              */
   /*    amaster :: The variation descriptor.                               */
   /*    amaster :: The variation descriptor.                               */
   /*               Allocates a data structure, which the user must         */
   /*               Allocates a data structure, which the user must         */
-  /*               deallocate with `free' after use.                       */
+  /*               deallocate with a call to @FT_Done_MM_Var after use.    */
   /*                                                                       */
   /*                                                                       */
   /* <Return>                                                              */
   /* <Return>                                                              */
   /*    FreeType error code.  0~means success.                             */
   /*    FreeType error code.  0~means success.                             */
@@ -296,6 +296,26 @@ FT_BEGIN_HEADER
                  FT_MM_Var*  *amaster );
                  FT_MM_Var*  *amaster );
 
 
 
 
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Done_MM_Var                                                     */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Free the memory allocated by @FT_Get_MM_Var.                       */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    library :: A handle of the face's parent library object that was   */
+  /*               used in the call to @FT_Get_MM_Var to create `amaster'. */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0~means success.                             */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Done_MM_Var( FT_Library   library,
+                  FT_MM_Var   *amaster );
+
+
   /*************************************************************************/
   /*************************************************************************/
   /*                                                                       */
   /*                                                                       */
   /* <Function>                                                            */
   /* <Function>                                                            */
@@ -323,9 +343,13 @@ FT_BEGIN_HEADER
   /*    FreeType error code.  0~means success.                             */
   /*    FreeType error code.  0~means success.                             */
   /*                                                                       */
   /*                                                                       */
   /* <Note>                                                                */
   /* <Note>                                                                */
-  /*    To reset all axes to the default values, call the function with    */
-  /*    `num_coords' set to zero and `coords' set to NULL (new feature in  */
-  /*    FreeType version 2.8.1).                                           */
+  /*    [Since 2.8.1] To reset all axes to the default values, call the    */
+  /*    function with `num_coords' set to zero and `coords' set to NULL.   */
+  /*                                                                       */
+  /*    [Since 2.9] If `num_coords' is larger than zero, this function     */
+  /*    sets the @FT_FACE_FLAG_VARIATION bit in @FT_Face's `face_flags'    */
+  /*    field (i.e., @FT_IS_VARIATION will return true).  If `num_coords'  */
+  /*    is zero, this bit flag gets unset.                                 */
   /*                                                                       */
   /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_EXPORT( FT_Error )
   FT_Set_MM_Design_Coordinates( FT_Face   face,
   FT_Set_MM_Design_Coordinates( FT_Face   face,
@@ -358,9 +382,15 @@ FT_BEGIN_HEADER
   /*    FreeType error code.  0~means success.                             */
   /*    FreeType error code.  0~means success.                             */
   /*                                                                       */
   /*                                                                       */
   /* <Note>                                                                */
   /* <Note>                                                                */
-  /*    To reset all axes to the default values, call the function with    */
-  /*    `num_coords' set to zero and `coords' set to NULL (new feature in  */
-  /*    FreeType version 2.8.1).                                           */
+  /*    [Since 2.8.1] To reset all axes to the default values, call the    */
+  /*    function with `num_coords' set to zero and `coords' set to NULL.   */
+  /*    [Since 2.9] `Default values' means the currently selected named    */
+  /*    instance (or the base font if no named instance is selected).      */
+  /*                                                                       */
+  /*    [Since 2.9] If `num_coords' is larger than zero, this function     */
+  /*    sets the @FT_FACE_FLAG_VARIATION bit in @FT_Face's `face_flags'    */
+  /*    field (i.e., @FT_IS_VARIATION will return true).  If `num_coords'  */
+  /*    is zero, this bit flag gets unset.                                 */
   /*                                                                       */
   /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_EXPORT( FT_Error )
   FT_Set_Var_Design_Coordinates( FT_Face    face,
   FT_Set_Var_Design_Coordinates( FT_Face    face,
@@ -392,6 +422,9 @@ FT_BEGIN_HEADER
   /* <Return>                                                              */
   /* <Return>                                                              */
   /*    FreeType error code.  0~means success.                             */
   /*    FreeType error code.  0~means success.                             */
   /*                                                                       */
   /*                                                                       */
+  /* <Since>                                                               */
+  /*    2.7.1                                                              */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_EXPORT( FT_Error )
   FT_Get_Var_Design_Coordinates( FT_Face    face,
   FT_Get_Var_Design_Coordinates( FT_Face    face,
                                  FT_UInt    num_coords,
                                  FT_UInt    num_coords,
@@ -427,9 +460,15 @@ FT_BEGIN_HEADER
   /*    FreeType error code.  0~means success.                             */
   /*    FreeType error code.  0~means success.                             */
   /*                                                                       */
   /*                                                                       */
   /* <Note>                                                                */
   /* <Note>                                                                */
-  /*    To reset all axes to the default values, call the function with    */
-  /*    `num_coords' set to zero and `coords' set to NULL (new feature in  */
-  /*    FreeType version 2.8.1).                                           */
+  /*    [Since 2.8.1] To reset all axes to the default values, call the    */
+  /*    function with `num_coords' set to zero and `coords' set to NULL.   */
+  /*    [Since 2.9] `Default values' means the currently selected named    */
+  /*    instance (or the base font if no named instance is selected).      */
+  /*                                                                       */
+  /*    [Since 2.9] If `num_coords' is larger than zero, this function     */
+  /*    sets the @FT_FACE_FLAG_VARIATION bit in @FT_Face's `face_flags'    */
+  /*    field (i.e., @FT_IS_VARIATION will return true).  If `num_coords'  */
+  /*    is zero, this bit flag gets unset.                                 */
   /*                                                                       */
   /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_EXPORT( FT_Error )
   FT_Set_MM_Blend_Coordinates( FT_Face    face,
   FT_Set_MM_Blend_Coordinates( FT_Face    face,
@@ -462,6 +501,9 @@ FT_BEGIN_HEADER
   /* <Return>                                                              */
   /* <Return>                                                              */
   /*    FreeType error code.  0~means success.                             */
   /*    FreeType error code.  0~means success.                             */
   /*                                                                       */
   /*                                                                       */
+  /* <Since>                                                               */
+  /*    2.7.1                                                              */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_EXPORT( FT_Error )
   FT_Get_MM_Blend_Coordinates( FT_Face    face,
   FT_Get_MM_Blend_Coordinates( FT_Face    face,
                                FT_UInt    num_coords,
                                FT_UInt    num_coords,
@@ -490,6 +532,9 @@ FT_BEGIN_HEADER
   /* <Description>                                                         */
   /* <Description>                                                         */
   /*    This is another name of @FT_Get_MM_Blend_Coordinates.              */
   /*    This is another name of @FT_Get_MM_Blend_Coordinates.              */
   /*                                                                       */
   /*                                                                       */
+  /* <Since>                                                               */
+  /*    2.7.1                                                              */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_EXPORT( FT_Error )
   FT_Get_Var_Blend_Coordinates( FT_Face    face,
   FT_Get_Var_Blend_Coordinates( FT_Face    face,
                                 FT_UInt    num_coords,
                                 FT_UInt    num_coords,
@@ -509,6 +554,9 @@ FT_BEGIN_HEADER
   /*    FT_VAR_AXIS_FLAG_HIDDEN ::                                         */
   /*    FT_VAR_AXIS_FLAG_HIDDEN ::                                         */
   /*      The variation axis should not be exposed to user interfaces.     */
   /*      The variation axis should not be exposed to user interfaces.     */
   /*                                                                       */
   /*                                                                       */
+  /* <Since>                                                               */
+  /*    2.8.1                                                              */
+  /*                                                                       */
 #define FT_VAR_AXIS_FLAG_HIDDEN  1
 #define FT_VAR_AXIS_FLAG_HIDDEN  1
 
 
 
 
@@ -534,11 +582,51 @@ FT_BEGIN_HEADER
   /* <Return>                                                              */
   /* <Return>                                                              */
   /*    FreeType error code.  0~means success.                             */
   /*    FreeType error code.  0~means success.                             */
   /*                                                                       */
   /*                                                                       */
+  /* <Since>                                                               */
+  /*    2.8.1                                                              */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_EXPORT( FT_Error )
   FT_Get_Var_Axis_Flags( FT_MM_Var*  master,
   FT_Get_Var_Axis_Flags( FT_MM_Var*  master,
                          FT_UInt     axis_index,
                          FT_UInt     axis_index,
                          FT_UInt*    flags );
                          FT_UInt*    flags );
 
 
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Set_Named_Instance                                              */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Set or change the current named instance.                          */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face           :: A handle to the source face.                     */
+  /*                                                                       */
+  /*    instance_index :: The index of the requested instance, starting    */
+  /*                      with value 1.  If set to value 0, FreeType       */
+  /*                      switches to font access without a named          */
+  /*                      instance.                                        */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0~means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The function uses the value of `instance_index' to set bits 16-30  */
+  /*    of the face's `face_index' field.  It also resets any variation    */
+  /*    applied to the font, and the @FT_FACE_FLAG_VARIATION bit of the    */
+  /*    face's `face_flags' field gets reset to zero (i.e.,                */
+  /*    @FT_IS_VARIATION will return false).                               */
+  /*                                                                       */
+  /*    For Adobe MM fonts (which don't have named instances) this         */
+  /*    function simply resets the current face to the default instance.   */
+  /*                                                                       */
+  /* <Since>                                                               */
+  /*    2.9                                                                */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Set_Named_Instance( FT_Face  face,
+                         FT_UInt  instance_index );
+
   /* */
   /* */
 
 
 
 

+ 12 - 11
thirdparty/freetype/include/freetype/ftmodapi.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType modules public interface (specification).                   */
 /*    FreeType modules public interface (specification).                   */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2017 by                                                 */
+/*  Copyright 1996-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -323,16 +323,15 @@ FT_BEGIN_HEADER
    *       The module name.
    *       The module name.
    *
    *
    *    property_name ::
    *    property_name ::
-   *       The property name.  Properties are described in the `Synopsis'
-   *       subsection of the module's documentation.
+   *       The property name.  Properties are described in section
+   *       @properties.
    *
    *
    *       Note that only a few modules have properties.
    *       Note that only a few modules have properties.
    *
    *
    *    value ::
    *    value ::
    *       A generic pointer to a variable or structure that gives the new
    *       A generic pointer to a variable or structure that gives the new
    *       value of the property.  The exact definition of `value' is
    *       value of the property.  The exact definition of `value' is
-   *       dependent on the property; see the `Synopsis' subsection of the
-   *       module's documentation.
+   *       dependent on the property; see section @properties.
    *
    *
    * @return:
    * @return:
    *   FreeType error code.  0~means success.
    *   FreeType error code.  0~means success.
@@ -390,15 +389,14 @@ FT_BEGIN_HEADER
    *       The module name.
    *       The module name.
    *
    *
    *    property_name ::
    *    property_name ::
-   *       The property name.  Properties are described in the `Synopsis'
-   *       subsection of the module's documentation.
+   *       The property name.  Properties are described in section
+   *       @properties.
    *
    *
    * @inout:
    * @inout:
    *    value ::
    *    value ::
    *       A generic pointer to a variable or structure that gives the
    *       A generic pointer to a variable or structure that gives the
    *       value of the property.  The exact definition of `value' is
    *       value of the property.  The exact definition of `value' is
-   *       dependent on the property; see the `Synopsis' subsection of the
-   *       module's documentation.
+   *       dependent on the property; see section @properties.
    *
    *
    * @return:
    * @return:
    *   FreeType error code.  0~means success.
    *   FreeType error code.  0~means success.
@@ -446,8 +444,8 @@ FT_BEGIN_HEADER
   /* <Description>                                                         */
   /* <Description>                                                         */
   /*    If compilation option FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES is   */
   /*    If compilation option FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES is   */
   /*    set, this function reads the `FREETYPE_PROPERTIES' environment     */
   /*    set, this function reads the `FREETYPE_PROPERTIES' environment     */
-  /*    variable to control driver properties.  See sections @auto_hinter, */
-  /*    @cff_driver, @pcf_driver, and @tt_driver for more.                 */
+  /*    variable to control driver properties.  See section @properties    */
+  /*    for more.                                                          */
   /*                                                                       */
   /*                                                                       */
   /*    If the compilation option is not set, this function does nothing.  */
   /*    If the compilation option is not set, this function does nothing.  */
   /*                                                                       */
   /*                                                                       */
@@ -475,6 +473,9 @@ FT_BEGIN_HEADER
   /* <InOut>                                                               */
   /* <InOut>                                                               */
   /*    library :: A handle to a new library object.                       */
   /*    library :: A handle to a new library object.                       */
   /*                                                                       */
   /*                                                                       */
+  /* <Since>                                                               */
+  /*    2.8                                                                */
+  /*                                                                       */
   FT_EXPORT( void )
   FT_EXPORT( void )
   FT_Set_Default_Properties( FT_Library  library );
   FT_Set_Default_Properties( FT_Library  library );
 
 

+ 1 - 1
thirdparty/freetype/include/freetype/ftmoderr.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType module error offsets (specification).                       */
 /*    FreeType module error offsets (specification).                       */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2001-2017 by                                                 */
+/*  Copyright 2001-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */

+ 1 - 1
thirdparty/freetype/include/freetype/ftotval.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType API for validating OpenType tables (specification).         */
 /*    FreeType API for validating OpenType tables (specification).         */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2004-2017 by                                                 */
+/*  Copyright 2004-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */

+ 4 - 7
thirdparty/freetype/include/freetype/ftoutln.h

@@ -5,7 +5,7 @@
 /*    Support for the FT_Outline type used to store glyph shapes of        */
 /*    Support for the FT_Outline type used to store glyph shapes of        */
 /*    most scalable font formats (specification).                          */
 /*    most scalable font formats (specification).                          */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2017 by                                                 */
+/*  Copyright 1996-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -89,7 +89,7 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /*                                                                       */
   /* <Description>                                                         */
   /* <Description>                                                         */
   /*    Walk over an outline's structure to decompose it into individual   */
   /*    Walk over an outline's structure to decompose it into individual   */
-  /*    segments and Bézier arcs.  This function also emits `move to'      */
+  /*    segments and Bezier arcs.  This function also emits `move to'      */
   /*    operations to indicate the start of new contours in the outline.   */
   /*    operations to indicate the start of new contours in the outline.   */
   /*                                                                       */
   /*                                                                       */
   /* <Input>                                                               */
   /* <Input>                                                               */
@@ -190,9 +190,6 @@ FT_BEGIN_HEADER
   /*    If the outline's `owner' field is not set, only the outline        */
   /*    If the outline's `owner' field is not set, only the outline        */
   /*    descriptor will be released.                                       */
   /*    descriptor will be released.                                       */
   /*                                                                       */
   /*                                                                       */
-  /*    The reason why this function takes an `library' parameter is       */
-  /*    simply to use ft_mem_free().                                       */
-  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_EXPORT( FT_Error )
   FT_Outline_Done( FT_Library   library,
   FT_Outline_Done( FT_Library   library,
                    FT_Outline*  outline );
                    FT_Outline*  outline );
@@ -232,10 +229,10 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /*                                                                       */
   /* <Description>                                                         */
   /* <Description>                                                         */
   /*    Return an outline's `control box'.  The control box encloses all   */
   /*    Return an outline's `control box'.  The control box encloses all   */
-  /*    the outline's points, including Bézier control points.  Though it  */
+  /*    the outline's points, including Bezier control points.  Though it  */
   /*    coincides with the exact bounding box for most glyphs, it can be   */
   /*    coincides with the exact bounding box for most glyphs, it can be   */
   /*    slightly larger in some situations (like when rotating an outline  */
   /*    slightly larger in some situations (like when rotating an outline  */
-  /*    that contains Bézier outside arcs).                                */
+  /*    that contains Bezier outside arcs).                                */
   /*                                                                       */
   /*                                                                       */
   /*    Computing the control box is very fast, while getting the bounding */
   /*    Computing the control box is very fast, while getting the bounding */
   /*    box can take much more time as it needs to walk over all segments  */
   /*    box can take much more time as it needs to walk over all segments  */

+ 205 - 0
thirdparty/freetype/include/freetype/ftparams.h

@@ -0,0 +1,205 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftparams.h                                                             */
+/*                                                                         */
+/*    FreeType API for possible FT_Parameter tags (specification only).    */
+/*                                                                         */
+/*  Copyright 2017-2018 by                                                 */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+#ifndef FTPARAMS_H_
+#define FTPARAMS_H_
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
+
+FT_BEGIN_HEADER
+
+
+  /**************************************************************************
+   *
+   * @section:
+   *   parameter_tags
+   *
+   * @title:
+   *   Parameter Tags
+   *
+   * @abstract:
+   *   Macros for driver property and font loading parameter tags.
+   *
+   * @description:
+   *   This section contains macros for the @FT_Parameter structure that are
+   *   used with various functions to activate some special functionality or
+   *   different behaviour of various components of FreeType.
+   *
+   */
+
+
+  /***************************************************************************
+   *
+   * @constant:
+   *   FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY
+   *
+   * @description:
+   *   A tag for @FT_Parameter to make @FT_Open_Face ignore typographic
+   *   family names in the `name' table (introduced in OpenType version
+   *   1.4).  Use this for backward compatibility with legacy systems that
+   *   have a four-faces-per-family restriction.
+   *
+   * @since:
+   *   2.8
+   *
+   */
+#define FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY \
+          FT_MAKE_TAG( 'i', 'g', 'p', 'f' )
+
+
+  /* this constant is deprecated */
+#define FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY \
+          FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY
+
+
+  /***************************************************************************
+   *
+   * @constant:
+   *   FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY
+   *
+   * @description:
+   *   A tag for @FT_Parameter to make @FT_Open_Face ignore typographic
+   *   subfamily names in the `name' table (introduced in OpenType version
+   *   1.4).  Use this for backward compatibility with legacy systems that
+   *   have a four-faces-per-family restriction.
+   *
+   * @since:
+   *   2.8
+   *
+   */
+#define FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY \
+          FT_MAKE_TAG( 'i', 'g', 'p', 's' )
+
+
+  /* this constant is deprecated */
+#define FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY \
+          FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY
+
+
+  /***************************************************************************
+   *
+   * @constant:
+   *   FT_PARAM_TAG_INCREMENTAL
+   *
+   * @description:
+   *   An @FT_Parameter tag to be used with @FT_Open_Face to indicate
+   *   incremental glyph loading.
+   *
+   */
+#define FT_PARAM_TAG_INCREMENTAL \
+          FT_MAKE_TAG( 'i', 'n', 'c', 'r' )
+
+
+  /**************************************************************************
+   *
+   * @constant:
+   *   FT_PARAM_TAG_LCD_FILTER_WEIGHTS
+   *
+   * @description:
+   *   An @FT_Parameter tag to be used with @FT_Face_Properties.  The
+   *   corresponding argument specifies the five LCD filter weights for a
+   *   given face (if using @FT_LOAD_TARGET_LCD, for example), overriding
+   *   the global default values or the values set up with
+   *   @FT_Library_SetLcdFilterWeights.
+   *
+   * @since:
+   *   2.8
+   *
+   */
+#define FT_PARAM_TAG_LCD_FILTER_WEIGHTS \
+          FT_MAKE_TAG( 'l', 'c', 'd', 'f' )
+
+
+  /**************************************************************************
+   *
+   * @constant:
+   *   FT_PARAM_TAG_RANDOM_SEED
+   *
+   * @description:
+   *   An @FT_Parameter tag to be used with @FT_Face_Properties.  The
+   *   corresponding 32bit signed integer argument overrides the font
+   *   driver's random seed value with a face-specific one; see
+   *   @random-seed.
+   *
+   * @since:
+   *   2.8
+   *
+   */
+#define FT_PARAM_TAG_RANDOM_SEED \
+          FT_MAKE_TAG( 's', 'e', 'e', 'd' )
+
+
+  /**************************************************************************
+   *
+   * @constant:
+   *   FT_PARAM_TAG_STEM_DARKENING
+   *
+   * @description:
+   *   An @FT_Parameter tag to be used with @FT_Face_Properties.  The
+   *   corresponding Boolean argument specifies whether to apply stem
+   *   darkening, overriding the global default values or the values set up
+   *   with @FT_Property_Set (see @no-stem-darkening).
+   *
+   *   This is a passive setting that only takes effect if the font driver
+   *   or autohinter honors it, which the CFF, Type~1, and CID drivers
+   *   always do, but the autohinter only in `light' hinting mode (as of
+   *   version 2.9).
+   *
+   * @since:
+   *   2.8
+   *
+   */
+#define FT_PARAM_TAG_STEM_DARKENING \
+          FT_MAKE_TAG( 'd', 'a', 'r', 'k' )
+
+
+ /***************************************************************************
+  *
+  * @constant:
+  *   FT_PARAM_TAG_UNPATENTED_HINTING
+  *
+  * @description:
+  *   Deprecated, no effect.
+  *
+  *   Previously: A constant used as the tag of an @FT_Parameter structure to
+  *   indicate that unpatented methods only should be used by the TrueType
+  *   bytecode interpreter for a typeface opened by @FT_Open_Face.
+  *
+  */
+#define FT_PARAM_TAG_UNPATENTED_HINTING \
+          FT_MAKE_TAG( 'u', 'n', 'p', 'a' )
+
+
+  /* */
+
+
+FT_END_HEADER
+
+
+#endif /* FTPARAMS_H_ */
+
+
+/* END */

+ 4 - 4
thirdparty/freetype/include/freetype/ftpfr.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType API for accessing PFR-specific data (specification only).   */
 /*    FreeType API for accessing PFR-specific data (specification only).   */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2002-2017 by                                                 */
+/*  Copyright 2002-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -71,7 +71,7 @@ FT_BEGIN_HEADER
   *
   *
   *    ametrics_x_scale ::
   *    ametrics_x_scale ::
   *      A 16.16 fixed-point number used to scale distance expressed
   *      A 16.16 fixed-point number used to scale distance expressed
-  *      in metrics units to device sub-pixels.  This is equivalent to
+  *      in metrics units to device subpixels.  This is equivalent to
   *      `face->size->x_scale', but for metrics only.  Optional (parameter
   *      `face->size->x_scale', but for metrics only.  Optional (parameter
   *      can be NULL).
   *      can be NULL).
   *
   *
@@ -123,7 +123,7 @@ FT_BEGIN_HEADER
   *    mode, which always returns distances converted to outline units.
   *    mode, which always returns distances converted to outline units.
   *
   *
   *    You can use the value of the `x_scale' and `y_scale' parameters
   *    You can use the value of the `x_scale' and `y_scale' parameters
-  *    returned by @FT_Get_PFR_Metrics to scale these to device sub-pixels.
+  *    returned by @FT_Get_PFR_Metrics to scale these to device subpixels.
   */
   */
   FT_EXPORT( FT_Error )
   FT_EXPORT( FT_Error )
   FT_Get_PFR_Kerning( FT_Face     face,
   FT_Get_PFR_Kerning( FT_Face     face,
@@ -154,7 +154,7 @@ FT_BEGIN_HEADER
   *
   *
   * @note:
   * @note:
   *    You can use the `x_scale' or `y_scale' results of @FT_Get_PFR_Metrics
   *    You can use the `x_scale' or `y_scale' results of @FT_Get_PFR_Metrics
-  *    to convert the advance to device sub-pixels (i.e., 1/64th of pixels).
+  *    to convert the advance to device subpixels (i.e., 1/64th of pixels).
   */
   */
   FT_EXPORT( FT_Error )
   FT_EXPORT( FT_Error )
   FT_Get_PFR_Advance( FT_Face   face,
   FT_Get_PFR_Advance( FT_Face   face,

+ 2 - 2
thirdparty/freetype/include/freetype/ftrender.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType renderer modules public interface (specification).          */
 /*    FreeType renderer modules public interface (specification).          */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2017 by                                                 */
+/*  Copyright 1996-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -88,7 +88,7 @@ FT_BEGIN_HEADER
   typedef FT_Error
   typedef FT_Error
   (*FT_Renderer_RenderFunc)( FT_Renderer       renderer,
   (*FT_Renderer_RenderFunc)( FT_Renderer       renderer,
                              FT_GlyphSlot      slot,
                              FT_GlyphSlot      slot,
-                             FT_UInt           mode,
+                             FT_Render_Mode    mode,
                              const FT_Vector*  origin );
                              const FT_Vector*  origin );
 
 
   typedef FT_Error
   typedef FT_Error

+ 1 - 1
thirdparty/freetype/include/freetype/ftsizes.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType size objects management (specification).                    */
 /*    FreeType size objects management (specification).                    */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2017 by                                                 */
+/*  Copyright 1996-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */

+ 8 - 42
thirdparty/freetype/include/freetype/ftsnames.h

@@ -7,7 +7,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    This is _not_ used to retrieve glyph names!                          */
 /*    This is _not_ used to retrieve glyph names!                          */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2017 by                                                 */
+/*  Copyright 1996-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -25,6 +25,7 @@
 
 
 #include <ft2build.h>
 #include <ft2build.h>
 #include FT_FREETYPE_H
 #include FT_FREETYPE_H
+#include FT_PARAMETER_TAGS_H
 
 
 #ifdef FREETYPE_H
 #ifdef FREETYPE_H
 #error "freetype.h of FreeType 1 has been loaded!"
 #error "freetype.h of FreeType 1 has been loaded!"
@@ -189,6 +190,9 @@ FT_BEGIN_HEADER
   /*    Please refer to the TrueType or OpenType specification for more    */
   /*    Please refer to the TrueType or OpenType specification for more    */
   /*    details.                                                           */
   /*    details.                                                           */
   /*                                                                       */
   /*                                                                       */
+  /* <Since>                                                               */
+  /*    2.8                                                                */
+  /*                                                                       */
   typedef struct  FT_SfntLangTag_
   typedef struct  FT_SfntLangTag_
   {
   {
     FT_Byte*  string;      /* this string is *not* null-terminated! */
     FT_Byte*  string;      /* this string is *not* null-terminated! */
@@ -229,53 +233,15 @@ FT_BEGIN_HEADER
   /*    invalid format~1 language ID values, FT_Err_Invalid_Argument is    */
   /*    invalid format~1 language ID values, FT_Err_Invalid_Argument is    */
   /*    returned.                                                          */
   /*    returned.                                                          */
   /*                                                                       */
   /*                                                                       */
+  /* <Since>                                                               */
+  /*    2.8                                                                */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_EXPORT( FT_Error )
   FT_Get_Sfnt_LangTag( FT_Face          face,
   FT_Get_Sfnt_LangTag( FT_Face          face,
                        FT_UInt          langID,
                        FT_UInt          langID,
                        FT_SfntLangTag  *alangTag );
                        FT_SfntLangTag  *alangTag );
 
 
 
 
-  /***************************************************************************
-   *
-   * @constant:
-   *   FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY
-   *
-   * @description:
-   *   A tag for @FT_Parameter to make @FT_Open_Face ignore typographic
-   *   family names in the `name' table (introduced in OpenType version
-   *   1.4).  Use this for backward compatibility with legacy systems that
-   *   have a four-faces-per-family restriction.
-   *
-   */
-#define FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY \
-          FT_MAKE_TAG( 'i', 'g', 'p', 'f' )
-
-
-  /* this constant is deprecated */
-#define FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY \
-          FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY
-
-
-  /***************************************************************************
-   *
-   * @constant:
-   *   FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY
-   *
-   * @description:
-   *   A tag for @FT_Parameter to make @FT_Open_Face ignore typographic
-   *   subfamily names in the `name' table (introduced in OpenType version
-   *   1.4).  Use this for backward compatibility with legacy systems that
-   *   have a four-faces-per-family restriction.
-   *
-   */
-#define FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY \
-          FT_MAKE_TAG( 'i', 'g', 'p', 's' )
-
-
-  /* this constant is deprecated */
-#define FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY \
-          FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY
-
   /* */
   /* */
 
 
 
 

+ 6 - 6
thirdparty/freetype/include/freetype/ftstroke.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType path stroker (specification).                               */
 /*    FreeType path stroker (specification).                               */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2002-2017 by                                                 */
+/*  Copyright 2002-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -466,7 +466,7 @@ FT_BEGIN_HEADER
    *   FT_Stroker_ConicTo
    *   FT_Stroker_ConicTo
    *
    *
    * @description:
    * @description:
-   *   `Draw' a single quadratic Bézier in the stroker's current sub-path,
+   *   `Draw' a single quadratic Bezier in the stroker's current sub-path,
    *   from the last position.
    *   from the last position.
    *
    *
    * @input:
    * @input:
@@ -474,7 +474,7 @@ FT_BEGIN_HEADER
    *     The target stroker handle.
    *     The target stroker handle.
    *
    *
    *   control ::
    *   control ::
-   *     A pointer to a Bézier control point.
+   *     A pointer to a Bezier control point.
    *
    *
    *   to ::
    *   to ::
    *     A pointer to the destination point.
    *     A pointer to the destination point.
@@ -498,7 +498,7 @@ FT_BEGIN_HEADER
    *   FT_Stroker_CubicTo
    *   FT_Stroker_CubicTo
    *
    *
    * @description:
    * @description:
-   *   `Draw' a single cubic Bézier in the stroker's current sub-path,
+   *   `Draw' a single cubic Bezier in the stroker's current sub-path,
    *   from the last position.
    *   from the last position.
    *
    *
    * @input:
    * @input:
@@ -506,10 +506,10 @@ FT_BEGIN_HEADER
    *     The target stroker handle.
    *     The target stroker handle.
    *
    *
    *   control1 ::
    *   control1 ::
-   *     A pointer to the first Bézier control point.
+   *     A pointer to the first Bezier control point.
    *
    *
    *   control2 ::
    *   control2 ::
-   *     A pointer to second Bézier control point.
+   *     A pointer to second Bezier control point.
    *
    *
    *   to ::
    *   to ::
    *     A pointer to the destination point.
    *     A pointer to the destination point.

+ 1 - 1
thirdparty/freetype/include/freetype/ftsynth.h

@@ -5,7 +5,7 @@
 /*    FreeType synthesizing code for emboldening and slanting              */
 /*    FreeType synthesizing code for emboldening and slanting              */
 /*    (specification).                                                     */
 /*    (specification).                                                     */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2000-2017 by                                                 */
+/*  Copyright 2000-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */

+ 1 - 1
thirdparty/freetype/include/freetype/ftsystem.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType low-level system interface definition (specification).      */
 /*    FreeType low-level system interface definition (specification).      */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2017 by                                                 */
+/*  Copyright 1996-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */

+ 1 - 1
thirdparty/freetype/include/freetype/fttrigon.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType trigonometric functions (specification).                    */
 /*    FreeType trigonometric functions (specification).                    */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2001-2017 by                                                 */
+/*  Copyright 2001-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */

+ 2 - 2
thirdparty/freetype/include/freetype/fttypes.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType simple types definitions (specification only).              */
 /*    FreeType simple types definitions (specification only).              */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2017 by                                                 */
+/*  Copyright 1996-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -425,7 +425,7 @@ FT_BEGIN_HEADER
   /*    The address of the FreeType object that is under finalization.     */
   /*    The address of the FreeType object that is under finalization.     */
   /*    Its client data is accessed through its `generic' field.           */
   /*    Its client data is accessed through its `generic' field.           */
   /*                                                                       */
   /*                                                                       */
-  typedef void  (*FT_Generic_Finalizer)(void*  object);
+  typedef void  (*FT_Generic_Finalizer)( void*  object );
 
 
 
 
   /*************************************************************************/
   /*************************************************************************/

+ 2 - 2
thirdparty/freetype/include/freetype/ftwinfnt.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType API for accessing Windows fnt-specific data.                */
 /*    FreeType API for accessing Windows fnt-specific data.                */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2003-2017 by                                                 */
+/*  Copyright 2003-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -78,7 +78,7 @@ FT_BEGIN_HEADER
    *     Mac Roman encoding.
    *     Mac Roman encoding.
    *
    *
    *   FT_WinFNT_ID_OEM ::
    *   FT_WinFNT_ID_OEM ::
-   *     From Michael Pöttgen <[email protected]>:
+   *     From Michael Poettgen <[email protected]>:
    *
    *
    *       The `Windows Font Mapping' article says that FT_WinFNT_ID_OEM
    *       The `Windows Font Mapping' article says that FT_WinFNT_ID_OEM
    *       is used for the charset of vector fonts, like `modern.fon',
    *       is used for the charset of vector fonts, like `modern.fon',

+ 1 - 1
thirdparty/freetype/include/freetype/internal/autohint.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    High-level `autohint' module-specific interface (specification).     */
 /*    High-level `autohint' module-specific interface (specification).     */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2017 by                                                 */
+/*  Copyright 1996-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */

+ 108 - 0
thirdparty/freetype/include/freetype/internal/cffotypes.h

@@ -0,0 +1,108 @@
+/***************************************************************************/
+/*                                                                         */
+/*  cffotypes.h                                                            */
+/*                                                                         */
+/*    Basic OpenType/CFF object type definitions (specification).          */
+/*                                                                         */
+/*  Copyright 2017-2018 by                                                 */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+#ifndef CFFOTYPES_H_
+#define CFFOTYPES_H_
+
+#include <ft2build.h>
+#include FT_INTERNAL_OBJECTS_H
+#include FT_INTERNAL_CFF_TYPES_H
+#include FT_INTERNAL_TRUETYPE_TYPES_H
+#include FT_SERVICE_POSTSCRIPT_CMAPS_H
+#include FT_INTERNAL_POSTSCRIPT_HINTS_H
+
+
+FT_BEGIN_HEADER
+
+
+  typedef TT_Face  CFF_Face;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    CFF_Size                                                           */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A handle to an OpenType size object.                               */
+  /*                                                                       */
+  typedef struct  CFF_SizeRec_
+  {
+    FT_SizeRec  root;
+    FT_ULong    strike_index;    /* 0xFFFFFFFF to indicate invalid */
+
+  } CFF_SizeRec, *CFF_Size;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    CFF_GlyphSlot                                                      */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A handle to an OpenType glyph slot object.                         */
+  /*                                                                       */
+  typedef struct  CFF_GlyphSlotRec_
+  {
+    FT_GlyphSlotRec  root;
+
+    FT_Bool  hint;
+    FT_Bool  scaled;
+
+    FT_Fixed  x_scale;
+    FT_Fixed  y_scale;
+
+  } CFF_GlyphSlotRec, *CFF_GlyphSlot;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    CFF_Internal                                                       */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    The interface to the `internal' field of `FT_Size'.                */
+  /*                                                                       */
+  typedef struct  CFF_InternalRec_
+  {
+    PSH_Globals  topfont;
+    PSH_Globals  subfonts[CFF_MAX_CID_FONTS];
+
+  } CFF_InternalRec, *CFF_Internal;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* Subglyph transformation record.                                       */
+  /*                                                                       */
+  typedef struct  CFF_Transform_
+  {
+    FT_Fixed    xx, xy;     /* transformation matrix coefficients */
+    FT_Fixed    yx, yy;
+    FT_F26Dot6  ox, oy;     /* offsets                            */
+
+  } CFF_Transform;
+
+
+FT_END_HEADER
+
+
+#endif /* CFFOTYPES_H_ */
+
+
+/* END */

+ 412 - 0
thirdparty/freetype/include/freetype/internal/cfftypes.h

@@ -0,0 +1,412 @@
+/***************************************************************************/
+/*                                                                         */
+/*  cfftypes.h                                                             */
+/*                                                                         */
+/*    Basic OpenType/CFF type definitions and interface (specification     */
+/*    only).                                                               */
+/*                                                                         */
+/*  Copyright 1996-2018 by                                                 */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+#ifndef CFFTYPES_H_
+#define CFFTYPES_H_
+
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+#include FT_TYPE1_TABLES_H
+#include FT_INTERNAL_SERVICE_H
+#include FT_SERVICE_POSTSCRIPT_CMAPS_H
+#include FT_INTERNAL_POSTSCRIPT_HINTS_H
+#include FT_INTERNAL_TYPE1_TYPES_H
+
+
+FT_BEGIN_HEADER
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    CFF_IndexRec                                                       */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure used to model a CFF Index table.                       */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    stream      :: The source input stream.                            */
+  /*                                                                       */
+  /*    start       :: The position of the first index byte in the         */
+  /*                   input stream.                                       */
+  /*                                                                       */
+  /*    count       :: The number of elements in the index.                */
+  /*                                                                       */
+  /*    off_size    :: The size in bytes of object offsets in index.       */
+  /*                                                                       */
+  /*    data_offset :: The position of first data byte in the index's      */
+  /*                   bytes.                                              */
+  /*                                                                       */
+  /*    data_size   :: The size of the data table in this index.           */
+  /*                                                                       */
+  /*    offsets     :: A table of element offsets in the index.  Must be   */
+  /*                   loaded explicitly.                                  */
+  /*                                                                       */
+  /*    bytes       :: If the index is loaded in memory, its bytes.        */
+  /*                                                                       */
+  typedef struct  CFF_IndexRec_
+  {
+    FT_Stream  stream;
+    FT_ULong   start;
+    FT_UInt    hdr_size;
+    FT_UInt    count;
+    FT_Byte    off_size;
+    FT_ULong   data_offset;
+    FT_ULong   data_size;
+
+    FT_ULong*  offsets;
+    FT_Byte*   bytes;
+
+  } CFF_IndexRec, *CFF_Index;
+
+
+  typedef struct  CFF_EncodingRec_
+  {
+    FT_UInt     format;
+    FT_ULong    offset;
+
+    FT_UInt     count;
+    FT_UShort   sids [256];  /* avoid dynamic allocations */
+    FT_UShort   codes[256];
+
+  } CFF_EncodingRec, *CFF_Encoding;
+
+
+  typedef struct  CFF_CharsetRec_
+  {
+
+    FT_UInt     format;
+    FT_ULong    offset;
+
+    FT_UShort*  sids;
+    FT_UShort*  cids;       /* the inverse mapping of `sids'; only needed */
+                            /* for CID-keyed fonts                        */
+    FT_UInt     max_cid;
+    FT_UInt     num_glyphs;
+
+  } CFF_CharsetRec, *CFF_Charset;
+
+
+  /* cf. similar fields in file `ttgxvar.h' from the `truetype' module */
+
+  typedef struct  CFF_VarData_
+  {
+#if 0
+    FT_UInt  itemCount;       /* not used; always zero */
+    FT_UInt  shortDeltaCount; /* not used; always zero */
+#endif
+
+    FT_UInt   regionIdxCount; /* number of region indexes           */
+    FT_UInt*  regionIndices;  /* array of `regionIdxCount' indices; */
+                              /* these index `varRegionList'        */
+  } CFF_VarData;
+
+
+  /* contribution of one axis to a region */
+  typedef struct  CFF_AxisCoords_
+  {
+    FT_Fixed  startCoord;
+    FT_Fixed  peakCoord;      /* zero peak means no effect (factor = 1) */
+    FT_Fixed  endCoord;
+
+  } CFF_AxisCoords;
+
+
+  typedef struct  CFF_VarRegion_
+  {
+    CFF_AxisCoords*  axisList;      /* array of axisCount records */
+
+  } CFF_VarRegion;
+
+
+  typedef struct  CFF_VStoreRec_
+  {
+    FT_UInt         dataCount;
+    CFF_VarData*    varData;        /* array of dataCount records      */
+                                    /* vsindex indexes this array      */
+    FT_UShort       axisCount;
+    FT_UInt         regionCount;    /* total number of regions defined */
+    CFF_VarRegion*  varRegionList;
+
+  } CFF_VStoreRec, *CFF_VStore;
+
+
+  /* forward reference */
+  typedef struct CFF_FontRec_*  CFF_Font;
+
+
+  /* This object manages one cached blend vector.                  */
+  /*                                                               */
+  /* There is a BlendRec for Private DICT parsing in each subfont  */
+  /* and a BlendRec for charstrings in CF2_Font instance data.     */
+  /* A cached BV may be used across DICTs or Charstrings if inputs */
+  /* have not changed.                                             */
+  /*                                                               */
+  /* `usedBV' is reset at the start of each parse or charstring.   */
+  /* vsindex cannot be changed after a BV is used.                 */
+  /*                                                               */
+  /* Note: NDV is long (32/64 bit), while BV is 16.16 (FT_Int32).  */
+  typedef struct  CFF_BlendRec_
+  {
+    FT_Bool    builtBV;        /* blendV has been built           */
+    FT_Bool    usedBV;         /* blendV has been used            */
+    CFF_Font   font;           /* top level font struct           */
+    FT_UInt    lastVsindex;    /* last vsindex used               */
+    FT_UInt    lenNDV;         /* normDV length (aka numAxes)     */
+    FT_Fixed*  lastNDV;        /* last NDV used                   */
+    FT_UInt    lenBV;          /* BlendV length (aka numMasters)  */
+    FT_Int32*  BV;             /* current blendV (per DICT/glyph) */
+
+  } CFF_BlendRec, *CFF_Blend;
+
+
+  typedef struct  CFF_FontRecDictRec_
+  {
+    FT_UInt    version;
+    FT_UInt    notice;
+    FT_UInt    copyright;
+    FT_UInt    full_name;
+    FT_UInt    family_name;
+    FT_UInt    weight;
+    FT_Bool    is_fixed_pitch;
+    FT_Fixed   italic_angle;
+    FT_Fixed   underline_position;
+    FT_Fixed   underline_thickness;
+    FT_Int     paint_type;
+    FT_Int     charstring_type;
+    FT_Matrix  font_matrix;
+    FT_Bool    has_font_matrix;
+    FT_ULong   units_per_em;  /* temporarily used as scaling value also */
+    FT_Vector  font_offset;
+    FT_ULong   unique_id;
+    FT_BBox    font_bbox;
+    FT_Pos     stroke_width;
+    FT_ULong   charset_offset;
+    FT_ULong   encoding_offset;
+    FT_ULong   charstrings_offset;
+    FT_ULong   private_offset;
+    FT_ULong   private_size;
+    FT_Long    synthetic_base;
+    FT_UInt    embedded_postscript;
+
+    /* these should only be used for the top-level font dictionary */
+    FT_UInt    cid_registry;
+    FT_UInt    cid_ordering;
+    FT_Long    cid_supplement;
+
+    FT_Long    cid_font_version;
+    FT_Long    cid_font_revision;
+    FT_Long    cid_font_type;
+    FT_ULong   cid_count;
+    FT_ULong   cid_uid_base;
+    FT_ULong   cid_fd_array_offset;
+    FT_ULong   cid_fd_select_offset;
+    FT_UInt    cid_font_name;
+
+    /* the next fields come from the data of the deprecated          */
+    /* `MultipleMaster' operator; they are needed to parse the (also */
+    /* deprecated) `blend' operator in Type 2 charstrings            */
+    FT_UShort  num_designs;
+    FT_UShort  num_axes;
+
+    /* fields for CFF2 */
+    FT_ULong   vstore_offset;
+    FT_UInt    maxstack;
+
+  } CFF_FontRecDictRec, *CFF_FontRecDict;
+
+
+  /* forward reference */
+  typedef struct CFF_SubFontRec_*  CFF_SubFont;
+
+
+  typedef struct  CFF_PrivateRec_
+  {
+    FT_Byte   num_blue_values;
+    FT_Byte   num_other_blues;
+    FT_Byte   num_family_blues;
+    FT_Byte   num_family_other_blues;
+
+    FT_Pos    blue_values[14];
+    FT_Pos    other_blues[10];
+    FT_Pos    family_blues[14];
+    FT_Pos    family_other_blues[10];
+
+    FT_Fixed  blue_scale;
+    FT_Pos    blue_shift;
+    FT_Pos    blue_fuzz;
+    FT_Pos    standard_width;
+    FT_Pos    standard_height;
+
+    FT_Byte   num_snap_widths;
+    FT_Byte   num_snap_heights;
+    FT_Pos    snap_widths[13];
+    FT_Pos    snap_heights[13];
+    FT_Bool   force_bold;
+    FT_Fixed  force_bold_threshold;
+    FT_Int    lenIV;
+    FT_Int    language_group;
+    FT_Fixed  expansion_factor;
+    FT_Long   initial_random_seed;
+    FT_ULong  local_subrs_offset;
+    FT_Pos    default_width;
+    FT_Pos    nominal_width;
+
+    /* fields for CFF2 */
+    FT_UInt      vsindex;
+    CFF_SubFont  subfont;
+
+  } CFF_PrivateRec, *CFF_Private;
+
+
+  typedef struct  CFF_FDSelectRec_
+  {
+    FT_Byte   format;
+    FT_UInt   range_count;
+
+    /* that's the table, taken from the file `as is' */
+    FT_Byte*  data;
+    FT_UInt   data_size;
+
+    /* small cache for format 3 only */
+    FT_UInt   cache_first;
+    FT_UInt   cache_count;
+    FT_Byte   cache_fd;
+
+  } CFF_FDSelectRec, *CFF_FDSelect;
+
+
+  /* A SubFont packs a font dict and a private dict together.  They are */
+  /* needed to support CID-keyed CFF fonts.                             */
+  typedef struct  CFF_SubFontRec_
+  {
+    CFF_FontRecDictRec  font_dict;
+    CFF_PrivateRec      private_dict;
+
+    /* fields for CFF2 */
+    CFF_BlendRec  blend;      /* current blend vector       */
+    FT_UInt       lenNDV;     /* current length NDV or zero */
+    FT_Fixed*     NDV;        /* ptr to current NDV or NULL */
+
+    /* `blend_stack' is a writable buffer to hold blend results.          */
+    /* This buffer is to the side of the normal cff parser stack;         */
+    /* `cff_parse_blend' and `cff_blend_doBlend' push blend results here. */
+    /* The normal stack then points to these values instead of the DICT   */
+    /* because all other operators in Private DICT clear the stack.       */
+    /* `blend_stack' could be cleared at each operator other than blend.  */
+    /* Blended values are stored as 5-byte fixed point values.            */
+
+    FT_Byte*  blend_stack;    /* base of stack allocation     */
+    FT_Byte*  blend_top;      /* first empty slot             */
+    FT_UInt   blend_used;     /* number of bytes in use       */
+    FT_UInt   blend_alloc;    /* number of bytes allocated    */
+
+    CFF_IndexRec  local_subrs_index;
+    FT_Byte**     local_subrs; /* array of pointers           */
+                               /* into Local Subrs INDEX data */
+
+    FT_UInt32  random;
+
+  } CFF_SubFontRec;
+
+
+#define CFF_MAX_CID_FONTS  256
+
+
+  typedef struct  CFF_FontRec_
+  {
+    FT_Library       library;
+    FT_Stream        stream;
+    FT_Memory        memory;        /* TODO: take this from stream->memory? */
+    FT_ULong         base_offset;   /* offset to start of CFF */
+    FT_UInt          num_faces;
+    FT_UInt          num_glyphs;
+
+    FT_Byte          version_major;
+    FT_Byte          version_minor;
+    FT_Byte          header_size;
+
+    FT_UInt          top_dict_length;   /* cff2 only */
+
+    FT_Bool          cff2;
+
+    CFF_IndexRec     name_index;
+    CFF_IndexRec     top_dict_index;
+    CFF_IndexRec     global_subrs_index;
+
+    CFF_EncodingRec  encoding;
+    CFF_CharsetRec   charset;
+
+    CFF_IndexRec     charstrings_index;
+    CFF_IndexRec     font_dict_index;
+    CFF_IndexRec     private_index;
+    CFF_IndexRec     local_subrs_index;
+
+    FT_String*       font_name;
+
+    /* array of pointers into Global Subrs INDEX data */
+    FT_Byte**        global_subrs;
+
+    /* array of pointers into String INDEX data stored at string_pool */
+    FT_UInt          num_strings;
+    FT_Byte**        strings;
+    FT_Byte*         string_pool;
+    FT_ULong         string_pool_size;
+
+    CFF_SubFontRec   top_font;
+    FT_UInt          num_subfonts;
+    CFF_SubFont      subfonts[CFF_MAX_CID_FONTS];
+
+    CFF_FDSelectRec  fd_select;
+
+    /* interface to PostScript hinter */
+    PSHinter_Service  pshinter;
+
+    /* interface to Postscript Names service */
+    FT_Service_PsCMaps  psnames;
+
+    /* interface to CFFLoad service */
+    const void*  cffload;
+
+    /* since version 2.3.0 */
+    PS_FontInfoRec*  font_info;   /* font info dictionary */
+
+    /* since version 2.3.6 */
+    FT_String*       registry;
+    FT_String*       ordering;
+
+    /* since version 2.4.12 */
+    FT_Generic       cf2_instance;
+
+    /* since version 2.7.1 */
+    CFF_VStoreRec    vstore;        /* parsed vstore structure */
+
+    /* since version 2.9 */
+    PS_FontExtraRec*  font_extra;
+
+  } CFF_FontRec;
+
+
+FT_END_HEADER
+
+#endif /* CFFTYPES_H_ */
+
+
+/* END */

+ 1 - 1
thirdparty/freetype/include/freetype/internal/ftcalc.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    Arithmetic computations (specification).                             */
 /*    Arithmetic computations (specification).                             */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2017 by                                                 */
+/*  Copyright 1996-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */

+ 1 - 1
thirdparty/freetype/include/freetype/internal/ftdebug.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    Debugging and logging component (specification).                     */
 /*    Debugging and logging component (specification).                     */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2017 by                                                 */
+/*  Copyright 1996-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */

+ 400 - 0
thirdparty/freetype/include/freetype/internal/ftdrv.h

@@ -0,0 +1,400 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftdrv.h                                                                */
+/*                                                                         */
+/*    FreeType internal font driver interface (specification).             */
+/*                                                                         */
+/*  Copyright 1996-2018 by                                                 */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+#ifndef FTDRV_H_
+#define FTDRV_H_
+
+
+#include <ft2build.h>
+#include FT_MODULE_H
+
+
+FT_BEGIN_HEADER
+
+
+  typedef FT_Error
+  (*FT_Face_InitFunc)( FT_Stream      stream,
+                       FT_Face        face,
+                       FT_Int         typeface_index,
+                       FT_Int         num_params,
+                       FT_Parameter*  parameters );
+
+  typedef void
+  (*FT_Face_DoneFunc)( FT_Face  face );
+
+
+  typedef FT_Error
+  (*FT_Size_InitFunc)( FT_Size  size );
+
+  typedef void
+  (*FT_Size_DoneFunc)( FT_Size  size );
+
+
+  typedef FT_Error
+  (*FT_Slot_InitFunc)( FT_GlyphSlot  slot );
+
+  typedef void
+  (*FT_Slot_DoneFunc)( FT_GlyphSlot  slot );
+
+
+  typedef FT_Error
+  (*FT_Size_RequestFunc)( FT_Size          size,
+                          FT_Size_Request  req );
+
+  typedef FT_Error
+  (*FT_Size_SelectFunc)( FT_Size   size,
+                         FT_ULong  size_index );
+
+  typedef FT_Error
+  (*FT_Slot_LoadFunc)( FT_GlyphSlot  slot,
+                       FT_Size       size,
+                       FT_UInt       glyph_index,
+                       FT_Int32      load_flags );
+
+
+  typedef FT_Error
+  (*FT_Face_GetKerningFunc)( FT_Face     face,
+                             FT_UInt     left_glyph,
+                             FT_UInt     right_glyph,
+                             FT_Vector*  kerning );
+
+
+  typedef FT_Error
+  (*FT_Face_AttachFunc)( FT_Face    face,
+                         FT_Stream  stream );
+
+
+  typedef FT_Error
+  (*FT_Face_GetAdvancesFunc)( FT_Face    face,
+                              FT_UInt    first,
+                              FT_UInt    count,
+                              FT_Int32   flags,
+                              FT_Fixed*  advances );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_Driver_ClassRec                                                 */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    The font driver class.  This structure mostly contains pointers to */
+  /*    driver methods.                                                    */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    root             :: The parent module.                             */
+  /*                                                                       */
+  /*    face_object_size :: The size of a face object in bytes.            */
+  /*                                                                       */
+  /*    size_object_size :: The size of a size object in bytes.            */
+  /*                                                                       */
+  /*    slot_object_size :: The size of a glyph object in bytes.           */
+  /*                                                                       */
+  /*    init_face        :: The format-specific face constructor.          */
+  /*                                                                       */
+  /*    done_face        :: The format-specific face destructor.           */
+  /*                                                                       */
+  /*    init_size        :: The format-specific size constructor.          */
+  /*                                                                       */
+  /*    done_size        :: The format-specific size destructor.           */
+  /*                                                                       */
+  /*    init_slot        :: The format-specific slot constructor.          */
+  /*                                                                       */
+  /*    done_slot        :: The format-specific slot destructor.           */
+  /*                                                                       */
+  /*                                                                       */
+  /*    load_glyph       :: A function handle to load a glyph to a slot.   */
+  /*                        This field is mandatory!                       */
+  /*                                                                       */
+  /*    get_kerning      :: A function handle to return the unscaled       */
+  /*                        kerning for a given pair of glyphs.  Can be    */
+  /*                        set to 0 if the format doesn't support         */
+  /*                        kerning.                                       */
+  /*                                                                       */
+  /*    attach_file      :: This function handle is used to read           */
+  /*                        additional data for a face from another        */
+  /*                        file/stream.  For example, this can be used to */
+  /*                        add data from AFM or PFM files on a Type 1     */
+  /*                        face, or a CIDMap on a CID-keyed face.         */
+  /*                                                                       */
+  /*    get_advances     :: A function handle used to return advance       */
+  /*                        widths of `count' glyphs (in font units),      */
+  /*                        starting at `first'.  The `vertical' flag must */
+  /*                        be set to get vertical advance heights.  The   */
+  /*                        `advances' buffer is caller-allocated.         */
+  /*                        The idea of this function is to be able to     */
+  /*                        perform device-independent text layout without */
+  /*                        loading a single glyph image.                  */
+  /*                                                                       */
+  /*    request_size     :: A handle to a function used to request the new */
+  /*                        character size.  Can be set to 0 if the        */
+  /*                        scaling done in the base layer suffices.       */
+  /*                                                                       */
+  /*    select_size      :: A handle to a function used to select a new    */
+  /*                        fixed size.  It is used only if                */
+  /*                        @FT_FACE_FLAG_FIXED_SIZES is set.  Can be set  */
+  /*                        to 0 if the scaling done in the base layer     */
+  /*                        suffices.                                      */
+  /* <Note>                                                                */
+  /*    Most function pointers, with the exception of `load_glyph', can be */
+  /*    set to 0 to indicate a default behaviour.                          */
+  /*                                                                       */
+  typedef struct  FT_Driver_ClassRec_
+  {
+    FT_Module_Class          root;
+
+    FT_Long                  face_object_size;
+    FT_Long                  size_object_size;
+    FT_Long                  slot_object_size;
+
+    FT_Face_InitFunc         init_face;
+    FT_Face_DoneFunc         done_face;
+
+    FT_Size_InitFunc         init_size;
+    FT_Size_DoneFunc         done_size;
+
+    FT_Slot_InitFunc         init_slot;
+    FT_Slot_DoneFunc         done_slot;
+
+    FT_Slot_LoadFunc         load_glyph;
+
+    FT_Face_GetKerningFunc   get_kerning;
+    FT_Face_AttachFunc       attach_file;
+    FT_Face_GetAdvancesFunc  get_advances;
+
+    /* since version 2.2 */
+    FT_Size_RequestFunc      request_size;
+    FT_Size_SelectFunc       select_size;
+
+  } FT_Driver_ClassRec, *FT_Driver_Class;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Macro>                                                               */
+  /*    FT_DECLARE_DRIVER                                                  */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Used to create a forward declaration of an FT_Driver_ClassRec      */
+  /*    struct instance.                                                   */
+  /*                                                                       */
+  /* <Macro>                                                               */
+  /*    FT_DEFINE_DRIVER                                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Used to initialize an instance of FT_Driver_ClassRec struct.       */
+  /*                                                                       */
+  /*    When FT_CONFIG_OPTION_PIC is defined a `create' function has to be */
+  /*    called with a pointer where the allocated structure is returned.   */
+  /*    And when it is no longer needed a `destroy' function needs to be   */
+  /*    called to release that allocation.                                 */
+  /*                                                                       */
+  /*    `ftinit.c' (ft_create_default_module_classes) already contains a   */
+  /*    mechanism to call these functions for the default modules          */
+  /*    described in `ftmodule.h'.                                         */
+  /*                                                                       */
+  /*    Notice that the created `create' and `destroy' functions call      */
+  /*    `pic_init' and `pic_free' to allow you to manually allocate and    */
+  /*    initialize any additional global data, like a module specific      */
+  /*    interface, and put them in the global pic container defined in     */
+  /*    `ftpic.h'.  If you don't need them just implement the functions as */
+  /*    empty to resolve the link error.  Also the `pic_init' and          */
+  /*    `pic_free' functions should be declared in `pic.h', to be referred */
+  /*    by driver definition calling `FT_DEFINE_DRIVER' in following.      */
+  /*                                                                       */
+  /*    When FT_CONFIG_OPTION_PIC is not defined the struct will be        */
+  /*    allocated in the global scope (or the scope where the macro is     */
+  /*    used).                                                             */
+  /*                                                                       */
+#ifndef FT_CONFIG_OPTION_PIC
+
+#define FT_DECLARE_DRIVER( class_ )  \
+  FT_CALLBACK_TABLE                  \
+  const FT_Driver_ClassRec  class_;
+
+#define FT_DEFINE_DRIVER(                    \
+          class_,                            \
+          flags_,                            \
+          size_,                             \
+          name_,                             \
+          version_,                          \
+          requires_,                         \
+          interface_,                        \
+          init_,                             \
+          done_,                             \
+          get_interface_,                    \
+          face_object_size_,                 \
+          size_object_size_,                 \
+          slot_object_size_,                 \
+          init_face_,                        \
+          done_face_,                        \
+          init_size_,                        \
+          done_size_,                        \
+          init_slot_,                        \
+          done_slot_,                        \
+          load_glyph_,                       \
+          get_kerning_,                      \
+          attach_file_,                      \
+          get_advances_,                     \
+          request_size_,                     \
+          select_size_ )                     \
+  FT_CALLBACK_TABLE_DEF                      \
+  const FT_Driver_ClassRec  class_ =         \
+  {                                          \
+    FT_DEFINE_ROOT_MODULE( flags_,           \
+                           size_,            \
+                           name_,            \
+                           version_,         \
+                           requires_,        \
+                           interface_,       \
+                           init_,            \
+                           done_,            \
+                           get_interface_ )  \
+                                             \
+    face_object_size_,                       \
+    size_object_size_,                       \
+    slot_object_size_,                       \
+                                             \
+    init_face_,                              \
+    done_face_,                              \
+                                             \
+    init_size_,                              \
+    done_size_,                              \
+                                             \
+    init_slot_,                              \
+    done_slot_,                              \
+                                             \
+    load_glyph_,                             \
+                                             \
+    get_kerning_,                            \
+    attach_file_,                            \
+    get_advances_,                           \
+                                             \
+    request_size_,                           \
+    select_size_                             \
+  };
+
+#else /* FT_CONFIG_OPTION_PIC */
+
+#define FT_DECLARE_DRIVER( class_ )  FT_DECLARE_MODULE( class_ )
+
+#define FT_DEFINE_DRIVER(                                        \
+          class_,                                                \
+          flags_,                                                \
+          size_,                                                 \
+          name_,                                                 \
+          version_,                                              \
+          requires_,                                             \
+          interface_,                                            \
+          init_,                                                 \
+          done_,                                                 \
+          get_interface_,                                        \
+          face_object_size_,                                     \
+          size_object_size_,                                     \
+          slot_object_size_,                                     \
+          init_face_,                                            \
+          done_face_,                                            \
+          init_size_,                                            \
+          done_size_,                                            \
+          init_slot_,                                            \
+          done_slot_,                                            \
+          load_glyph_,                                           \
+          get_kerning_,                                          \
+          attach_file_,                                          \
+          get_advances_,                                         \
+          request_size_,                                         \
+          select_size_ )                                         \
+  void                                                           \
+  FT_Destroy_Class_ ## class_( FT_Library        library,        \
+                               FT_Module_Class*  clazz )         \
+  {                                                              \
+    FT_Memory        memory = library->memory;                   \
+    FT_Driver_Class  dclazz = (FT_Driver_Class)clazz;            \
+                                                                 \
+                                                                 \
+    class_ ## _pic_free( library );                              \
+    if ( dclazz )                                                \
+      FT_FREE( dclazz );                                         \
+  }                                                              \
+                                                                 \
+                                                                 \
+  FT_Error                                                       \
+  FT_Create_Class_ ## class_( FT_Library         library,        \
+                              FT_Module_Class**  output_class )  \
+  {                                                              \
+    FT_Driver_Class  clazz  = NULL;                              \
+    FT_Error         error;                                      \
+    FT_Memory        memory = library->memory;                   \
+                                                                 \
+                                                                 \
+    if ( FT_ALLOC( clazz, sizeof ( *clazz ) ) )                  \
+      return error;                                              \
+                                                                 \
+    error = class_ ## _pic_init( library );                      \
+    if ( error )                                                 \
+    {                                                            \
+      FT_FREE( clazz );                                          \
+      return error;                                              \
+    }                                                            \
+                                                                 \
+    FT_DEFINE_ROOT_MODULE( flags_,                               \
+                           size_,                                \
+                           name_,                                \
+                           version_,                             \
+                           requires_,                            \
+                           interface_,                           \
+                           init_,                                \
+                           done_,                                \
+                           get_interface_ )                      \
+                                                                 \
+    clazz->face_object_size = face_object_size_;                 \
+    clazz->size_object_size = size_object_size_;                 \
+    clazz->slot_object_size = slot_object_size_;                 \
+                                                                 \
+    clazz->init_face        = init_face_;                        \
+    clazz->done_face        = done_face_;                        \
+                                                                 \
+    clazz->init_size        = init_size_;                        \
+    clazz->done_size        = done_size_;                        \
+                                                                 \
+    clazz->init_slot        = init_slot_;                        \
+    clazz->done_slot        = done_slot_;                        \
+                                                                 \
+    clazz->load_glyph       = load_glyph_;                       \
+                                                                 \
+    clazz->get_kerning      = get_kerning_;                      \
+    clazz->attach_file      = attach_file_;                      \
+    clazz->get_advances     = get_advances_;                     \
+                                                                 \
+    clazz->request_size     = request_size_;                     \
+    clazz->select_size      = select_size_;                      \
+                                                                 \
+    *output_class = (FT_Module_Class*)clazz;                     \
+                                                                 \
+    return FT_Err_Ok;                                            \
+  }
+
+
+#endif /* FT_CONFIG_OPTION_PIC */
+
+FT_END_HEADER
+
+#endif /* FTDRV_H_ */
+
+
+/* END */

+ 1 - 1
thirdparty/freetype/include/freetype/internal/ftgloadr.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    The FreeType glyph loader (specification).                           */
 /*    The FreeType glyph loader (specification).                           */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2002-2017 by                                                 */
+/*  Copyright 2002-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg                       */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg                       */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */

+ 2 - 2
thirdparty/freetype/include/freetype/internal/ftmemory.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    The FreeType memory management macros (specification).               */
 /*    The FreeType memory management macros (specification).               */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2017 by                                                 */
+/*  Copyright 1996-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg                       */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg                       */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -210,7 +210,7 @@ extern "C++"
                                                   NULL,                 \
                                                   NULL,                 \
                                                   &error ) )
                                                   &error ) )
 
 
-#define FT_MEM_QREALLOC_MULT( ptr, oldcnt, newcnt, itmsz)            \
+#define FT_MEM_QREALLOC_MULT( ptr, oldcnt, newcnt, itmsz )           \
           FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory,            \
           FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory,            \
                                                   (FT_Long)(itmsz),  \
                                                   (FT_Long)(itmsz),  \
                                                   (FT_Long)(oldcnt), \
                                                   (FT_Long)(oldcnt), \

+ 50 - 35
thirdparty/freetype/include/freetype/internal/ftobjs.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    The FreeType private base classes (specification).                   */
 /*    The FreeType private base classes (specification).                   */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2017 by                                                 */
+/*  Copyright 1996-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -85,9 +85,9 @@ FT_BEGIN_HEADER
                   : y + ( 3 * x >> 3 ) )
                   : y + ( 3 * x >> 3 ) )
 
 
   /* we use FT_TYPEOF to suppress signedness compilation warnings */
   /* we use FT_TYPEOF to suppress signedness compilation warnings */
-#define FT_PAD_FLOOR( x, n )  ( (x) & ~FT_TYPEOF( x )( (n)-1 ) )
-#define FT_PAD_ROUND( x, n )  FT_PAD_FLOOR( (x) + (n)/2, n )
-#define FT_PAD_CEIL( x, n )   FT_PAD_FLOOR( (x) + (n)-1, n )
+#define FT_PAD_FLOOR( x, n )  ( (x) & ~FT_TYPEOF( x )( (n) - 1 ) )
+#define FT_PAD_ROUND( x, n )  FT_PAD_FLOOR( (x) + (n) / 2, n )
+#define FT_PAD_CEIL( x, n )   FT_PAD_FLOOR( (x) + (n) - 1, n )
 
 
 #define FT_PIX_FLOOR( x )     ( (x) & ~FT_TYPEOF( x )63 )
 #define FT_PIX_FLOOR( x )     ( (x) & ~FT_TYPEOF( x )63 )
 #define FT_PIX_ROUND( x )     FT_PIX_FLOOR( (x) + 32 )
 #define FT_PIX_ROUND( x )     FT_PIX_FLOOR( (x) + 32 )
@@ -155,8 +155,8 @@ FT_BEGIN_HEADER
 
 
   } FT_CMapRec;
   } FT_CMapRec;
 
 
-  /* typecase any pointer to a charmap handle */
-#define FT_CMAP( x )              ((FT_CMap)( x ))
+  /* typecast any pointer to a charmap handle */
+#define FT_CMAP( x )  ( (FT_CMap)( x ) )
 
 
   /* obvious macros */
   /* obvious macros */
 #define FT_CMAP_PLATFORM_ID( x )  FT_CMAP( x )->charmap.platform_id
 #define FT_CMAP_PLATFORM_ID( x )  FT_CMAP( x )->charmap.platform_id
@@ -312,6 +312,27 @@ FT_BEGIN_HEADER
   FT_CMap_Done( FT_CMap  cmap );
   FT_CMap_Done( FT_CMap  cmap );
 
 
 
 
+  /* adds LCD padding to Min and Max boundaries */
+  FT_BASE( void )
+  ft_lcd_padding( FT_Pos*       Min,
+                  FT_Pos*       Max,
+                  FT_GlyphSlot  slot );
+
+#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
+
+  typedef void  (*FT_Bitmap_LcdFilterFunc)( FT_Bitmap*      bitmap,
+                                            FT_Render_Mode  render_mode,
+                                            FT_Byte*        weights );
+
+
+  /* This is the default LCD filter, an in-place, 5-tap FIR filter. */
+  FT_BASE( void )
+  ft_lcd_filter_fir( FT_Bitmap*           bitmap,
+                     FT_Render_Mode       mode,
+                     FT_LcdFiveTapFilter  weights );
+
+#endif /* FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
+
   /*************************************************************************/
   /*************************************************************************/
   /*                                                                       */
   /*                                                                       */
   /* <Struct>                                                              */
   /* <Struct>                                                              */
@@ -369,9 +390,10 @@ FT_BEGIN_HEADER
   /*      operator.  Value~0 means to use the font's value.  Value~-1      */
   /*      operator.  Value~0 means to use the font's value.  Value~-1      */
   /*      means to use the CFF driver's default.                           */
   /*      means to use the CFF driver's default.                           */
   /*                                                                       */
   /*                                                                       */
-  /*    lcd_weights ::                                                     */
-  /*      Overrides the library default with custom weights for the 5-tap  */
-  /*      FIR filter.  `{0, 0, 0, 0, 0}' means to use the library default. */
+  /*    lcd_weights      ::                                                */
+  /*    lcd_filter_func  ::                                                */
+  /*      If subpixel rendering is activated, the LCD filtering weights    */
+  /*      and callback function.                                           */
   /*                                                                       */
   /*                                                                       */
   /*    refcount ::                                                        */
   /*    refcount ::                                                        */
   /*      A counter initialized to~1 at the time an @FT_Face structure is  */
   /*      A counter initialized to~1 at the time an @FT_Face structure is  */
@@ -393,8 +415,10 @@ FT_BEGIN_HEADER
 
 
     FT_Char              no_stem_darkening;
     FT_Char              no_stem_darkening;
     FT_Int32             random_seed;
     FT_Int32             random_seed;
+
 #ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
 #ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
-    FT_LcdFiveTapFilter  lcd_weights;  /* preset or custom filter weights */
+    FT_LcdFiveTapFilter      lcd_weights;      /* filter weights, if any */
+    FT_Bitmap_LcdFilterFunc  lcd_filter_func;  /* filtering callback     */
 #endif
 #endif
 
 
     FT_Int  refcount;
     FT_Int  refcount;
@@ -516,7 +540,8 @@ FT_BEGIN_HEADER
 
 
 
 
   /* typecast an object to an FT_Module */
   /* typecast an object to an FT_Module */
-#define FT_MODULE( x )          ((FT_Module)( x ))
+#define FT_MODULE( x )  ( (FT_Module)(x) )
+
 #define FT_MODULE_CLASS( x )    FT_MODULE( x )->clazz
 #define FT_MODULE_CLASS( x )    FT_MODULE( x )->clazz
 #define FT_MODULE_LIBRARY( x )  FT_MODULE( x )->library
 #define FT_MODULE_LIBRARY( x )  FT_MODULE( x )->library
 #define FT_MODULE_MEMORY( x )   FT_MODULE( x )->memory
 #define FT_MODULE_MEMORY( x )   FT_MODULE( x )->memory
@@ -602,9 +627,9 @@ FT_BEGIN_HEADER
 
 
   /* a few macros used to perform easy typecasts with minimal brain damage */
   /* a few macros used to perform easy typecasts with minimal brain damage */
 
 
-#define FT_FACE( x )          ((FT_Face)(x))
-#define FT_SIZE( x )          ((FT_Size)(x))
-#define FT_SLOT( x )          ((FT_GlyphSlot)(x))
+#define FT_FACE( x )          ( (FT_Face)(x) )
+#define FT_SIZE( x )          ( (FT_Size)(x) )
+#define FT_SLOT( x )          ( (FT_GlyphSlot)(x) )
 
 
 #define FT_FACE_DRIVER( x )   FT_FACE( x )->driver
 #define FT_FACE_DRIVER( x )   FT_FACE( x )->driver
 #define FT_FACE_LIBRARY( x )  FT_FACE_DRIVER( x )->root.library
 #define FT_FACE_LIBRARY( x )  FT_FACE_DRIVER( x )->root.library
@@ -705,6 +730,12 @@ FT_BEGIN_HEADER
   ft_glyphslot_free_bitmap( FT_GlyphSlot  slot );
   ft_glyphslot_free_bitmap( FT_GlyphSlot  slot );
 
 
 
 
+  /* Preset bitmap metrics of an outline glyphslot prior to rendering. */
+  FT_BASE( void )
+  ft_glyphslot_preset_bitmap( FT_GlyphSlot      slot,
+                              FT_Render_Mode    mode,
+                              const FT_Vector*  origin );
+
   /* Allocate a new bitmap buffer in a glyph slot. */
   /* Allocate a new bitmap buffer in a glyph slot. */
   FT_BASE( FT_Error )
   FT_BASE( FT_Error )
   ft_glyphslot_alloc_bitmap( FT_GlyphSlot  slot,
   ft_glyphslot_alloc_bitmap( FT_GlyphSlot  slot,
@@ -731,10 +762,10 @@ FT_BEGIN_HEADER
   /*************************************************************************/
   /*************************************************************************/
 
 
 
 
-#define FT_RENDERER( x )      ((FT_Renderer)( x ))
-#define FT_GLYPH( x )         ((FT_Glyph)( x ))
-#define FT_BITMAP_GLYPH( x )  ((FT_BitmapGlyph)( x ))
-#define FT_OUTLINE_GLYPH( x ) ((FT_OutlineGlyph)( x ))
+#define FT_RENDERER( x )       ( (FT_Renderer)(x) )
+#define FT_GLYPH( x )          ( (FT_Glyph)(x) )
+#define FT_BITMAP_GLYPH( x )   ( (FT_BitmapGlyph)(x) )
+#define FT_OUTLINE_GLYPH( x )  ( (FT_OutlineGlyph)(x) )
 
 
 
 
   typedef struct  FT_RendererRec_
   typedef struct  FT_RendererRec_
@@ -765,7 +796,7 @@ FT_BEGIN_HEADER
 
 
 
 
   /* typecast a module into a driver easily */
   /* typecast a module into a driver easily */
-#define FT_DRIVER( x )        ((FT_Driver)(x))
+#define FT_DRIVER( x )  ( (FT_Driver)(x) )
 
 
   /* typecast a module as a driver, and get its driver class */
   /* typecast a module as a driver, and get its driver class */
 #define FT_DRIVER_CLASS( x )  FT_DRIVER( x )->clazz
 #define FT_DRIVER_CLASS( x )  FT_DRIVER( x )->clazz
@@ -821,18 +852,6 @@ FT_BEGIN_HEADER
 #define FT_DEBUG_HOOK_TRUETYPE  0
 #define FT_DEBUG_HOOK_TRUETYPE  0
 
 
 
 
-  typedef void  (*FT_Bitmap_LcdFilterFunc)( FT_Bitmap*      bitmap,
-                                            FT_Render_Mode  render_mode,
-                                            FT_Byte*        weights );
-
-
-  /* This is the default LCD filter, an in-place, 5-tap FIR filter. */
-  FT_BASE( void )
-  ft_lcd_filter_fir( FT_Bitmap*           bitmap,
-                     FT_Render_Mode       mode,
-                     FT_LcdFiveTapFilter  weights );
-
-
   /*************************************************************************/
   /*************************************************************************/
   /*                                                                       */
   /*                                                                       */
   /* <Struct>                                                              */
   /* <Struct>                                                              */
@@ -878,9 +897,6 @@ FT_BEGIN_HEADER
   /*                        interpreter.  Currently, only the TrueType     */
   /*                        interpreter.  Currently, only the TrueType     */
   /*                        bytecode debugger uses this.                   */
   /*                        bytecode debugger uses this.                   */
   /*                                                                       */
   /*                                                                       */
-  /*    lcd_filter       :: If subpixel rendering is activated, the        */
-  /*                        selected LCD filter mode.                      */
-  /*                                                                       */
   /*    lcd_weights      :: If subpixel rendering is activated, the LCD    */
   /*    lcd_weights      :: If subpixel rendering is activated, the LCD    */
   /*                        filter weights, if any.                        */
   /*                        filter weights, if any.                        */
   /*                                                                       */
   /*                                                                       */
@@ -915,7 +931,6 @@ FT_BEGIN_HEADER
     FT_DebugHook_Func  debug_hooks[4];
     FT_DebugHook_Func  debug_hooks[4];
 
 
 #ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
 #ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
-    FT_LcdFilter             lcd_filter;
     FT_LcdFiveTapFilter      lcd_weights;      /* filter weights, if any */
     FT_LcdFiveTapFilter      lcd_weights;      /* filter weights, if any */
     FT_Bitmap_LcdFilterFunc  lcd_filter_func;  /* filtering callback     */
     FT_Bitmap_LcdFilterFunc  lcd_filter_func;  /* filtering callback     */
 #endif
 #endif

+ 1 - 1
thirdparty/freetype/include/freetype/internal/ftpic.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    The FreeType position independent code services (declaration).       */
 /*    The FreeType position independent code services (declaration).       */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2009-2017 by                                                 */
+/*  Copyright 2009-2018 by                                                 */
 /*  Oran Agra and Mickey Gabel.                                            */
 /*  Oran Agra and Mickey Gabel.                                            */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */

+ 48 - 0
thirdparty/freetype/include/freetype/internal/ftpsprop.h

@@ -0,0 +1,48 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftpsprop.h                                                             */
+/*                                                                         */
+/*    Get and set properties of PostScript drivers (specification).        */
+/*                                                                         */
+/*  Copyright 2017-2018 by                                                 */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+#ifndef FTPSPROP_H_
+#define FTPSPROP_H_
+
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+
+FT_BEGIN_HEADER
+
+
+  FT_BASE_CALLBACK( FT_Error )
+  ps_property_set( FT_Module    module,         /* PS_Driver */
+                   const char*  property_name,
+                   const void*  value,
+                   FT_Bool      value_is_string );
+
+  FT_BASE_CALLBACK( FT_Error )
+  ps_property_get( FT_Module    module,         /* PS_Driver */
+                   const char*  property_name,
+                   void*        value );
+
+
+FT_END_HEADER
+
+
+#endif /* FTPSPROP_H_ */
+
+
+/* END */

+ 1 - 1
thirdparty/freetype/include/freetype/internal/ftrfork.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    Embedded resource forks accessor (specification).                    */
 /*    Embedded resource forks accessor (specification).                    */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2004-2017 by                                                 */
+/*  Copyright 2004-2018 by                                                 */
 /*  Masatake YAMATO and Redhat K.K.                                        */
 /*  Masatake YAMATO and Redhat K.K.                                        */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */

+ 96 - 7
thirdparty/freetype/include/freetype/internal/ftserv.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    The FreeType services (specification only).                          */
 /*    The FreeType services (specification only).                          */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2003-2017 by                                                 */
+/*  Copyright 2003-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -330,6 +330,32 @@ FT_BEGIN_HEADER
     { NULL, NULL }                                                          \
     { NULL, NULL }                                                          \
   };
   };
 
 
+#define FT_DEFINE_SERVICEDESCREC10( class_,                                 \
+                                    serv_id_1, serv_data_1,                 \
+                                    serv_id_2, serv_data_2,                 \
+                                    serv_id_3, serv_data_3,                 \
+                                    serv_id_4, serv_data_4,                 \
+                                    serv_id_5, serv_data_5,                 \
+                                    serv_id_6, serv_data_6,                 \
+                                    serv_id_7, serv_data_7,                 \
+                                    serv_id_8, serv_data_8,                 \
+                                    serv_id_9, serv_data_9,                 \
+                                    serv_id_10, serv_data_10 )              \
+  static const FT_ServiceDescRec  class_[] =                                \
+  {                                                                         \
+    { serv_id_1, serv_data_1 },                                             \
+    { serv_id_2, serv_data_2 },                                             \
+    { serv_id_3, serv_data_3 },                                             \
+    { serv_id_4, serv_data_4 },                                             \
+    { serv_id_5, serv_data_5 },                                             \
+    { serv_id_6, serv_data_6 },                                             \
+    { serv_id_7, serv_data_7 },                                             \
+    { serv_id_8, serv_data_8 },                                             \
+    { serv_id_9, serv_data_9 },                                             \
+    { serv_id_10, serv_data_10 },                                           \
+    { NULL, NULL }                                                          \
+  };
+
 #else /* FT_CONFIG_OPTION_PIC */
 #else /* FT_CONFIG_OPTION_PIC */
 
 
 #define FT_DEFINE_SERVICEDESCREC1( class_,                                  \
 #define FT_DEFINE_SERVICEDESCREC1( class_,                                  \
@@ -557,7 +583,7 @@ FT_BEGIN_HEADER
                                                                             \
                                                                             \
   FT_Error                                                                  \
   FT_Error                                                                  \
   FT_Create_Class_ ## class_( FT_Library           library,                 \
   FT_Create_Class_ ## class_( FT_Library           library,                 \
-                              FT_ServiceDescRec**  output_class)            \
+                              FT_ServiceDescRec**  output_class )           \
   {                                                                         \
   {                                                                         \
     FT_ServiceDescRec*  clazz  = NULL;                                      \
     FT_ServiceDescRec*  clazz  = NULL;                                      \
     FT_Error            error;                                              \
     FT_Error            error;                                              \
@@ -608,7 +634,7 @@ FT_BEGIN_HEADER
                                                                             \
                                                                             \
   FT_Error                                                                  \
   FT_Error                                                                  \
   FT_Create_Class_ ## class_( FT_Library           library,                 \
   FT_Create_Class_ ## class_( FT_Library           library,                 \
-                              FT_ServiceDescRec**  output_class)            \
+                              FT_ServiceDescRec**  output_class )           \
   {                                                                         \
   {                                                                         \
     FT_ServiceDescRec*  clazz  = NULL;                                      \
     FT_ServiceDescRec*  clazz  = NULL;                                      \
     FT_Error            error;                                              \
     FT_Error            error;                                              \
@@ -662,7 +688,7 @@ FT_BEGIN_HEADER
                                                                             \
                                                                             \
   FT_Error                                                                  \
   FT_Error                                                                  \
   FT_Create_Class_ ## class_( FT_Library           library,                 \
   FT_Create_Class_ ## class_( FT_Library           library,                 \
-                              FT_ServiceDescRec**  output_class)            \
+                              FT_ServiceDescRec**  output_class )           \
   {                                                                         \
   {                                                                         \
     FT_ServiceDescRec*  clazz  = NULL;                                      \
     FT_ServiceDescRec*  clazz  = NULL;                                      \
     FT_Error            error;                                              \
     FT_Error            error;                                              \
@@ -719,7 +745,7 @@ FT_BEGIN_HEADER
                                                                             \
                                                                             \
   FT_Error                                                                  \
   FT_Error                                                                  \
   FT_Create_Class_ ## class_( FT_Library           library,                 \
   FT_Create_Class_ ## class_( FT_Library           library,                 \
-                              FT_ServiceDescRec**  output_class)            \
+                              FT_ServiceDescRec**  output_class )           \
   {                                                                         \
   {                                                                         \
     FT_ServiceDescRec*  clazz  = NULL;                                      \
     FT_ServiceDescRec*  clazz  = NULL;                                      \
     FT_Error            error;                                              \
     FT_Error            error;                                              \
@@ -755,6 +781,68 @@ FT_BEGIN_HEADER
     return FT_Err_Ok;                                                       \
     return FT_Err_Ok;                                                       \
   }
   }
 
 
+#define FT_DEFINE_SERVICEDESCREC10( class_,                                 \
+                                    serv_id_1, serv_data_1,                 \
+                                    serv_id_2, serv_data_2,                 \
+                                    serv_id_3, serv_data_3,                 \
+                                    serv_id_4, serv_data_4,                 \
+                                    serv_id_5, serv_data_5,                 \
+                                    serv_id_6, serv_data_6,                 \
+                                    serv_id_7, serv_data_7,                 \
+                                    serv_id_8, serv_data_8,                 \
+                                    serv_id_9, serv_data_9,                 \
+                                    serv_id_10, serv_data_10 )              \
+  void                                                                      \
+  FT_Destroy_Class_ ## class_( FT_Library          library,                 \
+                               FT_ServiceDescRec*  clazz )                  \
+  {                                                                         \
+    FT_Memory  memory = library->memory;                                    \
+                                                                            \
+                                                                            \
+    if ( clazz )                                                            \
+      FT_FREE( clazz );                                                     \
+  }                                                                         \
+                                                                            \
+  FT_Error                                                                  \
+  FT_Create_Class_ ## class_( FT_Library           library,                 \
+                              FT_ServiceDescRec**  output_class )           \
+  {                                                                         \
+    FT_ServiceDescRec*  clazz  = NULL;                                      \
+    FT_Error            error;                                              \
+    FT_Memory           memory = library->memory;                           \
+                                                                            \
+                                                                            \
+    if ( FT_ALLOC( clazz, sizeof ( *clazz ) * 11 ) )                        \
+      return error;                                                         \
+                                                                            \
+    clazz[ 0].serv_id   = serv_id_1;                                        \
+    clazz[ 0].serv_data = serv_data_1;                                      \
+    clazz[ 1].serv_id   = serv_id_2;                                        \
+    clazz[ 1].serv_data = serv_data_2;                                      \
+    clazz[ 2].serv_id   = serv_id_3;                                        \
+    clazz[ 2].serv_data = serv_data_3;                                      \
+    clazz[ 3].serv_id   = serv_id_4;                                        \
+    clazz[ 3].serv_data = serv_data_4;                                      \
+    clazz[ 4].serv_id   = serv_id_5;                                        \
+    clazz[ 4].serv_data = serv_data_5;                                      \
+    clazz[ 5].serv_id   = serv_id_6;                                        \
+    clazz[ 5].serv_data = serv_data_6;                                      \
+    clazz[ 6].serv_id   = serv_id_7;                                        \
+    clazz[ 6].serv_data = serv_data_7;                                      \
+    clazz[ 7].serv_id   = serv_id_8;                                        \
+    clazz[ 7].serv_data = serv_data_8;                                      \
+    clazz[ 8].serv_id   = serv_id_9;                                        \
+    clazz[ 8].serv_data = serv_data_9;                                      \
+    clazz[ 9].serv_id   = serv_id_10;                                       \
+    clazz[ 9].serv_data = serv_data_10;                                     \
+    clazz[10].serv_id   = NULL;                                             \
+    clazz[10].serv_data = NULL;                                             \
+                                                                            \
+    *output_class = clazz;                                                  \
+                                                                            \
+    return FT_Err_Ok;                                                       \
+  }
+
 #endif /* FT_CONFIG_OPTION_PIC */
 #endif /* FT_CONFIG_OPTION_PIC */
 
 
 
 
@@ -898,7 +986,9 @@ FT_BEGIN_HEADER
    */
    */
 
 
 #define FT_SERVICE_BDF_H                <freetype/internal/services/svbdf.h>
 #define FT_SERVICE_BDF_H                <freetype/internal/services/svbdf.h>
+#define FT_SERVICE_CFF_TABLE_LOAD_H     <freetype/internal/services/svcfftl.h>
 #define FT_SERVICE_CID_H                <freetype/internal/services/svcid.h>
 #define FT_SERVICE_CID_H                <freetype/internal/services/svcid.h>
+#define FT_SERVICE_FONT_FORMAT_H        <freetype/internal/services/svfntfmt.h>
 #define FT_SERVICE_GLYPH_DICT_H         <freetype/internal/services/svgldict.h>
 #define FT_SERVICE_GLYPH_DICT_H         <freetype/internal/services/svgldict.h>
 #define FT_SERVICE_GX_VALIDATE_H        <freetype/internal/services/svgxval.h>
 #define FT_SERVICE_GX_VALIDATE_H        <freetype/internal/services/svgxval.h>
 #define FT_SERVICE_KERNING_H            <freetype/internal/services/svkern.h>
 #define FT_SERVICE_KERNING_H            <freetype/internal/services/svkern.h>
@@ -912,10 +1002,9 @@ FT_BEGIN_HEADER
 #define FT_SERVICE_PROPERTIES_H         <freetype/internal/services/svprop.h>
 #define FT_SERVICE_PROPERTIES_H         <freetype/internal/services/svprop.h>
 #define FT_SERVICE_SFNT_H               <freetype/internal/services/svsfnt.h>
 #define FT_SERVICE_SFNT_H               <freetype/internal/services/svsfnt.h>
 #define FT_SERVICE_TRUETYPE_ENGINE_H    <freetype/internal/services/svtteng.h>
 #define FT_SERVICE_TRUETYPE_ENGINE_H    <freetype/internal/services/svtteng.h>
+#define FT_SERVICE_TRUETYPE_GLYF_H      <freetype/internal/services/svttglyf.h>
 #define FT_SERVICE_TT_CMAP_H            <freetype/internal/services/svttcmap.h>
 #define FT_SERVICE_TT_CMAP_H            <freetype/internal/services/svttcmap.h>
 #define FT_SERVICE_WINFNT_H             <freetype/internal/services/svwinfnt.h>
 #define FT_SERVICE_WINFNT_H             <freetype/internal/services/svwinfnt.h>
-#define FT_SERVICE_FONT_FORMAT_H        <freetype/internal/services/svfntfmt.h>
-#define FT_SERVICE_TRUETYPE_GLYF_H      <freetype/internal/services/svttglyf.h>
 
 
  /* */
  /* */
 
 

+ 3 - 3
thirdparty/freetype/include/freetype/internal/ftstream.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    Stream handling (specification).                                     */
 /*    Stream handling (specification).                                     */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2017 by                                                 */
+/*  Copyright 1996-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -165,8 +165,8 @@ FT_BEGIN_HEADER
 #define FT_BYTE_U32( p, i, s )  ( FT_UINT32( FT_BYTE_( p, i ) ) << (s) )
 #define FT_BYTE_U32( p, i, s )  ( FT_UINT32( FT_BYTE_( p, i ) ) << (s) )
 
 
 
 
-#define FT_PEEK_SHORT( p )  FT_INT16( FT_BYTE_U16( p, 0, 8) | \
-                                      FT_BYTE_U16( p, 1, 0) )
+#define FT_PEEK_SHORT( p )  FT_INT16( FT_BYTE_U16( p, 0, 8 ) | \
+                                      FT_BYTE_U16( p, 1, 0 ) )
 
 
 #define FT_PEEK_USHORT( p )  FT_UINT16( FT_BYTE_U16( p, 0, 8 ) | \
 #define FT_PEEK_USHORT( p )  FT_UINT16( FT_BYTE_U16( p, 0, 8 ) | \
                                         FT_BYTE_U16( p, 1, 0 ) )
                                         FT_BYTE_U16( p, 1, 0 ) )

+ 4 - 5
thirdparty/freetype/include/freetype/internal/fttrace.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    Tracing handling (specification only).                               */
 /*    Tracing handling (specification only).                               */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2002-2017 by                                                 */
+/*  Copyright 2002-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -39,6 +39,7 @@ FT_TRACE_DEF( mm )        /* MM interface            (ftmm.c)     */
 FT_TRACE_DEF( raccess )   /* resource fork accessor  (ftrfork.c)  */
 FT_TRACE_DEF( raccess )   /* resource fork accessor  (ftrfork.c)  */
 FT_TRACE_DEF( synth )     /* bold/slant synthesizer  (ftsynth.c)  */
 FT_TRACE_DEF( synth )     /* bold/slant synthesizer  (ftsynth.c)  */
 FT_TRACE_DEF( bitmap )    /* bitmap checksum         (ftobjs.c)   */
 FT_TRACE_DEF( bitmap )    /* bitmap checksum         (ftobjs.c)   */
+FT_TRACE_DEF( psprops )   /* PS driver properties    (ftpsprop.c) */
 
 
   /* Cache sub-system */
   /* Cache sub-system */
 FT_TRACE_DEF( cache )     /* cache sub-system        (ftcache.c, etc.) */
 FT_TRACE_DEF( cache )     /* cache sub-system        (ftcache.c, etc.) */
@@ -66,20 +67,19 @@ FT_TRACE_DEF( ttgxvar )   /* TrueType GX var handler (ttgxvar.c)  */
 FT_TRACE_DEF( t1afm )
 FT_TRACE_DEF( t1afm )
 FT_TRACE_DEF( t1driver )
 FT_TRACE_DEF( t1driver )
 FT_TRACE_DEF( t1gload )
 FT_TRACE_DEF( t1gload )
-FT_TRACE_DEF( t1hint )
 FT_TRACE_DEF( t1load )
 FT_TRACE_DEF( t1load )
 FT_TRACE_DEF( t1objs )
 FT_TRACE_DEF( t1objs )
 FT_TRACE_DEF( t1parse )
 FT_TRACE_DEF( t1parse )
 
 
   /* PostScript helper module `psaux' */
   /* PostScript helper module `psaux' */
 FT_TRACE_DEF( t1decode )
 FT_TRACE_DEF( t1decode )
+FT_TRACE_DEF( cffdecode )
 FT_TRACE_DEF( psobjs )
 FT_TRACE_DEF( psobjs )
 FT_TRACE_DEF( psconv )
 FT_TRACE_DEF( psconv )
 
 
   /* PostScript hinting module `pshinter' */
   /* PostScript hinting module `pshinter' */
 FT_TRACE_DEF( pshrec )
 FT_TRACE_DEF( pshrec )
-FT_TRACE_DEF( pshalgo1 )
-FT_TRACE_DEF( pshalgo2 )
+FT_TRACE_DEF( pshalgo )
 
 
   /* Type 2 driver components */
   /* Type 2 driver components */
 FT_TRACE_DEF( cffdriver )
 FT_TRACE_DEF( cffdriver )
@@ -96,7 +96,6 @@ FT_TRACE_DEF( cf2interp )
 FT_TRACE_DEF( t42 )
 FT_TRACE_DEF( t42 )
 
 
   /* CID driver components */
   /* CID driver components */
-FT_TRACE_DEF( cidafm )
 FT_TRACE_DEF( ciddriver )
 FT_TRACE_DEF( ciddriver )
 FT_TRACE_DEF( cidgload )
 FT_TRACE_DEF( cidgload )
 FT_TRACE_DEF( cidload )
 FT_TRACE_DEF( cidload )

+ 1 - 1
thirdparty/freetype/include/freetype/internal/ftvalid.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType validation support (specification).                         */
 /*    FreeType validation support (specification).                         */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2004-2017 by                                                 */
+/*  Copyright 2004-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */

+ 6 - 2
thirdparty/freetype/include/freetype/internal/internal.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    Internal header files (specification only).                          */
 /*    Internal header files (specification only).                          */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2017 by                                                 */
+/*  Copyright 1996-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -31,7 +31,7 @@
 #define FT_INTERNAL_DEBUG_H               <freetype/internal/ftdebug.h>
 #define FT_INTERNAL_DEBUG_H               <freetype/internal/ftdebug.h>
 #define FT_INTERNAL_CALC_H                <freetype/internal/ftcalc.h>
 #define FT_INTERNAL_CALC_H                <freetype/internal/ftcalc.h>
 #define FT_INTERNAL_HASH_H                <freetype/internal/fthash.h>
 #define FT_INTERNAL_HASH_H                <freetype/internal/fthash.h>
-#define FT_INTERNAL_DRIVER_H              <freetype/internal/ftdriver.h>
+#define FT_INTERNAL_DRIVER_H              <freetype/internal/ftdrv.h>
 #define FT_INTERNAL_TRACE_H               <freetype/internal/fttrace.h>
 #define FT_INTERNAL_TRACE_H               <freetype/internal/fttrace.h>
 #define FT_INTERNAL_GLYPH_LOADER_H        <freetype/internal/ftgloadr.h>
 #define FT_INTERNAL_GLYPH_LOADER_H        <freetype/internal/ftgloadr.h>
 #define FT_INTERNAL_SFNT_H                <freetype/internal/sfnt.h>
 #define FT_INTERNAL_SFNT_H                <freetype/internal/sfnt.h>
@@ -44,9 +44,13 @@
 
 
 #define FT_INTERNAL_POSTSCRIPT_AUX_H      <freetype/internal/psaux.h>
 #define FT_INTERNAL_POSTSCRIPT_AUX_H      <freetype/internal/psaux.h>
 #define FT_INTERNAL_POSTSCRIPT_HINTS_H    <freetype/internal/pshints.h>
 #define FT_INTERNAL_POSTSCRIPT_HINTS_H    <freetype/internal/pshints.h>
+#define FT_INTERNAL_POSTSCRIPT_PROPS_H    <freetype/internal/ftpsprop.h>
 
 
 #define FT_INTERNAL_AUTOHINT_H            <freetype/internal/autohint.h>
 #define FT_INTERNAL_AUTOHINT_H            <freetype/internal/autohint.h>
 
 
+#define FT_INTERNAL_CFF_TYPES_H           <freetype/internal/cfftypes.h>
+#define FT_INTERNAL_CFF_OBJECTS_TYPES_H   <freetype/internal/cffotypes.h>
+
 
 
 #if defined( _MSC_VER )      /* Visual C++ (and Intel C++) */
 #if defined( _MSC_VER )      /* Visual C++ (and Intel C++) */
 
 

+ 497 - 4
thirdparty/freetype/include/freetype/internal/psaux.h

@@ -5,7 +5,7 @@
 /*    Auxiliary functions and data structures related to PostScript fonts  */
 /*    Auxiliary functions and data structures related to PostScript fonts  */
 /*    (specification).                                                     */
 /*    (specification).                                                     */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2017 by                                                 */
+/*  Copyright 1996-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -25,12 +25,32 @@
 #include FT_INTERNAL_OBJECTS_H
 #include FT_INTERNAL_OBJECTS_H
 #include FT_INTERNAL_TYPE1_TYPES_H
 #include FT_INTERNAL_TYPE1_TYPES_H
 #include FT_INTERNAL_HASH_H
 #include FT_INTERNAL_HASH_H
+#include FT_INTERNAL_TRUETYPE_TYPES_H
 #include FT_SERVICE_POSTSCRIPT_CMAPS_H
 #include FT_SERVICE_POSTSCRIPT_CMAPS_H
+#include FT_INTERNAL_CFF_TYPES_H
+#include FT_INTERNAL_CFF_OBJECTS_TYPES_H
+
 
 
 
 
 FT_BEGIN_HEADER
 FT_BEGIN_HEADER
 
 
 
 
+  /***********************************************************************/
+  /*                                                                     */
+  /* PostScript modules driver class.                                    */
+  /*                                                                     */
+  typedef struct  PS_DriverRec_
+  {
+    FT_DriverRec  root;
+
+    FT_UInt   hinting_engine;
+    FT_Bool   no_stem_darkening;
+    FT_Int    darken_params[8];
+    FT_Int32  random_seed;
+
+  } PS_DriverRec, *PS_Driver;
+
+
   /*************************************************************************/
   /*************************************************************************/
   /*************************************************************************/
   /*************************************************************************/
   /*****                                                               *****/
   /*****                                                               *****/
@@ -439,6 +459,202 @@ FT_BEGIN_HEADER
   } PS_ParserRec;
   } PS_ParserRec;
 
 
 
 
+  /*************************************************************************/
+  /*************************************************************************/
+  /*****                                                               *****/
+  /*****                         PS BUILDER                            *****/
+  /*****                                                               *****/
+  /*************************************************************************/
+  /*************************************************************************/
+
+
+  typedef struct PS_Builder_  PS_Builder;
+  typedef const struct PS_Builder_FuncsRec_*  PS_Builder_Funcs;
+
+  typedef struct  PS_Builder_FuncsRec_
+  {
+    void
+    (*init)( PS_Builder*  ps_builder,
+             void*        builder,
+             FT_Bool      is_t1 );
+
+    void
+    (*done)( PS_Builder*  builder );
+
+  } PS_Builder_FuncsRec;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Structure>                                                           */
+  /*    PS_Builder                                                         */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*     A structure used during glyph loading to store its outline.       */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    memory       :: The current memory object.                         */
+  /*                                                                       */
+  /*    face         :: The current face object.                           */
+  /*                                                                       */
+  /*    glyph        :: The current glyph slot.                            */
+  /*                                                                       */
+  /*    loader       :: XXX                                                */
+  /*                                                                       */
+  /*    base         :: The base glyph outline.                            */
+  /*                                                                       */
+  /*    current      :: The current glyph outline.                         */
+  /*                                                                       */
+  /*    pos_x        :: The horizontal translation (if composite glyph).   */
+  /*                                                                       */
+  /*    pos_y        :: The vertical translation (if composite glyph).     */
+  /*                                                                       */
+  /*    left_bearing :: The left side bearing point.                       */
+  /*                                                                       */
+  /*    advance      :: The horizontal advance vector.                     */
+  /*                                                                       */
+  /*    bbox         :: Unused.                                            */
+  /*                                                                       */
+  /*    path_begun   :: A flag which indicates that a new path has begun.  */
+  /*                                                                       */
+  /*    load_points  :: If this flag is not set, no points are loaded.     */
+  /*                                                                       */
+  /*    no_recurse   :: Set but not used.                                  */
+  /*                                                                       */
+  /*    metrics_only :: A boolean indicating that we only want to compute  */
+  /*                    the metrics of a given glyph, not load all of its  */
+  /*                    points.                                            */
+  /*                                                                       */
+  /*    is_t1        :: Set if current font type is Type 1.                */
+  /*                                                                       */
+  /*    funcs        :: An array of function pointers for the builder.     */
+  /*                                                                       */
+  struct  PS_Builder_
+  {
+    FT_Memory       memory;
+    FT_Face         face;
+    CFF_GlyphSlot   glyph;
+    FT_GlyphLoader  loader;
+    FT_Outline*     base;
+    FT_Outline*     current;
+
+    FT_Pos*  pos_x;
+    FT_Pos*  pos_y;
+
+    FT_Vector*  left_bearing;
+    FT_Vector*  advance;
+
+    FT_BBox*  bbox;          /* bounding box */
+    FT_Bool   path_begun;
+    FT_Bool   load_points;
+    FT_Bool   no_recurse;
+
+    FT_Bool  metrics_only;
+    FT_Bool  is_t1;
+
+    PS_Builder_FuncsRec  funcs;
+
+  };
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /*****                                                               *****/
+  /*****                            PS DECODER                         *****/
+  /*****                                                               *****/
+  /*************************************************************************/
+  /*************************************************************************/
+
+#define PS_MAX_OPERANDS        48
+#define PS_MAX_SUBRS_CALLS     16   /* maximum subroutine nesting;         */
+                                    /* only 10 are allowed but there exist */
+                                    /* fonts like `HiraKakuProN-W3.ttf'    */
+                                    /* (Hiragino Kaku Gothic ProN W3;      */
+                                    /* 8.2d6e1; 2014-12-19) that exceed    */
+                                    /* this limit                          */
+
+  /* execution context charstring zone */
+
+  typedef struct  PS_Decoder_Zone_
+  {
+    FT_Byte*  base;
+    FT_Byte*  limit;
+    FT_Byte*  cursor;
+
+  } PS_Decoder_Zone;
+
+
+  typedef FT_Error
+  (*CFF_Decoder_Get_Glyph_Callback)( TT_Face    face,
+                                     FT_UInt    glyph_index,
+                                     FT_Byte**  pointer,
+                                     FT_ULong*  length );
+
+  typedef void
+  (*CFF_Decoder_Free_Glyph_Callback)( TT_Face    face,
+                                      FT_Byte**  pointer,
+                                      FT_ULong   length );
+
+
+  typedef struct  PS_Decoder_
+  {
+    PS_Builder  builder;
+
+    FT_Fixed   stack[PS_MAX_OPERANDS + 1];
+    FT_Fixed*  top;
+
+    PS_Decoder_Zone   zones[PS_MAX_SUBRS_CALLS + 1];
+    PS_Decoder_Zone*  zone;
+
+    FT_Int     flex_state;
+    FT_Int     num_flex_vectors;
+    FT_Vector  flex_vectors[7];
+
+    CFF_Font     cff;
+    CFF_SubFont  current_subfont; /* for current glyph_index */
+    FT_Generic*  cf2_instance;
+
+    FT_Pos*  glyph_width;
+    FT_Bool  width_only;
+    FT_Int   num_hints;
+
+    FT_UInt  num_locals;
+    FT_UInt  num_globals;
+
+    FT_Int  locals_bias;
+    FT_Int  globals_bias;
+
+    FT_Byte**  locals;
+    FT_Byte**  globals;
+
+    FT_Byte**  glyph_names;   /* for pure CFF fonts only  */
+    FT_UInt    num_glyphs;    /* number of glyphs in font */
+
+    FT_Render_Mode  hint_mode;
+
+    FT_Bool  seac;
+
+    CFF_Decoder_Get_Glyph_Callback   get_glyph_callback;
+    CFF_Decoder_Free_Glyph_Callback  free_glyph_callback;
+
+    /* Type 1 stuff */
+    FT_Service_PsCMaps  psnames;      /* for seac */
+
+    FT_Int    lenIV;         /* internal for sub routine calls   */
+    FT_UInt*  locals_len;    /* array of subrs length (optional) */
+    FT_Hash   locals_hash;   /* used if `num_subrs' was massaged */
+
+    FT_Matrix  font_matrix;
+    FT_Vector  font_offset;
+
+    PS_Blend  blend;         /* for multiple master support */
+
+    FT_Long*  buildchar;
+    FT_UInt   len_buildchar;
+
+  } PS_Decoder;
+
+
   /*************************************************************************/
   /*************************************************************************/
   /*************************************************************************/
   /*************************************************************************/
   /*****                                                               *****/
   /*****                                                               *****/
@@ -653,10 +869,23 @@ FT_BEGIN_HEADER
     void
     void
     (*done)( T1_Decoder  decoder );
     (*done)( T1_Decoder  decoder );
 
 
+#ifdef T1_CONFIG_OPTION_OLD_ENGINE
+    FT_Error
+    (*parse_charstrings_old)( T1_Decoder  decoder,
+                              FT_Byte*    base,
+                              FT_UInt     len );
+#else
+    FT_Error
+    (*parse_metrics)( T1_Decoder  decoder,
+                      FT_Byte*    base,
+                      FT_UInt     len );
+#endif
+
     FT_Error
     FT_Error
-    (*parse_charstrings)( T1_Decoder  decoder,
-                          FT_Byte*    base,
-                          FT_UInt     len );
+    (*parse_charstrings)( PS_Decoder*  decoder,
+                          FT_Byte*     charstring_base,
+                          FT_ULong     charstring_len );
+
 
 
   } T1_Decoder_FuncsRec;
   } T1_Decoder_FuncsRec;
 
 
@@ -700,9 +929,258 @@ FT_BEGIN_HEADER
 
 
     FT_Bool              seac;
     FT_Bool              seac;
 
 
+    FT_Generic           cf2_instance;
+
   } T1_DecoderRec;
   } T1_DecoderRec;
 
 
 
 
+  /*************************************************************************/
+  /*************************************************************************/
+  /*****                                                               *****/
+  /*****                        CFF BUILDER                            *****/
+  /*****                                                               *****/
+  /*************************************************************************/
+  /*************************************************************************/
+
+
+  typedef struct CFF_Builder_  CFF_Builder;
+
+
+  typedef FT_Error
+  (*CFF_Builder_Check_Points_Func)( CFF_Builder*  builder,
+                                    FT_Int        count );
+
+  typedef void
+  (*CFF_Builder_Add_Point_Func)( CFF_Builder*  builder,
+                                 FT_Pos        x,
+                                 FT_Pos        y,
+                                 FT_Byte       flag );
+  typedef FT_Error
+  (*CFF_Builder_Add_Point1_Func)( CFF_Builder*  builder,
+                                  FT_Pos        x,
+                                  FT_Pos        y );
+  typedef FT_Error
+  (*CFF_Builder_Start_Point_Func)( CFF_Builder*  builder,
+                                   FT_Pos        x,
+                                   FT_Pos        y );
+  typedef void
+  (*CFF_Builder_Close_Contour_Func)( CFF_Builder*  builder );
+
+  typedef FT_Error
+  (*CFF_Builder_Add_Contour_Func)( CFF_Builder*  builder );
+
+  typedef const struct CFF_Builder_FuncsRec_*  CFF_Builder_Funcs;
+
+  typedef struct  CFF_Builder_FuncsRec_
+  {
+    void
+    (*init)( CFF_Builder*   builder,
+             TT_Face        face,
+             CFF_Size       size,
+             CFF_GlyphSlot  glyph,
+             FT_Bool        hinting );
+
+    void
+    (*done)( CFF_Builder*  builder );
+
+    CFF_Builder_Check_Points_Func   check_points;
+    CFF_Builder_Add_Point_Func      add_point;
+    CFF_Builder_Add_Point1_Func     add_point1;
+    CFF_Builder_Add_Contour_Func    add_contour;
+    CFF_Builder_Start_Point_Func    start_point;
+    CFF_Builder_Close_Contour_Func  close_contour;
+
+  } CFF_Builder_FuncsRec;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Structure>                                                           */
+  /*    CFF_Builder                                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*     A structure used during glyph loading to store its outline.       */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    memory        :: The current memory object.                        */
+  /*                                                                       */
+  /*    face          :: The current face object.                          */
+  /*                                                                       */
+  /*    glyph         :: The current glyph slot.                           */
+  /*                                                                       */
+  /*    loader        :: The current glyph loader.                         */
+  /*                                                                       */
+  /*    base          :: The base glyph outline.                           */
+  /*                                                                       */
+  /*    current       :: The current glyph outline.                        */
+  /*                                                                       */
+  /*    pos_x         :: The horizontal translation (if composite glyph).  */
+  /*                                                                       */
+  /*    pos_y         :: The vertical translation (if composite glyph).    */
+  /*                                                                       */
+  /*    left_bearing  :: The left side bearing point.                      */
+  /*                                                                       */
+  /*    advance       :: The horizontal advance vector.                    */
+  /*                                                                       */
+  /*    bbox          :: Unused.                                           */
+  /*                                                                       */
+  /*    path_begun    :: A flag which indicates that a new path has begun. */
+  /*                                                                       */
+  /*    load_points   :: If this flag is not set, no points are loaded.    */
+  /*                                                                       */
+  /*    no_recurse    :: Set but not used.                                 */
+  /*                                                                       */
+  /*    metrics_only  :: A boolean indicating that we only want to compute */
+  /*                     the metrics of a given glyph, not load all of its */
+  /*                     points.                                           */
+  /*                                                                       */
+  /*    hints_funcs   :: Auxiliary pointer for hinting.                    */
+  /*                                                                       */
+  /*    hints_globals :: Auxiliary pointer for hinting.                    */
+  /*                                                                       */
+  /*    funcs         :: A table of method pointers for this object.       */
+  /*                                                                       */
+  struct  CFF_Builder_
+  {
+    FT_Memory       memory;
+    TT_Face         face;
+    CFF_GlyphSlot   glyph;
+    FT_GlyphLoader  loader;
+    FT_Outline*     base;
+    FT_Outline*     current;
+
+    FT_Pos  pos_x;
+    FT_Pos  pos_y;
+
+    FT_Vector  left_bearing;
+    FT_Vector  advance;
+
+    FT_BBox  bbox;          /* bounding box */
+
+    FT_Bool  path_begun;
+    FT_Bool  load_points;
+    FT_Bool  no_recurse;
+
+    FT_Bool  metrics_only;
+
+    void*  hints_funcs;     /* hinter-specific */
+    void*  hints_globals;   /* hinter-specific */
+
+    CFF_Builder_FuncsRec  funcs;
+  };
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /*****                                                               *****/
+  /*****                        CFF DECODER                            *****/
+  /*****                                                               *****/
+  /*************************************************************************/
+  /*************************************************************************/
+
+
+#define CFF_MAX_OPERANDS        48
+#define CFF_MAX_SUBRS_CALLS     16  /* maximum subroutine nesting;         */
+                                    /* only 10 are allowed but there exist */
+                                    /* fonts like `HiraKakuProN-W3.ttf'    */
+                                    /* (Hiragino Kaku Gothic ProN W3;      */
+                                    /* 8.2d6e1; 2014-12-19) that exceed    */
+                                    /* this limit                          */
+#define CFF_MAX_TRANS_ELEMENTS  32
+
+  /* execution context charstring zone */
+
+  typedef struct  CFF_Decoder_Zone_
+  {
+    FT_Byte*  base;
+    FT_Byte*  limit;
+    FT_Byte*  cursor;
+
+  } CFF_Decoder_Zone;
+
+
+  typedef struct  CFF_Decoder_
+  {
+    CFF_Builder  builder;
+    CFF_Font     cff;
+
+    FT_Fixed   stack[CFF_MAX_OPERANDS + 1];
+    FT_Fixed*  top;
+
+    CFF_Decoder_Zone   zones[CFF_MAX_SUBRS_CALLS + 1];
+    CFF_Decoder_Zone*  zone;
+
+    FT_Int     flex_state;
+    FT_Int     num_flex_vectors;
+    FT_Vector  flex_vectors[7];
+
+    FT_Pos  glyph_width;
+    FT_Pos  nominal_width;
+
+    FT_Bool   read_width;
+    FT_Bool   width_only;
+    FT_Int    num_hints;
+    FT_Fixed  buildchar[CFF_MAX_TRANS_ELEMENTS];
+
+    FT_UInt  num_locals;
+    FT_UInt  num_globals;
+
+    FT_Int  locals_bias;
+    FT_Int  globals_bias;
+
+    FT_Byte**  locals;
+    FT_Byte**  globals;
+
+    FT_Byte**  glyph_names;   /* for pure CFF fonts only  */
+    FT_UInt    num_glyphs;    /* number of glyphs in font */
+
+    FT_Render_Mode  hint_mode;
+
+    FT_Bool  seac;
+
+    CFF_SubFont  current_subfont; /* for current glyph_index */
+
+    CFF_Decoder_Get_Glyph_Callback   get_glyph_callback;
+    CFF_Decoder_Free_Glyph_Callback  free_glyph_callback;
+
+  } CFF_Decoder;
+
+
+  typedef const struct CFF_Decoder_FuncsRec_*  CFF_Decoder_Funcs;
+
+  typedef struct  CFF_Decoder_FuncsRec_
+  {
+    void
+    (*init)( CFF_Decoder*                     decoder,
+             TT_Face                          face,
+             CFF_Size                         size,
+             CFF_GlyphSlot                    slot,
+             FT_Bool                          hinting,
+             FT_Render_Mode                   hint_mode,
+             CFF_Decoder_Get_Glyph_Callback   get_callback,
+             CFF_Decoder_Free_Glyph_Callback  free_callback );
+
+    FT_Error
+    (*prepare)( CFF_Decoder*  decoder,
+                CFF_Size      size,
+                FT_UInt       glyph_index );
+
+#ifdef CFF_CONFIG_OPTION_OLD_ENGINE
+    FT_Error
+    (*parse_charstrings_old)( CFF_Decoder*  decoder,
+                              FT_Byte*      charstring_base,
+                              FT_ULong      charstring_len,
+                              FT_Bool       in_dict );
+#endif
+
+    FT_Error
+    (*parse_charstrings)( PS_Decoder*  decoder,
+                          FT_Byte*     charstring_base,
+                          FT_ULong     charstring_len );
+
+  } CFF_Decoder_FuncsRec;
+
+
   /*************************************************************************/
   /*************************************************************************/
   /*************************************************************************/
   /*************************************************************************/
   /*****                                                               *****/
   /*****                                                               *****/
@@ -810,11 +1288,26 @@ FT_BEGIN_HEADER
                    FT_Offset  length,
                    FT_Offset  length,
                    FT_UShort  seed );
                    FT_UShort  seed );
 
 
+    FT_UInt32
+    (*cff_random)( FT_UInt32  r );
+
+    void
+    (*ps_decoder_init)( PS_Decoder*  ps_decoder,
+                        void*        decoder,
+                        FT_Bool      is_t1 );
+
+    void
+    (*t1_make_subfont)( FT_Face      face,
+                        PS_Private   priv,
+                        CFF_SubFont  subfont );
+
     T1_CMap_Classes  t1_cmap_classes;
     T1_CMap_Classes  t1_cmap_classes;
 
 
     /* fields after this comment line were added after version 2.1.10 */
     /* fields after this comment line were added after version 2.1.10 */
     const AFM_Parser_FuncsRec*  afm_parser_funcs;
     const AFM_Parser_FuncsRec*  afm_parser_funcs;
 
 
+    const CFF_Decoder_FuncsRec*  cff_decoder_funcs;
+
   } PSAux_ServiceRec, *PSAux_Service;
   } PSAux_ServiceRec, *PSAux_Service;
 
 
   /* backward compatible type definition */
   /* backward compatible type definition */

+ 1 - 1
thirdparty/freetype/include/freetype/internal/pshints.h

@@ -6,7 +6,7 @@
 /*    recorders (specification only).  These are used to support native    */
 /*    recorders (specification only).  These are used to support native    */
 /*    T1/T2 hints in the `type1', `cid', and `cff' font drivers.           */
 /*    T1/T2 hints in the `type1', `cid', and `cff' font drivers.           */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2001-2017 by                                                 */
+/*  Copyright 2001-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */

+ 1 - 1
thirdparty/freetype/include/freetype/internal/services/svbdf.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    The FreeType BDF services (specification).                           */
 /*    The FreeType BDF services (specification).                           */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2003-2017 by                                                 */
+/*  Copyright 2003-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */

+ 112 - 0
thirdparty/freetype/include/freetype/internal/services/svcfftl.h

@@ -0,0 +1,112 @@
+/***************************************************************************/
+/*                                                                         */
+/*  svcfftl.h                                                              */
+/*                                                                         */
+/*    The FreeType CFF tables loader service (specification).              */
+/*                                                                         */
+/*  Copyright 2017-2018 by                                                 */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+#ifndef SVCFFTL_H_
+#define SVCFFTL_H_
+
+#include FT_INTERNAL_SERVICE_H
+#include FT_INTERNAL_CFF_TYPES_H
+
+
+FT_BEGIN_HEADER
+
+
+#define FT_SERVICE_ID_CFF_LOAD  "cff-load"
+
+
+  typedef FT_UShort
+  (*FT_Get_Standard_Encoding_Func)( FT_UInt  charcode );
+
+  typedef FT_Error
+  (*FT_Load_Private_Dict_Func)( CFF_Font     font,
+                                CFF_SubFont  subfont,
+                                FT_UInt      lenNDV,
+                                FT_Fixed*    NDV );
+
+  typedef FT_Byte
+  (*FT_FD_Select_Get_Func)( CFF_FDSelect  fdselect,
+                            FT_UInt       glyph_index );
+
+  typedef FT_Bool
+  (*FT_Blend_Check_Vector_Func)( CFF_Blend  blend,
+                                 FT_UInt    vsindex,
+                                 FT_UInt    lenNDV,
+                                 FT_Fixed*  NDV );
+
+  typedef FT_Error
+  (*FT_Blend_Build_Vector_Func)( CFF_Blend  blend,
+                                 FT_UInt    vsindex,
+                                 FT_UInt    lenNDV,
+                                 FT_Fixed*  NDV );
+
+
+  FT_DEFINE_SERVICE( CFFLoad )
+  {
+    FT_Get_Standard_Encoding_Func  get_standard_encoding;
+    FT_Load_Private_Dict_Func      load_private_dict;
+    FT_FD_Select_Get_Func          fd_select_get;
+    FT_Blend_Check_Vector_Func     blend_check_vector;
+    FT_Blend_Build_Vector_Func     blend_build_vector;
+  };
+
+
+#ifndef FT_CONFIG_OPTION_PIC
+
+#define FT_DEFINE_SERVICE_CFFLOADREC( class_,                  \
+                                      get_standard_encoding_,  \
+                                      load_private_dict_,      \
+                                      fd_select_get_,          \
+                                      blend_check_vector_,     \
+                                      blend_build_vector_ )    \
+  static const FT_Service_CFFLoadRec  class_ =                 \
+  {                                                            \
+    get_standard_encoding_,                                    \
+    load_private_dict_,                                        \
+    fd_select_get_,                                            \
+    blend_check_vector_,                                       \
+    blend_build_vector_                                        \
+  };
+
+#else /* FT_CONFIG_OPTION_PIC */
+
+#define FT_DEFINE_SERVICE_CFFLOADREC( class_,                  \
+                                      get_standard_encoding_,  \
+                                      load_private_dict_,      \
+                                      fd_select_get_,          \
+                                      blend_check_vector_,     \
+                                      blend_build_vector_ )    \
+  void                                                         \
+  FT_Init_Class_ ## class_( FT_Service_CFFLoadRec*  clazz )    \
+  {                                                            \
+    clazz->get_standard_encoding = get_standard_encoding_;     \
+    clazz->load_private_dict     = load_private_dict_;         \
+    clazz->fd_select_get         = fd_select_get_;             \
+    clazz->blend_check_vector    = blend_check_vector_;        \
+    clazz->blend_build_vector    = blend_build_vector_;        \
+  }
+
+#endif /* FT_CONFIG_OPTION_PIC */
+
+
+FT_END_HEADER
+
+
+#endif
+
+
+/* END */

+ 1 - 1
thirdparty/freetype/include/freetype/internal/services/svcid.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    The FreeType CID font services (specification).                      */
 /*    The FreeType CID font services (specification).                      */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2007-2017 by                                                 */
+/*  Copyright 2007-2018 by                                                 */
 /*  Derek Clegg and Michael Toftdal.                                       */
 /*  Derek Clegg and Michael Toftdal.                                       */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */

+ 1 - 1
thirdparty/freetype/include/freetype/internal/services/svfntfmt.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    The FreeType font format service (specification only).               */
 /*    The FreeType font format service (specification only).               */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2003-2017 by                                                 */
+/*  Copyright 2003-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */

+ 3 - 3
thirdparty/freetype/include/freetype/internal/services/svgldict.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    The FreeType glyph dictionary services (specification).              */
 /*    The FreeType glyph dictionary services (specification).              */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2003-2017 by                                                 */
+/*  Copyright 2003-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -56,7 +56,7 @@ FT_BEGIN_HEADER
 
 
 #define FT_DEFINE_SERVICE_GLYPHDICTREC( class_,                        \
 #define FT_DEFINE_SERVICE_GLYPHDICTREC( class_,                        \
                                         get_name_,                     \
                                         get_name_,                     \
-                                        name_index_)                   \
+                                        name_index_ )                  \
   static const FT_Service_GlyphDictRec  class_ =                       \
   static const FT_Service_GlyphDictRec  class_ =                       \
   {                                                                    \
   {                                                                    \
     get_name_, name_index_                                             \
     get_name_, name_index_                                             \
@@ -66,7 +66,7 @@ FT_BEGIN_HEADER
 
 
 #define FT_DEFINE_SERVICE_GLYPHDICTREC( class_,                        \
 #define FT_DEFINE_SERVICE_GLYPHDICTREC( class_,                        \
                                         get_name_,                     \
                                         get_name_,                     \
-                                        name_index_)                   \
+                                        name_index_ )                  \
   void                                                                 \
   void                                                                 \
   FT_Init_Class_ ## class_( FT_Library                library,         \
   FT_Init_Class_ ## class_( FT_Library                library,         \
                             FT_Service_GlyphDictRec*  clazz )          \
                             FT_Service_GlyphDictRec*  clazz )          \

+ 1 - 1
thirdparty/freetype/include/freetype/internal/services/svgxval.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType API for validating TrueTypeGX/AAT tables (specification).   */
 /*    FreeType API for validating TrueTypeGX/AAT tables (specification).   */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2004-2017 by                                                 */
+/*  Copyright 2004-2018 by                                                 */
 /*  Masatake YAMATO, Red Hat K.K.,                                         */
 /*  Masatake YAMATO, Red Hat K.K.,                                         */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */

+ 1 - 1
thirdparty/freetype/include/freetype/internal/services/svkern.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    The FreeType Kerning service (specification).                        */
 /*    The FreeType Kerning service (specification).                        */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2006-2017 by                                                 */
+/*  Copyright 2006-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */

+ 1 - 1
thirdparty/freetype/include/freetype/internal/services/svmetric.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    The FreeType services for metrics variations (specification).        */
 /*    The FreeType services for metrics variations (specification).        */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2016-2017 by                                                 */
+/*  Copyright 2016-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */

+ 35 - 22
thirdparty/freetype/include/freetype/internal/services/svmm.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    The FreeType Multiple Masters and GX var services (specification).   */
 /*    The FreeType Multiple Masters and GX var services (specification).   */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2003-2017 by                                                 */
+/*  Copyright 2003-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -48,11 +48,15 @@ FT_BEGIN_HEADER
                             FT_UInt   num_coords,
                             FT_UInt   num_coords,
                             FT_Long*  coords );
                             FT_Long*  coords );
 
 
+  /* use return value -1 to indicate that the new coordinates  */
+  /* are equal to the current ones; no changes are thus needed */
   typedef FT_Error
   typedef FT_Error
   (*FT_Set_Var_Design_Func)( FT_Face    face,
   (*FT_Set_Var_Design_Func)( FT_Face    face,
                              FT_UInt    num_coords,
                              FT_UInt    num_coords,
                              FT_Fixed*  coords );
                              FT_Fixed*  coords );
 
 
+  /* use return value -1 to indicate that the new coordinates  */
+  /* are equal to the current ones; no changes are thus needed */
   typedef FT_Error
   typedef FT_Error
   (*FT_Set_MM_Blend_Func)( FT_Face   face,
   (*FT_Set_MM_Blend_Func)( FT_Face   face,
                            FT_UInt   num_coords,
                            FT_UInt   num_coords,
@@ -63,6 +67,10 @@ FT_BEGIN_HEADER
                              FT_UInt    num_coords,
                              FT_UInt    num_coords,
                              FT_Fixed*  coords );
                              FT_Fixed*  coords );
 
 
+  typedef FT_Error
+  (*FT_Set_Instance_Func)( FT_Face  face,
+                           FT_UInt  instance_index );
+
   typedef FT_Error
   typedef FT_Error
   (*FT_Get_MM_Blend_Func)( FT_Face   face,
   (*FT_Get_MM_Blend_Func)( FT_Face   face,
                            FT_UInt   num_coords,
                            FT_UInt   num_coords,
@@ -88,6 +96,7 @@ FT_BEGIN_HEADER
     FT_Get_MM_Var_Func      get_mm_var;
     FT_Get_MM_Var_Func      get_mm_var;
     FT_Set_Var_Design_Func  set_var_design;
     FT_Set_Var_Design_Func  set_var_design;
     FT_Get_Var_Design_Func  get_var_design;
     FT_Get_Var_Design_Func  get_var_design;
+    FT_Set_Instance_Func    set_instance;
 
 
     /* for internal use; only needed for code sharing between modules */
     /* for internal use; only needed for code sharing between modules */
     FT_Get_Var_Blend_Func   get_var_blend;
     FT_Get_Var_Blend_Func   get_var_blend;
@@ -97,27 +106,29 @@ FT_BEGIN_HEADER
 
 
 #ifndef FT_CONFIG_OPTION_PIC
 #ifndef FT_CONFIG_OPTION_PIC
 
 
-#define FT_DEFINE_SERVICE_MULTIMASTERSREC( class_,           \
-                                           get_mm_,          \
-                                           set_mm_design_,   \
-                                           set_mm_blend_,    \
-                                           get_mm_blend_,    \
-                                           get_mm_var_,      \
-                                           set_var_design_,  \
-                                           get_var_design_,  \
-                                           get_var_blend_,   \
-                                           done_blend_     ) \
-  static const FT_Service_MultiMastersRec  class_ =          \
-  {                                                          \
-    get_mm_,                                                 \
-    set_mm_design_,                                          \
-    set_mm_blend_,                                           \
-    get_mm_blend_,                                           \
-    get_mm_var_,                                             \
-    set_var_design_,                                         \
-    get_var_design_,                                         \
-    get_var_blend_,                                          \
-    done_blend_                                              \
+#define FT_DEFINE_SERVICE_MULTIMASTERSREC( class_,          \
+                                           get_mm_,         \
+                                           set_mm_design_,  \
+                                           set_mm_blend_,   \
+                                           get_mm_blend_,   \
+                                           get_mm_var_,     \
+                                           set_var_design_, \
+                                           get_var_design_, \
+                                           set_instance_,   \
+                                           get_var_blend_,  \
+                                           done_blend_ )    \
+  static const FT_Service_MultiMastersRec  class_ =         \
+  {                                                         \
+    get_mm_,                                                \
+    set_mm_design_,                                         \
+    set_mm_blend_,                                          \
+    get_mm_blend_,                                          \
+    get_mm_var_,                                            \
+    set_var_design_,                                        \
+    get_var_design_,                                        \
+    set_instance_,                                          \
+    get_var_blend_,                                         \
+    done_blend_                                             \
   };
   };
 
 
 #else /* FT_CONFIG_OPTION_PIC */
 #else /* FT_CONFIG_OPTION_PIC */
@@ -130,6 +141,7 @@ FT_BEGIN_HEADER
                                            get_mm_var_,          \
                                            get_mm_var_,          \
                                            set_var_design_,      \
                                            set_var_design_,      \
                                            get_var_design_,      \
                                            get_var_design_,      \
+                                           set_instance_,        \
                                            get_var_blend_,       \
                                            get_var_blend_,       \
                                            done_blend_ )         \
                                            done_blend_ )         \
   void                                                           \
   void                                                           \
@@ -142,6 +154,7 @@ FT_BEGIN_HEADER
     clazz->get_mm_var     = get_mm_var_;                         \
     clazz->get_mm_var     = get_mm_var_;                         \
     clazz->set_var_design = set_var_design_;                     \
     clazz->set_var_design = set_var_design_;                     \
     clazz->get_var_design = get_var_design_;                     \
     clazz->get_var_design = get_var_design_;                     \
+    clazz->set_instance   = set_instance_;                       \
     clazz->get_var_blend  = get_var_blend_;                      \
     clazz->get_var_blend  = get_var_blend_;                      \
     clazz->done_blend     = done_blend_;                         \
     clazz->done_blend     = done_blend_;                         \
   }
   }

+ 1 - 1
thirdparty/freetype/include/freetype/internal/services/svotval.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    The FreeType OpenType validation service (specification).            */
 /*    The FreeType OpenType validation service (specification).            */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2004-2017 by                                                 */
+/*  Copyright 2004-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */

+ 1 - 1
thirdparty/freetype/include/freetype/internal/services/svpfr.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    Internal PFR service functions (specification).                      */
 /*    Internal PFR service functions (specification).                      */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2003-2017 by                                                 */
+/*  Copyright 2003-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */

+ 1 - 1
thirdparty/freetype/include/freetype/internal/services/svpostnm.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    The FreeType PostScript name services (specification).               */
 /*    The FreeType PostScript name services (specification).               */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2003-2017 by                                                 */
+/*  Copyright 2003-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */

+ 1 - 1
thirdparty/freetype/include/freetype/internal/services/svprop.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    The FreeType property service (specification).                       */
 /*    The FreeType property service (specification).                       */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2012-2017 by                                                 */
+/*  Copyright 2012-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */

+ 1 - 1
thirdparty/freetype/include/freetype/internal/services/svpscmap.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    The FreeType PostScript charmap service (specification).             */
 /*    The FreeType PostScript charmap service (specification).             */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2003-2017 by                                                 */
+/*  Copyright 2003-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */

+ 1 - 1
thirdparty/freetype/include/freetype/internal/services/svpsinfo.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    The FreeType PostScript info service (specification).                */
 /*    The FreeType PostScript info service (specification).                */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2003-2017 by                                                 */
+/*  Copyright 2003-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */

+ 1 - 1
thirdparty/freetype/include/freetype/internal/services/svsfnt.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    The FreeType SFNT table loading service (specification).             */
 /*    The FreeType SFNT table loading service (specification).             */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2003-2017 by                                                 */
+/*  Copyright 2003-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */

+ 1 - 1
thirdparty/freetype/include/freetype/internal/services/svttcmap.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    The FreeType TrueType/sfnt cmap extra information service.           */
 /*    The FreeType TrueType/sfnt cmap extra information service.           */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2003-2017 by                                                 */
+/*  Copyright 2003-2018 by                                                 */
 /*  Masatake YAMATO, Redhat K.K.,                                          */
 /*  Masatake YAMATO, Redhat K.K.,                                          */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */

+ 1 - 1
thirdparty/freetype/include/freetype/internal/services/svtteng.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    The FreeType TrueType engine query service (specification).          */
 /*    The FreeType TrueType engine query service (specification).          */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2006-2017 by                                                 */
+/*  Copyright 2006-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */

+ 1 - 1
thirdparty/freetype/include/freetype/internal/services/svttglyf.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    The FreeType TrueType glyph service.                                 */
 /*    The FreeType TrueType glyph service.                                 */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2007-2017 by                                                 */
+/*  Copyright 2007-2018 by                                                 */
 /*  David Turner.                                                          */
 /*  David Turner.                                                          */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */

+ 1 - 1
thirdparty/freetype/include/freetype/internal/services/svwinfnt.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    The FreeType Windows FNT/FONT service (specification).               */
 /*    The FreeType Windows FNT/FONT service (specification).               */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2003-2017 by                                                 */
+/*  Copyright 2003-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */

+ 1 - 1
thirdparty/freetype/include/freetype/internal/sfnt.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    High-level `sfnt' driver interface (specification).                  */
 /*    High-level `sfnt' driver interface (specification).                  */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2017 by                                                 */
+/*  Copyright 1996-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */

+ 1 - 1
thirdparty/freetype/include/freetype/internal/t1types.h

@@ -5,7 +5,7 @@
 /*    Basic Type1/Type2 type definitions and interface (specification      */
 /*    Basic Type1/Type2 type definitions and interface (specification      */
 /*    only).                                                               */
 /*    only).                                                               */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2017 by                                                 */
+/*  Copyright 1996-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */

+ 5 - 7
thirdparty/freetype/include/freetype/internal/tttypes.h

@@ -5,7 +5,7 @@
 /*    Basic SFNT/TrueType type definitions and interface (specification    */
 /*    Basic SFNT/TrueType type definitions and interface (specification    */
 /*    only).                                                               */
 /*    only).                                                               */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2017 by                                                 */
+/*  Copyright 1996-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -148,7 +148,7 @@ FT_BEGIN_HEADER
   /* <Fields>                                                              */
   /* <Fields>                                                              */
   /*    See                                                                */
   /*    See                                                                */
   /*                                                                       */
   /*                                                                       */
-  /*      http://www.w3.org/TR/WOFF/#WOFFHeader                            */
+  /*      https://www.w3.org/TR/WOFF/#WOFFHeader                           */
   /*                                                                       */
   /*                                                                       */
   typedef struct  WOFF_HeaderRec_
   typedef struct  WOFF_HeaderRec_
   {
   {
@@ -1299,10 +1299,6 @@ FT_BEGIN_HEADER
   /*                            variation tables (rather like Multiple     */
   /*                            variation tables (rather like Multiple     */
   /*                            Master data).                              */
   /*                            Master data).                              */
   /*                                                                       */
   /*                                                                       */
-  /*    is_default_instance  :: Set if the glyph outlines can be used      */
-  /*                            unmodified (i.e., without applying glyph   */
-  /*                            variation deltas).                         */
-  /*                                                                       */
   /*    variation_support    :: Flags that indicate which OpenType         */
   /*    variation_support    :: Flags that indicate which OpenType         */
   /*                            functionality related to font variation    */
   /*                            functionality related to font variation    */
   /*                            support is present, valid, and usable.     */
   /*                            support is present, valid, and usable.     */
@@ -1445,6 +1441,9 @@ FT_BEGIN_HEADER
     void*                 var;
     void*                 var;
 #endif
 #endif
 
 
+    /* a typeless pointer to the PostScript Aux service */
+    void*                 psaux;
+
 
 
     /***********************************************************************/
     /***********************************************************************/
     /*                                                                     */
     /*                                                                     */
@@ -1509,7 +1508,6 @@ FT_BEGIN_HEADER
     FT_Bool               doblend;
     FT_Bool               doblend;
     GX_Blend              blend;
     GX_Blend              blend;
 
 
-    FT_Bool               is_default_instance;   /* since 2.7.1 */
     FT_UInt32             variation_support;     /* since 2.7.1 */
     FT_UInt32             variation_support;     /* since 2.7.1 */
 
 
     const char*           var_postscript_prefix;     /* since 2.7.2 */
     const char*           var_postscript_prefix;     /* since 2.7.2 */

+ 10 - 1
thirdparty/freetype/include/freetype/t1tables.h

@@ -5,7 +5,7 @@
 /*    Basic Type 1/Type 2 tables definitions and interface (specification  */
 /*    Basic Type 1/Type 2 tables definitions and interface (specification  */
 /*    only).                                                               */
 /*    only).                                                               */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2017 by                                                 */
+/*  Copyright 1996-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -554,6 +554,9 @@ FT_BEGIN_HEADER
   /*    T1_ENCODING_TYPE_ISOLATIN1 ::                                      */
   /*    T1_ENCODING_TYPE_ISOLATIN1 ::                                      */
   /*    T1_ENCODING_TYPE_EXPERT ::                                         */
   /*    T1_ENCODING_TYPE_EXPERT ::                                         */
   /*                                                                       */
   /*                                                                       */
+  /* <Since>                                                               */
+  /*    2.4.8                                                              */
+  /*                                                                       */
   typedef enum  T1_EncodingType_
   typedef enum  T1_EncodingType_
   {
   {
     T1_ENCODING_TYPE_NONE = 0,
     T1_ENCODING_TYPE_NONE = 0,
@@ -622,6 +625,9 @@ FT_BEGIN_HEADER
   /*    PS_DICT_FS_TYPE ::                                                 */
   /*    PS_DICT_FS_TYPE ::                                                 */
   /*    PS_DICT_ITALIC_ANGLE ::                                            */
   /*    PS_DICT_ITALIC_ANGLE ::                                            */
   /*                                                                       */
   /*                                                                       */
+  /* <Since>                                                               */
+  /*    2.4.8                                                              */
+  /*                                                                       */
   typedef enum  PS_Dict_Keys_
   typedef enum  PS_Dict_Keys_
   {
   {
     /* conventionally in the font dictionary */
     /* conventionally in the font dictionary */
@@ -743,6 +749,9 @@ FT_BEGIN_HEADER
    *    If the font's format is not PostScript-based, this function returns
    *    If the font's format is not PostScript-based, this function returns
    *    the `FT_Err_Invalid_Argument' error code.
    *    the `FT_Err_Invalid_Argument' error code.
    *
    *
+   * @since:
+   *    2.4.8
+   *
    */
    */
   FT_EXPORT( FT_Long )
   FT_EXPORT( FT_Long )
   FT_Get_PS_Font_Value( FT_Face       face,
   FT_Get_PS_Font_Value( FT_Face       face,

+ 2 - 2
thirdparty/freetype/include/freetype/ttnameid.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    TrueType name ID definitions (specification only).                   */
 /*    TrueType name ID definitions (specification only).                   */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2017 by                                                 */
+/*  Copyright 1996-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -437,7 +437,7 @@ FT_BEGIN_HEADER
    *
    *
    *   The canonical source for Microsoft's IDs is
    *   The canonical source for Microsoft's IDs is
    *
    *
-   *     http://www.microsoft.com/globaldev/reference/lcid-all.mspx ,
+   *     https://www.microsoft.com/globaldev/reference/lcid-all.mspx ,
    *
    *
    *   however, we only provide macros for language identifiers present in
    *   however, we only provide macros for language identifiers present in
    *   the OpenType specification: Microsoft has abandoned the concept of
    *   the OpenType specification: Microsoft has abandoned the concept of

+ 1 - 1
thirdparty/freetype/include/freetype/tttables.h

@@ -5,7 +5,7 @@
 /*    Basic SFNT/TrueType tables definitions and interface                 */
 /*    Basic SFNT/TrueType tables definitions and interface                 */
 /*    (specification only).                                                */
 /*    (specification only).                                                */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2017 by                                                 */
+/*  Copyright 1996-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */

+ 1 - 1
thirdparty/freetype/include/freetype/tttags.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    Tags for TrueType and OpenType tables (specification only).          */
 /*    Tags for TrueType and OpenType tables (specification only).          */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2017 by                                                 */
+/*  Copyright 1996-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */

+ 1 - 1
thirdparty/freetype/include/ft2build.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType 2 build and setup macros.                                   */
 /*    FreeType 2 build and setup macros.                                   */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2017 by                                                 */
+/*  Copyright 1996-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */

+ 1 - 1
thirdparty/freetype/src/autofit/afangles.c

@@ -5,7 +5,7 @@
 /*    Routines used to compute vector angles with limited accuracy         */
 /*    Routines used to compute vector angles with limited accuracy         */
 /*    and very high speed.  It also contains sorting routines (body).      */
 /*    and very high speed.  It also contains sorting routines (body).      */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2003-2017 by                                                 */
+/*  Copyright 2003-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */

+ 7 - 1
thirdparty/freetype/src/autofit/afblue.c

@@ -7,7 +7,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    Auto-fitter data for blue strings (body).                            */
 /*    Auto-fitter data for blue strings (body).                            */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2013-2017 by                                                 */
+/*  Copyright 2013-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -166,6 +166,10 @@
     '\0',
     '\0',
     '\xE2', '\xB4', '\x84', ' ', '\xE2', '\xB4', '\x85', ' ', '\xE2', '\xB4', '\x94', ' ', '\xE2', '\xB4', '\x95', ' ', '\xE2', '\xB4', '\x81', ' ', '\xE2', '\xB4', '\x82', ' ', '\xE2', '\xB4', '\x98', ' ', '\xE2', '\xB4', '\x9D',  /* ⴄ ⴅ ⴔ ⴕ ⴁ ⴂ ⴘ ⴝ */
     '\xE2', '\xB4', '\x84', ' ', '\xE2', '\xB4', '\x85', ' ', '\xE2', '\xB4', '\x94', ' ', '\xE2', '\xB4', '\x95', ' ', '\xE2', '\xB4', '\x81', ' ', '\xE2', '\xB4', '\x82', ' ', '\xE2', '\xB4', '\x98', ' ', '\xE2', '\xB4', '\x9D',  /* ⴄ ⴅ ⴔ ⴕ ⴁ ⴂ ⴘ ⴝ */
     '\0',
     '\0',
+    '\xE1', '\xB2', '\x9C', ' ', '\xE1', '\xB2', '\x9F', ' ', '\xE1', '\xB2', '\xB3', ' ', '\xE1', '\xB2', '\xB8', ' ', '\xE1', '\xB2', '\x92', ' ', '\xE1', '\xB2', '\x94', ' ', '\xE1', '\xB2', '\x9D', ' ', '\xE1', '\xB2', '\xB4',  /* Ნ Ჟ Ჳ Ჸ Გ Ე Ო Ჴ */
+    '\0',
+    '\xE1', '\xB2', '\x98', ' ', '\xE1', '\xB2', '\xB2', ' ', '\xE1', '\xB2', '\x9D', ' ', '\xE1', '\xB2', '\xA9', ' ', '\xE1', '\xB2', '\x9B', ' ', '\xE1', '\xB2', '\xA8', ' ', '\xE1', '\xB2', '\xAF', ' ', '\xE1', '\xB2', '\xBD',  /* Ი Ჲ Ო Ჩ Მ Შ Ჯ Ჽ */
+    '\0',
     '\xE2', '\xB0', '\x85', ' ', '\xE2', '\xB0', '\x94', ' ', '\xE2', '\xB0', '\xAA', ' ', '\xE2', '\xB0', '\x84', ' ', '\xE2', '\xB0', '\x82', ' ', '\xE2', '\xB0', '\x8A', ' ', '\xE2', '\xB0', '\xAB', ' ', '\xE2', '\xB0', '\x8B',  /* Ⰵ Ⱄ Ⱚ Ⰴ Ⰲ Ⰺ Ⱛ Ⰻ */
     '\xE2', '\xB0', '\x85', ' ', '\xE2', '\xB0', '\x94', ' ', '\xE2', '\xB0', '\xAA', ' ', '\xE2', '\xB0', '\x84', ' ', '\xE2', '\xB0', '\x82', ' ', '\xE2', '\xB0', '\x8A', ' ', '\xE2', '\xB0', '\xAB', ' ', '\xE2', '\xB0', '\x8B',  /* Ⰵ Ⱄ Ⱚ Ⰴ Ⰲ Ⰺ Ⱛ Ⰻ */
     '\0',
     '\0',
     '\xE2', '\xB0', '\x85', ' ', '\xE2', '\xB0', '\x84', ' ', '\xE2', '\xB0', '\x82', ' ', '\xE2', '\xB0', '\xAA', ' ', '\xE2', '\xB0', '\x9E', ' ', '\xE2', '\xB0', '\xA1', ' ', '\xE2', '\xB0', '\x8A', ' ', '\xE2', '\xB0', '\x94',  /* Ⰵ Ⰴ Ⰲ Ⱚ Ⱎ Ⱑ Ⰺ Ⱄ */
     '\xE2', '\xB0', '\x85', ' ', '\xE2', '\xB0', '\x84', ' ', '\xE2', '\xB0', '\x82', ' ', '\xE2', '\xB0', '\xAA', ' ', '\xE2', '\xB0', '\x9E', ' ', '\xE2', '\xB0', '\xA1', ' ', '\xE2', '\xB0', '\x8A', ' ', '\xE2', '\xB0', '\x94',  /* Ⰵ Ⰴ Ⰲ Ⱚ Ⱎ Ⱑ Ⰺ Ⱄ */
@@ -539,6 +543,8 @@
     { AF_BLUE_STRING_GEORGIAN_MKHEDRULI_BOTTOM,    0                                 },
     { AF_BLUE_STRING_GEORGIAN_MKHEDRULI_BOTTOM,    0                                 },
     { AF_BLUE_STRING_GEORGIAN_MKHEDRULI_ASCENDER,  AF_BLUE_PROPERTY_LATIN_TOP        },
     { AF_BLUE_STRING_GEORGIAN_MKHEDRULI_ASCENDER,  AF_BLUE_PROPERTY_LATIN_TOP        },
     { AF_BLUE_STRING_GEORGIAN_MKHEDRULI_DESCENDER, 0                                 },
     { AF_BLUE_STRING_GEORGIAN_MKHEDRULI_DESCENDER, 0                                 },
+    { AF_BLUE_STRING_GEORGIAN_MTAVRULI_TOP,        AF_BLUE_PROPERTY_LATIN_TOP        },
+    { AF_BLUE_STRING_GEORGIAN_MTAVRULI_BOTTOM,     0                                 },
     { AF_BLUE_STRING_MAX,                          0                                 },
     { AF_BLUE_STRING_MAX,                          0                                 },
     { AF_BLUE_STRING_GEORGIAN_ASOMTAVRULI_TOP,    AF_BLUE_PROPERTY_LATIN_TOP        },
     { AF_BLUE_STRING_GEORGIAN_ASOMTAVRULI_TOP,    AF_BLUE_PROPERTY_LATIN_TOP        },
     { AF_BLUE_STRING_GEORGIAN_ASOMTAVRULI_BOTTOM, 0                                 },
     { AF_BLUE_STRING_GEORGIAN_ASOMTAVRULI_BOTTOM, 0                                 },

+ 1 - 1
thirdparty/freetype/src/autofit/afblue.cin

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    Auto-fitter data for blue strings (body).                            */
 /*    Auto-fitter data for blue strings (body).                            */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2013-2017 by                                                 */
+/*  Copyright 2013-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */

+ 8 - 2
thirdparty/freetype/src/autofit/afblue.dat

@@ -2,7 +2,7 @@
 //
 //
 //    Auto-fitter data for blue strings.
 //    Auto-fitter data for blue strings.
 //
 //
-//  Copyright 2013-2017 by
+//  Copyright 2013-2018 by
 //  David Turner, Robert Wilhelm, and Werner Lemberg.
 //  David Turner, Robert Wilhelm, and Werner Lemberg.
 //
 //
 //  This file is part of the FreeType project, and may only be used,
 //  This file is part of the FreeType project, and may only be used,
@@ -242,6 +242,11 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN:
   AF_BLUE_STRING_GEORGIAN_NUSKHURI_DESCENDER
   AF_BLUE_STRING_GEORGIAN_NUSKHURI_DESCENDER
     "ⴄ ⴅ ⴔ ⴕ ⴁ ⴂ ⴘ ⴝ"
     "ⴄ ⴅ ⴔ ⴕ ⴁ ⴂ ⴘ ⴝ"
 
 
+  AF_BLUE_STRING_GEORGIAN_MTAVRULI_TOP
+    "Ნ Ჟ Ჳ Ჸ Გ Ე Ო Ჴ"
+  AF_BLUE_STRING_GEORGIAN_MTAVRULI_BOTTOM
+    "Ი Ჲ Ო Ჩ Მ Შ Ჯ Ჽ"
+
   AF_BLUE_STRING_GLAGOLITIC_CAPITAL_TOP
   AF_BLUE_STRING_GLAGOLITIC_CAPITAL_TOP
     "Ⰵ Ⱄ Ⱚ Ⰴ Ⰲ Ⰺ Ⱛ Ⰻ"
     "Ⰵ Ⱄ Ⱚ Ⰴ Ⰲ Ⰺ Ⱛ Ⰻ"
   AF_BLUE_STRING_GLAGOLITIC_CAPITAL_BOTTOM
   AF_BLUE_STRING_GLAGOLITIC_CAPITAL_BOTTOM
@@ -795,13 +800,14 @@ AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN:
     { AF_BLUE_STRING_ETHIOPIC_BOTTOM, 0                          }
     { AF_BLUE_STRING_ETHIOPIC_BOTTOM, 0                          }
     { AF_BLUE_STRING_MAX,             0                          }
     { AF_BLUE_STRING_MAX,             0                          }
 
 
-  // blue zones for Mtavruli are missing (not yet defined in Unicode)
   AF_BLUE_STRINGSET_GEOR
   AF_BLUE_STRINGSET_GEOR
     { AF_BLUE_STRING_GEORGIAN_MKHEDRULI_TOP,       AF_BLUE_PROPERTY_LATIN_TOP      |
     { AF_BLUE_STRING_GEORGIAN_MKHEDRULI_TOP,       AF_BLUE_PROPERTY_LATIN_TOP      |
                                                    AF_BLUE_PROPERTY_LATIN_X_HEIGHT   }
                                                    AF_BLUE_PROPERTY_LATIN_X_HEIGHT   }
     { AF_BLUE_STRING_GEORGIAN_MKHEDRULI_BOTTOM,    0                                 }
     { AF_BLUE_STRING_GEORGIAN_MKHEDRULI_BOTTOM,    0                                 }
     { AF_BLUE_STRING_GEORGIAN_MKHEDRULI_ASCENDER,  AF_BLUE_PROPERTY_LATIN_TOP        }
     { AF_BLUE_STRING_GEORGIAN_MKHEDRULI_ASCENDER,  AF_BLUE_PROPERTY_LATIN_TOP        }
     { AF_BLUE_STRING_GEORGIAN_MKHEDRULI_DESCENDER, 0                                 }
     { AF_BLUE_STRING_GEORGIAN_MKHEDRULI_DESCENDER, 0                                 }
+    { AF_BLUE_STRING_GEORGIAN_MTAVRULI_TOP,        AF_BLUE_PROPERTY_LATIN_TOP        }
+    { AF_BLUE_STRING_GEORGIAN_MTAVRULI_BOTTOM,     0                                 }
     { AF_BLUE_STRING_MAX,                          0                                 }
     { AF_BLUE_STRING_MAX,                          0                                 }
 
 
   AF_BLUE_STRINGSET_GEOK
   AF_BLUE_STRINGSET_GEOK

+ 151 - 149
thirdparty/freetype/src/autofit/afblue.h

@@ -7,7 +7,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    Auto-fitter data for blue strings (specification).                   */
 /*    Auto-fitter data for blue strings (specification).                   */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2013-2017 by                                                 */
+/*  Copyright 2013-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -147,119 +147,121 @@ FT_BEGIN_HEADER
     AF_BLUE_STRING_GEORGIAN_NUSKHURI_BOTTOM = 1813,
     AF_BLUE_STRING_GEORGIAN_NUSKHURI_BOTTOM = 1813,
     AF_BLUE_STRING_GEORGIAN_NUSKHURI_ASCENDER = 1845,
     AF_BLUE_STRING_GEORGIAN_NUSKHURI_ASCENDER = 1845,
     AF_BLUE_STRING_GEORGIAN_NUSKHURI_DESCENDER = 1877,
     AF_BLUE_STRING_GEORGIAN_NUSKHURI_DESCENDER = 1877,
-    AF_BLUE_STRING_GLAGOLITIC_CAPITAL_TOP = 1909,
-    AF_BLUE_STRING_GLAGOLITIC_CAPITAL_BOTTOM = 1941,
-    AF_BLUE_STRING_GLAGOLITIC_SMALL_TOP = 1973,
-    AF_BLUE_STRING_GLAGOLITIC_SMALL_BOTTOM = 2005,
-    AF_BLUE_STRING_GOTHIC_TOP = 2037,
-    AF_BLUE_STRING_GOTHIC_BOTTOM = 2077,
-    AF_BLUE_STRING_GREEK_CAPITAL_TOP = 2097,
-    AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM = 2118,
-    AF_BLUE_STRING_GREEK_SMALL_BETA_TOP = 2136,
-    AF_BLUE_STRING_GREEK_SMALL = 2154,
-    AF_BLUE_STRING_GREEK_SMALL_DESCENDER = 2178,
-    AF_BLUE_STRING_GUJARATI_TOP = 2202,
-    AF_BLUE_STRING_GUJARATI_BOTTOM = 2234,
-    AF_BLUE_STRING_GUJARATI_ASCENDER = 2266,
-    AF_BLUE_STRING_GUJARATI_DESCENDER = 2316,
-    AF_BLUE_STRING_GUJARATI_DIGIT_TOP = 2349,
-    AF_BLUE_STRING_GURMUKHI_BASE = 2369,
-    AF_BLUE_STRING_GURMUKHI_HEAD = 2401,
-    AF_BLUE_STRING_GURMUKHI_TOP = 2433,
-    AF_BLUE_STRING_GURMUKHI_BOTTOM = 2465,
-    AF_BLUE_STRING_GURMUKHI_DIGIT_TOP = 2497,
-    AF_BLUE_STRING_HEBREW_TOP = 2517,
-    AF_BLUE_STRING_HEBREW_BOTTOM = 2541,
-    AF_BLUE_STRING_HEBREW_DESCENDER = 2559,
-    AF_BLUE_STRING_KANNADA_TOP = 2574,
-    AF_BLUE_STRING_KANNADA_BOTTOM = 2618,
-    AF_BLUE_STRING_KAYAH_LI_TOP = 2650,
-    AF_BLUE_STRING_KAYAH_LI_BOTTOM = 2674,
-    AF_BLUE_STRING_KAYAH_LI_ASCENDER = 2694,
-    AF_BLUE_STRING_KAYAH_LI_DESCENDER = 2702,
-    AF_BLUE_STRING_KAYAH_LI_LARGE_DESCENDER = 2714,
-    AF_BLUE_STRING_KHMER_TOP = 2735,
-    AF_BLUE_STRING_KHMER_SUBSCRIPT_TOP = 2759,
-    AF_BLUE_STRING_KHMER_BOTTOM = 2799,
-    AF_BLUE_STRING_KHMER_DESCENDER = 2831,
-    AF_BLUE_STRING_KHMER_LARGE_DESCENDER = 2865,
-    AF_BLUE_STRING_KHMER_SYMBOLS_WAXING_TOP = 2952,
-    AF_BLUE_STRING_KHMER_SYMBOLS_WANING_BOTTOM = 2960,
-    AF_BLUE_STRING_LAO_TOP = 2968,
-    AF_BLUE_STRING_LAO_BOTTOM = 3000,
-    AF_BLUE_STRING_LAO_ASCENDER = 3032,
-    AF_BLUE_STRING_LAO_LARGE_ASCENDER = 3048,
-    AF_BLUE_STRING_LAO_DESCENDER = 3060,
-    AF_BLUE_STRING_LATIN_CAPITAL_TOP = 3084,
-    AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM = 3100,
-    AF_BLUE_STRING_LATIN_SMALL_F_TOP = 3116,
-    AF_BLUE_STRING_LATIN_SMALL_TOP = 3130,
-    AF_BLUE_STRING_LATIN_SMALL_BOTTOM = 3146,
-    AF_BLUE_STRING_LATIN_SMALL_DESCENDER = 3162,
-    AF_BLUE_STRING_LATIN_SUBS_CAPITAL_TOP = 3172,
-    AF_BLUE_STRING_LATIN_SUBS_CAPITAL_BOTTOM = 3192,
-    AF_BLUE_STRING_LATIN_SUBS_SMALL_F_TOP = 3212,
-    AF_BLUE_STRING_LATIN_SUBS_SMALL = 3232,
-    AF_BLUE_STRING_LATIN_SUBS_SMALL_DESCENDER = 3268,
-    AF_BLUE_STRING_LATIN_SUPS_CAPITAL_TOP = 3288,
-    AF_BLUE_STRING_LATIN_SUPS_CAPITAL_BOTTOM = 3319,
-    AF_BLUE_STRING_LATIN_SUPS_SMALL_F_TOP = 3348,
-    AF_BLUE_STRING_LATIN_SUPS_SMALL = 3374,
-    AF_BLUE_STRING_LATIN_SUPS_SMALL_DESCENDER = 3399,
-    AF_BLUE_STRING_LISU_TOP = 3410,
-    AF_BLUE_STRING_LISU_BOTTOM = 3442,
-    AF_BLUE_STRING_MALAYALAM_TOP = 3474,
-    AF_BLUE_STRING_MALAYALAM_BOTTOM = 3518,
-    AF_BLUE_STRING_MYANMAR_TOP = 3550,
-    AF_BLUE_STRING_MYANMAR_BOTTOM = 3582,
-    AF_BLUE_STRING_MYANMAR_ASCENDER = 3614,
-    AF_BLUE_STRING_MYANMAR_DESCENDER = 3642,
-    AF_BLUE_STRING_NKO_TOP = 3674,
-    AF_BLUE_STRING_NKO_BOTTOM = 3698,
-    AF_BLUE_STRING_NKO_SMALL_TOP = 3713,
-    AF_BLUE_STRING_NKO_SMALL_BOTTOM = 3722,
-    AF_BLUE_STRING_OL_CHIKI = 3734,
-    AF_BLUE_STRING_OLD_TURKIC_TOP = 3758,
-    AF_BLUE_STRING_OLD_TURKIC_BOTTOM = 3773,
-    AF_BLUE_STRING_OSAGE_CAPITAL_TOP = 3793,
-    AF_BLUE_STRING_OSAGE_CAPITAL_BOTTOM = 3833,
-    AF_BLUE_STRING_OSAGE_CAPITAL_DESCENDER = 3863,
-    AF_BLUE_STRING_OSAGE_SMALL_TOP = 3878,
-    AF_BLUE_STRING_OSAGE_SMALL_BOTTOM = 3918,
-    AF_BLUE_STRING_OSAGE_SMALL_ASCENDER = 3958,
-    AF_BLUE_STRING_OSAGE_SMALL_DESCENDER = 3983,
-    AF_BLUE_STRING_OSMANYA_TOP = 3998,
-    AF_BLUE_STRING_OSMANYA_BOTTOM = 4038,
-    AF_BLUE_STRING_SAURASHTRA_TOP = 4078,
-    AF_BLUE_STRING_SAURASHTRA_BOTTOM = 4110,
-    AF_BLUE_STRING_SHAVIAN_TOP = 4130,
-    AF_BLUE_STRING_SHAVIAN_BOTTOM = 4140,
-    AF_BLUE_STRING_SHAVIAN_DESCENDER = 4165,
-    AF_BLUE_STRING_SHAVIAN_SMALL_TOP = 4175,
-    AF_BLUE_STRING_SHAVIAN_SMALL_BOTTOM = 4210,
-    AF_BLUE_STRING_SINHALA_TOP = 4225,
-    AF_BLUE_STRING_SINHALA_BOTTOM = 4257,
-    AF_BLUE_STRING_SINHALA_DESCENDER = 4289,
-    AF_BLUE_STRING_SUNDANESE_TOP = 4333,
-    AF_BLUE_STRING_SUNDANESE_BOTTOM = 4357,
-    AF_BLUE_STRING_SUNDANESE_DESCENDER = 4389,
-    AF_BLUE_STRING_TAI_VIET_TOP = 4397,
-    AF_BLUE_STRING_TAI_VIET_BOTTOM = 4417,
-    AF_BLUE_STRING_TAMIL_TOP = 4429,
-    AF_BLUE_STRING_TAMIL_BOTTOM = 4461,
-    AF_BLUE_STRING_TELUGU_TOP = 4493,
-    AF_BLUE_STRING_TELUGU_BOTTOM = 4521,
-    AF_BLUE_STRING_THAI_TOP = 4549,
-    AF_BLUE_STRING_THAI_BOTTOM = 4573,
-    AF_BLUE_STRING_THAI_ASCENDER = 4601,
-    AF_BLUE_STRING_THAI_LARGE_ASCENDER = 4613,
-    AF_BLUE_STRING_THAI_DESCENDER = 4625,
-    AF_BLUE_STRING_THAI_LARGE_DESCENDER = 4641,
-    AF_BLUE_STRING_THAI_DIGIT_TOP = 4649,
-    AF_BLUE_STRING_TIFINAGH = 4661,
-    AF_BLUE_STRING_VAI_TOP = 4693,
-    AF_BLUE_STRING_VAI_BOTTOM = 4725,
-    af_blue_1_1 = 4756,
+    AF_BLUE_STRING_GEORGIAN_MTAVRULI_TOP = 1909,
+    AF_BLUE_STRING_GEORGIAN_MTAVRULI_BOTTOM = 1941,
+    AF_BLUE_STRING_GLAGOLITIC_CAPITAL_TOP = 1973,
+    AF_BLUE_STRING_GLAGOLITIC_CAPITAL_BOTTOM = 2005,
+    AF_BLUE_STRING_GLAGOLITIC_SMALL_TOP = 2037,
+    AF_BLUE_STRING_GLAGOLITIC_SMALL_BOTTOM = 2069,
+    AF_BLUE_STRING_GOTHIC_TOP = 2101,
+    AF_BLUE_STRING_GOTHIC_BOTTOM = 2141,
+    AF_BLUE_STRING_GREEK_CAPITAL_TOP = 2161,
+    AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM = 2182,
+    AF_BLUE_STRING_GREEK_SMALL_BETA_TOP = 2200,
+    AF_BLUE_STRING_GREEK_SMALL = 2218,
+    AF_BLUE_STRING_GREEK_SMALL_DESCENDER = 2242,
+    AF_BLUE_STRING_GUJARATI_TOP = 2266,
+    AF_BLUE_STRING_GUJARATI_BOTTOM = 2298,
+    AF_BLUE_STRING_GUJARATI_ASCENDER = 2330,
+    AF_BLUE_STRING_GUJARATI_DESCENDER = 2380,
+    AF_BLUE_STRING_GUJARATI_DIGIT_TOP = 2413,
+    AF_BLUE_STRING_GURMUKHI_BASE = 2433,
+    AF_BLUE_STRING_GURMUKHI_HEAD = 2465,
+    AF_BLUE_STRING_GURMUKHI_TOP = 2497,
+    AF_BLUE_STRING_GURMUKHI_BOTTOM = 2529,
+    AF_BLUE_STRING_GURMUKHI_DIGIT_TOP = 2561,
+    AF_BLUE_STRING_HEBREW_TOP = 2581,
+    AF_BLUE_STRING_HEBREW_BOTTOM = 2605,
+    AF_BLUE_STRING_HEBREW_DESCENDER = 2623,
+    AF_BLUE_STRING_KANNADA_TOP = 2638,
+    AF_BLUE_STRING_KANNADA_BOTTOM = 2682,
+    AF_BLUE_STRING_KAYAH_LI_TOP = 2714,
+    AF_BLUE_STRING_KAYAH_LI_BOTTOM = 2738,
+    AF_BLUE_STRING_KAYAH_LI_ASCENDER = 2758,
+    AF_BLUE_STRING_KAYAH_LI_DESCENDER = 2766,
+    AF_BLUE_STRING_KAYAH_LI_LARGE_DESCENDER = 2778,
+    AF_BLUE_STRING_KHMER_TOP = 2799,
+    AF_BLUE_STRING_KHMER_SUBSCRIPT_TOP = 2823,
+    AF_BLUE_STRING_KHMER_BOTTOM = 2863,
+    AF_BLUE_STRING_KHMER_DESCENDER = 2895,
+    AF_BLUE_STRING_KHMER_LARGE_DESCENDER = 2929,
+    AF_BLUE_STRING_KHMER_SYMBOLS_WAXING_TOP = 3016,
+    AF_BLUE_STRING_KHMER_SYMBOLS_WANING_BOTTOM = 3024,
+    AF_BLUE_STRING_LAO_TOP = 3032,
+    AF_BLUE_STRING_LAO_BOTTOM = 3064,
+    AF_BLUE_STRING_LAO_ASCENDER = 3096,
+    AF_BLUE_STRING_LAO_LARGE_ASCENDER = 3112,
+    AF_BLUE_STRING_LAO_DESCENDER = 3124,
+    AF_BLUE_STRING_LATIN_CAPITAL_TOP = 3148,
+    AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM = 3164,
+    AF_BLUE_STRING_LATIN_SMALL_F_TOP = 3180,
+    AF_BLUE_STRING_LATIN_SMALL_TOP = 3194,
+    AF_BLUE_STRING_LATIN_SMALL_BOTTOM = 3210,
+    AF_BLUE_STRING_LATIN_SMALL_DESCENDER = 3226,
+    AF_BLUE_STRING_LATIN_SUBS_CAPITAL_TOP = 3236,
+    AF_BLUE_STRING_LATIN_SUBS_CAPITAL_BOTTOM = 3256,
+    AF_BLUE_STRING_LATIN_SUBS_SMALL_F_TOP = 3276,
+    AF_BLUE_STRING_LATIN_SUBS_SMALL = 3296,
+    AF_BLUE_STRING_LATIN_SUBS_SMALL_DESCENDER = 3332,
+    AF_BLUE_STRING_LATIN_SUPS_CAPITAL_TOP = 3352,
+    AF_BLUE_STRING_LATIN_SUPS_CAPITAL_BOTTOM = 3383,
+    AF_BLUE_STRING_LATIN_SUPS_SMALL_F_TOP = 3412,
+    AF_BLUE_STRING_LATIN_SUPS_SMALL = 3438,
+    AF_BLUE_STRING_LATIN_SUPS_SMALL_DESCENDER = 3463,
+    AF_BLUE_STRING_LISU_TOP = 3474,
+    AF_BLUE_STRING_LISU_BOTTOM = 3506,
+    AF_BLUE_STRING_MALAYALAM_TOP = 3538,
+    AF_BLUE_STRING_MALAYALAM_BOTTOM = 3582,
+    AF_BLUE_STRING_MYANMAR_TOP = 3614,
+    AF_BLUE_STRING_MYANMAR_BOTTOM = 3646,
+    AF_BLUE_STRING_MYANMAR_ASCENDER = 3678,
+    AF_BLUE_STRING_MYANMAR_DESCENDER = 3706,
+    AF_BLUE_STRING_NKO_TOP = 3738,
+    AF_BLUE_STRING_NKO_BOTTOM = 3762,
+    AF_BLUE_STRING_NKO_SMALL_TOP = 3777,
+    AF_BLUE_STRING_NKO_SMALL_BOTTOM = 3786,
+    AF_BLUE_STRING_OL_CHIKI = 3798,
+    AF_BLUE_STRING_OLD_TURKIC_TOP = 3822,
+    AF_BLUE_STRING_OLD_TURKIC_BOTTOM = 3837,
+    AF_BLUE_STRING_OSAGE_CAPITAL_TOP = 3857,
+    AF_BLUE_STRING_OSAGE_CAPITAL_BOTTOM = 3897,
+    AF_BLUE_STRING_OSAGE_CAPITAL_DESCENDER = 3927,
+    AF_BLUE_STRING_OSAGE_SMALL_TOP = 3942,
+    AF_BLUE_STRING_OSAGE_SMALL_BOTTOM = 3982,
+    AF_BLUE_STRING_OSAGE_SMALL_ASCENDER = 4022,
+    AF_BLUE_STRING_OSAGE_SMALL_DESCENDER = 4047,
+    AF_BLUE_STRING_OSMANYA_TOP = 4062,
+    AF_BLUE_STRING_OSMANYA_BOTTOM = 4102,
+    AF_BLUE_STRING_SAURASHTRA_TOP = 4142,
+    AF_BLUE_STRING_SAURASHTRA_BOTTOM = 4174,
+    AF_BLUE_STRING_SHAVIAN_TOP = 4194,
+    AF_BLUE_STRING_SHAVIAN_BOTTOM = 4204,
+    AF_BLUE_STRING_SHAVIAN_DESCENDER = 4229,
+    AF_BLUE_STRING_SHAVIAN_SMALL_TOP = 4239,
+    AF_BLUE_STRING_SHAVIAN_SMALL_BOTTOM = 4274,
+    AF_BLUE_STRING_SINHALA_TOP = 4289,
+    AF_BLUE_STRING_SINHALA_BOTTOM = 4321,
+    AF_BLUE_STRING_SINHALA_DESCENDER = 4353,
+    AF_BLUE_STRING_SUNDANESE_TOP = 4397,
+    AF_BLUE_STRING_SUNDANESE_BOTTOM = 4421,
+    AF_BLUE_STRING_SUNDANESE_DESCENDER = 4453,
+    AF_BLUE_STRING_TAI_VIET_TOP = 4461,
+    AF_BLUE_STRING_TAI_VIET_BOTTOM = 4481,
+    AF_BLUE_STRING_TAMIL_TOP = 4493,
+    AF_BLUE_STRING_TAMIL_BOTTOM = 4525,
+    AF_BLUE_STRING_TELUGU_TOP = 4557,
+    AF_BLUE_STRING_TELUGU_BOTTOM = 4585,
+    AF_BLUE_STRING_THAI_TOP = 4613,
+    AF_BLUE_STRING_THAI_BOTTOM = 4637,
+    AF_BLUE_STRING_THAI_ASCENDER = 4665,
+    AF_BLUE_STRING_THAI_LARGE_ASCENDER = 4677,
+    AF_BLUE_STRING_THAI_DESCENDER = 4689,
+    AF_BLUE_STRING_THAI_LARGE_DESCENDER = 4705,
+    AF_BLUE_STRING_THAI_DIGIT_TOP = 4713,
+    AF_BLUE_STRING_TIFINAGH = 4725,
+    AF_BLUE_STRING_VAI_TOP = 4757,
+    AF_BLUE_STRING_VAI_BOTTOM = 4789,
+    af_blue_1_1 = 4820,
 #ifdef AF_CONFIG_OPTION_CJK
 #ifdef AF_CONFIG_OPTION_CJK
     AF_BLUE_STRING_CJK_TOP = af_blue_1_1 + 1,
     AF_BLUE_STRING_CJK_TOP = af_blue_1_1 + 1,
     AF_BLUE_STRING_CJK_BOTTOM = af_blue_1_1 + 203,
     AF_BLUE_STRING_CJK_BOTTOM = af_blue_1_1 + 203,
@@ -336,41 +338,41 @@ FT_BEGIN_HEADER
     AF_BLUE_STRINGSET_DSRT = 75,
     AF_BLUE_STRINGSET_DSRT = 75,
     AF_BLUE_STRINGSET_ETHI = 80,
     AF_BLUE_STRINGSET_ETHI = 80,
     AF_BLUE_STRINGSET_GEOR = 83,
     AF_BLUE_STRINGSET_GEOR = 83,
-    AF_BLUE_STRINGSET_GEOK = 88,
-    AF_BLUE_STRINGSET_GLAG = 95,
-    AF_BLUE_STRINGSET_GOTH = 100,
-    AF_BLUE_STRINGSET_GREK = 103,
-    AF_BLUE_STRINGSET_GUJR = 110,
-    AF_BLUE_STRINGSET_GURU = 116,
-    AF_BLUE_STRINGSET_HEBR = 122,
-    AF_BLUE_STRINGSET_KALI = 126,
-    AF_BLUE_STRINGSET_KHMR = 132,
-    AF_BLUE_STRINGSET_KHMS = 138,
-    AF_BLUE_STRINGSET_KNDA = 141,
-    AF_BLUE_STRINGSET_LAO = 144,
-    AF_BLUE_STRINGSET_LATN = 150,
-    AF_BLUE_STRINGSET_LATB = 157,
-    AF_BLUE_STRINGSET_LATP = 164,
-    AF_BLUE_STRINGSET_LISU = 171,
-    AF_BLUE_STRINGSET_MLYM = 174,
-    AF_BLUE_STRINGSET_MYMR = 177,
-    AF_BLUE_STRINGSET_NKOO = 182,
-    AF_BLUE_STRINGSET_NONE = 187,
-    AF_BLUE_STRINGSET_OLCK = 188,
-    AF_BLUE_STRINGSET_ORKH = 191,
-    AF_BLUE_STRINGSET_OSGE = 194,
-    AF_BLUE_STRINGSET_OSMA = 202,
-    AF_BLUE_STRINGSET_SAUR = 205,
-    AF_BLUE_STRINGSET_SHAW = 208,
-    AF_BLUE_STRINGSET_SINH = 214,
-    AF_BLUE_STRINGSET_SUND = 218,
-    AF_BLUE_STRINGSET_TAML = 222,
-    AF_BLUE_STRINGSET_TAVT = 225,
-    AF_BLUE_STRINGSET_TELU = 228,
-    AF_BLUE_STRINGSET_TFNG = 231,
-    AF_BLUE_STRINGSET_THAI = 234,
-    AF_BLUE_STRINGSET_VAII = 242,
-    af_blue_2_1 = 245,
+    AF_BLUE_STRINGSET_GEOK = 90,
+    AF_BLUE_STRINGSET_GLAG = 97,
+    AF_BLUE_STRINGSET_GOTH = 102,
+    AF_BLUE_STRINGSET_GREK = 105,
+    AF_BLUE_STRINGSET_GUJR = 112,
+    AF_BLUE_STRINGSET_GURU = 118,
+    AF_BLUE_STRINGSET_HEBR = 124,
+    AF_BLUE_STRINGSET_KALI = 128,
+    AF_BLUE_STRINGSET_KHMR = 134,
+    AF_BLUE_STRINGSET_KHMS = 140,
+    AF_BLUE_STRINGSET_KNDA = 143,
+    AF_BLUE_STRINGSET_LAO = 146,
+    AF_BLUE_STRINGSET_LATN = 152,
+    AF_BLUE_STRINGSET_LATB = 159,
+    AF_BLUE_STRINGSET_LATP = 166,
+    AF_BLUE_STRINGSET_LISU = 173,
+    AF_BLUE_STRINGSET_MLYM = 176,
+    AF_BLUE_STRINGSET_MYMR = 179,
+    AF_BLUE_STRINGSET_NKOO = 184,
+    AF_BLUE_STRINGSET_NONE = 189,
+    AF_BLUE_STRINGSET_OLCK = 190,
+    AF_BLUE_STRINGSET_ORKH = 193,
+    AF_BLUE_STRINGSET_OSGE = 196,
+    AF_BLUE_STRINGSET_OSMA = 204,
+    AF_BLUE_STRINGSET_SAUR = 207,
+    AF_BLUE_STRINGSET_SHAW = 210,
+    AF_BLUE_STRINGSET_SINH = 216,
+    AF_BLUE_STRINGSET_SUND = 220,
+    AF_BLUE_STRINGSET_TAML = 224,
+    AF_BLUE_STRINGSET_TAVT = 227,
+    AF_BLUE_STRINGSET_TELU = 230,
+    AF_BLUE_STRINGSET_TFNG = 233,
+    AF_BLUE_STRINGSET_THAI = 236,
+    AF_BLUE_STRINGSET_VAII = 244,
+    af_blue_2_1 = 247,
 #ifdef AF_CONFIG_OPTION_CJK
 #ifdef AF_CONFIG_OPTION_CJK
     AF_BLUE_STRINGSET_HANI = af_blue_2_1 + 0,
     AF_BLUE_STRINGSET_HANI = af_blue_2_1 + 0,
     af_blue_2_1_1 = af_blue_2_1 + 2,
     af_blue_2_1_1 = af_blue_2_1 + 2,

+ 1 - 1
thirdparty/freetype/src/autofit/afblue.hin

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    Auto-fitter data for blue strings (specification).                   */
 /*    Auto-fitter data for blue strings (specification).                   */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2013-2017 by                                                 */
+/*  Copyright 2013-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */

+ 3 - 3
thirdparty/freetype/src/autofit/afcjk.c

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    Auto-fitter hinting routines for CJK writing system (body).          */
 /*    Auto-fitter hinting routines for CJK writing system (body).          */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2006-2017 by                                                 */
+/*  Copyright 2006-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -16,9 +16,9 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
   /*
   /*
-   *  The algorithm is based on akito's autohint patch, available here:
+   *  The algorithm is based on akito's autohint patch, archived at
    *
    *
-   *  http://www.kde.gr.jp/~akito/patch/freetype2/
+   *  https://web.archive.org/web/20051219160454/http://www.kde.gr.jp:80/~akito/patch/freetype2/2.1.7/
    *
    *
    */
    */
 
 

+ 1 - 1
thirdparty/freetype/src/autofit/afcjk.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    Auto-fitter hinting routines for CJK writing system (specification). */
 /*    Auto-fitter hinting routines for CJK writing system (specification). */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2006-2017 by                                                 */
+/*  Copyright 2006-2018 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно