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

Revert "Update freetype to 2.10.0"

This reverts commit 9e2cf9ef0ba96ae23d417b32647c4ef0ba6ce9ad.

It caused this regression: 28335.
Fixes #28335.
Rémi Verschelde 6 жил өмнө
parent
commit
a24899ee25
100 өөрчлөгдсөн 14757 нэмэгдсэн , 13258 устгасан
  1. 1 0
      modules/freetype/SCsub
  2. 1 1
      thirdparty/README.md
  3. 208 212
      thirdparty/freetype/include/freetype/config/ftconfig.h
  4. 171 181
      thirdparty/freetype/include/freetype/config/ftheader.h
  5. 6 6
      thirdparty/freetype/include/freetype/config/ftmodule.h
  6. 462 463
      thirdparty/freetype/include/freetype/config/ftoption.h
  7. 80 80
      thirdparty/freetype/include/freetype/config/ftstdlib.h
  8. 506 499
      thirdparty/freetype/include/freetype/freetype.h
  9. 119 120
      thirdparty/freetype/include/freetype/ftadvanc.h
  10. 533 0
      thirdparty/freetype/include/freetype/ftautoh.h
  11. 64 65
      thirdparty/freetype/include/freetype/ftbbox.h
  12. 119 122
      thirdparty/freetype/include/freetype/ftbdf.h
  13. 174 264
      thirdparty/freetype/include/freetype/ftbitmap.h
  14. 70 70
      thirdparty/freetype/include/freetype/ftbzip2.h
  15. 408 436
      thirdparty/freetype/include/freetype/ftcache.h
  16. 321 0
      thirdparty/freetype/include/freetype/ftcffdrv.h
  17. 139 145
      thirdparty/freetype/include/freetype/ftchapters.h
  18. 51 51
      thirdparty/freetype/include/freetype/ftcid.h
  19. 0 311
      thirdparty/freetype/include/freetype/ftcolor.h
  20. 290 293
      thirdparty/freetype/include/freetype/ftdriver.h
  21. 51 50
      thirdparty/freetype/include/freetype/fterrdef.h
  22. 100 159
      thirdparty/freetype/include/freetype/fterrors.h
  23. 59 58
      thirdparty/freetype/include/freetype/ftfntfmt.h
  24. 36 38
      thirdparty/freetype/include/freetype/ftgasp.h
  25. 431 480
      thirdparty/freetype/include/freetype/ftglyph.h
  26. 246 244
      thirdparty/freetype/include/freetype/ftgxval.h
  27. 113 113
      thirdparty/freetype/include/freetype/ftgzip.h
  28. 466 489
      thirdparty/freetype/include/freetype/ftimage.h
  29. 69 70
      thirdparty/freetype/include/freetype/ftincrem.h
  30. 146 165
      thirdparty/freetype/include/freetype/ftlcdfil.h
  31. 200 221
      thirdparty/freetype/include/freetype/ftlist.h
  32. 68 69
      thirdparty/freetype/include/freetype/ftlzw.h
  33. 192 207
      thirdparty/freetype/include/freetype/ftmac.h
  34. 494 609
      thirdparty/freetype/include/freetype/ftmm.h
  35. 406 480
      thirdparty/freetype/include/freetype/ftmodapi.h
  36. 91 100
      thirdparty/freetype/include/freetype/ftmoderr.h
  37. 150 153
      thirdparty/freetype/include/freetype/ftotval.h
  38. 465 476
      thirdparty/freetype/include/freetype/ftoutln.h
  39. 50 49
      thirdparty/freetype/include/freetype/ftparams.h
  40. 105 0
      thirdparty/freetype/include/freetype/ftpcfdrv.h
  41. 125 133
      thirdparty/freetype/include/freetype/ftpfr.h
  42. 101 113
      thirdparty/freetype/include/freetype/ftrender.h
  43. 119 120
      thirdparty/freetype/include/freetype/ftsizes.h
  44. 187 207
      thirdparty/freetype/include/freetype/ftsnames.h
  45. 222 209
      thirdparty/freetype/include/freetype/ftstroke.h
  46. 19 19
      thirdparty/freetype/include/freetype/ftsynth.h
  47. 68 66
      thirdparty/freetype/include/freetype/ftsystem.h
  48. 42 42
      thirdparty/freetype/include/freetype/fttrigon.h
  49. 328 0
      thirdparty/freetype/include/freetype/ftttdrv.h
  50. 419 432
      thirdparty/freetype/include/freetype/fttypes.h
  51. 80 82
      thirdparty/freetype/include/freetype/ftwinfnt.h
  52. 169 157
      thirdparty/freetype/include/freetype/internal/autohint.h
  53. 44 44
      thirdparty/freetype/include/freetype/internal/cffotypes.h
  54. 45 50
      thirdparty/freetype/include/freetype/internal/cfftypes.h
  55. 90 156
      thirdparty/freetype/include/freetype/internal/ftcalc.h
  56. 110 138
      thirdparty/freetype/include/freetype/internal/ftdebug.h
  57. 400 0
      thirdparty/freetype/include/freetype/internal/ftdriver.h
  58. 224 112
      thirdparty/freetype/include/freetype/internal/ftdrv.h
  59. 30 25
      thirdparty/freetype/include/freetype/internal/ftgloadr.h
  60. 14 14
      thirdparty/freetype/include/freetype/internal/fthash.h
  61. 39 38
      thirdparty/freetype/include/freetype/internal/ftmemory.h
  62. 459 386
      thirdparty/freetype/include/freetype/internal/ftobjs.h
  63. 71 0
      thirdparty/freetype/include/freetype/internal/ftpic.h
  64. 16 16
      thirdparty/freetype/include/freetype/internal/ftpsprop.h
  65. 163 142
      thirdparty/freetype/include/freetype/internal/ftrfork.h
  66. 582 87
      thirdparty/freetype/include/freetype/internal/ftserv.h
  67. 35 60
      thirdparty/freetype/include/freetype/internal/ftstream.h
  68. 40 43
      thirdparty/freetype/include/freetype/internal/fttrace.h
  69. 41 41
      thirdparty/freetype/include/freetype/internal/ftvalid.h
  70. 23 22
      thirdparty/freetype/include/freetype/internal/internal.h
  71. 263 330
      thirdparty/freetype/include/freetype/internal/psaux.h
  72. 96 74
      thirdparty/freetype/include/freetype/internal/pshints.h
  73. 32 16
      thirdparty/freetype/include/freetype/internal/services/svbdf.h
  74. 38 16
      thirdparty/freetype/include/freetype/internal/services/svcfftl.h
  75. 37 16
      thirdparty/freetype/include/freetype/internal/services/svcid.h
  76. 19 19
      thirdparty/freetype/include/freetype/internal/services/svfntfmt.h
  77. 37 18
      thirdparty/freetype/include/freetype/internal/services/svgldict.h
  78. 25 25
      thirdparty/freetype/include/freetype/internal/services/svgxval.h
  79. 16 16
      thirdparty/freetype/include/freetype/internal/services/svkern.h
  80. 45 17
      thirdparty/freetype/include/freetype/internal/services/svmetric.h
  81. 83 67
      thirdparty/freetype/include/freetype/internal/services/svmm.h
  82. 16 16
      thirdparty/freetype/include/freetype/internal/services/svotval.h
  83. 16 16
      thirdparty/freetype/include/freetype/internal/services/svpfr.h
  84. 37 21
      thirdparty/freetype/include/freetype/internal/services/svpostnm.h
  85. 32 16
      thirdparty/freetype/include/freetype/internal/services/svprop.h
  86. 56 24
      thirdparty/freetype/include/freetype/internal/services/svpscmap.h
  87. 41 16
      thirdparty/freetype/include/freetype/internal/services/svpsinfo.h
  88. 32 17
      thirdparty/freetype/include/freetype/internal/services/svsfnt.h
  89. 55 39
      thirdparty/freetype/include/freetype/internal/services/svttcmap.h
  90. 17 17
      thirdparty/freetype/include/freetype/internal/services/svtteng.h
  91. 29 16
      thirdparty/freetype/include/freetype/internal/services/svttglyf.h
  92. 16 16
      thirdparty/freetype/include/freetype/internal/services/svwinfnt.h
  93. 407 550
      thirdparty/freetype/include/freetype/internal/sfnt.h
  94. 39 42
      thirdparty/freetype/include/freetype/internal/t1types.h
  95. 411 486
      thirdparty/freetype/include/freetype/internal/tttypes.h
  96. 306 310
      thirdparty/freetype/include/freetype/t1tables.h
  97. 69 69
      thirdparty/freetype/include/freetype/ttnameid.h
  98. 442 452
      thirdparty/freetype/include/freetype/tttables.h
  99. 16 18
      thirdparty/freetype/include/freetype/tttags.h
  100. 63 0
      thirdparty/freetype/include/freetype/ttunpat.h

+ 1 - 0
modules/freetype/SCsub

@@ -12,6 +12,7 @@ if env['builtin_freetype']:
     thirdparty_dir = "#thirdparty/freetype/"
     thirdparty_sources = [
         "src/autofit/autofit.c",
+        "src/base/ftapi.c",
         "src/base/ftbase.c",
         "src/base/ftbbox.c",
         "src/base/ftbdf.c",

+ 1 - 1
thirdparty/README.md

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

+ 208 - 212
thirdparty/freetype/include/freetype/config/ftconfig.h

@@ -1,38 +1,39 @@
-/****************************************************************************
- *
- * ftconfig.h
- *
- *   ANSI-specific configuration file (specification only).
- *
- * Copyright (C) 1996-2019 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.
- *
- */
-
-
-  /**************************************************************************
-   *
-   * This header file contains a number of macro definitions that are used by
-   * the rest of the engine.  Most of the macros here are automatically
-   * determined at compile time, and you should not need to change it to port
-   * FreeType, except to compile the library with a non-ANSI compiler.
-   *
-   * Note however that if some specific modifications are needed, we advise
-   * you to place a modified copy in your build directory.
-   *
-   * The build directory is usually `builds/<system>`, and contains
-   * system-specific files that are always included first when building the
-   * library.
-   *
-   * This ANSI version should stay in `include/config/`.
-   *
-   */
+/***************************************************************************/
+/*                                                                         */
+/*  ftconfig.h                                                             */
+/*                                                                         */
+/*    ANSI-specific configuration file (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.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* This header file contains a number of macro definitions that are used */
+  /* by the rest of the engine.  Most of the macros here are automatically */
+  /* determined at compile time, and you should not need to change it to   */
+  /* port FreeType, except to compile the library with a non-ANSI          */
+  /* compiler.                                                             */
+  /*                                                                       */
+  /* Note however that if some specific modifications are needed, we       */
+  /* advise you to place a modified copy in your build directory.          */
+  /*                                                                       */
+  /* The build directory is usually `builds/<system>', and contains        */
+  /* system-specific files that are always included first when building    */
+  /* the library.                                                          */
+  /*                                                                       */
+  /* This ANSI version should stay in `include/config/'.                   */
+  /*                                                                       */
+  /*************************************************************************/
 
 #ifndef FTCONFIG_H_
 #define FTCONFIG_H_
@@ -45,32 +46,32 @@
 FT_BEGIN_HEADER
 
 
-  /**************************************************************************
-   *
-   *              PLATFORM-SPECIFIC CONFIGURATION MACROS
-   *
-   * These macros can be toggled to suit a specific system.  The current ones
-   * are defaults used to compile FreeType in an ANSI C environment (16bit
-   * compilers are also supported).  Copy this file to your own
-   * `builds/<system>` directory, and edit it to port the engine.
-   *
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /*               PLATFORM-SPECIFIC CONFIGURATION MACROS                  */
+  /*                                                                       */
+  /* These macros can be toggled to suit a specific system.  The current   */
+  /* ones are defaults used to compile FreeType in an ANSI C environment   */
+  /* (16bit compilers are also supported).  Copy this file to your own     */
+  /* `builds/<system>' directory, and edit it to port the engine.          */
+  /*                                                                       */
+  /*************************************************************************/
 
 
-  /* There are systems (like the Texas Instruments 'C54x) where a `char`  */
-  /* has 16~bits.  ANSI~C says that `sizeof(char)` is always~1.  Since an */
-  /* `int` has 16~bits also for this system, `sizeof(int)` gives~1 which  */
-  /* is probably unexpected.                                              */
-  /*                                                                      */
-  /* `CHAR_BIT` (defined in `limits.h`) gives the number of bits in a     */
-  /* `char` type.                                                         */
+  /* There are systems (like the Texas Instruments 'C54x) where a `char' */
+  /* has 16 bits.  ANSI C says that sizeof(char) is always 1.  Since an  */
+  /* `int' has 16 bits also for this system, sizeof(int) gives 1 which   */
+  /* is probably unexpected.                                             */
+  /*                                                                     */
+  /* `CHAR_BIT' (defined in limits.h) gives the number of bits in a      */
+  /* `char' type.                                                        */
 
 #ifndef FT_CHAR_BIT
 #define FT_CHAR_BIT  CHAR_BIT
 #endif
 
 
-  /* The size of an `int` type. */
+  /* The size of an `int' type.  */
 #if                                 FT_UINT_MAX == 0xFFFFUL
 #define FT_SIZEOF_INT  ( 16 / FT_CHAR_BIT )
 #elif                               FT_UINT_MAX == 0xFFFFFFFFUL
@@ -81,7 +82,7 @@ FT_BEGIN_HEADER
 #error "Unsupported size of `int' type!"
 #endif
 
-  /* 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.                                   */
 #if                                  FT_ULONG_MAX == 0xFFFFFFFFUL
 #define FT_SIZEOF_LONG  ( 32 / FT_CHAR_BIT )
@@ -94,35 +95,35 @@ FT_BEGIN_HEADER
 #endif
 
 
-  /* `FT_UNUSED` indicates that a given parameter is not used --   */
-  /* this is only used to get rid of unpleasant compiler warnings. */
+  /* FT_UNUSED is a macro used to indicate that a given parameter is not  */
+  /* used -- this is only used to get rid of unpleasant compiler warnings */
 #ifndef FT_UNUSED
 #define FT_UNUSED( arg )  ( (arg) = (arg) )
 #endif
 
 
-  /**************************************************************************
-   *
-   *                    AUTOMATIC CONFIGURATION MACROS
-   *
-   * These macros are computed from the ones defined above.  Don't touch
-   * their definition, unless you know precisely what you are doing.  No
-   * porter should need to mess with them.
-   *
-   */
-
-
-  /**************************************************************************
-   *
-   * Mac support
-   *
-   *   This is the only necessary change, so it is defined here instead
-   *   providing a new configuration file.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /*                     AUTOMATIC CONFIGURATION MACROS                    */
+  /*                                                                       */
+  /* These macros are computed from the ones defined above.  Don't touch   */
+  /* their definition, unless you know precisely what you are doing.  No   */
+  /* porter should need to mess with them.                                 */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* Mac support                                                           */
+  /*                                                                       */
+  /*   This is the only necessary change, so it is defined here instead    */
+  /*   providing a new configuration file.                                 */
+  /*                                                                       */
 #if defined( __APPLE__ ) || ( defined( __MWERKS__ ) && defined( macintosh ) )
-  /* No Carbon frameworks for 64bit 10.4.x.                         */
-  /* `AvailabilityMacros.h` is available since Mac OS X 10.2,       */
-  /* so guess the system version by maximum errno before inclusion. */
+  /* no Carbon frameworks for 64bit 10.4.x */
+  /* AvailabilityMacros.h is available since Mac OS X 10.2,        */
+  /* so guess the system version by maximum errno before inclusion */
 #include <errno.h>
 #ifdef ECANCELED /* defined since 10.2 */
 #include "AvailabilityMacros.h"
@@ -142,7 +143,7 @@ FT_BEGIN_HEADER
 #endif
 
 
-  /* Fix compiler warning with sgi compiler. */
+  /* Fix compiler warning with sgi compiler */
 #if defined( __sgi ) && !defined( __GNUC__ )
 #if defined( _COMPILER_VERSION ) && ( _COMPILER_VERSION >= 730 )
 #pragma set woff 3505
@@ -150,33 +151,33 @@ FT_BEGIN_HEADER
 #endif
 
 
-  /**************************************************************************
-   *
-   * @section:
-   *   basic_types
-   *
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    basic_types                                                        */
+  /*                                                                       */
+  /*************************************************************************/
 
 
-  /**************************************************************************
-   *
-   * @type:
-   *   FT_Int16
-   *
-   * @description:
-   *   A typedef for a 16bit signed integer type.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_Int16                                                           */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A typedef for a 16bit signed integer type.                         */
+  /*                                                                       */
   typedef signed short  FT_Int16;
 
 
-  /**************************************************************************
-   *
-   * @type:
-   *   FT_UInt16
-   *
-   * @description:
-   *   A typedef for a 16bit unsigned integer type.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_UInt16                                                          */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A typedef for a 16bit unsigned integer type.                       */
+  /*                                                                       */
   typedef unsigned short  FT_UInt16;
 
   /* */
@@ -185,50 +186,50 @@ FT_BEGIN_HEADER
   /* this #if 0 ... #endif clause is for documentation purposes */
 #if 0
 
-  /**************************************************************************
-   *
-   * @type:
-   *   FT_Int32
-   *
-   * @description:
-   *   A typedef for a 32bit signed integer type.  The size depends on the
-   *   configuration.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_Int32                                                           */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A typedef for a 32bit signed integer type.  The size depends on    */
+  /*    the configuration.                                                 */
+  /*                                                                       */
   typedef signed XXX  FT_Int32;
 
 
-  /**************************************************************************
-   *
-   * @type:
-   *   FT_UInt32
-   *
-   *   A typedef for a 32bit unsigned integer type.  The size depends on the
-   *   configuration.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_UInt32                                                          */
+  /*                                                                       */
+  /*    A typedef for a 32bit unsigned integer type.  The size depends on  */
+  /*    the configuration.                                                 */
+  /*                                                                       */
   typedef unsigned XXX  FT_UInt32;
 
 
-  /**************************************************************************
-   *
-   * @type:
-   *   FT_Int64
-   *
-   *   A typedef for a 64bit signed integer type.  The size depends on the
-   *   configuration.  Only defined if there is real 64bit support;
-   *   otherwise, it gets emulated with a structure (if necessary).
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_Int64                                                           */
+  /*                                                                       */
+  /*    A typedef for a 64bit signed integer type.  The size depends on    */
+  /*    the configuration.  Only defined if there is real 64bit support;   */
+  /*    otherwise, it gets emulated with a structure (if necessary).       */
+  /*                                                                       */
   typedef signed XXX  FT_Int64;
 
 
-  /**************************************************************************
-   *
-   * @type:
-   *   FT_UInt64
-   *
-   *   A typedef for a 64bit unsigned integer type.  The size depends on the
-   *   configuration.  Only defined if there is real 64bit support;
-   *   otherwise, it gets emulated with a structure (if necessary).
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_UInt64                                                          */
+  /*                                                                       */
+  /*    A typedef for a 64bit unsigned integer type.  The size depends on  */
+  /*    the configuration.  Only defined if there is real 64bit support;   */
+  /*    otherwise, it gets emulated with a structure (if necessary).       */
+  /*                                                                       */
   typedef unsigned XXX  FT_UInt64;
 
   /* */
@@ -250,7 +251,7 @@ FT_BEGIN_HEADER
 #endif
 
 
-  /* 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 )
 
   typedef int            FT_Fast;
@@ -264,22 +265,22 @@ FT_BEGIN_HEADER
 #endif
 
 
-  /* determine whether we have a 64-bit `int` type for platforms without */
-  /* Autoconf                                                            */
+  /* determine whether we have a 64-bit int type for platforms without */
+  /* Autoconf                                                          */
 #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_INT64   long
 #define FT_UINT64  unsigned long
 
-  /**************************************************************************
-   *
-   * A 64-bit data type may create compilation problems if you compile in
-   * strict ANSI mode.  To avoid them, we disable other 64-bit data types if
-   * `__STDC__` is defined.  You can however ignore this rule by defining the
-   * `FT_CONFIG_OPTION_FORCE_INT64` configuration macro.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* A 64-bit data type may create compilation problems if you compile     */
+  /* in strict ANSI mode.  To avoid them, we disable other 64-bit data     */
+  /* types if __STDC__ is defined.  You can however ignore this rule       */
+  /* by defining the FT_CONFIG_OPTION_FORCE_INT64 configuration macro.     */
+  /*                                                                       */
 #elif !defined( __STDC__ ) || defined( FT_CONFIG_OPTION_FORCE_INT64 )
 
 #if defined( __STDC_VERSION__ ) && __STDC_VERSION__ >= 199901L
@@ -288,19 +289,19 @@ FT_BEGIN_HEADER
 #define FT_INT64   long long int
 #define FT_UINT64  unsigned long long int
 
-#elif defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */
+#elif defined( _MSC_VER ) && _MSC_VER >= 900  /* Visual C++ (and Intel C++) */
 
-  /* this compiler provides the `__int64` type */
+  /* this compiler provides the __int64 type */
 #define FT_LONG64
 #define FT_INT64   __int64
 #define FT_UINT64  unsigned __int64
 
 #elif defined( __BORLANDC__ )  /* Borland C++ */
 
-  /* XXXX: We should probably check the value of `__BORLANDC__` in order */
-  /*       to test the compiler version.                                 */
+  /* XXXX: We should probably check the value of __BORLANDC__ in order */
+  /*       to test the compiler version.                               */
 
-  /* this compiler provides the `__int64` type */
+  /* this compiler provides the __int64 type */
 #define FT_LONG64
 #define FT_INT64   __int64
 #define FT_UINT64  unsigned __int64
@@ -317,7 +318,7 @@ FT_BEGIN_HEADER
 
 #elif defined( __GNUC__ )
 
-  /* GCC provides the `long long` type */
+  /* GCC provides the `long long' type */
 #define FT_LONG64
 #define FT_INT64   long long int
 #define FT_UINT64  unsigned long long int
@@ -341,11 +342,11 @@ FT_BEGIN_HEADER
 #endif
 
 
-  /**************************************************************************
-   *
-   * miscellaneous
-   *
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* miscellaneous                                                         */
+  /*                                                                       */
+  /*************************************************************************/
 
 
 #define FT_BEGIN_STMNT  do {
@@ -353,7 +354,7 @@ FT_BEGIN_HEADER
 #define FT_DUMMY_STMNT  FT_BEGIN_STMNT FT_END_STMNT
 
 
-  /* `typeof` condition taken from gnulib's `intprops.h` header file */
+  /* typeof condition taken from gnulib's `intprops.h' header file */
 #if ( ( defined( __GNUC__ ) && __GNUC__ >= 2 )                       || \
       ( defined( __IBMC__ ) && __IBMC__ >= 1210 &&                      \
         defined( __IBM__TYPEOF__ ) )                                 || \
@@ -364,14 +365,14 @@ FT_BEGIN_HEADER
 #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`.                                               */
-  /*                                                                     */
+  /* 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
 
 #define FT_LOCAL( x )      static  x
@@ -393,12 +394,12 @@ FT_BEGIN_HEADER
 #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`.                                          */
-  /*                                                                      */
+  /* 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
 
 #ifdef __cplusplus
@@ -421,50 +422,45 @@ FT_BEGIN_HEADER
 #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`.                        */
-  /*                                                                   */
+  /*   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
 
 #ifdef FT2_BUILD_LIBRARY
 
-#if defined( _WIN32 ) && defined( DLL_EXPORT )
+#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( __SUNPRO_C ) && __SUNPRO_C >= 0x550
-#define FT_EXPORT( x )  __global  x
 #elif defined( __cplusplus )
 #define FT_EXPORT( x )  extern "C"  x
 #else
@@ -473,7 +469,7 @@ FT_BEGIN_HEADER
 
 #else
 
-#if defined( _WIN32 ) && defined( DLL_IMPORT )
+#if defined( FT2_DLLIMPORT )
 #define FT_EXPORT( x )  __declspec( dllimport )  x
 #elif defined( __cplusplus )
 #define FT_EXPORT( x )  extern "C"  x
@@ -512,7 +508,7 @@ FT_BEGIN_HEADER
   /* C++ compiler and with 16bit compilers.                          */
   /*                                                                 */
 
-  /* This is special.  Within C++, you must specify `extern "C"` for */
+  /* This is special.  Within C++, you must specify `extern "C"' for */
   /* functions which are used via function pointers, and you also    */
   /* must do that for structures which contain function pointers to  */
   /* assure C linkage -- it's not possible to have (local) anonymous */
@@ -535,7 +531,7 @@ FT_BEGIN_HEADER
   /*                                                                 */
   /*                                                                 */
   /* Some 16bit compilers have to redefine these macros to insert    */
-  /* the infamous `_cdecl` or `__fastcall` declarations.             */
+  /* the infamous `_cdecl' or `__fastcall' declarations.             */
   /*                                                                 */
 #ifndef FT_CALLBACK_DEF
 #ifdef __cplusplus

+ 171 - 181
thirdparty/freetype/include/freetype/config/ftheader.h

@@ -1,19 +1,19 @@
-/****************************************************************************
- *
- * ftheader.h
- *
- *   Build macros of the FreeType 2 library.
- *
- * Copyright (C) 1996-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  ftheader.h                                                             */
+/*                                                                         */
+/*    Build macros of the FreeType 2 library.                              */
+/*                                                                         */
+/*  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 FTHEADER_H_
 #define FTHEADER_H_
@@ -27,7 +27,7 @@
   /* <Description>                                                         */
   /*    This macro is used in association with @FT_END_HEADER in header    */
   /*    files to ensure that the declarations within are properly          */
-  /*    encapsulated in an `extern "C" { .. }` block when included from a  */
+  /*    encapsulated in an `extern "C" { .. }' block when included from a  */
   /*    C++ compiler.                                                      */
   /*                                                                       */
 #ifdef __cplusplus
@@ -45,7 +45,7 @@
   /* <Description>                                                         */
   /*    This macro is used in association with @FT_BEGIN_HEADER in header  */
   /*    files to ensure that the declarations within are properly          */
-  /*    encapsulated in an `extern "C" { .. }` block when included from a  */
+  /*    encapsulated in an `extern "C" { .. }' block when included from a  */
   /*    C++ compiler.                                                      */
   /*                                                                       */
 #ifdef __cplusplus
@@ -55,54 +55,54 @@
 #endif
 
 
-  /**************************************************************************
-   *
-   * Aliases for the FreeType 2 public and configuration files.
-   *
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* Aliases for the FreeType 2 public and configuration files.            */
+  /*                                                                       */
+  /*************************************************************************/
 
-  /**************************************************************************
-   *
-   * @section:
-   *   header_file_macros
-   *
-   * @title:
-   *   Header File Macros
-   *
-   * @abstract:
-   *   Macro definitions used to `#include` specific header files.
-   *
-   * @description:
-   *   The following macros are defined to the name of specific FreeType~2
-   *   header files.  They can be used directly in `#include` statements as
-   *   in:
-   *
-   *   ```
-   *     #include FT_FREETYPE_H
-   *     #include FT_MULTIPLE_MASTERS_H
-   *     #include FT_GLYPH_H
-   *   ```
-   *
-   *   There are several reasons why we are now using macros to name public
-   *   header files.  The first one is that such macros are not limited to
-   *   the infamous 8.3~naming rule required by DOS (and
-   *   `FT_MULTIPLE_MASTERS_H` is a lot more meaningful than `ftmm.h`).
-   *
-   *   The second reason is that it allows for more flexibility in the way
-   *   FreeType~2 is installed on a given system.
-   *
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    header_file_macros                                                 */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*    Header File Macros                                                 */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*    Macro definitions used to #include specific header files.          */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    The following macros are defined to the name of specific           */
+  /*    FreeType~2 header files.  They can be used directly in #include    */
+  /*    statements as in:                                                  */
+  /*                                                                       */
+  /*    {                                                                  */
+  /*      #include FT_FREETYPE_H                                           */
+  /*      #include FT_MULTIPLE_MASTERS_H                                   */
+  /*      #include FT_GLYPH_H                                              */
+  /*    }                                                                  */
+  /*                                                                       */
+  /*    There are several reasons why we are now using macros to name      */
+  /*    public header files.  The first one is that such macros are not    */
+  /*    limited to the infamous 8.3~naming rule required by DOS (and       */
+  /*    `FT_MULTIPLE_MASTERS_H' is a lot more meaningful than `ftmm.h').   */
+  /*                                                                       */
+  /*    The second reason is that it allows for more flexibility in the    */
+  /*    way FreeType~2 is installed on a given system.                     */
+  /*                                                                       */
+  /*************************************************************************/
 
 
   /* configuration files */
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_CONFIG_CONFIG_H
    *
    * @description:
-   *   A macro used in `#include` statements to name the file containing
+   *   A macro used in #include statements to name the file containing
    *   FreeType~2 configuration data.
    *
    */
@@ -111,13 +111,13 @@
 #endif
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_CONFIG_STANDARD_LIBRARY_H
    *
    * @description:
-   *   A macro used in `#include` statements to name the file containing
+   *   A macro used in #include statements to name the file containing
    *   FreeType~2 interface to the standard C library functions.
    *
    */
@@ -126,13 +126,13 @@
 #endif
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_CONFIG_OPTIONS_H
    *
    * @description:
-   *   A macro used in `#include` statements to name the file containing
+   *   A macro used in #include statements to name the file containing
    *   FreeType~2 project-specific configuration options.
    *
    */
@@ -141,13 +141,13 @@
 #endif
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_CONFIG_MODULES_H
    *
    * @description:
-   *   A macro used in `#include` statements to name the file containing the
+   *   A macro used in #include statements to name the file containing the
    *   list of FreeType~2 modules that are statically linked to new library
    *   instances in @FT_Init_FreeType.
    *
@@ -160,26 +160,26 @@
 
   /* public headers */
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_FREETYPE_H
    *
    * @description:
-   *   A macro used in `#include` statements to name the file containing the
+   *   A macro used in #include statements to name the file containing the
    *   base FreeType~2 API.
    *
    */
 #define FT_FREETYPE_H  <freetype/freetype.h>
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_ERRORS_H
    *
    * @description:
-   *   A macro used in `#include` statements to name the file containing the
+   *   A macro used in #include statements to name the file containing the
    *   list of FreeType~2 error codes (and messages).
    *
    *   It is included by @FT_FREETYPE_H.
@@ -188,26 +188,26 @@
 #define FT_ERRORS_H  <freetype/fterrors.h>
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_MODULE_ERRORS_H
    *
    * @description:
-   *   A macro used in `#include` statements to name the file containing the
+   *   A macro used in #include statements to name the file containing the
    *   list of FreeType~2 module error offsets (and messages).
    *
    */
 #define FT_MODULE_ERRORS_H  <freetype/ftmoderr.h>
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_SYSTEM_H
    *
    * @description:
-   *   A macro used in `#include` statements to name the file containing the
+   *   A macro used in #include statements to name the file containing the
    *   FreeType~2 interface to low-level operations (i.e., memory management
    *   and stream i/o).
    *
@@ -217,13 +217,13 @@
 #define FT_SYSTEM_H  <freetype/ftsystem.h>
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_IMAGE_H
    *
    * @description:
-   *   A macro used in `#include` statements to name the file containing type
+   *   A macro used in #include statements to name the file containing type
    *   definitions related to glyph images (i.e., bitmaps, outlines,
    *   scan-converter parameters).
    *
@@ -233,13 +233,13 @@
 #define FT_IMAGE_H  <freetype/ftimage.h>
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_TYPES_H
    *
    * @description:
-   *   A macro used in `#include` statements to name the file containing the
+   *   A macro used in #include statements to name the file containing the
    *   basic data types defined by FreeType~2.
    *
    *   It is included by @FT_FREETYPE_H.
@@ -248,13 +248,13 @@
 #define FT_TYPES_H  <freetype/fttypes.h>
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_LIST_H
    *
    * @description:
-   *   A macro used in `#include` statements to name the file containing the
+   *   A macro used in #include statements to name the file containing the
    *   list management API of FreeType~2.
    *
    *   (Most applications will never need to include this file.)
@@ -263,151 +263,151 @@
 #define FT_LIST_H  <freetype/ftlist.h>
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_OUTLINE_H
    *
    * @description:
-   *   A macro used in `#include` statements to name the file containing the
+   *   A macro used in #include statements to name the file containing the
    *   scalable outline management API of FreeType~2.
    *
    */
 #define FT_OUTLINE_H  <freetype/ftoutln.h>
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_SIZES_H
    *
    * @description:
-   *   A macro used in `#include` statements to name the file containing the
+   *   A macro used in #include statements to name the file containing the
    *   API which manages multiple @FT_Size objects per face.
    *
    */
 #define FT_SIZES_H  <freetype/ftsizes.h>
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_MODULE_H
    *
    * @description:
-   *   A macro used in `#include` statements to name the file containing the
+   *   A macro used in #include statements to name the file containing the
    *   module management API of FreeType~2.
    *
    */
 #define FT_MODULE_H  <freetype/ftmodapi.h>
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_RENDER_H
    *
    * @description:
-   *   A macro used in `#include` statements to name the file containing the
+   *   A macro used in #include statements to name the file containing the
    *   renderer module management API of FreeType~2.
    *
    */
 #define FT_RENDER_H  <freetype/ftrender.h>
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_DRIVER_H
    *
    * @description:
-   *   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 driver modules.
    *
    */
 #define FT_DRIVER_H  <freetype/ftdriver.h>
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_AUTOHINTER_H
    *
    * @description:
-   *   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.
    *
-   *   Deprecated since version~2.9; use @FT_DRIVER_H instead.
+   *   Deprecated since version 2.9; use @FT_DRIVER_H instead.
    *
    */
 #define FT_AUTOHINTER_H  FT_DRIVER_H
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_CFF_DRIVER_H
    *
    * @description:
-   *   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.
    *
-   *   Deprecated since version~2.9; use @FT_DRIVER_H instead.
+   *   Deprecated since version 2.9; use @FT_DRIVER_H instead.
    *
    */
 #define FT_CFF_DRIVER_H  FT_DRIVER_H
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_TRUETYPE_DRIVER_H
    *
    * @description:
-   *   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.
    *
-   *   Deprecated since version~2.9; use @FT_DRIVER_H instead.
+   *   Deprecated since version 2.9; use @FT_DRIVER_H instead.
    *
    */
 #define FT_TRUETYPE_DRIVER_H  FT_DRIVER_H
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_PCF_DRIVER_H
    *
    * @description:
-   *   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.
    *
-   *   Deprecated since version~2.9; use @FT_DRIVER_H instead.
+   *   Deprecated since version 2.9; use @FT_DRIVER_H instead.
    *
    */
 #define FT_PCF_DRIVER_H  FT_DRIVER_H
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_TYPE1_TABLES_H
    *
    * @description:
-   *   A macro used in `#include` statements to name the file containing the
+   *   A macro used in #include statements to name the file containing the
    *   types and API specific to the Type~1 format.
    *
    */
 #define FT_TYPE1_TABLES_H  <freetype/t1tables.h>
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_TRUETYPE_IDS_H
    *
    * @description:
-   *   A macro used in `#include` statements to name the file containing the
+   *   A macro used in #include statements to name the file containing the
    *   enumeration values which identify name strings, languages, encodings,
    *   etc.  This file really contains a _large_ set of constant macro
    *   definitions, taken from the TrueType and OpenType specifications.
@@ -416,172 +416,174 @@
 #define FT_TRUETYPE_IDS_H  <freetype/ttnameid.h>
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_TRUETYPE_TABLES_H
    *
    * @description:
-   *   A macro used in `#include` statements to name the file containing the
+   *   A macro used in #include statements to name the file containing the
    *   types and API specific to the TrueType (as well as OpenType) format.
    *
    */
 #define FT_TRUETYPE_TABLES_H  <freetype/tttables.h>
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_TRUETYPE_TAGS_H
    *
    * @description:
-   *   A macro used in `#include` statements to name the file containing the
-   *   definitions of TrueType four-byte 'tags' which identify blocks in
+   *   A macro used in #include statements to name the file containing the
+   *   definitions of TrueType four-byte `tags' which identify blocks in
    *   SFNT-based font formats (i.e., TrueType and OpenType).
    *
    */
 #define FT_TRUETYPE_TAGS_H  <freetype/tttags.h>
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_BDF_H
    *
    * @description:
-   *   A macro used in `#include` statements to name the file containing the
-   *   definitions of an API which accesses BDF-specific strings from a face.
+   *   A macro used in #include statements to name the file containing the
+   *   definitions of an API which accesses BDF-specific strings from a
+   *   face.
    *
    */
 #define FT_BDF_H  <freetype/ftbdf.h>
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_CID_H
    *
    * @description:
-   *   A macro used in `#include` statements to name the file containing the
-   *   definitions of an API which access CID font information from a face.
+   *   A macro used in #include statements to name the file containing the
+   *   definitions of an API which access CID font information from a
+   *   face.
    *
    */
 #define FT_CID_H  <freetype/ftcid.h>
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_GZIP_H
    *
    * @description:
-   *   A macro used in `#include` statements to name the file containing the
+   *   A macro used in #include statements to name the file containing the
    *   definitions of an API which supports gzip-compressed files.
    *
    */
 #define FT_GZIP_H  <freetype/ftgzip.h>
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_LZW_H
    *
    * @description:
-   *   A macro used in `#include` statements to name the file containing the
+   *   A macro used in #include statements to name the file containing the
    *   definitions of an API which supports LZW-compressed files.
    *
    */
 #define FT_LZW_H  <freetype/ftlzw.h>
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_BZIP2_H
    *
    * @description:
-   *   A macro used in `#include` statements to name the file containing the
+   *   A macro used in #include statements to name the file containing the
    *   definitions of an API which supports bzip2-compressed files.
    *
    */
 #define FT_BZIP2_H  <freetype/ftbzip2.h>
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_WINFONTS_H
    *
    * @description:
-   *   A macro used in `#include` statements to name the file containing the
+   *   A macro used in #include statements to name the file containing the
    *   definitions of an API which supports Windows FNT files.
    *
    */
 #define FT_WINFONTS_H   <freetype/ftwinfnt.h>
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_GLYPH_H
    *
    * @description:
-   *   A macro used in `#include` statements to name the file containing the
+   *   A macro used in #include statements to name the file containing the
    *   API of the optional glyph management component.
    *
    */
 #define FT_GLYPH_H  <freetype/ftglyph.h>
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_BITMAP_H
    *
    * @description:
-   *   A macro used in `#include` statements to name the file containing the
+   *   A macro used in #include statements to name the file containing the
    *   API of the optional bitmap conversion component.
    *
    */
 #define FT_BITMAP_H  <freetype/ftbitmap.h>
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_BBOX_H
    *
    * @description:
-   *   A macro used in `#include` statements to name the file containing the
+   *   A macro used in #include statements to name the file containing the
    *   API of the optional exact bounding box computation routines.
    *
    */
 #define FT_BBOX_H  <freetype/ftbbox.h>
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_CACHE_H
    *
    * @description:
-   *   A macro used in `#include` statements to name the file containing the
+   *   A macro used in #include statements to name the file containing the
    *   API of the optional FreeType~2 cache sub-system.
    *
    */
 #define FT_CACHE_H  <freetype/ftcache.h>
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_MAC_H
    *
    * @description:
-   *   A macro used in `#include` statements to name the file containing the
-   *   Macintosh-specific FreeType~2 API.  The latter is used to access fonts
-   *   embedded in resource forks.
+   *   A macro used in #include statements to name the file containing the
+   *   Macintosh-specific FreeType~2 API.  The latter is used to access
+   *   fonts embedded in resource forks.
    *
    *   This header file must be explicitly included by client applications
    *   compiled on the Mac (note that the base API still works though).
@@ -590,105 +592,105 @@
 #define FT_MAC_H  <freetype/ftmac.h>
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_MULTIPLE_MASTERS_H
    *
    * @description:
-   *   A macro used in `#include` statements to name the file containing the
+   *   A macro used in #include statements to name the file containing the
    *   optional multiple-masters management API of FreeType~2.
    *
    */
 #define FT_MULTIPLE_MASTERS_H  <freetype/ftmm.h>
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_SFNT_NAMES_H
    *
    * @description:
-   *   A macro used in `#include` statements to name the file containing the
-   *   optional FreeType~2 API which accesses embedded 'name' strings in
+   *   A macro used in #include statements to name the file containing the
+   *   optional FreeType~2 API which accesses embedded `name' strings in
    *   SFNT-based font formats (i.e., TrueType and OpenType).
    *
    */
 #define FT_SFNT_NAMES_H  <freetype/ftsnames.h>
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_OPENTYPE_VALIDATE_H
    *
    * @description:
-   *   A macro used in `#include` statements to name the file containing the
-   *   optional FreeType~2 API which validates OpenType tables ('BASE',
-   *   'GDEF', 'GPOS', 'GSUB', 'JSTF').
+   *   A macro used in #include statements to name the file containing the
+   *   optional FreeType~2 API which validates OpenType tables (BASE, GDEF,
+   *   GPOS, GSUB, JSTF).
    *
    */
 #define FT_OPENTYPE_VALIDATE_H  <freetype/ftotval.h>
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_GX_VALIDATE_H
    *
    * @description:
-   *   A macro used in `#include` statements to name the file containing the
-   *   optional FreeType~2 API which validates TrueTypeGX/AAT tables ('feat',
-   *   'mort', 'morx', 'bsln', 'just', 'kern', 'opbd', 'trak', 'prop').
+   *   A macro used in #include statements to name the file containing the
+   *   optional FreeType~2 API which validates TrueTypeGX/AAT tables (feat,
+   *   mort, morx, bsln, just, kern, opbd, trak, prop).
    *
    */
 #define FT_GX_VALIDATE_H  <freetype/ftgxval.h>
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_PFR_H
    *
    * @description:
-   *   A macro used in `#include` statements to name the file containing the
+   *   A macro used in #include statements to name the file containing the
    *   FreeType~2 API which accesses PFR-specific data.
    *
    */
 #define FT_PFR_H  <freetype/ftpfr.h>
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_STROKER_H
    *
    * @description:
-   *   A macro used in `#include` statements to name the file containing the
+   *   A macro used in #include statements to name the file containing the
    *   FreeType~2 API which provides functions to stroke outline paths.
    */
 #define FT_STROKER_H  <freetype/ftstroke.h>
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_SYNTHESIS_H
    *
    * @description:
-   *   A macro used in `#include` statements to name the file containing the
+   *   A macro used in #include statements to name the file containing the
    *   FreeType~2 API which performs artificial obliquing and emboldening.
    */
 #define FT_SYNTHESIS_H  <freetype/ftsynth.h>
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_FONT_FORMATS_H
    *
    * @description:
-   *   A macro used in `#include` statements to name the file containing the
+   *   A macro used in #include statements to name the file containing the
    *   FreeType~2 API which provides functions specific to font formats.
    */
 #define FT_FONT_FORMATS_H  <freetype/ftfntfmt.h>
@@ -697,79 +699,67 @@
 #define FT_XFREE86_H  FT_FONT_FORMATS_H
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_TRIGONOMETRY_H
    *
    * @description:
-   *   A macro used in `#include` statements to name the file containing the
+   *   A macro used in #include statements to name the file containing the
    *   FreeType~2 API which performs trigonometric computations (e.g.,
    *   cosines and arc tangents).
    */
 #define FT_TRIGONOMETRY_H  <freetype/fttrigon.h>
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_LCD_FILTER_H
    *
    * @description:
-   *   A macro used in `#include` statements to name the file containing the
+   *   A macro used in #include statements to name the file containing the
    *   FreeType~2 API which performs color filtering for subpixel rendering.
    */
 #define FT_LCD_FILTER_H  <freetype/ftlcdfil.h>
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_INCREMENTAL_H
    *
    * @description:
-   *   A macro used in `#include` statements to name the file containing the
+   *   A macro used in #include statements to name the file containing the
    *   FreeType~2 API which performs incremental glyph loading.
    */
 #define FT_INCREMENTAL_H  <freetype/ftincrem.h>
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_GASP_H
    *
    * @description:
-   *   A macro used in `#include` statements to name the file containing the
+   *   A macro used in #include statements to name the file containing the
    *   FreeType~2 API which returns entries from the TrueType GASP table.
    */
 #define FT_GASP_H  <freetype/ftgasp.h>
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_ADVANCES_H
    *
    * @description:
-   *   A macro used in `#include` statements to name the file containing the
+   *   A macro used in #include statements to name the file containing the
    *   FreeType~2 API which returns individual and ranged glyph advances.
    */
 #define FT_ADVANCES_H  <freetype/ftadvanc.h>
 
 
-  /**************************************************************************
-   *
-   * @macro:
-   *   FT_COLOR_H
-   *
-   * @description:
-   *   A macro used in `#include` statements to name the file containing the
-   *   FreeType~2 API which handles the OpenType 'CPAL' table.
-   */
-#define FT_COLOR_H  <freetype/ftcolor.h>
-
-
   /* */
 
   /* These header files don't need to be included by the user. */
@@ -780,14 +770,14 @@
 #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. */
+  /* 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 */
-  /* default to `FT_CACHE_H` at the moment just in case, but we know  */
-  /* of no rogue client that uses them.                               */
+  /* default to FT_CACHE_H at the moment just in case, but we know of */
+  /* no rogue client that uses them.                                  */
   /*                                                                  */
 #define FT_CACHE_MANAGER_H           FT_CACHE_H
 #define FT_CACHE_INTERNAL_MRU_H      FT_CACHE_H
@@ -799,8 +789,8 @@
 
 
   /*
-   * Include internal headers definitions from `<internal/...>` only when
-   * building the library.
+   * Include internal headers definitions from <internal/...>
+   * only when building the library.
    */
 #ifdef FT2_BUILD_LIBRARY
 #define  FT_INTERNAL_INTERNAL_H  <freetype/internal/internal.h>

+ 6 - 6
thirdparty/freetype/include/freetype/config/ftmodule.h

@@ -1,12 +1,12 @@
 /*
- * This file registers the FreeType modules compiled into the library.
+ *  This file registers the FreeType modules compiled into the library.
  *
- * If you use GNU make, this file IS NOT USED!  Instead, it is created in
- * the objects directory (normally `<topdir>/objs/`) based on information
- * from `<topdir>/modules.cfg`.
+ *  If you use GNU make, this file IS NOT USED!  Instead, it is created in
+ *  the objects directory (normally `<topdir>/objs/') based on information
+ *  from `<topdir>/modules.cfg'.
  *
- * Please read `docs/INSTALL.ANY` and `docs/CUSTOMIZE` how to compile
- * FreeType without GNU make.
+ *  Please read `docs/INSTALL.ANY' and `docs/CUSTOMIZE' how to compile
+ *  FreeType without GNU make.
  *
  */
 

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 462 - 463
thirdparty/freetype/include/freetype/config/ftoption.h


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

@@ -1,31 +1,31 @@
-/****************************************************************************
- *
- * ftstdlib.h
- *
- *   ANSI-specific library and header configuration file (specification
- *   only).
- *
- * Copyright (C) 2002-2019 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.
- *
- */
-
-
-  /**************************************************************************
-   *
-   * This file is used to group all `#includes` to the ANSI~C library that
-   * FreeType normally requires.  It also defines macros to rename the
-   * standard functions within the FreeType source code.
-   *
-   * Load a file which defines `FTSTDLIB_H_` before this one to override it.
-   *
-   */
+/***************************************************************************/
+/*                                                                         */
+/*  ftstdlib.h                                                             */
+/*                                                                         */
+/*    ANSI-specific library and header configuration file (specification   */
+/*    only).                                                               */
+/*                                                                         */
+/*  Copyright 2002-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.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* This file is used to group all #includes to the ANSI C library that   */
+  /* FreeType normally requires.  It also defines macros to rename the     */
+  /* standard functions within the FreeType source code.                   */
+  /*                                                                       */
+  /* Load a file which defines FTSTDLIB_H_ before this one to override it. */
+  /*                                                                       */
+  /*************************************************************************/
 
 
 #ifndef FTSTDLIB_H_
@@ -37,23 +37,23 @@
 #define ft_ptrdiff_t  ptrdiff_t
 
 
-  /**************************************************************************
-   *
-   *                          integer limits
-   *
-   * `UINT_MAX` and `ULONG_MAX` are used to automatically compute the size of
-   * `int` and `long` in bytes at compile-time.  So far, this works for all
-   * platforms the library has been tested on.
-   *
-   * Note that on the extremely rare platforms that do not provide integer
-   * types that are _exactly_ 16 and 32~bits wide (e.g., some old Crays where
-   * `int` is 36~bits), we do not make any guarantee about the correct
-   * behaviour of FreeType~2 with all fonts.
-   *
-   * In these cases, `ftconfig.h` will refuse to compile anyway with a
-   * message like 'couldn't find 32-bit type' or something similar.
-   *
-   */
+  /**********************************************************************/
+  /*                                                                    */
+  /*                           integer limits                           */
+  /*                                                                    */
+  /* UINT_MAX and ULONG_MAX are used to automatically compute the size  */
+  /* of `int' and `long' in bytes at compile-time.  So far, this works  */
+  /* for all platforms the library has been tested on.                  */
+  /*                                                                    */
+  /* Note that on the extremely rare platforms that do not provide      */
+  /* integer types that are _exactly_ 16 and 32 bits wide (e.g. some    */
+  /* old Crays where `int' is 36 bits), we do not make any guarantee    */
+  /* about the correct behaviour of FT2 with all fonts.                 */
+  /*                                                                    */
+  /* In these case, `ftconfig.h' will refuse to compile anyway with a   */
+  /* message like `couldn't find 32-bit type' or something similar.     */
+  /*                                                                    */
+  /**********************************************************************/
 
 
 #include <limits.h>
@@ -68,11 +68,11 @@
 #define FT_ULONG_MAX   ULONG_MAX
 
 
-  /**************************************************************************
-   *
-   *                character and string processing
-   *
-   */
+  /**********************************************************************/
+  /*                                                                    */
+  /*                 character and string processing                    */
+  /*                                                                    */
+  /**********************************************************************/
 
 
 #include <string.h>
@@ -92,11 +92,11 @@
 #define ft_strstr   strstr
 
 
-  /**************************************************************************
-   *
-   *                          file handling
-   *
-   */
+  /**********************************************************************/
+  /*                                                                    */
+  /*                           file handling                            */
+  /*                                                                    */
+  /**********************************************************************/
 
 
 #include <stdio.h>
@@ -110,11 +110,11 @@
 #define ft_sprintf  sprintf
 
 
-  /**************************************************************************
-   *
-   *                            sorting
-   *
-   */
+  /**********************************************************************/
+  /*                                                                    */
+  /*                             sorting                                */
+  /*                                                                    */
+  /**********************************************************************/
 
 
 #include <stdlib.h>
@@ -122,11 +122,11 @@
 #define ft_qsort  qsort
 
 
-  /**************************************************************************
-   *
-   *                       memory allocation
-   *
-   */
+  /**********************************************************************/
+  /*                                                                    */
+  /*                        memory allocation                           */
+  /*                                                                    */
+  /**********************************************************************/
 
 
 #define ft_scalloc   calloc
@@ -135,36 +135,36 @@
 #define ft_srealloc  realloc
 
 
-  /**************************************************************************
-   *
-   *                         miscellaneous
-   *
-   */
+  /**********************************************************************/
+  /*                                                                    */
+  /*                          miscellaneous                             */
+  /*                                                                    */
+  /**********************************************************************/
 
 
 #define ft_strtol  strtol
 #define ft_getenv  getenv
 
 
-  /**************************************************************************
-   *
-   *                        execution control
-   *
-   */
+  /**********************************************************************/
+  /*                                                                    */
+  /*                         execution control                          */
+  /*                                                                    */
+  /**********************************************************************/
 
 
 #include <setjmp.h>
 
-#define ft_jmp_buf     jmp_buf  /* note: this cannot be a typedef since  */
-                                /*       `jmp_buf` is defined as a macro */
-                                /*       on certain platforms            */
+#define ft_jmp_buf     jmp_buf  /* note: this cannot be a typedef since */
+                                /*       jmp_buf is defined as a macro  */
+                                /*       on certain platforms           */
 
 #define ft_longjmp     longjmp
 #define ft_setjmp( b ) setjmp( *(ft_jmp_buf*) &(b) ) /* same thing here */
 
 
-  /* The following is only used for debugging purposes, i.e., if   */
-  /* `FT_DEBUG_LEVEL_ERROR` or `FT_DEBUG_LEVEL_TRACE` are defined. */
+  /* the following is only used for debugging purposes, i.e., if */
+  /* FT_DEBUG_LEVEL_ERROR or FT_DEBUG_LEVEL_TRACE are defined    */
 
 #include <stdarg.h>
 

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 506 - 499
thirdparty/freetype/include/freetype/freetype.h


+ 119 - 120
thirdparty/freetype/include/freetype/ftadvanc.h

@@ -1,19 +1,19 @@
-/****************************************************************************
- *
- * ftadvanc.h
- *
- *   Quick computation of advance widths (specification only).
- *
- * Copyright (C) 2008-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  ftadvanc.h                                                             */
+/*                                                                         */
+/*    Quick computation of advance widths (specification only).            */
+/*                                                                         */
+/*  Copyright 2008-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 FTADVANC_H_
@@ -56,67 +56,68 @@ FT_BEGIN_HEADER
    */
 
 
-  /**************************************************************************
-   *
-   * @enum:
-   *   FT_ADVANCE_FLAG_FAST_ONLY
-   *
-   * @description:
-   *   A bit-flag to be OR-ed with the `flags` parameter of the
-   *   @FT_Get_Advance and @FT_Get_Advances functions.
-   *
-   *   If set, it indicates that you want these functions to fail if the
-   *   corresponding hinting mode or font driver doesn't allow for very quick
-   *   advance computation.
-   *
-   *   Typically, glyphs that are either unscaled, unhinted, bitmapped, or
-   *   light-hinted can have their advance width computed very quickly.
-   *
-   *   Normal and bytecode hinted modes that require loading, scaling, and
-   *   hinting of the glyph outline, are extremely slow by comparison.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Const>                                                               */
+  /*    FT_ADVANCE_FLAG_FAST_ONLY                                          */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A bit-flag to be OR-ed with the `flags' parameter of the           */
+  /*    @FT_Get_Advance and @FT_Get_Advances functions.                    */
+  /*                                                                       */
+  /*    If set, it indicates that you want these functions to fail if the  */
+  /*    corresponding hinting mode or font driver doesn't allow for very   */
+  /*    quick advance computation.                                         */
+  /*                                                                       */
+  /*    Typically, glyphs that are either unscaled, unhinted, bitmapped,   */
+  /*    or light-hinted can have their advance width computed very         */
+  /*    quickly.                                                           */
+  /*                                                                       */
+  /*    Normal and bytecode hinted modes that require loading, scaling,    */
+  /*    and hinting of the glyph outline, are extremely slow by            */
+  /*    comparison.                                                        */
+  /*                                                                       */
 #define FT_ADVANCE_FLAG_FAST_ONLY  0x20000000L
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Get_Advance
-   *
-   * @description:
-   *   Retrieve the advance value of a given glyph outline in an @FT_Face.
-   *
-   * @input:
-   *   face ::
-   *     The source @FT_Face handle.
-   *
-   *   gindex ::
-   *     The glyph index.
-   *
-   *   load_flags ::
-   *     A set of bit flags similar to those used when calling
-   *     @FT_Load_Glyph, used to determine what kind of advances you need.
-   * @output:
-   *   padvance ::
-   *     The advance value.  If scaling is performed (based on the value of
-   *     `load_flags`), the advance value is in 16.16 format.  Otherwise, it
-   *     is in font units.
-   *
-   *     If @FT_LOAD_VERTICAL_LAYOUT is set, this is the vertical advance
-   *     corresponding to a vertical layout.  Otherwise, it is the horizontal
-   *     advance in a horizontal layout.
-   *
-   * @return:
-   *   FreeType error code.  0 means success.
-   *
-   * @note:
-   *   This function may fail if you use @FT_ADVANCE_FLAG_FAST_ONLY and if
-   *   the corresponding font backend doesn't have a quick way to retrieve
-   *   the advances.
-   *
-   *   A scaled advance is returned in 16.16 format but isn't transformed by
-   *   the affine transformation specified by @FT_Set_Transform.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Get_Advance                                                     */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Retrieve the advance value of a given glyph outline in an          */
+  /*    @FT_Face.                                                          */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face       :: The source @FT_Face handle.                          */
+  /*                                                                       */
+  /*    gindex     :: The glyph index.                                     */
+  /*                                                                       */
+  /*    load_flags :: A set of bit flags similar to those used when        */
+  /*                  calling @FT_Load_Glyph, used to determine what kind  */
+  /*                  of advances you need.                                */
+  /* <Output>                                                              */
+  /*    padvance :: The advance value.  If scaling is performed (based on  */
+  /*                the value of `load_flags'), the advance value is in    */
+  /*                16.16 format.  Otherwise, it is in font units.         */
+  /*                                                                       */
+  /*                If @FT_LOAD_VERTICAL_LAYOUT is set, this is the        */
+  /*                vertical advance corresponding to a vertical layout.   */
+  /*                Otherwise, it is the horizontal advance in a           */
+  /*                horizontal layout.                                     */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    This function may fail if you use @FT_ADVANCE_FLAG_FAST_ONLY and   */
+  /*    if the corresponding font backend doesn't have a quick way to      */
+  /*    retrieve the advances.                                             */
+  /*                                                                       */
+  /*    A scaled advance is returned in 16.16 format but isn't transformed */
+  /*    by the affine transformation specified by @FT_Set_Transform.       */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_Get_Advance( FT_Face    face,
                   FT_UInt    gindex,
@@ -124,52 +125,50 @@ FT_BEGIN_HEADER
                   FT_Fixed  *padvance );
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Get_Advances
-   *
-   * @description:
-   *   Retrieve the advance values of several glyph outlines in an @FT_Face.
-   *
-   * @input:
-   *   face ::
-   *     The source @FT_Face handle.
-   *
-   *   start ::
-   *     The first glyph index.
-   *
-   *   count ::
-   *     The number of advance values you want to retrieve.
-   *
-   *   load_flags ::
-   *     A set of bit flags similar to those used when calling
-   *     @FT_Load_Glyph.
-   *
-   * @output:
-   *   padvance ::
-   *     The advance values.  This array, to be provided by the caller, must
-   *     contain at least `count` elements.
-   *
-   *     If scaling is performed (based on the value of `load_flags`), the
-   *     advance values are in 16.16 format.  Otherwise, they are in font
-   *     units.
-   *
-   *     If @FT_LOAD_VERTICAL_LAYOUT is set, these are the vertical advances
-   *     corresponding to a vertical layout.  Otherwise, they are the
-   *     horizontal advances in a horizontal layout.
-   *
-   * @return:
-   *   FreeType error code.  0 means success.
-   *
-   * @note:
-   *   This function may fail if you use @FT_ADVANCE_FLAG_FAST_ONLY and if
-   *   the corresponding font backend doesn't have a quick way to retrieve
-   *   the advances.
-   *
-   *   Scaled advances are returned in 16.16 format but aren't transformed by
-   *   the affine transformation specified by @FT_Set_Transform.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Get_Advances                                                    */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Retrieve the advance values of several glyph outlines in an        */
+  /*    @FT_Face.                                                          */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face        :: The source @FT_Face handle.                         */
+  /*                                                                       */
+  /*    start       :: The first glyph index.                              */
+  /*                                                                       */
+  /*    count       :: The number of advance values you want to retrieve.  */
+  /*                                                                       */
+  /*    load_flags  :: A set of bit flags similar to those used when       */
+  /*                   calling @FT_Load_Glyph.                             */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    padvance :: The advance values.  This array, to be provided by the */
+  /*                caller, must contain at least `count' elements.        */
+  /*                                                                       */
+  /*                If scaling is performed (based on the value of         */
+  /*                `load_flags'), the advance values are in 16.16 format. */
+  /*                Otherwise, they are in font units.                     */
+  /*                                                                       */
+  /*                If @FT_LOAD_VERTICAL_LAYOUT is set, these are the      */
+  /*                vertical advances corresponding to a vertical layout.  */
+  /*                Otherwise, they are the horizontal advances in a       */
+  /*                horizontal layout.                                     */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    This function may fail if you use @FT_ADVANCE_FLAG_FAST_ONLY and   */
+  /*    if the corresponding font backend doesn't have a quick way to      */
+  /*    retrieve the advances.                                             */
+  /*                                                                       */
+  /*    Scaled advances are returned in 16.16 format but aren't            */
+  /*    transformed by the affine transformation specified by              */
+  /*    @FT_Set_Transform.                                                 */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_Get_Advances( FT_Face    face,
                    FT_UInt    start,

+ 533 - 0
thirdparty/freetype/include/freetype/ftautoh.h

@@ -0,0 +1,533 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftautoh.h                                                              */
+/*                                                                         */
+/*    FreeType API for controlling the auto-hinter (specification only).   */
+/*                                                                         */
+/*  Copyright 2012-2017 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 FTAUTOH_H_
+#define FTAUTOH_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:
+   *   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.
+   *
+   */
+
+
+  /**************************************************************************
+   *
+   * @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 );
+   *   }
+   *
+   */
+
+
+  /**************************************************************************
+   *
+   * @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.
+   *
+   */
+#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.
+   *
+   */
+  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.
+   *
+   */
+
+
+  /**************************************************************************
+   *
+   * @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.
+   *
+   */
+
+
+  /**************************************************************************
+   *
+   * @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).
+   *
+   */
+
+
+  /**************************************************************************
+   *
+   * @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.
+   *
+   */
+
+
+  /**************************************************************************
+   *
+   * @property:
+   *   no-stem-darkening[autofit]
+   *
+   * @description:
+   *   *Experimental* *only*, *requires* *linear* *alpha* *blending* *and*
+   *   *gamma* *correction*
+   *
+   *   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.  All glyphs that pass through the auto-hinter will
+   *   be emboldened unless this property is set to TRUE.
+   *
+   *   See the description of the CFF driver for algorithmic details.  Total
+   *   consistency with the CFF driver is currently not achieved 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.
+   *
+   *   This property can be set via the `FREETYPE_PROPERTIES' environment
+   *   variable similar to the CFF driver.  It can also be set per face
+   *   using @FT_Face_Properties with @FT_PARAM_TAG_STEM_DARKENING.
+   *
+   */
+
+
+  /**************************************************************************
+   *
+   * @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[autofit] and
+   *   @no-stem-darkening[cff]).
+   *
+   *   This is a passive setting that only takes effect if the font driver
+   *   or autohinter honors it, which the CFF driver always does, but the
+   *   autohinter only in `light' hinting mode (as of version 2.7.0).
+   *
+   */
+#define FT_PARAM_TAG_STEM_DARKENING \
+          FT_MAKE_TAG( 'd', 'a', 'r', 'k' )
+
+
+  /**************************************************************************
+   *
+   * @property:
+   *   darkening-parameters[autofit]
+   *
+   * @description:
+   *   *Experimental* *only*
+   *
+   *   See the description of the CFF driver for details.  This
+   *   implementation appropriates the
+   *   CFF_CONFIG_OPTION_DARKENING_PARAMETER_* #defines for consistency.
+   *   Note the differences described in @no-stem-darkening[autofit].
+   *
+   *   This property can be set via the `FREETYPE_PROPERTIES' environment
+   *   variable similar to the CFF driver.
+   */
+
+
+  /* */
+
+
+FT_END_HEADER
+
+#endif /* FTAUTOH_H_ */
+
+
+/* END */

+ 64 - 65
thirdparty/freetype/include/freetype/ftbbox.h

@@ -1,30 +1,30 @@
-/****************************************************************************
- *
- * ftbbox.h
- *
- *   FreeType exact bbox computation (specification).
- *
- * Copyright (C) 1996-2019 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.
- *
- */
-
-
-  /**************************************************************************
-   *
-   * This component has a _single_ role: to compute exact outline bounding
-   * boxes.
-   *
-   * It is separated from the rest of the engine for various technical
-   * reasons.  It may well be integrated in 'ftoutln' later.
-   *
-   */
+/***************************************************************************/
+/*                                                                         */
+/*  ftbbox.h                                                               */
+/*                                                                         */
+/*    FreeType exact bbox computation (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.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* This component has a _single_ role: to compute exact outline bounding */
+  /* boxes.                                                                */
+  /*                                                                       */
+  /* It is separated from the rest of the engine for various technical     */
+  /* reasons.  It may well be integrated in `ftoutln' later.               */
+  /*                                                                       */
+  /*************************************************************************/
 
 
 #ifndef FTBBOX_H_
@@ -44,44 +44,43 @@
 FT_BEGIN_HEADER
 
 
-  /**************************************************************************
-   *
-   * @section:
-   *   outline_processing
-   *
-   */
-
-
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Outline_Get_BBox
-   *
-   * @description:
-   *   Compute the exact bounding box of an outline.  This is slower than
-   *   computing the control box.  However, it uses an advanced algorithm
-   *   that returns _very_ quickly when the two boxes coincide.  Otherwise,
-   *   the outline Bezier arcs are traversed to extract their extrema.
-   *
-   * @input:
-   *   outline ::
-   *     A pointer to the source outline.
-   *
-   * @output:
-   *   abbox ::
-   *     The outline's exact bounding box.
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   *
-   * @note:
-   *   If the font is tricky and the glyph has been loaded with
-   *   @FT_LOAD_NO_SCALE, the resulting BBox is meaningless.  To get
-   *   reasonable values for the BBox it is necessary to load the glyph at a
-   *   large ppem value (so that the hinting instructions can properly shift
-   *   and scale the subglyphs), then extracting the BBox, which can be
-   *   eventually converted back to font units.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    outline_processing                                                 */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Outline_Get_BBox                                                */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Compute the exact bounding box of an outline.  This is slower      */
+  /*    than computing the control box.  However, it uses an advanced      */
+  /*    algorithm that returns _very_ quickly when the two boxes           */
+  /*    coincide.  Otherwise, the outline Bezier arcs are traversed to     */
+  /*    extract their extrema.                                             */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    outline :: A pointer to the source outline.                        */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    abbox   :: The outline's exact bounding box.                       */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0~means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    If the font is tricky and the glyph has been loaded with           */
+  /*    @FT_LOAD_NO_SCALE, the resulting BBox is meaningless.  To get      */
+  /*    reasonable values for the BBox it is necessary to load the glyph   */
+  /*    at a large ppem value (so that the hinting instructions can        */
+  /*    properly shift and scale the subglyphs), then extracting the BBox, */
+  /*    which can be eventually converted back to font units.              */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_Outline_Get_BBox( FT_Outline*  outline,
                        FT_BBox     *abbox );

+ 119 - 122
thirdparty/freetype/include/freetype/ftbdf.h

@@ -1,19 +1,19 @@
-/****************************************************************************
- *
- * ftbdf.h
- *
- *   FreeType API for accessing BDF-specific strings (specification).
- *
- * Copyright (C) 2002-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  ftbdf.h                                                                */
+/*                                                                         */
+/*    FreeType API for accessing BDF-specific strings (specification).     */
+/*                                                                         */
+/*  Copyright 2002-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 FTBDF_H_
@@ -32,25 +32,25 @@
 FT_BEGIN_HEADER
 
 
-  /**************************************************************************
-   *
-   * @section:
-   *   bdf_fonts
-   *
-   * @title:
-   *   BDF and PCF Files
-   *
-   * @abstract:
-   *   BDF and PCF specific API.
-   *
-   * @description:
-   *   This section contains the declaration of functions specific to BDF and
-   *   PCF fonts.
-   *
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    bdf_fonts                                                          */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*    BDF and PCF Files                                                  */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*    BDF and PCF specific API.                                          */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This section contains the declaration of functions specific to BDF */
+  /*    and PCF fonts.                                                     */
+  /*                                                                       */
+  /*************************************************************************/
 
 
-  /**************************************************************************
+  /**********************************************************************
    *
    * @enum:
    *    BDF_PropertyType
@@ -81,40 +81,40 @@ FT_BEGIN_HEADER
   } BDF_PropertyType;
 
 
-  /**************************************************************************
+  /**********************************************************************
    *
    * @type:
    *    BDF_Property
    *
    * @description:
-   *    A handle to a @BDF_PropertyRec structure to model a given BDF/PCF
-   *    property.
+   *    A handle to a @BDF_PropertyRec structure to model a given
+   *    BDF/PCF property.
    */
   typedef struct BDF_PropertyRec_*  BDF_Property;
 
 
-  /**************************************************************************
-   *
-   * @struct:
-   *    BDF_PropertyRec
-   *
-   * @description:
-   *    This structure models a given BDF/PCF property.
-   *
-   * @fields:
-   *    type ::
-   *      The property type.
-   *
-   *    u.atom ::
-   *      The atom string, if type is @BDF_PROPERTY_TYPE_ATOM.  May be
-   *      `NULL`, indicating an empty string.
-   *
-   *    u.integer ::
-   *      A signed integer, if type is @BDF_PROPERTY_TYPE_INTEGER.
-   *
-   *    u.cardinal ::
-   *      An unsigned integer, if type is @BDF_PROPERTY_TYPE_CARDINAL.
-   */
+ /**********************************************************************
+  *
+  * @struct:
+  *    BDF_PropertyRec
+  *
+  * @description:
+  *    This structure models a given BDF/PCF property.
+  *
+  * @fields:
+  *    type ::
+  *      The property type.
+  *
+  *    u.atom ::
+  *      The atom string, if type is @BDF_PROPERTY_TYPE_ATOM.  May be
+  *      NULL, indicating an empty string.
+  *
+  *    u.integer ::
+  *      A signed integer, if type is @BDF_PROPERTY_TYPE_INTEGER.
+  *
+  *    u.cardinal ::
+  *      An unsigned integer, if type is @BDF_PROPERTY_TYPE_CARDINAL.
+  */
   typedef struct  BDF_PropertyRec_
   {
     BDF_PropertyType  type;
@@ -128,76 +128,73 @@ FT_BEGIN_HEADER
   } BDF_PropertyRec;
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *    FT_Get_BDF_Charset_ID
-   *
-   * @description:
-   *    Retrieve a BDF font character set identity, according to the BDF
-   *    specification.
-   *
-   * @input:
-   *    face ::
-   *      A handle to the input face.
-   *
-   * @output:
-   *    acharset_encoding ::
-   *      Charset encoding, as a C~string, owned by the face.
-   *
-   *    acharset_registry ::
-   *      Charset registry, as a C~string, owned by the face.
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   *
-   * @note:
-   *   This function only works with BDF faces, returning an error otherwise.
-   */
+ /**********************************************************************
+  *
+  * @function:
+  *    FT_Get_BDF_Charset_ID
+  *
+  * @description:
+  *    Retrieve a BDF font character set identity, according to
+  *    the BDF specification.
+  *
+  * @input:
+  *    face ::
+  *       A handle to the input face.
+  *
+  * @output:
+  *    acharset_encoding ::
+  *       Charset encoding, as a C~string, owned by the face.
+  *
+  *    acharset_registry ::
+  *       Charset registry, as a C~string, owned by the face.
+  *
+  * @return:
+  *   FreeType error code.  0~means success.
+  *
+  * @note:
+  *   This function only works with BDF faces, returning an error otherwise.
+  */
   FT_EXPORT( FT_Error )
   FT_Get_BDF_Charset_ID( FT_Face       face,
                          const char*  *acharset_encoding,
                          const char*  *acharset_registry );
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *    FT_Get_BDF_Property
-   *
-   * @description:
-   *    Retrieve a BDF property from a BDF or PCF font file.
-   *
-   * @input:
-   *    face ::
-   *      A handle to the input face.
-   *
-   *    name ::
-   *      The property name.
-   *
-   * @output:
-   *    aproperty ::
-   *      The property.
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   *
-   * @note:
-   *   This function works with BDF _and_ PCF fonts.  It returns an error
-   *   otherwise.  It also returns an error if the property is not in the
-   *   font.
-   *
-   *   A 'property' is a either key-value pair within the STARTPROPERTIES
-   *   ... ENDPROPERTIES block of a BDF font or a key-value pair from the
-   *   `info->props` array within a `FontRec` structure of a PCF font.
-   *
-   *   Integer properties are always stored as 'signed' within PCF fonts;
-   *   consequently, @BDF_PROPERTY_TYPE_CARDINAL is a possible return value
-   *   for BDF fonts only.
-   *
-   *   In case of error, `aproperty->type` is always set to
-   *   @BDF_PROPERTY_TYPE_NONE.
-   */
+ /**********************************************************************
+  *
+  * @function:
+  *    FT_Get_BDF_Property
+  *
+  * @description:
+  *    Retrieve a BDF property from a BDF or PCF font file.
+  *
+  * @input:
+  *    face :: A handle to the input face.
+  *
+  *    name :: The property name.
+  *
+  * @output:
+  *    aproperty :: The property.
+  *
+  * @return:
+  *   FreeType error code.  0~means success.
+  *
+  * @note:
+  *   This function works with BDF _and_ PCF fonts.  It returns an error
+  *   otherwise.  It also returns an error if the property is not in the
+  *   font.
+  *
+  *   A `property' is a either key-value pair within the STARTPROPERTIES
+  *   ... ENDPROPERTIES block of a BDF font or a key-value pair from the
+  *   `info->props' array within a `FontRec' structure of a PCF font.
+  *
+  *   Integer properties are always stored as `signed' within PCF fonts;
+  *   consequently, @BDF_PROPERTY_TYPE_CARDINAL is a possible return value
+  *   for BDF fonts only.
+  *
+  *   In case of error, `aproperty->type' is always set to
+  *   @BDF_PROPERTY_TYPE_NONE.
+  */
   FT_EXPORT( FT_Error )
   FT_Get_BDF_Property( FT_Face           face,
                        const char*       prop_name,

+ 174 - 264
thirdparty/freetype/include/freetype/ftbitmap.h

@@ -1,19 +1,19 @@
-/****************************************************************************
- *
- * ftbitmap.h
- *
- *   FreeType utility functions for bitmaps (specification).
- *
- * Copyright (C) 2004-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  ftbitmap.h                                                             */
+/*                                                                         */
+/*    FreeType utility functions for bitmaps (specification).              */
+/*                                                                         */
+/*  Copyright 2004-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 FTBITMAP_H_
@@ -22,7 +22,6 @@
 
 #include <ft2build.h>
 #include FT_FREETYPE_H
-#include FT_COLOR_H
 
 #ifdef FREETYPE_H
 #error "freetype.h of FreeType 1 has been loaded!"
@@ -34,46 +33,39 @@
 FT_BEGIN_HEADER
 
 
-  /**************************************************************************
-   *
-   * @section:
-   *   bitmap_handling
-   *
-   * @title:
-   *   Bitmap Handling
-   *
-   * @abstract:
-   *   Handling FT_Bitmap objects.
-   *
-   * @description:
-   *   This section contains functions for handling @FT_Bitmap objects,
-   *   automatically adjusting the target's bitmap buffer size as needed.
-   *
-   *   Note that none of the functions changes the bitmap's 'flow' (as
-   *   indicated by the sign of the `pitch` field in @FT_Bitmap).
-   *
-   *   To set the flow, assign an appropriate positive or negative value to
-   *   the `pitch` field of the target @FT_Bitmap object after calling
-   *   @FT_Bitmap_Init but before calling any of the other functions
-   *   described here.
-   */
-
-
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Bitmap_Init
-   *
-   * @description:
-   *   Initialize a pointer to an @FT_Bitmap structure.
-   *
-   * @inout:
-   *   abitmap ::
-   *     A pointer to the bitmap structure.
-   *
-   * @note:
-   *   A deprecated name for the same function is `FT_Bitmap_New`.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    bitmap_handling                                                    */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*    Bitmap Handling                                                    */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*    Handling FT_Bitmap objects.                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This section contains functions for handling @FT_Bitmap objects.   */
+  /*    Note that none of the functions changes the bitmap's `flow' (as    */
+  /*    indicated by the sign of the `pitch' field in `FT_Bitmap').        */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Bitmap_Init                                                     */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Initialize a pointer to an @FT_Bitmap structure.                   */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    abitmap :: A pointer to the bitmap structure.                      */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    A deprecated name for the same function is `FT_Bitmap_New'.        */
+  /*                                                                       */
   FT_EXPORT( void )
   FT_Bitmap_Init( FT_Bitmap  *abitmap );
 
@@ -83,77 +75,66 @@ FT_BEGIN_HEADER
   FT_Bitmap_New( FT_Bitmap  *abitmap );
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Bitmap_Copy
-   *
-   * @description:
-   *   Copy a bitmap into another one.
-   *
-   * @input:
-   *   library ::
-   *     A handle to a library object.
-   *
-   *   source ::
-   *     A handle to the source bitmap.
-   *
-   * @output:
-   *   target ::
-   *     A handle to the target bitmap.
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   *
-   * @note:
-   *   `source->buffer` and `target->buffer` must neither be equal nor
-   *   overlap.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Bitmap_Copy                                                     */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Copy a bitmap into another one.                                    */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    library :: A handle to a library object.                           */
+  /*                                                                       */
+  /*    source  :: A handle to the source bitmap.                          */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    target  :: A handle to the target bitmap.                          */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0~means success.                             */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_Bitmap_Copy( FT_Library        library,
                   const FT_Bitmap  *source,
                   FT_Bitmap        *target );
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Bitmap_Embolden
-   *
-   * @description:
-   *   Embolden a bitmap.  The new bitmap will be about `xStrength` pixels
-   *   wider and `yStrength` pixels higher.  The left and bottom borders are
-   *   kept unchanged.
-   *
-   * @input:
-   *   library ::
-   *     A handle to a library object.
-   *
-   *   xStrength ::
-   *     How strong the glyph is emboldened horizontally.  Expressed in 26.6
-   *     pixel format.
-   *
-   *   yStrength ::
-   *     How strong the glyph is emboldened vertically.  Expressed in 26.6
-   *     pixel format.
-   *
-   * @inout:
-   *   bitmap ::
-   *     A handle to the target bitmap.
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   *
-   * @note:
-   *   The current implementation restricts `xStrength` to be less than or
-   *   equal to~8 if bitmap is of pixel_mode @FT_PIXEL_MODE_MONO.
-   *
-   *   If you want to embolden the bitmap owned by a @FT_GlyphSlotRec, you
-   *   should call @FT_GlyphSlot_Own_Bitmap on the slot first.
-   *
-   *   Bitmaps in @FT_PIXEL_MODE_GRAY2 and @FT_PIXEL_MODE_GRAY@ format are
-   *   converted to @FT_PIXEL_MODE_GRAY format (i.e., 8bpp).
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Bitmap_Embolden                                                 */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Embolden a bitmap.  The new bitmap will be about `xStrength'       */
+  /*    pixels wider and `yStrength' pixels higher.  The left and bottom   */
+  /*    borders are kept unchanged.                                        */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    library   :: A handle to a library object.                         */
+  /*                                                                       */
+  /*    xStrength :: How strong the glyph is emboldened horizontally.      */
+  /*                 Expressed in 26.6 pixel format.                       */
+  /*                                                                       */
+  /*    yStrength :: How strong the glyph is emboldened vertically.        */
+  /*                 Expressed in 26.6 pixel format.                       */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    bitmap    :: A handle to the target bitmap.                        */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0~means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The current implementation restricts `xStrength' to be less than   */
+  /*    or equal to~8 if bitmap is of pixel_mode @FT_PIXEL_MODE_MONO.      */
+  /*                                                                       */
+  /*    If you want to embolden the bitmap owned by a @FT_GlyphSlotRec,    */
+  /*    you should call @FT_GlyphSlot_Own_Bitmap on the slot first.        */
+  /*                                                                       */
+  /*    Bitmaps in @FT_PIXEL_MODE_GRAY2 and @FT_PIXEL_MODE_GRAY@ format    */
+  /*    are converted to @FT_PIXEL_MODE_GRAY format (i.e., 8bpp).          */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_Bitmap_Embolden( FT_Library  library,
                       FT_Bitmap*  bitmap,
@@ -161,46 +142,39 @@ FT_BEGIN_HEADER
                       FT_Pos      yStrength );
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Bitmap_Convert
-   *
-   * @description:
-   *   Convert a bitmap object with depth 1bpp, 2bpp, 4bpp, 8bpp or 32bpp to
-   *   a bitmap object with depth 8bpp, making the number of used bytes per
-   *   line (a.k.a. the 'pitch') a multiple of `alignment`.
-   *
-   * @input:
-   *   library ::
-   *     A handle to a library object.
-   *
-   *   source ::
-   *     The source bitmap.
-   *
-   *   alignment ::
-   *     The pitch of the bitmap is a multiple of this argument.  Common
-   *     values are 1, 2, or 4.
-   *
-   * @output:
-   *   target ::
-   *     The target bitmap.
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   *
-   * @note:
-   *   It is possible to call @FT_Bitmap_Convert multiple times without
-   *   calling @FT_Bitmap_Done (the memory is simply reallocated).
-   *
-   *   Use @FT_Bitmap_Done to finally remove the bitmap object.
-   *
-   *   The `library` argument is taken to have access to FreeType's memory
-   *   handling functions.
-   *
-   *   `source->buffer` and `target->buffer` must neither be equal nor
-   *   overlap.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Bitmap_Convert                                                  */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Convert a bitmap object with depth 1bpp, 2bpp, 4bpp, 8bpp or 32bpp */
+  /*    to a bitmap object with depth 8bpp, making the number of used      */
+  /*    bytes line (a.k.a. the `pitch') a multiple of `alignment'.         */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    library   :: A handle to a library object.                         */
+  /*                                                                       */
+  /*    source    :: The source bitmap.                                    */
+  /*                                                                       */
+  /*    alignment :: The pitch of the bitmap is a multiple of this         */
+  /*                 parameter.  Common values are 1, 2, or 4.             */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    target    :: The target bitmap.                                    */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0~means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    It is possible to call @FT_Bitmap_Convert multiple times without   */
+  /*    calling @FT_Bitmap_Done (the memory is simply reallocated).        */
+  /*                                                                       */
+  /*    Use @FT_Bitmap_Done to finally remove the bitmap object.           */
+  /*                                                                       */
+  /*    The `library' argument is taken to have access to FreeType's       */
+  /*    memory handling functions.                                         */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_Bitmap_Convert( FT_Library        library,
                      const FT_Bitmap  *source,
@@ -208,112 +182,48 @@ FT_BEGIN_HEADER
                      FT_Int            alignment );
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Bitmap_Blend
-   *
-   * @description:
-   *   Blend a bitmap onto another bitmap, using a given color.
-   *
-   * @input:
-   *   library ::
-   *     A handle to a library object.
-   *
-   *   source ::
-   *     The source bitmap, which can have any @FT_Pixel_Mode format.
-   *
-   *   source_offset ::
-   *     The offset vector to the upper left corner of the source bitmap in
-   *     26.6 pixel format.  It should represent an integer offset; the
-   *     function will set the lowest six bits to zero to enforce that.
-   *
-   *   color ::
-   *     The color used to draw `source` onto `target`.
-   *
-   * @inout:
-   *   target ::
-   *     A handle to an `FT_Bitmap` object.  It should be either initialized
-   *     as empty with a call to @FT_Bitmap_Init, or it should be of type
-   *     @FT_PIXEL_MODE_BGRA.
-   *
-   *   atarget_offset ::
-   *     The offset vector to the upper left corner of the target bitmap in
-   *     26.6 pixel format.  It should represent an integer offset; the
-   *     function will set the lowest six bits to zero to enforce that.
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   *
-   * @note:
-   *   This function doesn't perform clipping.
-   *
-   *   The bitmap in `target` gets allocated or reallocated as needed; the
-   *   vector `atarget_offset` is updated accordingly.
-   *
-   *   In case of allocation or reallocation, the bitmap's pitch is set to
-   *   `4 * width`.  Both `source` and `target` must have the same bitmap
-   *   flow (as indicated by the sign of the `pitch` field).
-   *
-   *   `source->buffer` and `target->buffer` must neither be equal nor
-   *   overlap.
-   *
-   * @since:
-   *   2.10
-   */
-  FT_EXPORT( FT_Error )
-  FT_Bitmap_Blend( FT_Library         library,
-                   const FT_Bitmap*   source,
-                   const FT_Vector    source_offset,
-                   FT_Bitmap*         target,
-                   FT_Vector         *atarget_offset,
-                   FT_Color           color );
-
-
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_GlyphSlot_Own_Bitmap
-   *
-   * @description:
-   *   Make sure that a glyph slot owns `slot->bitmap`.
-   *
-   * @input:
-   *   slot ::
-   *     The glyph slot.
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   *
-   * @note:
-   *   This function is to be used in combination with @FT_Bitmap_Embolden.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_GlyphSlot_Own_Bitmap                                            */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Make sure that a glyph slot owns `slot->bitmap'.                   */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    slot :: The glyph slot.                                            */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0~means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    This function is to be used in combination with                    */
+  /*    @FT_Bitmap_Embolden.                                               */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_GlyphSlot_Own_Bitmap( FT_GlyphSlot  slot );
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Bitmap_Done
-   *
-   * @description:
-   *   Destroy a bitmap object initialized with @FT_Bitmap_Init.
-   *
-   * @input:
-   *   library ::
-   *     A handle to a library object.
-   *
-   *   bitmap ::
-   *     The bitmap object to be freed.
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   *
-   * @note:
-   *   The `library` argument is taken to have access to FreeType's memory
-   *   handling functions.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Bitmap_Done                                                     */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Destroy a bitmap object initialized with @FT_Bitmap_Init.          */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    library :: A handle to a library object.                           */
+  /*                                                                       */
+  /*    bitmap  :: The bitmap object to be freed.                          */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0~means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The `library' argument is taken to have access to FreeType's       */
+  /*    memory handling functions.                                         */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_Bitmap_Done( FT_Library  library,
                   FT_Bitmap  *bitmap );

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

@@ -1,19 +1,19 @@
-/****************************************************************************
- *
- * ftbzip2.h
- *
- *   Bzip2-compressed stream support.
- *
- * Copyright (C) 2010-2019 by
- * Joel Klinghed.
- *
- * 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  ftbzip2.h                                                              */
+/*                                                                         */
+/*    Bzip2-compressed stream support.                                     */
+/*                                                                         */
+/*  Copyright 2010-2018 by                                                 */
+/*  Joel Klinghed.                                                         */
+/*                                                                         */
+/*  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 FTBZIP2_H_
@@ -31,62 +31,62 @@
 
 FT_BEGIN_HEADER
 
-  /**************************************************************************
-   *
-   * @section:
-   *   bzip2
-   *
-   * @title:
-   *   BZIP2 Streams
-   *
-   * @abstract:
-   *   Using bzip2-compressed font files.
-   *
-   * @description:
-   *   This section contains the declaration of Bzip2-specific functions.
-   *
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    bzip2                                                              */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*    BZIP2 Streams                                                      */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*    Using bzip2-compressed font files.                                 */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This section contains the declaration of Bzip2-specific functions. */
+  /*                                                                       */
+  /*************************************************************************/
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Stream_OpenBzip2
-   *
-   * @description:
-   *   Open a new stream to parse bzip2-compressed font files.  This is
-   *   mainly used to support the compressed `*.pcf.bz2` fonts that come with
-   *   XFree86.
-   *
-   * @input:
-   *   stream ::
-   *     The target embedding stream.
-   *
-   *   source ::
-   *     The source stream.
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   *
-   * @note:
-   *   The source stream must be opened _before_ calling this function.
-   *
-   *   Calling the internal function `FT_Stream_Close` on the new stream will
-   *   **not** call `FT_Stream_Close` on the source stream.  None of the
-   *   stream objects will be released to the heap.
-   *
-   *   The stream implementation is very basic and resets the decompression
-   *   process each time seeking backwards is needed within the stream.
-   *
-   *   In certain builds of the library, bzip2 compression recognition is
-   *   automatically handled when calling @FT_New_Face or @FT_Open_Face.
-   *   This means that if no font driver is capable of handling the raw
-   *   compressed file, the library will try to open a bzip2 compressed
-   *   stream from it and re-open the face with it.
-   *
-   *   This function may return `FT_Err_Unimplemented_Feature` if your build
-   *   of FreeType was not compiled with bzip2 support.
-   */
+ /************************************************************************
+  *
+  * @function:
+  *   FT_Stream_OpenBzip2
+  *
+  * @description:
+  *   Open a new stream to parse bzip2-compressed font files.  This is
+  *   mainly used to support the compressed `*.pcf.bz2' fonts that come
+  *   with XFree86.
+  *
+  * @input:
+  *   stream ::
+  *     The target embedding stream.
+  *
+  *   source ::
+  *     The source stream.
+  *
+  * @return:
+  *   FreeType error code.  0~means success.
+  *
+  * @note:
+  *   The source stream must be opened _before_ calling this function.
+  *
+  *   Calling the internal function `FT_Stream_Close' on the new stream will
+  *   *not* call `FT_Stream_Close' on the source stream.  None of the stream
+  *   objects will be released to the heap.
+  *
+  *   The stream implementation is very basic and resets the decompression
+  *   process each time seeking backwards is needed within the stream.
+  *
+  *   In certain builds of the library, bzip2 compression recognition is
+  *   automatically handled when calling @FT_New_Face or @FT_Open_Face.
+  *   This means that if no font driver is capable of handling the raw
+  *   compressed file, the library will try to open a bzip2 compressed stream
+  *   from it and re-open the face with it.
+  *
+  *   This function may return `FT_Err_Unimplemented_Feature' if your build
+  *   of FreeType was not compiled with bzip2 support.
+  */
   FT_EXPORT( FT_Error )
   FT_Stream_OpenBzip2( FT_Stream  stream,
                        FT_Stream  source );

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 408 - 436
thirdparty/freetype/include/freetype/ftcache.h


+ 321 - 0
thirdparty/freetype/include/freetype/ftcffdrv.h

@@ -0,0 +1,321 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftcffdrv.h                                                             */
+/*                                                                         */
+/*    FreeType API for controlling the CFF driver (specification only).    */
+/*                                                                         */
+/*  Copyright 2013-2017 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 FTCFFDRV_H_
+#define FTCFFDRV_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:
+   *   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 list below gives the available properties
+   *   together with the necessary macros and structures.
+   *
+   *   The CFF driver's module name is `cff'.
+   *
+   *   *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 sub-pixels 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 sub-pixels 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.
+   *
+   * @order:
+   *   hinting-engine[cff]
+   *   no-stem-darkening[cff]
+   *   darkening-parameters[cff]
+   *   random-seed
+   *
+   */
+
+
+  /**************************************************************************
+   *
+   * @property:
+   *   hinting-engine[cff]
+   *
+   * @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 default engine is `freetype' if CFF_CONFIG_OPTION_OLD_ENGINE is
+   *   defined, and `adobe' otherwise.
+   *
+   *   The following example code demonstrates how to select Adobe's hinting
+   *   engine (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').
+   */
+
+
+  /**************************************************************************
+   *
+   * @enum:
+   *   FT_CFF_HINTING_XXX
+   *
+   * @description:
+   *   A list of constants used for the @hinting-engine[cff] property to
+   *   select the hinting engine for CFF fonts.
+   *
+   * @values:
+   *   FT_CFF_HINTING_FREETYPE ::
+   *     Use the old FreeType hinting engine.
+   *
+   *   FT_CFF_HINTING_ADOBE ::
+   *     Use the hinting engine contributed by Adobe.
+   *
+   */
+#define FT_CFF_HINTING_FREETYPE  0
+#define FT_CFF_HINTING_ADOBE     1
+
+
+  /**************************************************************************
+   *
+   * @property:
+   *   no-stem-darkening[cff]
+   *
+   * @description:
+   *   By default, the Adobe CFF engine darkens stems at smaller sizes,
+   *   regardless of hinting, to enhance contrast.  This feature requires
+   *   a rendering system with proper gamma correction.  Setting this
+   *   property, stem darkening gets switched off.
+   *
+   *   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.
+   *
+   */
+
+
+  /**************************************************************************
+   *
+   * @property:
+   *   darkening-parameters[cff]
+   *
+   * @description:
+   *   By default, the Adobe CFF engine 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'.  At runtime, the control
+   *   points can be changed using the `darkening-parameters' property, as
+   *   the following example demonstrates.
+   *
+   *   {
+   *     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, "cff",
+   *                               "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).
+   *
+   * @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=\
+   *     cff:darkening-parameters=500,300,1000,200,1500,100,2000,0
+   *   }
+   */
+
+
+  /**************************************************************************
+   *
+   * @property:
+   *   random-seed
+   *
+   * @description:
+   *   By default, the seed value for the CFF `random' operator 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.
+   *
+   */
+
+
+  /**************************************************************************
+   *
+   * @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 CFF
+   *   module's random seed value with a face-specific one; see
+   *   @random-seed.
+   *
+   */
+#define FT_PARAM_TAG_RANDOM_SEED \
+          FT_MAKE_TAG( 's', 'e', 'e', 'd' )
+
+
+  /* */
+
+
+FT_END_HEADER
+
+
+#endif /* FTCFFDRV_H_ */
+
+
+/* END */

+ 139 - 145
thirdparty/freetype/include/freetype/ftchapters.h

@@ -1,145 +1,139 @@
-/****************************************************************************
- *
- * This file defines the structure of the FreeType reference.
- * It is used by the python script that generates the HTML files.
- *
- */
-
-
-  /**************************************************************************
-   *
-   * @chapter:
-   *   general_remarks
-   *
-   * @title:
-   *   General Remarks
-   *
-   * @sections:
-   *   header_inclusion
-   *   user_allocation
-   *
-   */
-
-
-  /**************************************************************************
-   *
-   * @chapter:
-   *   core_api
-   *
-   * @title:
-   *   Core API
-   *
-   * @sections:
-   *   version
-   *   basic_types
-   *   base_interface
-   *   glyph_variants
-   *   color_management
-   *   layer_management
-   *   glyph_management
-   *   mac_specific
-   *   sizes_management
-   *   header_file_macros
-   *
-   */
-
-
-  /**************************************************************************
-   *
-   * @chapter:
-   *   format_specific
-   *
-   * @title:
-   *   Format-Specific API
-   *
-   * @sections:
-   *   multiple_masters
-   *   truetype_tables
-   *   type1_tables
-   *   sfnt_names
-   *   bdf_fonts
-   *   cid_fonts
-   *   pfr_fonts
-   *   winfnt_fonts
-   *   font_formats
-   *   gasp_table
-   *
-   */
-
-
-  /**************************************************************************
-   *
-   * @chapter:
-   *   module_specific
-   *
-   * @title:
-   *   Controlling FreeType Modules
-   *
-   * @sections:
-   *   auto_hinter
-   *   cff_driver
-   *   t1_cid_driver
-   *   tt_driver
-   *   pcf_driver
-   *   properties
-   *   parameter_tags
-   *   lcd_rendering
-   *
-   */
-
-
-  /**************************************************************************
-   *
-   * @chapter:
-   *   cache_subsystem
-   *
-   * @title:
-   *   Cache Sub-System
-   *
-   * @sections:
-   *   cache_subsystem
-   *
-   */
-
-
-  /**************************************************************************
-   *
-   * @chapter:
-   *   support_api
-   *
-   * @title:
-   *   Support API
-   *
-   * @sections:
-   *   computations
-   *   list_processing
-   *   outline_processing
-   *   quick_advance
-   *   bitmap_handling
-   *   raster
-   *   glyph_stroker
-   *   system_interface
-   *   module_management
-   *   gzip
-   *   lzw
-   *   bzip2
-   *
-   */
-
-
-  /**************************************************************************
-   *
-   * @chapter:
-   *   error_codes
-   *
-   * @title:
-   *   Error Codes
-   *
-   * @sections:
-   *   error_enumerations
-   *   error_code_values
-   *
-   */
-
-
-/* END */
+/***************************************************************************/
+/*                                                                         */
+/* This file defines the structure of the FreeType reference.              */
+/* It is used by the python script that generates the HTML files.          */
+/*                                                                         */
+/***************************************************************************/
+
+
+/***************************************************************************/
+/*                                                                         */
+/* <Chapter>                                                               */
+/*    general_remarks                                                      */
+/*                                                                         */
+/* <Title>                                                                 */
+/*    General Remarks                                                      */
+/*                                                                         */
+/* <Sections>                                                              */
+/*    header_inclusion                                                     */
+/*    user_allocation                                                      */
+/*                                                                         */
+/***************************************************************************/
+
+
+/***************************************************************************/
+/*                                                                         */
+/* <Chapter>                                                               */
+/*    core_api                                                             */
+/*                                                                         */
+/* <Title>                                                                 */
+/*    Core API                                                             */
+/*                                                                         */
+/* <Sections>                                                              */
+/*    version                                                              */
+/*    basic_types                                                          */
+/*    base_interface                                                       */
+/*    glyph_variants                                                       */
+/*    glyph_management                                                     */
+/*    mac_specific                                                         */
+/*    sizes_management                                                     */
+/*    header_file_macros                                                   */
+/*                                                                         */
+/***************************************************************************/
+
+
+/***************************************************************************/
+/*                                                                         */
+/* <Chapter>                                                               */
+/*    format_specific                                                      */
+/*                                                                         */
+/* <Title>                                                                 */
+/*    Format-Specific API                                                  */
+/*                                                                         */
+/* <Sections>                                                              */
+/*    multiple_masters                                                     */
+/*    truetype_tables                                                      */
+/*    type1_tables                                                         */
+/*    sfnt_names                                                           */
+/*    bdf_fonts                                                            */
+/*    cid_fonts                                                            */
+/*    pfr_fonts                                                            */
+/*    winfnt_fonts                                                         */
+/*    font_formats                                                         */
+/*    gasp_table                                                           */
+/*                                                                         */
+/***************************************************************************/
+
+
+/***************************************************************************/
+/*                                                                         */
+/* <Chapter>                                                               */
+/*    module_specific                                                      */
+/*                                                                         */
+/* <Title>                                                                 */
+/*    Controlling FreeType Modules                                         */
+/*                                                                         */
+/* <Sections>                                                              */
+/*    auto_hinter                                                          */
+/*    cff_driver                                                           */
+/*    t1_cid_driver                                                        */
+/*    tt_driver                                                            */
+/*    pcf_driver                                                           */
+/*    properties                                                           */
+/*    parameter_tags                                                       */
+/*                                                                         */
+/***************************************************************************/
+
+
+/***************************************************************************/
+/*                                                                         */
+/* <Chapter>                                                               */
+/*    cache_subsystem                                                      */
+/*                                                                         */
+/* <Title>                                                                 */
+/*    Cache Sub-System                                                     */
+/*                                                                         */
+/* <Sections>                                                              */
+/*    cache_subsystem                                                      */
+/*                                                                         */
+/***************************************************************************/
+
+
+/***************************************************************************/
+/*                                                                         */
+/* <Chapter>                                                               */
+/*    support_api                                                          */
+/*                                                                         */
+/* <Title>                                                                 */
+/*    Support API                                                          */
+/*                                                                         */
+/* <Sections>                                                              */
+/*    computations                                                         */
+/*    list_processing                                                      */
+/*    outline_processing                                                   */
+/*    quick_advance                                                        */
+/*    bitmap_handling                                                      */
+/*    raster                                                               */
+/*    glyph_stroker                                                        */
+/*    system_interface                                                     */
+/*    module_management                                                    */
+/*    gzip                                                                 */
+/*    lzw                                                                  */
+/*    bzip2                                                                */
+/*    lcd_filtering                                                        */
+/*                                                                         */
+/***************************************************************************/
+
+/***************************************************************************/
+/*                                                                         */
+/* <Chapter>                                                               */
+/*    error_codes                                                          */
+/*                                                                         */
+/* <Title>                                                                 */
+/*    Error Codes                                                          */
+/*                                                                         */
+/* <Sections>                                                              */
+/*    error_enumerations                                                   */
+/*    error_code_values                                                    */
+/*                                                                         */
+/***************************************************************************/

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

@@ -1,19 +1,19 @@
-/****************************************************************************
- *
- * ftcid.h
- *
- *   FreeType API for accessing CID font information (specification).
- *
- * Copyright (C) 2007-2019 by
- * Dereg Clegg and Michael Toftdal.
- *
- * 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  ftcid.h                                                                */
+/*                                                                         */
+/*    FreeType API for accessing CID font information (specification).     */
+/*                                                                         */
+/*  Copyright 2007-2018 by                                                 */
+/*  Dereg Clegg and Michael Toftdal.                                       */
+/*                                                                         */
+/*  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 FTCID_H_
@@ -32,25 +32,25 @@
 FT_BEGIN_HEADER
 
 
-  /**************************************************************************
-   *
-   * @section:
-   *   cid_fonts
-   *
-   * @title:
-   *   CID Fonts
-   *
-   * @abstract:
-   *   CID-keyed font-specific API.
-   *
-   * @description:
-   *   This section contains the declaration of CID-keyed font-specific
-   *   functions.
-   *
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    cid_fonts                                                          */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*    CID Fonts                                                          */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*    CID-keyed font specific API.                                       */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This section contains the declaration of CID-keyed font specific   */
+  /*    functions.                                                         */
+  /*                                                                       */
+  /*************************************************************************/
 
 
-  /**************************************************************************
+  /**********************************************************************
    *
    * @function:
    *    FT_Get_CID_Registry_Ordering_Supplement
@@ -61,17 +61,17 @@ FT_BEGIN_HEADER
    *
    * @input:
    *    face ::
-   *      A handle to the input face.
+   *       A handle to the input face.
    *
    * @output:
    *    registry ::
-   *      The registry, as a C~string, owned by the face.
+   *       The registry, as a C~string, owned by the face.
    *
    *    ordering ::
-   *      The ordering, as a C~string, owned by the face.
+   *       The ordering, as a C~string, owned by the face.
    *
    *    supplement ::
-   *      The supplement.
+   *       The supplement.
    *
    * @return:
    *    FreeType error code.  0~means success.
@@ -90,30 +90,30 @@ FT_BEGIN_HEADER
                                            FT_Int       *supplement );
 
 
-  /**************************************************************************
+  /**********************************************************************
    *
    * @function:
    *    FT_Get_CID_Is_Internally_CID_Keyed
    *
    * @description:
-   *    Retrieve the type of the input face, CID keyed or not.  In contrast
-   *    to the @FT_IS_CID_KEYED macro this function returns successfully also
-   *    for CID-keyed fonts in an SFNT wrapper.
+   *    Retrieve the type of the input face, CID keyed or not.  In
+   *    contrast to the @FT_IS_CID_KEYED macro this function returns
+   *    successfully also for CID-keyed fonts in an SFNT wrapper.
    *
    * @input:
    *    face ::
-   *      A handle to the input face.
+   *       A handle to the input face.
    *
    * @output:
    *    is_cid ::
-   *      The type of the face as an @FT_Bool.
+   *       The type of the face as an @FT_Bool.
    *
    * @return:
    *    FreeType error code.  0~means success.
    *
    * @note:
-   *    This function only works with CID faces and OpenType fonts, returning
-   *    an error otherwise.
+   *    This function only works with CID faces and OpenType fonts,
+   *    returning an error otherwise.
    *
    * @since:
    *    2.3.9
@@ -123,7 +123,7 @@ FT_BEGIN_HEADER
                                       FT_Bool  *is_cid );
 
 
-  /**************************************************************************
+  /**********************************************************************
    *
    * @function:
    *    FT_Get_CID_From_Glyph_Index
@@ -133,21 +133,21 @@ FT_BEGIN_HEADER
    *
    * @input:
    *    face ::
-   *      A handle to the input face.
+   *       A handle to the input face.
    *
    *    glyph_index ::
-   *      The input glyph index.
+   *       The input glyph index.
    *
    * @output:
    *    cid ::
-   *      The CID as an @FT_UInt.
+   *       The CID as an @FT_UInt.
    *
    * @return:
    *    FreeType error code.  0~means success.
    *
    * @note:
-   *    This function only works with CID faces and OpenType fonts, returning
-   *    an error otherwise.
+   *    This function only works with CID faces and OpenType fonts,
+   *    returning an error otherwise.
    *
    * @since:
    *    2.3.9

+ 0 - 311
thirdparty/freetype/include/freetype/ftcolor.h

@@ -1,311 +0,0 @@
-/****************************************************************************
- *
- * ftcolor.h
- *
- *   FreeType's glyph color management (specification).
- *
- * Copyright (C) 2018-2019 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 FTCOLOR_H_
-#define FTCOLOR_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:
-   *   color_management
-   *
-   * @title:
-   *   Glyph Color Management
-   *
-   * @abstract:
-   *   Retrieving and manipulating OpenType's 'CPAL' table data.
-   *
-   * @description:
-   *   The functions described here allow access and manipulation of color
-   *   palette entries in OpenType's 'CPAL' tables.
-   */
-
-
-  /**************************************************************************
-   *
-   * @struct:
-   *   FT_Color
-   *
-   * @description:
-   *   This structure models a BGRA color value of a 'CPAL' palette entry.
-   *
-   *   The used color space is sRGB; the colors are not pre-multiplied, and
-   *   alpha values must be explicitly set.
-   *
-   * @fields:
-   *   blue ::
-   *     Blue value.
-   *
-   *   green ::
-   *     Green value.
-   *
-   *   red ::
-   *     Red value.
-   *
-   *   alpha ::
-   *     Alpha value, giving the red, green, and blue color's opacity.
-   *
-   * @since:
-   *   2.10
-   */
-  typedef struct  FT_Color_
-  {
-    FT_Byte  blue;
-    FT_Byte  green;
-    FT_Byte  red;
-    FT_Byte  alpha;
-
-  } FT_Color;
-
-
-  /**************************************************************************
-   *
-   * @enum:
-   *   FT_PALETTE_XXX
-   *
-   * @description:
-   *   A list of bit field constants used in the `palette_flags` array of the
-   *   @FT_Palette_Data structure to indicate for which background a palette
-   *   with a given index is usable.
-   *
-   * @values:
-   *   FT_PALETTE_FOR_LIGHT_BACKGROUND ::
-   *     The palette is appropriate to use when displaying the font on a
-   *     light background such as white.
-   *
-   *   FT_PALETTE_FOR_DARK_BACKGROUND ::
-   *     The palette is appropriate to use when displaying the font on a dark
-   *     background such as black.
-   *
-   * @since:
-   *   2.10
-   */
-#define FT_PALETTE_FOR_LIGHT_BACKGROUND  0x01
-#define FT_PALETTE_FOR_DARK_BACKGROUND   0x02
-
-
-  /**************************************************************************
-   *
-   * @struct:
-   *   FT_Palette_Data
-   *
-   * @description:
-   *   This structure holds the data of the 'CPAL' table.
-   *
-   * @fields:
-   *   num_palettes ::
-   *     The number of palettes.
-   *
-   *   palette_name_ids ::
-   *     A read-only array of palette name IDs with `num_palettes` elements,
-   *     corresponding to entries like 'dark' or 'light' in the font's 'name'
-   *     table.
-   *
-   *     An empty name ID in the 'CPAL' table gets represented as value
-   *     0xFFFF.
-   *
-   *     `NULL` if the font's 'CPAL' table doesn't contain appropriate data.
-   *
-   *   palette_flags ::
-   *     A read-only array of palette flags with `num_palettes` elements.
-   *     Possible values are an ORed combination of
-   *     @FT_PALETTE_FOR_LIGHT_BACKGROUND and
-   *     @FT_PALETTE_FOR_DARK_BACKGROUND.
-   *
-   *     `NULL` if the font's 'CPAL' table doesn't contain appropriate data.
-   *
-   *   num_palette_entries ::
-   *     The number of entries in a single palette.  All palettes have the
-   *     same size.
-   *
-   *   palette_entry_name_ids ::
-   *     A read-only array of palette entry name IDs with
-   *     `num_palette_entries`.  In each palette, entries with the same index
-   *     have the same function.  For example, index~0 might correspond to
-   *     string 'outline' in the font's 'name' table to indicate that this
-   *     palette entry is used for outlines, index~1 might correspond to
-   *     'fill' to indicate the filling color palette entry, etc.
-   *
-   *     An empty entry name ID in the 'CPAL' table gets represented as value
-   *     0xFFFF.
-   *
-   *     `NULL` if the font's 'CPAL' table doesn't contain appropriate data.
-   *
-   * @note:
-   *   Use function @FT_Get_Sfnt_Name to map name IDs and entry name IDs to
-   *   name strings.
-   *
-   * @since:
-   *   2.10
-   */
-  typedef struct  FT_Palette_Data_ {
-    FT_UShort         num_palettes;
-    const FT_UShort*  palette_name_ids;
-    const FT_UShort*  palette_flags;
-
-    FT_UShort         num_palette_entries;
-    const FT_UShort*  palette_entry_name_ids;
-
-  } FT_Palette_Data;
-
-
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Palette_Data_Get
-   *
-   * @description:
-   *   Retrieve the face's color palette data.
-   *
-   * @input:
-   *   face ::
-   *     The source face handle.
-   *
-   * @output:
-   *   apalette ::
-   *     A pointer to an @FT_Palette_Data structure.
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   *
-   * @note:
-   *   All arrays in the returned @FT_Palette_Data structure are read-only.
-   *
-   *   This function always returns an error if the config macro
-   *   `TT_CONFIG_OPTION_COLOR_LAYERS` is not defined in `ftoption.h`.
-   *
-   * @since:
-   *   2.10
-   */
-  FT_EXPORT( FT_Error )
-  FT_Palette_Data_Get( FT_Face           face,
-                       FT_Palette_Data  *apalette );
-
-
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Palette_Select
-   *
-   * @description:
-   *   This function has two purposes.
-   *
-   *   (1) It activates a palette for rendering color glyphs, and
-   *
-   *   (2) it retrieves all (unmodified) color entries of this palette.  This
-   *       function returns a read-write array, which means that a calling
-   *       application can modify the palette entries on demand.
-   *
-   * A corollary of (2) is that calling the function, then modifying some
-   * values, then calling the function again with the same arguments resets
-   * all color entries to the original 'CPAL' values; all user modifications
-   * are lost.
-   *
-   * @input:
-   *   face ::
-   *     The source face handle.
-   *
-   *   palette_index ::
-   *     The palette index.
-   *
-   * @output:
-   *   apalette ::
-   *     An array of color entries for a palette with index `palette_index`,
-   *     having `num_palette_entries` elements (as found in the
-   *     `FT_Palette_Data` structure).  If `apalette` is set to `NULL`, no
-   *     array gets returned (and no color entries can be modified).
-   *
-   *     In case the font doesn't support color palettes, `NULL` is returned.
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   *
-   * @note:
-   *   The array pointed to by `apalette_entries` is owned and managed by
-   *   FreeType.
-   *
-   *   This function always returns an error if the config macro
-   *   `TT_CONFIG_OPTION_COLOR_LAYERS` is not defined in `ftoption.h`.
-   *
-   * @since:
-   *   2.10
-   */
-  FT_EXPORT( FT_Error )
-  FT_Palette_Select( FT_Face     face,
-                     FT_UShort   palette_index,
-                     FT_Color*  *apalette );
-
-
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Palette_Set_Foreground_Color
-   *
-   * @description:
-   *   'COLR' uses palette index 0xFFFF to indicate a 'text foreground
-   *   color'.  This function sets this value.
-   *
-   * @input:
-   *   face ::
-   *     The source face handle.
-   *
-   *   foreground_color ::
-   *     An `FT_Color` structure to define the text foreground color.
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   *
-   * @note:
-   *   If this function isn't called, the text foreground color is set to
-   *   white opaque (BGRA value 0xFFFFFFFF) if
-   *   @FT_PALETTE_FOR_DARK_BACKGROUND is present for the current palette,
-   *   and black opaque (BGRA value 0x000000FF) otherwise, including the case
-   *   that no palette types are available in the 'CPAL' table.
-   *
-   *   This function always returns an error if the config macro
-   *   `TT_CONFIG_OPTION_COLOR_LAYERS` is not defined in `ftoption.h`.
-   *
-   * @since:
-   *   2.10
-   */
-  FT_EXPORT( FT_Error )
-  FT_Palette_Set_Foreground_Color( FT_Face   face,
-                                   FT_Color  foreground_color );
-
-  /* */
-
-
-FT_END_HEADER
-
-#endif /* FTCOLOR_H_ */
-
-
-/* END */

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 290 - 293
thirdparty/freetype/include/freetype/ftdriver.h


+ 51 - 50
thirdparty/freetype/include/freetype/fterrdef.h

@@ -1,57 +1,58 @@
-/****************************************************************************
- *
- * fterrdef.h
- *
- *   FreeType error codes (specification).
- *
- * Copyright (C) 2002-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  fterrdef.h                                                             */
+/*                                                                         */
+/*    FreeType error codes (specification).                                */
+/*                                                                         */
+/*  Copyright 2002-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.                                        */
+/*                                                                         */
+/***************************************************************************/
 
 
-  /**************************************************************************
-   *
-   * @section:
-   *  error_code_values
-   *
-   * @title:
-   *  Error Code Values
-   *
-   * @abstract:
-   *  All possible error codes returned by FreeType functions.
-   *
-   * @description:
-   *  The list below is taken verbatim from the file `fterrdef.h` (loaded
-   *  automatically by including `FT_FREETYPE_H`).  The first argument of the
-   *  `FT_ERROR_DEF_` macro is the error label; by default, the prefix
-   *  `FT_Err_` gets added so that you get error names like
-   *  `FT_Err_Cannot_Open_Resource`.  The second argument is the error code,
-   *  and the last argument an error string, which is not used by FreeType.
-   *
-   *  Within your application you should **only** use error names and
-   *  **never** its numeric values!  The latter might (and actually do)
-   *  change in forthcoming FreeType versions.
-   *
-   *  Macro `FT_NOERRORDEF_` defines `FT_Err_Ok`, which is always zero.  See
-   *  the 'Error Enumerations' subsection how to automatically generate a
-   *  list of error strings.
-   *
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*   error_code_values                                                   */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*   Error Code Values                                                   */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*   All possible error codes returned by FreeType functions.            */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*   The list below is taken verbatim from the file `fterrdef.h'         */
+  /*   (loaded automatically by including `FT_FREETYPE_H').  The first     */
+  /*   argument of the `FT_ERROR_DEF_' macro is the error label; by        */
+  /*   default, the prefix `FT_Err_' gets added so that you get error      */
+  /*   names like `FT_Err_Cannot_Open_Resource'.  The second argument is   */
+  /*   the error code, and the last argument an error string, which is not */
+  /*   used by FreeType.                                                   */
+  /*                                                                       */
+  /*   Within your application you should *only* use error names and       */
+  /*   *never* its numeric values!  The latter might (and actually do)     */
+  /*   change in forthcoming FreeType versions.                            */
+  /*                                                                       */
+  /*   Macro `FT_NOERRORDEF_' defines `FT_Err_Ok', which is always zero.   */
+  /*   See the `Error Enumerations' subsection how to automatically        */
+  /*   generate a list of error strings.                                   */
+  /*                                                                       */
+  /*************************************************************************/
 
 
-  /**************************************************************************
-   *
-   * @enum:
-   *   FT_Err_XXX
-   *
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Enum>                                                                */
+  /*    FT_Err_XXX                                                         */
+  /*                                                                       */
+  /*************************************************************************/
 
   /* generic errors */
 

+ 100 - 159
thirdparty/freetype/include/freetype/fterrors.h

@@ -1,120 +1,110 @@
-/****************************************************************************
- *
- * fterrors.h
- *
- *   FreeType error code handling (specification).
- *
- * Copyright (C) 1996-2019 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.
- *
- */
-
-
-  /**************************************************************************
-   *
-   * @section:
-   *   error_enumerations
-   *
-   * @title:
-   *   Error Enumerations
-   *
-   * @abstract:
-   *   How to handle errors and error strings.
-   *
-   * @description:
-   *   The header file `fterrors.h` (which is automatically included by
-   *   `freetype.h` defines the handling of FreeType's enumeration
-   *   constants.  It can also be used to generate error message strings
-   *   with a small macro trick explained below.
-   *
-   *   **Error Formats**
-   *
-   *   The configuration macro `FT_CONFIG_OPTION_USE_MODULE_ERRORS` can be
-   *   defined in `ftoption.h` in order to make the higher byte indicate the
-   *   module where the error has happened (this is not compatible with
-   *   standard builds of FreeType~2, however).  See the file `ftmoderr.h`
-   *   for more details.
-   *
-   *   **Error Message Strings**
-   *
-   *   Error definitions are set up with special macros that allow client
-   *   applications to build a table of error message strings.  The strings
-   *   are not included in a normal build of FreeType~2 to save space (most
-   *   client applications do not use them).
-   *
-   *   To do so, you have to define the following macros before including
-   *   this file.
-   *
-   *   ```
-   *     FT_ERROR_START_LIST
-   *   ```
-   *
-   *   This macro is called before anything else to define the start of the
-   *   error list.  It is followed by several `FT_ERROR_DEF` calls.
-   *
-   *   ```
-   *     FT_ERROR_DEF( e, v, s )
-   *   ```
-   *
-   *   This macro is called to define one single error.  'e' is the error
-   *   code identifier (e.g., `Invalid_Argument`), 'v' is the error's
-   *   numerical value, and 's' is the corresponding error string.
-   *
-   *   ```
-   *     FT_ERROR_END_LIST
-   *   ```
-   *
-   *   This macro ends the list.
-   *
-   *   Additionally, you have to undefine `FTERRORS_H_` before #including
-   *   this file.
-   *
-   *   Here is a simple example.
-   *
-   *   ```
-   *     #undef FTERRORS_H_
-   *     #define FT_ERRORDEF( e, v, s )  { e, s },
-   *     #define FT_ERROR_START_LIST     {
-   *     #define FT_ERROR_END_LIST       { 0, NULL } };
-   *
-   *     const struct
-   *     {
-   *       int          err_code;
-   *       const char*  err_msg;
-   *     } ft_errors[] =
-   *
-   *     #include FT_ERRORS_H
-   *   ```
-   *
-   *   An alternative to using an array is a switch statement.
-   *
-   *   ```
-   *     #undef FTERRORS_H_
-   *     #define FT_ERROR_START_LIST     switch ( error_code ) {
-   *     #define FT_ERRORDEF( e, v, s )    case v: return s;
-   *     #define FT_ERROR_END_LIST       }
-   *   ```
-   *
-   *   If you use `FT_CONFIG_OPTION_USE_MODULE_ERRORS`, `error_code` should
-   *   be replaced with `FT_ERROR_BASE(error_code)` in the last example.
-   */
+/***************************************************************************/
+/*                                                                         */
+/*  fterrors.h                                                             */
+/*                                                                         */
+/*    FreeType error code handling (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.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*   error_enumerations                                                  */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*   Error Enumerations                                                  */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*   How to handle errors and error strings.                             */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*   The header file `fterrors.h' (which is automatically included by    */
+  /*   `freetype.h' defines the handling of FreeType's enumeration         */
+  /*   constants.  It can also be used to generate error message strings   */
+  /*   with a small macro trick explained below.                           */
+  /*                                                                       */
+  /*   *Error* *Formats*                                                   */
+  /*                                                                       */
+  /*   The configuration macro FT_CONFIG_OPTION_USE_MODULE_ERRORS can be   */
+  /*   defined in `ftoption.h' in order to make the higher byte indicate   */
+  /*   the module where the error has happened (this is not compatible     */
+  /*   with standard builds of FreeType~2, however).  See the file         */
+  /*   `ftmoderr.h' for more details.                                      */
+  /*                                                                       */
+  /*   *Error* *Message* *Strings*                                         */
+  /*                                                                       */
+  /*   Error definitions are set up with special macros that allow client  */
+  /*   applications to build a table of error message strings.  The        */
+  /*   strings are not included in a normal build of FreeType~2 to save    */
+  /*   space (most client applications do not use them).                   */
+  /*                                                                       */
+  /*   To do so, you have to define the following macros before including  */
+  /*   this file.                                                          */
+  /*                                                                       */
+  /*   {                                                                   */
+  /*     FT_ERROR_START_LIST                                               */
+  /*   }                                                                   */
+  /*                                                                       */
+  /*   This macro is called before anything else to define the start of    */
+  /*   the error list.  It is followed by several FT_ERROR_DEF calls.      */
+  /*                                                                       */
+  /*   {                                                                   */
+  /*     FT_ERROR_DEF( e, v, s )                                           */
+  /*   }                                                                   */
+  /*                                                                       */
+  /*   This macro is called to define one single error.  `e' is the error  */
+  /*   code identifier (e.g., `Invalid_Argument'), `v' is the error's      */
+  /*   numerical value, and `s' is the corresponding error string.         */
+  /*                                                                       */
+  /*   {                                                                   */
+  /*     FT_ERROR_END_LIST                                                 */
+  /*   }                                                                   */
+  /*                                                                       */
+  /*   This macro ends the list.                                           */
+  /*                                                                       */
+  /*   Additionally, you have to undefine `FTERRORS_H_' before #including  */
+  /*   this file.                                                          */
+  /*                                                                       */
+  /*   Here is a simple example.                                           */
+  /*                                                                       */
+  /*   {                                                                   */
+  /*     #undef FTERRORS_H_                                                */
+  /*     #define FT_ERRORDEF( e, v, s )  { e, s },                         */
+  /*     #define FT_ERROR_START_LIST     {                                 */
+  /*     #define FT_ERROR_END_LIST       { 0, NULL } };                    */
+  /*                                                                       */
+  /*     const struct                                                      */
+  /*     {                                                                 */
+  /*       int          err_code;                                          */
+  /*       const char*  err_msg;                                           */
+  /*     } ft_errors[] =                                                   */
+  /*                                                                       */
+  /*     #include FT_ERRORS_H                                              */
+  /*   }                                                                   */
+  /*                                                                       */
+  /*   Note that `FT_Err_Ok' is _not_ defined with `FT_ERRORDEF' but with  */
+  /*   `FT_NOERRORDEF'; it is always zero.                                 */
+  /*                                                                       */
+  /*************************************************************************/
 
   /* */
 
-  /* In previous FreeType versions we used `__FTERRORS_H__`.  However, */
+  /* In previous FreeType versions we used `__FTERRORS_H__'.  However, */
   /* using two successive underscores in a non-system symbol name      */
   /* violates the C (and C++) standard, so it was changed to the       */
   /* current form.  In spite of this, we have to make                  */
   /*                                                                   */
-  /* ```                                                               */
   /*   #undefine __FTERRORS_H__                                        */
-  /* ```                                                               */
   /*                                                                   */
   /* work for backward compatibility.                                  */
   /*                                                                   */
@@ -140,7 +130,7 @@
 
 
   /* FT_ERR_PREFIX is used as a prefix for error identifiers. */
-  /* By default, we use `FT_Err_`.                            */
+  /* By default, we use `FT_Err_'.                            */
   /*                                                          */
 #ifndef FT_ERR_PREFIX
 #define FT_ERR_PREFIX  FT_Err_
@@ -168,8 +158,6 @@
   /*                                                           */
 #ifndef FT_ERRORDEF
 
-#define FT_INCLUDE_ERR_PROTOS
-
 #define FT_ERRORDEF( e, v, s )  e = v,
 #define FT_ERROR_START_LIST     enum {
 #define FT_ERROR_END_LIST       FT_ERR_CAT( FT_ERR_PREFIX, Max ) };
@@ -232,53 +220,6 @@
 #undef FT_ERR_PREFIX
 #endif
 
-  /* FT_INCLUDE_ERR_PROTOS:  Control if function prototypes should be       */
-  /*                         included with `#include FT_ERRORS_H'.  This is */
-  /*                         only true where `FT_ERRORDEF` is undefined.    */
-  /* FT_ERR_PROTOS_DEFINED:  Actual multiple-inclusion protection of        */
-  /*                         `fterrors.h`.                                  */
-#ifdef FT_INCLUDE_ERR_PROTOS
-#undef FT_INCLUDE_ERR_PROTOS
-
-#ifndef FT_ERR_PROTOS_DEFINED
-#define FT_ERR_PROTOS_DEFINED
-
-
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Error_String
-   *
-   * @description:
-   *   Retrieve the description of a valid FreeType error code.
-   *
-   * @input:
-   *   error_code ::
-   *     A valid FreeType error code.
-   *
-   * @return:
-   *   A C~string or `NULL`, if any error occurred.
-   *
-   * @note:
-   *   FreeType has to be compiled with `FT_CONFIG_OPTION_ERROR_STRINGS` or
-   *   `FT_DEBUG_LEVEL_ERROR` to get meaningful descriptions.
-   *   'error_string' will be `NULL` otherwise.
-   *
-   *   Module identification will be ignored:
-   *
-   *   ```c
-   *     strcmp( FT_Error_String(  FT_Err_Unknown_File_Format ),
-   *             FT_Error_String( BDF_Err_Unknown_File_Format ) ) == 0;
-   *   ```
-   */
-  FT_EXPORT( const char* )
-  FT_Error_String( FT_Error  error_code );
-
-
-#endif /* FT_ERR_PROTOS_DEFINED */
-
-#endif /* FT_INCLUDE_ERR_PROTOS */
-
 #endif /* !(FTERRORS_H_ && __FTERRORS_H__) */
 
 

+ 59 - 58
thirdparty/freetype/include/freetype/ftfntfmt.h

@@ -1,19 +1,19 @@
-/****************************************************************************
- *
- * ftfntfmt.h
- *
- *   Support functions for font formats.
- *
- * Copyright (C) 2002-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  ftfntfmt.h                                                             */
+/*                                                                         */
+/*    Support functions for font formats.                                  */
+/*                                                                         */
+/*  Copyright 2002-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 FTFNTFMT_H_
@@ -32,48 +32,49 @@
 FT_BEGIN_HEADER
 
 
-  /**************************************************************************
-   *
-   * @section:
-   *  font_formats
-   *
-   * @title:
-   *  Font Formats
-   *
-   * @abstract:
-   *  Getting the font format.
-   *
-   * @description:
-   *  The single function in this section can be used to get the font format.
-   *  Note that this information is not needed normally; however, there are
-   *  special cases (like in PDF devices) where it is important to
-   *  differentiate, in spite of FreeType's uniform API.
-   *
-   */
-
-
-  /**************************************************************************
-   *
-   * @function:
-   *  FT_Get_Font_Format
-   *
-   * @description:
-   *  Return a string describing the format of a given face.  Possible values
-   *  are 'TrueType', 'Type~1', 'BDF', 'PCF', 'Type~42', 'CID~Type~1', 'CFF',
-   *  'PFR', and 'Windows~FNT'.
-   *
-   *  The return value is suitable to be used as an X11 FONT_PROPERTY.
-   *
-   * @input:
-   *  face ::
-   *    Input face handle.
-   *
-   * @return:
-   *  Font format string.  `NULL` in case of error.
-   *
-   * @note:
-   *  A deprecated name for the same function is `FT_Get_X11_Font_Format`.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*   font_formats                                                        */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*   Font Formats                                                        */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*   Getting the font format.                                            */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*   The single function in this section can be used to get the font     */
+  /*   format.  Note that this information is not needed normally;         */
+  /*   however, there are special cases (like in PDF devices) where it is  */
+  /*   important to differentiate, in spite of FreeType's uniform API.     */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*   FT_Get_Font_Format                                                  */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*   Return a string describing the format of a given face.  Possible    */
+  /*   values are `TrueType', `Type~1', `BDF', `PCF', `Type~42',           */
+  /*   `CID~Type~1', `CFF', `PFR', and `Windows~FNT'.                      */
+  /*                                                                       */
+  /*   The return value is suitable to be used as an X11 FONT_PROPERTY.    */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*   face ::                                                             */
+  /*     Input face handle.                                                */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*   Font format string.  NULL in case of error.                         */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*   A deprecated name for the same function is                          */
+  /*   `FT_Get_X11_Font_Format'.                                           */
+  /*                                                                       */
   FT_EXPORT( const char* )
   FT_Get_Font_Format( FT_Face  face );
 

+ 36 - 38
thirdparty/freetype/include/freetype/ftgasp.h

@@ -1,19 +1,19 @@
-/****************************************************************************
- *
- * ftgasp.h
- *
- *   Access of TrueType's 'gasp' table (specification).
- *
- * Copyright (C) 2007-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  ftgasp.h                                                               */
+/*                                                                         */
+/*    Access of TrueType's `gasp' table (specification).                   */
+/*                                                                         */
+/*  Copyright 2007-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 FTGASP_H_
@@ -32,7 +32,7 @@
 FT_BEGIN_HEADER
 
 
-  /**************************************************************************
+  /***************************************************************************
    *
    * @section:
    *   gasp_table
@@ -41,16 +41,16 @@ FT_BEGIN_HEADER
    *   Gasp Table
    *
    * @abstract:
-   *   Retrieving TrueType 'gasp' table entries.
+   *   Retrieving TrueType `gasp' table entries.
    *
    * @description:
    *   The function @FT_Get_Gasp can be used to query a TrueType or OpenType
-   *   font for specific entries in its 'gasp' table, if any.  This is mainly
-   *   useful when implementing native TrueType hinting with the bytecode
-   *   interpreter to duplicate the Windows text rendering results.
+   *   font for specific entries in its `gasp' table, if any.  This is
+   *   mainly useful when implementing native TrueType hinting with the
+   *   bytecode interpreter to duplicate the Windows text rendering results.
    */
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @enum:
    *   FT_GASP_XXX
@@ -66,7 +66,7 @@ FT_BEGIN_HEADER
    *
    *   FT_GASP_DO_GRIDFIT ::
    *     Grid-fitting and hinting should be performed at the specified ppem.
-   *     This **really** means TrueType bytecode interpretation.  If this bit
+   *     This *really* means TrueType bytecode interpretation.  If this bit
    *     is not set, no hinting gets applied.
    *
    *   FT_GASP_DO_GRAY ::
@@ -80,13 +80,13 @@ FT_BEGIN_HEADER
    *     Grid-fitting must be used with ClearType's symmetric smoothing.
    *
    * @note:
-   *   The bit-flags `FT_GASP_DO_GRIDFIT` and `FT_GASP_DO_GRAY` are to be
+   *   The bit-flags `FT_GASP_DO_GRIDFIT' and `FT_GASP_DO_GRAY' are to be
    *   used for standard font rasterization only.  Independently of that,
-   *   `FT_GASP_SYMMETRIC_SMOOTHING` and `FT_GASP_SYMMETRIC_GRIDFIT` are to
-   *   be used if ClearType is enabled (and `FT_GASP_DO_GRIDFIT` and
-   *   `FT_GASP_DO_GRAY` are consequently ignored).
+   *   `FT_GASP_SYMMETRIC_SMOOTHING' and `FT_GASP_SYMMETRIC_GRIDFIT' are to
+   *   be used if ClearType is enabled (and `FT_GASP_DO_GRIDFIT' and
+   *   `FT_GASP_DO_GRAY' are consequently ignored).
    *
-   *   'ClearType' is Microsoft's implementation of LCD rendering, partly
+   *   `ClearType' is Microsoft's implementation of LCD rendering, partly
    *   protected by patents.
    *
    * @since:
@@ -99,31 +99,29 @@ FT_BEGIN_HEADER
 #define FT_GASP_SYMMETRIC_SMOOTHING  0x08
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
-   * @function:
+   * @func:
    *   FT_Get_Gasp
    *
    * @description:
    *   For a TrueType or OpenType font file, return the rasterizer behaviour
-   *   flags from the font's 'gasp' table corresponding to a given character
-   *   pixel size.
+   *   flags from the font's `gasp' table corresponding to a given
+   *   character pixel size.
    *
    * @input:
-   *   face ::
-   *     The source face handle.
+   *   face :: The source face handle.
    *
-   *   ppem ::
-   *     The vertical character pixel size.
+   *   ppem :: The vertical character pixel size.
    *
    * @return:
    *   Bit flags (see @FT_GASP_XXX), or @FT_GASP_NO_TABLE if there is no
-   *   'gasp' table in the face.
+   *   `gasp' table in the face.
    *
    * @note:
    *   If you want to use the MM functionality of OpenType variation fonts
    *   (i.e., using @FT_Set_Var_Design_Coordinates and friends), call this
-   *   function **after** setting an instance since the return values can
+   *   function *after* setting an instance since the return values can
    *   change.
    *
    * @since:

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 431 - 480
thirdparty/freetype/include/freetype/ftglyph.h


+ 246 - 244
thirdparty/freetype/include/freetype/ftgxval.h

@@ -1,28 +1,28 @@
-/****************************************************************************
- *
- * ftgxval.h
- *
- *   FreeType API for validating TrueTypeGX/AAT tables (specification).
- *
- * Copyright (C) 2004-2019 by
- * Masatake YAMATO, Redhat K.K,
- * 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.
- *
- */
-
-/****************************************************************************
- *
- * gxvalid is derived from both gxlayout module and otvalid module.
- * Development of gxlayout is supported by the Information-technology
- * Promotion Agency(IPA), Japan.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  ftgxval.h                                                              */
+/*                                                                         */
+/*    FreeType API for validating TrueTypeGX/AAT tables (specification).   */
+/*                                                                         */
+/*  Copyright 2004-2018 by                                                 */
+/*  Masatake YAMATO, Redhat K.K,                                           */
+/*  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.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+/***************************************************************************/
+/*                                                                         */
+/* gxvalid is derived from both gxlayout module and otvalid module.        */
+/* Development of gxlayout is supported by the Information-technology      */
+/* Promotion Agency(IPA), Japan.                                           */
+/*                                                                         */
+/***************************************************************************/
 
 
 #ifndef FTGXVAL_H_
@@ -41,43 +41,43 @@
 FT_BEGIN_HEADER
 
 
-  /**************************************************************************
-   *
-   * @section:
-   *   gx_validation
-   *
-   * @title:
-   *   TrueTypeGX/AAT Validation
-   *
-   * @abstract:
-   *   An API to validate TrueTypeGX/AAT tables.
-   *
-   * @description:
-   *   This section contains the declaration of functions to validate some
-   *   TrueTypeGX tables (feat, mort, morx, bsln, just, kern, opbd, trak,
-   *   prop, lcar).
-   *
-   * @order:
-   *   FT_TrueTypeGX_Validate
-   *   FT_TrueTypeGX_Free
-   *
-   *   FT_ClassicKern_Validate
-   *   FT_ClassicKern_Free
-   *
-   *   FT_VALIDATE_GX_LENGTH
-   *   FT_VALIDATE_GXXXX
-   *   FT_VALIDATE_CKERNXXX
-   *
-   */
-
-  /**************************************************************************
-   *
-   *
-   * Warning: Use `FT_VALIDATE_XXX` to validate a table.
-   *          Following definitions are for gxvalid developers.
-   *
-   *
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    gx_validation                                                      */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*    TrueTypeGX/AAT Validation                                          */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*    An API to validate TrueTypeGX/AAT tables.                          */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This section contains the declaration of functions to validate     */
+  /*    some TrueTypeGX tables (feat, mort, morx, bsln, just, kern, opbd,  */
+  /*    trak, prop, lcar).                                                 */
+  /*                                                                       */
+  /* <Order>                                                               */
+  /*    FT_TrueTypeGX_Validate                                             */
+  /*    FT_TrueTypeGX_Free                                                 */
+  /*                                                                       */
+  /*    FT_ClassicKern_Validate                                            */
+  /*    FT_ClassicKern_Free                                                */
+  /*                                                                       */
+  /*    FT_VALIDATE_GX_LENGTH                                              */
+  /*    FT_VALIDATE_GXXXX                                                  */
+  /*    FT_VALIDATE_CKERNXXX                                               */
+  /*                                                                       */
+  /*************************************************************************/
+
+  /*************************************************************************/
+  /*                                                                       */
+  /*                                                                       */
+  /* Warning: Use FT_VALIDATE_XXX to validate a table.                     */
+  /*          Following definitions are for gxvalid developers.            */
+  /*                                                                       */
+  /*                                                                       */
+  /*************************************************************************/
 
 #define FT_VALIDATE_feat_INDEX     0
 #define FT_VALIDATE_mort_INDEX     1
@@ -92,14 +92,14 @@ FT_BEGIN_HEADER
 #define FT_VALIDATE_GX_LAST_INDEX  FT_VALIDATE_lcar_INDEX
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_VALIDATE_GX_LENGTH
    *
    * @description:
    *   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 )
 
@@ -112,51 +112,51 @@ FT_BEGIN_HEADER
           ( FT_VALIDATE_GX_START << FT_VALIDATE_##tag##_INDEX )
 
 
-  /**************************************************************************
-   *
-   * @enum:
-   *    FT_VALIDATE_GXXXX
-   *
-   * @description:
-   *    A list of bit-field constants used with @FT_TrueTypeGX_Validate to
-   *    indicate which TrueTypeGX/AAT Type tables should be validated.
-   *
-   * @values:
-   *    FT_VALIDATE_feat ::
-   *      Validate 'feat' table.
-   *
-   *    FT_VALIDATE_mort ::
-   *      Validate 'mort' table.
-   *
-   *    FT_VALIDATE_morx ::
-   *      Validate 'morx' table.
-   *
-   *    FT_VALIDATE_bsln ::
-   *      Validate 'bsln' table.
-   *
-   *    FT_VALIDATE_just ::
-   *      Validate 'just' table.
-   *
-   *    FT_VALIDATE_kern ::
-   *      Validate 'kern' table.
-   *
-   *    FT_VALIDATE_opbd ::
-   *      Validate 'opbd' table.
-   *
-   *    FT_VALIDATE_trak ::
-   *      Validate 'trak' table.
-   *
-   *    FT_VALIDATE_prop ::
-   *      Validate 'prop' table.
-   *
-   *    FT_VALIDATE_lcar ::
-   *      Validate 'lcar' table.
-   *
-   *    FT_VALIDATE_GX ::
-   *      Validate all TrueTypeGX tables (feat, mort, morx, bsln, just, kern,
-   *      opbd, trak, prop and lcar).
-   *
-   */
+ /**********************************************************************
+  *
+  * @enum:
+  *    FT_VALIDATE_GXXXX
+  *
+  * @description:
+  *    A list of bit-field constants used with @FT_TrueTypeGX_Validate to
+  *    indicate which TrueTypeGX/AAT Type tables should be validated.
+  *
+  * @values:
+  *    FT_VALIDATE_feat ::
+  *      Validate `feat' table.
+  *
+  *    FT_VALIDATE_mort ::
+  *      Validate `mort' table.
+  *
+  *    FT_VALIDATE_morx ::
+  *      Validate `morx' table.
+  *
+  *    FT_VALIDATE_bsln ::
+  *      Validate `bsln' table.
+  *
+  *    FT_VALIDATE_just ::
+  *      Validate `just' table.
+  *
+  *    FT_VALIDATE_kern ::
+  *      Validate `kern' table.
+  *
+  *    FT_VALIDATE_opbd ::
+  *      Validate `opbd' table.
+  *
+  *    FT_VALIDATE_trak ::
+  *      Validate `trak' table.
+  *
+  *    FT_VALIDATE_prop ::
+  *      Validate `prop' table.
+  *
+  *    FT_VALIDATE_lcar ::
+  *      Validate `lcar' table.
+  *
+  *    FT_VALIDATE_GX ::
+  *      Validate all TrueTypeGX tables (feat, mort, morx, bsln, just, kern,
+  *      opbd, trak, prop and lcar).
+  *
+  */
 
 #define FT_VALIDATE_feat  FT_VALIDATE_GX_BITFIELD( feat )
 #define FT_VALIDATE_mort  FT_VALIDATE_GX_BITFIELD( mort )
@@ -181,47 +181,47 @@ FT_BEGIN_HEADER
                           FT_VALIDATE_lcar )
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *    FT_TrueTypeGX_Validate
-   *
-   * @description:
-   *    Validate various TrueTypeGX tables to assure that all offsets and
-   *    indices are valid.  The idea is that a higher-level library that
-   *    actually does the text layout can access those tables without error
-   *    checking (which can be quite time consuming).
-   *
-   * @input:
-   *    face ::
-   *      A handle to the input face.
-   *
-   *    validation_flags ::
-   *      A bit field that specifies the tables to be validated.  See
-   *      @FT_VALIDATE_GXXXX for possible values.
-   *
-   *    table_length ::
-   *      The size of the `tables` array.  Normally, @FT_VALIDATE_GX_LENGTH
-   *      should be passed.
-   *
-   * @output:
-   *    tables ::
-   *      The array where all validated sfnt tables are stored.  The array
-   *      itself must be allocated by a client.
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   *
-   * @note:
-   *   This function only works with TrueTypeGX fonts, returning an error
-   *   otherwise.
-   *
-   *   After use, the application should deallocate the buffers pointed to by
-   *   each `tables` element, by calling @FT_TrueTypeGX_Free.  A `NULL` value
-   *   indicates that the table either doesn't exist in the font, the
-   *   application hasn't asked for validation, or the validator doesn't have
-   *   the ability to validate the sfnt table.
-   */
+ /**********************************************************************
+  *
+  * @function:
+  *    FT_TrueTypeGX_Validate
+  *
+  * @description:
+  *    Validate various TrueTypeGX tables to assure that all offsets and
+  *    indices are valid.  The idea is that a higher-level library that
+  *    actually does the text layout can access those tables without
+  *    error checking (which can be quite time consuming).
+  *
+  * @input:
+  *    face ::
+  *       A handle to the input face.
+  *
+  *    validation_flags ::
+  *       A bit field that specifies the tables to be validated.  See
+  *       @FT_VALIDATE_GXXXX for possible values.
+  *
+  *    table_length ::
+  *       The size of the `tables' array.  Normally, @FT_VALIDATE_GX_LENGTH
+  *       should be passed.
+  *
+  * @output:
+  *    tables ::
+  *       The array where all validated sfnt tables are stored.
+  *       The array itself must be allocated by a client.
+  *
+  * @return:
+  *   FreeType error code.  0~means success.
+  *
+  * @note:
+  *   This function only works with TrueTypeGX fonts, returning an error
+  *   otherwise.
+  *
+  *   After use, the application should deallocate the buffers pointed to by
+  *   each `tables' element, by calling @FT_TrueTypeGX_Free.  A NULL value
+  *   indicates that the table either doesn't exist in the font, the
+  *   application hasn't asked for validation, or the validator doesn't have
+  *   the ability to validate the sfnt table.
+  */
   FT_EXPORT( FT_Error )
   FT_TrueTypeGX_Validate( FT_Face   face,
                           FT_UInt   validation_flags,
@@ -229,117 +229,119 @@ FT_BEGIN_HEADER
                           FT_UInt   table_length );
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *    FT_TrueTypeGX_Free
-   *
-   * @description:
-   *    Free the buffer allocated by TrueTypeGX validator.
-   *
-   * @input:
-   *    face ::
-   *      A handle to the input face.
-   *
-   *    table ::
-   *      The pointer to the buffer allocated by @FT_TrueTypeGX_Validate.
-   *
-   * @note:
-   *   This function must be used to free the buffer allocated by
-   *   @FT_TrueTypeGX_Validate only.
-   */
+ /**********************************************************************
+  *
+  * @function:
+  *    FT_TrueTypeGX_Free
+  *
+  * @description:
+  *    Free the buffer allocated by TrueTypeGX validator.
+  *
+  * @input:
+  *    face ::
+  *       A handle to the input face.
+  *
+  *    table ::
+  *       The pointer to the buffer allocated by
+  *       @FT_TrueTypeGX_Validate.
+  *
+  * @note:
+  *   This function must be used to free the buffer allocated by
+  *   @FT_TrueTypeGX_Validate only.
+  */
   FT_EXPORT( void )
   FT_TrueTypeGX_Free( FT_Face   face,
                       FT_Bytes  table );
 
 
-  /**************************************************************************
-   *
-   * @enum:
-   *    FT_VALIDATE_CKERNXXX
-   *
-   * @description:
-   *    A list of bit-field constants used with @FT_ClassicKern_Validate to
-   *    indicate the classic kern dialect or dialects.  If the selected type
-   *    doesn't fit, @FT_ClassicKern_Validate regards the table as invalid.
-   *
-   * @values:
-   *    FT_VALIDATE_MS ::
-   *      Handle the 'kern' table as a classic Microsoft kern table.
-   *
-   *    FT_VALIDATE_APPLE ::
-   *      Handle the 'kern' table as a classic Apple kern table.
-   *
-   *    FT_VALIDATE_CKERN ::
-   *      Handle the 'kern' as either classic Apple or Microsoft kern table.
-   */
+ /**********************************************************************
+  *
+  * @enum:
+  *    FT_VALIDATE_CKERNXXX
+  *
+  * @description:
+  *    A list of bit-field constants used with @FT_ClassicKern_Validate
+  *    to indicate the classic kern dialect or dialects.  If the selected
+  *    type doesn't fit, @FT_ClassicKern_Validate regards the table as
+  *    invalid.
+  *
+  * @values:
+  *    FT_VALIDATE_MS ::
+  *      Handle the `kern' table as a classic Microsoft kern table.
+  *
+  *    FT_VALIDATE_APPLE ::
+  *      Handle the `kern' table as a classic Apple kern table.
+  *
+  *    FT_VALIDATE_CKERN ::
+  *      Handle the `kern' as either classic Apple or Microsoft kern table.
+  */
 #define FT_VALIDATE_MS     ( FT_VALIDATE_GX_START << 0 )
 #define FT_VALIDATE_APPLE  ( FT_VALIDATE_GX_START << 1 )
 
 #define FT_VALIDATE_CKERN  ( FT_VALIDATE_MS | FT_VALIDATE_APPLE )
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *    FT_ClassicKern_Validate
-   *
-   * @description:
-   *    Validate classic (16-bit format) kern table to assure that the
-   *    offsets and indices are valid.  The idea is that a higher-level
-   *    library that actually does the text layout can access those tables
-   *    without error checking (which can be quite time consuming).
-   *
-   *    The 'kern' table validator in @FT_TrueTypeGX_Validate deals with both
-   *    the new 32-bit format and the classic 16-bit format, while
-   *    FT_ClassicKern_Validate only supports the classic 16-bit format.
-   *
-   * @input:
-   *    face ::
-   *      A handle to the input face.
-   *
-   *    validation_flags ::
-   *      A bit field that specifies the dialect to be validated.  See
-   *      @FT_VALIDATE_CKERNXXX for possible values.
-   *
-   * @output:
-   *    ckern_table ::
-   *      A pointer to the kern table.
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   *
-   * @note:
-   *   After use, the application should deallocate the buffers pointed to by
-   *   `ckern_table`, by calling @FT_ClassicKern_Free.  A `NULL` value
-   *   indicates that the table doesn't exist in the font.
-   */
+ /**********************************************************************
+  *
+  * @function:
+  *    FT_ClassicKern_Validate
+  *
+  * @description:
+  *    Validate classic (16-bit format) kern table to assure that the offsets
+  *    and indices are valid.  The idea is that a higher-level library that
+  *    actually does the text layout can access those tables without error
+  *    checking (which can be quite time consuming).
+  *
+  *    The `kern' table validator in @FT_TrueTypeGX_Validate deals with both
+  *    the new 32-bit format and the classic 16-bit format, while
+  *    FT_ClassicKern_Validate only supports the classic 16-bit format.
+  *
+  * @input:
+  *    face ::
+  *       A handle to the input face.
+  *
+  *    validation_flags ::
+  *       A bit field that specifies the dialect to be validated.  See
+  *       @FT_VALIDATE_CKERNXXX for possible values.
+  *
+  * @output:
+  *    ckern_table ::
+  *       A pointer to the kern table.
+  *
+  * @return:
+  *   FreeType error code.  0~means success.
+  *
+  * @note:
+  *   After use, the application should deallocate the buffers pointed to by
+  *   `ckern_table', by calling @FT_ClassicKern_Free.  A NULL value
+  *   indicates that the table doesn't exist in the font.
+  */
   FT_EXPORT( FT_Error )
   FT_ClassicKern_Validate( FT_Face    face,
                            FT_UInt    validation_flags,
                            FT_Bytes  *ckern_table );
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *    FT_ClassicKern_Free
-   *
-   * @description:
-   *    Free the buffer allocated by classic Kern validator.
-   *
-   * @input:
-   *    face ::
-   *      A handle to the input face.
-   *
-   *    table ::
-   *      The pointer to the buffer that is allocated by
-   *      @FT_ClassicKern_Validate.
-   *
-   * @note:
-   *   This function must be used to free the buffer allocated by
-   *   @FT_ClassicKern_Validate only.
-   */
+ /**********************************************************************
+  *
+  * @function:
+  *    FT_ClassicKern_Free
+  *
+  * @description:
+  *    Free the buffer allocated by classic Kern validator.
+  *
+  * @input:
+  *    face ::
+  *       A handle to the input face.
+  *
+  *    table ::
+  *       The pointer to the buffer that is allocated by
+  *       @FT_ClassicKern_Validate.
+  *
+  * @note:
+  *   This function must be used to free the buffer allocated by
+  *   @FT_ClassicKern_Validate only.
+  */
   FT_EXPORT( void )
   FT_ClassicKern_Free( FT_Face   face,
                        FT_Bytes  table );

+ 113 - 113
thirdparty/freetype/include/freetype/ftgzip.h

@@ -1,19 +1,19 @@
-/****************************************************************************
- *
- * ftgzip.h
- *
- *   Gzip-compressed stream support.
- *
- * Copyright (C) 2002-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  ftgzip.h                                                               */
+/*                                                                         */
+/*    Gzip-compressed stream support.                                      */
+/*                                                                         */
+/*  Copyright 2002-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 FTGZIP_H_
@@ -31,108 +31,108 @@
 
 FT_BEGIN_HEADER
 
-  /**************************************************************************
-   *
-   * @section:
-   *   gzip
-   *
-   * @title:
-   *   GZIP Streams
-   *
-   * @abstract:
-   *   Using gzip-compressed font files.
-   *
-   * @description:
-   *   This section contains the declaration of Gzip-specific functions.
-   *
-   */
-
-
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Stream_OpenGzip
-   *
-   * @description:
-   *   Open a new stream to parse gzip-compressed font files.  This is mainly
-   *   used to support the compressed `*.pcf.gz` fonts that come with
-   *   XFree86.
-   *
-   * @input:
-   *   stream ::
-   *     The target embedding stream.
-   *
-   *   source ::
-   *     The source stream.
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   *
-   * @note:
-   *   The source stream must be opened _before_ calling this function.
-   *
-   *   Calling the internal function `FT_Stream_Close` on the new stream will
-   *   **not** call `FT_Stream_Close` on the source stream.  None of the
-   *   stream objects will be released to the heap.
-   *
-   *   The stream implementation is very basic and resets the decompression
-   *   process each time seeking backwards is needed within the stream.
-   *
-   *   In certain builds of the library, gzip compression recognition is
-   *   automatically handled when calling @FT_New_Face or @FT_Open_Face.
-   *   This means that if no font driver is capable of handling the raw
-   *   compressed file, the library will try to open a gzipped stream from it
-   *   and re-open the face with it.
-   *
-   *   This function may return `FT_Err_Unimplemented_Feature` if your build
-   *   of FreeType was not compiled with zlib support.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    gzip                                                               */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*    GZIP Streams                                                       */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*    Using gzip-compressed font files.                                  */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This section contains the declaration of Gzip-specific functions.  */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+ /************************************************************************
+  *
+  * @function:
+  *   FT_Stream_OpenGzip
+  *
+  * @description:
+  *   Open a new stream to parse gzip-compressed font files.  This is
+  *   mainly used to support the compressed `*.pcf.gz' fonts that come
+  *   with XFree86.
+  *
+  * @input:
+  *   stream ::
+  *     The target embedding stream.
+  *
+  *   source ::
+  *     The source stream.
+  *
+  * @return:
+  *   FreeType error code.  0~means success.
+  *
+  * @note:
+  *   The source stream must be opened _before_ calling this function.
+  *
+  *   Calling the internal function `FT_Stream_Close' on the new stream will
+  *   *not* call `FT_Stream_Close' on the source stream.  None of the stream
+  *   objects will be released to the heap.
+  *
+  *   The stream implementation is very basic and resets the decompression
+  *   process each time seeking backwards is needed within the stream.
+  *
+  *   In certain builds of the library, gzip compression recognition is
+  *   automatically handled when calling @FT_New_Face or @FT_Open_Face.
+  *   This means that if no font driver is capable of handling the raw
+  *   compressed file, the library will try to open a gzipped stream from
+  *   it and re-open the face with it.
+  *
+  *   This function may return `FT_Err_Unimplemented_Feature' if your build
+  *   of FreeType was not compiled with zlib support.
+  */
   FT_EXPORT( FT_Error )
   FT_Stream_OpenGzip( FT_Stream  stream,
                       FT_Stream  source );
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Gzip_Uncompress
-   *
-   * @description:
-   *   Decompress a zipped input buffer into an output buffer.  This function
-   *   is modeled after zlib's `uncompress` function.
-   *
-   * @input:
-   *   memory ::
-   *     A FreeType memory handle.
-   *
-   *   input ::
-   *     The input buffer.
-   *
-   *   input_len ::
-   *     The length of the input buffer.
-   *
-   * @output:
-   *   output ::
-   *     The output buffer.
-   *
-   * @inout:
-   *   output_len ::
-   *     Before calling the function, this is the total size of the output
-   *     buffer, which must be large enough to hold the entire uncompressed
-   *     data (so the size of the uncompressed data must be known in
-   *     advance).  After calling the function, `output_len` is the size of
-   *     the used data in `output`.
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   *
-   * @note:
-   *   This function may return `FT_Err_Unimplemented_Feature` if your build
-   *   of FreeType was not compiled with zlib support.
-   *
-   * @since:
-   *   2.5.1
-   */
+ /************************************************************************
+  *
+  * @function:
+  *   FT_Gzip_Uncompress
+  *
+  * @description:
+  *   Decompress a zipped input buffer into an output buffer.  This function
+  *   is modeled after zlib's `uncompress' function.
+  *
+  * @input:
+  *   memory ::
+  *     A FreeType memory handle.
+  *
+  *   input ::
+  *     The input buffer.
+  *
+  *   input_len ::
+  *     The length of the input buffer.
+  *
+  * @output:
+  *   output::
+  *     The output buffer.
+  *
+  * @inout:
+  *   output_len ::
+  *     Before calling the function, this is the total size of the output
+  *     buffer, which must be large enough to hold the entire uncompressed
+  *     data (so the size of the uncompressed data must be known in
+  *     advance).  After calling the function, `output_len' is the size of
+  *     the used data in `output'.
+  *
+  * @return:
+  *   FreeType error code.  0~means success.
+  *
+  * @note:
+  *   This function may return `FT_Err_Unimplemented_Feature' if your build
+  *   of FreeType was not compiled with zlib support.
+  *
+  * @since:
+  *   2.5.1
+  */
   FT_EXPORT( FT_Error )
   FT_Gzip_Uncompress( FT_Memory       memory,
                       FT_Byte*        output,

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 466 - 489
thirdparty/freetype/include/freetype/ftimage.h


+ 69 - 70
thirdparty/freetype/include/freetype/ftincrem.h

@@ -1,19 +1,19 @@
-/****************************************************************************
- *
- * ftincrem.h
- *
- *   FreeType incremental loading (specification).
- *
- * Copyright (C) 2002-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  ftincrem.h                                                             */
+/*                                                                         */
+/*    FreeType incremental loading (specification).                        */
+/*                                                                         */
+/*  Copyright 2002-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 FTINCREM_H_
@@ -32,7 +32,7 @@
 
 FT_BEGIN_HEADER
 
-  /**************************************************************************
+  /***************************************************************************
    *
    * @section:
    *    incremental
@@ -45,7 +45,7 @@ FT_BEGIN_HEADER
    *
    * @description:
    *   This section contains various functions used to perform so-called
-   *   'incremental' glyph loading.  This is a mode where all glyphs loaded
+   *   `incremental' glyph loading.  This is a mode where all glyphs loaded
    *   from a given @FT_Face are provided by the client application.
    *
    *   Apart from that, all other tables are loaded normally from the font
@@ -60,24 +60,23 @@ FT_BEGIN_HEADER
    */
 
 
-  /**************************************************************************
+  /***************************************************************************
    *
    * @type:
    *   FT_Incremental
    *
    * @description:
    *   An opaque type describing a user-provided object used to implement
-   *   'incremental' glyph loading within FreeType.  This is used to support
-   *   embedded fonts in certain environments (e.g., PostScript
-   *   interpreters), where the glyph data isn't in the font file, or must be
-   *   overridden by different values.
+   *   `incremental' glyph loading within FreeType.  This is used to support
+   *   embedded fonts in certain environments (e.g., PostScript interpreters),
+   *   where the glyph data isn't in the font file, or must be overridden by
+   *   different values.
    *
    * @note:
-   *   It is up to client applications to create and implement
-   *   @FT_Incremental objects, as long as they provide implementations for
-   *   the methods @FT_Incremental_GetGlyphDataFunc,
-   *   @FT_Incremental_FreeGlyphDataFunc and
-   *   @FT_Incremental_GetGlyphMetricsFunc.
+   *   It is up to client applications to create and implement @FT_Incremental
+   *   objects, as long as they provide implementations for the methods
+   *   @FT_Incremental_GetGlyphDataFunc, @FT_Incremental_FreeGlyphDataFunc
+   *   and @FT_Incremental_GetGlyphMetricsFunc.
    *
    *   See the description of @FT_Incremental_InterfaceRec to understand how
    *   to use incremental objects with FreeType.
@@ -86,14 +85,14 @@ FT_BEGIN_HEADER
   typedef struct FT_IncrementalRec_*  FT_Incremental;
 
 
-  /**************************************************************************
+  /***************************************************************************
    *
    * @struct:
    *   FT_Incremental_MetricsRec
    *
    * @description:
-   *   A small structure used to contain the basic glyph metrics returned by
-   *   the @FT_Incremental_GetGlyphMetricsFunc method.
+   *   A small structure used to contain the basic glyph metrics returned
+   *   by the @FT_Incremental_GetGlyphMetricsFunc method.
    *
    * @fields:
    *   bearing_x ::
@@ -110,7 +109,7 @@ FT_BEGIN_HEADER
    *
    * @note:
    *   These correspond to horizontal or vertical metrics depending on the
-   *   value of the `vertical` argument to the function
+   *   value of the `vertical' argument to the function
    *   @FT_Incremental_GetGlyphMetricsFunc.
    *
    */
@@ -124,7 +123,7 @@ FT_BEGIN_HEADER
   } FT_Incremental_MetricsRec;
 
 
-  /**************************************************************************
+  /***************************************************************************
    *
    * @struct:
    *   FT_Incremental_Metrics
@@ -136,7 +135,7 @@ FT_BEGIN_HEADER
    typedef struct FT_Incremental_MetricsRec_*  FT_Incremental_Metrics;
 
 
-  /**************************************************************************
+  /***************************************************************************
    *
    * @type:
    *   FT_Incremental_GetGlyphDataFunc
@@ -148,8 +147,8 @@ FT_BEGIN_HEADER
    *
    *   Note that the format of the glyph's data bytes depends on the font
    *   file format.  For TrueType, it must correspond to the raw bytes within
-   *   the 'glyf' table.  For PostScript formats, it must correspond to the
-   *   **unencrypted** charstring bytes, without any `lenIV` header.  It is
+   *   the `glyf' table.  For PostScript formats, it must correspond to the
+   *   *unencrypted* charstring bytes, without any `lenIV' header.  It is
    *   undefined for any other format.
    *
    * @input:
@@ -170,8 +169,8 @@ FT_BEGIN_HEADER
    *
    * @note:
    *   If this function returns successfully the method
-   *   @FT_Incremental_FreeGlyphDataFunc will be called later to release the
-   *   data bytes.
+   *   @FT_Incremental_FreeGlyphDataFunc will be called later to release
+   *   the data bytes.
    *
    *   Nested calls to @FT_Incremental_GetGlyphDataFunc can happen for
    *   compound glyphs.
@@ -183,7 +182,7 @@ FT_BEGIN_HEADER
                                       FT_Data*        adata );
 
 
-  /**************************************************************************
+  /***************************************************************************
    *
    * @type:
    *   FT_Incremental_FreeGlyphDataFunc
@@ -207,7 +206,7 @@ FT_BEGIN_HEADER
                                        FT_Data*        data );
 
 
-  /**************************************************************************
+  /***************************************************************************
    *
    * @type:
    *   FT_Incremental_GetGlyphMetricsFunc
@@ -215,8 +214,8 @@ FT_BEGIN_HEADER
    * @description:
    *   A function used to retrieve the basic metrics of a given glyph index
    *   before accessing its data.  This is necessary because, in certain
-   *   formats like TrueType, the metrics are stored in a different place
-   *   from the glyph images proper.
+   *   formats like TrueType, the metrics are stored in a different place from
+   *   the glyph images proper.
    *
    * @input:
    *   incremental ::
@@ -230,9 +229,9 @@ FT_BEGIN_HEADER
    *     If true, return vertical metrics.
    *
    *   ametrics ::
-   *     This parameter is used for both input and output.  The original
-   *     glyph metrics, if any, in font units.  If metrics are not available
-   *     all the values must be set to zero.
+   *     This parameter is used for both input and output.
+   *     The original glyph metrics, if any, in font units.  If metrics are
+   *     not available all the values must be set to zero.
    *
    * @output:
    *   ametrics ::
@@ -253,8 +252,8 @@ FT_BEGIN_HEADER
    *   FT_Incremental_FuncsRec
    *
    * @description:
-   *   A table of functions for accessing fonts that load data incrementally.
-   *   Used in @FT_Incremental_InterfaceRec.
+   *   A table of functions for accessing fonts that load data
+   *   incrementally.  Used in @FT_Incremental_InterfaceRec.
    *
    * @fields:
    *   get_glyph_data ::
@@ -264,8 +263,8 @@ FT_BEGIN_HEADER
    *     The function to release glyph data.  Must not be null.
    *
    *   get_glyph_metrics ::
-   *     The function to get glyph metrics.  May be null if the font does not
-   *     provide overriding glyph metrics.
+   *     The function to get glyph metrics.  May be null if the font does
+   *     not provide overriding glyph metrics.
    *
    */
   typedef struct  FT_Incremental_FuncsRec_
@@ -277,7 +276,7 @@ FT_BEGIN_HEADER
   } FT_Incremental_FuncsRec;
 
 
-  /**************************************************************************
+  /***************************************************************************
    *
    * @struct:
    *   FT_Incremental_InterfaceRec
@@ -287,30 +286,30 @@ FT_BEGIN_HEADER
    *   wants to support incremental glyph loading.  You should use it with
    *   @FT_PARAM_TAG_INCREMENTAL as in the following example:
    *
-   *   ```
-   *     FT_Incremental_InterfaceRec  inc_int;
-   *     FT_Parameter                 parameter;
-   *     FT_Open_Args                 open_args;
+   *     {
+   *       FT_Incremental_InterfaceRec  inc_int;
+   *       FT_Parameter                 parameter;
+   *       FT_Open_Args                 open_args;
    *
    *
-   *     // set up incremental descriptor
-   *     inc_int.funcs  = my_funcs;
-   *     inc_int.object = my_object;
+   *       // set up incremental descriptor
+   *       inc_int.funcs  = my_funcs;
+   *       inc_int.object = my_object;
    *
-   *     // set up optional parameter
-   *     parameter.tag  = FT_PARAM_TAG_INCREMENTAL;
-   *     parameter.data = &inc_int;
+   *       // set up optional parameter
+   *       parameter.tag  = FT_PARAM_TAG_INCREMENTAL;
+   *       parameter.data = &inc_int;
    *
-   *     // set up FT_Open_Args structure
-   *     open_args.flags      = FT_OPEN_PATHNAME | FT_OPEN_PARAMS;
-   *     open_args.pathname   = my_font_pathname;
-   *     open_args.num_params = 1;
-   *     open_args.params     = &parameter; // we use one optional argument
+   *       // set up FT_Open_Args structure
+   *       open_args.flags      = FT_OPEN_PATHNAME | FT_OPEN_PARAMS;
+   *       open_args.pathname   = my_font_pathname;
+   *       open_args.num_params = 1;
+   *       open_args.params     = &parameter; // we use one optional argument
    *
-   *     // open the font
-   *     error = FT_Open_Face( library, &open_args, index, &face );
-   *     ...
-   *   ```
+   *       // open the font
+   *       error = FT_Open_Face( library, &open_args, index, &face );
+   *       ...
+   *     }
    *
    */
   typedef struct  FT_Incremental_InterfaceRec_
@@ -321,7 +320,7 @@ FT_BEGIN_HEADER
   } FT_Incremental_InterfaceRec;
 
 
-  /**************************************************************************
+  /***************************************************************************
    *
    * @type:
    *   FT_Incremental_Interface

+ 146 - 165
thirdparty/freetype/include/freetype/ftlcdfil.h

@@ -1,20 +1,20 @@
-/****************************************************************************
- *
- * ftlcdfil.h
- *
- *   FreeType API for color filtering of subpixel bitmap glyphs
- *   (specification).
- *
- * Copyright (C) 2006-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  ftlcdfil.h                                                             */
+/*                                                                         */
+/*    FreeType API for color filtering of subpixel bitmap glyphs           */
+/*    (specification).                                                     */
+/*                                                                         */
+/*  Copyright 2006-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 FTLCDFIL_H_
@@ -33,98 +33,105 @@
 
 FT_BEGIN_HEADER
 
-  /**************************************************************************
+  /***************************************************************************
    *
    * @section:
-   *   lcd_rendering
+   *   lcd_filtering
    *
    * @title:
-   *   Subpixel Rendering
+   *   LCD Filtering
    *
    * @abstract:
-   *   API to control subpixel rendering.
+   *   Reduce color fringes of subpixel-rendered bitmaps.
    *
    * @description:
-   *   FreeType provides two alternative subpixel rendering technologies. 
-   *   Should you define `FT_CONFIG_OPTION_SUBPIXEL_RENDERING` in your
-   *   `ftoption.h` file, this enables patented ClearType-style rendering. 
-   *   Otherwise, Harmony LCD rendering is enabled.  These technologies are
-   *   controlled differently and API described below, although always
-   *   available, performs its function when appropriate method is enabled
-   *   and does nothing otherwise.
+   *   Should you #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING in your
+   *   `ftoption.h', which enables patented ClearType-style rendering,
+   *   the LCD-optimized glyph bitmaps should be filtered to reduce color
+   *   fringes inherent to this technology.  The default FreeType LCD
+   *   rendering uses different technology, and API described below,
+   *   although available, does nothing.
    *
    *   ClearType-style LCD rendering exploits the color-striped structure of
    *   LCD pixels, increasing the available resolution in the direction of
-   *   the stripe (usually horizontal RGB) by a factor of~3.  Using the
-   *   subpixels coverages unfiltered can create severe color fringes
-   *   especially when rendering thin features.  Indeed, to produce
-   *   black-on-white text, the nearby color subpixels must be dimmed
-   *   equally.
-   *
-   *   A good 5-tap FIR filter should be applied to subpixel coverages
-   *   regardless of pixel boundaries and should have these properties:
-   *
-   *   1. It should be symmetrical, like {~a, b, c, b, a~}, to avoid
-   *      any shifts in appearance.
-   *
-   *   2. It should be color-balanced, meaning a~+ b~=~c, to reduce color
-   *      fringes by distributing the computed coverage for one subpixel to
-   *      all subpixels equally.
-   *
-   *   3. It should be normalized, meaning 2a~+ 2b~+ c~=~1.0 to maintain
-   *      overall brightness.
-   *
-   *   Boxy 3-tap filter {0, 1/3, 1/3, 1/3, 0} is sharper but is less
-   *   forgiving of non-ideal gamma curves of a screen (and viewing angles),
-   *   beveled filters are fuzzier but more tolerant.
-   *
-   *   Use the @FT_Library_SetLcdFilter or @FT_Library_SetLcdFilterWeights
-   *   API to specify a low-pass filter, which is then applied to
-   *   subpixel-rendered bitmaps generated through @FT_Render_Glyph.
-   *
-   *   Harmony LCD rendering is suitable to panels with any regular subpixel
-   *   structure, not just monitors with 3 color striped subpixels, as long
-   *   as the color subpixels have fixed positions relative to the pixel
-   *   center.  In this case, each color channel is then rendered separately
-   *   after shifting the outline opposite to the subpixel shift so that the
-   *   coverage maps are aligned.  This method is immune to color fringes
-   *   because the shifts do not change integral coverage.
-   *
-   *   The subpixel geometry must be specified by xy-coordinates for each
-   *   subpixel. By convention they may come in the RGB order: {{-1/3, 0},
-   *   {0, 0}, {1/3, 0}} for standard RGB striped panel or {{-1/6, 1/4},
-   *   {-1/6, -1/4}, {1/3, 0}} for a certain PenTile panel.
-   *
-   *   Use the @FT_Library_SetLcdGeometry API to specify subpixel positions.
-   *   If one follows the RGB order convention, the same order applies to the
-   *   resulting @FT_PIXEL_MODE_LCD and @FT_PIXEL_MODE_LCD_V bitmaps.  Note,
-   *   however, that the coordinate frame for the latter must be rotated
-   *   clockwise.  Harmony with default LCD geometry is equivalent to
-   *   ClearType with light filter.
-   *
-   *   As a result of ClearType filtering or Harmony rendering, the
-   *   dimensions of LCD bitmaps can be either wider or taller than the
-   *   dimensions of the corresponding outline with regard to the pixel grid.
-   *   For example, for @FT_RENDER_MODE_LCD, the filter adds 2~subpixels to
-   *   the left, and 2~subpixels to the right.  The bitmap offset values are
-   *   adjusted accordingly, so clients shouldn't need to modify their layout
-   *   and glyph positioning code when enabling the filter.
-   *
-   *   The ClearType and Harmony rendering is applicable to glyph bitmaps
-   *   rendered through @FT_Render_Glyph, @FT_Load_Glyph, @FT_Load_Char, and
-   *   @FT_Glyph_To_Bitmap, when @FT_RENDER_MODE_LCD or @FT_RENDER_MODE_LCD_V
-   *   is specified.  This API does not control @FT_Outline_Render and
-   *   @FT_Outline_Get_Bitmap.
-   *
-   *   The described algorithms can completely remove color artefacts when
-   *   combined with gamma-corrected alpha blending in linear space.  Each of
-   *   the 3~alpha values (subpixels) must by independently used to blend one
-   *   color channel.  That is, red alpha blends the red channel of the text
-   *   color with the red channel of the background pixel.
+   *   the stripe (usually horizontal RGB) by a factor of~3.  Since these
+   *   subpixels are color pixels, using them unfiltered creates severe
+   *   color fringes.  Use the @FT_Library_SetLcdFilter API to specify a
+   *   low-pass filter, which is then applied to subpixel-rendered bitmaps
+   *   generated through @FT_Render_Glyph.  The filter sacrifices some of
+   *   the higher resolution to reduce color fringes, making the glyph image
+   *   slightly blurrier.  Positional improvements will remain.
+   *
+   *   A filter should have two properties:
+   *
+   *   1) It should be normalized, meaning the sum of the 5~components
+   *      should be 256 (0x100).  It is possible to go above or under this
+   *      target sum, however: going under means tossing out contrast, going
+   *      over means invoking clamping and thereby non-linearities that
+   *      increase contrast somewhat at the expense of greater distortion
+   *      and color-fringing.  Contrast is better enhanced through stem
+   *      darkening.
+   *
+   *   2) It should be color-balanced, meaning a filter `{~a, b, c, b, a~}'
+   *      where a~+ b~=~c.  It distributes the computed coverage for one
+   *      subpixel to all subpixels equally, sacrificing some won resolution
+   *      but drastically reducing color-fringing.  Positioning improvements
+   *      remain!  Note that color-fringing can only really be minimized
+   *      when using a color-balanced filter and alpha-blending the glyph
+   *      onto a surface in linear space; see @FT_Render_Glyph.
+   *
+   *   Regarding the form, a filter can be a `boxy' filter or a `beveled'
+   *   filter.  Boxy filters are sharper but are less forgiving of non-ideal
+   *   gamma curves of a screen (viewing angles!), beveled filters are
+   *   fuzzier but more tolerant.
+   *
+   *   Examples:
+   *
+   *   - [0x10 0x40 0x70 0x40 0x10] is beveled and neither balanced nor
+   *     normalized.
+   *
+   *   - [0x1A 0x33 0x4D 0x33 0x1A] is beveled and balanced but not
+   *     normalized.
+   *
+   *   - [0x19 0x33 0x66 0x4c 0x19] is beveled and normalized but not
+   *     balanced.
+   *
+   *   - [0x00 0x4c 0x66 0x4c 0x00] is boxily beveled and normalized but not
+   *     balanced.
+   *
+   *   - [0x00 0x55 0x56 0x55 0x00] is boxy, normalized, and almost
+   *     balanced.
+   *
+   *   - [0x08 0x4D 0x56 0x4D 0x08] is beveled, normalized and, almost
+   *     balanced.
+   *
+   *   The filter affects glyph bitmaps rendered through @FT_Render_Glyph,
+   *   @FT_Load_Glyph, and @FT_Load_Char.  It does _not_ affect the output
+   *   of @FT_Outline_Render and @FT_Outline_Get_Bitmap.
+   *
+   *   If this feature is activated, the dimensions of LCD glyph bitmaps are
+   *   either wider or taller than the dimensions of the corresponding
+   *   outline with regard to the pixel grid.  For example, for
+   *   @FT_RENDER_MODE_LCD, the filter adds 3~subpixels to the left, and
+   *   3~subpixels to the right.  The bitmap offset values are adjusted
+   *   accordingly, so clients shouldn't need to modify their layout and
+   *   glyph positioning code when enabling the filter.
+   *
+   *   It is important to understand that linear alpha blending and gamma
+   *   correction is critical for correctly rendering glyphs onto surfaces
+   *   without artifacts and even more critical when subpixel rendering is
+   *   involved.
+   *
+   *   Each of the 3~alpha values (subpixels) is independently used to blend
+   *   one color channel.  That is, red alpha blends the red channel of the
+   *   text color with the red channel of the background pixel.  The
+   *   distribution of density values by the color-balanced filter assumes
+   *   alpha blending is done in linear space; only then color artifacts
+   *   cancel out.
    */
 
 
-  /**************************************************************************
+  /****************************************************************************
    *
    * @enum:
    *   FT_LcdFilter
@@ -138,25 +145,47 @@ FT_BEGIN_HEADER
    *     results in sometimes severe color fringes.
    *
    *   FT_LCD_FILTER_DEFAULT ::
-   *     This is a beveled, normalized, and color-balanced five-tap filter
-   *     with weights of [0x08 0x4D 0x56 0x4D 0x08] in 1/256th units.
+   *     The default filter reduces color fringes considerably, at the cost
+   *     of a slight blurriness in the output.
+   *
+   *     It is a beveled, normalized, and color-balanced five-tap filter
+   *     that is more forgiving to screens with non-ideal gamma curves and
+   *     viewing angles.  Note that while color-fringing is reduced, it can
+   *     only be minimized by using linear alpha blending and gamma
+   *     correction to render glyphs onto surfaces.  The default filter
+   *     weights are [0x08 0x4D 0x56 0x4D 0x08].
    *
    *   FT_LCD_FILTER_LIGHT ::
-   *     this is a boxy, normalized, and color-balanced three-tap filter with
-   *     weights of [0x00 0x55 0x56 0x55 0x00] in 1/256th units.
+   *     The light filter is a variant that is sharper at the cost of
+   *     slightly more color fringes than the default one.
+   *
+   *     It is a boxy, normalized, and color-balanced three-tap filter that
+   *     is less forgiving to screens with non-ideal gamma curves and
+   *     viewing angles.  This filter works best when the rendering system
+   *     uses linear alpha blending and gamma correction to render glyphs
+   *     onto surfaces.  The light filter weights are
+   *     [0x00 0x55 0x56 0x55 0x00].
    *
    *   FT_LCD_FILTER_LEGACY ::
-   *   FT_LCD_FILTER_LEGACY1 ::
    *     This filter corresponds to the original libXft color filter.  It
    *     provides high contrast output but can exhibit really bad color
    *     fringes if glyphs are not extremely well hinted to the pixel grid.
+   *     In other words, it only works well if the TrueType bytecode
+   *     interpreter is enabled *and* high-quality hinted fonts are used.
+   *
    *     This filter is only provided for comparison purposes, and might be
-   *     disabled or stay unsupported in the future. The second value is
-   *     provided for compatibility with FontConfig, which historically used
-   *     different enumeration, sometimes incorrectly forwarded to FreeType.
+   *     disabled or stay unsupported in the future.
+   *
+   *   FT_LCD_FILTER_LEGACY1 ::
+   *     For historical reasons, the FontConfig library returns a different
+   *     enumeration value for legacy LCD filtering.  To make code work that
+   *     (incorrectly) forwards FontConfig's enumeration value to
+   *     @FT_Library_SetLcdFilter without proper mapping, it is thus easiest
+   *     to have another enumeration value, which is completely equal to
+   *     `FT_LCD_FILTER_LEGACY'.
    *
    * @since:
-   *   2.3.0 (`FT_LCD_FILTER_LEGACY1` since 2.6.2)
+   *   2.3.0 (`FT_LCD_FILTER_LEGACY1' since 2.6.2)
    */
   typedef enum  FT_LcdFilter_
   {
@@ -173,7 +202,7 @@ FT_BEGIN_HEADER
 
   /**************************************************************************
    *
-   * @function:
+   * @func:
    *   FT_Library_SetLcdFilter
    *
    * @description:
@@ -189,20 +218,20 @@ FT_BEGIN_HEADER
    *     The filter type.
    *
    *     You can use @FT_LCD_FILTER_NONE here to disable this feature, or
-   *     @FT_LCD_FILTER_DEFAULT to use a default filter that should work well
-   *     on most LCD screens.
+   *     @FT_LCD_FILTER_DEFAULT to use a default filter that should work
+   *     well on most LCD screens.
    *
    * @return:
    *   FreeType error code.  0~means success.
    *
    * @note:
    *   This feature is always disabled by default.  Clients must make an
-   *   explicit call to this function with a `filter` value other than
+   *   explicit call to this function with a `filter' value other than
    *   @FT_LCD_FILTER_NONE in order to enable it.
    *
-   *   Due to **PATENTS** covering subpixel rendering, this function doesn't
-   *   do anything except returning `FT_Err_Unimplemented_Feature` if the
-   *   configuration macro `FT_CONFIG_OPTION_SUBPIXEL_RENDERING` is not
+   *   Due to *PATENTS* covering subpixel rendering, this function doesn't
+   *   do anything except returning `FT_Err_Unimplemented_Feature' if the
+   *   configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING is not
    *   defined in your build of the library, which should correspond to all
    *   default builds of FreeType.
    *
@@ -216,7 +245,7 @@ FT_BEGIN_HEADER
 
   /**************************************************************************
    *
-   * @function:
+   * @func:
    *   FT_Library_SetLcdFilterWeights
    *
    * @description:
@@ -229,15 +258,15 @@ FT_BEGIN_HEADER
    *
    *   weights ::
    *     A pointer to an array; the function copies the first five bytes and
-   *     uses them to specify the filter weights in 1/256th units.
+   *     uses them to specify the filter weights.
    *
    * @return:
    *   FreeType error code.  0~means success.
    *
    * @note:
-   *   Due to **PATENTS** covering subpixel rendering, this function doesn't
-   *   do anything except returning `FT_Err_Unimplemented_Feature` if the
-   *   configuration macro `FT_CONFIG_OPTION_SUBPIXEL_RENDERING` is not
+   *   Due to *PATENTS* covering subpixel rendering, this function doesn't
+   *   do anything except returning `FT_Err_Unimplemented_Feature' if the
+   *   configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING is not
    *   defined in your build of the library, which should correspond to all
    *   default builds of FreeType.
    *
@@ -252,8 +281,7 @@ FT_BEGIN_HEADER
                                   unsigned char  *weights );
 
 
-  /**************************************************************************
-   *
+  /*
    * @type:
    *   FT_LcdFiveTapFilter
    *
@@ -270,53 +298,6 @@ FT_BEGIN_HEADER
   typedef FT_Byte  FT_LcdFiveTapFilter[FT_LCD_FILTER_FIVE_TAPS];
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Library_SetLcdGeometry
-   *
-   * @description:
-   *   This function can be used to modify default positions of color
-   *   subpixels, which controls Harmony LCD rendering.
-   *
-   * @input:
-   *   library ::
-   *     A handle to the target library instance.
-   *
-   *   sub ::
-   *     A pointer to an array of 3 vectors in 26.6 fractional pixel format;
-   *     the function modifies the default values, see the note below.
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   *
-   * @note:
-   *   Subpixel geometry examples:
-   *
-   *   - {{-21, 0}, {0, 0}, {21, 0}} is the default, corresponding to 3 color
-   *   stripes shifted by a third of a pixel. This could be an RGB panel.
-   *
-   *   - {{21, 0}, {0, 0}, {-21, 0}} looks the same as the default but can
-   *   specify a BGR panel instead, while keeping the bitmap in the same
-   *   RGB888 format.
-   *
-   *   - {{0, 21}, {0, 0}, {0, -21}} is the vertical RGB, but the bitmap
-   *   stays RGB888 as a result.
-   *
-   *   - {{-11, 16}, {-11, -16}, {22, 0}} is a certain PenTile arrangement.
-   *
-   *   This function does nothing and returns `FT_Err_Unimplemented_Feature`
-   *   in the context of ClearType-style subpixel rendering when
-   *   `FT_CONFIG_OPTION_SUBPIXEL_RENDERING` is defined in your build of the
-   *   library.
-   *
-   * @since:
-   *   2.10.0
-   */
-  FT_EXPORT( FT_Error )
-  FT_Library_SetLcdGeometry( FT_Library  library,
-                             FT_Vector   sub[3] );
-
   /* */
 
 

+ 200 - 221
thirdparty/freetype/include/freetype/ftlist.h

@@ -1,27 +1,27 @@
-/****************************************************************************
- *
- * ftlist.h
- *
- *   Generic list support for FreeType (specification).
- *
- * Copyright (C) 1996-2019 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.
- *
- */
-
-
-  /**************************************************************************
-   *
-   * This file implements functions relative to list processing.  Its data
-   * structures are defined in `freetype.h`.
-   *
-   */
+/***************************************************************************/
+/*                                                                         */
+/*  ftlist.h                                                               */
+/*                                                                         */
+/*    Generic list support for FreeType (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.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /*  This file implements functions relative to list processing.  Its     */
+  /*  data structures are defined in `freetype.h'.                         */
+  /*                                                                       */
+  /*************************************************************************/
 
 
 #ifndef FTLIST_H_
@@ -41,245 +41,224 @@
 FT_BEGIN_HEADER
 
 
-  /**************************************************************************
-   *
-   * @section:
-   *   list_processing
-   *
-   * @title:
-   *   List Processing
-   *
-   * @abstract:
-   *   Simple management of lists.
-   *
-   * @description:
-   *   This section contains various definitions related to list processing
-   *   using doubly-linked nodes.
-   *
-   * @order:
-   *   FT_List
-   *   FT_ListNode
-   *   FT_ListRec
-   *   FT_ListNodeRec
-   *
-   *   FT_List_Add
-   *   FT_List_Insert
-   *   FT_List_Find
-   *   FT_List_Remove
-   *   FT_List_Up
-   *   FT_List_Iterate
-   *   FT_List_Iterator
-   *   FT_List_Finalize
-   *   FT_List_Destructor
-   *
-   */
-
-
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_List_Find
-   *
-   * @description:
-   *   Find the list node for a given listed object.
-   *
-   * @input:
-   *   list ::
-   *     A pointer to the parent list.
-   *   data ::
-   *     The address of the listed object.
-   *
-   * @return:
-   *   List node.  `NULL` if it wasn't found.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    list_processing                                                    */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*    List Processing                                                    */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*    Simple management of lists.                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This section contains various definitions related to list          */
+  /*    processing using doubly-linked nodes.                              */
+  /*                                                                       */
+  /* <Order>                                                               */
+  /*    FT_List                                                            */
+  /*    FT_ListNode                                                        */
+  /*    FT_ListRec                                                         */
+  /*    FT_ListNodeRec                                                     */
+  /*                                                                       */
+  /*    FT_List_Add                                                        */
+  /*    FT_List_Insert                                                     */
+  /*    FT_List_Find                                                       */
+  /*    FT_List_Remove                                                     */
+  /*    FT_List_Up                                                         */
+  /*    FT_List_Iterate                                                    */
+  /*    FT_List_Iterator                                                   */
+  /*    FT_List_Finalize                                                   */
+  /*    FT_List_Destructor                                                 */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_List_Find                                                       */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Find the list node for a given listed object.                      */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    list :: A pointer to the parent list.                              */
+  /*    data :: The address of the listed object.                          */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    List node.  NULL if it wasn't found.                               */
+  /*                                                                       */
   FT_EXPORT( FT_ListNode )
   FT_List_Find( FT_List  list,
                 void*    data );
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_List_Add
-   *
-   * @description:
-   *   Append an element to the end of a list.
-   *
-   * @inout:
-   *   list ::
-   *     A pointer to the parent list.
-   *   node ::
-   *     The node to append.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_List_Add                                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Append an element to the end of a list.                            */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    list :: A pointer to the parent list.                              */
+  /*    node :: The node to append.                                        */
+  /*                                                                       */
   FT_EXPORT( void )
   FT_List_Add( FT_List      list,
                FT_ListNode  node );
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_List_Insert
-   *
-   * @description:
-   *   Insert an element at the head of a list.
-   *
-   * @inout:
-   *   list ::
-   *     A pointer to parent list.
-   *   node ::
-   *     The node to insert.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_List_Insert                                                     */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Insert an element at the head of a list.                           */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    list :: A pointer to parent list.                                  */
+  /*    node :: The node to insert.                                        */
+  /*                                                                       */
   FT_EXPORT( void )
   FT_List_Insert( FT_List      list,
                   FT_ListNode  node );
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_List_Remove
-   *
-   * @description:
-   *   Remove a node from a list.  This function doesn't check whether the
-   *   node is in the list!
-   *
-   * @input:
-   *   node ::
-   *     The node to remove.
-   *
-   * @inout:
-   *   list ::
-   *     A pointer to the parent list.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_List_Remove                                                     */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Remove a node from a list.  This function doesn't check whether    */
+  /*    the node is in the list!                                           */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    node :: The node to remove.                                        */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    list :: A pointer to the parent list.                              */
+  /*                                                                       */
   FT_EXPORT( void )
   FT_List_Remove( FT_List      list,
                   FT_ListNode  node );
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_List_Up
-   *
-   * @description:
-   *   Move a node to the head/top of a list.  Used to maintain LRU lists.
-   *
-   * @inout:
-   *   list ::
-   *     A pointer to the parent list.
-   *   node ::
-   *     The node to move.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_List_Up                                                         */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Move a node to the head/top of a list.  Used to maintain LRU       */
+  /*    lists.                                                             */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    list :: A pointer to the parent list.                              */
+  /*    node :: The node to move.                                          */
+  /*                                                                       */
   FT_EXPORT( void )
   FT_List_Up( FT_List      list,
               FT_ListNode  node );
 
 
-  /**************************************************************************
-   *
-   * @functype:
-   *   FT_List_Iterator
-   *
-   * @description:
-   *   An FT_List iterator function that is called during a list parse by
-   *   @FT_List_Iterate.
-   *
-   * @input:
-   *   node ::
-   *     The current iteration list node.
-   *
-   *   user ::
-   *     A typeless pointer passed to @FT_List_Iterate.  Can be used to point
-   *     to the iteration's state.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    FT_List_Iterator                                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    An FT_List iterator function that is called during a list parse    */
+  /*    by @FT_List_Iterate.                                               */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    node :: The current iteration list node.                           */
+  /*                                                                       */
+  /*    user :: A typeless pointer passed to @FT_List_Iterate.             */
+  /*            Can be used to point to the iteration's state.             */
+  /*                                                                       */
   typedef FT_Error
   (*FT_List_Iterator)( FT_ListNode  node,
                        void*        user );
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_List_Iterate
-   *
-   * @description:
-   *   Parse a list and calls a given iterator function on each element.
-   *   Note that parsing is stopped as soon as one of the iterator calls
-   *   returns a non-zero value.
-   *
-   * @input:
-   *   list ::
-   *     A handle to the list.
-   *   iterator ::
-   *     An iterator function, called on each node of the list.
-   *   user ::
-   *     A user-supplied field that is passed as the second argument to the
-   *     iterator.
-   *
-   * @return:
-   *   The result (a FreeType error code) of the last iterator call.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_List_Iterate                                                    */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Parse a list and calls a given iterator function on each element.  */
+  /*    Note that parsing is stopped as soon as one of the iterator calls  */
+  /*    returns a non-zero value.                                          */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    list     :: A handle to the list.                                  */
+  /*    iterator :: An iterator function, called on each node of the list. */
+  /*    user     :: A user-supplied field that is passed as the second     */
+  /*                argument to the iterator.                              */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    The result (a FreeType error code) of the last iterator call.      */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_List_Iterate( FT_List           list,
                    FT_List_Iterator  iterator,
                    void*             user );
 
 
-  /**************************************************************************
-   *
-   * @functype:
-   *   FT_List_Destructor
-   *
-   * @description:
-   *   An @FT_List iterator function that is called during a list
-   *   finalization by @FT_List_Finalize to destroy all elements in a given
-   *   list.
-   *
-   * @input:
-   *   system ::
-   *     The current system object.
-   *
-   *   data ::
-   *     The current object to destroy.
-   *
-   *   user ::
-   *     A typeless pointer passed to @FT_List_Iterate.  It can be used to
-   *     point to the iteration's state.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    FT_List_Destructor                                                 */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    An @FT_List iterator function that is called during a list         */
+  /*    finalization by @FT_List_Finalize to destroy all elements in a     */
+  /*    given list.                                                        */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    system :: The current system object.                               */
+  /*                                                                       */
+  /*    data   :: The current object to destroy.                           */
+  /*                                                                       */
+  /*    user   :: A typeless pointer passed to @FT_List_Iterate.  It can   */
+  /*              be used to point to the iteration's state.               */
+  /*                                                                       */
   typedef void
   (*FT_List_Destructor)( FT_Memory  memory,
                          void*      data,
                          void*      user );
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_List_Finalize
-   *
-   * @description:
-   *   Destroy all elements in the list as well as the list itself.
-   *
-   * @input:
-   *   list ::
-   *     A handle to the list.
-   *
-   *   destroy ::
-   *     A list destructor that will be applied to each element of the list.
-   *     Set this to `NULL` if not needed.
-   *
-   *   memory ::
-   *     The current memory object that handles deallocation.
-   *
-   *   user ::
-   *     A user-supplied field that is passed as the last argument to the
-   *     destructor.
-   *
-   * @note:
-   *   This function expects that all nodes added by @FT_List_Add or
-   *   @FT_List_Insert have been dynamically allocated.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_List_Finalize                                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Destroy all elements in the list as well as the list itself.       */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    list    :: A handle to the list.                                   */
+  /*                                                                       */
+  /*    destroy :: A list destructor that will be applied to each element  */
+  /*               of the list.  Set this to NULL if not needed.           */
+  /*                                                                       */
+  /*    memory  :: The current memory object that handles deallocation.    */
+  /*                                                                       */
+  /*    user    :: A user-supplied field that is passed as the last        */
+  /*               argument to the destructor.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    This function expects that all nodes added by @FT_List_Add or      */
+  /*    @FT_List_Insert have been dynamically allocated.                   */
+  /*                                                                       */
   FT_EXPORT( void )
   FT_List_Finalize( FT_List             list,
                     FT_List_Destructor  destroy,

+ 68 - 69
thirdparty/freetype/include/freetype/ftlzw.h

@@ -1,19 +1,19 @@
-/****************************************************************************
- *
- * ftlzw.h
- *
- *   LZW-compressed stream support.
- *
- * Copyright (C) 2004-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  ftlzw.h                                                                */
+/*                                                                         */
+/*    LZW-compressed stream support.                                       */
+/*                                                                         */
+/*  Copyright 2004-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 FTLZW_H_
@@ -31,60 +31,59 @@
 
 FT_BEGIN_HEADER
 
-  /**************************************************************************
-   *
-   * @section:
-   *   lzw
-   *
-   * @title:
-   *   LZW Streams
-   *
-   * @abstract:
-   *   Using LZW-compressed font files.
-   *
-   * @description:
-   *   This section contains the declaration of LZW-specific functions.
-   *
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    lzw                                                                */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*    LZW Streams                                                        */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*    Using LZW-compressed font files.                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This section contains the declaration of LZW-specific functions.   */
+  /*                                                                       */
+  /*************************************************************************/
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Stream_OpenLZW
-   *
-   * @description:
-   *   Open a new stream to parse LZW-compressed font files.  This is mainly
-   *   used to support the compressed `*.pcf.Z` fonts that come with XFree86.
-   *
-   * @input:
-   *   stream ::
-   *     The target embedding stream.
-   *
-   *   source ::
-   *     The source stream.
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   *
-   * @note:
-   *   The source stream must be opened _before_ calling this function.
-   *
-   *   Calling the internal function `FT_Stream_Close` on the new stream will
-   *   **not** call `FT_Stream_Close` on the source stream.  None of the
-   *   stream objects will be released to the heap.
-   *
-   *   The stream implementation is very basic and resets the decompression
-   *   process each time seeking backwards is needed within the stream
-   *
-   *   In certain builds of the library, LZW compression recognition is
-   *   automatically handled when calling @FT_New_Face or @FT_Open_Face.
-   *   This means that if no font driver is capable of handling the raw
-   *   compressed file, the library will try to open a LZW stream from it and
-   *   re-open the face with it.
-   *
-   *   This function may return `FT_Err_Unimplemented_Feature` if your build
-   *   of FreeType was not compiled with LZW support.
-   */
+ /************************************************************************
+  *
+  * @function:
+  *   FT_Stream_OpenLZW
+  *
+  * @description:
+  *   Open a new stream to parse LZW-compressed font files.  This is
+  *   mainly used to support the compressed `*.pcf.Z' fonts that come
+  *   with XFree86.
+  *
+  * @input:
+  *   stream :: The target embedding stream.
+  *
+  *   source :: The source stream.
+  *
+  * @return:
+  *   FreeType error code.  0~means success.
+  *
+  * @note:
+  *   The source stream must be opened _before_ calling this function.
+  *
+  *   Calling the internal function `FT_Stream_Close' on the new stream will
+  *   *not* call `FT_Stream_Close' on the source stream.  None of the stream
+  *   objects will be released to the heap.
+  *
+  *   The stream implementation is very basic and resets the decompression
+  *   process each time seeking backwards is needed within the stream
+  *
+  *   In certain builds of the library, LZW compression recognition is
+  *   automatically handled when calling @FT_New_Face or @FT_Open_Face.
+  *   This means that if no font driver is capable of handling the raw
+  *   compressed file, the library will try to open a LZW stream from it
+  *   and re-open the face with it.
+  *
+  *   This function may return `FT_Err_Unimplemented_Feature' if your build
+  *   of FreeType was not compiled with LZW support.
+  */
   FT_EXPORT( FT_Error )
   FT_Stream_OpenLZW( FT_Stream  stream,
                      FT_Stream  source );

+ 192 - 207
thirdparty/freetype/include/freetype/ftmac.h

@@ -1,28 +1,28 @@
-/****************************************************************************
- *
- * ftmac.h
- *
- *   Additional Mac-specific API.
- *
- * Copyright (C) 1996-2019 by
- * Just van Rossum, 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  ftmac.h                                                                */
+/*                                                                         */
+/*    Additional Mac-specific API.                                         */
+/*                                                                         */
+/*  Copyright 1996-2018 by                                                 */
+/*  Just van Rossum, 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.                                        */
+/*                                                                         */
+/***************************************************************************/
 
 
-/****************************************************************************
- *
- * NOTE: Include this file after `FT_FREETYPE_H` and after any
- *       Mac-specific headers (because this header uses Mac types such as
- *       'Handle', 'FSSpec', 'FSRef', etc.)
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/* NOTE: Include this file after FT_FREETYPE_H and after any               */
+/*       Mac-specific headers (because this header uses Mac types such as  */
+/*       Handle, FSSpec, FSRef, etc.)                                      */
+/*                                                                         */
+/***************************************************************************/
 
 
 #ifndef FTMAC_H_
@@ -47,59 +47,56 @@ FT_BEGIN_HEADER
 #endif
 
 
-  /**************************************************************************
-   *
-   * @section:
-   *   mac_specific
-   *
-   * @title:
-   *   Mac Specific Interface
-   *
-   * @abstract:
-   *   Only available on the Macintosh.
-   *
-   * @description:
-   *   The following definitions are only available if FreeType is compiled
-   *   on a Macintosh.
-   *
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    mac_specific                                                       */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*    Mac Specific Interface                                             */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*    Only available on the Macintosh.                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    The following definitions are only available if FreeType is        */
+  /*    compiled on a Macintosh.                                           */
+  /*                                                                       */
+  /*************************************************************************/
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_New_Face_From_FOND
-   *
-   * @description:
-   *   Create a new face object from a FOND resource.
-   *
-   * @inout:
-   *   library ::
-   *     A handle to the library resource.
-   *
-   * @input:
-   *   fond ::
-   *     A FOND resource.
-   *
-   *   face_index ::
-   *     Only supported for the -1 'sanity check' special case.
-   *
-   * @output:
-   *   aface ::
-   *     A handle to a new face object.
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   *
-   * @example:
-   *   This function can be used to create @FT_Face objects from fonts that
-   *   are installed in the system as follows.
-   *
-   *   ```
-   *     fond  = GetResource( 'FOND', fontName );
-   *     error = FT_New_Face_From_FOND( library, fond, 0, &face );
-   *   ```
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_New_Face_From_FOND                                              */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Create a new face object from a FOND resource.                     */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    library    :: A handle to the library resource.                    */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    fond       :: A FOND resource.                                     */
+  /*                                                                       */
+  /*    face_index :: Only supported for the -1 `sanity check' special     */
+  /*                  case.                                                */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    aface      :: A handle to a new face object.                       */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0~means success.                             */
+  /*                                                                       */
+  /* <Notes>                                                               */
+  /*    This function can be used to create @FT_Face objects from fonts    */
+  /*    that are installed in the system as follows.                       */
+  /*                                                                       */
+  /*    {                                                                  */
+  /*      fond = GetResource( 'FOND', fontName );                          */
+  /*      error = FT_New_Face_From_FOND( library, fond, 0, &face );        */
+  /*    }                                                                  */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_New_Face_From_FOND( FT_Library  library,
                          Handle      fond,
@@ -108,28 +105,28 @@ FT_BEGIN_HEADER
                        FT_DEPRECATED_ATTRIBUTE;
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_GetFile_From_Mac_Name
-   *
-   * @description:
-   *   Return an FSSpec for the disk file containing the named font.
-   *
-   * @input:
-   *   fontName ::
-   *     Mac OS name of the font (e.g., Times New Roman Bold).
-   *
-   * @output:
-   *   pathSpec ::
-   *     FSSpec to the file.  For passing to @FT_New_Face_From_FSSpec.
-   *
-   *   face_index ::
-   *     Index of the face.  For passing to @FT_New_Face_From_FSSpec.
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_GetFile_From_Mac_Name                                           */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Return an FSSpec for the disk file containing the named font.      */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    fontName   :: Mac OS name of the font (e.g., Times New Roman       */
+  /*                  Bold).                                               */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    pathSpec   :: FSSpec to the file.  For passing to                  */
+  /*                  @FT_New_Face_From_FSSpec.                            */
+  /*                                                                       */
+  /*    face_index :: Index of the face.  For passing to                   */
+  /*                  @FT_New_Face_From_FSSpec.                            */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0~means success.                             */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_GetFile_From_Mac_Name( const char*  fontName,
                             FSSpec*      pathSpec,
@@ -137,28 +134,27 @@ FT_BEGIN_HEADER
                           FT_DEPRECATED_ATTRIBUTE;
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_GetFile_From_Mac_ATS_Name
-   *
-   * @description:
-   *   Return an FSSpec for the disk file containing the named font.
-   *
-   * @input:
-   *   fontName ::
-   *     Mac OS name of the font in ATS framework.
-   *
-   * @output:
-   *   pathSpec ::
-   *     FSSpec to the file. For passing to @FT_New_Face_From_FSSpec.
-   *
-   *   face_index ::
-   *     Index of the face. For passing to @FT_New_Face_From_FSSpec.
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_GetFile_From_Mac_ATS_Name                                       */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Return an FSSpec for the disk file containing the named font.      */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    fontName   :: Mac OS name of the font in ATS framework.            */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    pathSpec   :: FSSpec to the file. For passing to                   */
+  /*                  @FT_New_Face_From_FSSpec.                            */
+  /*                                                                       */
+  /*    face_index :: Index of the face. For passing to                    */
+  /*                  @FT_New_Face_From_FSSpec.                            */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0~means success.                             */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_GetFile_From_Mac_ATS_Name( const char*  fontName,
                                 FSSpec*      pathSpec,
@@ -166,33 +162,30 @@ FT_BEGIN_HEADER
                               FT_DEPRECATED_ATTRIBUTE;
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_GetFilePath_From_Mac_ATS_Name
-   *
-   * @description:
-   *   Return a pathname of the disk file and face index for given font name
-   *   that is handled by ATS framework.
-   *
-   * @input:
-   *   fontName ::
-   *     Mac OS name of the font in ATS framework.
-   *
-   * @output:
-   *   path ::
-   *     Buffer to store pathname of the file.  For passing to @FT_New_Face.
-   *     The client must allocate this buffer before calling this function.
-   *
-   *   maxPathSize ::
-   *     Lengths of the buffer `path` that client allocated.
-   *
-   *   face_index ::
-   *     Index of the face.  For passing to @FT_New_Face.
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_GetFilePath_From_Mac_ATS_Name                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Return a pathname of the disk file and face index for given font   */
+  /*    name that is handled by ATS framework.                             */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    fontName    :: Mac OS name of the font in ATS framework.           */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    path        :: Buffer to store pathname of the file.  For passing  */
+  /*                   to @FT_New_Face.  The client must allocate this     */
+  /*                   buffer before calling this function.                */
+  /*                                                                       */
+  /*    maxPathSize :: Lengths of the buffer `path' that client allocated. */
+  /*                                                                       */
+  /*    face_index  :: Index of the face.  For passing to @FT_New_Face.    */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0~means success.                             */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_GetFilePath_From_Mac_ATS_Name( const char*  fontName,
                                     UInt8*       path,
@@ -201,37 +194,33 @@ FT_BEGIN_HEADER
                                   FT_DEPRECATED_ATTRIBUTE;
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_New_Face_From_FSSpec
-   *
-   * @description:
-   *   Create a new face object from a given resource and typeface index
-   *   using an FSSpec to the font file.
-   *
-   * @inout:
-   *   library ::
-   *     A handle to the library resource.
-   *
-   * @input:
-   *   spec ::
-   *     FSSpec to the font file.
-   *
-   *   face_index ::
-   *     The index of the face within the resource.  The first face has
-   *     index~0.
-   * @output:
-   *   aface ::
-   *     A handle to a new face object.
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   *
-   * @note:
-   *   @FT_New_Face_From_FSSpec is identical to @FT_New_Face except it
-   *   accepts an FSSpec instead of a path.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_New_Face_From_FSSpec                                            */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Create a new face object from a given resource and typeface index  */
+  /*    using an FSSpec to the font file.                                  */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    library    :: A handle to the library resource.                    */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    spec       :: FSSpec to the font file.                             */
+  /*                                                                       */
+  /*    face_index :: The index of the face within the resource.  The      */
+  /*                  first face has index~0.                              */
+  /* <Output>                                                              */
+  /*    aface      :: A handle to a new face object.                       */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0~means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    @FT_New_Face_From_FSSpec is identical to @FT_New_Face except       */
+  /*    it accepts an FSSpec instead of a path.                            */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_New_Face_From_FSSpec( FT_Library     library,
                            const FSSpec  *spec,
@@ -240,37 +229,33 @@ FT_BEGIN_HEADER
                          FT_DEPRECATED_ATTRIBUTE;
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_New_Face_From_FSRef
-   *
-   * @description:
-   *   Create a new face object from a given resource and typeface index
-   *   using an FSRef to the font file.
-   *
-   * @inout:
-   *   library ::
-   *     A handle to the library resource.
-   *
-   * @input:
-   *   spec ::
-   *     FSRef to the font file.
-   *
-   *   face_index ::
-   *     The index of the face within the resource.  The first face has
-   *     index~0.
-   * @output:
-   *   aface ::
-   *     A handle to a new face object.
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   *
-   * @note:
-   *   @FT_New_Face_From_FSRef is identical to @FT_New_Face except it accepts
-   *   an FSRef instead of a path.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_New_Face_From_FSRef                                             */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Create a new face object from a given resource and typeface index  */
+  /*    using an FSRef to the font file.                                   */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    library    :: A handle to the library resource.                    */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    spec       :: FSRef to the font file.                              */
+  /*                                                                       */
+  /*    face_index :: The index of the face within the resource.  The      */
+  /*                  first face has index~0.                              */
+  /* <Output>                                                              */
+  /*    aface      :: A handle to a new face object.                       */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0~means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    @FT_New_Face_From_FSRef is identical to @FT_New_Face except        */
+  /*    it accepts an FSRef instead of a path.                             */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_New_Face_From_FSRef( FT_Library    library,
                           const FSRef  *ref,

+ 494 - 609
thirdparty/freetype/include/freetype/ftmm.h

@@ -1,19 +1,19 @@
-/****************************************************************************
- *
- * ftmm.h
- *
- *   FreeType Multiple Master font interface (specification).
- *
- * Copyright (C) 1996-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  ftmm.h                                                                 */
+/*                                                                         */
+/*    FreeType Multiple Master font 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 FTMM_H_
@@ -27,52 +27,49 @@
 FT_BEGIN_HEADER
 
 
-  /**************************************************************************
-   *
-   * @section:
-   *   multiple_masters
-   *
-   * @title:
-   *   Multiple Masters
-   *
-   * @abstract:
-   *   How to manage Multiple Masters fonts.
-   *
-   * @description:
-   *   The following types and functions are used to manage Multiple Master
-   *   fonts, i.e., the selection of specific design instances by setting
-   *   design axis coordinates.
-   *
-   *   Besides Adobe MM fonts, the interface supports Apple's TrueType GX and
-   *   OpenType variation fonts.  Some of the routines only work with Adobe
-   *   MM fonts, others will work with all three types.  They are similar
-   *   enough that a consistent interface makes sense.
-   *
-   */
-
-
-  /**************************************************************************
-   *
-   * @struct:
-   *   FT_MM_Axis
-   *
-   * @description:
-   *   A structure to model a given axis in design space for Multiple Masters
-   *   fonts.
-   *
-   *   This structure can't be used for TrueType GX or OpenType variation
-   *   fonts.
-   *
-   * @fields:
-   *   name ::
-   *     The axis's name.
-   *
-   *   minimum ::
-   *     The axis's minimum design coordinate.
-   *
-   *   maximum ::
-   *     The axis's maximum design coordinate.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    multiple_masters                                                   */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*    Multiple Masters                                                   */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*    How to manage Multiple Masters fonts.                              */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    The following types and functions are used to manage Multiple      */
+  /*    Master fonts, i.e., the selection of specific design instances by  */
+  /*    setting design axis coordinates.                                   */
+  /*                                                                       */
+  /*    Besides Adobe MM fonts, the interface supports Apple's TrueType GX */
+  /*    and OpenType variation fonts.  Some of the routines only work with */
+  /*    Adobe MM fonts, others will work with all three types.  They are   */
+  /*    similar enough that a consistent interface makes sense.            */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_MM_Axis                                                         */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure to model a given axis in design space for Multiple     */
+  /*    Masters fonts.                                                     */
+  /*                                                                       */
+  /*    This structure can't be used for TrueType GX or OpenType variation */
+  /*    fonts.                                                             */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    name    :: The axis's name.                                        */
+  /*                                                                       */
+  /*    minimum :: The axis's minimum design coordinate.                   */
+  /*                                                                       */
+  /*    maximum :: The axis's maximum design coordinate.                   */
+  /*                                                                       */
   typedef struct  FT_MM_Axis_
   {
     FT_String*  name;
@@ -82,29 +79,28 @@ FT_BEGIN_HEADER
   } FT_MM_Axis;
 
 
-  /**************************************************************************
-   *
-   * @struct:
-   *   FT_Multi_Master
-   *
-   * @description:
-   *   A structure to model the axes and space of a Multiple Masters font.
-   *
-   *   This structure can't be used for TrueType GX or OpenType variation
-   *   fonts.
-   *
-   * @fields:
-   *   num_axis ::
-   *     Number of axes.  Cannot exceed~4.
-   *
-   *   num_designs ::
-   *     Number of designs; should be normally 2^num_axis even though the
-   *     Type~1 specification strangely allows for intermediate designs to be
-   *     present.  This number cannot exceed~16.
-   *
-   *   axis ::
-   *     A table of axis descriptors.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_Multi_Master                                                    */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure to model the axes and space of a Multiple Masters      */
+  /*    font.                                                              */
+  /*                                                                       */
+  /*    This structure can't be used for TrueType GX or OpenType variation */
+  /*    fonts.                                                             */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    num_axis    :: Number of axes.  Cannot exceed~4.                   */
+  /*                                                                       */
+  /*    num_designs :: Number of designs; should be normally 2^num_axis    */
+  /*                   even though the Type~1 specification strangely      */
+  /*                   allows for intermediate designs to be present.      */
+  /*                   This number cannot exceed~16.                       */
+  /*                                                                       */
+  /*    axis        :: A table of axis descriptors.                        */
+  /*                                                                       */
   typedef struct  FT_Multi_Master_
   {
     FT_UInt     num_axis;
@@ -114,45 +110,42 @@ FT_BEGIN_HEADER
   } FT_Multi_Master;
 
 
-  /**************************************************************************
-   *
-   * @struct:
-   *   FT_Var_Axis
-   *
-   * @description:
-   *   A structure to model a given axis in design space for Multiple
-   *   Masters, TrueType GX, and OpenType variation fonts.
-   *
-   * @fields:
-   *   name ::
-   *     The axis's name.  Not always meaningful for TrueType GX or OpenType
-   *     variation fonts.
-   *
-   *   minimum ::
-   *     The axis's minimum design coordinate.
-   *
-   *   def ::
-   *     The axis's default design coordinate.  FreeType computes meaningful
-   *     default values for Adobe MM fonts.
-   *
-   *   maximum ::
-   *     The axis's maximum design coordinate.
-   *
-   *   tag ::
-   *     The axis's tag (the equivalent to 'name' for TrueType GX and
-   *     OpenType variation fonts).  FreeType provides default values for
-   *     Adobe MM fonts if possible.
-   *
-   *   strid ::
-   *     The axis name entry in the font's 'name' table.  This is another
-   *     (and often better) version of the 'name' field for TrueType GX or
-   *     OpenType variation fonts.  Not meaningful for Adobe MM fonts.
-   *
-   * @note:
-   *   The fields `minimum`, `def`, and `maximum` are 16.16 fractional values
-   *   for TrueType GX and OpenType variation fonts.  For Adobe MM fonts, the
-   *   values are integers.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_Var_Axis                                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure to model a given axis in design space for Multiple     */
+  /*    Masters, TrueType GX, and OpenType variation fonts.                */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    name    :: The axis's name.                                        */
+  /*               Not always meaningful for TrueType GX or OpenType       */
+  /*               variation fonts.                                        */
+  /*                                                                       */
+  /*    minimum :: The axis's minimum design coordinate.                   */
+  /*                                                                       */
+  /*    def     :: The axis's default design coordinate.                   */
+  /*               FreeType computes meaningful default values for Adobe   */
+  /*               MM fonts.                                               */
+  /*                                                                       */
+  /*    maximum :: The axis's maximum design coordinate.                   */
+  /*                                                                       */
+  /*    tag     :: The axis's tag (the equivalent to `name' for TrueType   */
+  /*               GX and OpenType variation fonts).  FreeType provides    */
+  /*               default values for Adobe MM fonts if possible.          */
+  /*                                                                       */
+  /*    strid   :: The axis name entry in the font's `name' table.  This   */
+  /*               is another (and often better) version of the `name'     */
+  /*               field for TrueType GX or OpenType variation fonts.  Not */
+  /*               meaningful for Adobe MM fonts.                          */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The fields `minimum', `def', and `maximum' are 16.16 fractional    */
+  /*    values for TrueType GX and OpenType variation fonts.  For Adobe MM */
+  /*    fonts, the values are integers.                                    */
+  /*                                                                       */
   typedef struct  FT_Var_Axis_
   {
     FT_String*  name;
@@ -167,29 +160,27 @@ FT_BEGIN_HEADER
   } FT_Var_Axis;
 
 
-  /**************************************************************************
-   *
-   * @struct:
-   *   FT_Var_Named_Style
-   *
-   * @description:
-   *   A structure to model a named instance in a TrueType GX or OpenType
-   *   variation font.
-   *
-   *   This structure can't be used for Adobe MM fonts.
-   *
-   * @fields:
-   *   coords ::
-   *     The design coordinates for this instance.  This is an array with one
-   *     entry for each axis.
-   *
-   *   strid ::
-   *     The entry in 'name' table identifying this instance.
-   *
-   *   psid ::
-   *     The entry in 'name' table identifying a PostScript name for this
-   *     instance.  Value 0xFFFF indicates a missing entry.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_Var_Named_Style                                                 */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure to model a named instance in a TrueType GX or OpenType */
+  /*    variation font.                                                    */
+  /*                                                                       */
+  /*    This structure can't be used for Adobe MM fonts.                   */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    coords :: The design coordinates for this instance.                */
+  /*              This is an array with one entry for each axis.           */
+  /*                                                                       */
+  /*    strid  :: The entry in `name' table identifying this instance.     */
+  /*                                                                       */
+  /*    psid   :: The entry in `name' table identifying a PostScript name  */
+  /*              for this instance.  Value 0xFFFF indicates a missing     */
+  /*              entry.                                                   */
+  /*                                                                       */
   typedef struct  FT_Var_Named_Style_
   {
     FT_Fixed*  coords;
@@ -199,47 +190,50 @@ FT_BEGIN_HEADER
   } FT_Var_Named_Style;
 
 
-  /**************************************************************************
-   *
-   * @struct:
-   *   FT_MM_Var
-   *
-   * @description:
-   *   A structure to model the axes and space of an Adobe MM, TrueType GX,
-   *   or OpenType variation font.
-   *
-   *   Some fields are specific to one format and not to the others.
-   *
-   * @fields:
-   *   num_axis ::
-   *     The number of axes.  The maximum value is~4 for Adobe MM fonts; no
-   *     limit in TrueType GX or OpenType variation fonts.
-   *
-   *   num_designs ::
-   *     The number of designs; should be normally 2^num_axis for Adobe MM
-   *     fonts.  Not meaningful for TrueType GX or OpenType variation fonts
-   *     (where every glyph could have a different number of designs).
-   *
-   *   num_namedstyles ::
-   *     The number of named styles; a 'named style' is a tuple of design
-   *     coordinates that has a string ID (in the 'name' table) associated
-   *     with it.  The font can tell the user that, for example,
-   *     [Weight=1.5,Width=1.1] is 'Bold'.  Another name for 'named style' is
-   *     'named instance'.
-   *
-   *     For Adobe Multiple Masters fonts, this value is always zero because
-   *     the format does not support named styles.
-   *
-   *   axis ::
-   *     An axis descriptor table.  TrueType GX and OpenType variation fonts
-   *     contain slightly more data than Adobe MM fonts.  Memory management
-   *     of this pointer is done internally by FreeType.
-   *
-   *   namedstyle ::
-   *     A named style (instance) table.  Only meaningful for TrueType GX and
-   *     OpenType variation fonts.  Memory management of this pointer is done
-   *     internally by FreeType.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_MM_Var                                                          */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure to model the axes and space of an Adobe MM, TrueType   */
+  /*    GX, or OpenType variation font.                                    */
+  /*                                                                       */
+  /*    Some fields are specific to one format and not to the others.      */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    num_axis        :: The number of axes.  The maximum value is~4 for */
+  /*                       Adobe MM fonts; no limit in TrueType GX or      */
+  /*                       OpenType variation fonts.                       */
+  /*                                                                       */
+  /*    num_designs     :: The number of designs; should be normally       */
+  /*                       2^num_axis for Adobe MM fonts.  Not meaningful  */
+  /*                       for TrueType GX or OpenType variation fonts     */
+  /*                       (where every glyph could have a different       */
+  /*                       number of designs).                             */
+  /*                                                                       */
+  /*    num_namedstyles :: The number of named styles; a `named style' is  */
+  /*                       a tuple of design coordinates that has a string */
+  /*                       ID (in the `name' table) associated with it.    */
+  /*                       The font can tell the user that, for example,   */
+  /*                       [Weight=1.5,Width=1.1] is `Bold'.  Another name */
+  /*                       for `named style' is `named instance'.          */
+  /*                                                                       */
+  /*                       For Adobe Multiple Masters fonts, this value is */
+  /*                       always zero because the format does not support */
+  /*                       named styles.                                   */
+  /*                                                                       */
+  /*    axis            :: An axis descriptor table.                       */
+  /*                       TrueType GX and OpenType variation fonts        */
+  /*                       contain slightly more data than Adobe MM fonts. */
+  /*                       Memory management of this pointer is done       */
+  /*                       internally by FreeType.                         */
+  /*                                                                       */
+  /*    namedstyle      :: A named style (instance) table.                 */
+  /*                       Only meaningful for TrueType GX and OpenType    */
+  /*                       variation fonts.  Memory management of this     */
+  /*                       pointer is done internally by FreeType.         */
+  /*                                                                       */
   typedef struct  FT_MM_Var_
   {
     FT_UInt              num_axis;
@@ -251,493 +245,384 @@ FT_BEGIN_HEADER
   } FT_MM_Var;
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Get_Multi_Master
-   *
-   * @description:
-   *   Retrieve a variation descriptor of a given Adobe MM font.
-   *
-   *   This function can't be used with TrueType GX or OpenType variation
-   *   fonts.
-   *
-   * @input:
-   *   face ::
-   *     A handle to the source face.
-   *
-   * @output:
-   *   amaster ::
-   *     The Multiple Masters descriptor.
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Get_Multi_Master                                                */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Retrieve a variation descriptor of a given Adobe MM font.          */
+  /*                                                                       */
+  /*    This function can't be used with TrueType GX or OpenType variation */
+  /*    fonts.                                                             */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face    :: A handle to the source face.                            */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    amaster :: The Multiple Masters descriptor.                        */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0~means success.                             */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_Get_Multi_Master( FT_Face           face,
                        FT_Multi_Master  *amaster );
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Get_MM_Var
-   *
-   * @description:
-   *   Retrieve a variation descriptor for a given font.
-   *
-   *   This function works with all supported variation formats.
-   *
-   * @input:
-   *   face ::
-   *     A handle to the source face.
-   *
-   * @output:
-   *   amaster ::
-   *     The variation descriptor.  Allocates a data structure, which the
-   *     user must deallocate with a call to @FT_Done_MM_Var after use.
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Get_MM_Var                                                      */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Retrieve a variation descriptor for a given font.                  */
+  /*                                                                       */
+  /*    This function works with all supported variation formats.          */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face    :: A handle to the source face.                            */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    amaster :: The variation descriptor.                               */
+  /*               Allocates a data structure, which the user must         */
+  /*               deallocate with a call to @FT_Done_MM_Var after use.    */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0~means success.                             */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_Get_MM_Var( FT_Face      face,
                  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.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <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:
-   *   FT_Set_MM_Design_Coordinates
-   *
-   * @description:
-   *   For Adobe MM fonts, choose an interpolated font design through design
-   *   coordinates.
-   *
-   *   This function can't be used with TrueType GX or OpenType variation
-   *   fonts.
-   *
-   * @inout:
-   *   face ::
-   *     A handle to the source face.
-   *
-   * @input:
-   *   num_coords ::
-   *     The number of available design coordinates.  If it is larger than
-   *     the number of axes, ignore the excess values.  If it is smaller than
-   *     the number of axes, use default values for the remaining axes.
-   *
-   *   coords ::
-   *     An array of design coordinates.
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   *
-   * @note:
-   *   [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.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Set_MM_Design_Coordinates                                       */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    For Adobe MM fonts, choose an interpolated font design through     */
+  /*    design coordinates.                                                */
+  /*                                                                       */
+  /*    This function can't be used with TrueType GX or OpenType variation */
+  /*    fonts.                                                             */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    face       :: A handle to the source face.                         */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    num_coords :: The number of available design coordinates.  If it   */
+  /*                  is larger than the number of axes, ignore the excess */
+  /*                  values.  If it is smaller than the number of axes,   */
+  /*                  use default values for the remaining axes.           */
+  /*                                                                       */
+  /*    coords     :: An array of design coordinates.                      */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0~means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    [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_Set_MM_Design_Coordinates( FT_Face   face,
                                 FT_UInt   num_coords,
                                 FT_Long*  coords );
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Set_Var_Design_Coordinates
-   *
-   * @description:
-   *   Choose an interpolated font design through design coordinates.
-   *
-   *   This function works with all supported variation formats.
-   *
-   * @inout:
-   *   face ::
-   *     A handle to the source face.
-   *
-   * @input:
-   *   num_coords ::
-   *     The number of available design coordinates.  If it is larger than
-   *     the number of axes, ignore the excess values.  If it is smaller than
-   *     the number of axes, use default values for the remaining axes.
-   *
-   *   coords ::
-   *     An array of design coordinates.
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   *
-   * @note:
-   *   [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.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Set_Var_Design_Coordinates                                      */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Choose an interpolated font design through design coordinates.     */
+  /*                                                                       */
+  /*    This function works with all supported variation formats.          */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    face       :: A handle to the source face.                         */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    num_coords :: The number of available design coordinates.  If it   */
+  /*                  is larger than the number of axes, ignore the excess */
+  /*                  values.  If it is smaller than the number of axes,   */
+  /*                  use default values for the remaining axes.           */
+  /*                                                                       */
+  /*    coords     :: An array of design coordinates.                      */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0~means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    [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_Set_Var_Design_Coordinates( FT_Face    face,
                                  FT_UInt    num_coords,
                                  FT_Fixed*  coords );
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Get_Var_Design_Coordinates
-   *
-   * @description:
-   *   Get the design coordinates of the currently selected interpolated
-   *   font.
-   *
-   *   This function works with all supported variation formats.
-   *
-   * @input:
-   *   face ::
-   *     A handle to the source face.
-   *
-   *   num_coords ::
-   *     The number of design coordinates to retrieve.  If it is larger than
-   *     the number of axes, set the excess values to~0.
-   *
-   * @output:
-   *   coords ::
-   *     The design coordinates array.
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   *
-   * @since:
-   *   2.7.1
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Get_Var_Design_Coordinates                                      */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Get the design coordinates of the currently selected interpolated  */
+  /*    font.                                                              */
+  /*                                                                       */
+  /*    This function works with all supported variation formats.          */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face       :: A handle to the source face.                         */
+  /*                                                                       */
+  /*    num_coords :: The number of design coordinates to retrieve.  If it */
+  /*                  is larger than the number of axes, set the excess    */
+  /*                  values to~0.                                         */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    coords     :: The design coordinates array.                        */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0~means success.                             */
+  /*                                                                       */
+  /* <Since>                                                               */
+  /*    2.7.1                                                              */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_Get_Var_Design_Coordinates( FT_Face    face,
                                  FT_UInt    num_coords,
                                  FT_Fixed*  coords );
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Set_MM_Blend_Coordinates
-   *
-   * @description:
-   *   Choose an interpolated font design through normalized blend
-   *   coordinates.
-   *
-   *   This function works with all supported variation formats.
-   *
-   * @inout:
-   *   face ::
-   *     A handle to the source face.
-   *
-   * @input:
-   *   num_coords ::
-   *     The number of available design coordinates.  If it is larger than
-   *     the number of axes, ignore the excess values.  If it is smaller than
-   *     the number of axes, use default values for the remaining axes.
-   *
-   *   coords ::
-   *     The design coordinates array (each element must be between 0 and 1.0
-   *     for Adobe MM fonts, and between -1.0 and 1.0 for TrueType GX and
-   *     OpenType variation fonts).
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   *
-   * @note:
-   *   [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.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Set_MM_Blend_Coordinates                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Choose an interpolated font design through normalized blend        */
+  /*    coordinates.                                                       */
+  /*                                                                       */
+  /*    This function works with all supported variation formats.          */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    face       :: A handle to the source face.                         */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    num_coords :: The number of available design coordinates.  If it   */
+  /*                  is larger than the number of axes, ignore the excess */
+  /*                  values.  If it is smaller than the number of axes,   */
+  /*                  use default values for the remaining axes.           */
+  /*                                                                       */
+  /*    coords     :: The design coordinates array (each element must be   */
+  /*                  between 0 and 1.0 for Adobe MM fonts, and between    */
+  /*                  -1.0 and 1.0 for TrueType GX and OpenType variation  */
+  /*                  fonts).                                              */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0~means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    [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_Set_MM_Blend_Coordinates( FT_Face    face,
                                FT_UInt    num_coords,
                                FT_Fixed*  coords );
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Get_MM_Blend_Coordinates
-   *
-   * @description:
-   *   Get the normalized blend coordinates of the currently selected
-   *   interpolated font.
-   *
-   *   This function works with all supported variation formats.
-   *
-   * @input:
-   *   face ::
-   *     A handle to the source face.
-   *
-   *   num_coords ::
-   *     The number of normalized blend coordinates to retrieve.  If it is
-   *     larger than the number of axes, set the excess values to~0.5 for
-   *     Adobe MM fonts, and to~0 for TrueType GX and OpenType variation
-   *     fonts.
-   *
-   * @output:
-   *   coords ::
-   *     The normalized blend coordinates array.
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   *
-   * @since:
-   *   2.7.1
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Get_MM_Blend_Coordinates                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Get the normalized blend coordinates of the currently selected     */
+  /*    interpolated font.                                                 */
+  /*                                                                       */
+  /*    This function works with all supported variation formats.          */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face       :: A handle to the source face.                         */
+  /*                                                                       */
+  /*    num_coords :: The number of normalized blend coordinates to        */
+  /*                  retrieve.  If it is larger than the number of axes,  */
+  /*                  set the excess values to~0.5 for Adobe MM fonts, and */
+  /*                  to~0 for TrueType GX and OpenType variation fonts.   */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    coords     :: The normalized blend coordinates array.              */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0~means success.                             */
+  /*                                                                       */
+  /* <Since>                                                               */
+  /*    2.7.1                                                              */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_Get_MM_Blend_Coordinates( FT_Face    face,
                                FT_UInt    num_coords,
                                FT_Fixed*  coords );
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Set_Var_Blend_Coordinates
-   *
-   * @description:
-   *   This is another name of @FT_Set_MM_Blend_Coordinates.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Set_Var_Blend_Coordinates                                       */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This is another name of @FT_Set_MM_Blend_Coordinates.              */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_Set_Var_Blend_Coordinates( FT_Face    face,
                                 FT_UInt    num_coords,
                                 FT_Fixed*  coords );
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Get_Var_Blend_Coordinates
-   *
-   * @description:
-   *   This is another name of @FT_Get_MM_Blend_Coordinates.
-   *
-   * @since:
-   *   2.7.1
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Get_Var_Blend_Coordinates                                       */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This is another name of @FT_Get_MM_Blend_Coordinates.              */
+  /*                                                                       */
+  /* <Since>                                                               */
+  /*    2.7.1                                                              */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_Get_Var_Blend_Coordinates( FT_Face    face,
                                 FT_UInt    num_coords,
                                 FT_Fixed*  coords );
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Set_MM_WeightVector
-   *
-   * @description:
-   *   For Adobe MM fonts, choose an interpolated font design by directly
-   *   setting the weight vector.
-   *
-   *   This function can't be used with TrueType GX or OpenType variation
-   *   fonts.
-   *
-   * @inout:
-   *   face ::
-   *     A handle to the source face.
-   *
-   * @input:
-   *   len ::
-   *     The length of the weight vector array.  If it is larger than the
-   *     number of designs, the extra values are ignored.  If it is less than
-   *     the number of designs, the remaining values are set to zero.
-   *
-   *   weightvector ::
-   *     An array representing the weight vector.
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   *
-   * @note:
-   *   Adobe Multiple Master fonts limit the number of designs, and thus the
-   *   length of the weight vector to~16.
-   *
-   *   If `len` is zero and `weightvector` is `NULL`, the weight vector array
-   *   is reset to the default values.
-   *
-   *   The Adobe documentation also states that the values in the
-   *   WeightVector array must total 1.0 +/-~0.001.  In practice this does
-   *   not seem to be enforced, so is not enforced here, either.
-   *
-   * @since:
-   *   2.10
-   */
-  FT_EXPORT( FT_Error )
-  FT_Set_MM_WeightVector( FT_Face    face,
-                          FT_UInt    len,
-                          FT_Fixed*  weightvector );
-
-
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Get_MM_WeightVector
-   *
-   * @description:
-   *   For Adobe MM fonts, retrieve the current weight vector of the font.
-   *
-   *   This function can't be used with TrueType GX or OpenType variation
-   *   fonts.
-   *
-   * @inout:
-   *   face ::
-   *     A handle to the source face.
-   *
-   *   len ::
-   *     A pointer to the size of the array to be filled.  If the size of the
-   *     array is less than the number of designs, `FT_Err_Invalid_Argument`
-   *     is returned, and `len` is set to the required size (the number of
-   *     designs).  If the size of the array is greater than the number of
-   *     designs, the remaining entries are set to~0.  On successful
-   *     completion, `len` is set to the number of designs (i.e., the number
-   *     of values written to the array).
-   *
-   * @output:
-   *   weightvector ::
-   *     An array to be filled.
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   *
-   * @note:
-   *   Adobe Multiple Master fonts limit the number of designs, and thus the
-   *   length of the WeightVector to~16.
-   *
-   * @since:
-   *   2.10
-   */
-  FT_EXPORT( FT_Error )
-  FT_Get_MM_WeightVector( FT_Face    face,
-                          FT_UInt*   len,
-                          FT_Fixed*  weightvector );
-
-
-  /**************************************************************************
-   *
-   * @enum:
-   *   FT_VAR_AXIS_FLAG_XXX
-   *
-   * @description:
-   *   A list of bit flags used in the return value of
-   *   @FT_Get_Var_Axis_Flags.
-   *
-   * @values:
-   *   FT_VAR_AXIS_FLAG_HIDDEN ::
-   *     The variation axis should not be exposed to user interfaces.
-   *
-   * @since:
-   *   2.8.1
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Enum>                                                                */
+  /*    FT_VAR_AXIS_FLAG_XXX                                               */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A list of bit flags used in the return value of                    */
+  /*    @FT_Get_Var_Axis_Flags.                                            */
+  /*                                                                       */
+  /* <Values>                                                              */
+  /*    FT_VAR_AXIS_FLAG_HIDDEN ::                                         */
+  /*      The variation axis should not be exposed to user interfaces.     */
+  /*                                                                       */
+  /* <Since>                                                               */
+  /*    2.8.1                                                              */
+  /*                                                                       */
 #define FT_VAR_AXIS_FLAG_HIDDEN  1
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Get_Var_Axis_Flags
-   *
-   * @description:
-   *   Get the 'flags' field of an OpenType Variation Axis Record.
-   *
-   *   Not meaningful for Adobe MM fonts (`*flags` is always zero).
-   *
-   * @input:
-   *   master ::
-   *     The variation descriptor.
-   *
-   *   axis_index ::
-   *     The index of the requested variation axis.
-   *
-   * @output:
-   *   flags ::
-   *     The 'flags' field.  See @FT_VAR_AXIS_FLAG_XXX for possible values.
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   *
-   * @since:
-   *   2.8.1
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Get_Var_Axis_Flags                                              */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Get the `flags' field of an OpenType Variation Axis Record.        */
+  /*                                                                       */
+  /*    Not meaningful for Adobe MM fonts (`*flags' is always zero).       */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    master     :: The variation descriptor.                            */
+  /*                                                                       */
+  /*    axis_index :: The index of the requested variation axis.           */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    flags      :: The `flags' field.  See @FT_VAR_AXIS_FLAG_XXX for    */
+  /*                  possible values.                                     */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0~means success.                             */
+  /*                                                                       */
+  /* <Since>                                                               */
+  /*    2.8.1                                                              */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_Get_Var_Axis_Flags( FT_MM_Var*  master,
                          FT_UInt     axis_index,
                          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
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <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 );

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 406 - 480
thirdparty/freetype/include/freetype/ftmodapi.h


+ 91 - 100
thirdparty/freetype/include/freetype/ftmoderr.h

@@ -1,103 +1,94 @@
-/****************************************************************************
- *
- * ftmoderr.h
- *
- *   FreeType module error offsets (specification).
- *
- * Copyright (C) 2001-2019 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.
- *
- */
-
-
-  /**************************************************************************
-   *
-   * This file is used to define the FreeType module error codes.
-   *
-   * If the macro `FT_CONFIG_OPTION_USE_MODULE_ERRORS` in `ftoption.h` is
-   * set, the lower byte of an error value identifies the error code as
-   * usual.  In addition, the higher byte identifies the module.  For
-   * example, the error `FT_Err_Invalid_File_Format` has value 0x0003, the
-   * error `TT_Err_Invalid_File_Format` has value 0x1303, the error
-   * `T1_Err_Invalid_File_Format` has value 0x1403, etc.
-   *
-   * Note that `FT_Err_Ok`, `TT_Err_Ok`, etc. are always equal to zero,
-   * including the high byte.
-   *
-   * If `FT_CONFIG_OPTION_USE_MODULE_ERRORS` isn't set, the higher byte of an
-   * error value is set to zero.
-   *
-   * To hide the various `XXX_Err_` prefixes in the source code, FreeType
-   * provides some macros in `fttypes.h`.
-   *
-   *   FT_ERR( err )
-   *
-   *     Add current error module prefix (as defined with the `FT_ERR_PREFIX`
-   *     macro) to `err`.  For example, in the BDF module the line
-   *
-   *     ```
-   *       error = FT_ERR( Invalid_Outline );
-   *     ```
-   *
-   *     expands to
-   *
-   *     ```
-   *       error = BDF_Err_Invalid_Outline;
-   *     ```
-   *
-   *     For simplicity, you can always use `FT_Err_Ok` directly instead of
-   *     `FT_ERR( Ok )`.
-   *
-   *   FT_ERR_EQ( errcode, err )
-   *   FT_ERR_NEQ( errcode, err )
-   *
-   *     Compare error code `errcode` with the error `err` for equality and
-   *     inequality, respectively.  Example:
-   *
-   *     ```
-   *       if ( FT_ERR_EQ( error, Invalid_Outline ) )
-   *         ...
-   *     ```
-   *
-   *     Using this macro you don't have to think about error prefixes.  Of
-   *     course, if module errors are not active, the above example is the
-   *     same as
-   *
-   *     ```
-   *       if ( error == FT_Err_Invalid_Outline )
-   *         ...
-   *     ```
-   *
-   *   FT_ERROR_BASE( errcode )
-   *   FT_ERROR_MODULE( errcode )
-   *
-   *     Get base error and module error code, respectively.
-   *
-   * It can also be used to create a module error message table easily with
-   * something like
-   *
-   * ```
-   *   #undef FTMODERR_H_
-   *   #define FT_MODERRDEF( e, v, s )  { FT_Mod_Err_ ## e, s },
-   *   #define FT_MODERR_START_LIST     {
-   *   #define FT_MODERR_END_LIST       { 0, 0 } };
-   *
-   *   const struct
-   *   {
-   *     int          mod_err_offset;
-   *     const char*  mod_err_msg
-   *   } ft_mod_errors[] =
-   *
-   *   #include FT_MODULE_ERRORS_H
-   * ```
-   *
-   */
+/***************************************************************************/
+/*                                                                         */
+/*  ftmoderr.h                                                             */
+/*                                                                         */
+/*    FreeType module error offsets (specification).                       */
+/*                                                                         */
+/*  Copyright 2001-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.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* This file is used to define the FreeType module error codes.          */
+  /*                                                                       */
+  /* If the macro FT_CONFIG_OPTION_USE_MODULE_ERRORS in `ftoption.h' is    */
+  /* set, the lower byte of an error value identifies the error code as    */
+  /* usual.  In addition, the higher byte identifies the module.  For      */
+  /* example, the error `FT_Err_Invalid_File_Format' has value 0x0003, the */
+  /* error `TT_Err_Invalid_File_Format' has value 0x1303, the error        */
+  /* `T1_Err_Invalid_File_Format' has value 0x1403, etc.                   */
+  /*                                                                       */
+  /* Note that `FT_Err_Ok', `TT_Err_Ok', etc. are always equal to zero,    */
+  /* including the high byte.                                              */
+  /*                                                                       */
+  /* If FT_CONFIG_OPTION_USE_MODULE_ERRORS isn't set, the higher byte of   */
+  /* an error value is set to zero.                                        */
+  /*                                                                       */
+  /* To hide the various `XXX_Err_' prefixes in the source code, FreeType  */
+  /* provides some macros in `fttypes.h'.                                  */
+  /*                                                                       */
+  /*   FT_ERR( err )                                                       */
+  /*     Add current error module prefix (as defined with the              */
+  /*     `FT_ERR_PREFIX' macro) to `err'.  For example, in the BDF module  */
+  /*     the line                                                          */
+  /*                                                                       */
+  /*       error = FT_ERR( Invalid_Outline );                              */
+  /*                                                                       */
+  /*     expands to                                                        */
+  /*                                                                       */
+  /*       error = BDF_Err_Invalid_Outline;                                */
+  /*                                                                       */
+  /*     For simplicity, you can always use `FT_Err_Ok' directly instead   */
+  /*     of `FT_ERR( Ok )'.                                                */
+  /*                                                                       */
+  /*   FT_ERR_EQ( errcode, err )                                           */
+  /*   FT_ERR_NEQ( errcode, err )                                          */
+  /*     Compare error code `errcode' with the error `err' for equality    */
+  /*     and inequality, respectively.  Example:                           */
+  /*                                                                       */
+  /*       if ( FT_ERR_EQ( error, Invalid_Outline ) )                      */
+  /*         ...                                                           */
+  /*                                                                       */
+  /*     Using this macro you don't have to think about error prefixes.    */
+  /*     Of course, if module errors are not active, the above example is  */
+  /*     the same as                                                       */
+  /*                                                                       */
+  /*       if ( error == FT_Err_Invalid_Outline )                          */
+  /*         ...                                                           */
+  /*                                                                       */
+  /*   FT_ERROR_BASE( errcode )                                            */
+  /*   FT_ERROR_MODULE( errcode )                                          */
+  /*     Get base error and module error code, respectively.               */
+  /*                                                                       */
+  /*                                                                       */
+  /* It can also be used to create a module error message table easily     */
+  /* with something like                                                   */
+  /*                                                                       */
+  /*   {                                                                   */
+  /*     #undef FTMODERR_H_                                                */
+  /*     #define FT_MODERRDEF( e, v, s )  { FT_Mod_Err_ ## e, s },         */
+  /*     #define FT_MODERR_START_LIST     {                                */
+  /*     #define FT_MODERR_END_LIST       { 0, 0 } };                      */
+  /*                                                                       */
+  /*     const struct                                                      */
+  /*     {                                                                 */
+  /*       int          mod_err_offset;                                    */
+  /*       const char*  mod_err_msg                                        */
+  /*     } ft_mod_errors[] =                                               */
+  /*                                                                       */
+  /*     #include FT_MODULE_ERRORS_H                                       */
+  /*   }                                                                   */
+  /*                                                                       */
+  /*************************************************************************/
 
 
 #ifndef FTMODERR_H_

+ 150 - 153
thirdparty/freetype/include/freetype/ftotval.h

@@ -1,30 +1,30 @@
-/****************************************************************************
- *
- * ftotval.h
- *
- *   FreeType API for validating OpenType tables (specification).
- *
- * Copyright (C) 2004-2019 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.
- *
- */
-
-
-/****************************************************************************
- *
- *
- * Warning: This module might be moved to a different library in the
- *          future to avoid a tight dependency between FreeType and the
- *          OpenType specification.
- *
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  ftotval.h                                                              */
+/*                                                                         */
+/*    FreeType API for validating OpenType tables (specification).         */
+/*                                                                         */
+/*  Copyright 2004-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.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+/***************************************************************************/
+/*                                                                         */
+/*                                                                         */
+/* Warning: This module might be moved to a different library in the       */
+/*          future to avoid a tight dependency between FreeType and the    */
+/*          OpenType specification.                                        */
+/*                                                                         */
+/*                                                                         */
+/***************************************************************************/
 
 
 #ifndef FTOTVAL_H_
@@ -43,62 +43,62 @@
 FT_BEGIN_HEADER
 
 
-  /**************************************************************************
-   *
-   * @section:
-   *   ot_validation
-   *
-   * @title:
-   *   OpenType Validation
-   *
-   * @abstract:
-   *   An API to validate OpenType tables.
-   *
-   * @description:
-   *   This section contains the declaration of functions to validate some
-   *   OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH).
-   *
-   * @order:
-   *   FT_OpenType_Validate
-   *   FT_OpenType_Free
-   *
-   *   FT_VALIDATE_OTXXX
-   *
-   */
-
-
-  /**************************************************************************
-   *
-   * @enum:
-   *    FT_VALIDATE_OTXXX
-   *
-   * @description:
-   *    A list of bit-field constants used with @FT_OpenType_Validate to
-   *    indicate which OpenType tables should be validated.
-   *
-   * @values:
-   *    FT_VALIDATE_BASE ::
-   *      Validate BASE table.
-   *
-   *    FT_VALIDATE_GDEF ::
-   *      Validate GDEF table.
-   *
-   *    FT_VALIDATE_GPOS ::
-   *      Validate GPOS table.
-   *
-   *    FT_VALIDATE_GSUB ::
-   *      Validate GSUB table.
-   *
-   *    FT_VALIDATE_JSTF ::
-   *      Validate JSTF table.
-   *
-   *    FT_VALIDATE_MATH ::
-   *      Validate MATH table.
-   *
-   *    FT_VALIDATE_OT ::
-   *      Validate all OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH).
-   *
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    ot_validation                                                      */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*    OpenType Validation                                                */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*    An API to validate OpenType tables.                                */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This section contains the declaration of functions to validate     */
+  /*    some OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH).         */
+  /*                                                                       */
+  /* <Order>                                                               */
+  /*    FT_OpenType_Validate                                               */
+  /*    FT_OpenType_Free                                                   */
+  /*                                                                       */
+  /*    FT_VALIDATE_OTXXX                                                  */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+ /**********************************************************************
+  *
+  * @enum:
+  *    FT_VALIDATE_OTXXX
+  *
+  * @description:
+  *    A list of bit-field constants used with @FT_OpenType_Validate to
+  *    indicate which OpenType tables should be validated.
+  *
+  * @values:
+  *    FT_VALIDATE_BASE ::
+  *      Validate BASE table.
+  *
+  *    FT_VALIDATE_GDEF ::
+  *      Validate GDEF table.
+  *
+  *    FT_VALIDATE_GPOS ::
+  *      Validate GPOS table.
+  *
+  *    FT_VALIDATE_GSUB ::
+  *      Validate GSUB table.
+  *
+  *    FT_VALIDATE_JSTF ::
+  *      Validate JSTF table.
+  *
+  *    FT_VALIDATE_MATH ::
+  *      Validate MATH table.
+  *
+  *    FT_VALIDATE_OT ::
+  *      Validate all OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH).
+  *
+  */
 #define FT_VALIDATE_BASE  0x0100
 #define FT_VALIDATE_GDEF  0x0200
 #define FT_VALIDATE_GPOS  0x0400
@@ -113,54 +113,53 @@ FT_BEGIN_HEADER
                           FT_VALIDATE_JSTF | \
                           FT_VALIDATE_MATH )
 
-
-  /**************************************************************************
-   *
-   * @function:
-   *    FT_OpenType_Validate
-   *
-   * @description:
-   *    Validate various OpenType tables to assure that all offsets and
-   *    indices are valid.  The idea is that a higher-level library that
-   *    actually does the text layout can access those tables without error
-   *    checking (which can be quite time consuming).
-   *
-   * @input:
-   *    face ::
-   *      A handle to the input face.
-   *
-   *    validation_flags ::
-   *      A bit field that specifies the tables to be validated.  See
-   *      @FT_VALIDATE_OTXXX for possible values.
-   *
-   * @output:
-   *    BASE_table ::
-   *      A pointer to the BASE table.
-   *
-   *    GDEF_table ::
-   *      A pointer to the GDEF table.
-   *
-   *    GPOS_table ::
-   *      A pointer to the GPOS table.
-   *
-   *    GSUB_table ::
-   *      A pointer to the GSUB table.
-   *
-   *    JSTF_table ::
-   *      A pointer to the JSTF table.
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   *
-   * @note:
-   *   This function only works with OpenType fonts, returning an error
-   *   otherwise.
-   *
-   *   After use, the application should deallocate the five tables with
-   *   @FT_OpenType_Free.  A `NULL` value indicates that the table either
-   *   doesn't exist in the font, or the application hasn't asked for
-   *   validation.
-   */
+ /**********************************************************************
+  *
+  * @function:
+  *    FT_OpenType_Validate
+  *
+  * @description:
+  *    Validate various OpenType tables to assure that all offsets and
+  *    indices are valid.  The idea is that a higher-level library that
+  *    actually does the text layout can access those tables without
+  *    error checking (which can be quite time consuming).
+  *
+  * @input:
+  *    face ::
+  *       A handle to the input face.
+  *
+  *    validation_flags ::
+  *       A bit field that specifies the tables to be validated.  See
+  *       @FT_VALIDATE_OTXXX for possible values.
+  *
+  * @output:
+  *    BASE_table ::
+  *       A pointer to the BASE table.
+  *
+  *    GDEF_table ::
+  *       A pointer to the GDEF table.
+  *
+  *    GPOS_table ::
+  *       A pointer to the GPOS table.
+  *
+  *    GSUB_table ::
+  *       A pointer to the GSUB table.
+  *
+  *    JSTF_table ::
+  *       A pointer to the JSTF table.
+  *
+  * @return:
+  *   FreeType error code.  0~means success.
+  *
+  * @note:
+  *   This function only works with OpenType fonts, returning an error
+  *   otherwise.
+  *
+  *   After use, the application should deallocate the five tables with
+  *   @FT_OpenType_Free.  A NULL value indicates that the table either
+  *   doesn't exist in the font, or the application hasn't asked for
+  *   validation.
+  */
   FT_EXPORT( FT_Error )
   FT_OpenType_Validate( FT_Face    face,
                         FT_UInt    validation_flags,
@@ -170,32 +169,30 @@ FT_BEGIN_HEADER
                         FT_Bytes  *GSUB_table,
                         FT_Bytes  *JSTF_table );
 
-
-  /**************************************************************************
-   *
-   * @function:
-   *    FT_OpenType_Free
-   *
-   * @description:
-   *    Free the buffer allocated by OpenType validator.
-   *
-   * @input:
-   *    face ::
-   *      A handle to the input face.
-   *
-   *    table ::
-   *      The pointer to the buffer that is allocated by
-   *      @FT_OpenType_Validate.
-   *
-   * @note:
-   *   This function must be used to free the buffer allocated by
-   *   @FT_OpenType_Validate only.
-   */
+ /**********************************************************************
+  *
+  * @function:
+  *    FT_OpenType_Free
+  *
+  * @description:
+  *    Free the buffer allocated by OpenType validator.
+  *
+  * @input:
+  *    face ::
+  *       A handle to the input face.
+  *
+  *    table ::
+  *       The pointer to the buffer that is allocated by
+  *       @FT_OpenType_Validate.
+  *
+  * @note:
+  *   This function must be used to free the buffer allocated by
+  *   @FT_OpenType_Validate only.
+  */
   FT_EXPORT( void )
   FT_OpenType_Free( FT_Face   face,
                     FT_Bytes  table );
 
-
   /* */
 
 

+ 465 - 476
thirdparty/freetype/include/freetype/ftoutln.h

@@ -1,20 +1,20 @@
-/****************************************************************************
- *
- * ftoutln.h
- *
- *   Support for the FT_Outline type used to store glyph shapes of
- *   most scalable font formats (specification).
- *
- * Copyright (C) 1996-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  ftoutln.h                                                              */
+/*                                                                         */
+/*    Support for the FT_Outline type used to store glyph shapes of        */
+/*    most scalable font formats (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 FTOUTLN_H_
@@ -34,131 +34,127 @@
 FT_BEGIN_HEADER
 
 
-  /**************************************************************************
-   *
-   * @section:
-   *   outline_processing
-   *
-   * @title:
-   *   Outline Processing
-   *
-   * @abstract:
-   *   Functions to create, transform, and render vectorial glyph images.
-   *
-   * @description:
-   *   This section contains routines used to create and destroy scalable
-   *   glyph images known as 'outlines'.  These can also be measured,
-   *   transformed, and converted into bitmaps and pixmaps.
-   *
-   * @order:
-   *   FT_Outline
-   *   FT_Outline_New
-   *   FT_Outline_Done
-   *   FT_Outline_Copy
-   *   FT_Outline_Translate
-   *   FT_Outline_Transform
-   *   FT_Outline_Embolden
-   *   FT_Outline_EmboldenXY
-   *   FT_Outline_Reverse
-   *   FT_Outline_Check
-   *
-   *   FT_Outline_Get_CBox
-   *   FT_Outline_Get_BBox
-   *
-   *   FT_Outline_Get_Bitmap
-   *   FT_Outline_Render
-   *   FT_Outline_Decompose
-   *   FT_Outline_Funcs
-   *   FT_Outline_MoveToFunc
-   *   FT_Outline_LineToFunc
-   *   FT_Outline_ConicToFunc
-   *   FT_Outline_CubicToFunc
-   *
-   *   FT_Orientation
-   *   FT_Outline_Get_Orientation
-   *
-   *   FT_OUTLINE_XXX
-   *
-   */
-
-
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Outline_Decompose
-   *
-   * @description:
-   *   Walk over an outline's structure to decompose it into individual
-   *   segments and Bezier arcs.  This function also emits 'move to'
-   *   operations to indicate the start of new contours in the outline.
-   *
-   * @input:
-   *   outline ::
-   *     A pointer to the source target.
-   *
-   *   func_interface ::
-   *     A table of 'emitters', i.e., function pointers called during
-   *     decomposition to indicate path operations.
-   *
-   * @inout:
-   *   user ::
-   *     A typeless pointer that is passed to each emitter during the
-   *     decomposition.  It can be used to store the state during the
-   *     decomposition.
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   *
-   * @note:
-   *   A contour that contains a single point only is represented by a 'move
-   *   to' operation followed by 'line to' to the same point.  In most cases,
-   *   it is best to filter this out before using the outline for stroking
-   *   purposes (otherwise it would result in a visible dot when round caps
-   *   are used).
-   *
-   *   Similarly, the function returns success for an empty outline also
-   *   (doing nothing, this is, not calling any emitter); if necessary, you
-   *   should filter this out, too.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    outline_processing                                                 */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*    Outline Processing                                                 */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*    Functions to create, transform, and render vectorial glyph images. */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This section contains routines used to create and destroy scalable */
+  /*    glyph images known as `outlines'.  These can also be measured,     */
+  /*    transformed, and converted into bitmaps and pixmaps.               */
+  /*                                                                       */
+  /* <Order>                                                               */
+  /*    FT_Outline                                                         */
+  /*    FT_Outline_New                                                     */
+  /*    FT_Outline_Done                                                    */
+  /*    FT_Outline_Copy                                                    */
+  /*    FT_Outline_Translate                                               */
+  /*    FT_Outline_Transform                                               */
+  /*    FT_Outline_Embolden                                                */
+  /*    FT_Outline_EmboldenXY                                              */
+  /*    FT_Outline_Reverse                                                 */
+  /*    FT_Outline_Check                                                   */
+  /*                                                                       */
+  /*    FT_Outline_Get_CBox                                                */
+  /*    FT_Outline_Get_BBox                                                */
+  /*                                                                       */
+  /*    FT_Outline_Get_Bitmap                                              */
+  /*    FT_Outline_Render                                                  */
+  /*    FT_Outline_Decompose                                               */
+  /*    FT_Outline_Funcs                                                   */
+  /*    FT_Outline_MoveToFunc                                              */
+  /*    FT_Outline_LineToFunc                                              */
+  /*    FT_Outline_ConicToFunc                                             */
+  /*    FT_Outline_CubicToFunc                                             */
+  /*                                                                       */
+  /*    FT_Orientation                                                     */
+  /*    FT_Outline_Get_Orientation                                         */
+  /*                                                                       */
+  /*    FT_OUTLINE_XXX                                                     */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Outline_Decompose                                               */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Walk over an outline's structure to decompose it into individual   */
+  /*    segments and Bezier arcs.  This function also emits `move to'      */
+  /*    operations to indicate the start of new contours in the outline.   */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    outline        :: A pointer to the source target.                  */
+  /*                                                                       */
+  /*    func_interface :: A table of `emitters', i.e., function pointers   */
+  /*                      called during decomposition to indicate path     */
+  /*                      operations.                                      */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    user           :: A typeless pointer that is passed to each        */
+  /*                      emitter during the decomposition.  It can be     */
+  /*                      used to store the state during the               */
+  /*                      decomposition.                                   */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0~means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    A contour that contains a single point only is represented by a    */
+  /*    `move to' operation followed by `line to' to the same point.  In   */
+  /*    most cases, it is best to filter this out before using the         */
+  /*    outline for stroking purposes (otherwise it would result in a      */
+  /*    visible dot when round caps are used).                             */
+  /*                                                                       */
+  /*    Similarly, the function returns success for an empty outline also  */
+  /*    (doing nothing, this is, not calling any emitter); if necessary,   */
+  /*    you should filter this out, too.                                   */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_Outline_Decompose( FT_Outline*              outline,
                         const FT_Outline_Funcs*  func_interface,
                         void*                    user );
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Outline_New
-   *
-   * @description:
-   *   Create a new outline of a given size.
-   *
-   * @input:
-   *   library ::
-   *     A handle to the library object from where the outline is allocated.
-   *     Note however that the new outline will **not** necessarily be
-   *     **freed**, when destroying the library, by @FT_Done_FreeType.
-   *
-   *   numPoints ::
-   *     The maximum number of points within the outline.  Must be smaller
-   *     than or equal to 0xFFFF (65535).
-   *
-   *   numContours ::
-   *     The maximum number of contours within the outline.  This value must
-   *     be in the range 0 to `numPoints`.
-   *
-   * @output:
-   *   anoutline ::
-   *     A handle to the new outline.
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   *
-   * @note:
-   *   The reason why this function takes a `library` parameter is simply to
-   *   use the library's memory allocator.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Outline_New                                                     */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Create a new outline of a given size.                              */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    library     :: A handle to the library object from where the       */
+  /*                   outline is allocated.  Note however that the new    */
+  /*                   outline will *not* necessarily be *freed*, when     */
+  /*                   destroying the library, by @FT_Done_FreeType.       */
+  /*                                                                       */
+  /*    numPoints   :: The maximum number of points within the outline.    */
+  /*                   Must be smaller than or equal to 0xFFFF (65535).    */
+  /*                                                                       */
+  /*    numContours :: The maximum number of contours within the outline.  */
+  /*                   This value must be in the range 0 to `numPoints'.   */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    anoutline   :: A handle to the new outline.                        */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0~means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The reason why this function takes a `library' parameter is simply */
+  /*    to use the library's memory allocator.                             */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_Outline_New( FT_Library   library,
                   FT_UInt      numPoints,
@@ -166,378 +162,372 @@ FT_BEGIN_HEADER
                   FT_Outline  *anoutline );
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Outline_Done
-   *
-   * @description:
-   *   Destroy an outline created with @FT_Outline_New.
-   *
-   * @input:
-   *   library ::
-   *     A handle of the library object used to allocate the outline.
-   *
-   *   outline ::
-   *     A pointer to the outline object to be discarded.
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   *
-   * @note:
-   *   If the outline's 'owner' field is not set, only the outline descriptor
-   *   will be released.
-   */
+  FT_EXPORT( FT_Error )
+  FT_Outline_New_Internal( FT_Memory    memory,
+                           FT_UInt      numPoints,
+                           FT_Int       numContours,
+                           FT_Outline  *anoutline );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Outline_Done                                                    */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Destroy an outline created with @FT_Outline_New.                   */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    library :: A handle of the library object used to allocate the     */
+  /*               outline.                                                */
+  /*                                                                       */
+  /*    outline :: A pointer to the outline object to be discarded.        */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0~means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    If the outline's `owner' field is not set, only the outline        */
+  /*    descriptor will be released.                                       */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_Outline_Done( FT_Library   library,
                    FT_Outline*  outline );
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Outline_Check
-   *
-   * @description:
-   *   Check the contents of an outline descriptor.
-   *
-   * @input:
-   *   outline ::
-   *     A handle to a source outline.
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   *
-   * @note:
-   *   An empty outline, or an outline with a single point only is also
-   *   valid.
-   */
+  FT_EXPORT( FT_Error )
+  FT_Outline_Done_Internal( FT_Memory    memory,
+                            FT_Outline*  outline );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Outline_Check                                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Check the contents of an outline descriptor.                       */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    outline :: A handle to a source outline.                           */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0~means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    An empty outline, or an outline with a single point only is also   */
+  /*    valid.                                                             */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_Outline_Check( FT_Outline*  outline );
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Outline_Get_CBox
-   *
-   * @description:
-   *   Return an outline's 'control box'.  The control box encloses all the
-   *   outline's points, including Bezier control points.  Though it
-   *   coincides with the exact bounding box for most glyphs, it can be
-   *   slightly larger in some situations (like when rotating an outline that
-   *   contains Bezier outside arcs).
-   *
-   *   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 and arcs
-   *   in the outline.  To get the latter, you can use the 'ftbbox'
-   *   component, which is dedicated to this single task.
-   *
-   * @input:
-   *   outline ::
-   *     A pointer to the source outline descriptor.
-   *
-   * @output:
-   *   acbox ::
-   *     The outline's control box.
-   *
-   * @note:
-   *   See @FT_Glyph_Get_CBox for a discussion of tricky fonts.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Outline_Get_CBox                                                */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Return an outline's `control box'.  The control box encloses all   */
+  /*    the outline's points, including Bezier control points.  Though it  */
+  /*    coincides with the exact bounding box for most glyphs, it can be   */
+  /*    slightly larger in some situations (like when rotating an outline  */
+  /*    that contains Bezier outside arcs).                                */
+  /*                                                                       */
+  /*    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  */
+  /*    and arcs in the outline.  To get the latter, you can use the       */
+  /*    `ftbbox' component, which is dedicated to this single task.        */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    outline :: A pointer to the source outline descriptor.             */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    acbox   :: The outline's control box.                              */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    See @FT_Glyph_Get_CBox for a discussion of tricky fonts.           */
+  /*                                                                       */
   FT_EXPORT( void )
   FT_Outline_Get_CBox( const FT_Outline*  outline,
                        FT_BBox           *acbox );
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Outline_Translate
-   *
-   * @description:
-   *   Apply a simple translation to the points of an outline.
-   *
-   * @inout:
-   *   outline ::
-   *     A pointer to the target outline descriptor.
-   *
-   * @input:
-   *   xOffset ::
-   *     The horizontal offset.
-   *
-   *   yOffset ::
-   *     The vertical offset.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Outline_Translate                                               */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Apply a simple translation to the points of an outline.            */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    outline :: A pointer to the target outline descriptor.             */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    xOffset :: The horizontal offset.                                  */
+  /*                                                                       */
+  /*    yOffset :: The vertical offset.                                    */
+  /*                                                                       */
   FT_EXPORT( void )
   FT_Outline_Translate( const FT_Outline*  outline,
                         FT_Pos             xOffset,
                         FT_Pos             yOffset );
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Outline_Copy
-   *
-   * @description:
-   *   Copy an outline into another one.  Both objects must have the same
-   *   sizes (number of points & number of contours) when this function is
-   *   called.
-   *
-   * @input:
-   *   source ::
-   *     A handle to the source outline.
-   *
-   * @output:
-   *   target ::
-   *     A handle to the target outline.
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Outline_Copy                                                    */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Copy an outline into another one.  Both objects must have the      */
+  /*    same sizes (number of points & number of contours) when this       */
+  /*    function is called.                                                */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    source :: A handle to the source outline.                          */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    target :: A handle to the target outline.                          */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0~means success.                             */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_Outline_Copy( const FT_Outline*  source,
                    FT_Outline        *target );
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Outline_Transform
-   *
-   * @description:
-   *   Apply a simple 2x2 matrix to all of an outline's points.  Useful for
-   *   applying rotations, slanting, flipping, etc.
-   *
-   * @inout:
-   *   outline ::
-   *     A pointer to the target outline descriptor.
-   *
-   * @input:
-   *   matrix ::
-   *     A pointer to the transformation matrix.
-   *
-   * @note:
-   *   You can use @FT_Outline_Translate if you need to translate the
-   *   outline's points.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Outline_Transform                                               */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Apply a simple 2x2 matrix to all of an outline's points.  Useful   */
+  /*    for applying rotations, slanting, flipping, etc.                   */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    outline :: A pointer to the target outline descriptor.             */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    matrix  :: A pointer to the transformation matrix.                 */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    You can use @FT_Outline_Translate if you need to translate the     */
+  /*    outline's points.                                                  */
+  /*                                                                       */
   FT_EXPORT( void )
   FT_Outline_Transform( const FT_Outline*  outline,
                         const FT_Matrix*   matrix );
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Outline_Embolden
-   *
-   * @description:
-   *   Embolden an outline.  The new outline will be at most 4~times
-   *   `strength` pixels wider and higher.  You may think of the left and
-   *   bottom borders as unchanged.
-   *
-   *   Negative `strength` values to reduce the outline thickness are
-   *   possible also.
-   *
-   * @inout:
-   *   outline ::
-   *     A handle to the target outline.
-   *
-   * @input:
-   *   strength ::
-   *     How strong the glyph is emboldened.  Expressed in 26.6 pixel format.
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   *
-   * @note:
-   *   The used algorithm to increase or decrease the thickness of the glyph
-   *   doesn't change the number of points; this means that certain
-   *   situations like acute angles or intersections are sometimes handled
-   *   incorrectly.
-   *
-   *   If you need 'better' metrics values you should call
-   *   @FT_Outline_Get_CBox or @FT_Outline_Get_BBox.
-   *
-   *   To get meaningful results, font scaling values must be set with
-   *   functions like @FT_Set_Char_Size before calling FT_Render_Glyph.
-   *
-   * @example:
-   *   ```
-   *     FT_Load_Glyph( face, index, FT_LOAD_DEFAULT );
-   *
-   *     if ( face->glyph->format == FT_GLYPH_FORMAT_OUTLINE )
-   *       FT_Outline_Embolden( &face->glyph->outline, strength );
-   *   ```
-   *
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Outline_Embolden                                                */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Embolden an outline.  The new outline will be at most 4~times      */
+  /*    `strength' pixels wider and higher.  You may think of the left and */
+  /*    bottom borders as unchanged.                                       */
+  /*                                                                       */
+  /*    Negative `strength' values to reduce the outline thickness are     */
+  /*    possible also.                                                     */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    outline  :: A handle to the target outline.                        */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    strength :: How strong the glyph is emboldened.  Expressed in      */
+  /*                26.6 pixel format.                                     */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0~means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The used algorithm to increase or decrease the thickness of the    */
+  /*    glyph doesn't change the number of points; this means that certain */
+  /*    situations like acute angles or intersections are sometimes        */
+  /*    handled incorrectly.                                               */
+  /*                                                                       */
+  /*    If you need `better' metrics values you should call                */
+  /*    @FT_Outline_Get_CBox or @FT_Outline_Get_BBox.                      */
+  /*                                                                       */
+  /*    Example call:                                                      */
+  /*                                                                       */
+  /*    {                                                                  */
+  /*      FT_Load_Glyph( face, index, FT_LOAD_DEFAULT );                   */
+  /*      if ( face->glyph->format == FT_GLYPH_FORMAT_OUTLINE )            */
+  /*        FT_Outline_Embolden( &face->glyph->outline, strength );        */
+  /*    }                                                                  */
+  /*                                                                       */
+  /*    To get meaningful results, font scaling values must be set with    */
+  /*    functions like @FT_Set_Char_Size before calling FT_Render_Glyph.   */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_Outline_Embolden( FT_Outline*  outline,
                        FT_Pos       strength );
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Outline_EmboldenXY
-   *
-   * @description:
-   *   Embolden an outline.  The new outline will be `xstrength` pixels wider
-   *   and `ystrength` pixels higher.  Otherwise, it is similar to
-   *   @FT_Outline_Embolden, which uses the same strength in both directions.
-   *
-   * @since:
-   *   2.4.10
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Outline_EmboldenXY                                              */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Embolden an outline.  The new outline will be `xstrength' pixels   */
+  /*    wider and `ystrength' pixels higher.  Otherwise, it is similar to  */
+  /*    @FT_Outline_Embolden, which uses the same strength in both         */
+  /*    directions.                                                        */
+  /*                                                                       */
+  /* <Since>                                                               */
+  /*    2.4.10                                                             */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_Outline_EmboldenXY( FT_Outline*  outline,
                          FT_Pos       xstrength,
                          FT_Pos       ystrength );
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Outline_Reverse
-   *
-   * @description:
-   *   Reverse the drawing direction of an outline.  This is used to ensure
-   *   consistent fill conventions for mirrored glyphs.
-   *
-   * @inout:
-   *   outline ::
-   *     A pointer to the target outline descriptor.
-   *
-   * @note:
-   *   This function toggles the bit flag @FT_OUTLINE_REVERSE_FILL in the
-   *   outline's `flags` field.
-   *
-   *   It shouldn't be used by a normal client application, unless it knows
-   *   what it is doing.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Outline_Reverse                                                 */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Reverse the drawing direction of an outline.  This is used to      */
+  /*    ensure consistent fill conventions for mirrored glyphs.            */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    outline :: A pointer to the target outline descriptor.             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    This function toggles the bit flag @FT_OUTLINE_REVERSE_FILL in     */
+  /*    the outline's `flags' field.                                       */
+  /*                                                                       */
+  /*    It shouldn't be used by a normal client application, unless it     */
+  /*    knows what it is doing.                                            */
+  /*                                                                       */
   FT_EXPORT( void )
   FT_Outline_Reverse( FT_Outline*  outline );
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Outline_Get_Bitmap
-   *
-   * @description:
-   *   Render an outline within a bitmap.  The outline's image is simply
-   *   OR-ed to the target bitmap.
-   *
-   * @input:
-   *   library ::
-   *     A handle to a FreeType library object.
-   *
-   *   outline ::
-   *     A pointer to the source outline descriptor.
-   *
-   * @inout:
-   *   abitmap ::
-   *     A pointer to the target bitmap descriptor.
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   *
-   * @note:
-   *   This function does **not create** the bitmap, it only renders an
-   *   outline image within the one you pass to it!  Consequently, the
-   *   various fields in `abitmap` should be set accordingly.
-   *
-   *   It will use the raster corresponding to the default glyph format.
-   *
-   *   The value of the `num_grays` field in `abitmap` is ignored.  If you
-   *   select the gray-level rasterizer, and you want less than 256 gray
-   *   levels, you have to use @FT_Outline_Render directly.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Outline_Get_Bitmap                                              */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Render an outline within a bitmap.  The outline's image is simply  */
+  /*    OR-ed to the target bitmap.                                        */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    library :: A handle to a FreeType library object.                  */
+  /*                                                                       */
+  /*    outline :: A pointer to the source outline descriptor.             */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    abitmap :: A pointer to the target bitmap descriptor.              */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0~means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    This function does NOT CREATE the bitmap, it only renders an       */
+  /*    outline image within the one you pass to it!  Consequently, the    */
+  /*    various fields in `abitmap' should be set accordingly.             */
+  /*                                                                       */
+  /*    It will use the raster corresponding to the default glyph format.  */
+  /*                                                                       */
+  /*    The value of the `num_grays' field in `abitmap' is ignored.  If    */
+  /*    you select the gray-level rasterizer, and you want less than 256   */
+  /*    gray levels, you have to use @FT_Outline_Render directly.          */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_Outline_Get_Bitmap( FT_Library        library,
                          FT_Outline*       outline,
                          const FT_Bitmap  *abitmap );
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Outline_Render
-   *
-   * @description:
-   *   Render an outline within a bitmap using the current scan-convert.
-   *   This function uses an @FT_Raster_Params structure as an argument,
-   *   allowing advanced features like direct composition, translucency, etc.
-   *
-   * @input:
-   *   library ::
-   *     A handle to a FreeType library object.
-   *
-   *   outline ::
-   *     A pointer to the source outline descriptor.
-   *
-   * @inout:
-   *   params ::
-   *     A pointer to an @FT_Raster_Params structure used to describe the
-   *     rendering operation.
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   *
-   * @note:
-   *   You should know what you are doing and how @FT_Raster_Params works to
-   *   use this function.
-   *
-   *   The field `params.source` will be set to `outline` before the scan
-   *   converter is called, which means that the value you give to it is
-   *   actually ignored.
-   *
-   *   The gray-level rasterizer always uses 256 gray levels.  If you want
-   *   less gray levels, you have to provide your own span callback.  See the
-   *   @FT_RASTER_FLAG_DIRECT value of the `flags` field in the
-   *   @FT_Raster_Params structure for more details.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Outline_Render                                                  */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Render an outline within a bitmap using the current scan-convert.  */
+  /*    This function uses an @FT_Raster_Params structure as an argument,  */
+  /*    allowing advanced features like direct composition, translucency,  */
+  /*    etc.                                                               */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    library :: A handle to a FreeType library object.                  */
+  /*                                                                       */
+  /*    outline :: A pointer to the source outline descriptor.             */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    params  :: A pointer to an @FT_Raster_Params structure used to     */
+  /*               describe the rendering operation.                       */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0~means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    You should know what you are doing and how @FT_Raster_Params works */
+  /*    to use this function.                                              */
+  /*                                                                       */
+  /*    The field `params.source' will be set to `outline' before the scan */
+  /*    converter is called, which means that the value you give to it is  */
+  /*    actually ignored.                                                  */
+  /*                                                                       */
+  /*    The gray-level rasterizer always uses 256 gray levels.  If you     */
+  /*    want less gray levels, you have to provide your own span callback. */
+  /*    See the @FT_RASTER_FLAG_DIRECT value of the `flags' field in the   */
+  /*    @FT_Raster_Params structure for more details.                      */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_Outline_Render( FT_Library         library,
                      FT_Outline*        outline,
                      FT_Raster_Params*  params );
 
 
-  /**************************************************************************
-   *
-   * @enum:
-   *   FT_Orientation
-   *
-   * @description:
-   *   A list of values used to describe an outline's contour orientation.
-   *
-   *   The TrueType and PostScript specifications use different conventions
-   *   to determine whether outline contours should be filled or unfilled.
-   *
-   * @values:
-   *   FT_ORIENTATION_TRUETYPE ::
-   *     According to the TrueType specification, clockwise contours must be
-   *     filled, and counter-clockwise ones must be unfilled.
-   *
-   *   FT_ORIENTATION_POSTSCRIPT ::
-   *     According to the PostScript specification, counter-clockwise
-   *     contours must be filled, and clockwise ones must be unfilled.
-   *
-   *   FT_ORIENTATION_FILL_RIGHT ::
-   *     This is identical to @FT_ORIENTATION_TRUETYPE, but is used to
-   *     remember that in TrueType, everything that is to the right of the
-   *     drawing direction of a contour must be filled.
-   *
-   *   FT_ORIENTATION_FILL_LEFT ::
-   *     This is identical to @FT_ORIENTATION_POSTSCRIPT, but is used to
-   *     remember that in PostScript, everything that is to the left of the
-   *     drawing direction of a contour must be filled.
-   *
-   *   FT_ORIENTATION_NONE ::
-   *     The orientation cannot be determined.  That is, different parts of
-   *     the glyph have different orientation.
-   *
-   */
+ /**************************************************************************
+  *
+  * @enum:
+  *   FT_Orientation
+  *
+  * @description:
+  *   A list of values used to describe an outline's contour orientation.
+  *
+  *   The TrueType and PostScript specifications use different conventions
+  *   to determine whether outline contours should be filled or unfilled.
+  *
+  * @values:
+  *   FT_ORIENTATION_TRUETYPE ::
+  *     According to the TrueType specification, clockwise contours must
+  *     be filled, and counter-clockwise ones must be unfilled.
+  *
+  *   FT_ORIENTATION_POSTSCRIPT ::
+  *     According to the PostScript specification, counter-clockwise contours
+  *     must be filled, and clockwise ones must be unfilled.
+  *
+  *   FT_ORIENTATION_FILL_RIGHT ::
+  *     This is identical to @FT_ORIENTATION_TRUETYPE, but is used to
+  *     remember that in TrueType, everything that is to the right of
+  *     the drawing direction of a contour must be filled.
+  *
+  *   FT_ORIENTATION_FILL_LEFT ::
+  *     This is identical to @FT_ORIENTATION_POSTSCRIPT, but is used to
+  *     remember that in PostScript, everything that is to the left of
+  *     the drawing direction of a contour must be filled.
+  *
+  *   FT_ORIENTATION_NONE ::
+  *     The orientation cannot be determined.  That is, different parts of
+  *     the glyph have different orientation.
+  *
+  */
   typedef enum  FT_Orientation_
   {
     FT_ORIENTATION_TRUETYPE   = 0,
@@ -549,34 +539,33 @@ FT_BEGIN_HEADER
   } FT_Orientation;
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Outline_Get_Orientation
-   *
-   * @description:
-   *   This function analyzes a glyph outline and tries to compute its fill
-   *   orientation (see @FT_Orientation).  This is done by integrating the
-   *   total area covered by the outline. The positive integral corresponds
-   *   to the clockwise orientation and @FT_ORIENTATION_POSTSCRIPT is
-   *   returned. The negative integral corresponds to the counter-clockwise
-   *   orientation and @FT_ORIENTATION_TRUETYPE is returned.
-   *
-   *   Note that this will return @FT_ORIENTATION_TRUETYPE for empty
-   *   outlines.
-   *
-   * @input:
-   *   outline ::
-   *     A handle to the source outline.
-   *
-   * @return:
-   *   The orientation.
-   *
-   */
+ /**************************************************************************
+  *
+  * @function:
+  *   FT_Outline_Get_Orientation
+  *
+  * @description:
+  *   This function analyzes a glyph outline and tries to compute its
+  *   fill orientation (see @FT_Orientation).  This is done by integrating
+  *   the total area covered by the outline. The positive integral
+  *   corresponds to the clockwise orientation and @FT_ORIENTATION_POSTSCRIPT
+  *   is returned. The negative integral corresponds to the counter-clockwise
+  *   orientation and @FT_ORIENTATION_TRUETYPE is returned.
+  *
+  *   Note that this will return @FT_ORIENTATION_TRUETYPE for empty
+  *   outlines.
+  *
+  * @input:
+  *   outline ::
+  *     A handle to the source outline.
+  *
+  * @return:
+  *   The orientation.
+  *
+  */
   FT_EXPORT( FT_Orientation )
   FT_Outline_Get_Orientation( FT_Outline*  outline );
 
-
   /* */
 
 

+ 50 - 49
thirdparty/freetype/include/freetype/ftparams.h

@@ -1,19 +1,19 @@
-/****************************************************************************
- *
- * ftparams.h
- *
- *   FreeType API for possible FT_Parameter tags (specification only).
- *
- * Copyright (C) 2017-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  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_
@@ -51,16 +51,16 @@ FT_BEGIN_HEADER
    */
 
 
-  /**************************************************************************
+  /***************************************************************************
    *
-   * @enum:
+   * @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.
+   *   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
@@ -75,14 +75,14 @@ FT_BEGIN_HEADER
           FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY
 
 
-  /**************************************************************************
+  /***************************************************************************
    *
-   * @enum:
+   * @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
+   *   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.
    *
@@ -99,9 +99,9 @@ FT_BEGIN_HEADER
           FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY
 
 
-  /**************************************************************************
+  /***************************************************************************
    *
-   * @enum:
+   * @constant:
    *   FT_PARAM_TAG_INCREMENTAL
    *
    * @description:
@@ -115,14 +115,14 @@ FT_BEGIN_HEADER
 
   /**************************************************************************
    *
-   * @enum:
+   * @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
+   *   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:
@@ -135,13 +135,14 @@ FT_BEGIN_HEADER
 
   /**************************************************************************
    *
-   * @enum:
+   * @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.
+   *   driver's random seed value with a face-specific one; see
+   *   @random-seed.
    *
    * @since:
    *   2.8
@@ -153,7 +154,7 @@ FT_BEGIN_HEADER
 
   /**************************************************************************
    *
-   * @enum:
+   * @constant:
    *   FT_PARAM_TAG_STEM_DARKENING
    *
    * @description:
@@ -162,10 +163,10 @@ FT_BEGIN_HEADER
    *   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).
+   *   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
@@ -175,19 +176,19 @@ FT_BEGIN_HEADER
           FT_MAKE_TAG( 'd', 'a', 'r', 'k' )
 
 
-  /**************************************************************************
-   *
-   * @enum:
-   *   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.
-   *
-   */
+ /***************************************************************************
+  *
+  * @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' )
 

+ 105 - 0
thirdparty/freetype/include/freetype/ftpcfdrv.h

@@ -0,0 +1,105 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftpcfdrv.h                                                             */
+/*                                                                         */
+/*    FreeType API for controlling the PCF driver (specification only).    */
+/*                                                                         */
+/*  Copyright 2017 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 FTPCFDRV_H_
+#define FTPCFDRV_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:
+   *   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'.
+   *
+   */
+
+
+  /**************************************************************************
+   *
+   * @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).
+   *
+   */
+
+
+FT_END_HEADER
+
+
+#endif /* FTPCFDRV_H_ */
+
+
+/* END */

+ 125 - 133
thirdparty/freetype/include/freetype/ftpfr.h

@@ -1,19 +1,19 @@
-/****************************************************************************
- *
- * ftpfr.h
- *
- *   FreeType API for accessing PFR-specific data (specification only).
- *
- * Copyright (C) 2002-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  ftpfr.h                                                                */
+/*                                                                         */
+/*    FreeType API for accessing PFR-specific data (specification only).   */
+/*                                                                         */
+/*  Copyright 2002-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 FTPFR_H_
@@ -32,61 +32,60 @@
 FT_BEGIN_HEADER
 
 
-  /**************************************************************************
-   *
-   * @section:
-   *   pfr_fonts
-   *
-   * @title:
-   *   PFR Fonts
-   *
-   * @abstract:
-   *   PFR/TrueDoc-specific API.
-   *
-   * @description:
-   *   This section contains the declaration of PFR-specific functions.
-   *
-   */
-
-
-  /**************************************************************************
-   *
-   * @function:
-   *    FT_Get_PFR_Metrics
-   *
-   * @description:
-   *    Return the outline and metrics resolutions of a given PFR face.
-   *
-   * @input:
-   *    face ::
-   *      Handle to the input face.  It can be a non-PFR face.
-   *
-   * @output:
-   *    aoutline_resolution ::
-   *      Outline resolution.  This is equivalent to `face->units_per_EM` for
-   *      non-PFR fonts.  Optional (parameter can be `NULL`).
-   *
-   *    ametrics_resolution ::
-   *      Metrics resolution.  This is equivalent to `outline_resolution` for
-   *      non-PFR fonts.  Optional (parameter can be `NULL`).
-   *
-   *    ametrics_x_scale ::
-   *      A 16.16 fixed-point number used to scale distance expressed in
-   *      metrics units to device subpixels.  This is equivalent to
-   *      `face->size->x_scale`, but for metrics only.  Optional (parameter
-   *      can be `NULL`).
-   *
-   *    ametrics_y_scale ::
-   *      Same as `ametrics_x_scale` but for the vertical direction.
-   *      optional (parameter can be `NULL`).
-   *
-   * @return:
-   *    FreeType error code.  0~means success.
-   *
-   * @note:
-   *   If the input face is not a PFR, this function will return an error.
-   *   However, in all cases, it will return valid values.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    pfr_fonts                                                          */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*    PFR Fonts                                                          */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*    PFR/TrueDoc specific API.                                          */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This section contains the declaration of PFR-specific functions.   */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+ /**********************************************************************
+  *
+  * @function:
+  *    FT_Get_PFR_Metrics
+  *
+  * @description:
+  *    Return the outline and metrics resolutions of a given PFR face.
+  *
+  * @input:
+  *    face :: Handle to the input face.  It can be a non-PFR face.
+  *
+  * @output:
+  *    aoutline_resolution ::
+  *      Outline resolution.  This is equivalent to `face->units_per_EM'
+  *      for non-PFR fonts.  Optional (parameter can be NULL).
+  *
+  *    ametrics_resolution ::
+  *      Metrics resolution.  This is equivalent to `outline_resolution'
+  *      for non-PFR fonts.  Optional (parameter can be NULL).
+  *
+  *    ametrics_x_scale ::
+  *      A 16.16 fixed-point number used to scale distance expressed
+  *      in metrics units to device subpixels.  This is equivalent to
+  *      `face->size->x_scale', but for metrics only.  Optional (parameter
+  *      can be NULL).
+  *
+  *    ametrics_y_scale ::
+  *      Same as `ametrics_x_scale' but for the vertical direction.
+  *      optional (parameter can be NULL).
+  *
+  * @return:
+  *    FreeType error code.  0~means success.
+  *
+  * @note:
+  *   If the input face is not a PFR, this function will return an error.
+  *   However, in all cases, it will return valid values.
+  */
   FT_EXPORT( FT_Error )
   FT_Get_PFR_Metrics( FT_Face    face,
                       FT_UInt   *aoutline_resolution,
@@ -95,41 +94,37 @@ FT_BEGIN_HEADER
                       FT_Fixed  *ametrics_y_scale );
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *    FT_Get_PFR_Kerning
-   *
-   * @description:
-   *    Return the kerning pair corresponding to two glyphs in a PFR face.
-   *    The distance is expressed in metrics units, unlike the result of
-   *    @FT_Get_Kerning.
-   *
-   * @input:
-   *    face ::
-   *      A handle to the input face.
-   *
-   *    left ::
-   *      Index of the left glyph.
-   *
-   *    right ::
-   *      Index of the right glyph.
-   *
-   * @output:
-   *    avector ::
-   *      A kerning vector.
-   *
-   * @return:
-   *    FreeType error code.  0~means success.
-   *
-   * @note:
-   *    This function always return distances in original PFR metrics units.
-   *    This is unlike @FT_Get_Kerning with the @FT_KERNING_UNSCALED mode,
-   *    which always returns distances converted to outline units.
-   *
-   *    You can use the value of the `x_scale` and `y_scale` parameters
-   *    returned by @FT_Get_PFR_Metrics to scale these to device subpixels.
-   */
+ /**********************************************************************
+  *
+  * @function:
+  *    FT_Get_PFR_Kerning
+  *
+  * @description:
+  *    Return the kerning pair corresponding to two glyphs in a PFR face.
+  *    The distance is expressed in metrics units, unlike the result of
+  *    @FT_Get_Kerning.
+  *
+  * @input:
+  *    face  :: A handle to the input face.
+  *
+  *    left  :: Index of the left glyph.
+  *
+  *    right :: Index of the right glyph.
+  *
+  * @output:
+  *    avector :: A kerning vector.
+  *
+  * @return:
+  *    FreeType error code.  0~means success.
+  *
+  * @note:
+  *    This function always return distances in original PFR metrics
+  *    units.  This is unlike @FT_Get_Kerning with the @FT_KERNING_UNSCALED
+  *    mode, which always returns distances converted to outline units.
+  *
+  *    You can use the value of the `x_scale' and `y_scale' parameters
+  *    returned by @FT_Get_PFR_Metrics to scale these to device subpixels.
+  */
   FT_EXPORT( FT_Error )
   FT_Get_PFR_Kerning( FT_Face     face,
                       FT_UInt     left,
@@ -137,33 +132,30 @@ FT_BEGIN_HEADER
                       FT_Vector  *avector );
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *    FT_Get_PFR_Advance
-   *
-   * @description:
-   *    Return a given glyph advance, expressed in original metrics units,
-   *    from a PFR font.
-   *
-   * @input:
-   *    face ::
-   *      A handle to the input face.
-   *
-   *    gindex ::
-   *      The glyph index.
-   *
-   * @output:
-   *    aadvance ::
-   *      The glyph advance in metrics units.
-   *
-   * @return:
-   *    FreeType error code.  0~means success.
-   *
-   * @note:
-   *    You can use the `x_scale` or `y_scale` results of @FT_Get_PFR_Metrics
-   *    to convert the advance to device subpixels (i.e., 1/64th of pixels).
-   */
+ /**********************************************************************
+  *
+  * @function:
+  *    FT_Get_PFR_Advance
+  *
+  * @description:
+  *    Return a given glyph advance, expressed in original metrics units,
+  *    from a PFR font.
+  *
+  * @input:
+  *    face   :: A handle to the input face.
+  *
+  *    gindex :: The glyph index.
+  *
+  * @output:
+  *    aadvance :: The glyph advance in metrics units.
+  *
+  * @return:
+  *    FreeType error code.  0~means success.
+  *
+  * @note:
+  *    You can use the `x_scale' or `y_scale' results of @FT_Get_PFR_Metrics
+  *    to convert the advance to device subpixels (i.e., 1/64th of pixels).
+  */
   FT_EXPORT( FT_Error )
   FT_Get_PFR_Advance( FT_Face   face,
                       FT_UInt   gindex,

+ 101 - 113
thirdparty/freetype/include/freetype/ftrender.h

@@ -1,19 +1,19 @@
-/****************************************************************************
- *
- * ftrender.h
- *
- *   FreeType renderer modules public interface (specification).
- *
- * Copyright (C) 1996-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  ftrender.h                                                             */
+/*                                                                         */
+/*    FreeType renderer modules public 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 FTRENDER_H_
@@ -28,12 +28,12 @@
 FT_BEGIN_HEADER
 
 
-  /**************************************************************************
-   *
-   * @section:
-   *   module_management
-   *
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    module_management                                                  */
+  /*                                                                       */
+  /*************************************************************************/
 
 
   /* create a new glyph object */
@@ -116,38 +116,32 @@ FT_BEGIN_HEADER
 #define FTRenderer_setMode  FT_Renderer_SetModeFunc
 
 
-  /**************************************************************************
-   *
-   * @struct:
-   *   FT_Renderer_Class
-   *
-   * @description:
-   *   The renderer module class descriptor.
-   *
-   * @fields:
-   *   root ::
-   *     The root @FT_Module_Class fields.
-   *
-   *   glyph_format ::
-   *     The glyph image format this renderer handles.
-   *
-   *   render_glyph ::
-   *     A method used to render the image that is in a given glyph slot into
-   *     a bitmap.
-   *
-   *   transform_glyph ::
-   *     A method used to transform the image that is in a given glyph slot.
-   *
-   *   get_glyph_cbox ::
-   *     A method used to access the glyph's cbox.
-   *
-   *   set_mode ::
-   *     A method used to pass additional parameters.
-   *
-   *   raster_class ::
-   *     For @FT_GLYPH_FORMAT_OUTLINE renderers only.  This is a pointer to
-   *     its raster's class.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_Renderer_Class                                                  */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    The renderer module class descriptor.                              */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    root            :: The root @FT_Module_Class fields.               */
+  /*                                                                       */
+  /*    glyph_format    :: The glyph image format this renderer handles.   */
+  /*                                                                       */
+  /*    render_glyph    :: A method used to render the image that is in a  */
+  /*                       given glyph slot into a bitmap.                 */
+  /*                                                                       */
+  /*    transform_glyph :: A method used to transform the image that is in */
+  /*                       a given glyph slot.                             */
+  /*                                                                       */
+  /*    get_glyph_cbox  :: A method used to access the glyph's cbox.       */
+  /*                                                                       */
+  /*    set_mode        :: A method used to pass additional parameters.    */
+  /*                                                                       */
+  /*    raster_class    :: For @FT_GLYPH_FORMAT_OUTLINE renderers only.    */
+  /*                       This is a pointer to its raster's class.        */
+  /*                                                                       */
   typedef struct  FT_Renderer_Class_
   {
     FT_Module_Class            root;
@@ -164,70 +158,64 @@ FT_BEGIN_HEADER
   } FT_Renderer_Class;
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Get_Renderer
-   *
-   * @description:
-   *   Retrieve the current renderer for a given glyph format.
-   *
-   * @input:
-   *   library ::
-   *     A handle to the library object.
-   *
-   *   format ::
-   *     The glyph format.
-   *
-   * @return:
-   *   A renderer handle.  0~if none found.
-   *
-   * @note:
-   *   An error will be returned if a module already exists by that name, or
-   *   if the module requires a version of FreeType that is too great.
-   *
-   *   To add a new renderer, simply use @FT_Add_Module.  To retrieve a
-   *   renderer by its name, use @FT_Get_Module.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Get_Renderer                                                    */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Retrieve the current renderer for a given glyph format.            */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    library :: A handle to the library object.                         */
+  /*                                                                       */
+  /*    format  :: The glyph format.                                       */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    A renderer handle.  0~if none found.                               */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    An error will be returned if a module already exists by that name, */
+  /*    or if the module requires a version of FreeType that is too great. */
+  /*                                                                       */
+  /*    To add a new renderer, simply use @FT_Add_Module.  To retrieve a   */
+  /*    renderer by its name, use @FT_Get_Module.                          */
+  /*                                                                       */
   FT_EXPORT( FT_Renderer )
   FT_Get_Renderer( FT_Library       library,
                    FT_Glyph_Format  format );
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Set_Renderer
-   *
-   * @description:
-   *   Set the current renderer to use, and set additional mode.
-   *
-   * @inout:
-   *   library ::
-   *     A handle to the library object.
-   *
-   * @input:
-   *   renderer ::
-   *     A handle to the renderer object.
-   *
-   *   num_params ::
-   *     The number of additional parameters.
-   *
-   *   parameters ::
-   *     Additional parameters.
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   *
-   * @note:
-   *   In case of success, the renderer will be used to convert glyph images
-   *   in the renderer's known format into bitmaps.
-   *
-   *   This doesn't change the current renderer for other formats.
-   *
-   *   Currently, no FreeType renderer module uses `parameters`; you should
-   *   thus always pass `NULL` as the value.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Set_Renderer                                                    */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Set the current renderer to use, and set additional mode.          */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    library    :: A handle to the library object.                      */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    renderer   :: A handle to the renderer object.                     */
+  /*                                                                       */
+  /*    num_params :: The number of additional parameters.                 */
+  /*                                                                       */
+  /*    parameters :: Additional parameters.                               */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0~means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    In case of success, the renderer will be used to convert glyph     */
+  /*    images in the renderer's known format into bitmaps.                */
+  /*                                                                       */
+  /*    This doesn't change the current renderer for other formats.        */
+  /*                                                                       */
+  /*    Currently, no FreeType renderer module uses `parameters'; you      */
+  /*    should thus always pass NULL as the value.                         */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_Set_Renderer( FT_Library     library,
                    FT_Renderer    renderer,

+ 119 - 120
thirdparty/freetype/include/freetype/ftsizes.h

@@ -1,28 +1,28 @@
-/****************************************************************************
- *
- * ftsizes.h
- *
- *   FreeType size objects management (specification).
- *
- * Copyright (C) 1996-2019 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.
- *
- */
-
-
-  /**************************************************************************
-   *
-   * Typical application would normally not need to use these functions.
-   * However, they have been placed in a public API for the rare cases where
-   * they are needed.
-   *
-   */
+/***************************************************************************/
+/*                                                                         */
+/*  ftsizes.h                                                              */
+/*                                                                         */
+/*    FreeType size objects management (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.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* Typical application would normally not need to use these functions.   */
+  /* However, they have been placed in a public API for the rare cases     */
+  /* where they are needed.                                                */
+  /*                                                                       */
+  /*************************************************************************/
 
 
 #ifndef FTSIZES_H_
@@ -42,110 +42,109 @@
 FT_BEGIN_HEADER
 
 
-  /**************************************************************************
-   *
-   * @section:
-   *   sizes_management
-   *
-   * @title:
-   *   Size Management
-   *
-   * @abstract:
-   *   Managing multiple sizes per face.
-   *
-   * @description:
-   *   When creating a new face object (e.g., with @FT_New_Face), an @FT_Size
-   *   object is automatically created and used to store all pixel-size
-   *   dependent information, available in the `face->size` field.
-   *
-   *   It is however possible to create more sizes for a given face, mostly
-   *   in order to manage several character pixel sizes of the same font
-   *   family and style.  See @FT_New_Size and @FT_Done_Size.
-   *
-   *   Note that @FT_Set_Pixel_Sizes and @FT_Set_Char_Size only modify the
-   *   contents of the current 'active' size; you thus need to use
-   *   @FT_Activate_Size to change it.
-   *
-   *   99% of applications won't need the functions provided here, especially
-   *   if they use the caching sub-system, so be cautious when using these.
-   *
-   */
-
-
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_New_Size
-   *
-   * @description:
-   *   Create a new size object from a given face object.
-   *
-   * @input:
-   *   face ::
-   *     A handle to a parent face object.
-   *
-   * @output:
-   *   asize ::
-   *     A handle to a new size object.
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   *
-   * @note:
-   *   You need to call @FT_Activate_Size in order to select the new size for
-   *   upcoming calls to @FT_Set_Pixel_Sizes, @FT_Set_Char_Size,
-   *   @FT_Load_Glyph, @FT_Load_Char, etc.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    sizes_management                                                   */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*    Size Management                                                    */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*    Managing multiple sizes per face.                                  */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    When creating a new face object (e.g., with @FT_New_Face), an      */
+  /*    @FT_Size object is automatically created and used to store all     */
+  /*    pixel-size dependent information, available in the `face->size'    */
+  /*    field.                                                             */
+  /*                                                                       */
+  /*    It is however possible to create more sizes for a given face,      */
+  /*    mostly in order to manage several character pixel sizes of the     */
+  /*    same font family and style.  See @FT_New_Size and @FT_Done_Size.   */
+  /*                                                                       */
+  /*    Note that @FT_Set_Pixel_Sizes and @FT_Set_Char_Size only           */
+  /*    modify the contents of the current `active' size; you thus need    */
+  /*    to use @FT_Activate_Size to change it.                             */
+  /*                                                                       */
+  /*    99% of applications won't need the functions provided here,        */
+  /*    especially if they use the caching sub-system, so be cautious      */
+  /*    when using these.                                                  */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_New_Size                                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Create a new size object from a given face object.                 */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face :: A handle to a parent face object.                          */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    asize :: A handle to a new size object.                            */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0~means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    You need to call @FT_Activate_Size in order to select the new size */
+  /*    for upcoming calls to @FT_Set_Pixel_Sizes, @FT_Set_Char_Size,      */
+  /*    @FT_Load_Glyph, @FT_Load_Char, etc.                                */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_New_Size( FT_Face   face,
                FT_Size*  size );
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Done_Size
-   *
-   * @description:
-   *   Discard a given size object.  Note that @FT_Done_Face automatically
-   *   discards all size objects allocated with @FT_New_Size.
-   *
-   * @input:
-   *   size ::
-   *     A handle to a target size object.
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Done_Size                                                       */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Discard a given size object.  Note that @FT_Done_Face              */
+  /*    automatically discards all size objects allocated with             */
+  /*    @FT_New_Size.                                                      */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    size :: A handle to a target size object.                          */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0~means success.                             */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_Done_Size( FT_Size  size );
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Activate_Size
-   *
-   * @description:
-   *   Even though it is possible to create several size objects for a given
-   *   face (see @FT_New_Size for details), functions like @FT_Load_Glyph or
-   *   @FT_Load_Char only use the one that has been activated last to
-   *   determine the 'current character pixel size'.
-   *
-   *   This function can be used to 'activate' a previously created size
-   *   object.
-   *
-   * @input:
-   *   size ::
-   *     A handle to a target size object.
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   *
-   * @note:
-   *   If `face` is the size's parent face object, this function changes the
-   *   value of `face->size` to the input size handle.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Activate_Size                                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Even though it is possible to create several size objects for a    */
+  /*    given face (see @FT_New_Size for details), functions like          */
+  /*    @FT_Load_Glyph or @FT_Load_Char only use the one that has been     */
+  /*    activated last to determine the `current character pixel size'.    */
+  /*                                                                       */
+  /*    This function can be used to `activate' a previously created size  */
+  /*    object.                                                            */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    size :: A handle to a target size object.                          */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0~means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    If `face' is the size's parent face object, this function changes  */
+  /*    the value of `face->size' to the input size handle.                */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_Activate_Size( FT_Size  size );
 

+ 187 - 207
thirdparty/freetype/include/freetype/ftsnames.h

@@ -1,22 +1,22 @@
-/****************************************************************************
- *
- * ftsnames.h
- *
- *   Simple interface to access SFNT 'name' tables (which are used
- *   to hold font names, copyright info, notices, etc.) (specification).
- *
- *   This is _not_ used to retrieve glyph names!
- *
- * Copyright (C) 1996-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  ftsnames.h                                                             */
+/*                                                                         */
+/*    Simple interface to access SFNT `name' tables (which are used        */
+/*    to hold font names, copyright info, notices, etc.) (specification).  */
+/*                                                                         */
+/*    This is _not_ used to retrieve glyph names!                          */
+/*                                                                         */
+/*  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 FTSNAMES_H_
@@ -37,74 +37,72 @@
 FT_BEGIN_HEADER
 
 
-  /**************************************************************************
-   *
-   * @section:
-   *   sfnt_names
-   *
-   * @title:
-   *   SFNT Names
-   *
-   * @abstract:
-   *   Access the names embedded in TrueType and OpenType files.
-   *
-   * @description:
-   *   The TrueType and OpenType specifications allow the inclusion of a
-   *   special names table ('name') in font files.  This table contains
-   *   textual (and internationalized) information regarding the font, like
-   *   family name, copyright, version, etc.
-   *
-   *   The definitions below are used to access them if available.
-   *
-   *   Note that this has nothing to do with glyph names!
-   *
-   */
-
-
-  /**************************************************************************
-   *
-   * @struct:
-   *   FT_SfntName
-   *
-   * @description:
-   *   A structure used to model an SFNT 'name' table entry.
-   *
-   * @fields:
-   *   platform_id ::
-   *     The platform ID for `string`.  See @TT_PLATFORM_XXX for possible
-   *     values.
-   *
-   *   encoding_id ::
-   *     The encoding ID for `string`.  See @TT_APPLE_ID_XXX, @TT_MAC_ID_XXX,
-   *     @TT_ISO_ID_XXX, @TT_MS_ID_XXX, and @TT_ADOBE_ID_XXX for possible
-   *     values.
-   *
-   *   language_id ::
-   *     The language ID for `string`.  See @TT_MAC_LANGID_XXX and
-   *     @TT_MS_LANGID_XXX for possible values.
-   *
-   *     Registered OpenType values for `language_id` are always smaller than
-   *     0x8000; values equal or larger than 0x8000 usually indicate a
-   *     language tag string (introduced in OpenType version 1.6).  Use
-   *     function @FT_Get_Sfnt_LangTag with `language_id` as its argument to
-   *     retrieve the associated language tag.
-   *
-   *   name_id ::
-   *     An identifier for `string`.  See @TT_NAME_ID_XXX for possible
-   *     values.
-   *
-   *   string ::
-   *     The 'name' string.  Note that its format differs depending on the
-   *     (platform,encoding) pair, being either a string of bytes (without a
-   *     terminating `NULL` byte) or containing UTF-16BE entities.
-   *
-   *   string_len ::
-   *     The length of `string` in bytes.
-   *
-   * @note:
-   *   Please refer to the TrueType or OpenType specification for more
-   *   details.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    sfnt_names                                                         */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*    SFNT Names                                                         */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*    Access the names embedded in TrueType and OpenType files.          */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    The TrueType and OpenType specifications allow the inclusion of    */
+  /*    a special names table (`name') in font files.  This table contains */
+  /*    textual (and internationalized) information regarding the font,    */
+  /*    like family name, copyright, version, etc.                         */
+  /*                                                                       */
+  /*    The definitions below are used to access them if available.        */
+  /*                                                                       */
+  /*    Note that this has nothing to do with glyph names!                 */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_SfntName                                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure used to model an SFNT `name' table entry.              */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    platform_id :: The platform ID for `string'.                       */
+  /*                   See @TT_PLATFORM_XXX for possible values.           */
+  /*                                                                       */
+  /*    encoding_id :: The encoding ID for `string'.                       */
+  /*                   See @TT_APPLE_ID_XXX, @TT_MAC_ID_XXX,               */
+  /*                   @TT_ISO_ID_XXX, @TT_MS_ID_XXX, and @TT_ADOBE_ID_XXX */
+  /*                   for possible values.                                */
+  /*                                                                       */
+  /*    language_id :: The language ID for `string'.                       */
+  /*                   See @TT_MAC_LANGID_XXX and @TT_MS_LANGID_XXX for    */
+  /*                   possible values.                                    */
+  /*                                                                       */
+  /*                   Registered OpenType values for `language_id' are    */
+  /*                   always smaller than 0x8000; values equal or larger  */
+  /*                   than 0x8000 usually indicate a language tag string  */
+  /*                   (introduced in OpenType version 1.6).  Use function */
+  /*                   @FT_Get_Sfnt_LangTag with `language_id' as its      */
+  /*                   argument to retrieve the associated language tag.   */
+  /*                                                                       */
+  /*    name_id     :: An identifier for `string'.                         */
+  /*                   See @TT_NAME_ID_XXX for possible values.            */
+  /*                                                                       */
+  /*    string      :: The `name' string.  Note that its format differs    */
+  /*                   depending on the (platform,encoding) pair, being    */
+  /*                   either a string of bytes (without a terminating     */
+  /*                   NULL byte) or containing UTF-16BE entities.         */
+  /*                                                                       */
+  /*    string_len  :: The length of `string' in bytes.                    */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    Please refer to the TrueType or OpenType specification for more    */
+  /*    details.                                                           */
+  /*                                                                       */
   typedef struct  FT_SfntName_
   {
     FT_UShort  platform_id;
@@ -118,95 +116,83 @@ FT_BEGIN_HEADER
   } FT_SfntName;
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Get_Sfnt_Name_Count
-   *
-   * @description:
-   *   Retrieve the number of name strings in the SFNT 'name' table.
-   *
-   * @input:
-   *   face ::
-   *     A handle to the source face.
-   *
-   * @return:
-   *   The number of strings in the 'name' table.
-   *
-   * @note:
-   *   This function always returns an error if the config macro
-   *   `TT_CONFIG_OPTION_SFNT_NAMES` is not defined in `ftoption.h`.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Get_Sfnt_Name_Count                                             */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Retrieve the number of name strings in the SFNT `name' table.      */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face :: A handle to the source face.                               */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    The number of strings in the `name' table.                         */
+  /*                                                                       */
   FT_EXPORT( FT_UInt )
   FT_Get_Sfnt_Name_Count( FT_Face  face );
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Get_Sfnt_Name
-   *
-   * @description:
-   *   Retrieve a string of the SFNT 'name' table for a given index.
-   *
-   * @input:
-   *   face ::
-   *     A handle to the source face.
-   *
-   *   idx ::
-   *     The index of the 'name' string.
-   *
-   * @output:
-   *   aname ::
-   *     The indexed @FT_SfntName structure.
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   *
-   * @note:
-   *   The `string` array returned in the `aname` structure is not
-   *   null-terminated.  Note that you don't have to deallocate `string` by
-   *   yourself; FreeType takes care of it if you call @FT_Done_Face.
-   *
-   *   Use @FT_Get_Sfnt_Name_Count to get the total number of available
-   *   'name' table entries, then do a loop until you get the right platform,
-   *   encoding, and name ID.
-   *
-   *   'name' table format~1 entries can use language tags also, see
-   *   @FT_Get_Sfnt_LangTag.
-   *
-   *   This function always returns an error if the config macro
-   *   `TT_CONFIG_OPTION_SFNT_NAMES` is not defined in `ftoption.h`.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Get_Sfnt_Name                                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Retrieve a string of the SFNT `name' table for a given index.      */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face  :: A handle to the source face.                              */
+  /*                                                                       */
+  /*    idx   :: The index of the `name' string.                           */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    aname :: The indexed @FT_SfntName structure.                       */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0~means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The `string' array returned in the `aname' structure is not        */
+  /*    null-terminated.  Note that you don't have to deallocate `string'  */
+  /*    by yourself; FreeType takes care of it if you call @FT_Done_Face.  */
+  /*                                                                       */
+  /*    Use @FT_Get_Sfnt_Name_Count to get the total number of available   */
+  /*    `name' table entries, then do a loop until you get the right       */
+  /*    platform, encoding, and name ID.                                   */
+  /*                                                                       */
+  /*    `name' table format~1 entries can use language tags also, see      */
+  /*    @FT_Get_Sfnt_LangTag.                                              */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_Get_Sfnt_Name( FT_Face       face,
                     FT_UInt       idx,
                     FT_SfntName  *aname );
 
 
-  /**************************************************************************
-   *
-   * @struct:
-   *   FT_SfntLangTag
-   *
-   * @description:
-   *   A structure to model a language tag entry from an SFNT 'name' table.
-   *
-   * @fields:
-   *   string ::
-   *     The language tag string, encoded in UTF-16BE (without trailing
-   *     `NULL` bytes).
-   *
-   *   string_len ::
-   *     The length of `string` in **bytes**.
-   *
-   * @note:
-   *   Please refer to the TrueType or OpenType specification for more
-   *   details.
-   *
-   * @since:
-   *   2.8
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_SfntLangTag                                                     */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure to model a language tag entry from an SFNT `name'      */
+  /*    table.                                                             */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    string      :: The language tag string, encoded in UTF-16BE        */
+  /*                   (without trailing NULL bytes).                      */
+  /*                                                                       */
+  /*    string_len  :: The length of `string' in *bytes*.                  */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    Please refer to the TrueType or OpenType specification for more    */
+  /*    details.                                                           */
+  /*                                                                       */
+  /* <Since>                                                               */
+  /*    2.8                                                                */
+  /*                                                                       */
   typedef struct  FT_SfntLangTag_
   {
     FT_Byte*  string;      /* this string is *not* null-terminated! */
@@ -215,47 +201,41 @@ FT_BEGIN_HEADER
   } FT_SfntLangTag;
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Get_Sfnt_LangTag
-   *
-   * @description:
-   *   Retrieve the language tag associated with a language ID of an SFNT
-   *   'name' table entry.
-   *
-   * @input:
-   *   face ::
-   *     A handle to the source face.
-   *
-   *   langID ::
-   *     The language ID, as returned by @FT_Get_Sfnt_Name.  This is always a
-   *     value larger than 0x8000.
-   *
-   * @output:
-   *   alangTag ::
-   *     The language tag associated with the 'name' table entry's language
-   *     ID.
-   *
-   * @return:
-   *   FreeType error code.  0~means success.
-   *
-   * @note:
-   *   The `string` array returned in the `alangTag` structure is not
-   *   null-terminated.  Note that you don't have to deallocate `string` by
-   *   yourself; FreeType takes care of it if you call @FT_Done_Face.
-   *
-   *   Only 'name' table format~1 supports language tags.  For format~0
-   *   tables, this function always returns FT_Err_Invalid_Table.  For
-   *   invalid format~1 language ID values, FT_Err_Invalid_Argument is
-   *   returned.
-   *
-   *   This function always returns an error if the config macro
-   *   `TT_CONFIG_OPTION_SFNT_NAMES` is not defined in `ftoption.h`.
-   *
-   * @since:
-   *   2.8
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Get_Sfnt_LangTag                                                */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Retrieve the language tag associated with a language ID of an SFNT */
+  /*    `name' table entry.                                                */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face     :: A handle to the source face.                           */
+  /*                                                                       */
+  /*    langID   :: The language ID, as returned by @FT_Get_Sfnt_Name.     */
+  /*                This is always a value larger than 0x8000.             */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    alangTag :: The language tag associated with the `name' table      */
+  /*                entry's language ID.                                   */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0~means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The `string' array returned in the `alangTag' structure is not     */
+  /*    null-terminated.  Note that you don't have to deallocate `string'  */
+  /*    by yourself; FreeType takes care of it if you call @FT_Done_Face.  */
+  /*                                                                       */
+  /*    Only `name' table format~1 supports language tags.  For format~0   */
+  /*    tables, this function always returns FT_Err_Invalid_Table.  For    */
+  /*    invalid format~1 language ID values, FT_Err_Invalid_Argument is    */
+  /*    returned.                                                          */
+  /*                                                                       */
+  /* <Since>                                                               */
+  /*    2.8                                                                */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_Get_Sfnt_LangTag( FT_Face          face,
                        FT_UInt          langID,

+ 222 - 209
thirdparty/freetype/include/freetype/ftstroke.h

@@ -1,19 +1,19 @@
-/****************************************************************************
- *
- * ftstroke.h
- *
- *   FreeType path stroker (specification).
- *
- * Copyright (C) 2002-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  ftstroke.h                                                             */
+/*                                                                         */
+/*    FreeType path stroker (specification).                               */
+/*                                                                         */
+/*  Copyright 2002-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 FTSTROKE_H_
@@ -27,113 +27,116 @@
 FT_BEGIN_HEADER
 
 
-  /**************************************************************************
-   *
-   * @section:
-   *    glyph_stroker
-   *
-   * @title:
-   *    Glyph Stroker
-   *
-   * @abstract:
-   *    Generating bordered and stroked glyphs.
-   *
-   * @description:
-   *    This component generates stroked outlines of a given vectorial glyph.
-   *    It also allows you to retrieve the 'outside' and/or the 'inside'
-   *    borders of the stroke.
-   *
-   *    This can be useful to generate 'bordered' glyph, i.e., glyphs
-   *    displayed with a coloured (and anti-aliased) border around their
-   *    shape.
-   *
-   * @order:
-   *    FT_Stroker
-   *
-   *    FT_Stroker_LineJoin
-   *    FT_Stroker_LineCap
-   *    FT_StrokerBorder
-   *
-   *    FT_Outline_GetInsideBorder
-   *    FT_Outline_GetOutsideBorder
-   *
-   *    FT_Glyph_Stroke
-   *    FT_Glyph_StrokeBorder
-   *
-   *    FT_Stroker_New
-   *    FT_Stroker_Set
-   *    FT_Stroker_Rewind
-   *    FT_Stroker_ParseOutline
-   *    FT_Stroker_Done
-   *
-   *    FT_Stroker_BeginSubPath
-   *    FT_Stroker_EndSubPath
-   *
-   *    FT_Stroker_LineTo
-   *    FT_Stroker_ConicTo
-   *    FT_Stroker_CubicTo
-   *
-   *    FT_Stroker_GetBorderCounts
-   *    FT_Stroker_ExportBorder
-   *    FT_Stroker_GetCounts
-   *    FT_Stroker_Export
-   *
-   */
-
-
-  /**************************************************************************
-   *
-   * @type:
-   *   FT_Stroker
-   *
-   * @description:
-   *   Opaque handle to a path stroker object.
-   */
+ /************************************************************************
+  *
+  * @section:
+  *    glyph_stroker
+  *
+  * @title:
+  *    Glyph Stroker
+  *
+  * @abstract:
+  *    Generating bordered and stroked glyphs.
+  *
+  * @description:
+  *    This component generates stroked outlines of a given vectorial
+  *    glyph.  It also allows you to retrieve the `outside' and/or the
+  *    `inside' borders of the stroke.
+  *
+  *    This can be useful to generate `bordered' glyph, i.e., glyphs
+  *    displayed with a coloured (and anti-aliased) border around their
+  *    shape.
+  *
+  * @order:
+  *    FT_Stroker
+  *
+  *    FT_Stroker_LineJoin
+  *    FT_Stroker_LineCap
+  *    FT_StrokerBorder
+  *
+  *    FT_Outline_GetInsideBorder
+  *    FT_Outline_GetOutsideBorder
+  *
+  *    FT_Glyph_Stroke
+  *    FT_Glyph_StrokeBorder
+  *
+  *    FT_Stroker_New
+  *    FT_Stroker_Set
+  *    FT_Stroker_Rewind
+  *    FT_Stroker_ParseOutline
+  *    FT_Stroker_Done
+  *
+  *    FT_Stroker_BeginSubPath
+  *    FT_Stroker_EndSubPath
+  *
+  *    FT_Stroker_LineTo
+  *    FT_Stroker_ConicTo
+  *    FT_Stroker_CubicTo
+  *
+  *    FT_Stroker_GetBorderCounts
+  *    FT_Stroker_ExportBorder
+  *    FT_Stroker_GetCounts
+  *    FT_Stroker_Export
+  *
+  */
+
+
+ /**************************************************************
+  *
+  * @type:
+  *   FT_Stroker
+  *
+  * @description:
+  *   Opaque handle to a path stroker object.
+  */
   typedef struct FT_StrokerRec_*  FT_Stroker;
 
 
-  /**************************************************************************
+  /**************************************************************
    *
    * @enum:
    *   FT_Stroker_LineJoin
    *
    * @description:
-   *   These values determine how two joining lines are rendered in a
-   *   stroker.
+   *   These values determine how two joining lines are rendered
+   *   in a stroker.
    *
    * @values:
    *   FT_STROKER_LINEJOIN_ROUND ::
-   *     Used to render rounded line joins.  Circular arcs are used to join
-   *     two lines smoothly.
+   *     Used to render rounded line joins.  Circular arcs are used
+   *     to join two lines smoothly.
    *
    *   FT_STROKER_LINEJOIN_BEVEL ::
-   *     Used to render beveled line joins.  The outer corner of the joined
-   *     lines is filled by enclosing the triangular region of the corner
-   *     with a straight line between the outer corners of each stroke.
+   *     Used to render beveled line joins.  The outer corner of
+   *     the joined lines is filled by enclosing the triangular
+   *     region of the corner with a straight line between the
+   *     outer corners of each stroke.
    *
    *   FT_STROKER_LINEJOIN_MITER_FIXED ::
-   *     Used to render mitered line joins, with fixed bevels if the miter
-   *     limit is exceeded.  The outer edges of the strokes for the two
-   *     segments are extended until they meet at an angle.  If the segments
-   *     meet at too sharp an angle (such that the miter would extend from
-   *     the intersection of the segments a distance greater than the product
-   *     of the miter limit value and the border radius), then a bevel join
-   *     (see above) is used instead.  This prevents long spikes being
-   *     created.  `FT_STROKER_LINEJOIN_MITER_FIXED` generates a miter line
-   *     join as used in PostScript and PDF.
+   *     Used to render mitered line joins, with fixed bevels if the
+   *     miter limit is exceeded.  The outer edges of the strokes
+   *     for the two segments are extended until they meet at an
+   *     angle.  If the segments meet at too sharp an angle (such
+   *     that the miter would extend from the intersection of the
+   *     segments a distance greater than the product of the miter
+   *     limit value and the border radius), then a bevel join (see
+   *     above) is used instead.  This prevents long spikes being
+   *     created.  FT_STROKER_LINEJOIN_MITER_FIXED generates a miter
+   *     line join as used in PostScript and PDF.
    *
    *   FT_STROKER_LINEJOIN_MITER_VARIABLE ::
    *   FT_STROKER_LINEJOIN_MITER ::
-   *     Used to render mitered line joins, with variable bevels if the miter
-   *     limit is exceeded.  The intersection of the strokes is clipped at a
-   *     line perpendicular to the bisector of the angle between the strokes,
-   *     at the distance from the intersection of the segments equal to the
-   *     product of the miter limit value and the border radius.  This
-   *     prevents long spikes being created. 
-   *     `FT_STROKER_LINEJOIN_MITER_VARIABLE` generates a mitered line join
-   *     as used in XPS.  `FT_STROKER_LINEJOIN_MITER` is an alias for
-   *     `FT_STROKER_LINEJOIN_MITER_VARIABLE`, retained for backward
-   *     compatibility.
+   *     Used to render mitered line joins, with variable bevels if
+   *     the miter limit is exceeded.  The intersection of the
+   *     strokes is clipped at a line perpendicular to the bisector
+   *     of the angle between the strokes, at the distance from the
+   *     intersection of the segments equal to the product of the
+   *     miter limit value and the border radius.  This prevents
+   *     long spikes being created.
+   *     FT_STROKER_LINEJOIN_MITER_VARIABLE generates a mitered line
+   *     join as used in XPS.  FT_STROKER_LINEJOIN_MITER is an alias
+   *     for FT_STROKER_LINEJOIN_MITER_VARIABLE, retained for
+   *     backward compatibility.
    */
   typedef enum  FT_Stroker_LineJoin_
   {
@@ -146,25 +149,27 @@ FT_BEGIN_HEADER
   } FT_Stroker_LineJoin;
 
 
-  /**************************************************************************
+  /**************************************************************
    *
    * @enum:
    *   FT_Stroker_LineCap
    *
    * @description:
-   *   These values determine how the end of opened sub-paths are rendered in
-   *   a stroke.
+   *   These values determine how the end of opened sub-paths are
+   *   rendered in a stroke.
    *
    * @values:
    *   FT_STROKER_LINECAP_BUTT ::
-   *     The end of lines is rendered as a full stop on the last point
-   *     itself.
+   *     The end of lines is rendered as a full stop on the last
+   *     point itself.
    *
    *   FT_STROKER_LINECAP_ROUND ::
-   *     The end of lines is rendered as a half-circle around the last point.
+   *     The end of lines is rendered as a half-circle around the
+   *     last point.
    *
    *   FT_STROKER_LINECAP_SQUARE ::
-   *     The end of lines is rendered as a square around the last point.
+   *     The end of lines is rendered as a square around the
+   *     last point.
    */
   typedef enum  FT_Stroker_LineCap_
   {
@@ -175,14 +180,14 @@ FT_BEGIN_HEADER
   } FT_Stroker_LineCap;
 
 
-  /**************************************************************************
+  /**************************************************************
    *
    * @enum:
    *   FT_StrokerBorder
    *
    * @description:
-   *   These values are used to select a given stroke border in
-   *   @FT_Stroker_GetBorderCounts and @FT_Stroker_ExportBorder.
+   *   These values are used to select a given stroke border
+   *   in @FT_Stroker_GetBorderCounts and @FT_Stroker_ExportBorder.
    *
    * @values:
    *   FT_STROKER_BORDER_LEFT ::
@@ -192,9 +197,9 @@ FT_BEGIN_HEADER
    *     Select the right border, relative to the drawing direction.
    *
    * @note:
-   *   Applications are generally interested in the 'inside' and 'outside'
+   *   Applications are generally interested in the `inside' and `outside'
    *   borders.  However, there is no direct mapping between these and the
-   *   'left' and 'right' ones, since this really depends on the glyph's
+   *   `left' and `right' ones, since this really depends on the glyph's
    *   drawing orientation, which varies between font formats.
    *
    *   You can however use @FT_Outline_GetInsideBorder and
@@ -208,14 +213,14 @@ FT_BEGIN_HEADER
   } FT_StrokerBorder;
 
 
-  /**************************************************************************
+  /**************************************************************
    *
    * @function:
    *   FT_Outline_GetInsideBorder
    *
    * @description:
-   *   Retrieve the @FT_StrokerBorder value corresponding to the 'inside'
-   *   borders of a given outline.
+   *   Retrieve the @FT_StrokerBorder value corresponding to the
+   *   `inside' borders of a given outline.
    *
    * @input:
    *   outline ::
@@ -229,14 +234,14 @@ FT_BEGIN_HEADER
   FT_Outline_GetInsideBorder( FT_Outline*  outline );
 
 
-  /**************************************************************************
+  /**************************************************************
    *
    * @function:
    *   FT_Outline_GetOutsideBorder
    *
    * @description:
-   *   Retrieve the @FT_StrokerBorder value corresponding to the 'outside'
-   *   borders of a given outline.
+   *   Retrieve the @FT_StrokerBorder value corresponding to the
+   *   `outside' borders of a given outline.
    *
    * @input:
    *   outline ::
@@ -250,7 +255,7 @@ FT_BEGIN_HEADER
   FT_Outline_GetOutsideBorder( FT_Outline*  outline );
 
 
-  /**************************************************************************
+  /**************************************************************
    *
    * @function:
    *   FT_Stroker_New
@@ -264,7 +269,7 @@ FT_BEGIN_HEADER
    *
    * @output:
    *   astroker ::
-   *     A new stroker object handle.  `NULL` in case of error.
+   *     A new stroker object handle.  NULL in case of error.
    *
    * @return:
    *    FreeType error code.  0~means success.
@@ -274,7 +279,7 @@ FT_BEGIN_HEADER
                   FT_Stroker  *astroker );
 
 
-  /**************************************************************************
+  /**************************************************************
    *
    * @function:
    *   FT_Stroker_Set
@@ -296,12 +301,13 @@ FT_BEGIN_HEADER
    *     The line join style.
    *
    *   miter_limit ::
-   *     The miter limit for the `FT_STROKER_LINEJOIN_MITER_FIXED` and
-   *     `FT_STROKER_LINEJOIN_MITER_VARIABLE` line join styles, expressed as
-   *     16.16 fixed-point value.
+   *     The miter limit for the FT_STROKER_LINEJOIN_MITER_FIXED and
+   *     FT_STROKER_LINEJOIN_MITER_VARIABLE line join styles,
+   *     expressed as 16.16 fixed-point value.
    *
    * @note:
-   *   The radius is expressed in the same units as the outline coordinates.
+   *   The radius is expressed in the same units as the outline
+   *   coordinates.
    *
    *   This function calls @FT_Stroker_Rewind automatically.
    */
@@ -313,15 +319,16 @@ FT_BEGIN_HEADER
                   FT_Fixed             miter_limit );
 
 
-  /**************************************************************************
+  /**************************************************************
    *
    * @function:
    *   FT_Stroker_Rewind
    *
    * @description:
-   *   Reset a stroker object without changing its attributes.  You should
-   *   call this function before beginning a new series of calls to
-   *   @FT_Stroker_BeginSubPath or @FT_Stroker_EndSubPath.
+   *   Reset a stroker object without changing its attributes.
+   *   You should call this function before beginning a new
+   *   series of calls to @FT_Stroker_BeginSubPath or
+   *   @FT_Stroker_EndSubPath.
    *
    * @input:
    *   stroker ::
@@ -331,15 +338,15 @@ FT_BEGIN_HEADER
   FT_Stroker_Rewind( FT_Stroker  stroker );
 
 
-  /**************************************************************************
+  /**************************************************************
    *
    * @function:
    *   FT_Stroker_ParseOutline
    *
    * @description:
-   *   A convenience function used to parse a whole outline with the stroker.
-   *   The resulting outline(s) can be retrieved later by functions like
-   *   @FT_Stroker_GetCounts and @FT_Stroker_Export.
+   *   A convenience function used to parse a whole outline with
+   *   the stroker.  The resulting outline(s) can be retrieved
+   *   later by functions like @FT_Stroker_GetCounts and @FT_Stroker_Export.
    *
    * @input:
    *   stroker ::
@@ -349,18 +356,18 @@ FT_BEGIN_HEADER
    *     The source outline.
    *
    *   opened ::
-   *     A boolean.  If~1, the outline is treated as an open path instead of
-   *     a closed one.
+   *     A boolean.  If~1, the outline is treated as an open path instead
+   *     of a closed one.
    *
    * @return:
    *   FreeType error code.  0~means success.
    *
    * @note:
-   *   If `opened` is~0 (the default), the outline is treated as a closed
-   *   path, and the stroker generates two distinct 'border' outlines.
+   *   If `opened' is~0 (the default), the outline is treated as a closed
+   *   path, and the stroker generates two distinct `border' outlines.
    *
-   *   If `opened` is~1, the outline is processed as an open path, and the
-   *   stroker generates a single 'stroke' outline.
+   *   If `opened' is~1, the outline is processed as an open path, and the
+   *   stroker generates a single `stroke' outline.
    *
    *   This function calls @FT_Stroker_Rewind automatically.
    */
@@ -370,7 +377,7 @@ FT_BEGIN_HEADER
                            FT_Bool      opened );
 
 
-  /**************************************************************************
+  /**************************************************************
    *
    * @function:
    *   FT_Stroker_BeginSubPath
@@ -392,8 +399,8 @@ FT_BEGIN_HEADER
    *   FreeType error code.  0~means success.
    *
    * @note:
-   *   This function is useful when you need to stroke a path that is not
-   *   stored as an @FT_Outline object.
+   *   This function is useful when you need to stroke a path that is
+   *   not stored as an @FT_Outline object.
    */
   FT_EXPORT( FT_Error )
   FT_Stroker_BeginSubPath( FT_Stroker  stroker,
@@ -401,7 +408,7 @@ FT_BEGIN_HEADER
                            FT_Bool     open );
 
 
-  /**************************************************************************
+  /**************************************************************
    *
    * @function:
    *   FT_Stroker_EndSubPath
@@ -417,22 +424,22 @@ FT_BEGIN_HEADER
    *   FreeType error code.  0~means success.
    *
    * @note:
-   *   You should call this function after @FT_Stroker_BeginSubPath.  If the
-   *   subpath was not 'opened', this function 'draws' a single line segment
-   *   to the start position when needed.
+   *   You should call this function after @FT_Stroker_BeginSubPath.
+   *   If the subpath was not `opened', this function `draws' a
+   *   single line segment to the start position when needed.
    */
   FT_EXPORT( FT_Error )
   FT_Stroker_EndSubPath( FT_Stroker  stroker );
 
 
-  /**************************************************************************
+  /**************************************************************
    *
    * @function:
    *   FT_Stroker_LineTo
    *
    * @description:
-   *   'Draw' a single line segment in the stroker's current sub-path, from
-   *   the last position.
+   *   `Draw' a single line segment in the stroker's current sub-path,
+   *   from the last position.
    *
    * @input:
    *   stroker ::
@@ -453,13 +460,13 @@ FT_BEGIN_HEADER
                      FT_Vector*  to );
 
 
-  /**************************************************************************
+  /**************************************************************
    *
    * @function:
    *   FT_Stroker_ConicTo
    *
    * @description:
-   *   'Draw' a single quadratic Bezier in the stroker's current sub-path,
+   *   `Draw' a single quadratic Bezier in the stroker's current sub-path,
    *   from the last position.
    *
    * @input:
@@ -485,14 +492,14 @@ FT_BEGIN_HEADER
                       FT_Vector*  to );
 
 
-  /**************************************************************************
+  /**************************************************************
    *
    * @function:
    *   FT_Stroker_CubicTo
    *
    * @description:
-   *   'Draw' a single cubic Bezier in the stroker's current sub-path, from
-   *   the last position.
+   *   `Draw' a single cubic Bezier in the stroker's current sub-path,
+   *   from the last position.
    *
    * @input:
    *   stroker ::
@@ -521,16 +528,16 @@ FT_BEGIN_HEADER
                       FT_Vector*  to );
 
 
-  /**************************************************************************
+  /**************************************************************
    *
    * @function:
    *   FT_Stroker_GetBorderCounts
    *
    * @description:
-   *   Call this function once you have finished parsing your paths with the
-   *   stroker.  It returns the number of points and contours necessary to
-   *   export one of the 'border' or 'stroke' outlines generated by the
-   *   stroker.
+   *   Call this function once you have finished parsing your paths
+   *   with the stroker.  It returns the number of points and
+   *   contours necessary to export one of the `border' or `stroke'
+   *   outlines generated by the stroker.
    *
    * @input:
    *   stroker ::
@@ -550,15 +557,15 @@ FT_BEGIN_HEADER
    *   FreeType error code.  0~means success.
    *
    * @note:
-   *   When an outline, or a sub-path, is 'closed', the stroker generates two
-   *   independent 'border' outlines, named 'left' and 'right'.
+   *   When an outline, or a sub-path, is `closed', the stroker generates
+   *   two independent `border' outlines, named `left' and `right'.
    *
-   *   When the outline, or a sub-path, is 'opened', the stroker merges the
-   *   'border' outlines with caps.  The 'left' border receives all points,
-   *   while the 'right' border becomes empty.
+   *   When the outline, or a sub-path, is `opened', the stroker merges
+   *   the `border' outlines with caps.  The `left' border receives all
+   *   points, while the `right' border becomes empty.
    *
-   *   Use the function @FT_Stroker_GetCounts instead if you want to retrieve
-   *   the counts associated to both borders.
+   *   Use the function @FT_Stroker_GetCounts instead if you want to
+   *   retrieve the counts associated to both borders.
    */
   FT_EXPORT( FT_Error )
   FT_Stroker_GetBorderCounts( FT_Stroker        stroker,
@@ -567,17 +574,19 @@ FT_BEGIN_HEADER
                               FT_UInt          *anum_contours );
 
 
-  /**************************************************************************
+  /**************************************************************
    *
    * @function:
    *   FT_Stroker_ExportBorder
    *
    * @description:
-   *   Call this function after @FT_Stroker_GetBorderCounts to export the
-   *   corresponding border to your own @FT_Outline structure.
+   *   Call this function after @FT_Stroker_GetBorderCounts to
+   *   export the corresponding border to your own @FT_Outline
+   *   structure.
    *
-   *   Note that this function appends the border points and contours to your
-   *   outline, but does not try to resize its arrays.
+   *   Note that this function appends the border points and
+   *   contours to your outline, but does not try to resize its
+   *   arrays.
    *
    * @input:
    *   stroker ::
@@ -590,19 +599,19 @@ FT_BEGIN_HEADER
    *     The target outline handle.
    *
    * @note:
-   *   Always call this function after @FT_Stroker_GetBorderCounts to get
-   *   sure that there is enough room in your @FT_Outline object to receive
-   *   all new data.
+   *   Always call this function after @FT_Stroker_GetBorderCounts to
+   *   get sure that there is enough room in your @FT_Outline object to
+   *   receive all new data.
    *
-   *   When an outline, or a sub-path, is 'closed', the stroker generates two
-   *   independent 'border' outlines, named 'left' and 'right'.
+   *   When an outline, or a sub-path, is `closed', the stroker generates
+   *   two independent `border' outlines, named `left' and `right'.
    *
-   *   When the outline, or a sub-path, is 'opened', the stroker merges the
-   *   'border' outlines with caps.  The 'left' border receives all points,
-   *   while the 'right' border becomes empty.
+   *   When the outline, or a sub-path, is `opened', the stroker merges
+   *   the `border' outlines with caps.  The `left' border receives all
+   *   points, while the `right' border becomes empty.
    *
-   *   Use the function @FT_Stroker_Export instead if you want to retrieve
-   *   all borders at once.
+   *   Use the function @FT_Stroker_Export instead if you want to
+   *   retrieve all borders at once.
    */
   FT_EXPORT( void )
   FT_Stroker_ExportBorder( FT_Stroker        stroker,
@@ -610,15 +619,16 @@ FT_BEGIN_HEADER
                            FT_Outline*       outline );
 
 
-  /**************************************************************************
+  /**************************************************************
    *
    * @function:
    *   FT_Stroker_GetCounts
    *
    * @description:
-   *   Call this function once you have finished parsing your paths with the
-   *   stroker.  It returns the number of points and contours necessary to
-   *   export all points/borders from the stroked outline/path.
+   *   Call this function once you have finished parsing your paths
+   *   with the stroker.  It returns the number of points and
+   *   contours necessary to export all points/borders from the stroked
+   *   outline/path.
    *
    * @input:
    *   stroker ::
@@ -640,17 +650,18 @@ FT_BEGIN_HEADER
                         FT_UInt    *anum_contours );
 
 
-  /**************************************************************************
+  /**************************************************************
    *
    * @function:
    *   FT_Stroker_Export
    *
    * @description:
-   *   Call this function after @FT_Stroker_GetBorderCounts to export all
-   *   borders to your own @FT_Outline structure.
+   *   Call this function after @FT_Stroker_GetBorderCounts to
+   *   export all borders to your own @FT_Outline structure.
    *
-   *   Note that this function appends the border points and contours to your
-   *   outline, but does not try to resize its arrays.
+   *   Note that this function appends the border points and
+   *   contours to your outline, but does not try to resize its
+   *   arrays.
    *
    * @input:
    *   stroker ::
@@ -664,7 +675,7 @@ FT_BEGIN_HEADER
                      FT_Outline*  outline );
 
 
-  /**************************************************************************
+  /**************************************************************
    *
    * @function:
    *   FT_Stroker_Done
@@ -674,13 +685,13 @@ FT_BEGIN_HEADER
    *
    * @input:
    *   stroker ::
-   *     A stroker handle.  Can be `NULL`.
+   *     A stroker handle.  Can be NULL.
    */
   FT_EXPORT( void )
   FT_Stroker_Done( FT_Stroker  stroker );
 
 
-  /**************************************************************************
+  /**************************************************************
    *
    * @function:
    *   FT_Glyph_Stroke
@@ -697,7 +708,8 @@ FT_BEGIN_HEADER
    *     A stroker handle.
    *
    *   destroy ::
-   *     A Boolean.  If~1, the source glyph object is destroyed on success.
+   *     A Boolean.  If~1, the source glyph object is destroyed
+   *     on success.
    *
    * @return:
    *    FreeType error code.  0~means success.
@@ -707,8 +719,8 @@ FT_BEGIN_HEADER
    *
    *   Adding stroke may yield a significantly wider and taller glyph
    *   depending on how large of a radius was used to stroke the glyph.  You
-   *   may need to manually adjust horizontal and vertical advance amounts to
-   *   account for this added size.
+   *   may need to manually adjust horizontal and vertical advance amounts
+   *   to account for this added size.
    */
   FT_EXPORT( FT_Error )
   FT_Glyph_Stroke( FT_Glyph    *pglyph,
@@ -716,14 +728,14 @@ FT_BEGIN_HEADER
                    FT_Bool      destroy );
 
 
-  /**************************************************************************
+  /**************************************************************
    *
    * @function:
    *   FT_Glyph_StrokeBorder
    *
    * @description:
-   *   Stroke a given outline glyph object with a given stroker, but only
-   *   return either its inside or outside border.
+   *   Stroke a given outline glyph object with a given stroker, but
+   *   only return either its inside or outside border.
    *
    * @inout:
    *   pglyph ::
@@ -734,11 +746,12 @@ FT_BEGIN_HEADER
    *     A stroker handle.
    *
    *   inside ::
-   *     A Boolean.  If~1, return the inside border, otherwise the outside
-   *     border.
+   *     A Boolean.  If~1, return the inside border, otherwise
+   *     the outside border.
    *
    *   destroy ::
-   *     A Boolean.  If~1, the source glyph object is destroyed on success.
+   *     A Boolean.  If~1, the source glyph object is destroyed
+   *     on success.
    *
    * @return:
    *    FreeType error code.  0~means success.
@@ -748,8 +761,8 @@ FT_BEGIN_HEADER
    *
    *   Adding stroke may yield a significantly wider and taller glyph
    *   depending on how large of a radius was used to stroke the glyph.  You
-   *   may need to manually adjust horizontal and vertical advance amounts to
-   *   account for this added size.
+   *   may need to manually adjust horizontal and vertical advance amounts
+   *   to account for this added size.
    */
   FT_EXPORT( FT_Error )
   FT_Glyph_StrokeBorder( FT_Glyph    *pglyph,

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

@@ -1,20 +1,20 @@
-/****************************************************************************
- *
- * ftsynth.h
- *
- *   FreeType synthesizing code for emboldening and slanting
- *   (specification).
- *
- * Copyright (C) 2000-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  ftsynth.h                                                              */
+/*                                                                         */
+/*    FreeType synthesizing code for emboldening and slanting              */
+/*    (specification).                                                     */
+/*                                                                         */
+/*  Copyright 2000-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.                                        */
+/*                                                                         */
+/***************************************************************************/
 
 
   /*************************************************************************/
@@ -35,7 +35,7 @@
 
 
   /* Main reason for not lifting the functions in this module to a  */
-  /* 'standard' API is that the used parameters for emboldening and */
+  /* `standard' API is that the used parameters for emboldening and */
   /* slanting are not configurable.  Consider the functions as a    */
   /* code resource that should be copied into the application and   */
   /* adapted to the particular needs.                               */
@@ -57,7 +57,7 @@
 
 FT_BEGIN_HEADER
 
-  /* Embolden a glyph by a 'reasonable' value (which is highly a matter of */
+  /* Embolden a glyph by a `reasonable' value (which is highly a matter of */
   /* taste).  This function is actually a convenience function, providing  */
   /* a wrapper for @FT_Outline_Embolden and @FT_Bitmap_Embolden.           */
   /*                                                                       */

+ 68 - 66
thirdparty/freetype/include/freetype/ftsystem.h

@@ -1,19 +1,19 @@
-/****************************************************************************
- *
- * ftsystem.h
- *
- *   FreeType low-level system interface definition (specification).
- *
- * Copyright (C) 1996-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  ftsystem.h                                                             */
+/*                                                                         */
+/*    FreeType low-level system interface definition (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 FTSYSTEM_H_
@@ -26,33 +26,34 @@
 FT_BEGIN_HEADER
 
 
-  /**************************************************************************
-   *
-   * @section:
-   *  system_interface
-   *
-   * @title:
-   *  System Interface
-   *
-   * @abstract:
-   *  How FreeType manages memory and i/o.
-   *
-   * @description:
-   *  This section contains various definitions related to memory management
-   *  and i/o access.  You need to understand this information if you want to
-   *  use a custom memory manager or you own i/o streams.
-   *
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*   system_interface                                                    */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*   System Interface                                                    */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*   How FreeType manages memory and i/o.                                */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*   This section contains various definitions related to memory         */
+  /*   management and i/o access.  You need to understand this             */
+  /*   information if you want to use a custom memory manager or you own   */
+  /*   i/o streams.                                                        */
+  /*                                                                       */
+  /*************************************************************************/
 
 
-  /**************************************************************************
-   *
-   *                 M E M O R Y   M A N A G E M E N T
-   *
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /*                  M E M O R Y   M A N A G E M E N T                    */
+  /*                                                                       */
+  /*************************************************************************/
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @type:
    *   FT_Memory
@@ -65,13 +66,13 @@ FT_BEGIN_HEADER
   typedef struct FT_MemoryRec_*  FT_Memory;
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @functype:
    *   FT_Alloc_Func
    *
    * @description:
-   *   A function used to allocate `size` bytes from `memory`.
+   *   A function used to allocate `size' bytes from `memory'.
    *
    * @input:
    *   memory ::
@@ -89,7 +90,7 @@ FT_BEGIN_HEADER
                     long       size );
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @functype:
    *   FT_Free_Func
@@ -110,7 +111,7 @@ FT_BEGIN_HEADER
                    void*      block );
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @functype:
    *   FT_Realloc_Func
@@ -145,7 +146,7 @@ FT_BEGIN_HEADER
                       void*      block );
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @struct:
    *   FT_MemoryRec
@@ -176,14 +177,14 @@ FT_BEGIN_HEADER
   };
 
 
-  /**************************************************************************
-   *
-   *                      I / O   M A N A G E M E N T
-   *
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /*                       I / O   M A N A G E M E N T                     */
+  /*                                                                       */
+  /*************************************************************************/
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @type:
    *   FT_Stream
@@ -192,21 +193,21 @@ FT_BEGIN_HEADER
    *   A handle to an input stream.
    *
    * @also:
-   *   See @FT_StreamRec for the publicly accessible fields of a given stream
-   *   object.
+   *   See @FT_StreamRec for the publicly accessible fields of a given
+   *   stream object.
    *
    */
   typedef struct FT_StreamRec_*  FT_Stream;
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @struct:
    *   FT_StreamDesc
    *
    * @description:
    *   A union type used to store either a long or a pointer.  This is used
-   *   to store a file descriptor or a `FILE*` in an input stream.
+   *   to store a file descriptor or a `FILE*' in an input stream.
    *
    */
   typedef union  FT_StreamDesc_
@@ -217,7 +218,7 @@ FT_BEGIN_HEADER
   } FT_StreamDesc;
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @functype:
    *   FT_Stream_IoFunc
@@ -242,8 +243,9 @@ FT_BEGIN_HEADER
    *   The number of bytes effectively read by the stream.
    *
    * @note:
-   *   This function might be called to perform a seek or skip operation with
-   *   a `count` of~0.  A non-zero return value then indicates an error.
+   *   This function might be called to perform a seek or skip operation
+   *   with a `count' of~0.  A non-zero return value then indicates an
+   *   error.
    *
    */
   typedef unsigned long
@@ -253,7 +255,7 @@ FT_BEGIN_HEADER
                        unsigned long   count );
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @functype:
    *   FT_Stream_CloseFunc
@@ -263,14 +265,14 @@ FT_BEGIN_HEADER
    *
    * @input:
    *  stream ::
-   *    A handle to the target stream.
+   *     A handle to the target stream.
    *
    */
   typedef void
   (*FT_Stream_CloseFunc)( FT_Stream  stream );
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @struct:
    *   FT_StreamRec
@@ -281,7 +283,7 @@ FT_BEGIN_HEADER
    * @input:
    *   base ::
    *     For memory-based streams, this is the address of the first stream
-   *     byte in memory.  This field should always be set to `NULL` for
+   *     byte in memory.  This field should always be set to NULL for
    *     disk-based streams.
    *
    *   size ::
@@ -297,7 +299,7 @@ FT_BEGIN_HEADER
    *
    *   descriptor ::
    *     This field is a union that can hold an integer or a pointer.  It is
-   *     used by stream implementations to store file descriptors or `FILE*`
+   *     used by stream implementations to store file descriptors or `FILE*'
    *     pointers.
    *
    *   pathname ::
@@ -312,13 +314,13 @@ FT_BEGIN_HEADER
    *     The stream's close function.
    *
    *   memory ::
-   *     The memory manager to use to preload frames.  This is set internally
-   *     by FreeType and shouldn't be touched by stream implementations.
+   *     The memory manager to use to preload frames.  This is set
+   *     internally by FreeType and shouldn't be touched by stream
+   *     implementations.
    *
    *   cursor ::
    *     This field is set and used internally by FreeType when parsing
-   *     frames.  In particular, the `FT_GET_XXX` macros use this instead of
-   *     the `pos` field.
+   *     frames.
    *
    *   limit ::
    *     This field is set and used internally by FreeType when parsing

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

@@ -1,19 +1,19 @@
-/****************************************************************************
- *
- * fttrigon.h
- *
- *   FreeType trigonometric functions (specification).
- *
- * Copyright (C) 2001-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  fttrigon.h                                                             */
+/*                                                                         */
+/*    FreeType trigonometric functions (specification).                    */
+/*                                                                         */
+/*  Copyright 2001-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 FTTRIGON_H_
@@ -31,15 +31,15 @@
 FT_BEGIN_HEADER
 
 
-  /**************************************************************************
-   *
-   * @section:
-   *  computations
-   *
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*   computations                                                        */
+  /*                                                                       */
+  /*************************************************************************/
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @type:
    *   FT_Angle
@@ -52,7 +52,7 @@ FT_BEGIN_HEADER
   typedef FT_Fixed  FT_Angle;
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_ANGLE_PI
@@ -64,7 +64,7 @@ FT_BEGIN_HEADER
 #define FT_ANGLE_PI  ( 180L << 16 )
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_ANGLE_2PI
@@ -76,7 +76,7 @@ FT_BEGIN_HEADER
 #define FT_ANGLE_2PI  ( FT_ANGLE_PI * 2 )
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_ANGLE_PI2
@@ -88,7 +88,7 @@ FT_BEGIN_HEADER
 #define FT_ANGLE_PI2  ( FT_ANGLE_PI / 2 )
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @macro:
    *   FT_ANGLE_PI4
@@ -100,7 +100,7 @@ FT_BEGIN_HEADER
 #define FT_ANGLE_PI4  ( FT_ANGLE_PI / 4 )
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @function:
    *   FT_Sin
@@ -124,7 +124,7 @@ FT_BEGIN_HEADER
   FT_Sin( FT_Angle  angle );
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @function:
    *   FT_Cos
@@ -148,7 +148,7 @@ FT_BEGIN_HEADER
   FT_Cos( FT_Angle  angle );
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @function:
    *   FT_Tan
@@ -168,14 +168,14 @@ FT_BEGIN_HEADER
   FT_Tan( FT_Angle  angle );
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @function:
    *   FT_Atan2
    *
    * @description:
-   *   Return the arc-tangent corresponding to a given vector (x,y) in the 2d
-   *   plane.
+   *   Return the arc-tangent corresponding to a given vector (x,y) in
+   *   the 2d plane.
    *
    * @input:
    *   x ::
@@ -193,7 +193,7 @@ FT_BEGIN_HEADER
             FT_Fixed  y );
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @function:
    *   FT_Angle_Diff
@@ -210,7 +210,7 @@ FT_BEGIN_HEADER
    *     Second angle.
    *
    * @return:
-   *   Constrained value of `angle2-angle1`.
+   *   Constrained value of `value2-value1'.
    *
    */
   FT_EXPORT( FT_Angle )
@@ -218,15 +218,15 @@ FT_BEGIN_HEADER
                  FT_Angle  angle2 );
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @function:
    *   FT_Vector_Unit
    *
    * @description:
    *   Return the unit vector corresponding to a given angle.  After the
-   *   call, the value of `vec.x` will be `cos(angle)`, and the value of
-   *   `vec.y` will be `sin(angle)`.
+   *   call, the value of `vec.x' will be `cos(angle)', and the value of
+   *   `vec.y' will be `sin(angle)'.
    *
    *   This function is useful to retrieve both the sinus and cosinus of a
    *   given angle quickly.
@@ -245,7 +245,7 @@ FT_BEGIN_HEADER
                   FT_Angle    angle );
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @function:
    *   FT_Vector_Rotate
@@ -267,7 +267,7 @@ FT_BEGIN_HEADER
                     FT_Angle    angle );
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @function:
    *   FT_Vector_Length
@@ -288,7 +288,7 @@ FT_BEGIN_HEADER
   FT_Vector_Length( FT_Vector*  vec );
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @function:
    *   FT_Vector_Polarize
@@ -314,7 +314,7 @@ FT_BEGIN_HEADER
                       FT_Angle   *angle );
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @function:
    *   FT_Vector_From_Polar

+ 328 - 0
thirdparty/freetype/include/freetype/ftttdrv.h

@@ -0,0 +1,328 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftttdrv.h                                                              */
+/*                                                                         */
+/*    FreeType API for controlling the TrueType driver                     */
+/*    (specification only).                                                */
+/*                                                                         */
+/*  Copyright 2013-2017 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 FTTTDRV_H_
+#define FTTTDRV_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:
+   *   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'.
+   *
+   *   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
+   *   http://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.
+   *
+   */
+
+
+  /**************************************************************************
+   *
+   * @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
+   *   `http://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').
+   */
+
+
+  /**************************************************************************
+   *
+   * @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
+
+ /* */
+
+
+FT_END_HEADER
+
+
+#endif /* FTTTDRV_H_ */
+
+
+/* END */

+ 419 - 432
thirdparty/freetype/include/freetype/fttypes.h

@@ -1,19 +1,19 @@
-/****************************************************************************
- *
- * fttypes.h
- *
- *   FreeType simple types definitions (specification only).
- *
- * Copyright (C) 1996-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  fttypes.h                                                              */
+/*                                                                         */
+/*    FreeType simple types definitions (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 FTTYPES_H_
@@ -31,327 +31,326 @@
 FT_BEGIN_HEADER
 
 
-  /**************************************************************************
-   *
-   * @section:
-   *   basic_types
-   *
-   * @title:
-   *   Basic Data Types
-   *
-   * @abstract:
-   *   The basic data types defined by the library.
-   *
-   * @description:
-   *   This section contains the basic data types defined by FreeType~2,
-   *   ranging from simple scalar types to bitmap descriptors.  More
-   *   font-specific structures are defined in a different section.
-   *
-   * @order:
-   *   FT_Byte
-   *   FT_Bytes
-   *   FT_Char
-   *   FT_Int
-   *   FT_UInt
-   *   FT_Int16
-   *   FT_UInt16
-   *   FT_Int32
-   *   FT_UInt32
-   *   FT_Int64
-   *   FT_UInt64
-   *   FT_Short
-   *   FT_UShort
-   *   FT_Long
-   *   FT_ULong
-   *   FT_Bool
-   *   FT_Offset
-   *   FT_PtrDist
-   *   FT_String
-   *   FT_Tag
-   *   FT_Error
-   *   FT_Fixed
-   *   FT_Pointer
-   *   FT_Pos
-   *   FT_Vector
-   *   FT_BBox
-   *   FT_Matrix
-   *   FT_FWord
-   *   FT_UFWord
-   *   FT_F2Dot14
-   *   FT_UnitVector
-   *   FT_F26Dot6
-   *   FT_Data
-   *
-   *   FT_MAKE_TAG
-   *
-   *   FT_Generic
-   *   FT_Generic_Finalizer
-   *
-   *   FT_Bitmap
-   *   FT_Pixel_Mode
-   *   FT_Palette_Mode
-   *   FT_Glyph_Format
-   *   FT_IMAGE_TAG
-   *
-   */
-
-
-  /**************************************************************************
-   *
-   * @type:
-   *   FT_Bool
-   *
-   * @description:
-   *   A typedef of unsigned char, used for simple booleans.  As usual,
-   *   values 1 and~0 represent true and false, respectively.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    basic_types                                                        */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*    Basic Data Types                                                   */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*    The basic data types defined by the library.                       */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This section contains the basic data types defined by FreeType~2,  */
+  /*    ranging from simple scalar types to bitmap descriptors.  More      */
+  /*    font-specific structures are defined in a different section.       */
+  /*                                                                       */
+  /* <Order>                                                               */
+  /*    FT_Byte                                                            */
+  /*    FT_Bytes                                                           */
+  /*    FT_Char                                                            */
+  /*    FT_Int                                                             */
+  /*    FT_UInt                                                            */
+  /*    FT_Int16                                                           */
+  /*    FT_UInt16                                                          */
+  /*    FT_Int32                                                           */
+  /*    FT_UInt32                                                          */
+  /*    FT_Int64                                                           */
+  /*    FT_UInt64                                                          */
+  /*    FT_Short                                                           */
+  /*    FT_UShort                                                          */
+  /*    FT_Long                                                            */
+  /*    FT_ULong                                                           */
+  /*    FT_Bool                                                            */
+  /*    FT_Offset                                                          */
+  /*    FT_PtrDist                                                         */
+  /*    FT_String                                                          */
+  /*    FT_Tag                                                             */
+  /*    FT_Error                                                           */
+  /*    FT_Fixed                                                           */
+  /*    FT_Pointer                                                         */
+  /*    FT_Pos                                                             */
+  /*    FT_Vector                                                          */
+  /*    FT_BBox                                                            */
+  /*    FT_Matrix                                                          */
+  /*    FT_FWord                                                           */
+  /*    FT_UFWord                                                          */
+  /*    FT_F2Dot14                                                         */
+  /*    FT_UnitVector                                                      */
+  /*    FT_F26Dot6                                                         */
+  /*    FT_Data                                                            */
+  /*                                                                       */
+  /*    FT_MAKE_TAG                                                        */
+  /*                                                                       */
+  /*    FT_Generic                                                         */
+  /*    FT_Generic_Finalizer                                               */
+  /*                                                                       */
+  /*    FT_Bitmap                                                          */
+  /*    FT_Pixel_Mode                                                      */
+  /*    FT_Palette_Mode                                                    */
+  /*    FT_Glyph_Format                                                    */
+  /*    FT_IMAGE_TAG                                                       */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_Bool                                                            */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A typedef of unsigned char, used for simple booleans.  As usual,   */
+  /*    values 1 and~0 represent true and false, respectively.             */
+  /*                                                                       */
   typedef unsigned char  FT_Bool;
 
 
-  /**************************************************************************
-   *
-   * @type:
-   *   FT_FWord
-   *
-   * @description:
-   *   A signed 16-bit integer used to store a distance in original font
-   *   units.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_FWord                                                           */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A signed 16-bit integer used to store a distance in original font  */
+  /*    units.                                                             */
+  /*                                                                       */
   typedef signed short  FT_FWord;   /* distance in FUnits */
 
 
-  /**************************************************************************
-   *
-   * @type:
-   *   FT_UFWord
-   *
-   * @description:
-   *   An unsigned 16-bit integer used to store a distance in original font
-   *   units.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_UFWord                                                          */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    An unsigned 16-bit integer used to store a distance in original    */
+  /*    font units.                                                        */
+  /*                                                                       */
   typedef unsigned short  FT_UFWord;  /* unsigned distance */
 
 
-  /**************************************************************************
-   *
-   * @type:
-   *   FT_Char
-   *
-   * @description:
-   *   A simple typedef for the _signed_ char type.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_Char                                                            */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A simple typedef for the _signed_ char type.                       */
+  /*                                                                       */
   typedef signed char  FT_Char;
 
 
-  /**************************************************************************
-   *
-   * @type:
-   *   FT_Byte
-   *
-   * @description:
-   *   A simple typedef for the _unsigned_ char type.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_Byte                                                            */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A simple typedef for the _unsigned_ char type.                     */
+  /*                                                                       */
   typedef unsigned char  FT_Byte;
 
 
-  /**************************************************************************
-   *
-   * @type:
-   *   FT_Bytes
-   *
-   * @description:
-   *   A typedef for constant memory areas.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_Bytes                                                           */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A typedef for constant memory areas.                               */
+  /*                                                                       */
   typedef const FT_Byte*  FT_Bytes;
 
 
-  /**************************************************************************
-   *
-   * @type:
-   *   FT_Tag
-   *
-   * @description:
-   *   A typedef for 32-bit tags (as used in the SFNT format).
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_Tag                                                             */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A typedef for 32-bit tags (as used in the SFNT format).            */
+  /*                                                                       */
   typedef FT_UInt32  FT_Tag;
 
 
-  /**************************************************************************
-   *
-   * @type:
-   *   FT_String
-   *
-   * @description:
-   *   A simple typedef for the char type, usually used for strings.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_String                                                          */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A simple typedef for the char type, usually used for strings.      */
+  /*                                                                       */
   typedef char  FT_String;
 
 
-  /**************************************************************************
-   *
-   * @type:
-   *   FT_Short
-   *
-   * @description:
-   *   A typedef for signed short.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_Short                                                           */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A typedef for signed short.                                        */
+  /*                                                                       */
   typedef signed short  FT_Short;
 
 
-  /**************************************************************************
-   *
-   * @type:
-   *   FT_UShort
-   *
-   * @description:
-   *   A typedef for unsigned short.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_UShort                                                          */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A typedef for unsigned short.                                      */
+  /*                                                                       */
   typedef unsigned short  FT_UShort;
 
 
-  /**************************************************************************
-   *
-   * @type:
-   *   FT_Int
-   *
-   * @description:
-   *   A typedef for the int type.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_Int                                                             */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A typedef for the int type.                                        */
+  /*                                                                       */
   typedef signed int  FT_Int;
 
 
-  /**************************************************************************
-   *
-   * @type:
-   *   FT_UInt
-   *
-   * @description:
-   *   A typedef for the unsigned int type.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_UInt                                                            */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A typedef for the unsigned int type.                               */
+  /*                                                                       */
   typedef unsigned int  FT_UInt;
 
 
-  /**************************************************************************
-   *
-   * @type:
-   *   FT_Long
-   *
-   * @description:
-   *   A typedef for signed long.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_Long                                                            */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A typedef for signed long.                                         */
+  /*                                                                       */
   typedef signed long  FT_Long;
 
 
-  /**************************************************************************
-   *
-   * @type:
-   *   FT_ULong
-   *
-   * @description:
-   *   A typedef for unsigned long.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_ULong                                                           */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A typedef for unsigned long.                                       */
+  /*                                                                       */
   typedef unsigned long  FT_ULong;
 
 
-  /**************************************************************************
-   *
-   * @type:
-   *   FT_F2Dot14
-   *
-   * @description:
-   *   A signed 2.14 fixed-point type used for unit vectors.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_F2Dot14                                                         */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A signed 2.14 fixed-point type used for unit vectors.              */
+  /*                                                                       */
   typedef signed short  FT_F2Dot14;
 
 
-  /**************************************************************************
-   *
-   * @type:
-   *   FT_F26Dot6
-   *
-   * @description:
-   *   A signed 26.6 fixed-point type used for vectorial pixel coordinates.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_F26Dot6                                                         */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A signed 26.6 fixed-point type used for vectorial pixel            */
+  /*    coordinates.                                                       */
+  /*                                                                       */
   typedef signed long  FT_F26Dot6;
 
 
-  /**************************************************************************
-   *
-   * @type:
-   *   FT_Fixed
-   *
-   * @description:
-   *   This type is used to store 16.16 fixed-point values, like scaling
-   *   values or matrix coefficients.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_Fixed                                                           */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This type is used to store 16.16 fixed-point values, like scaling  */
+  /*    values or matrix coefficients.                                     */
+  /*                                                                       */
   typedef signed long  FT_Fixed;
 
 
-  /**************************************************************************
-   *
-   * @type:
-   *   FT_Error
-   *
-   * @description:
-   *   The FreeType error code type.  A value of~0 is always interpreted as a
-   *   successful operation.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_Error                                                           */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    The FreeType error code type.  A value of~0 is always interpreted  */
+  /*    as a successful operation.                                         */
+  /*                                                                       */
   typedef int  FT_Error;
 
 
-  /**************************************************************************
-   *
-   * @type:
-   *   FT_Pointer
-   *
-   * @description:
-   *   A simple typedef for a typeless pointer.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_Pointer                                                         */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A simple typedef for a typeless pointer.                           */
+  /*                                                                       */
   typedef void*  FT_Pointer;
 
 
-  /**************************************************************************
-   *
-   * @type:
-   *   FT_Offset
-   *
-   * @description:
-   *   This is equivalent to the ANSI~C `size_t` type, i.e., the largest
-   *   _unsigned_ integer type used to express a file size or position, or a
-   *   memory block size.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_Offset                                                          */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This is equivalent to the ANSI~C `size_t' type, i.e., the largest  */
+  /*    _unsigned_ integer type used to express a file size or position,   */
+  /*    or a memory block size.                                            */
+  /*                                                                       */
   typedef size_t  FT_Offset;
 
 
-  /**************************************************************************
-   *
-   * @type:
-   *   FT_PtrDist
-   *
-   * @description:
-   *   This is equivalent to the ANSI~C `ptrdiff_t` type, i.e., the largest
-   *   _signed_ integer type used to express the distance between two
-   *   pointers.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_PtrDist                                                         */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This is equivalent to the ANSI~C `ptrdiff_t' type, i.e., the       */
+  /*    largest _signed_ integer type used to express the distance         */
+  /*    between two pointers.                                              */
+  /*                                                                       */
   typedef ft_ptrdiff_t  FT_PtrDist;
 
 
-  /**************************************************************************
-   *
-   * @struct:
-   *   FT_UnitVector
-   *
-   * @description:
-   *   A simple structure used to store a 2D vector unit vector.  Uses
-   *   FT_F2Dot14 types.
-   *
-   * @fields:
-   *   x ::
-   *     Horizontal coordinate.
-   *
-   *   y ::
-   *     Vertical coordinate.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_UnitVector                                                      */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A simple structure used to store a 2D vector unit vector.  Uses    */
+  /*    FT_F2Dot14 types.                                                  */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    x :: Horizontal coordinate.                                        */
+  /*                                                                       */
+  /*    y :: Vertical coordinate.                                          */
+  /*                                                                       */
   typedef struct  FT_UnitVector_
   {
     FT_F2Dot14  x;
@@ -360,33 +359,29 @@ FT_BEGIN_HEADER
   } FT_UnitVector;
 
 
-  /**************************************************************************
-   *
-   * @struct:
-   *   FT_Matrix
-   *
-   * @description:
-   *   A simple structure used to store a 2x2 matrix.  Coefficients are in
-   *   16.16 fixed-point format.  The computation performed is:
-   *
-   *   ```
-   *     x' = x*xx + y*xy
-   *     y' = x*yx + y*yy
-   *   ```
-   *
-   * @fields:
-   *   xx ::
-   *     Matrix coefficient.
-   *
-   *   xy ::
-   *     Matrix coefficient.
-   *
-   *   yx ::
-   *     Matrix coefficient.
-   *
-   *   yy ::
-   *     Matrix coefficient.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_Matrix                                                          */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A simple structure used to store a 2x2 matrix.  Coefficients are   */
+  /*    in 16.16 fixed-point format.  The computation performed is:        */
+  /*                                                                       */
+  /*       {                                                               */
+  /*          x' = x*xx + y*xy                                             */
+  /*          y' = x*yx + y*yy                                             */
+  /*       }                                                               */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    xx :: Matrix coefficient.                                          */
+  /*                                                                       */
+  /*    xy :: Matrix coefficient.                                          */
+  /*                                                                       */
+  /*    yx :: Matrix coefficient.                                          */
+  /*                                                                       */
+  /*    yy :: Matrix coefficient.                                          */
+  /*                                                                       */
   typedef struct  FT_Matrix_
   {
     FT_Fixed  xx, xy;
@@ -395,21 +390,19 @@ FT_BEGIN_HEADER
   } FT_Matrix;
 
 
-  /**************************************************************************
-   *
-   * @struct:
-   *   FT_Data
-   *
-   * @description:
-   *   Read-only binary data represented as a pointer and a length.
-   *
-   * @fields:
-   *   pointer ::
-   *     The data.
-   *
-   *   length ::
-   *     The length of the data in bytes.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_Data                                                            */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Read-only binary data represented as a pointer and a length.       */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    pointer :: The data.                                               */
+  /*                                                                       */
+  /*    length  :: The length of the data in bytes.                        */
+  /*                                                                       */
   typedef struct  FT_Data_
   {
     const FT_Byte*  pointer;
@@ -418,52 +411,51 @@ FT_BEGIN_HEADER
   } FT_Data;
 
 
-  /**************************************************************************
-   *
-   * @functype:
-   *   FT_Generic_Finalizer
-   *
-   * @description:
-   *   Describe a function used to destroy the 'client' data of any FreeType
-   *   object.  See the description of the @FT_Generic type for details of
-   *   usage.
-   *
-   * @input:
-   *   The address of the FreeType object that is under finalization.  Its
-   *   client data is accessed through its `generic` field.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    FT_Generic_Finalizer                                               */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Describe a function used to destroy the `client' data of any       */
+  /*    FreeType object.  See the description of the @FT_Generic type for  */
+  /*    details of usage.                                                  */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    The address of the FreeType object that is under finalization.     */
+  /*    Its client data is accessed through its `generic' field.           */
+  /*                                                                       */
   typedef void  (*FT_Generic_Finalizer)( void*  object );
 
 
-  /**************************************************************************
-   *
-   * @struct:
-   *   FT_Generic
-   *
-   * @description:
-   *   Client applications often need to associate their own data to a
-   *   variety of FreeType core objects.  For example, a text layout API
-   *   might want to associate a glyph cache to a given size object.
-   *
-   *   Some FreeType object contains a `generic` field, of type `FT_Generic`,
-   *   which usage is left to client applications and font servers.
-   *
-   *   It can be used to store a pointer to client-specific data, as well as
-   *   the address of a 'finalizer' function, which will be called by
-   *   FreeType when the object is destroyed (for example, the previous
-   *   client example would put the address of the glyph cache destructor in
-   *   the `finalizer` field).
-   *
-   * @fields:
-   *   data ::
-   *     A typeless pointer to any client-specified data. This field is
-   *     completely ignored by the FreeType library.
-   *
-   *   finalizer ::
-   *     A pointer to a 'generic finalizer' function, which will be called
-   *     when the object is destroyed.  If this field is set to `NULL`, no
-   *     code will be called.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_Generic                                                         */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Client applications often need to associate their own data to a    */
+  /*    variety of FreeType core objects.  For example, a text layout API  */
+  /*    might want to associate a glyph cache to a given size object.      */
+  /*                                                                       */
+  /*    Some FreeType object contains a `generic' field, of type           */
+  /*    FT_Generic, which usage is left to client applications and font    */
+  /*    servers.                                                           */
+  /*                                                                       */
+  /*    It can be used to store a pointer to client-specific data, as well */
+  /*    as the address of a `finalizer' function, which will be called by  */
+  /*    FreeType when the object is destroyed (for example, the previous   */
+  /*    client example would put the address of the glyph cache destructor */
+  /*    in the `finalizer' field).                                         */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    data      :: A typeless pointer to any client-specified data. This */
+  /*                 field is completely ignored by the FreeType library.  */
+  /*                                                                       */
+  /*    finalizer :: A pointer to a `generic finalizer' function, which    */
+  /*                 will be called when the object is destroyed.  If this */
+  /*                 field is set to NULL, no code will be called.         */
+  /*                                                                       */
   typedef struct  FT_Generic_
   {
     void*                 data;
@@ -472,19 +464,19 @@ FT_BEGIN_HEADER
   } FT_Generic;
 
 
-  /**************************************************************************
-   *
-   * @macro:
-   *   FT_MAKE_TAG
-   *
-   * @description:
-   *   This macro converts four-letter tags that are used to label TrueType
-   *   tables into an unsigned long, to be used within FreeType.
-   *
-   * @note:
-   *   The produced values **must** be 32-bit integers.  Don't redefine this
-   *   macro.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Macro>                                                               */
+  /*    FT_MAKE_TAG                                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This macro converts four-letter tags that are used to label        */
+  /*    TrueType tables into an unsigned long, to be used within FreeType. */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The produced values *must* be 32-bit integers.  Don't redefine     */
+  /*    this macro.                                                        */
+  /*                                                                       */
 #define FT_MAKE_TAG( _x1, _x2, _x3, _x4 ) \
           (FT_Tag)                        \
           ( ( (FT_ULong)_x1 << 24 ) |     \
@@ -502,56 +494,53 @@ FT_BEGIN_HEADER
   /*************************************************************************/
 
 
-  /**************************************************************************
-   *
-   * @section:
-   *   list_processing
-   *
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    list_processing                                                    */
+  /*                                                                       */
+  /*************************************************************************/
 
 
-  /**************************************************************************
-   *
-   * @type:
-   *   FT_ListNode
-   *
-   * @description:
-   *    Many elements and objects in FreeType are listed through an @FT_List
-   *    record (see @FT_ListRec).  As its name suggests, an FT_ListNode is a
-   *    handle to a single list element.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_ListNode                                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*     Many elements and objects in FreeType are listed through an       */
+  /*     @FT_List record (see @FT_ListRec).  As its name suggests, an      */
+  /*     FT_ListNode is a handle to a single list element.                 */
+  /*                                                                       */
   typedef struct FT_ListNodeRec_*  FT_ListNode;
 
 
-  /**************************************************************************
-   *
-   * @type:
-   *   FT_List
-   *
-   * @description:
-   *   A handle to a list record (see @FT_ListRec).
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_List                                                            */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A handle to a list record (see @FT_ListRec).                       */
+  /*                                                                       */
   typedef struct FT_ListRec_*  FT_List;
 
 
-  /**************************************************************************
-   *
-   * @struct:
-   *   FT_ListNodeRec
-   *
-   * @description:
-   *   A structure used to hold a single list element.
-   *
-   * @fields:
-   *   prev ::
-   *     The previous element in the list.  `NULL` if first.
-   *
-   *   next ::
-   *     The next element in the list.  `NULL` if last.
-   *
-   *   data ::
-   *     A typeless pointer to the listed object.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_ListNodeRec                                                     */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure used to hold a single list element.                    */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    prev :: The previous element in the list.  NULL if first.          */
+  /*                                                                       */
+  /*    next :: The next element in the list.  NULL if last.               */
+  /*                                                                       */
+  /*    data :: A typeless pointer to the listed object.                   */
+  /*                                                                       */
   typedef struct  FT_ListNodeRec_
   {
     FT_ListNode  prev;
@@ -561,22 +550,20 @@ FT_BEGIN_HEADER
   } FT_ListNodeRec;
 
 
-  /**************************************************************************
-   *
-   * @struct:
-   *   FT_ListRec
-   *
-   * @description:
-   *   A structure used to hold a simple doubly-linked list.  These are used
-   *   in many parts of FreeType.
-   *
-   * @fields:
-   *   head ::
-   *     The head (first element) of doubly-linked list.
-   *
-   *   tail ::
-   *     The tail (last element) of doubly-linked list.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_ListRec                                                         */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure used to hold a simple doubly-linked list.  These are   */
+  /*    used in many parts of FreeType.                                    */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    head :: The head (first element) of doubly-linked list.            */
+  /*                                                                       */
+  /*    tail :: The tail (last element) of doubly-linked list.             */
+  /*                                                                       */
   typedef struct  FT_ListRec_
   {
     FT_ListNode  head;
@@ -588,13 +575,13 @@ FT_BEGIN_HEADER
 
 
 #define FT_IS_EMPTY( list )  ( (list).head == 0 )
-#define FT_BOOL( x )  ( (FT_Bool)( (x) != 0 ) )
+#define FT_BOOL( x )  ( (FT_Bool)( x ) )
 
   /* concatenate C tokens */
 #define FT_ERR_XCAT( x, y )  x ## y
 #define FT_ERR_CAT( x, y )   FT_ERR_XCAT( x, y )
 
-  /* see `ftmoderr.h` for descriptions of the following macros */
+  /* see `ftmoderr.h' for descriptions of the following macros */
 
 #define FT_ERR( e )  FT_ERR_CAT( FT_ERR_PREFIX, e )
 

+ 80 - 82
thirdparty/freetype/include/freetype/ftwinfnt.h

@@ -1,19 +1,19 @@
-/****************************************************************************
- *
- * ftwinfnt.h
- *
- *   FreeType API for accessing Windows fnt-specific data.
- *
- * Copyright (C) 2003-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  ftwinfnt.h                                                             */
+/*                                                                         */
+/*    FreeType API for accessing Windows fnt-specific data.                */
+/*                                                                         */
+/*  Copyright 2003-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 FTWINFNT_H_
@@ -32,43 +32,44 @@
 FT_BEGIN_HEADER
 
 
-  /**************************************************************************
-   *
-   * @section:
-   *   winfnt_fonts
-   *
-   * @title:
-   *   Window FNT Files
-   *
-   * @abstract:
-   *   Windows FNT-specific API.
-   *
-   * @description:
-   *   This section contains the declaration of Windows FNT-specific
-   *   functions.
-   *
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    winfnt_fonts                                                       */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*    Window FNT Files                                                   */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*    Windows FNT specific API.                                          */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This section contains the declaration of Windows FNT specific      */
+  /*    functions.                                                         */
+  /*                                                                       */
+  /*************************************************************************/
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @enum:
    *   FT_WinFNT_ID_XXX
    *
    * @description:
-   *   A list of valid values for the `charset` byte in @FT_WinFNT_HeaderRec. 
-   *   Exact mapping tables for the various 'cpXXXX' encodings (except for
-   *   'cp1361') can be found at 'ftp://ftp.unicode.org/Public' in the
-   *   `MAPPINGS/VENDORS/MICSFT/WINDOWS` subdirectory.  'cp1361' is roughly a
-   *   superset of `MAPPINGS/OBSOLETE/EASTASIA/KSC/JOHAB.TXT`.
+   *   A list of valid values for the `charset' byte in
+   *   @FT_WinFNT_HeaderRec.  Exact mapping tables for the various cpXXXX
+   *   encodings (except for cp1361) can be found at
+   *   ftp://ftp.unicode.org/Public in the MAPPINGS/VENDORS/MICSFT/WINDOWS
+   *   subdirectory.  cp1361 is roughly a superset of
+   *   MAPPINGS/OBSOLETE/EASTASIA/KSC/JOHAB.TXT.
    *
    * @values:
    *   FT_WinFNT_ID_DEFAULT ::
-   *     This is used for font enumeration and font creation as a 'don't
-   *     care' value.  Valid font files don't contain this value.  When
-   *     querying for information about the character set of the font that is
-   *     currently selected into a specified device context, this return
-   *     value (of the related Windows API) simply denotes failure.
+   *     This is used for font enumeration and font creation as a
+   *     `don't care' value.  Valid font files don't contain this value.
+   *     When querying for information about the character set of the font
+   *     that is currently selected into a specified device context, this
+   *     return value (of the related Windows API) simply denotes failure.
    *
    *   FT_WinFNT_ID_SYMBOL ::
    *     There is no known mapping table available.
@@ -79,27 +80,26 @@ FT_BEGIN_HEADER
    *   FT_WinFNT_ID_OEM ::
    *     From Michael Poettgen <[email protected]>:
    *
-   *     The 'Windows Font Mapping' article says that `FT_WinFNT_ID_OEM` is
-   *     used for the charset of vector fonts, like `modern.fon`,
-   *     `roman.fon`, and `script.fon` on Windows.
+   *       The `Windows Font Mapping' article says that FT_WinFNT_ID_OEM
+   *       is used for the charset of vector fonts, like `modern.fon',
+   *       `roman.fon', and `script.fon' on Windows.
    *
-   *     The 'CreateFont' documentation says: The `FT_WinFNT_ID_OEM` value
-   *     specifies a character set that is operating-system dependent.
+   *       The `CreateFont' documentation says: The FT_WinFNT_ID_OEM value
+   *       specifies a character set that is operating-system dependent.
    *
-   *     The 'IFIMETRICS' documentation from the 'Windows Driver Development
-   *     Kit' says: This font supports an OEM-specific character set.  The
-   *     OEM character set is system dependent.
+   *       The `IFIMETRICS' documentation from the `Windows Driver
+   *       Development Kit' says: This font supports an OEM-specific
+   *       character set.  The OEM character set is system dependent.
    *
-   *     In general OEM, as opposed to ANSI (i.e., 'cp1252'), denotes the
-   *     second default codepage that most international versions of Windows
-   *     have.  It is one of the OEM codepages from
+   *       In general OEM, as opposed to ANSI (i.e., cp1252), denotes the
+   *       second default codepage that most international versions of
+   *       Windows have.  It is one of the OEM codepages from
    *
-   *     https://docs.microsoft.com/en-us/windows/desktop/intl/code-page-identifiers
-   *     ,
+   *         https://msdn.microsoft.com/en-us/goglobal/bb964655,
    *
-   *     and is used for the 'DOS boxes', to support legacy applications.  A
-   *     German Windows version for example usually uses ANSI codepage 1252
-   *     and OEM codepage 850.
+   *       and is used for the `DOS boxes', to support legacy applications.
+   *       A German Windows version for example usually uses ANSI codepage
+   *       1252 and OEM codepage 850.
    *
    *   FT_WinFNT_ID_CP874 ::
    *     A superset of Thai TIS 620 and ISO 8859-11.
@@ -112,8 +112,8 @@ FT_BEGIN_HEADER
    *     ordering and minor deviations).
    *
    *   FT_WinFNT_ID_CP949 ::
-   *     A superset of Korean Hangul KS~C 5601-1987 (with different ordering
-   *     and minor deviations).
+   *     A superset of Korean Hangul KS~C 5601-1987 (with different
+   *     ordering and minor deviations).
    *
    *   FT_WinFNT_ID_CP950 ::
    *     A superset of traditional Chinese Big~5 ETen (with different
@@ -173,14 +173,14 @@ FT_BEGIN_HEADER
 #define FT_WinFNT_ID_OEM     255
 
 
-  /**************************************************************************
-   *
-   * @struct:
-   *   FT_WinFNT_HeaderRec
-   *
-   * @description:
-   *   Windows FNT Header info.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_WinFNT_HeaderRec                                                */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Windows FNT Header info.                                           */
+  /*                                                                       */
   typedef struct  FT_WinFNT_HeaderRec_
   {
     FT_UShort  version;
@@ -223,18 +223,18 @@ FT_BEGIN_HEADER
   } FT_WinFNT_HeaderRec;
 
 
-  /**************************************************************************
-   *
-   * @struct:
-   *   FT_WinFNT_Header
-   *
-   * @description:
-   *   A handle to an @FT_WinFNT_HeaderRec structure.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_WinFNT_Header                                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A handle to an @FT_WinFNT_HeaderRec structure.                     */
+  /*                                                                       */
   typedef struct FT_WinFNT_HeaderRec_*  FT_WinFNT_Header;
 
 
-  /**************************************************************************
+  /**********************************************************************
    *
    * @function:
    *    FT_Get_WinFNT_Header
@@ -243,12 +243,10 @@ FT_BEGIN_HEADER
    *    Retrieve a Windows FNT font info header.
    *
    * @input:
-   *    face ::
-   *      A handle to the input face.
+   *    face    :: A handle to the input face.
    *
    * @output:
-   *    aheader ::
-   *      The WinFNT header.
+   *    aheader :: The WinFNT header.
    *
    * @return:
    *   FreeType error code.  0~means success.

+ 169 - 157
thirdparty/freetype/include/freetype/internal/autohint.h

@@ -1,73 +1,73 @@
-/****************************************************************************
- *
- * autohint.h
- *
- *   High-level 'autohint' module-specific interface (specification).
- *
- * Copyright (C) 1996-2019 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.
- *
- */
-
-
-  /**************************************************************************
-   *
-   * The auto-hinter is used to load and automatically hint glyphs if a
-   * format-specific hinter isn't available.
-   *
-   */
+/***************************************************************************/
+/*                                                                         */
+/*  autohint.h                                                             */
+/*                                                                         */
+/*    High-level `autohint' module-specific 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.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* The auto-hinter is used to load and automatically hint glyphs if a    */
+  /* format-specific hinter isn't available.                               */
+  /*                                                                       */
+  /*************************************************************************/
 
 
 #ifndef AUTOHINT_H_
 #define AUTOHINT_H_
 
 
-  /**************************************************************************
-   *
-   * A small technical note regarding automatic hinting in order to clarify
-   * this module interface.
-   *
-   * An automatic hinter might compute two kinds of data for a given face:
-   *
-   * - global hints: Usually some metrics that describe global properties
-   *                 of the face.  It is computed by scanning more or less
-   *                 aggressively the glyphs in the face, and thus can be
-   *                 very slow to compute (even if the size of global hints
-   *                 is really small).
-   *
-   * - glyph hints: These describe some important features of the glyph
-   *                 outline, as well as how to align them.  They are
-   *                 generally much faster to compute than global hints.
-   *
-   * The current FreeType auto-hinter does a pretty good job while performing
-   * fast computations for both global and glyph hints.  However, we might be
-   * interested in introducing more complex and powerful algorithms in the
-   * future, like the one described in the John D. Hobby paper, which
-   * unfortunately requires a lot more horsepower.
-   *
-   * Because a sufficiently sophisticated font management system would
-   * typically implement an LRU cache of opened face objects to reduce memory
-   * usage, it is a good idea to be able to avoid recomputing global hints
-   * every time the same face is re-opened.
-   *
-   * We thus provide the ability to cache global hints outside of the face
-   * object, in order to speed up font re-opening time.  Of course, this
-   * feature is purely optional, so most client programs won't even notice
-   * it.
-   *
-   * I initially thought that it would be a good idea to cache the glyph
-   * hints too.  However, my general idea now is that if you really need to
-   * cache these too, you are simply in need of a new font format, where all
-   * this information could be stored within the font file and decoded on the
-   * fly.
-   *
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* A small technical note regarding automatic hinting in order to        */
+  /* clarify this module interface.                                        */
+  /*                                                                       */
+  /* An automatic hinter might compute two kinds of data for a given face: */
+  /*                                                                       */
+  /* - global hints: Usually some metrics that describe global properties  */
+  /*                 of the face.  It is computed by scanning more or less */
+  /*                 aggressively the glyphs in the face, and thus can be  */
+  /*                 very slow to compute (even if the size of global      */
+  /*                 hints is really small).                               */
+  /*                                                                       */
+  /* - glyph hints:  These describe some important features of the glyph   */
+  /*                 outline, as well as how to align them.  They are      */
+  /*                 generally much faster to compute than global hints.   */
+  /*                                                                       */
+  /* The current FreeType auto-hinter does a pretty good job while         */
+  /* performing fast computations for both global and glyph hints.         */
+  /* However, we might be interested in introducing more complex and       */
+  /* powerful algorithms in the future, like the one described in the John */
+  /* D. Hobby paper, which unfortunately requires a lot more horsepower.   */
+  /*                                                                       */
+  /* Because a sufficiently sophisticated font management system would     */
+  /* typically implement an LRU cache of opened face objects to reduce     */
+  /* memory usage, it is a good idea to be able to avoid recomputing       */
+  /* global hints every time the same face is re-opened.                   */
+  /*                                                                       */
+  /* We thus provide the ability to cache global hints outside of the face */
+  /* object, in order to speed up font re-opening time.  Of course, this   */
+  /* feature is purely optional, so most client programs won't even notice */
+  /* it.                                                                   */
+  /*                                                                       */
+  /* I initially thought that it would be a good idea to cache the glyph   */
+  /* hints too.  However, my general idea now is that if you really need   */
+  /* to cache these too, you are simply in need of a new font format,      */
+  /* where all this information could be stored within the font file and   */
+  /* decoded on the fly.                                                   */
+  /*                                                                       */
+  /*************************************************************************/
 
 
 #include <ft2build.h>
@@ -80,31 +80,27 @@ FT_BEGIN_HEADER
   typedef struct FT_AutoHinterRec_  *FT_AutoHinter;
 
 
-  /**************************************************************************
-   *
-   * @functype:
-   *   FT_AutoHinter_GlobalGetFunc
-   *
-   * @description:
-   *   Retrieve the global hints computed for a given face object.  The
-   *   resulting data is dissociated from the face and will survive a call to
-   *   FT_Done_Face().  It must be discarded through the API
-   *   FT_AutoHinter_GlobalDoneFunc().
-   *
-   * @input:
-   *   hinter ::
-   *     A handle to the source auto-hinter.
-   *
-   *   face ::
-   *     A handle to the source face object.
-   *
-   * @output:
-   *   global_hints ::
-   *     A typeless pointer to the global hints.
-   *
-   *   global_len ::
-   *     The size in bytes of the global hints.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    FT_AutoHinter_GlobalGetFunc                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Retrieve the global hints computed for a given face object.  The   */
+  /*    resulting data is dissociated from the face and will survive a     */
+  /*    call to FT_Done_Face().  It must be discarded through the API      */
+  /*    FT_AutoHinter_GlobalDoneFunc().                                    */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    hinter       :: A handle to the source auto-hinter.                */
+  /*                                                                       */
+  /*    face         :: A handle to the source face object.                */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    global_hints :: A typeless pointer to the global hints.            */
+  /*                                                                       */
+  /*    global_len   :: The size in bytes of the global hints.             */
+  /*                                                                       */
   typedef void
   (*FT_AutoHinter_GlobalGetFunc)( FT_AutoHinter  hinter,
                                   FT_Face        face,
@@ -112,76 +108,69 @@ FT_BEGIN_HEADER
                                   long*          global_len );
 
 
-  /**************************************************************************
-   *
-   * @functype:
-   *   FT_AutoHinter_GlobalDoneFunc
-   *
-   * @description:
-   *   Discard the global hints retrieved through
-   *   FT_AutoHinter_GlobalGetFunc().  This is the only way these hints are
-   *   freed from memory.
-   *
-   * @input:
-   *   hinter ::
-   *     A handle to the auto-hinter module.
-   *
-   *   global ::
-   *     A pointer to retrieved global hints to discard.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    FT_AutoHinter_GlobalDoneFunc                                       */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Discard the global hints retrieved through                         */
+  /*    FT_AutoHinter_GlobalGetFunc().  This is the only way these hints   */
+  /*    are freed from memory.                                             */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    hinter :: A handle to the auto-hinter module.                      */
+  /*                                                                       */
+  /*    global :: A pointer to retrieved global hints to discard.          */
+  /*                                                                       */
   typedef void
   (*FT_AutoHinter_GlobalDoneFunc)( FT_AutoHinter  hinter,
                                    void*          global );
 
 
-  /**************************************************************************
-   *
-   * @functype:
-   *   FT_AutoHinter_GlobalResetFunc
-   *
-   * @description:
-   *   This function is used to recompute the global metrics in a given font.
-   *   This is useful when global font data changes (e.g. Multiple Masters
-   *   fonts where blend coordinates change).
-   *
-   * @input:
-   *   hinter ::
-   *     A handle to the source auto-hinter.
-   *
-   *   face ::
-   *     A handle to the face.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    FT_AutoHinter_GlobalResetFunc                                      */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This function is used to recompute the global metrics in a given   */
+  /*    font.  This is useful when global font data changes (e.g. Multiple */
+  /*    Masters fonts where blend coordinates change).                     */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    hinter :: A handle to the source auto-hinter.                      */
+  /*                                                                       */
+  /*    face   :: A handle to the face.                                    */
+  /*                                                                       */
   typedef void
   (*FT_AutoHinter_GlobalResetFunc)( FT_AutoHinter  hinter,
                                     FT_Face        face );
 
 
-  /**************************************************************************
-   *
-   * @functype:
-   *   FT_AutoHinter_GlyphLoadFunc
-   *
-   * @description:
-   *   This function is used to load, scale, and automatically hint a glyph
-   *   from a given face.
-   *
-   * @input:
-   *   face ::
-   *     A handle to the face.
-   *
-   *   glyph_index ::
-   *     The glyph index.
-   *
-   *   load_flags ::
-   *     The load flags.
-   *
-   * @note:
-   *   This function is capable of loading composite glyphs by hinting each
-   *   sub-glyph independently (which improves quality).
-   *
-   *   It will call the font driver with @FT_Load_Glyph, with
-   *   @FT_LOAD_NO_SCALE set.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    FT_AutoHinter_GlyphLoadFunc                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This function is used to load, scale, and automatically hint a     */
+  /*    glyph from a given face.                                           */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face        :: A handle to the face.                               */
+  /*                                                                       */
+  /*    glyph_index :: The glyph index.                                    */
+  /*                                                                       */
+  /*    load_flags  :: The load flags.                                     */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    This function is capable of loading composite glyphs by hinting    */
+  /*    each sub-glyph independently (which improves quality).             */
+  /*                                                                       */
+  /*    It will call the font driver with @FT_Load_Glyph, with             */
+  /*    @FT_LOAD_NO_SCALE set.                                             */
+  /*                                                                       */
   typedef FT_Error
   (*FT_AutoHinter_GlyphLoadFunc)( FT_AutoHinter  hinter,
                                   FT_GlyphSlot   slot,
@@ -190,14 +179,14 @@ FT_BEGIN_HEADER
                                   FT_Int32       load_flags );
 
 
-  /**************************************************************************
-   *
-   * @struct:
-   *   FT_AutoHinter_InterfaceRec
-   *
-   * @description:
-   *   The auto-hinter module's interface.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_AutoHinter_InterfaceRec                                         */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    The auto-hinter module's interface.                                */
+  /*                                                                       */
   typedef struct  FT_AutoHinter_InterfaceRec_
   {
     FT_AutoHinter_GlobalResetFunc  reset_face;
@@ -208,6 +197,8 @@ FT_BEGIN_HEADER
   } FT_AutoHinter_InterfaceRec, *FT_AutoHinter_Interface;
 
 
+#ifndef FT_CONFIG_OPTION_PIC
+
 #define FT_DEFINE_AUTOHINTER_INTERFACE(       \
           class_,                             \
           reset_face_,                        \
@@ -223,6 +214,27 @@ FT_BEGIN_HEADER
     load_glyph_                               \
   };
 
+#else /* FT_CONFIG_OPTION_PIC */
+
+#define FT_DEFINE_AUTOHINTER_INTERFACE(                            \
+          class_,                                                  \
+          reset_face_,                                             \
+          get_global_hints_,                                       \
+          done_global_hints_,                                      \
+          load_glyph_ )                                            \
+  void                                                             \
+  FT_Init_Class_ ## class_( FT_Library                   library,  \
+                            FT_AutoHinter_InterfaceRec*  clazz )   \
+  {                                                                \
+    FT_UNUSED( library );                                          \
+                                                                   \
+    clazz->reset_face        = reset_face_;                        \
+    clazz->get_global_hints  = get_global_hints_;                  \
+    clazz->done_global_hints = done_global_hints_;                 \
+    clazz->load_glyph        = load_glyph_;                        \
+  }
+
+#endif /* FT_CONFIG_OPTION_PIC */
 
 FT_END_HEADER
 

+ 44 - 44
thirdparty/freetype/include/freetype/internal/cffotypes.h

@@ -1,19 +1,19 @@
-/****************************************************************************
- *
- * cffotypes.h
- *
- *   Basic OpenType/CFF object type definitions (specification).
- *
- * Copyright (C) 2017-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  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_
@@ -33,14 +33,14 @@ FT_BEGIN_HEADER
   typedef TT_Face  CFF_Face;
 
 
-  /**************************************************************************
-   *
-   * @type:
-   *   CFF_Size
-   *
-   * @description:
-   *   A handle to an OpenType size object.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    CFF_Size                                                           */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A handle to an OpenType size object.                               */
+  /*                                                                       */
   typedef struct  CFF_SizeRec_
   {
     FT_SizeRec  root;
@@ -49,14 +49,14 @@ FT_BEGIN_HEADER
   } CFF_SizeRec, *CFF_Size;
 
 
-  /**************************************************************************
-   *
-   * @type:
-   *   CFF_GlyphSlot
-   *
-   * @description:
-   *   A handle to an OpenType glyph slot object.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    CFF_GlyphSlot                                                      */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A handle to an OpenType glyph slot object.                         */
+  /*                                                                       */
   typedef struct  CFF_GlyphSlotRec_
   {
     FT_GlyphSlotRec  root;
@@ -70,14 +70,14 @@ FT_BEGIN_HEADER
   } CFF_GlyphSlotRec, *CFF_GlyphSlot;
 
 
-  /**************************************************************************
-   *
-   * @type:
-   *   CFF_Internal
-   *
-   * @description:
-   *   The interface to the 'internal' field of `FT_Size`.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    CFF_Internal                                                       */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    The interface to the `internal' field of `FT_Size'.                */
+  /*                                                                       */
   typedef struct  CFF_InternalRec_
   {
     PSH_Globals  topfont;
@@ -86,10 +86,10 @@ FT_BEGIN_HEADER
   } CFF_InternalRec, *CFF_Internal;
 
 
-  /**************************************************************************
-   *
-   * Subglyph transformation record.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* Subglyph transformation record.                                       */
+  /*                                                                       */
   typedef struct  CFF_Transform_
   {
     FT_Fixed    xx, xy;     /* transformation matrix coefficients */

+ 45 - 50
thirdparty/freetype/include/freetype/internal/cfftypes.h

@@ -1,20 +1,20 @@
-/****************************************************************************
- *
- * cfftypes.h
- *
- *   Basic OpenType/CFF type definitions and interface (specification
- *   only).
- *
- * Copyright (C) 1996-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  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_
@@ -33,39 +33,34 @@
 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.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <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;

+ 90 - 156
thirdparty/freetype/include/freetype/internal/ftcalc.h

@@ -1,19 +1,19 @@
-/****************************************************************************
- *
- * ftcalc.h
- *
- *   Arithmetic computations (specification).
- *
- * Copyright (C) 1996-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  ftcalc.h                                                               */
+/*                                                                         */
+/*    Arithmetic computations (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 FTCALC_H_
@@ -27,11 +27,11 @@
 FT_BEGIN_HEADER
 
 
-  /**************************************************************************
-   *
-   * FT_MulDiv() and FT_MulFix() are declared in freetype.h.
-   *
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* FT_MulDiv() and FT_MulFix() are declared in freetype.h.               */
+  /*                                                                       */
+  /*************************************************************************/
 
 #ifndef  FT_CONFIG_OPTION_NO_ASSEMBLER
   /* Provide assembler fragments for performance-critical functions. */
@@ -246,32 +246,29 @@ FT_BEGIN_HEADER
 #endif
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_MulDiv_No_Round
-   *
-   * @description:
-   *   A very simple function used to perform the computation '(a*b)/c'
-   *   (without rounding) with maximum accuracy (it uses a 64-bit
-   *   intermediate integer whenever necessary).
-   *
-   *   This function isn't necessarily as fast as some processor-specific
-   *   operations, but is at least completely portable.
-   *
-   * @input:
-   *   a ::
-   *     The first multiplier.
-   *   b ::
-   *     The second multiplier.
-   *   c ::
-   *     The divisor.
-   *
-   * @return:
-   *   The result of '(a*b)/c'.  This function never traps when trying to
-   *   divide by zero; it simply returns 'MaxInt' or 'MinInt' depending on
-   *   the signs of 'a' and 'b'.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_MulDiv_No_Round                                                 */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A very simple function used to perform the computation `(a*b)/c'   */
+  /*    (without rounding) with maximum accuracy (it uses a 64-bit         */
+  /*    intermediate integer whenever necessary).                          */
+  /*                                                                       */
+  /*    This function isn't necessarily as fast as some processor specific */
+  /*    operations, but is at least completely portable.                   */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    a :: The first multiplier.                                         */
+  /*    b :: The second multiplier.                                        */
+  /*    c :: The divisor.                                                  */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    The result of `(a*b)/c'.  This function never traps when trying to */
+  /*    divide by zero; it simply returns `MaxInt' or `MinInt' depending   */
+  /*    on the signs of `a' and `b'.                                       */
+  /*                                                                       */
   FT_BASE( FT_Long )
   FT_MulDiv_No_Round( FT_Long  a,
                       FT_Long  b,
@@ -279,11 +276,12 @@ FT_BEGIN_HEADER
 
 
   /*
-   * A variant of FT_Matrix_Multiply which scales its result afterwards.  The
-   * idea is that both `a' and `b' are scaled by factors of 10 so that the
-   * values are as precise as possible to get a correct result during the
-   * 64bit multiplication.  Let `sa' and `sb' be the scaling factors of `a'
-   * and `b', respectively, then the scaling factor of the result is `sa*sb'.
+   *  A variant of FT_Matrix_Multiply which scales its result afterwards.
+   *  The idea is that both `a' and `b' are scaled by factors of 10 so that
+   *  the values are as precise as possible to get a correct result during
+   *  the 64bit multiplication.  Let `sa' and `sb' be the scaling factors of
+   *  `a' and `b', respectively, then the scaling factor of the result is
+   *  `sa*sb'.
    */
   FT_BASE( void )
   FT_Matrix_Multiply_Scaled( const FT_Matrix*  a,
@@ -292,23 +290,8 @@ FT_BEGIN_HEADER
 
 
   /*
-   * Check a matrix.  If the transformation would lead to extreme shear or
-   * extreme scaling, for example, return 0.  If everything is OK, return 1.
-   *
-   * Based on geometric considerations we use the following inequality to
-   * identify a degenerate matrix.
-   *
-   *   50 * abs(xx*yy - xy*yx) < xx^2 + xy^2 + yx^2 + yy^2
-   *
-   * Value 50 is heuristic.
-   */
-  FT_BASE( FT_Bool )
-  FT_Matrix_Check( const FT_Matrix*  matrix );
-
-
-  /*
-   * A variant of FT_Vector_Transform.  See comments for
-   * FT_Matrix_Multiply_Scaled.
+   *  A variant of FT_Vector_Transform.  See comments for
+   *  FT_Matrix_Multiply_Scaled.
    */
   FT_BASE( void )
   FT_Vector_Transform_Scaled( FT_Vector*        vector,
@@ -317,22 +300,22 @@ FT_BEGIN_HEADER
 
 
   /*
-   * This function normalizes a vector and returns its original length.  The
-   * normalized vector is a 16.16 fixed-point unit vector with length close
-   * to 0x10000.  The accuracy of the returned length is limited to 16 bits
-   * also.  The function utilizes quick inverse square root approximation
-   * without divisions and square roots relying on Newton's iterations
-   * instead.
+   *  This function normalizes a vector and returns its original length.
+   *  The normalized vector is a 16.16 fixed-point unit vector with length
+   *  close to 0x10000.  The accuracy of the returned length is limited to
+   *  16 bits also.  The function utilizes quick inverse square root
+   *  approximation without divisions and square roots relying on Newton's
+   *  iterations instead.
    */
   FT_BASE( FT_UInt32 )
   FT_Vector_NormLen( FT_Vector*  vector );
 
 
   /*
-   * Return -1, 0, or +1, depending on the orientation of a given corner.  We
-   * use the Cartesian coordinate system, with positive vertical values going
-   * upwards.  The function returns +1 if the corner turns to the left, -1 to
-   * the right, and 0 for undecidable cases.
+   *  Return -1, 0, or +1, depending on the orientation of a given corner.
+   *  We use the Cartesian coordinate system, with positive vertical values
+   *  going upwards.  The function returns +1 if the corner turns to the
+   *  left, -1 to the right, and 0 for undecidable cases.
    */
   FT_BASE( FT_Int )
   ft_corner_orientation( FT_Pos  in_x,
@@ -342,9 +325,9 @@ FT_BEGIN_HEADER
 
 
   /*
-   * Return TRUE if a corner is flat or nearly flat.  This is equivalent to
-   * saying that the corner point is close to its neighbors, or inside an
-   * ellipse defined by the neighbor focal points to be more precise.
+   *  Return TRUE if a corner is flat or nearly flat.  This is equivalent to
+   *  saying that the corner point is close to its neighbors, or inside an
+   *  ellipse defined by the neighbor focal points to be more precise.
    */
   FT_BASE( FT_Int )
   ft_corner_is_flat( FT_Pos  in_x,
@@ -354,11 +337,10 @@ FT_BEGIN_HEADER
 
 
   /*
-   * Return the most significant bit index.
+   *  Return the most significant bit index.
    */
 
 #ifndef  FT_CONFIG_OPTION_NO_ASSEMBLER
-
 #if defined( __GNUC__ )                                          && \
     ( __GNUC__ > 3 || ( __GNUC__ == 3 && __GNUC_MINOR__ >= 4 ) )
 
@@ -370,34 +352,9 @@ FT_BEGIN_HEADER
 
 #define FT_MSB( x )  ( 31 - __builtin_clzl( x ) )
 
-#endif /* __GNUC__ */
-
-
-#elif defined( _MSC_VER ) && ( _MSC_VER >= 1400 )
-
-#if FT_SIZEOF_INT == 4
-
-#include <intrin.h>
-
-  static __inline FT_Int32
-  FT_MSB_i386( FT_UInt32  x )
-  {
-    unsigned long  where;
-
-
-    /* not available in older VC versions */
-    _BitScanReverse( &where, x );
-
-    return (FT_Int32)where;
-  }
-
-#define FT_MSB( x )  ( FT_MSB_i386( x ) )
-
 #endif
 
-#endif /* _MSC_VER */
-
-
+#endif /* __GNUC__ */
 #endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */
 
 #ifndef FT_MSB
@@ -409,8 +366,8 @@ FT_BEGIN_HEADER
 
 
   /*
-   * Return sqrt(x*x+y*y), which is the same as `FT_Vector_Length' but uses
-   * two fixed-point arguments instead.
+   *  Return sqrt(x*x+y*y), which is the same as `FT_Vector_Length' but uses
+   *  two fixed-point arguments instead.
    */
   FT_BASE( FT_Fixed )
   FT_Hypot( FT_Fixed  x,
@@ -419,24 +376,23 @@ FT_BEGIN_HEADER
 
 #if 0
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_SqrtFixed
-   *
-   * @description:
-   *   Computes the square root of a 16.16 fixed-point value.
-   *
-   * @input:
-   *   x ::
-   *     The value to compute the root for.
-   *
-   * @return:
-   *   The result of 'sqrt(x)'.
-   *
-   * @note:
-   *   This function is not very fast.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_SqrtFixed                                                       */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Computes the square root of a 16.16 fixed-point value.             */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    x :: The value to compute the root for.                            */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    The result of `sqrt(x)'.                                           */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    This function is not very fast.                                    */
+  /*                                                                       */
   FT_BASE( FT_Int32 )
   FT_SqrtFixed( FT_Int32  x );
 
@@ -453,23 +409,14 @@ FT_BEGIN_HEADER
                                         : ( -( ( 32 - (x) ) & -64 ) ) )
 
   /*
-   * The following macros have two purposes.
+   *  The following macros have two purposes.
    *
-   * - Tag places where overflow is expected and harmless.
+   *  . Tag places where overflow is expected and harmless.
    *
-   * - Avoid run-time sanitizer errors.
+   *  . Avoid run-time sanitizer errors.
    *
-   * Use with care!
+   *  Use with care!
    */
-#define ADD_INT( a, b )                           \
-          (FT_Int)( (FT_UInt)(a) + (FT_UInt)(b) )
-#define SUB_INT( a, b )                           \
-          (FT_Int)( (FT_UInt)(a) - (FT_UInt)(b) )
-#define MUL_INT( a, b )                           \
-          (FT_Int)( (FT_UInt)(a) * (FT_UInt)(b) )
-#define NEG_INT( a )                              \
-          (FT_Int)( (FT_UInt)0 - (FT_UInt)(a) )
-
 #define ADD_LONG( a, b )                             \
           (FT_Long)( (FT_ULong)(a) + (FT_ULong)(b) )
 #define SUB_LONG( a, b )                             \
@@ -488,19 +435,6 @@ FT_BEGIN_HEADER
 #define NEG_INT32( a )                                  \
           (FT_Int32)( (FT_UInt32)0 - (FT_UInt32)(a) )
 
-#ifdef FT_LONG64
-
-#define ADD_INT64( a, b )                               \
-          (FT_Int64)( (FT_UInt64)(a) + (FT_UInt64)(b) )
-#define SUB_INT64( a, b )                               \
-          (FT_Int64)( (FT_UInt64)(a) - (FT_UInt64)(b) )
-#define MUL_INT64( a, b )                               \
-          (FT_Int64)( (FT_UInt64)(a) * (FT_UInt64)(b) )
-#define NEG_INT64( a )                                  \
-          (FT_Int64)( (FT_UInt64)0 - (FT_UInt64)(a) )
-
-#endif /* FT_LONG64 */
-
 
 FT_END_HEADER
 

+ 110 - 138
thirdparty/freetype/include/freetype/internal/ftdebug.h

@@ -1,24 +1,24 @@
-/****************************************************************************
- *
- * ftdebug.h
- *
- *   Debugging and logging component (specification).
- *
- * Copyright (C) 1996-2019 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.
- *
- *
- * IMPORTANT: A description of FreeType's debugging support can be
- *             found in 'docs/DEBUG.TXT'.  Read it if you need to use or
- *             understand this code.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  ftdebug.h                                                              */
+/*                                                                         */
+/*    Debugging and logging component (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.                                        */
+/*                                                                         */
+/*                                                                         */
+/*  IMPORTANT: A description of FreeType's debugging support can be        */
+/*             found in `docs/DEBUG.TXT'.  Read it if you need to use or   */
+/*             understand this code.                                       */
+/*                                                                         */
+/***************************************************************************/
 
 
 #ifndef FTDEBUG_H_
@@ -42,12 +42,12 @@ FT_BEGIN_HEADER
 #endif
 
 
-  /**************************************************************************
-   *
-   * Define the trace enums as well as the trace levels array when they are
-   * needed.
-   *
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* Define the trace enums as well as the trace levels array when they    */
+  /* are needed.                                                           */
+  /*                                                                       */
+  /*************************************************************************/
 
 #ifdef FT_DEBUG_LEVEL_TRACE
 
@@ -62,37 +62,32 @@ FT_BEGIN_HEADER
   } FT_Trace;
 
 
-  /* a pointer to the array of trace levels, */
-  /* provided by `src/base/ftdebug.c'        */
-  extern int*  ft_trace_levels;
+  /* defining the array of trace levels, provided by `src/base/ftdebug.c' */
+  extern int  ft_trace_levels[trace_count];
 
 #undef FT_TRACE_DEF
 
 #endif /* FT_DEBUG_LEVEL_TRACE */
 
 
-  /**************************************************************************
-   *
-   * Define the FT_TRACE macro
-   *
-   * IMPORTANT!
-   *
-   * Each component must define the macro FT_COMPONENT to a valid FT_Trace
-   * value before using any TRACE macro.
-   *
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* Define the FT_TRACE macro                                             */
+  /*                                                                       */
+  /* IMPORTANT!                                                            */
+  /*                                                                       */
+  /* Each component must define the macro FT_COMPONENT to a valid FT_Trace */
+  /* value before using any TRACE macro.                                   */
+  /*                                                                       */
+  /*************************************************************************/
 
 #ifdef FT_DEBUG_LEVEL_TRACE
 
-  /* we need two macros here to make cpp expand `FT_COMPONENT' */
-#define FT_TRACE_COMP( x )   FT_TRACE_COMP_( x )
-#define FT_TRACE_COMP_( x )  trace_ ## x
-
-#define FT_TRACE( level, varformat )                                       \
-          do                                                               \
-          {                                                                \
-            if ( ft_trace_levels[FT_TRACE_COMP( FT_COMPONENT )] >= level ) \
-              FT_Message varformat;                                        \
+#define FT_TRACE( level, varformat )                      \
+          do                                              \
+          {                                               \
+            if ( ft_trace_levels[FT_COMPONENT] >= level ) \
+              FT_Message varformat;                       \
           } while ( 0 )
 
 #else /* !FT_DEBUG_LEVEL_TRACE */
@@ -102,85 +97,62 @@ FT_BEGIN_HEADER
 #endif /* !FT_DEBUG_LEVEL_TRACE */
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Trace_Get_Count
-   *
-   * @description:
-   *   Return the number of available trace components.
-   *
-   * @return:
-   *   The number of trace components.  0 if FreeType 2 is not built with
-   *   FT_DEBUG_LEVEL_TRACE definition.
-   *
-   * @note:
-   *   This function may be useful if you want to access elements of the
-   *   internal trace levels array by an index.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Trace_Get_Count                                                 */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Return the number of available trace components.                   */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    The number of trace components.  0 if FreeType 2 is not built with */
+  /*    FT_DEBUG_LEVEL_TRACE definition.                                   */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    This function may be useful if you want to access elements of      */
+  /*    the internal `ft_trace_levels' array by an index.                  */
+  /*                                                                       */
   FT_BASE( FT_Int )
   FT_Trace_Get_Count( void );
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Trace_Get_Name
-   *
-   * @description:
-   *   Return the name of a trace component.
-   *
-   * @input:
-   *   The index of the trace component.
-   *
-   * @return:
-   *   The name of the trace component.  This is a statically allocated
-   *   C~string, so do not free it after use.  `NULL` if FreeType is not
-   *   built with FT_DEBUG_LEVEL_TRACE definition.
-   *
-   * @note:
-   *   Use @FT_Trace_Get_Count to get the number of available trace
-   *   components.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Trace_Get_Name                                                  */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Return the name of a trace component.                              */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    The index of the trace component.                                  */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    The name of the trace component.  This is a statically allocated   */
+  /*    C string, so do not free it after use.  NULL if FreeType 2 is not  */
+  /*    built with FT_DEBUG_LEVEL_TRACE definition.                        */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    Use @FT_Trace_Get_Count to get the number of available trace       */
+  /*    components.                                                        */
+  /*                                                                       */
+  /*    This function may be useful if you want to control FreeType 2's    */
+  /*    debug level in your application.                                   */
+  /*                                                                       */
   FT_BASE( const char* )
   FT_Trace_Get_Name( FT_Int  idx );
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Trace_Disable
-   *
-   * @description:
-   *   Switch off tracing temporarily.  It can be activated again with
-   *   @FT_Trace_Enable.
-   */
-  FT_BASE( void )
-  FT_Trace_Disable( void );
-
-
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Trace_Enable
-   *
-   * @description:
-   *   Activate tracing.  Use it after tracing has been switched off with
-   *   @FT_Trace_Disable.
-   */
-  FT_BASE( void )
-  FT_Trace_Enable( void );
-
-
-  /**************************************************************************
-   *
-   * You need two opening and closing parentheses!
-   *
-   * Example: FT_TRACE0(( "Value is %i", foo ))
-   *
-   * Output of the FT_TRACEX macros is sent to stderr.
-   *
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* You need two opening and closing parentheses!                         */
+  /*                                                                       */
+  /* Example: FT_TRACE0(( "Value is %i", foo ))                            */
+  /*                                                                       */
+  /* Output of the FT_TRACEX macros is sent to stderr.                     */
+  /*                                                                       */
+  /*************************************************************************/
 
 #define FT_TRACE0( varformat )  FT_TRACE( 0, varformat )
 #define FT_TRACE1( varformat )  FT_TRACE( 1, varformat )
@@ -192,13 +164,13 @@ FT_BEGIN_HEADER
 #define FT_TRACE7( varformat )  FT_TRACE( 7, varformat )
 
 
-  /**************************************************************************
-   *
-   * Define the FT_ERROR macro.
-   *
-   * Output of this macro is sent to stderr.
-   *
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* Define the FT_ERROR macro.                                            */
+  /*                                                                       */
+  /* Output of this macro is sent to stderr.                               */
+  /*                                                                       */
+  /*************************************************************************/
 
 #ifdef FT_DEBUG_LEVEL_ERROR
 
@@ -211,12 +183,12 @@ FT_BEGIN_HEADER
 #endif /* !FT_DEBUG_LEVEL_ERROR */
 
 
-  /**************************************************************************
-   *
-   * Define the FT_ASSERT and FT_THROW macros.  The call to `FT_Throw` makes
-   * it possible to easily set a breakpoint at this function.
-   *
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* Define the FT_ASSERT and FT_THROW macros.  The call to `FT_Throw'     */
+  /* makes it possible to easily set a breakpoint at this function.        */
+  /*                                                                       */
+  /*************************************************************************/
 
 #ifdef FT_DEBUG_LEVEL_ERROR
 
@@ -243,11 +215,11 @@ FT_BEGIN_HEADER
 #endif /* !FT_DEBUG_LEVEL_ERROR */
 
 
-  /**************************************************************************
-   *
-   * Define `FT_Message` and `FT_Panic` when needed.
-   *
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* Define `FT_Message' and `FT_Panic' when needed.                       */
+  /*                                                                       */
+  /*************************************************************************/
 
 #ifdef FT_DEBUG_LEVEL_ERROR
 

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

@@ -0,0 +1,400 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftdriver.h                                                             */
+/*                                                                         */
+/*    FreeType font driver interface (specification).                      */
+/*                                                                         */
+/*  Copyright 1996-2017 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_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 /* FTDRIVER_H_ */
+
+
+/* END */

+ 224 - 112
thirdparty/freetype/include/freetype/internal/ftdrv.h

@@ -1,19 +1,19 @@
-/****************************************************************************
- *
- * ftdrv.h
- *
- *   FreeType internal font driver interface (specification).
- *
- * Copyright (C) 1996-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  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_
@@ -87,80 +87,73 @@ FT_BEGIN_HEADER
                               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.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <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;
@@ -191,28 +184,45 @@ FT_BEGIN_HEADER
   } 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.
-   *
-   *   `ftinit.c` (ft_create_default_module_classes) already contains a
-   *   mechanism to call these functions for the default modules described in
-   *   `ftmodule.h`.
-   *
-   *   The struct will be allocated in the global scope (or the scope where
-   *   the macro is used).
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <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_;
@@ -279,6 +289,108 @@ FT_BEGIN_HEADER
     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
 

+ 30 - 25
thirdparty/freetype/include/freetype/internal/ftgloadr.h

@@ -1,19 +1,19 @@
-/****************************************************************************
- *
- * ftgloadr.h
- *
- *   The FreeType glyph loader (specification).
- *
- * Copyright (C) 2002-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  ftgloadr.h                                                             */
+/*                                                                         */
+/*    The FreeType glyph loader (specification).                           */
+/*                                                                         */
+/*  Copyright 2002-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 FTGLOADR_H_
@@ -27,15 +27,15 @@
 FT_BEGIN_HEADER
 
 
-  /**************************************************************************
-   *
-   * @struct:
-   *   FT_GlyphLoader
-   *
-   * @description:
-   *   The glyph loader is an internal object used to load several glyphs
-   *   together (for example, in the case of composites).
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_GlyphLoader                                                     */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    The glyph loader is an internal object used to load several glyphs */
+  /*    together (for example, in the case of composites).                 */
+  /*                                                                       */
   typedef struct  FT_SubGlyphRec_
   {
     FT_Int     index;
@@ -138,6 +138,11 @@ FT_BEGIN_HEADER
   FT_BASE( void )
   FT_GlyphLoader_Add( FT_GlyphLoader  loader );
 
+  /* copy points from one glyph loader to another */
+  FT_BASE( FT_Error )
+  FT_GlyphLoader_CopyPoints( FT_GlyphLoader  target,
+                             FT_GlyphLoader  source );
+
  /* */
 
 

+ 14 - 14
thirdparty/freetype/include/freetype/internal/fthash.h

@@ -1,10 +1,10 @@
-/****************************************************************************
- *
- * fthash.h
- *
- *   Hashing functions (specification).
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  fthash.h                                                               */
+/*                                                                         */
+/*    Hashing functions (specification).                                   */
+/*                                                                         */
+/***************************************************************************/
 
 /*
  * Copyright 2000 Computing Research Labs, New Mexico State University
@@ -30,13 +30,13 @@
  * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 
-  /**************************************************************************
-   *
-   * This file is based on code from bdf.c,v 1.22 2000/03/16 20:08:50
-   *
-   * taken from Mark Leisher's xmbdfed package
-   *
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /*  This file is based on code from bdf.c,v 1.22 2000/03/16 20:08:50     */
+  /*                                                                       */
+  /*  taken from Mark Leisher's xmbdfed package                            */
+  /*                                                                       */
+  /*************************************************************************/
 
 
 #ifndef FTHASH_H_

+ 39 - 38
thirdparty/freetype/include/freetype/internal/ftmemory.h

@@ -1,19 +1,19 @@
-/****************************************************************************
- *
- * ftmemory.h
- *
- *   The FreeType memory management macros (specification).
- *
- * Copyright (C) 1996-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  ftmemory.h                                                             */
+/*                                                                         */
+/*    The FreeType memory management macros (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 FTMEMORY_H_
@@ -28,16 +28,16 @@
 FT_BEGIN_HEADER
 
 
-  /**************************************************************************
-   *
-   * @macro:
-   *   FT_SET_ERROR
-   *
-   * @description:
-   *   This macro is used to set an implicit 'error' variable to a given
-   *   expression's value (usually a function call), and convert it to a
-   *   boolean which is set whenever the value is != 0.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Macro>                                                               */
+  /*    FT_SET_ERROR                                                       */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This macro is used to set an implicit `error' variable to a given  */
+  /*    expression's value (usually a function call), and convert it to a  */
+  /*    boolean which is set whenever the value is != 0.                   */
+  /*                                                                       */
 #undef  FT_SET_ERROR
 #define FT_SET_ERROR( expression ) \
           ( ( error = (expression) ) != 0 )
@@ -58,9 +58,9 @@ FT_BEGIN_HEADER
 
 
   /*
-   * C++ refuses to handle statements like p = (void*)anything, with `p' a
-   * typed pointer.  Since we don't have a `typeof' operator in standard C++,
-   * we have to use a template to emulate it.
+   *  C++ refuses to handle statements like p = (void*)anything, with `p' a
+   *  typed pointer.  Since we don't have a `typeof' operator in standard
+   *  C++, we have to use a template to emulate it.
    */
 
 #ifdef __cplusplus
@@ -107,8 +107,8 @@ extern "C++"
 
 
   /*
-   * The allocation functions return a pointer, and the error code is written
-   * to through the `p_error' parameter.
+   *  The allocation functions return a pointer, and the error code
+   *  is written to through the `p_error' parameter.
    */
 
   /* The `q' variants of the functions below (`q' for `quick') don't fill */
@@ -253,19 +253,20 @@ extern "C++"
 
 
   /*
-   * Return the maximum number of addressable elements in an array.  We limit
-   * ourselves to INT_MAX, rather than UINT_MAX, to avoid any problems.
+   *  Return the maximum number of addressable elements in an array.
+   *  We limit ourselves to INT_MAX, rather than UINT_MAX, to avoid
+   *  any problems.
    */
 #define FT_ARRAY_MAX( ptr )           ( FT_INT_MAX / sizeof ( *(ptr) ) )
 
 #define FT_ARRAY_CHECK( ptr, count )  ( (count) <= FT_ARRAY_MAX( ptr ) )
 
 
-  /**************************************************************************
-   *
-   * The following functions macros expect that their pointer argument is
-   * _typed_ in order to automatically compute array element sizes.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* The following functions macros expect that their pointer argument is  */
+  /* _typed_ in order to automatically compute array element sizes.        */
+  /*                                                                       */
 
 #define FT_MEM_NEW_ARRAY( ptr, count )                              \
           FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory,            \

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 459 - 386
thirdparty/freetype/include/freetype/internal/ftobjs.h


+ 71 - 0
thirdparty/freetype/include/freetype/internal/ftpic.h

@@ -0,0 +1,71 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftpic.h                                                                */
+/*                                                                         */
+/*    The FreeType position independent code services (declaration).       */
+/*                                                                         */
+/*  Copyright 2009-2018 by                                                 */
+/*  Oran Agra and Mickey Gabel.                                            */
+/*                                                                         */
+/*  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.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+  /*************************************************************************/
+  /*                                                                       */
+  /*  Modules that ordinarily have const global data that need address     */
+  /*  can instead define pointers here.                                    */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+#ifndef FTPIC_H_
+#define FTPIC_H_
+
+
+FT_BEGIN_HEADER
+
+#ifdef FT_CONFIG_OPTION_PIC
+
+  typedef struct  FT_PIC_Container_
+  {
+    /* pic containers for base */
+    void*  base;
+
+    /* pic containers for modules */
+    void*  autofit;
+    void*  cff;
+    void*  pshinter;
+    void*  psnames;
+    void*  raster;
+    void*  sfnt;
+    void*  smooth;
+    void*  truetype;
+
+  } FT_PIC_Container;
+
+
+  /* Initialize the various function tables, structs, etc. */
+  /* stored in the container.                              */
+  FT_BASE( FT_Error )
+  ft_pic_container_init( FT_Library  library );
+
+
+  /* Destroy the contents of the container. */
+  FT_BASE( void )
+  ft_pic_container_destroy( FT_Library  library );
+
+#endif /* FT_CONFIG_OPTION_PIC */
+
+ /* */
+
+FT_END_HEADER
+
+#endif /* FTPIC_H_ */
+
+
+/* END */

+ 16 - 16
thirdparty/freetype/include/freetype/internal/ftpsprop.h

@@ -1,19 +1,19 @@
-/****************************************************************************
- *
- * ftpsprop.h
- *
- *   Get and set properties of PostScript drivers (specification).
- *
- * Copyright (C) 2017-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  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_

+ 163 - 142
thirdparty/freetype/include/freetype/internal/ftrfork.h

@@ -1,24 +1,24 @@
-/****************************************************************************
- *
- * ftrfork.h
- *
- *   Embedded resource forks accessor (specification).
- *
- * Copyright (C) 2004-2019 by
- * Masatake YAMATO and Redhat K.K.
- *
- * 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.
- *
- */
-
-/****************************************************************************
- * Development of the code in this file is support of
- * Information-technology Promotion Agency, Japan.
- */
+/***************************************************************************/
+/*                                                                         */
+/*  ftrfork.h                                                              */
+/*                                                                         */
+/*    Embedded resource forks accessor (specification).                    */
+/*                                                                         */
+/*  Copyright 2004-2018 by                                                 */
+/*  Masatake YAMATO and Redhat K.K.                                        */
+/*                                                                         */
+/*  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.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+/***************************************************************************/
+/* Development of the code in this file is support of                      */
+/* Information-technology Promotion Agency, Japan.                         */
+/***************************************************************************/
 
 
 #ifndef FTRFORK_H_
@@ -72,65 +72,85 @@ FT_BEGIN_HEADER
   } FT_RFork_Rule;
 
   /* For fast translation between rule index and rule type,
-   * the macros FT_RFORK_xxx should be kept consistent with the
-   * raccess_guess_funcs table
+   * the macros FT_RFORK_xxx should be kept consistent with
+   * the raccess_guess_funcs table
    */
   typedef struct ft_raccess_guess_rec_ {
     ft_raccess_guess_func  func;
     FT_RFork_Rule          type;
   } ft_raccess_guess_rec;
 
+#ifndef FT_CONFIG_OPTION_PIC
 
+  /* this array is a storage in non-PIC mode, so ; is needed in END */
 #define CONST_FT_RFORK_RULE_ARRAY_BEGIN( name, type )  \
           static const type name[] = {
 #define CONST_FT_RFORK_RULE_ARRAY_ENTRY( func_suffix, type_suffix )  \
           { raccess_guess_ ## func_suffix,                           \
             FT_RFork_Rule_ ## type_suffix },
-  /* this array is a storage, thus a final `;' is needed */
 #define CONST_FT_RFORK_RULE_ARRAY_END  };
 
+#else /* FT_CONFIG_OPTION_PIC */
+
+  /* this array is a function in PIC mode, so no ; is needed in END */
+#define CONST_FT_RFORK_RULE_ARRAY_BEGIN( name, type )  \
+          void                                         \
+          FT_Init_Table_ ## name( type*  storage )     \
+          {                                            \
+            type*  local = storage;                    \
+                                                       \
+                                                       \
+            int  i = 0;
+#define CONST_FT_RFORK_RULE_ARRAY_ENTRY( func_suffix, type_suffix )  \
+          local[i].func = raccess_guess_ ## func_suffix;             \
+          local[i].type = FT_RFork_Rule_ ## type_suffix;             \
+          i++;
+#define CONST_FT_RFORK_RULE_ARRAY_END  }
+
+#endif /* FT_CONFIG_OPTION_PIC */
+
 #endif /* FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK */
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Raccess_Guess
-   *
-   * @description:
-   *   Guess a file name and offset where the actual resource fork is stored.
-   *   The macro FT_RACCESS_N_RULES holds the number of guessing rules; the
-   *   guessed result for the Nth rule is represented as a triplet: a new
-   *   file name (new_names[N]), a file offset (offsets[N]), and an error
-   *   code (errors[N]).
-   *
-   * @input:
-   *   library ::
-   *     A FreeType library instance.
-   *
-   *   stream ::
-   *     A file stream containing the resource fork.
-   *
-   *   base_name ::
-   *     The (base) file name of the resource fork used for some guessing
-   *     rules.
-   *
-   * @output:
-   *   new_names ::
-   *     An array of guessed file names in which the resource forks may
-   *     exist.  If 'new_names[N]' is `NULL`, the guessed file name is equal
-   *     to `base_name`.
-   *
-   *   offsets ::
-   *     An array of guessed file offsets.  'offsets[N]' holds the file
-   *     offset of the possible start of the resource fork in file
-   *     'new_names[N]'.
-   *
-   *   errors ::
-   *     An array of FreeType error codes.  'errors[N]' is the error code of
-   *     Nth guessing rule function.  If 'errors[N]' is not FT_Err_Ok,
-   *     'new_names[N]' and 'offsets[N]' are meaningless.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Raccess_Guess                                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Guess a file name and offset where the actual resource fork is     */
+  /*    stored.  The macro FT_RACCESS_N_RULES holds the number of          */
+  /*    guessing rules;  the guessed result for the Nth rule is            */
+  /*    represented as a triplet: a new file name (new_names[N]), a file   */
+  /*    offset (offsets[N]), and an error code (errors[N]).                */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    library ::                                                         */
+  /*      A FreeType library instance.                                     */
+  /*                                                                       */
+  /*    stream ::                                                          */
+  /*      A file stream containing the resource fork.                      */
+  /*                                                                       */
+  /*    base_name ::                                                       */
+  /*      The (base) file name of the resource fork used for some          */
+  /*      guessing rules.                                                  */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    new_names ::                                                       */
+  /*      An array of guessed file names in which the resource forks may   */
+  /*      exist.  If `new_names[N]' is NULL, the guessed file name is      */
+  /*      equal to `base_name'.                                            */
+  /*                                                                       */
+  /*    offsets ::                                                         */
+  /*      An array of guessed file offsets.  `offsets[N]' holds the file   */
+  /*      offset of the possible start of the resource fork in file        */
+  /*      `new_names[N]'.                                                  */
+  /*                                                                       */
+  /*    errors ::                                                          */
+  /*      An array of FreeType error codes.  `errors[N]' is the error      */
+  /*      code of Nth guessing rule function.  If `errors[N]' is not       */
+  /*      FT_Err_Ok, `new_names[N]' and `offsets[N]' are meaningless.      */
+  /*                                                                       */
   FT_BASE( void )
   FT_Raccess_Guess( FT_Library  library,
                     FT_Stream   stream,
@@ -140,37 +160,37 @@ FT_BEGIN_HEADER
                     FT_Error*   errors );
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Raccess_Get_HeaderInfo
-   *
-   * @description:
-   *   Get the information from the header of resource fork.  The information
-   *   includes the file offset where the resource map starts, and the file
-   *   offset where the resource data starts.  `FT_Raccess_Get_DataOffsets`
-   *   requires these two data.
-   *
-   * @input:
-   *   library ::
-   *     A FreeType library instance.
-   *
-   *   stream ::
-   *     A file stream containing the resource fork.
-   *
-   *   rfork_offset ::
-   *     The file offset where the resource fork starts.
-   *
-   * @output:
-   *   map_offset ::
-   *     The file offset where the resource map starts.
-   *
-   *   rdata_pos ::
-   *     The file offset where the resource data starts.
-   *
-   * @return:
-   *   FreeType error code.  FT_Err_Ok means success.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Raccess_Get_HeaderInfo                                          */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Get the information from the header of resource fork.  The         */
+  /*    information includes the file offset where the resource map        */
+  /*    starts, and the file offset where the resource data starts.        */
+  /*    `FT_Raccess_Get_DataOffsets' requires these two data.              */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    library ::                                                         */
+  /*      A FreeType library instance.                                     */
+  /*                                                                       */
+  /*    stream ::                                                          */
+  /*      A file stream containing the resource fork.                      */
+  /*                                                                       */
+  /*    rfork_offset ::                                                    */
+  /*      The file offset where the resource fork starts.                  */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    map_offset ::                                                      */
+  /*      The file offset where the resource map starts.                   */
+  /*                                                                       */
+  /*    rdata_pos ::                                                       */
+  /*      The file offset where the resource data starts.                  */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  FT_Err_Ok means success.                     */
+  /*                                                                       */
   FT_BASE( FT_Error )
   FT_Raccess_Get_HeaderInfo( FT_Library  library,
                              FT_Stream   stream,
@@ -179,54 +199,55 @@ FT_BEGIN_HEADER
                              FT_Long    *rdata_pos );
 
 
-  /**************************************************************************
-   *
-   * @function:
-   *   FT_Raccess_Get_DataOffsets
-   *
-   * @description:
-   *   Get the data offsets for a tag in a resource fork.  Offsets are stored
-   *   in an array because, in some cases, resources in a resource fork have
-   *   the same tag.
-   *
-   * @input:
-   *   library ::
-   *     A FreeType library instance.
-   *
-   *   stream ::
-   *     A file stream containing the resource fork.
-   *
-   *   map_offset ::
-   *     The file offset where the resource map starts.
-   *
-   *   rdata_pos ::
-   *     The file offset where the resource data starts.
-   *
-   *   tag ::
-   *     The resource tag.
-   *
-   *   sort_by_res_id ::
-   *     A Boolean to sort the fragmented resource by their ids.  The
-   *     fragmented resources for 'POST' resource should be sorted to restore
-   *     Type1 font properly.  For 'sfnt' resources, sorting may induce a
-   *     different order of the faces in comparison to that by QuickDraw API.
-   *
-   * @output:
-   *   offsets ::
-   *     The stream offsets for the resource data specified by 'tag'.  This
-   *     array is allocated by the function, so you have to call @ft_mem_free
-   *     after use.
-   *
-   *   count ::
-   *     The length of offsets array.
-   *
-   * @return:
-   *   FreeType error code.  FT_Err_Ok means success.
-   *
-   * @note:
-   *   Normally you should use `FT_Raccess_Get_HeaderInfo` to get the value
-   *   for `map_offset` and `rdata_pos`.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Raccess_Get_DataOffsets                                         */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Get the data offsets for a tag in a resource fork.  Offsets are    */
+  /*    stored in an array because, in some cases, resources in a resource */
+  /*    fork have the same tag.                                            */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    library ::                                                         */
+  /*      A FreeType library instance.                                     */
+  /*                                                                       */
+  /*    stream ::                                                          */
+  /*      A file stream containing the resource fork.                      */
+  /*                                                                       */
+  /*    map_offset ::                                                      */
+  /*      The file offset where the resource map starts.                   */
+  /*                                                                       */
+  /*    rdata_pos ::                                                       */
+  /*      The file offset where the resource data starts.                  */
+  /*                                                                       */
+  /*    tag ::                                                             */
+  /*      The resource tag.                                                */
+  /*                                                                       */
+  /*    sort_by_res_id ::                                                  */
+  /*      A Boolean to sort the fragmented resource by their ids.          */
+  /*      The fragmented resources for `POST' resource should be sorted    */
+  /*      to restore Type1 font properly.  For `sfnt' resources, sorting   */
+  /*      may induce a different order of the faces in comparison to that  */
+  /*      by QuickDraw API.                                                */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    offsets ::                                                         */
+  /*      The stream offsets for the resource data specified by `tag'.     */
+  /*      This array is allocated by the function, so you have to call     */
+  /*      @ft_mem_free after use.                                          */
+  /*                                                                       */
+  /*    count ::                                                           */
+  /*      The length of offsets array.                                     */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  FT_Err_Ok means success.                     */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    Normally you should use `FT_Raccess_Get_HeaderInfo' to get the     */
+  /*    value for `map_offset' and `rdata_pos'.                            */
+  /*                                                                       */
   FT_BASE( FT_Error )
   FT_Raccess_Get_DataOffsets( FT_Library  library,
                               FT_Stream   stream,

+ 582 - 87
thirdparty/freetype/include/freetype/internal/ftserv.h

@@ -1,31 +1,31 @@
-/****************************************************************************
- *
- * ftserv.h
- *
- *   The FreeType services (specification only).
- *
- * Copyright (C) 2003-2019 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.
- *
- */
-
-  /**************************************************************************
-   *
-   * Each module can export one or more 'services'.  Each service is
-   * identified by a constant string and modeled by a pointer; the latter
-   * generally corresponds to a structure containing function pointers.
-   *
-   * Note that a service's data cannot be a mere function pointer because in
-   * C it is possible that function pointers might be implemented differently
-   * than data pointers (e.g. 48 bits instead of 32).
-   *
-   */
+/***************************************************************************/
+/*                                                                         */
+/*  ftserv.h                                                               */
+/*                                                                         */
+/*    The FreeType services (specification only).                          */
+/*                                                                         */
+/*  Copyright 2003-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.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+  /*************************************************************************/
+  /*                                                                       */
+  /*  Each module can export one or more `services'.  Each service is      */
+  /*  identified by a constant string and modeled by a pointer; the latter */
+  /*  generally corresponds to a structure containing function pointers.   */
+  /*                                                                       */
+  /*  Note that a service's data cannot be a mere function pointer because */
+  /*  in C it is possible that function pointers might be implemented      */
+  /*  differently than data pointers (e.g. 48 bits instead of 32).         */
+  /*                                                                       */
+  /*************************************************************************/
 
 
 #ifndef FTSERV_H_
@@ -34,8 +34,7 @@
 
 FT_BEGIN_HEADER
 
-  /**************************************************************************
-   *
+  /*
    * @macro:
    *   FT_FACE_FIND_SERVICE
    *
@@ -47,15 +46,15 @@ FT_BEGIN_HEADER
    *     The source face handle.
    *
    *   id ::
-   *     A string describing the service as defined in the service's header
-   *     files (e.g. FT_SERVICE_ID_MULTI_MASTERS which expands to
-   *     'multi-masters').  It is automatically prefixed with
-   *     `FT_SERVICE_ID_`.
+   *     A string describing the service as defined in the service's
+   *     header files (e.g. FT_SERVICE_ID_MULTI_MASTERS which expands to
+   *     `multi-masters').  It is automatically prefixed with
+   *     `FT_SERVICE_ID_'.
    *
    * @output:
    *   ptr ::
-   *     A variable that receives the service pointer.  Will be `NULL` if not
-   *     found.
+   *     A variable that receives the service pointer.  Will be NULL
+   *     if not found.
    */
 #ifdef __cplusplus
 
@@ -86,8 +85,7 @@ FT_BEGIN_HEADER
 #endif /* !C++ */
 
 
-  /**************************************************************************
-   *
+  /*
    * @macro:
    *   FT_FACE_FIND_GLOBAL_SERVICE
    *
@@ -99,15 +97,15 @@ FT_BEGIN_HEADER
    *     The source face handle.
    *
    *   id ::
-   *     A string describing the service as defined in the service's header
-   *     files (e.g. FT_SERVICE_ID_MULTI_MASTERS which expands to
-   *     'multi-masters').  It is automatically prefixed with
-   *     `FT_SERVICE_ID_`.
+   *     A string describing the service as defined in the service's
+   *     header files (e.g. FT_SERVICE_ID_MULTI_MASTERS which expands to
+   *     `multi-masters').  It is automatically prefixed with
+   *     `FT_SERVICE_ID_'.
    *
    * @output:
    *   ptr ::
-   *     A variable that receives the service pointer.  Will be `NULL` if not
-   *     found.
+   *     A variable that receives the service pointer.  Will be NULL
+   *     if not found.
    */
 #ifdef __cplusplus
 
@@ -146,8 +144,8 @@ FT_BEGIN_HEADER
   /*************************************************************************/
 
   /*
-   * The following structure is used to _describe_ a given service to the
-   * library.  This is useful to build simple static service lists.
+   *  The following structure is used to _describe_ a given service
+   *  to the library.  This is useful to build simple static service lists.
    */
   typedef struct  FT_ServiceDescRec_
   {
@@ -159,26 +157,35 @@ FT_BEGIN_HEADER
   typedef const FT_ServiceDescRec*  FT_ServiceDesc;
 
 
-  /**************************************************************************
-   *
-   * @macro:
-   *   FT_DEFINE_SERVICEDESCREC1
-   *   FT_DEFINE_SERVICEDESCREC2
-   *   FT_DEFINE_SERVICEDESCREC3
-   *   FT_DEFINE_SERVICEDESCREC4
-   *   FT_DEFINE_SERVICEDESCREC5
-   *   FT_DEFINE_SERVICEDESCREC6
-   *   FT_DEFINE_SERVICEDESCREC7
-   *   FT_DEFINE_SERVICEDESCREC8
-   *   FT_DEFINE_SERVICEDESCREC9
-   *   FT_DEFINE_SERVICEDESCREC10
-   *
-   * @description:
-   *   Used to initialize an array of FT_ServiceDescRec structures.
-   *
-   *   The array will be allocated in the global scope (or the scope where
-   *   the macro is used).
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Macro>                                                               */
+  /*    FT_DEFINE_SERVICEDESCREC1                                          */
+  /*    FT_DEFINE_SERVICEDESCREC2                                          */
+  /*    FT_DEFINE_SERVICEDESCREC3                                          */
+  /*    FT_DEFINE_SERVICEDESCREC4                                          */
+  /*    FT_DEFINE_SERVICEDESCREC5                                          */
+  /*    FT_DEFINE_SERVICEDESCREC6                                          */
+  /*    FT_DEFINE_SERVICEDESCREC7                                          */
+  /*    FT_DEFINE_SERVICEDESCREC8                                          */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Used to initialize an array of FT_ServiceDescRec structures.       */
+  /*                                                                       */
+  /*    When FT_CONFIG_OPTION_PIC is defined a `create' function needs to  */
+  /*    be called with a pointer to return an allocated array.  As soon as */
+  /*    it is no longer needed, a `destroy' function needs to be called to */
+  /*    release that allocation.                                           */
+  /*                                                                       */
+  /*    These functions should be manually called from the `pic_init' and  */
+  /*    `pic_free' functions of your module (see FT_DEFINE_MODULE).        */
+  /*                                                                       */
+  /*    When FT_CONFIG_OPTION_PIC is not defined the array will be         */
+  /*    allocated in the global scope (or the scope where the macro is     */
+  /*    used).                                                             */
+  /*                                                                       */
+#ifndef FT_CONFIG_OPTION_PIC
+
 #define FT_DEFINE_SERVICEDESCREC1( class_,                                  \
                                    serv_id_1, serv_data_1 )                 \
   static const FT_ServiceDescRec  class_[] =                                \
@@ -349,15 +356,504 @@ FT_BEGIN_HEADER
     { NULL, NULL }                                                          \
   };
 
+#else /* FT_CONFIG_OPTION_PIC */
+
+#define FT_DEFINE_SERVICEDESCREC1( class_,                                  \
+                                   serv_id_1, serv_data_1 )                 \
+  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 ) * 2 ) )                         \
+      return error;                                                         \
+                                                                            \
+    clazz[0].serv_id   = serv_id_1;                                         \
+    clazz[0].serv_data = serv_data_1;                                       \
+    clazz[1].serv_id   = NULL;                                              \
+    clazz[1].serv_data = NULL;                                              \
+                                                                            \
+    *output_class = clazz;                                                  \
+                                                                            \
+    return FT_Err_Ok;                                                       \
+  }
+
+#define FT_DEFINE_SERVICEDESCREC2( class_,                                  \
+                                   serv_id_1, serv_data_1,                  \
+                                   serv_id_2, serv_data_2 )                 \
+  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 ) * 3 ) )                         \
+      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   = NULL;                                              \
+    clazz[2].serv_data = NULL;                                              \
+                                                                            \
+    *output_class = clazz;                                                  \
+                                                                            \
+    return FT_Err_Ok;                                                       \
+  }
+
+#define FT_DEFINE_SERVICEDESCREC3( class_,                                  \
+                                   serv_id_1, serv_data_1,                  \
+                                   serv_id_2, serv_data_2,                  \
+                                   serv_id_3, serv_data_3 )                 \
+  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 ) * 4 ) )                         \
+      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   = NULL;                                              \
+    clazz[3].serv_data = NULL;                                              \
+                                                                            \
+    *output_class = clazz;                                                  \
+                                                                            \
+    return FT_Err_Ok;                                                       \
+  }
+
+#define FT_DEFINE_SERVICEDESCREC4( 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 )                 \
+  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 ) * 5 ) )                         \
+      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   = NULL;                                              \
+    clazz[4].serv_data = NULL;                                              \
+                                                                            \
+    *output_class = clazz;                                                  \
+                                                                            \
+    return FT_Err_Ok;                                                       \
+  }
+
+#define FT_DEFINE_SERVICEDESCREC5( 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 )                 \
+  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 ) * 6 ) )                         \
+      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   = NULL;                                              \
+    clazz[5].serv_data = NULL;                                              \
+                                                                            \
+    *output_class = clazz;                                                  \
+                                                                            \
+    return FT_Err_Ok;                                                       \
+  }
+
+#define FT_DEFINE_SERVICEDESCREC6( 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 )                 \
+  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 ) * 7 ) )                         \
+      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   = NULL;                                              \
+    clazz[6].serv_data = NULL;                                              \
+                                                                            \
+    *output_class = clazz;                                                  \
+                                                                            \
+    return FT_Err_Ok;                                                       \
+  }
+
+#define FT_DEFINE_SERVICEDESCREC7( 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 )                 \
+  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 ) * 8 ) )                         \
+      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   = NULL;                                              \
+    clazz[7].serv_data = NULL;                                              \
+                                                                            \
+    *output_class = clazz;                                                  \
+                                                                            \
+    return FT_Err_Ok;                                                       \
+  }
+
+#define FT_DEFINE_SERVICEDESCREC8( 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 )                 \
+  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 ) * 9 ) )                         \
+      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   = NULL;                                              \
+    clazz[8].serv_data = NULL;                                              \
+                                                                            \
+    *output_class = clazz;                                                  \
+                                                                            \
+    return FT_Err_Ok;                                                       \
+  }
+
+#define FT_DEFINE_SERVICEDESCREC9( 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 )                 \
+  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 ) * 10 ) )                        \
+      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   = NULL;                                              \
+    clazz[9].serv_data = NULL;                                              \
+                                                                            \
+    *output_class = clazz;                                                  \
+                                                                            \
+    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 */
+
 
   /*
-   * Parse a list of FT_ServiceDescRec descriptors and look for a specific
-   * service by ID.  Note that the last element in the array must be { NULL,
-   * NULL }, and that the function should return NULL if the service isn't
-   * available.
+   *  Parse a list of FT_ServiceDescRec descriptors and look for
+   *  a specific service by ID.  Note that the last element in the
+   *  array must be { NULL, NULL }, and that the function should
+   *  return NULL if the service isn't available.
    *
-   * This function can be used by modules to implement their `get_service'
-   * method.
+   *  This function can be used by modules to implement their
+   *  `get_service' method.
    */
   FT_BASE( FT_Pointer )
   ft_service_list_lookup( FT_ServiceDesc  service_descriptors,
@@ -373,16 +869,16 @@ FT_BEGIN_HEADER
   /*************************************************************************/
 
   /*
-   * This structure is used to store a cache for several frequently used
-   * services.  It is the type of `face->internal->services'.  You should
-   * only use FT_FACE_LOOKUP_SERVICE to access it.
+   *  This structure is used to store a cache for several frequently used
+   *  services.  It is the type of `face->internal->services'.  You
+   *  should only use FT_FACE_LOOKUP_SERVICE to access it.
    *
-   * All fields should have the type FT_Pointer to relax compilation
-   * dependencies.  We assume the developer isn't completely stupid.
+   *  All fields should have the type FT_Pointer to relax compilation
+   *  dependencies.  We assume the developer isn't completely stupid.
    *
-   * Each field must be named `service_XXXX' where `XXX' corresponds to the
-   * correct FT_SERVICE_ID_XXXX macro.  See the definition of
-   * FT_FACE_LOOKUP_SERVICE below how this is implemented.
+   *  Each field must be named `service_XXXX' where `XXX' corresponds to
+   *  the correct FT_SERVICE_ID_XXXX macro.  See the definition of
+   *  FT_FACE_LOOKUP_SERVICE below how this is implemented.
    *
    */
   typedef struct  FT_ServiceCacheRec_
@@ -398,15 +894,14 @@ FT_BEGIN_HEADER
 
 
   /*
-   * A magic number used within the services cache.
+   *  A magic number used within the services cache.
    */
 
   /* ensure that value `1' has the same width as a pointer */
 #define FT_SERVICE_UNAVAILABLE  ((FT_Pointer)~(FT_PtrDist)1)
 
 
-  /**************************************************************************
-   *
+  /*
    * @macro:
    *   FT_FACE_LOOKUP_SERVICE
    *
@@ -415,7 +910,7 @@ FT_BEGIN_HEADER
    *   using its cache.
    *
    * @input:
-   *   face ::
+   *   face::
    *     The source face handle containing the cache.
    *
    *   field ::
@@ -426,7 +921,7 @@ FT_BEGIN_HEADER
    *
    * @output:
    *   ptr ::
-   *     A variable receiving the service data.  `NULL` if not available.
+   *     A variable receiving the service data.  NULL if not available.
    */
 #ifdef __cplusplus
 
@@ -474,7 +969,7 @@ FT_BEGIN_HEADER
 #endif /* !C++ */
 
   /*
-   * A macro used to define new service structure types.
+   *  A macro used to define new service structure types.
    */
 
 #define FT_DEFINE_SERVICE( name )            \
@@ -487,7 +982,7 @@ FT_BEGIN_HEADER
   /* */
 
   /*
-   * The header files containing the services.
+   *  The header files containing the services.
    */
 
 #define FT_SERVICE_BDF_H                <freetype/internal/services/svbdf.h>

+ 35 - 60
thirdparty/freetype/include/freetype/internal/ftstream.h

@@ -1,19 +1,19 @@
-/****************************************************************************
- *
- * ftstream.h
- *
- *   Stream handling (specification).
- *
- * Copyright (C) 1996-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  ftstream.h                                                             */
+/*                                                                         */
+/*    Stream handling (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 FTSTREAM_H_
@@ -96,13 +96,13 @@ FT_BEGIN_HEADER
   /* The structure type must be set in the FT_STRUCTURE macro before       */
   /* calling the FT_FRAME_START() macro.                                   */
   /*                                                                       */
-#define FT_FIELD_SIZE( f )                          \
+#define FT_FIELD_SIZE( f ) \
           (FT_Byte)sizeof ( ((FT_STRUCTURE*)0)->f )
 
-#define FT_FIELD_SIZE_DELTA( f )                       \
+#define FT_FIELD_SIZE_DELTA( f ) \
           (FT_Byte)sizeof ( ((FT_STRUCTURE*)0)->f[0] )
 
-#define FT_FIELD_OFFSET( f )                         \
+#define FT_FIELD_OFFSET( f ) \
           (FT_UShort)( offsetof( FT_STRUCTURE, f ) )
 
 #define FT_FRAME_FIELD( frame_op, field ) \
@@ -147,11 +147,11 @@ FT_BEGIN_HEADER
 #define FT_FRAME_SKIP_BYTES( count )  { ft_frame_skip, count, 0 }
 
 
-  /**************************************************************************
-   *
-   * Integer extraction macros -- the 'buffer' parameter must ALWAYS be of
-   * type 'char*' or equivalent (1-byte elements).
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* Integer extraction macros -- the `buffer' parameter must ALWAYS be of */
+  /* type `char*' or equivalent (1-byte elements).                         */
+  /*                                                                       */
 
 #define FT_BYTE_( p, i )  ( ((const FT_Byte*)(p))[(i)] )
 
@@ -165,10 +165,6 @@ FT_BEGIN_HEADER
 #define FT_BYTE_U32( p, i, s )  ( FT_UINT32( FT_BYTE_( p, i ) ) << (s) )
 
 
-  /*
-   * `FT_PEEK_XXX' are generic macros to get data from a buffer position.  No
-   * safety checks are performed.
-   */
 #define FT_PEEK_SHORT( p )  FT_INT16( FT_BYTE_U16( p, 0, 8 ) | \
                                       FT_BYTE_U16( p, 1, 0 ) )
 
@@ -217,10 +213,7 @@ FT_BEGIN_HEADER
                                           FT_BYTE_U32( p, 1,  8 ) | \
                                           FT_BYTE_U32( p, 0,  0 ) )
 
-  /*
-   * `FT_NEXT_XXX' are generic macros to get data from a buffer position
-   * which is then increased appropriately.  No safety checks are performed.
-   */
+
 #define FT_NEXT_CHAR( buffer )       \
           ( (signed char)*buffer++ )
 
@@ -265,14 +258,10 @@ FT_BEGIN_HEADER
           ( (unsigned long)( buffer += 4, FT_PEEK_ULONG_LE( buffer - 4 ) ) )
 
 
-  /**************************************************************************
-   *
-   * The `FT_GET_XXX` macros use an implicit 'stream' variable.
-   *
-   * Note that a call to `FT_STREAM_SEEK` or `FT_STREAM_POS` has **no**
-   * effect on `FT_GET_XXX`!  They operate on `stream->pos`, while
-   * `FT_GET_XXX` use `stream->cursor`.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* Each GET_xxxx() macro uses an implicit `stream' variable.             */
+  /*                                                                       */
 #if 0
 #define FT_GET_MACRO( type )    FT_NEXT_ ## type ( stream->cursor )
 
@@ -310,18 +299,10 @@ FT_BEGIN_HEADER
 #define FT_GET_ULONG_LE()   FT_GET_MACRO( FT_Stream_GetULongLE, FT_ULong )
 #endif
 
-
 #define FT_READ_MACRO( func, type, var )        \
           ( var = (type)func( stream, &error ), \
             error != FT_Err_Ok )
 
-  /*
-   * The `FT_READ_XXX' macros use implicit `stream' and `error' variables.
-   *
-   * `FT_READ_XXX' can be controlled with `FT_STREAM_SEEK' and
-   * `FT_STREAM_POS'.  They use the full machinery to check whether a read is
-   * valid.
-   */
 #define FT_READ_BYTE( var )       FT_READ_MACRO( FT_Stream_ReadChar, FT_Byte, var )
 #define FT_READ_CHAR( var )       FT_READ_MACRO( FT_Stream_ReadChar, FT_Char, var )
 #define FT_READ_SHORT( var )      FT_READ_MACRO( FT_Stream_ReadUShort, FT_Short, var )
@@ -406,14 +387,12 @@ FT_BEGIN_HEADER
 
   /* Enter a frame of `count' consecutive bytes in a stream.  Returns an */
   /* error if the frame could not be read/accessed.  The caller can use  */
-  /* the `FT_Stream_GetXXX' functions to retrieve frame data without     */
+  /* the FT_Stream_Get_XXX functions to retrieve frame data without      */
   /* error checks.                                                       */
   /*                                                                     */
-  /* You must _always_ call `FT_Stream_ExitFrame' once you have entered  */
+  /* You must _always_ call FT_Stream_ExitFrame() once you have entered  */
   /* a stream frame!                                                     */
   /*                                                                     */
-  /* Nested frames are not permitted.                                    */
-  /*                                                                     */
   FT_BASE( FT_Error )
   FT_Stream_EnterFrame( FT_Stream  stream,
                         FT_ULong   count );
@@ -422,29 +401,25 @@ FT_BEGIN_HEADER
   FT_BASE( void )
   FT_Stream_ExitFrame( FT_Stream  stream );
 
-
   /* Extract a stream frame.  If the stream is disk-based, a heap block */
   /* is allocated and the frame bytes are read into it.  If the stream  */
-  /* is memory-based, this function simply sets a pointer to the data.  */
+  /* is memory-based, this function simply set a pointer to the data.   */
   /*                                                                    */
   /* Useful to optimize access to memory-based streams transparently.   */
   /*                                                                    */
-  /* `FT_Stream_GetXXX' functions can't be used.                        */
-  /*                                                                    */
-  /* An extracted frame must be `freed' with a call to the function     */
-  /* `FT_Stream_ReleaseFrame'.                                          */
+  /* All extracted frames must be `freed' with a call to the function   */
+  /* FT_Stream_ReleaseFrame().                                          */
   /*                                                                    */
   FT_BASE( FT_Error )
   FT_Stream_ExtractFrame( FT_Stream  stream,
                           FT_ULong   count,
                           FT_Byte**  pbytes );
 
-  /* release an extract frame (see `FT_Stream_ExtractFrame') */
+  /* release an extract frame (see FT_Stream_ExtractFrame) */
   FT_BASE( void )
   FT_Stream_ReleaseFrame( FT_Stream  stream,
                           FT_Byte**  pbytes );
 
-
   /* read a byte from an entered frame */
   FT_BASE( FT_Char )
   FT_Stream_GetChar( FT_Stream  stream );

+ 40 - 43
thirdparty/freetype/include/freetype/internal/fttrace.h

@@ -1,19 +1,19 @@
-/****************************************************************************
- *
- * fttrace.h
- *
- *   Tracing handling (specification only).
- *
- * Copyright (C) 2002-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  fttrace.h                                                              */
+/*                                                                         */
+/*    Tracing handling (specification only).                               */
+/*                                                                         */
+/*  Copyright 2002-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.                                        */
+/*                                                                         */
+/***************************************************************************/
 
 
   /* definitions of trace levels for FreeType 2 */
@@ -23,24 +23,23 @@ FT_TRACE_DEF( any )
 
   /* base components */
 FT_TRACE_DEF( calc )      /* calculations            (ftcalc.c)   */
-FT_TRACE_DEF( gloader )   /* glyph loader            (ftgloadr.c) */
-FT_TRACE_DEF( glyph )     /* glyph management        (ftglyph.c)  */
 FT_TRACE_DEF( memory )    /* memory manager          (ftobjs.c)   */
-FT_TRACE_DEF( init )      /* initialization          (ftinit.c)   */
+FT_TRACE_DEF( stream )    /* stream manager          (ftstream.c) */
 FT_TRACE_DEF( io )        /* i/o interface           (ftsystem.c) */
 FT_TRACE_DEF( list )      /* list management         (ftlist.c)   */
+FT_TRACE_DEF( init )      /* initialization          (ftinit.c)   */
 FT_TRACE_DEF( objs )      /* base objects            (ftobjs.c)   */
 FT_TRACE_DEF( outline )   /* outline management      (ftoutln.c)  */
-FT_TRACE_DEF( stream )    /* stream manager          (ftstream.c) */
+FT_TRACE_DEF( glyph )     /* glyph management        (ftglyph.c)  */
+FT_TRACE_DEF( gloader )   /* glyph loader            (ftgloadr.c) */
 
-FT_TRACE_DEF( bitmap )    /* bitmap manipulation     (ftbitmap.c) */
-FT_TRACE_DEF( checksum )  /* bitmap checksum         (ftobjs.c)   */
-FT_TRACE_DEF( mm )        /* MM interface            (ftmm.c)     */
-FT_TRACE_DEF( psprops )   /* PS driver properties    (ftpsprop.c) */
-FT_TRACE_DEF( raccess )   /* resource fork accessor  (ftrfork.c)  */
 FT_TRACE_DEF( raster )    /* monochrome rasterizer   (ftraster.c) */
 FT_TRACE_DEF( smooth )    /* anti-aliasing raster    (ftgrays.c)  */
+FT_TRACE_DEF( mm )        /* MM interface            (ftmm.c)     */
+FT_TRACE_DEF( raccess )   /* resource fork accessor  (ftrfork.c)  */
 FT_TRACE_DEF( synth )     /* bold/slant synthesizer  (ftsynth.c)  */
+FT_TRACE_DEF( bitmap )    /* bitmap checksum         (ftobjs.c)   */
+FT_TRACE_DEF( psprops )   /* PS driver properties    (ftpsprop.c) */
 
   /* Cache sub-system */
 FT_TRACE_DEF( cache )     /* cache sub-system        (ftcache.c, etc.) */
@@ -48,23 +47,21 @@ FT_TRACE_DEF( cache )     /* cache sub-system        (ftcache.c, etc.) */
   /* SFNT driver components */
 FT_TRACE_DEF( sfdriver )  /* SFNT font driver        (sfdriver.c) */
 FT_TRACE_DEF( sfobjs )    /* SFNT object handler     (sfobjs.c)   */
-FT_TRACE_DEF( ttbdf )     /* TrueType embedded BDF   (ttbdf.c)    */
 FT_TRACE_DEF( ttcmap )    /* charmap handler         (ttcmap.c)   */
-FT_TRACE_DEF( ttcolr )    /* glyph layer table       (ttcolr.c)   */
-FT_TRACE_DEF( ttcpal )    /* color palette table     (ttcpal.c)   */
 FT_TRACE_DEF( ttkern )    /* kerning handler         (ttkern.c)   */
 FT_TRACE_DEF( ttload )    /* basic TrueType tables   (ttload.c)   */
 FT_TRACE_DEF( ttmtx )     /* metrics-related tables  (ttmtx.c)    */
 FT_TRACE_DEF( ttpost )    /* PS table processing     (ttpost.c)   */
 FT_TRACE_DEF( ttsbit )    /* TrueType sbit handling  (ttsbit.c)   */
+FT_TRACE_DEF( ttbdf )     /* TrueType embedded BDF   (ttbdf.c)    */
 
   /* TrueType driver components */
 FT_TRACE_DEF( ttdriver )  /* TT font driver          (ttdriver.c) */
 FT_TRACE_DEF( ttgload )   /* TT glyph loader         (ttgload.c)  */
-FT_TRACE_DEF( ttgxvar )   /* TrueType GX var handler (ttgxvar.c)  */
 FT_TRACE_DEF( ttinterp )  /* bytecode interpreter    (ttinterp.c) */
 FT_TRACE_DEF( ttobjs )    /* TT objects manager      (ttobjs.c)   */
 FT_TRACE_DEF( ttpload )   /* TT data/program loader  (ttpload.c)  */
+FT_TRACE_DEF( ttgxvar )   /* TrueType GX var handler (ttgxvar.c)  */
 
   /* Type 1 driver components */
 FT_TRACE_DEF( t1afm )
@@ -75,14 +72,14 @@ FT_TRACE_DEF( t1objs )
 FT_TRACE_DEF( t1parse )
 
   /* PostScript helper module `psaux' */
+FT_TRACE_DEF( t1decode )
 FT_TRACE_DEF( cffdecode )
-FT_TRACE_DEF( psconv )
 FT_TRACE_DEF( psobjs )
-FT_TRACE_DEF( t1decode )
+FT_TRACE_DEF( psconv )
 
   /* PostScript hinting module `pshinter' */
-FT_TRACE_DEF( pshalgo )
 FT_TRACE_DEF( pshrec )
+FT_TRACE_DEF( pshalgo )
 
   /* Type 2 driver components */
 FT_TRACE_DEF( cffdriver )
@@ -120,6 +117,7 @@ FT_TRACE_DEF( bdflib )
 FT_TRACE_DEF( pfr )
 
   /* OpenType validation components */
+FT_TRACE_DEF( otvmodule )
 FT_TRACE_DEF( otvcommon )
 FT_TRACE_DEF( otvbase )
 FT_TRACE_DEF( otvgdef )
@@ -127,30 +125,29 @@ FT_TRACE_DEF( otvgpos )
 FT_TRACE_DEF( otvgsub )
 FT_TRACE_DEF( otvjstf )
 FT_TRACE_DEF( otvmath )
-FT_TRACE_DEF( otvmodule )
 
   /* TrueTypeGX/AAT validation components */
-FT_TRACE_DEF( gxvbsln )
+FT_TRACE_DEF( gxvmodule )
 FT_TRACE_DEF( gxvcommon )
 FT_TRACE_DEF( gxvfeat )
-FT_TRACE_DEF( gxvjust )
-FT_TRACE_DEF( gxvkern )
-FT_TRACE_DEF( gxvmodule )
 FT_TRACE_DEF( gxvmort )
 FT_TRACE_DEF( gxvmorx )
-FT_TRACE_DEF( gxvlcar )
+FT_TRACE_DEF( gxvbsln )
+FT_TRACE_DEF( gxvjust )
+FT_TRACE_DEF( gxvkern )
 FT_TRACE_DEF( gxvopbd )
-FT_TRACE_DEF( gxvprop )
 FT_TRACE_DEF( gxvtrak )
+FT_TRACE_DEF( gxvprop )
+FT_TRACE_DEF( gxvlcar )
 
   /* autofit components */
-FT_TRACE_DEF( afcjk )
-FT_TRACE_DEF( afglobal )
-FT_TRACE_DEF( afhints )
 FT_TRACE_DEF( afmodule )
+FT_TRACE_DEF( afhints )
+FT_TRACE_DEF( afcjk )
 FT_TRACE_DEF( aflatin )
 FT_TRACE_DEF( aflatin2 )
-FT_TRACE_DEF( afshaper )
 FT_TRACE_DEF( afwarp )
+FT_TRACE_DEF( afshaper )
+FT_TRACE_DEF( afglobal )
 
 /* END */

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

@@ -1,19 +1,19 @@
-/****************************************************************************
- *
- * ftvalid.h
- *
- *   FreeType validation support (specification).
- *
- * Copyright (C) 2004-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  ftvalid.h                                                              */
+/*                                                                         */
+/*    FreeType validation support (specification).                         */
+/*                                                                         */
+/*  Copyright 2004-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 FTVALID_H_
@@ -42,31 +42,31 @@ FT_BEGIN_HEADER
   typedef struct FT_ValidatorRec_ volatile*  FT_Validator;
 
 
-  /**************************************************************************
-   *
-   * There are three distinct validation levels defined here:
-   *
-   * FT_VALIDATE_DEFAULT ::
-   *   A table that passes this validation level can be used reliably by
-   *   FreeType.  It generally means that all offsets have been checked to
-   *   prevent out-of-bound reads, that array counts are correct, etc.
-   *
-   * FT_VALIDATE_TIGHT ::
-   *   A table that passes this validation level can be used reliably and
-   *   doesn't contain invalid data.  For example, a charmap table that
-   *   returns invalid glyph indices will not pass, even though it can be
-   *   used with FreeType in default mode (the library will simply return an
-   *   error later when trying to load the glyph).
-   *
-   *   It also checks that fields which must be a multiple of 2, 4, or 8,
-   *   don't have incorrect values, etc.
-   *
-   * FT_VALIDATE_PARANOID ::
-   *   Only for font debugging.  Checks that a table follows the
-   *   specification by 100%.  Very few fonts will be able to pass this level
-   *   anyway but it can be useful for certain tools like font
-   *   editors/converters.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* There are three distinct validation levels defined here:              */
+  /*                                                                       */
+  /* FT_VALIDATE_DEFAULT ::                                                */
+  /*   A table that passes this validation level can be used reliably by   */
+  /*   FreeType.  It generally means that all offsets have been checked to */
+  /*   prevent out-of-bound reads, that array counts are correct, etc.     */
+  /*                                                                       */
+  /* FT_VALIDATE_TIGHT ::                                                  */
+  /*   A table that passes this validation level can be used reliably and  */
+  /*   doesn't contain invalid data.  For example, a charmap table that    */
+  /*   returns invalid glyph indices will not pass, even though it can     */
+  /*   be used with FreeType in default mode (the library will simply      */
+  /*   return an error later when trying to load the glyph).               */
+  /*                                                                       */
+  /*   It also checks that fields which must be a multiple of 2, 4, or 8,  */
+  /*   don't have incorrect values, etc.                                   */
+  /*                                                                       */
+  /* FT_VALIDATE_PARANOID ::                                               */
+  /*   Only for font debugging.  Checks that a table follows the           */
+  /*   specification by 100%.  Very few fonts will be able to pass this    */
+  /*   level anyway but it can be useful for certain tools like font       */
+  /*   editors/converters.                                                 */
+  /*                                                                       */
   typedef enum  FT_ValidationLevel_
   {
     FT_VALIDATE_DEFAULT = 0,

+ 23 - 22
thirdparty/freetype/include/freetype/internal/internal.h

@@ -1,30 +1,31 @@
-/****************************************************************************
- *
- * internal.h
- *
- *   Internal header files (specification only).
- *
- * Copyright (C) 1996-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  internal.h                                                             */
+/*                                                                         */
+/*    Internal header files (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.                                        */
+/*                                                                         */
+/***************************************************************************/
 
 
-  /**************************************************************************
-   *
-   * This file is automatically included by `ft2build.h`.  Do not include it
-   * manually!
-   *
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* This file is automatically included by `ft2build.h'.                  */
+  /* Do not include it manually!                                           */
+  /*                                                                       */
+  /*************************************************************************/
 
 
 #define FT_INTERNAL_OBJECTS_H             <freetype/internal/ftobjs.h>
+#define FT_INTERNAL_PIC_H                 <freetype/internal/ftpic.h>
 #define FT_INTERNAL_STREAM_H              <freetype/internal/ftstream.h>
 #define FT_INTERNAL_MEMORY_H              <freetype/internal/ftmemory.h>
 #define FT_INTERNAL_DEBUG_H               <freetype/internal/ftdebug.h>

+ 263 - 330
thirdparty/freetype/include/freetype/internal/psaux.h

@@ -1,20 +1,20 @@
-/****************************************************************************
- *
- * psaux.h
- *
- *   Auxiliary functions and data structures related to PostScript fonts
- *   (specification).
- *
- * Copyright (C) 1996-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  psaux.h                                                                */
+/*                                                                         */
+/*    Auxiliary functions and data structures related to PostScript fonts  */
+/*    (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 PSAUX_H_
@@ -35,10 +35,10 @@
 FT_BEGIN_HEADER
 
 
-  /**************************************************************************
-   *
-   * PostScript modules driver class.
-   */
+  /***********************************************************************/
+  /*                                                                     */
+  /* PostScript modules driver class.                                    */
+  /*                                                                     */
   typedef struct  PS_DriverRec_
   {
     FT_DriverRec  root;
@@ -64,27 +64,23 @@ FT_BEGIN_HEADER
   typedef const struct PS_Table_FuncsRec_*  PS_Table_Funcs;
 
 
-  /**************************************************************************
-   *
-   * @struct:
-   *   PS_Table_FuncsRec
-   *
-   * @description:
-   *   A set of function pointers to manage PS_Table objects.
-   *
-   * @fields:
-   *   table_init ::
-   *     Used to initialize a table.
-   *
-   *   table_done ::
-   *     Finalizes resp. destroy a given table.
-   *
-   *   table_add ::
-   *     Adds a new object to a table.
-   *
-   *   table_release ::
-   *     Releases table data, then finalizes it.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    PS_Table_FuncsRec                                                  */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A set of function pointers to manage PS_Table objects.             */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    table_init    :: Used to initialize a table.                       */
+  /*                                                                       */
+  /*    table_done    :: Finalizes resp. destroy a given table.            */
+  /*                                                                       */
+  /*    table_add     :: Adds a new object to a table.                     */
+  /*                                                                       */
+  /*    table_release :: Releases table data, then finalizes it.           */
+  /*                                                                       */
   typedef struct  PS_Table_FuncsRec_
   {
     FT_Error
@@ -107,47 +103,41 @@ FT_BEGIN_HEADER
   } PS_Table_FuncsRec;
 
 
-  /**************************************************************************
-   *
-   * @struct:
-   *   PS_TableRec
-   *
-   * @description:
-   *   A PS_Table is a simple object used to store an array of objects in a
-   *   single memory block.
-   *
-   * @fields:
-   *   block ::
-   *     The address in memory of the growheap's block.  This can change
-   *     between two object adds, due to reallocation.
-   *
-   *   cursor ::
-   *     The current top of the grow heap within its block.
-   *
-   *   capacity ::
-   *     The current size of the heap block.  Increments by 1kByte chunks.
-   *
-   *   init ::
-   *     Set to 0xDEADBEEF if 'elements' and 'lengths' have been allocated.
-   *
-   *   max_elems ::
-   *     The maximum number of elements in table.
-   *
-   *   num_elems ::
-   *     The current number of elements in table.
-   *
-   *   elements ::
-   *     A table of element addresses within the block.
-   *
-   *   lengths ::
-   *     A table of element sizes within the block.
-   *
-   *   memory ::
-   *     The object used for memory operations (alloc/realloc).
-   *
-   *   funcs ::
-   *     A table of method pointers for this object.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    PS_TableRec                                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A PS_Table is a simple object used to store an array of objects in */
+  /*    a single memory block.                                             */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    block     :: The address in memory of the growheap's block.  This  */
+  /*                 can change between two object adds, due to            */
+  /*                 reallocation.                                         */
+  /*                                                                       */
+  /*    cursor    :: The current top of the grow heap within its block.    */
+  /*                                                                       */
+  /*    capacity  :: The current size of the heap block.  Increments by    */
+  /*                 1kByte chunks.                                        */
+  /*                                                                       */
+  /*    init      :: Set to 0xDEADBEEF if `elements' and `lengths' have    */
+  /*                 been allocated.                                       */
+  /*                                                                       */
+  /*    max_elems :: The maximum number of elements in table.              */
+  /*                                                                       */
+  /*    num_elems :: The current number of elements in table.              */
+  /*                                                                       */
+  /*    elements  :: A table of element addresses within the block.        */
+  /*                                                                       */
+  /*    lengths   :: A table of element sizes within the block.            */
+  /*                                                                       */
+  /*    memory    :: The object used for memory operations                 */
+  /*                 (alloc/realloc).                                      */
+  /*                                                                       */
+  /*    funcs     :: A table of method pointers for this object.           */
+  /*                                                                       */
   typedef struct  PS_TableRec_
   {
     FT_Byte*           block;          /* current memory block           */
@@ -435,33 +425,27 @@ FT_BEGIN_HEADER
   } PS_Parser_FuncsRec;
 
 
-  /**************************************************************************
-   *
-   * @struct:
-   *   PS_ParserRec
-   *
-   * @description:
-   *   A PS_Parser is an object used to parse a Type 1 font very quickly.
-   *
-   * @fields:
-   *   cursor ::
-   *     The current position in the text.
-   *
-   *   base ::
-   *     Start of the processed text.
-   *
-   *   limit ::
-   *     End of the processed text.
-   *
-   *   error ::
-   *     The last error returned.
-   *
-   *   memory ::
-   *     The object used for memory operations (alloc/realloc).
-   *
-   *   funcs ::
-   *     A table of functions for the parser.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    PS_ParserRec                                                       */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A PS_Parser is an object used to parse a Type 1 font very quickly. */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    cursor :: The current position in the text.                        */
+  /*                                                                       */
+  /*    base   :: Start of the processed text.                             */
+  /*                                                                       */
+  /*    limit  :: End of the processed text.                               */
+  /*                                                                       */
+  /*    error  :: The last error returned.                                 */
+  /*                                                                       */
+  /*    memory :: The object used for memory operations (alloc/realloc).   */
+  /*                                                                       */
+  /*    funcs  :: A table of functions for the parser.                     */
+  /*                                                                       */
   typedef struct  PS_ParserRec_
   {
     FT_Byte*   cursor;
@@ -500,67 +484,51 @@ FT_BEGIN_HEADER
   } PS_Builder_FuncsRec;
 
 
-  /**************************************************************************
-   *
-   * @struct:
-   *   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.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <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;
@@ -761,70 +729,54 @@ FT_BEGIN_HEADER
   } T1_ParseState;
 
 
-  /**************************************************************************
-   *
-   * @struct:
-   *   T1_BuilderRec
-   *
-   * @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.
-   *
-   *   max_points ::
-   *     maximum points in builder outline
-   *
-   *   max_contours ::
-   *     Maximum number of contours in builder 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.
-   *
-   *   parse_state ::
-   *     An enumeration which controls the charstring parsing state.
-   *
-   *   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.
-   *
-   *   funcs ::
-   *     An array of function pointers for the builder.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Structure>                                                           */
+  /*    T1_BuilderRec                                                      */
+  /*                                                                       */
+  /* <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.                         */
+  /*                                                                       */
+  /*    max_points   :: maximum points in builder outline                  */
+  /*                                                                       */
+  /*    max_contours :: Maximum number of contours in builder 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.                                            */
+  /*                                                                       */
+  /*    parse_state  :: An enumeration which controls the charstring       */
+  /*                    parsing state.                                     */
+  /*                                                                       */
+  /*    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.                                            */
+  /*                                                                       */
+  /*    funcs        :: An array of function pointers for the builder.     */
+  /*                                                                       */
   typedef struct  T1_BuilderRec_
   {
     FT_Memory       memory;
@@ -865,19 +817,19 @@ FT_BEGIN_HEADER
 
 #if 0
 
-  /**************************************************************************
-   *
-   * T1_MAX_SUBRS_CALLS details the maximum number of nested sub-routine
-   * calls during glyph loading.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* T1_MAX_SUBRS_CALLS details the maximum number of nested sub-routine   */
+  /* calls during glyph loading.                                           */
+  /*                                                                       */
 #define T1_MAX_SUBRS_CALLS  8
 
 
-  /**************************************************************************
-   *
-   * T1_MAX_CHARSTRING_OPERANDS is the charstring stack's capacity.  A
-   * minimum of 16 is required.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* T1_MAX_CHARSTRING_OPERANDS is the charstring stack's capacity.  A     */
+  /* minimum of 16 is required.                                            */
+  /*                                                                       */
 #define T1_MAX_CHARSTRINGS_OPERANDS  32
 
 #endif /* 0 */
@@ -1041,70 +993,53 @@ FT_BEGIN_HEADER
   } CFF_Builder_FuncsRec;
 
 
-  /**************************************************************************
-   *
-   * @struct:
-   *   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.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <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;
@@ -1276,27 +1211,25 @@ FT_BEGIN_HEADER
   typedef struct AFM_StreamRec_*  AFM_Stream;
 
 
-  /**************************************************************************
-   *
-   * @struct:
-   *   AFM_ParserRec
-   *
-   * @description:
-   *   An AFM_Parser is a parser for the AFM files.
-   *
-   * @fields:
-   *   memory ::
-   *     The object used for memory operations (alloc and realloc).
-   *
-   *   stream ::
-   *     This is an opaque object.
-   *
-   *   FontInfo ::
-   *     The result will be stored here.
-   *
-   *   get_index ::
-   *     A user provided function to get a glyph index by its name.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    AFM_ParserRec                                                      */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    An AFM_Parser is a parser for the AFM files.                       */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    memory    :: The object used for memory operations (alloc and      */
+  /*                 realloc).                                             */
+  /*                                                                       */
+  /*    stream    :: This is an opaque object.                             */
+  /*                                                                       */
+  /*    FontInfo  :: The result will be stored here.                       */
+  /*                                                                       */
+  /*    get_index :: A user provided function to get a glyph index by its  */
+  /*                 name.                                                 */
+  /*                                                                       */
   typedef struct  AFM_ParserRec_
   {
     FT_Memory     memory;

+ 96 - 74
thirdparty/freetype/include/freetype/internal/pshints.h

@@ -1,21 +1,21 @@
-/****************************************************************************
- *
- * pshints.h
- *
- *   Interface to Postscript-specific (Type 1 and Type 2) hints
- *   recorders (specification only).  These are used to support native
- *   T1/T2 hints in the 'type1', 'cid', and 'cff' font drivers.
- *
- * Copyright (C) 2001-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  pshints.h                                                              */
+/*                                                                         */
+/*    Interface to Postscript-specific (Type 1 and Type 2) hints           */
+/*    recorders (specification only).  These are used to support native    */
+/*    T1/T2 hints in the `type1', `cid', and `cff' font drivers.           */
+/*                                                                         */
+/*  Copyright 2001-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 PSHINTS_H_
@@ -73,7 +73,7 @@ FT_BEGIN_HEADER
   /*************************************************************************/
   /*************************************************************************/
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @type:
    *   T1_Hints
@@ -86,16 +86,16 @@ FT_BEGIN_HEADER
    *   @T1_Hints_FuncsRec structure.  Recording glyph hints is normally
    *   achieved through the following scheme:
    *
-   *   - Open a new hint recording session by calling the 'open' method.
+   *   - Open a new hint recording session by calling the `open' method.
    *     This rewinds the recorder and prepare it for new input.
    *
    *   - For each hint found in the glyph charstring, call the corresponding
-   *     method ('stem', 'stem3', or 'reset').  Note that these functions do
+   *     method (`stem', `stem3', or `reset').  Note that these functions do
    *     not return an error code.
    *
-   *   - Close the recording session by calling the 'close' method.  It
-   *     returns an error code if the hints were invalid or something strange
-   *     happened (e.g., memory shortage).
+   *   - Close the recording session by calling the `close' method.  It
+   *     returns an error code if the hints were invalid or something
+   *     strange happened (e.g., memory shortage).
    *
    *   The hints accumulated in the object can later be used by the
    *   PostScript hinter.
@@ -104,7 +104,7 @@ FT_BEGIN_HEADER
   typedef struct T1_HintsRec_*  T1_Hints;
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @type:
    *   T1_Hints_Funcs
@@ -117,7 +117,7 @@ FT_BEGIN_HEADER
   typedef const struct T1_Hints_FuncsRec_*  T1_Hints_Funcs;
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @functype:
    *   T1_Hints_OpenFunc
@@ -139,14 +139,14 @@ FT_BEGIN_HEADER
   (*T1_Hints_OpenFunc)( T1_Hints  hints );
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @functype:
    *   T1_Hints_SetStemFunc
    *
    * @description:
    *   A method of the @T1_Hints class used to record a new horizontal or
-   *   vertical stem.  This corresponds to the Type 1 'hstem' and 'vstem'
+   *   vertical stem.  This corresponds to the Type 1 `hstem' and `vstem'
    *   operators.
    *
    * @input:
@@ -164,15 +164,15 @@ FT_BEGIN_HEADER
    *   Use vertical coordinates (y) for horizontal stems (dim=0).  Use
    *   horizontal coordinates (x) for vertical stems (dim=1).
    *
-   *   'coords[0]' is the absolute stem position (lowest coordinate);
-   *   'coords[1]' is the length.
+   *   `coords[0]' is the absolute stem position (lowest coordinate);
+   *   `coords[1]' is the length.
    *
    *   The length can be negative, in which case it must be either -20 or
-   *   -21.  It is interpreted as a 'ghost' stem, according to the Type 1
+   *   -21.  It is interpreted as a `ghost' stem, according to the Type 1
    *   specification.
    *
-   *   If the length is -21 (corresponding to a bottom ghost stem), then the
-   *   real stem position is 'coords[0]+coords[1]'.
+   *   If the length is -21 (corresponding to a bottom ghost stem), then
+   *   the real stem position is `coords[0]+coords[1]'.
    *
    */
   typedef void
@@ -181,7 +181,7 @@ FT_BEGIN_HEADER
                            FT_Fixed*  coords );
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @functype:
    *   T1_Hints_SetStem3Func
@@ -215,7 +215,7 @@ FT_BEGIN_HEADER
                             FT_Fixed*  coords );
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @functype:
    *   T1_Hints_ResetFunc
@@ -238,7 +238,7 @@ FT_BEGIN_HEADER
                          FT_UInt   end_point );
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @functype:
    *   T1_Hints_CloseFunc
@@ -267,7 +267,7 @@ FT_BEGIN_HEADER
                          FT_UInt   end_point );
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @functype:
    *   T1_Hints_ApplyFunc
@@ -297,7 +297,7 @@ FT_BEGIN_HEADER
    *   On input, all points within the outline are in font coordinates. On
    *   output, they are in 1/64th of pixels.
    *
-   *   The scaling transformation is taken from the 'globals' object which
+   *   The scaling transformation is taken from the `globals' object which
    *   must correspond to the same font as the glyph.
    *
    */
@@ -308,7 +308,7 @@ FT_BEGIN_HEADER
                          FT_Render_Mode  hint_mode );
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @struct:
    *   T1_Hints_FuncsRec
@@ -360,7 +360,7 @@ FT_BEGIN_HEADER
   /*************************************************************************/
   /*************************************************************************/
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @type:
    *   T2_Hints
@@ -373,16 +373,16 @@ FT_BEGIN_HEADER
    *   @T2_Hints_FuncsRec structure.  Recording glyph hints is normally
    *   achieved through the following scheme:
    *
-   *   - Open a new hint recording session by calling the 'open' method.
+   *   - Open a new hint recording session by calling the `open' method.
    *     This rewinds the recorder and prepare it for new input.
    *
    *   - For each hint found in the glyph charstring, call the corresponding
-   *     method ('stems', 'hintmask', 'counters').  Note that these functions
-   *     do not return an error code.
+   *     method (`stems', `hintmask', `counters').  Note that these
+   *     functions do not return an error code.
    *
-   *   - Close the recording session by calling the 'close' method.  It
-   *     returns an error code if the hints were invalid or something strange
-   *     happened (e.g., memory shortage).
+   *   - Close the recording session by calling the `close' method.  It
+   *     returns an error code if the hints were invalid or something
+   *     strange happened (e.g., memory shortage).
    *
    *   The hints accumulated in the object can later be used by the
    *   Postscript hinter.
@@ -391,7 +391,7 @@ FT_BEGIN_HEADER
   typedef struct T2_HintsRec_*  T2_Hints;
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @type:
    *   T2_Hints_Funcs
@@ -404,7 +404,7 @@ FT_BEGIN_HEADER
   typedef const struct T2_Hints_FuncsRec_*  T2_Hints_Funcs;
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @functype:
    *   T2_Hints_OpenFunc
@@ -426,7 +426,7 @@ FT_BEGIN_HEADER
   (*T2_Hints_OpenFunc)( T2_Hints  hints );
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @functype:
    *   T2_Hints_StemsFunc
@@ -434,7 +434,7 @@ FT_BEGIN_HEADER
    * @description:
    *   A method of the @T2_Hints class used to set the table of stems in
    *   either the vertical or horizontal dimension.  Equivalent to the
-   *   'hstem', 'vstem', 'hstemhm', and 'vstemhm' Type 2 operators.
+   *   `hstem', `vstem', `hstemhm', and `vstemhm' Type 2 operators.
    *
    * @input:
    *   hints ::
@@ -447,18 +447,18 @@ FT_BEGIN_HEADER
    *     The number of stems.
    *
    *   coords ::
-   *     An array of 'count' (position,length) pairs in 16.16 format.
+   *     An array of `count' (position,length) pairs in 16.16 format.
    *
    * @note:
    *   Use vertical coordinates (y) for horizontal stems (dim=0).  Use
    *   horizontal coordinates (x) for vertical stems (dim=1).
    *
-   *   There are '2*count' elements in the 'coords' array.  Each even element
-   *   is an absolute position in font units, each odd element is a length in
-   *   font units.
+   *   There are `2*count' elements in the `coords' array.  Each even
+   *   element is an absolute position in font units, each odd element is a
+   *   length in font units.
    *
-   *   A length can be negative, in which case it must be either -20 or -21.
-   *   It is interpreted as a 'ghost' stem, according to the Type 1
+   *   A length can be negative, in which case it must be either -20 or
+   *   -21.  It is interpreted as a `ghost' stem, according to the Type 1
    *   specification.
    *
    */
@@ -469,22 +469,22 @@ FT_BEGIN_HEADER
                          FT_Fixed*  coordinates );
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @functype:
    *   T2_Hints_MaskFunc
    *
    * @description:
    *   A method of the @T2_Hints class used to set a given hintmask (this
-   *   corresponds to the 'hintmask' Type 2 operator).
+   *   corresponds to the `hintmask' Type 2 operator).
    *
    * @input:
    *   hints ::
    *     A handle to the Type 2 hints recorder.
    *
    *   end_point ::
-   *     The glyph index of the last point to which the previously defined or
-   *     activated hints apply.
+   *     The glyph index of the last point to which the previously defined
+   *     or activated hints apply.
    *
    *   bit_count ::
    *     The number of bits in the hint mask.
@@ -494,13 +494,13 @@ FT_BEGIN_HEADER
    *
    * @note:
    *   If the hintmask starts the charstring (before any glyph point
-   *   definition), the value of `end_point` should be 0.
+   *   definition), the value of `end_point' should be 0.
    *
-   *   `bit_count` is the number of meaningful bits in the 'bytes' array; it
+   *   `bit_count' is the number of meaningful bits in the `bytes' array; it
    *   must be equal to the total number of hints defined so far (i.e.,
    *   horizontal+verticals).
    *
-   *   The 'bytes' array can come directly from the Type 2 charstring and
+   *   The `bytes' array can come directly from the Type 2 charstring and
    *   respects the same format.
    *
    */
@@ -511,14 +511,14 @@ FT_BEGIN_HEADER
                         const FT_Byte*  bytes );
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @functype:
    *   T2_Hints_CounterFunc
    *
    * @description:
-   *   A method of the @T2_Hints class used to set a given counter mask (this
-   *   corresponds to the 'hintmask' Type 2 operator).
+   *   A method of the @T2_Hints class used to set a given counter mask
+   *   (this corresponds to the `hintmask' Type 2 operator).
    *
    * @input:
    *   hints ::
@@ -536,13 +536,13 @@ FT_BEGIN_HEADER
    *
    * @note:
    *   If the hintmask starts the charstring (before any glyph point
-   *   definition), the value of `end_point` should be 0.
+   *   definition), the value of `end_point' should be 0.
    *
-   *   `bit_count` is the number of meaningful bits in the 'bytes' array; it
+   *   `bit_count' is the number of meaningful bits in the `bytes' array; it
    *   must be equal to the total number of hints defined so far (i.e.,
    *   horizontal+verticals).
    *
-   *    The 'bytes' array can come directly from the Type 2 charstring and
+   *    The `bytes' array can come directly from the Type 2 charstring and
    *    respects the same format.
    *
    */
@@ -552,7 +552,7 @@ FT_BEGIN_HEADER
                            const FT_Byte*  bytes );
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @functype:
    *   T2_Hints_CloseFunc
@@ -581,14 +581,15 @@ FT_BEGIN_HEADER
                          FT_UInt   end_point );
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @functype:
    *   T2_Hints_ApplyFunc
    *
    * @description:
    *   A method of the @T2_Hints class used to apply hints to the
-   *   corresponding glyph outline.  Must be called after the 'close' method.
+   *   corresponding glyph outline.  Must be called after the `close'
+   *   method.
    *
    * @input:
    *   hints ::
@@ -610,7 +611,7 @@ FT_BEGIN_HEADER
    *   On input, all points within the outline are in font coordinates. On
    *   output, they are in 1/64th of pixels.
    *
-   *   The scaling transformation is taken from the 'globals' object which
+   *   The scaling transformation is taken from the `globals' object which
    *   must correspond to the same font than the glyph.
    *
    */
@@ -621,7 +622,7 @@ FT_BEGIN_HEADER
                          FT_Render_Mode  hint_mode );
 
 
-  /**************************************************************************
+  /*************************************************************************
    *
    * @struct:
    *   T2_Hints_FuncsRec
@@ -679,6 +680,8 @@ FT_BEGIN_HEADER
   typedef PSHinter_Interface*  PSHinter_Service;
 
 
+#ifndef FT_CONFIG_OPTION_PIC
+
 #define FT_DEFINE_PSHINTER_INTERFACE(        \
           class_,                            \
           get_globals_funcs_,                \
@@ -691,6 +694,25 @@ FT_BEGIN_HEADER
     get_t2_funcs_                            \
   };
 
+#else /* FT_CONFIG_OPTION_PIC */
+
+#define FT_DEFINE_PSHINTER_INTERFACE(                      \
+          class_,                                          \
+          get_globals_funcs_,                              \
+          get_t1_funcs_,                                   \
+          get_t2_funcs_ )                                  \
+  void                                                     \
+  FT_Init_Class_ ## class_( FT_Library           library,  \
+                            PSHinter_Interface*  clazz )   \
+  {                                                        \
+    FT_UNUSED( library );                                  \
+                                                           \
+    clazz->get_globals_funcs = get_globals_funcs_;         \
+    clazz->get_t1_funcs      = get_t1_funcs_;              \
+    clazz->get_t2_funcs      = get_t2_funcs_;              \
+  }
+
+#endif /* FT_CONFIG_OPTION_PIC */
 
 FT_END_HEADER
 

+ 32 - 16
thirdparty/freetype/include/freetype/internal/services/svbdf.h

@@ -1,19 +1,19 @@
-/****************************************************************************
- *
- * svbdf.h
- *
- *   The FreeType BDF services (specification).
- *
- * Copyright (C) 2003-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  svbdf.h                                                                */
+/*                                                                         */
+/*    The FreeType BDF services (specification).                           */
+/*                                                                         */
+/*  Copyright 2003-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 SVBDF_H_
@@ -46,6 +46,8 @@ FT_BEGIN_HEADER
   };
 
 
+#ifndef FT_CONFIG_OPTION_PIC
+
 #define FT_DEFINE_SERVICE_BDFRec( class_,                                \
                                   get_charset_id_,                       \
                                   get_property_ )                        \
@@ -54,6 +56,20 @@ FT_BEGIN_HEADER
     get_charset_id_, get_property_                                       \
   };
 
+#else /* FT_CONFIG_OPTION_PIC */
+
+#define FT_DEFINE_SERVICE_BDFRec( class_,                                \
+                                  get_charset_id_,                       \
+                                  get_property_ )                        \
+  void                                                                   \
+  FT_Init_Class_ ## class_( FT_Service_BDFRec*  clazz )                  \
+  {                                                                      \
+    clazz->get_charset_id = get_charset_id_;                             \
+    clazz->get_property   = get_property_;                               \
+  }
+
+#endif /* FT_CONFIG_OPTION_PIC */
+
   /* */
 
 

+ 38 - 16
thirdparty/freetype/include/freetype/internal/services/svcfftl.h

@@ -1,19 +1,19 @@
-/****************************************************************************
- *
- * svcfftl.h
- *
- *   The FreeType CFF tables loader service (specification).
- *
- * Copyright (C) 2017-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  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_
@@ -65,6 +65,8 @@ FT_BEGIN_HEADER
   };
 
 
+#ifndef FT_CONFIG_OPTION_PIC
+
 #define FT_DEFINE_SERVICE_CFFLOADREC( class_,                  \
                                       get_standard_encoding_,  \
                                       load_private_dict_,      \
@@ -80,6 +82,26 @@ FT_BEGIN_HEADER
     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
 

+ 37 - 16
thirdparty/freetype/include/freetype/internal/services/svcid.h

@@ -1,19 +1,19 @@
-/****************************************************************************
- *
- * svcid.h
- *
- *   The FreeType CID font services (specification).
- *
- * Copyright (C) 2007-2019 by
- * Derek Clegg and Michael Toftdal.
- *
- * 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  svcid.h                                                                */
+/*                                                                         */
+/*    The FreeType CID font services (specification).                      */
+/*                                                                         */
+/*  Copyright 2007-2018 by                                                 */
+/*  Derek Clegg and Michael Toftdal.                                       */
+/*                                                                         */
+/*  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 SVCID_H_
@@ -48,6 +48,8 @@ FT_BEGIN_HEADER
   };
 
 
+#ifndef FT_CONFIG_OPTION_PIC
+
 #define FT_DEFINE_SERVICE_CIDREC( class_,                                   \
                                   get_ros_,                                 \
                                   get_is_cid_,                              \
@@ -57,6 +59,25 @@ FT_BEGIN_HEADER
     get_ros_, get_is_cid_, get_cid_from_glyph_index_                        \
   };
 
+#else /* FT_CONFIG_OPTION_PIC */
+
+#define FT_DEFINE_SERVICE_CIDREC( class_,                                   \
+                                  get_ros_,                                 \
+                                  get_is_cid_,                              \
+                                  get_cid_from_glyph_index_ )               \
+  void                                                                      \
+  FT_Init_Class_ ## class_( FT_Library          library,                    \
+                            FT_Service_CIDRec*  clazz )                     \
+  {                                                                         \
+    FT_UNUSED( library );                                                   \
+                                                                            \
+    clazz->get_ros                  = get_ros_;                             \
+    clazz->get_is_cid               = get_is_cid_;                          \
+    clazz->get_cid_from_glyph_index = get_cid_from_glyph_index_;            \
+  }
+
+#endif /* FT_CONFIG_OPTION_PIC */
+
   /* */
 
 

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

@@ -1,19 +1,19 @@
-/****************************************************************************
- *
- * svfntfmt.h
- *
- *   The FreeType font format service (specification only).
- *
- * Copyright (C) 2003-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  svfntfmt.h                                                             */
+/*                                                                         */
+/*    The FreeType font format service (specification only).               */
+/*                                                                         */
+/*  Copyright 2003-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 SVFNTFMT_H_
@@ -26,9 +26,9 @@ FT_BEGIN_HEADER
 
 
   /*
-   * A trivial service used to return the name of a face's font driver,
-   * according to the XFree86 nomenclature.  Note that the service data is a
-   * simple constant string pointer.
+   *  A trivial service used to return the name of a face's font driver,
+   *  according to the XFree86 nomenclature.  Note that the service data
+   *  is a simple constant string pointer.
    */
 
 #define FT_SERVICE_ID_FONT_FORMAT  "font-format"

+ 37 - 18
thirdparty/freetype/include/freetype/internal/services/svgldict.h

@@ -1,19 +1,19 @@
-/****************************************************************************
- *
- * svgldict.h
- *
- *   The FreeType glyph dictionary services (specification).
- *
- * Copyright (C) 2003-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  svgldict.h                                                             */
+/*                                                                         */
+/*    The FreeType glyph dictionary services (specification).              */
+/*                                                                         */
+/*  Copyright 2003-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 SVGLDICT_H_
@@ -26,8 +26,8 @@ FT_BEGIN_HEADER
 
 
   /*
-   * A service used to retrieve glyph names, as well as to find the index of
-   * a given glyph name in a font.
+   *  A service used to retrieve glyph names, as well as to find the
+   *  index of a given glyph name in a font.
    *
    */
 
@@ -52,6 +52,8 @@ FT_BEGIN_HEADER
   };
 
 
+#ifndef FT_CONFIG_OPTION_PIC
+
 #define FT_DEFINE_SERVICE_GLYPHDICTREC( class_,                        \
                                         get_name_,                     \
                                         name_index_ )                  \
@@ -60,6 +62,23 @@ FT_BEGIN_HEADER
     get_name_, name_index_                                             \
   };
 
+#else /* FT_CONFIG_OPTION_PIC */
+
+#define FT_DEFINE_SERVICE_GLYPHDICTREC( class_,                        \
+                                        get_name_,                     \
+                                        name_index_ )                  \
+  void                                                                 \
+  FT_Init_Class_ ## class_( FT_Library                library,         \
+                            FT_Service_GlyphDictRec*  clazz )          \
+  {                                                                    \
+    FT_UNUSED( library );                                              \
+                                                                       \
+    clazz->get_name   = get_name_;                                     \
+    clazz->name_index = name_index_;                                   \
+  }
+
+#endif /* FT_CONFIG_OPTION_PIC */
+
   /* */
 
 

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

@@ -1,28 +1,28 @@
-/****************************************************************************
- *
- * svgxval.h
- *
- *   FreeType API for validating TrueTypeGX/AAT tables (specification).
- *
- * Copyright (C) 2004-2019 by
- * Masatake YAMATO, Red Hat K.K.,
- * 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.
- *
- */
-
-/****************************************************************************
- *
- * gxvalid is derived from both gxlayout module and otvalid module.
- * Development of gxlayout is supported by the Information-technology
- * Promotion Agency(IPA), Japan.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  svgxval.h                                                              */
+/*                                                                         */
+/*    FreeType API for validating TrueTypeGX/AAT tables (specification).   */
+/*                                                                         */
+/*  Copyright 2004-2018 by                                                 */
+/*  Masatake YAMATO, Red Hat K.K.,                                         */
+/*  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.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+/***************************************************************************/
+/*                                                                         */
+/* gxvalid is derived from both gxlayout module and otvalid module.        */
+/* Development of gxlayout is supported by the Information-technology      */
+/* Promotion Agency(IPA), Japan.                                           */
+/*                                                                         */
+/***************************************************************************/
 
 
 #ifndef SVGXVAL_H_

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

@@ -1,19 +1,19 @@
-/****************************************************************************
- *
- * svkern.h
- *
- *   The FreeType Kerning service (specification).
- *
- * Copyright (C) 2006-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  svkern.h                                                               */
+/*                                                                         */
+/*    The FreeType Kerning service (specification).                        */
+/*                                                                         */
+/*  Copyright 2006-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 SVKERN_H_

+ 45 - 17
thirdparty/freetype/include/freetype/internal/services/svmetric.h

@@ -1,19 +1,19 @@
-/****************************************************************************
- *
- * svmetric.h
- *
- *   The FreeType services for metrics variations (specification).
- *
- * Copyright (C) 2016-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  svmetric.h                                                             */
+/*                                                                         */
+/*    The FreeType services for metrics variations (specification).        */
+/*                                                                         */
+/*  Copyright 2016-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 SVMETRIC_H_
@@ -26,7 +26,7 @@ FT_BEGIN_HEADER
 
 
   /*
-   * A service to manage the `HVAR, `MVAR', and `VVAR' OpenType tables.
+   *  A service to manage the `HVAR, `MVAR', and `VVAR' OpenType tables.
    *
    */
 
@@ -93,6 +93,8 @@ FT_BEGIN_HEADER
   };
 
 
+#ifndef FT_CONFIG_OPTION_PIC
+
 #define FT_DEFINE_SERVICE_METRICSVARIATIONSREC( class_,            \
                                                 hadvance_adjust_,  \
                                                 lsb_adjust_,       \
@@ -114,6 +116,32 @@ FT_BEGIN_HEADER
     metrics_adjust_                                                \
   };
 
+#else /* FT_CONFIG_OPTION_PIC */
+
+#define FT_DEFINE_SERVICE_METRICSVARIATIONSREC( class_,               \
+                                                hadvance_adjust_,     \
+                                                lsb_adjust_,          \
+                                                rsb_adjust_,          \
+                                                vadvance_adjust_,     \
+                                                tsb_adjust_,          \
+                                                bsb_adjust_,          \
+                                                vorg_adjust_,         \
+                                                metrics_adjust_  )    \
+  void                                                                \
+  FT_Init_Class_ ## class_( FT_Service_MetricsVariationsRec*  clazz ) \
+  {                                                                   \
+    clazz->hadvance_adjust = hadvance_adjust_;                        \
+    clazz->lsb_adjust      = lsb_adjust_;                             \
+    clazz->rsb_adjust      = rsb_adjust_;                             \
+    clazz->vadvance_adjust = vadvance_adjust_;                        \
+    clazz->tsb_adjust      = tsb_adjust_;                             \
+    clazz->bsb_adjust      = bsb_adjust_;                             \
+    clazz->vorg_adjust     = vorg_adjust_;                            \
+    clazz->metrics_adjust  = metrics_adjust_;                         \
+  }
+
+#endif /* FT_CONFIG_OPTION_PIC */
+
   /* */
 
 

+ 83 - 67
thirdparty/freetype/include/freetype/internal/services/svmm.h

@@ -1,19 +1,19 @@
-/****************************************************************************
- *
- * svmm.h
- *
- *   The FreeType Multiple Masters and GX var services (specification).
- *
- * Copyright (C) 2003-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  svmm.h                                                                 */
+/*                                                                         */
+/*    The FreeType Multiple Masters and GX var services (specification).   */
+/*                                                                         */
+/*  Copyright 2003-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 SVMM_H_
@@ -26,9 +26,9 @@ FT_BEGIN_HEADER
 
 
   /*
-   * A service used to manage multiple-masters data in a given face.
+   *  A service used to manage multiple-masters data in a given face.
    *
-   * See the related APIs in `ftmm.h' (FT_MULTIPLE_MASTERS_H).
+   *  See the related APIs in `ftmm.h' (FT_MULTIPLE_MASTERS_H).
    *
    */
 
@@ -86,65 +86,81 @@ FT_BEGIN_HEADER
   typedef void
   (*FT_Done_Blend_Func)( FT_Face );
 
-  typedef FT_Error
-  (*FT_Set_MM_WeightVector_Func)( FT_Face    face,
-                                  FT_UInt    len,
-                                  FT_Fixed*  weight_vector );
-
-  typedef FT_Error
-  (*FT_Get_MM_WeightVector_Func)( FT_Face    face,
-                                  FT_UInt*   len,
-                                  FT_Fixed*  weight_vector );
-
 
   FT_DEFINE_SERVICE( MultiMasters )
   {
-    FT_Get_MM_Func               get_mm;
-    FT_Set_MM_Design_Func        set_mm_design;
-    FT_Set_MM_Blend_Func         set_mm_blend;
-    FT_Get_MM_Blend_Func         get_mm_blend;
-    FT_Get_MM_Var_Func           get_mm_var;
-    FT_Set_Var_Design_Func       set_var_design;
-    FT_Get_Var_Design_Func       get_var_design;
-    FT_Set_Instance_Func         set_instance;
-    FT_Set_MM_WeightVector_Func  set_mm_weightvector;
-    FT_Get_MM_WeightVector_Func  get_mm_weightvector;
+    FT_Get_MM_Func          get_mm;
+    FT_Set_MM_Design_Func   set_mm_design;
+    FT_Set_MM_Blend_Func    set_mm_blend;
+    FT_Get_MM_Blend_Func    get_mm_blend;
+    FT_Get_MM_Var_Func      get_mm_var;
+    FT_Set_Var_Design_Func  set_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 */
-    FT_Get_Var_Blend_Func  get_var_blend;
-    FT_Done_Blend_Func     done_blend;
+    FT_Get_Var_Blend_Func   get_var_blend;
+    FT_Done_Blend_Func      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_,     \
-                                           set_weightvector_, \
-                                           get_weightvector_, \
-                                           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_,                                            \
-    set_weightvector_,                                        \
-    get_weightvector_,                                        \
-    get_var_blend_,                                           \
-    done_blend_                                               \
+#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_, \
+                                           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 */
+
+#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_ )         \
+  void                                                           \
+  FT_Init_Class_ ## class_( FT_Service_MultiMastersRec*  clazz ) \
+  {                                                              \
+    clazz->get_mm         = get_mm_;                             \
+    clazz->set_mm_design  = set_mm_design_;                      \
+    clazz->set_mm_blend   = set_mm_blend_;                       \
+    clazz->get_mm_blend   = get_mm_blend_;                       \
+    clazz->get_mm_var     = get_mm_var_;                         \
+    clazz->set_var_design = set_var_design_;                     \
+    clazz->get_var_design = get_var_design_;                     \
+    clazz->set_instance   = set_instance_;                       \
+    clazz->get_var_blend  = get_var_blend_;                      \
+    clazz->done_blend     = done_blend_;                         \
+  }
+
+#endif /* FT_CONFIG_OPTION_PIC */
+
   /* */
 
 

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

@@ -1,19 +1,19 @@
-/****************************************************************************
- *
- * svotval.h
- *
- *   The FreeType OpenType validation service (specification).
- *
- * Copyright (C) 2004-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  svotval.h                                                              */
+/*                                                                         */
+/*    The FreeType OpenType validation service (specification).            */
+/*                                                                         */
+/*  Copyright 2004-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 SVOTVAL_H_

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

@@ -1,19 +1,19 @@
-/****************************************************************************
- *
- * svpfr.h
- *
- *   Internal PFR service functions (specification).
- *
- * Copyright (C) 2003-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  svpfr.h                                                                */
+/*                                                                         */
+/*    Internal PFR service functions (specification).                      */
+/*                                                                         */
+/*  Copyright 2003-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 SVPFR_H_

+ 37 - 21
thirdparty/freetype/include/freetype/internal/services/svpostnm.h

@@ -1,19 +1,19 @@
-/****************************************************************************
- *
- * svpostnm.h
- *
- *   The FreeType PostScript name services (specification).
- *
- * Copyright (C) 2003-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  svpostnm.h                                                             */
+/*                                                                         */
+/*    The FreeType PostScript name services (specification).               */
+/*                                                                         */
+/*  Copyright 2003-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 SVPOSTNM_H_
@@ -25,13 +25,13 @@
 FT_BEGIN_HEADER
 
   /*
-   * A trivial service used to retrieve the PostScript name of a given font
-   * when available.  The `get_name' field should never be `NULL`.
+   *  A trivial service used to retrieve the PostScript name of a given
+   *  font when available.  The `get_name' field should never be NULL.
    *
-   * The corresponding function can return `NULL` to indicate that the
-   * PostScript name is not available.
+   *  The corresponding function can return NULL to indicate that the
+   *  PostScript name is not available.
    *
-   * The name is owned by the face and will be destroyed with it.
+   *  The name is owned by the face and will be destroyed with it.
    */
 
 #define FT_SERVICE_ID_POSTSCRIPT_FONT_NAME  "postscript-font-name"
@@ -47,12 +47,28 @@ FT_BEGIN_HEADER
   };
 
 
+#ifndef FT_CONFIG_OPTION_PIC
+
 #define FT_DEFINE_SERVICE_PSFONTNAMEREC( class_, get_ps_font_name_ ) \
   static const FT_Service_PsFontNameRec  class_ =                    \
   {                                                                  \
     get_ps_font_name_                                                \
   };
 
+#else /* FT_CONFIG_OPTION_PIC */
+
+#define FT_DEFINE_SERVICE_PSFONTNAMEREC( class_, get_ps_font_name_ ) \
+  void                                                               \
+  FT_Init_Class_ ## class_( FT_Library                 library,      \
+                            FT_Service_PsFontNameRec*  clazz )       \
+  {                                                                  \
+    FT_UNUSED( library );                                            \
+                                                                     \
+    clazz->get_ps_font_name = get_ps_font_name_;                     \
+  }
+
+#endif /* FT_CONFIG_OPTION_PIC */
+
   /* */
 
 

+ 32 - 16
thirdparty/freetype/include/freetype/internal/services/svprop.h

@@ -1,19 +1,19 @@
-/****************************************************************************
- *
- * svprop.h
- *
- *   The FreeType property service (specification).
- *
- * Copyright (C) 2012-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  svprop.h                                                               */
+/*                                                                         */
+/*    The FreeType property service (specification).                       */
+/*                                                                         */
+/*  Copyright 2012-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 SVPROP_H_
@@ -45,6 +45,8 @@ FT_BEGIN_HEADER
   };
 
 
+#ifndef FT_CONFIG_OPTION_PIC
+
 #define FT_DEFINE_SERVICE_PROPERTIESREC( class_,          \
                                          set_property_,   \
                                          get_property_ )  \
@@ -54,6 +56,20 @@ FT_BEGIN_HEADER
     get_property_                                         \
   };
 
+#else /* FT_CONFIG_OPTION_PIC */
+
+#define FT_DEFINE_SERVICE_PROPERTIESREC( class_,                \
+                                         set_property_,         \
+                                         get_property_ )        \
+  void                                                          \
+  FT_Init_Class_ ## class_( FT_Service_PropertiesRec*  clazz )  \
+  {                                                             \
+    clazz->set_property = set_property_;                        \
+    clazz->get_property = get_property_;                        \
+  }
+
+#endif /* FT_CONFIG_OPTION_PIC */
+
   /* */
 
 

+ 56 - 24
thirdparty/freetype/include/freetype/internal/services/svpscmap.h

@@ -1,19 +1,19 @@
-/****************************************************************************
- *
- * svpscmap.h
- *
- *   The FreeType PostScript charmap service (specification).
- *
- * Copyright (C) 2003-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  svpscmap.h                                                             */
+/*                                                                         */
+/*    The FreeType PostScript charmap service (specification).             */
+/*                                                                         */
+/*  Copyright 2003-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 SVPSCMAP_H_
@@ -29,26 +29,27 @@ FT_BEGIN_HEADER
 
 
   /*
-   * Adobe glyph name to unicode value.
+   *  Adobe glyph name to unicode value.
    */
   typedef FT_UInt32
   (*PS_Unicode_ValueFunc)( const char*  glyph_name );
 
   /*
-   * Macintosh name id to glyph name.  `NULL` if invalid index.
+   *  Macintosh name id to glyph name.  NULL if invalid index.
    */
   typedef const char*
   (*PS_Macintosh_NameFunc)( FT_UInt  name_index );
 
   /*
-   * Adobe standard string ID to glyph name.  `NULL` if invalid index.
+   *  Adobe standard string ID to glyph name.  NULL if invalid index.
    */
   typedef const char*
   (*PS_Adobe_Std_StringsFunc)( FT_UInt  string_index );
 
 
   /*
-   * Simple unicode -> glyph index charmap built from font glyph names table.
+   *  Simple unicode -> glyph index charmap built from font glyph names
+   *  table.
    */
   typedef struct  PS_UniMap_
   {
@@ -70,16 +71,16 @@ FT_BEGIN_HEADER
 
 
   /*
-   * A function which returns a glyph name for a given index.  Returns
-   * `NULL` if invalid index.
+   *  A function which returns a glyph name for a given index.  Returns
+   *  NULL if invalid index.
    */
   typedef const char*
   (*PS_GetGlyphNameFunc)( FT_Pointer  data,
                           FT_UInt     string_index );
 
   /*
-   * A function used to release the glyph name returned by
-   * PS_GetGlyphNameFunc, when needed
+   *  A function used to release the glyph name returned by
+   *  PS_GetGlyphNameFunc, when needed
    */
   typedef void
   (*PS_FreeGlyphNameFunc)( FT_Pointer  data,
@@ -117,6 +118,8 @@ FT_BEGIN_HEADER
   };
 
 
+#ifndef FT_CONFIG_OPTION_PIC
+
 #define FT_DEFINE_SERVICE_PSCMAPSREC( class_,                               \
                                       unicode_value_,                       \
                                       unicodes_init_,                       \
@@ -133,6 +136,35 @@ FT_BEGIN_HEADER
     adobe_std_strings_, adobe_std_encoding_, adobe_expert_encoding_         \
   };
 
+#else /* FT_CONFIG_OPTION_PIC */
+
+#define FT_DEFINE_SERVICE_PSCMAPSREC( class_,                               \
+                                      unicode_value_,                       \
+                                      unicodes_init_,                       \
+                                      unicodes_char_index_,                 \
+                                      unicodes_char_next_,                  \
+                                      macintosh_name_,                      \
+                                      adobe_std_strings_,                   \
+                                      adobe_std_encoding_,                  \
+                                      adobe_expert_encoding_ )              \
+  void                                                                      \
+  FT_Init_Class_ ## class_( FT_Library              library,                \
+                            FT_Service_PsCMapsRec*  clazz )                 \
+  {                                                                         \
+    FT_UNUSED( library );                                                   \
+                                                                            \
+    clazz->unicode_value         = unicode_value_;                          \
+    clazz->unicodes_init         = unicodes_init_;                          \
+    clazz->unicodes_char_index   = unicodes_char_index_;                    \
+    clazz->unicodes_char_next    = unicodes_char_next_;                     \
+    clazz->macintosh_name        = macintosh_name_;                         \
+    clazz->adobe_std_strings     = adobe_std_strings_;                      \
+    clazz->adobe_std_encoding    = adobe_std_encoding_;                     \
+    clazz->adobe_expert_encoding = adobe_expert_encoding_;                  \
+  }
+
+#endif /* FT_CONFIG_OPTION_PIC */
+
   /* */
 
 

+ 41 - 16
thirdparty/freetype/include/freetype/internal/services/svpsinfo.h

@@ -1,19 +1,19 @@
-/****************************************************************************
- *
- * svpsinfo.h
- *
- *   The FreeType PostScript info service (specification).
- *
- * Copyright (C) 2003-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  svpsinfo.h                                                             */
+/*                                                                         */
+/*    The FreeType PostScript info service (specification).                */
+/*                                                                         */
+/*  Copyright 2003-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 SVPSINFO_H_
@@ -62,6 +62,8 @@ FT_BEGIN_HEADER
   };
 
 
+#ifndef FT_CONFIG_OPTION_PIC
+
 #define FT_DEFINE_SERVICE_PSINFOREC( class_,                     \
                                      get_font_info_,             \
                                      ps_get_font_extra_,         \
@@ -74,6 +76,29 @@ FT_BEGIN_HEADER
     get_font_private_, get_font_value_                           \
   };
 
+#else /* FT_CONFIG_OPTION_PIC */
+
+#define FT_DEFINE_SERVICE_PSINFOREC( class_,                     \
+                                     get_font_info_,             \
+                                     ps_get_font_extra_,         \
+                                     has_glyph_names_,           \
+                                     get_font_private_,          \
+                                     get_font_value_ )           \
+  void                                                           \
+  FT_Init_Class_ ## class_( FT_Library             library,      \
+                            FT_Service_PsInfoRec*  clazz )       \
+  {                                                              \
+    FT_UNUSED( library );                                        \
+                                                                 \
+    clazz->ps_get_font_info    = get_font_info_;                 \
+    clazz->ps_get_font_extra   = ps_get_font_extra_;             \
+    clazz->ps_has_glyph_names  = has_glyph_names_;               \
+    clazz->ps_get_font_private = get_font_private_;              \
+    clazz->ps_get_font_value   = get_font_value_;                \
+  }
+
+#endif /* FT_CONFIG_OPTION_PIC */
+
   /* */
 
 

+ 32 - 17
thirdparty/freetype/include/freetype/internal/services/svsfnt.h

@@ -1,19 +1,19 @@
-/****************************************************************************
- *
- * svsfnt.h
- *
- *   The FreeType SFNT table loading service (specification).
- *
- * Copyright (C) 2003-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  svsfnt.h                                                               */
+/*                                                                         */
+/*    The FreeType SFNT table loading service (specification).             */
+/*                                                                         */
+/*  Copyright 2003-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 SVSFNT_H_
@@ -27,7 +27,7 @@ FT_BEGIN_HEADER
 
 
   /*
-   * SFNT table loading service.
+   *  SFNT table loading service.
    */
 
 #define FT_SERVICE_ID_SFNT_TABLE  "sfnt-table"
@@ -70,12 +70,27 @@ FT_BEGIN_HEADER
   };
 
 
+#ifndef FT_CONFIG_OPTION_PIC
+
 #define FT_DEFINE_SERVICE_SFNT_TABLEREC( class_, load_, get_, info_ )  \
   static const FT_Service_SFNT_TableRec  class_ =                      \
   {                                                                    \
     load_, get_, info_                                                 \
   };
 
+#else /* FT_CONFIG_OPTION_PIC */
+
+#define FT_DEFINE_SERVICE_SFNT_TABLEREC( class_, load_, get_, info_ ) \
+  void                                                                \
+  FT_Init_Class_ ## class_( FT_Service_SFNT_TableRec*  clazz )        \
+  {                                                                   \
+    clazz->load_table = load_;                                        \
+    clazz->get_table  = get_;                                         \
+    clazz->table_info = info_;                                        \
+  }
+
+#endif /* FT_CONFIG_OPTION_PIC */
+
   /* */
 
 

+ 55 - 39
thirdparty/freetype/include/freetype/internal/services/svttcmap.h

@@ -1,20 +1,20 @@
-/****************************************************************************
- *
- * svttcmap.h
- *
- *   The FreeType TrueType/sfnt cmap extra information service.
- *
- * Copyright (C) 2003-2019 by
- * Masatake YAMATO, Redhat K.K.,
- * 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  svttcmap.h                                                             */
+/*                                                                         */
+/*    The FreeType TrueType/sfnt cmap extra information service.           */
+/*                                                                         */
+/*  Copyright 2003-2018 by                                                 */
+/*  Masatake YAMATO, Redhat K.K.,                                          */
+/*  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.                                        */
+/*                                                                         */
+/***************************************************************************/
 
 /* Development of this service is support of
    Information-technology Promotion Agency, Japan. */
@@ -32,28 +32,29 @@ FT_BEGIN_HEADER
 #define FT_SERVICE_ID_TT_CMAP  "tt-cmaps"
 
 
-  /**************************************************************************
-   *
-   * @struct:
-   *   TT_CMapInfo
-   *
-   * @description:
-   *   A structure used to store TrueType/sfnt specific cmap information
-   *   which is not covered by the generic @FT_CharMap structure.  This
-   *   structure can be accessed with the @FT_Get_TT_CMap_Info function.
-   *
-   * @fields:
-   *   language ::
-   *     The language ID used in Mac fonts.  Definitions of values are in
-   *     `ttnameid.h`.
-   *
-   *   format ::
-   *     The cmap format.  OpenType 1.6 defines the formats 0 (byte encoding
-   *     table), 2~(high-byte mapping through table), 4~(segment mapping to
-   *     delta values), 6~(trimmed table mapping), 8~(mixed 16-bit and 32-bit
-   *     coverage), 10~(trimmed array), 12~(segmented coverage), 13~(last
-   *     resort font), and 14 (Unicode Variation Sequences).
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    TT_CMapInfo                                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure used to store TrueType/sfnt specific cmap information  */
+  /*    which is not covered by the generic @FT_CharMap structure.  This   */
+  /*    structure can be accessed with the @FT_Get_TT_CMap_Info function.  */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    language ::                                                        */
+  /*      The language ID used in Mac fonts.  Definitions of values are in */
+  /*      `ttnameid.h'.                                                    */
+  /*                                                                       */
+  /*    format ::                                                          */
+  /*      The cmap format.  OpenType 1.6 defines the formats 0 (byte       */
+  /*      encoding table), 2~(high-byte mapping through table), 4~(segment */
+  /*      mapping to delta values), 6~(trimmed table mapping), 8~(mixed    */
+  /*      16-bit and 32-bit coverage), 10~(trimmed array), 12~(segmented   */
+  /*      coverage), 13~(last resort font), and 14 (Unicode Variation      */
+  /*      Sequences).                                                      */
+  /*                                                                       */
   typedef struct  TT_CMapInfo_
   {
     FT_ULong  language;
@@ -72,6 +73,7 @@ FT_BEGIN_HEADER
     TT_CMap_Info_GetFunc  get_cmap_info;
   };
 
+#ifndef FT_CONFIG_OPTION_PIC
 
 #define FT_DEFINE_SERVICE_TTCMAPSREC( class_, get_cmap_info_ )  \
   static const FT_Service_TTCMapsRec  class_ =                  \
@@ -79,6 +81,20 @@ FT_BEGIN_HEADER
     get_cmap_info_                                              \
   };
 
+#else /* FT_CONFIG_OPTION_PIC */
+
+#define FT_DEFINE_SERVICE_TTCMAPSREC( class_, get_cmap_info_ )  \
+  void                                                          \
+  FT_Init_Class_ ## class_( FT_Library              library,    \
+                            FT_Service_TTCMapsRec*  clazz )     \
+  {                                                             \
+    FT_UNUSED( library );                                       \
+                                                                \
+    clazz->get_cmap_info = get_cmap_info_;                      \
+  }
+
+#endif /* FT_CONFIG_OPTION_PIC */
+
   /* */
 
 

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

@@ -1,19 +1,19 @@
-/****************************************************************************
- *
- * svtteng.h
- *
- *   The FreeType TrueType engine query service (specification).
- *
- * Copyright (C) 2006-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  svtteng.h                                                              */
+/*                                                                         */
+/*    The FreeType TrueType engine query service (specification).          */
+/*                                                                         */
+/*  Copyright 2006-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 SVTTENG_H_
@@ -27,7 +27,7 @@ FT_BEGIN_HEADER
 
 
   /*
-   * SFNT table loading service.
+   *  SFNT table loading service.
    */
 
 #define FT_SERVICE_ID_TRUETYPE_ENGINE  "truetype-engine"

+ 29 - 16
thirdparty/freetype/include/freetype/internal/services/svttglyf.h

@@ -1,19 +1,19 @@
-/****************************************************************************
- *
- * svttglyf.h
- *
- *   The FreeType TrueType glyph service.
- *
- * Copyright (C) 2007-2019 by
- * David Turner.
- *
- * 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  svttglyf.h                                                             */
+/*                                                                         */
+/*    The FreeType TrueType glyph service.                                 */
+/*                                                                         */
+/*  Copyright 2007-2018 by                                                 */
+/*  David Turner.                                                          */
+/*                                                                         */
+/*  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 SVTTGLYF_H_
 #define SVTTGLYF_H_
@@ -39,12 +39,25 @@ FT_BEGIN_HEADER
   };
 
 
+#ifndef FT_CONFIG_OPTION_PIC
+
 #define FT_DEFINE_SERVICE_TTGLYFREC( class_, get_location_ )  \
   static const FT_Service_TTGlyfRec  class_ =                 \
   {                                                           \
     get_location_                                             \
   };
 
+#else /* FT_CONFIG_OPTION_PIC */
+
+#define FT_DEFINE_SERVICE_TTGLYFREC( class_, get_location_ )  \
+  void                                                        \
+  FT_Init_Class_ ## class_( FT_Service_TTGlyfRec*  clazz )    \
+  {                                                           \
+    clazz->get_location = get_location_;                      \
+  }
+
+#endif /* FT_CONFIG_OPTION_PIC */
+
   /* */
 
 

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

@@ -1,19 +1,19 @@
-/****************************************************************************
- *
- * svwinfnt.h
- *
- *   The FreeType Windows FNT/FONT service (specification).
- *
- * Copyright (C) 2003-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  svwinfnt.h                                                             */
+/*                                                                         */
+/*    The FreeType Windows FNT/FONT service (specification).               */
+/*                                                                         */
+/*  Copyright 2003-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 SVWINFNT_H_

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 407 - 550
thirdparty/freetype/include/freetype/internal/sfnt.h


+ 39 - 42
thirdparty/freetype/include/freetype/internal/t1types.h

@@ -1,20 +1,20 @@
-/****************************************************************************
- *
- * t1types.h
- *
- *   Basic Type1/Type2 type definitions and interface (specification
- *   only).
- *
- * Copyright (C) 1996-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  t1types.h                                                              */
+/*                                                                         */
+/*    Basic Type1/Type2 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 T1TYPES_H_
@@ -45,31 +45,28 @@ FT_BEGIN_HEADER
   /*************************************************************************/
 
 
-  /**************************************************************************
-   *
-   * @struct:
-   *   T1_EncodingRec
-   *
-   * @description:
-   *   A structure modeling a custom encoding.
-   *
-   * @fields:
-   *   num_chars ::
-   *     The number of character codes in the encoding.  Usually 256.
-   *
-   *   code_first ::
-   *     The lowest valid character code in the encoding.
-   *
-   *   code_last ::
-   *     The highest valid character code in the encoding + 1. When equal to
-   *     code_first there are no valid character codes.
-   *
-   *   char_index ::
-   *     An array of corresponding glyph indices.
-   *
-   *   char_name ::
-   *     An array of corresponding glyph names.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    T1_EncodingRec                                                     */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure modeling a custom encoding.                            */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    num_chars  :: The number of character codes in the encoding.       */
+  /*                  Usually 256.                                         */
+  /*                                                                       */
+  /*    code_first :: The lowest valid character code in the encoding.     */
+  /*                                                                       */
+  /*    code_last  :: The highest valid character code in the encoding     */
+  /*                  + 1. When equal to code_first there are no valid     */
+  /*                  character codes.                                     */
+  /*                                                                       */
+  /*    char_index :: An array of corresponding glyph indices.             */
+  /*                                                                       */
+  /*    char_name  :: An array of corresponding glyph names.               */
+  /*                                                                       */
   typedef struct  T1_EncodingRecRec_
   {
     FT_Int       num_chars;

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 411 - 486
thirdparty/freetype/include/freetype/internal/tttypes.h


+ 306 - 310
thirdparty/freetype/include/freetype/t1tables.h

@@ -1,20 +1,20 @@
-/****************************************************************************
- *
- * t1tables.h
- *
- *   Basic Type 1/Type 2 tables definitions and interface (specification
- *   only).
- *
- * Copyright (C) 1996-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  t1tables.h                                                             */
+/*                                                                         */
+/*    Basic Type 1/Type 2 tables 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 T1TABLES_H_
@@ -34,58 +34,58 @@
 FT_BEGIN_HEADER
 
 
-  /**************************************************************************
-   *
-   * @section:
-   *   type1_tables
-   *
-   * @title:
-   *   Type 1 Tables
-   *
-   * @abstract:
-   *   Type~1-specific font tables.
-   *
-   * @description:
-   *   This section contains the definition of Type~1-specific tables,
-   *   including structures related to other PostScript font formats.
-   *
-   * @order:
-   *   PS_FontInfoRec
-   *   PS_FontInfo
-   *   PS_PrivateRec
-   *   PS_Private
-   *
-   *   CID_FaceDictRec
-   *   CID_FaceDict
-   *   CID_FaceInfoRec
-   *   CID_FaceInfo
-   *
-   *   FT_Has_PS_Glyph_Names
-   *   FT_Get_PS_Font_Info
-   *   FT_Get_PS_Font_Private
-   *   FT_Get_PS_Font_Value
-   *
-   *   T1_Blend_Flags
-   *   T1_EncodingType
-   *   PS_Dict_Keys
-   *
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    type1_tables                                                       */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*    Type 1 Tables                                                      */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*    Type~1 (PostScript) specific font tables.                          */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This section contains the definition of Type 1-specific tables,    */
+  /*    including structures related to other PostScript font formats.     */
+  /*                                                                       */
+  /* <Order>                                                               */
+  /*    PS_FontInfoRec                                                     */
+  /*    PS_FontInfo                                                        */
+  /*    PS_PrivateRec                                                      */
+  /*    PS_Private                                                         */
+  /*                                                                       */
+  /*    CID_FaceDictRec                                                    */
+  /*    CID_FaceDict                                                       */
+  /*    CID_FaceInfoRec                                                    */
+  /*    CID_FaceInfo                                                       */
+  /*                                                                       */
+  /*    FT_Has_PS_Glyph_Names                                              */
+  /*    FT_Get_PS_Font_Info                                                */
+  /*    FT_Get_PS_Font_Private                                             */
+  /*    FT_Get_PS_Font_Value                                               */
+  /*                                                                       */
+  /*    T1_Blend_Flags                                                     */
+  /*    T1_EncodingType                                                    */
+  /*    PS_Dict_Keys                                                       */
+  /*                                                                       */
+  /*************************************************************************/
 
 
   /* Note that we separate font data in PS_FontInfoRec and PS_PrivateRec */
   /* structures in order to support Multiple Master fonts.               */
 
 
-  /**************************************************************************
-   *
-   * @struct:
-   *   PS_FontInfoRec
-   *
-   * @description:
-   *   A structure used to model a Type~1 or Type~2 FontInfo dictionary.
-   *   Note that for Multiple Master fonts, each instance has its own
-   *   FontInfo dictionary.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    PS_FontInfoRec                                                     */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure used to model a Type~1 or Type~2 FontInfo dictionary.  */
+  /*    Note that for Multiple Master fonts, each instance has its own     */
+  /*    FontInfo dictionary.                                               */
+  /*                                                                       */
   typedef struct  PS_FontInfoRec_
   {
     FT_String*  version;
@@ -101,39 +101,40 @@ FT_BEGIN_HEADER
   } PS_FontInfoRec;
 
 
-  /**************************************************************************
-   *
-   * @struct:
-   *   PS_FontInfo
-   *
-   * @description:
-   *   A handle to a @PS_FontInfoRec structure.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    PS_FontInfo                                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A handle to a @PS_FontInfoRec structure.                           */
+  /*                                                                       */
   typedef struct PS_FontInfoRec_*  PS_FontInfo;
 
 
-  /**************************************************************************
-   *
-   * @struct:
-   *   T1_FontInfo
-   *
-   * @description:
-   *   This type is equivalent to @PS_FontInfoRec.  It is deprecated but kept
-   *   to maintain source compatibility between various versions of FreeType.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    T1_FontInfo                                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This type is equivalent to @PS_FontInfoRec.  It is deprecated but  */
+  /*    kept to maintain source compatibility between various versions of  */
+  /*    FreeType.                                                          */
+  /*                                                                       */
   typedef PS_FontInfoRec  T1_FontInfo;
 
 
-  /**************************************************************************
-   *
-   * @struct:
-   *   PS_PrivateRec
-   *
-   * @description:
-   *   A structure used to model a Type~1 or Type~2 private dictionary.  Note
-   *   that for Multiple Master fonts, each instance has its own Private
-   *   dictionary.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    PS_PrivateRec                                                      */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure used to model a Type~1 or Type~2 private dictionary.   */
+  /*    Note that for Multiple Master fonts, each instance has its own     */
+  /*    Private dictionary.                                                */
+  /*                                                                       */
   typedef struct  PS_PrivateRec_
   {
     FT_Int     unique_id;
@@ -175,55 +176,56 @@ FT_BEGIN_HEADER
   } PS_PrivateRec;
 
 
-  /**************************************************************************
-   *
-   * @struct:
-   *   PS_Private
-   *
-   * @description:
-   *   A handle to a @PS_PrivateRec structure.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    PS_Private                                                         */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A handle to a @PS_PrivateRec structure.                            */
+  /*                                                                       */
   typedef struct PS_PrivateRec_*  PS_Private;
 
 
-  /**************************************************************************
-   *
-   * @struct:
-   *   T1_Private
-   *
-   * @description:
-   *  This type is equivalent to @PS_PrivateRec.  It is deprecated but kept
-   *  to maintain source compatibility between various versions of FreeType.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    T1_Private                                                         */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*   This type is equivalent to @PS_PrivateRec.  It is deprecated but    */
+  /*   kept to maintain source compatibility between various versions of   */
+  /*   FreeType.                                                           */
+  /*                                                                       */
   typedef PS_PrivateRec  T1_Private;
 
 
-  /**************************************************************************
-   *
-   * @enum:
-   *   T1_Blend_Flags
-   *
-   * @description:
-   *   A set of flags used to indicate which fields are present in a given
-   *   blend dictionary (font info or private).  Used to support Multiple
-   *   Masters fonts.
-   *
-   * @values:
-   *   T1_BLEND_UNDERLINE_POSITION ::
-   *   T1_BLEND_UNDERLINE_THICKNESS ::
-   *   T1_BLEND_ITALIC_ANGLE ::
-   *   T1_BLEND_BLUE_VALUES ::
-   *   T1_BLEND_OTHER_BLUES ::
-   *   T1_BLEND_STANDARD_WIDTH ::
-   *   T1_BLEND_STANDARD_HEIGHT ::
-   *   T1_BLEND_STEM_SNAP_WIDTHS ::
-   *   T1_BLEND_STEM_SNAP_HEIGHTS ::
-   *   T1_BLEND_BLUE_SCALE ::
-   *   T1_BLEND_BLUE_SHIFT ::
-   *   T1_BLEND_FAMILY_BLUES ::
-   *   T1_BLEND_FAMILY_OTHER_BLUES ::
-   *   T1_BLEND_FORCE_BOLD ::
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Enum>                                                                */
+  /*    T1_Blend_Flags                                                     */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A set of flags used to indicate which fields are present in a      */
+  /*    given blend dictionary (font info or private).  Used to support    */
+  /*    Multiple Masters fonts.                                            */
+  /*                                                                       */
+  /* <Values>                                                              */
+  /*    T1_BLEND_UNDERLINE_POSITION ::                                     */
+  /*    T1_BLEND_UNDERLINE_THICKNESS ::                                    */
+  /*    T1_BLEND_ITALIC_ANGLE ::                                           */
+  /*    T1_BLEND_BLUE_VALUES ::                                            */
+  /*    T1_BLEND_OTHER_BLUES ::                                            */
+  /*    T1_BLEND_STANDARD_WIDTH ::                                         */
+  /*    T1_BLEND_STANDARD_HEIGHT ::                                        */
+  /*    T1_BLEND_STEM_SNAP_WIDTHS ::                                       */
+  /*    T1_BLEND_STEM_SNAP_HEIGHTS ::                                      */
+  /*    T1_BLEND_BLUE_SCALE ::                                             */
+  /*    T1_BLEND_BLUE_SHIFT ::                                             */
+  /*    T1_BLEND_FAMILY_BLUES ::                                           */
+  /*    T1_BLEND_FAMILY_OTHER_BLUES ::                                     */
+  /*    T1_BLEND_FORCE_BOLD ::                                             */
+  /*                                                                       */
   typedef enum  T1_Blend_Flags_
   {
     /* required fields in a FontInfo blend dictionary */
@@ -250,7 +252,7 @@ FT_BEGIN_HEADER
 
 
   /* these constants are deprecated; use the corresponding */
-  /* `T1_Blend_Flags` values instead                       */
+  /* `T1_Blend_Flags' values instead                       */
 #define t1_blend_underline_position   T1_BLEND_UNDERLINE_POSITION
 #define t1_blend_underline_thickness  T1_BLEND_UNDERLINE_THICKNESS
 #define t1_blend_italic_angle         T1_BLEND_ITALIC_ANGLE
@@ -328,23 +330,14 @@ FT_BEGIN_HEADER
   typedef PS_BlendRec  T1_Blend;
 
 
-  /**************************************************************************
-   *
-   * @struct:
-   *   CID_FaceDictRec
-   *
-   * @description:
-   *   A structure used to represent data in a CID top-level dictionary.  In
-   *   most cases, they are part of the font's '/FDArray' array.  Within a
-   *   CID font file, such (internal) subfont dictionaries are enclosed by
-   *   '%ADOBeginFontDict' and '%ADOEndFontDict' comments.
-   *
-   *   Note that `CID_FaceDictRec` misses a field for the '/FontName'
-   *   keyword, specifying the subfont's name (the top-level font name is
-   *   given by the '/CIDFontName' keyword).  This is an oversight, but it
-   *   doesn't limit the 'cid' font module's functionality because FreeType
-   *   neither needs this entry nor gives access to CID subfonts.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    CID_FaceDictRec                                                    */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure used to represent data in a CID top-level dictionary.  */
+  /*                                                                       */
   typedef struct  CID_FaceDictRec_
   {
     PS_PrivateRec  private_dict;
@@ -352,8 +345,8 @@ FT_BEGIN_HEADER
     FT_UInt        len_buildchar;
     FT_Fixed       forcebold_threshold;
     FT_Pos         stroke_width;
-    FT_Fixed       expansion_factor;   /* this is a duplicate of           */
-                                       /* `private_dict->expansion_factor' */
+    FT_Fixed       expansion_factor;
+
     FT_Byte        paint_type;
     FT_Byte        font_type;
     FT_Matrix      font_matrix;
@@ -366,38 +359,38 @@ FT_BEGIN_HEADER
   } CID_FaceDictRec;
 
 
-  /**************************************************************************
-   *
-   * @struct:
-   *   CID_FaceDict
-   *
-   * @description:
-   *   A handle to a @CID_FaceDictRec structure.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    CID_FaceDict                                                       */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A handle to a @CID_FaceDictRec structure.                          */
+  /*                                                                       */
   typedef struct CID_FaceDictRec_*  CID_FaceDict;
 
 
-  /**************************************************************************
-   *
-   * @struct:
-   *   CID_FontDict
-   *
-   * @description:
-   *   This type is equivalent to @CID_FaceDictRec.  It is deprecated but
-   *   kept to maintain source compatibility between various versions of
-   *   FreeType.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    CID_FontDict                                                       */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This type is equivalent to @CID_FaceDictRec.  It is deprecated but */
+  /*    kept to maintain source compatibility between various versions of  */
+  /*    FreeType.                                                          */
+  /*                                                                       */
   typedef CID_FaceDictRec  CID_FontDict;
 
 
-  /**************************************************************************
-   *
-   * @struct:
-   *   CID_FaceInfoRec
-   *
-   * @description:
-   *   A structure used to represent CID Face information.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    CID_FaceInfoRec                                                    */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure used to represent CID Face information.                */
+  /*                                                                       */
   typedef struct  CID_FaceInfoRec_
   {
     FT_String*      cid_font_name;
@@ -428,45 +421,47 @@ FT_BEGIN_HEADER
   } CID_FaceInfoRec;
 
 
-  /**************************************************************************
-   *
-   * @struct:
-   *   CID_FaceInfo
-   *
-   * @description:
-   *   A handle to a @CID_FaceInfoRec structure.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    CID_FaceInfo                                                       */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A handle to a @CID_FaceInfoRec structure.                          */
+  /*                                                                       */
   typedef struct CID_FaceInfoRec_*  CID_FaceInfo;
 
 
-  /**************************************************************************
-   *
-   * @struct:
-   *   CID_Info
-   *
-   * @description:
-   *  This type is equivalent to @CID_FaceInfoRec.  It is deprecated but kept
-   *  to maintain source compatibility between various versions of FreeType.
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    CID_Info                                                           */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*   This type is equivalent to @CID_FaceInfoRec.  It is deprecated but  */
+  /*   kept to maintain source compatibility between various versions of   */
+  /*   FreeType.                                                           */
+  /*                                                                       */
   typedef CID_FaceInfoRec  CID_Info;
 
 
-  /**************************************************************************
+  /************************************************************************
    *
    * @function:
    *    FT_Has_PS_Glyph_Names
    *
    * @description:
-   *    Return true if a given face provides reliable PostScript glyph names.
-   *    This is similar to using the @FT_HAS_GLYPH_NAMES macro, except that
-   *    certain fonts (mostly TrueType) contain incorrect glyph name tables.
+   *    Return true if a given face provides reliable PostScript glyph
+   *    names.  This is similar to using the @FT_HAS_GLYPH_NAMES macro,
+   *    except that certain fonts (mostly TrueType) contain incorrect
+   *    glyph name tables.
    *
    *    When this function returns true, the caller is sure that the glyph
    *    names returned by @FT_Get_Glyph_Name are reliable.
    *
    * @input:
    *    face ::
-   *      face handle
+   *       face handle
    *
    * @return:
    *    Boolean.  True if glyph names are reliable.
@@ -476,7 +471,7 @@ FT_BEGIN_HEADER
   FT_Has_PS_Glyph_Names( FT_Face  face );
 
 
-  /**************************************************************************
+  /************************************************************************
    *
    * @function:
    *    FT_Get_PS_Font_Info
@@ -487,22 +482,22 @@ FT_BEGIN_HEADER
    *
    * @input:
    *    face ::
-   *      PostScript face handle.
+   *       PostScript face handle.
    *
    * @output:
    *    afont_info ::
-   *      Output font info structure pointer.
+   *       Output font info structure pointer.
    *
    * @return:
    *    FreeType error code.  0~means success.
    *
    * @note:
-   *    String pointers within the @PS_FontInfoRec structure are owned by the
-   *    face and don't need to be freed by the caller.  Missing entries in
-   *    the font's FontInfo dictionary are represented by `NULL` pointers.
+   *    String pointers within the @PS_FontInfoRec structure are owned by
+   *    the face and don't need to be freed by the caller.  Missing entries
+   *    in the font's FontInfo dictionary are represented by NULL pointers.
    *
    *    If the font's format is not PostScript-based, this function will
-   *    return the `FT_Err_Invalid_Argument` error code.
+   *    return the `FT_Err_Invalid_Argument' error code.
    *
    */
   FT_EXPORT( FT_Error )
@@ -510,7 +505,7 @@ FT_BEGIN_HEADER
                        PS_FontInfo  afont_info );
 
 
-  /**************************************************************************
+  /************************************************************************
    *
    * @function:
    *    FT_Get_PS_Font_Private
@@ -521,11 +516,11 @@ FT_BEGIN_HEADER
    *
    * @input:
    *    face ::
-   *      PostScript face handle.
+   *       PostScript face handle.
    *
    * @output:
    *    afont_private ::
-   *      Output private dictionary structure pointer.
+   *       Output private dictionary structure pointer.
    *
    * @return:
    *    FreeType error code.  0~means success.
@@ -535,7 +530,7 @@ FT_BEGIN_HEADER
    *    the face and don't need to be freed by the caller.
    *
    *    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.
    *
    */
   FT_EXPORT( FT_Error )
@@ -543,24 +538,25 @@ FT_BEGIN_HEADER
                           PS_Private  afont_private );
 
 
-  /**************************************************************************
-   *
-   * @enum:
-   *   T1_EncodingType
-   *
-   * @description:
-   *   An enumeration describing the 'Encoding' entry in a Type 1 dictionary.
-   *
-   * @values:
-   *   T1_ENCODING_TYPE_NONE ::
-   *   T1_ENCODING_TYPE_ARRAY ::
-   *   T1_ENCODING_TYPE_STANDARD ::
-   *   T1_ENCODING_TYPE_ISOLATIN1 ::
-   *   T1_ENCODING_TYPE_EXPERT ::
-   *
-   * @since:
-   *   2.4.8
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Enum>                                                                */
+  /*    T1_EncodingType                                                    */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    An enumeration describing the `Encoding' entry in a Type 1         */
+  /*    dictionary.                                                        */
+  /*                                                                       */
+  /* <Values>                                                              */
+  /*    T1_ENCODING_TYPE_NONE ::                                           */
+  /*    T1_ENCODING_TYPE_ARRAY ::                                          */
+  /*    T1_ENCODING_TYPE_STANDARD ::                                       */
+  /*    T1_ENCODING_TYPE_ISOLATIN1 ::                                      */
+  /*    T1_ENCODING_TYPE_EXPERT ::                                         */
+  /*                                                                       */
+  /* <Since>                                                               */
+  /*    2.4.8                                                              */
+  /*                                                                       */
   typedef enum  T1_EncodingType_
   {
     T1_ENCODING_TYPE_NONE = 0,
@@ -572,66 +568,66 @@ FT_BEGIN_HEADER
   } T1_EncodingType;
 
 
-  /**************************************************************************
-   *
-   * @enum:
-   *   PS_Dict_Keys
-   *
-   * @description:
-   *   An enumeration used in calls to @FT_Get_PS_Font_Value to identify the
-   *   Type~1 dictionary entry to retrieve.
-   *
-   * @values:
-   *   PS_DICT_FONT_TYPE ::
-   *   PS_DICT_FONT_MATRIX ::
-   *   PS_DICT_FONT_BBOX ::
-   *   PS_DICT_PAINT_TYPE ::
-   *   PS_DICT_FONT_NAME ::
-   *   PS_DICT_UNIQUE_ID ::
-   *   PS_DICT_NUM_CHAR_STRINGS ::
-   *   PS_DICT_CHAR_STRING_KEY ::
-   *   PS_DICT_CHAR_STRING ::
-   *   PS_DICT_ENCODING_TYPE ::
-   *   PS_DICT_ENCODING_ENTRY ::
-   *   PS_DICT_NUM_SUBRS ::
-   *   PS_DICT_SUBR ::
-   *   PS_DICT_STD_HW ::
-   *   PS_DICT_STD_VW ::
-   *   PS_DICT_NUM_BLUE_VALUES ::
-   *   PS_DICT_BLUE_VALUE ::
-   *   PS_DICT_BLUE_FUZZ ::
-   *   PS_DICT_NUM_OTHER_BLUES ::
-   *   PS_DICT_OTHER_BLUE ::
-   *   PS_DICT_NUM_FAMILY_BLUES ::
-   *   PS_DICT_FAMILY_BLUE ::
-   *   PS_DICT_NUM_FAMILY_OTHER_BLUES ::
-   *   PS_DICT_FAMILY_OTHER_BLUE ::
-   *   PS_DICT_BLUE_SCALE ::
-   *   PS_DICT_BLUE_SHIFT ::
-   *   PS_DICT_NUM_STEM_SNAP_H ::
-   *   PS_DICT_STEM_SNAP_H ::
-   *   PS_DICT_NUM_STEM_SNAP_V ::
-   *   PS_DICT_STEM_SNAP_V ::
-   *   PS_DICT_FORCE_BOLD ::
-   *   PS_DICT_RND_STEM_UP ::
-   *   PS_DICT_MIN_FEATURE ::
-   *   PS_DICT_LEN_IV ::
-   *   PS_DICT_PASSWORD ::
-   *   PS_DICT_LANGUAGE_GROUP ::
-   *   PS_DICT_VERSION ::
-   *   PS_DICT_NOTICE ::
-   *   PS_DICT_FULL_NAME ::
-   *   PS_DICT_FAMILY_NAME ::
-   *   PS_DICT_WEIGHT ::
-   *   PS_DICT_IS_FIXED_PITCH ::
-   *   PS_DICT_UNDERLINE_POSITION ::
-   *   PS_DICT_UNDERLINE_THICKNESS ::
-   *   PS_DICT_FS_TYPE ::
-   *   PS_DICT_ITALIC_ANGLE ::
-   *
-   * @since:
-   *   2.4.8
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Enum>                                                                */
+  /*    PS_Dict_Keys                                                       */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    An enumeration used in calls to @FT_Get_PS_Font_Value to identify  */
+  /*    the Type~1 dictionary entry to retrieve.                           */
+  /*                                                                       */
+  /* <Values>                                                              */
+  /*    PS_DICT_FONT_TYPE ::                                               */
+  /*    PS_DICT_FONT_MATRIX ::                                             */
+  /*    PS_DICT_FONT_BBOX ::                                               */
+  /*    PS_DICT_PAINT_TYPE ::                                              */
+  /*    PS_DICT_FONT_NAME ::                                               */
+  /*    PS_DICT_UNIQUE_ID ::                                               */
+  /*    PS_DICT_NUM_CHAR_STRINGS ::                                        */
+  /*    PS_DICT_CHAR_STRING_KEY ::                                         */
+  /*    PS_DICT_CHAR_STRING ::                                             */
+  /*    PS_DICT_ENCODING_TYPE ::                                           */
+  /*    PS_DICT_ENCODING_ENTRY ::                                          */
+  /*    PS_DICT_NUM_SUBRS ::                                               */
+  /*    PS_DICT_SUBR ::                                                    */
+  /*    PS_DICT_STD_HW ::                                                  */
+  /*    PS_DICT_STD_VW ::                                                  */
+  /*    PS_DICT_NUM_BLUE_VALUES ::                                         */
+  /*    PS_DICT_BLUE_VALUE ::                                              */
+  /*    PS_DICT_BLUE_FUZZ ::                                               */
+  /*    PS_DICT_NUM_OTHER_BLUES ::                                         */
+  /*    PS_DICT_OTHER_BLUE ::                                              */
+  /*    PS_DICT_NUM_FAMILY_BLUES ::                                        */
+  /*    PS_DICT_FAMILY_BLUE ::                                             */
+  /*    PS_DICT_NUM_FAMILY_OTHER_BLUES ::                                  */
+  /*    PS_DICT_FAMILY_OTHER_BLUE ::                                       */
+  /*    PS_DICT_BLUE_SCALE ::                                              */
+  /*    PS_DICT_BLUE_SHIFT ::                                              */
+  /*    PS_DICT_NUM_STEM_SNAP_H ::                                         */
+  /*    PS_DICT_STEM_SNAP_H ::                                             */
+  /*    PS_DICT_NUM_STEM_SNAP_V ::                                         */
+  /*    PS_DICT_STEM_SNAP_V ::                                             */
+  /*    PS_DICT_FORCE_BOLD ::                                              */
+  /*    PS_DICT_RND_STEM_UP ::                                             */
+  /*    PS_DICT_MIN_FEATURE ::                                             */
+  /*    PS_DICT_LEN_IV ::                                                  */
+  /*    PS_DICT_PASSWORD ::                                                */
+  /*    PS_DICT_LANGUAGE_GROUP ::                                          */
+  /*    PS_DICT_VERSION ::                                                 */
+  /*    PS_DICT_NOTICE ::                                                  */
+  /*    PS_DICT_FULL_NAME ::                                               */
+  /*    PS_DICT_FAMILY_NAME ::                                             */
+  /*    PS_DICT_WEIGHT ::                                                  */
+  /*    PS_DICT_IS_FIXED_PITCH ::                                          */
+  /*    PS_DICT_UNDERLINE_POSITION ::                                      */
+  /*    PS_DICT_UNDERLINE_THICKNESS ::                                     */
+  /*    PS_DICT_FS_TYPE ::                                                 */
+  /*    PS_DICT_ITALIC_ANGLE ::                                            */
+  /*                                                                       */
+  /* <Since>                                                               */
+  /*    2.4.8                                                              */
+  /*                                                                       */
   typedef enum  PS_Dict_Keys_
   {
     /* conventionally in the font dictionary */
@@ -691,7 +687,7 @@ FT_BEGIN_HEADER
   } PS_Dict_Keys;
 
 
-  /**************************************************************************
+  /************************************************************************
    *
    * @function:
    *    FT_Get_PS_Font_Value
@@ -701,57 +697,57 @@ FT_BEGIN_HEADER
    *
    * @input:
    *    face ::
-   *      PostScript face handle.
+   *       PostScript face handle.
    *
    *    key ::
-   *      An enumeration value representing the dictionary key to retrieve.
+   *       An enumeration value representing the dictionary key to retrieve.
    *
    *    idx ::
-   *      For array values, this specifies the index to be returned.
+   *       For array values, this specifies the index to be returned.
    *
    *    value ::
-   *      A pointer to memory into which to write the value.
+   *       A pointer to memory into which to write the value.
    *
    *    valen_len ::
-   *      The size, in bytes, of the memory supplied for the value.
+   *       The size, in bytes, of the memory supplied for the value.
    *
    * @output:
    *    value ::
-   *      The value matching the above key, if it exists.
+   *       The value matching the above key, if it exists.
    *
    * @return:
-   *    The amount of memory (in bytes) required to hold the requested value
-   *    (if it exists, -1 otherwise).
+   *    The amount of memory (in bytes) required to hold the requested
+   *    value (if it exists, -1 otherwise).
    *
    * @note:
    *    The values returned are not pointers into the internal structures of
-   *    the face, but are 'fresh' copies, so that the memory containing them
+   *    the face, but are `fresh' copies, so that the memory containing them
    *    belongs to the calling application.  This also enforces the
-   *    'read-only' nature of these values, i.e., this function cannot be
+   *    `read-only' nature of these values, i.e., this function cannot be
    *    used to manipulate the face.
    *
-   *    `value` is a void pointer because the values returned can be of
+   *    `value' is a void pointer because the values returned can be of
    *    various types.
    *
-   *    If either `value` is `NULL` or `value_len` is too small, just the
+   *    If either `value' is NULL or `value_len' is too small, just the
    *    required memory size for the requested entry is returned.
    *
-   *    The `idx` parameter is used, not only to retrieve elements of, for
+   *    The `idx' parameter is used, not only to retrieve elements of, for
    *    example, the FontMatrix or FontBBox, but also to retrieve name keys
    *    from the CharStrings dictionary, and the charstrings themselves.  It
    *    is ignored for atomic values.
    *
-   *    `PS_DICT_BLUE_SCALE` returns a value that is scaled up by 1000.  To
-   *    get the value as in the font stream, you need to divide by 65536000.0
-   *    (to remove the FT_Fixed scale, and the x1000 scale).
+   *    PS_DICT_BLUE_SCALE returns a value that is scaled up by 1000.  To
+   *    get the value as in the font stream, you need to divide by
+   *    65536000.0 (to remove the FT_Fixed scale, and the x1000 scale).
    *
    *    IMPORTANT: Only key/value pairs read by the FreeType interpreter can
-   *    be retrieved.  So, for example, PostScript procedures such as NP, ND,
-   *    and RD are not available.  Arbitrary keys are, obviously, not be
+   *    be retrieved.  So, for example, PostScript procedures such as NP,
+   *    ND, and RD are not available.  Arbitrary keys are, obviously, not be
    *    available either.
    *
    *    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

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

@@ -1,19 +1,19 @@
-/****************************************************************************
- *
- * ttnameid.h
- *
- *   TrueType name ID definitions (specification only).
- *
- * Copyright (C) 1996-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  ttnameid.h                                                             */
+/*                                                                         */
+/*    TrueType name ID definitions (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 TTNAMEID_H_
@@ -26,54 +26,53 @@
 FT_BEGIN_HEADER
 
 
-  /**************************************************************************
-   *
-   * @section:
-   *   truetype_tables
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    truetype_tables                                                    */
+  /*                                                                       */
 
 
-  /**************************************************************************
-   *
-   * Possible values for the 'platform' identifier code in the name records
-   * of an SFNT 'name' table.
-   *
-   */
+  /*************************************************************************/
+  /*                                                                       */
+  /* Possible values for the `platform' identifier code in the name        */
+  /* records of an SFNT `name' table.                                      */
+  /*                                                                       */
+  /*************************************************************************/
 
 
-  /**************************************************************************
+  /***********************************************************************
    *
    * @enum:
    *   TT_PLATFORM_XXX
    *
    * @description:
-   *   A list of valid values for the `platform_id` identifier code in
+   *   A list of valid values for the `platform_id' identifier code in
    *   @FT_CharMapRec and @FT_SfntName structures.
    *
    * @values:
    *   TT_PLATFORM_APPLE_UNICODE ::
    *     Used by Apple to indicate a Unicode character map and/or name entry.
-   *     See @TT_APPLE_ID_XXX for corresponding `encoding_id` values.  Note
+   *     See @TT_APPLE_ID_XXX for corresponding `encoding_id' values.  Note
    *     that name entries in this format are coded as big-endian UCS-2
    *     character codes _only_.
    *
    *   TT_PLATFORM_MACINTOSH ::
-   *     Used by Apple to indicate a MacOS-specific charmap and/or name
-   *     entry.  See @TT_MAC_ID_XXX for corresponding `encoding_id` values.
-   *     Note that most TrueType fonts contain an Apple roman charmap to be
-   *     usable on MacOS systems (even if they contain a Microsoft charmap as
-   *     well).
+   *     Used by Apple to indicate a MacOS-specific charmap and/or name entry.
+   *     See @TT_MAC_ID_XXX for corresponding `encoding_id' values.  Note that
+   *     most TrueType fonts contain an Apple roman charmap to be usable on
+   *     MacOS systems (even if they contain a Microsoft charmap as well).
    *
    *   TT_PLATFORM_ISO ::
-   *     This value was used to specify ISO/IEC 10646 charmaps.  It is
-   *     however now deprecated.  See @TT_ISO_ID_XXX for a list of
-   *     corresponding `encoding_id` values.
+   *     This value was used to specify ISO/IEC 10646 charmaps.  It is however
+   *     now deprecated.  See @TT_ISO_ID_XXX for a list of corresponding
+   *     `encoding_id' values.
    *
    *   TT_PLATFORM_MICROSOFT ::
    *     Used by Microsoft to indicate Windows-specific charmaps.  See
-   *     @TT_MS_ID_XXX for a list of corresponding `encoding_id` values.
+   *     @TT_MS_ID_XXX for a list of corresponding `encoding_id' values.
    *     Note that most fonts contain a Unicode charmap using
-   *     (`TT_PLATFORM_MICROSOFT`, @TT_MS_ID_UNICODE_CS).
+   *     (TT_PLATFORM_MICROSOFT, @TT_MS_ID_UNICODE_CS).
    *
    *   TT_PLATFORM_CUSTOM ::
    *     Used to indicate application-specific charmaps.
@@ -92,13 +91,13 @@ FT_BEGIN_HEADER
 #define TT_PLATFORM_ADOBE          7 /* artificial */
 
 
-  /**************************************************************************
+  /***********************************************************************
    *
    * @enum:
    *   TT_APPLE_ID_XXX
    *
    * @description:
-   *   A list of valid values for the `encoding_id` for
+   *   A list of valid values for the `encoding_id' for
    *   @TT_PLATFORM_APPLE_UNICODE charmaps and name entries.
    *
    * @values:
@@ -118,8 +117,8 @@ FT_BEGIN_HEADER
    *     Unicode 3.1 and beyond, using UTF-32.
    *
    *   TT_APPLE_ID_VARIANT_SELECTOR ::
-   *     From Adobe, not Apple.  Not a normal cmap.  Specifies variations on
-   *     a real cmap.
+   *     From Adobe, not Apple.  Not a normal cmap.  Specifies variations
+   *     on a real cmap.
    *
    *   TT_APPLE_ID_FULL_UNICODE ::
    *     Used for fallback fonts that provide complete Unicode coverage with
@@ -135,13 +134,13 @@ FT_BEGIN_HEADER
 #define TT_APPLE_ID_FULL_UNICODE      6 /* used with type 13 cmaps       */
 
 
-  /**************************************************************************
+  /***********************************************************************
    *
    * @enum:
    *   TT_MAC_ID_XXX
    *
    * @description:
-   *   A list of valid values for the `encoding_id` for
+   *   A list of valid values for the `encoding_id' for
    *   @TT_PLATFORM_MACINTOSH charmaps and name entries.
    */
 
@@ -181,14 +180,14 @@ FT_BEGIN_HEADER
 #define TT_MAC_ID_UNINTERP             32
 
 
-  /**************************************************************************
+  /***********************************************************************
    *
    * @enum:
    *   TT_ISO_ID_XXX
    *
    * @description:
-   *   A list of valid values for the `encoding_id` for @TT_PLATFORM_ISO
-   *   charmaps and name entries.
+   *   A list of valid values for the `encoding_id' for
+   *   @TT_PLATFORM_ISO charmaps and name entries.
    *
    *   Their use is now deprecated.
    *
@@ -206,13 +205,13 @@ FT_BEGIN_HEADER
 #define TT_ISO_ID_8859_1      2
 
 
-  /**************************************************************************
+  /***********************************************************************
    *
    * @enum:
    *   TT_MS_ID_XXX
    *
    * @description:
-   *   A list of valid values for the `encoding_id` for
+   *   A list of valid values for the `encoding_id' for
    *   @TT_PLATFORM_MICROSOFT charmaps and name entries.
    *
    * @values:
@@ -220,15 +219,16 @@ FT_BEGIN_HEADER
    *     Microsoft symbol encoding.  See @FT_ENCODING_MS_SYMBOL.
    *
    *   TT_MS_ID_UNICODE_CS ::
-   *     Microsoft WGL4 charmap, matching Unicode.  See @FT_ENCODING_UNICODE.
+   *     Microsoft WGL4 charmap, matching Unicode.  See
+   *     @FT_ENCODING_UNICODE.
    *
    *   TT_MS_ID_SJIS ::
    *     Shift JIS Japanese encoding.  See @FT_ENCODING_SJIS.
    *
    *   TT_MS_ID_PRC ::
    *     Chinese encodings as used in the People's Republic of China (PRC).
-   *     This means the encodings GB~2312 and its supersets GBK and GB~18030.
-   *     See @FT_ENCODING_PRC.
+   *     This means the encodings GB~2312 and its supersets GBK and
+   *     GB~18030.  See @FT_ENCODING_PRC.
    *
    *   TT_MS_ID_BIG_5 ::
    *     Traditional Chinese as used in Taiwan and Hong Kong.  See
@@ -258,14 +258,14 @@ FT_BEGIN_HEADER
 #define TT_MS_ID_GB2312  TT_MS_ID_PRC
 
 
-  /**************************************************************************
+  /***********************************************************************
    *
    * @enum:
    *   TT_ADOBE_ID_XXX
    *
    * @description:
-   *   A list of valid values for the `encoding_id` for @TT_PLATFORM_ADOBE
-   *   charmaps.  This is a FreeType-specific extension!
+   *   A list of valid values for the `encoding_id' for
+   *   @TT_PLATFORM_ADOBE charmaps.  This is a FreeType-specific extension!
    *
    * @values:
    *   TT_ADOBE_ID_STANDARD ::
@@ -284,14 +284,14 @@ FT_BEGIN_HEADER
 #define TT_ADOBE_ID_LATIN_1   3
 
 
-  /**************************************************************************
+  /***********************************************************************
    *
    * @enum:
    *   TT_MAC_LANGID_XXX
    *
    * @description:
    *   Possible values of the language identifier field in the name records
-   *   of the SFNT 'name' table if the 'platform' identifier code is
+   *   of the SFNT `name' table if the `platform' identifier code is
    *   @TT_PLATFORM_MACINTOSH.  These values are also used as return values
    *   for function @FT_Get_CMap_Language_ID.
    *
@@ -424,24 +424,24 @@ FT_BEGIN_HEADER
 #define TT_MAC_LANGID_AZERBAIJANI_ROMAN_SCRIPT    150
 
 
-  /**************************************************************************
+  /***********************************************************************
    *
    * @enum:
    *   TT_MS_LANGID_XXX
    *
    * @description:
    *   Possible values of the language identifier field in the name records
-   *   of the SFNT 'name' table if the 'platform' identifier code is
+   *   of the SFNT `name' table if the `platform' identifier code is
    *   @TT_PLATFORM_MICROSOFT.  These values are also used as return values
    *   for function @FT_Get_CMap_Language_ID.
    *
    *   The canonical source for Microsoft's IDs is
    *
-   *     https://docs.microsoft.com/en-us/windows/desktop/Intl/language-identifier-constants-and-strings ,
+   *     https://www.microsoft.com/globaldev/reference/lcid-all.mspx ,
    *
    *   however, we only provide macros for language identifiers present in
    *   the OpenType specification: Microsoft has abandoned the concept of
-   *   LCIDs (language code identifiers), and format~1 of the 'name' table
+   *   LCIDs (language code identifiers), and format~1 of the `name' table
    *   provides a better mechanism for languages not covered here.
    *
    *   More legacy values not listed in the reference can be found in the
@@ -780,14 +780,14 @@ FT_BEGIN_HEADER
           TT_MS_LANGID_UIGHUR_PRC
 
 
-  /**************************************************************************
+  /***********************************************************************
    *
    * @enum:
    *   TT_NAME_ID_XXX
    *
    * @description:
-   *   Possible values of the 'name' identifier field in the name records of
-   *   an SFNT 'name' table.  These values are platform independent.
+   *   Possible values of the `name' identifier field in the name records of
+   *   an SFNT `name' table.  These values are platform independent.
    */
 
 #define TT_NAME_ID_COPYRIGHT              0
@@ -834,14 +834,14 @@ FT_BEGIN_HEADER
 #define TT_NAME_ID_PREFERRED_SUBFAMILY  TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY
 
 
-  /**************************************************************************
+  /***********************************************************************
    *
    * @enum:
    *   TT_UCR_XXX
    *
    * @description:
-   *   Possible bit mask values for the `ulUnicodeRangeX` fields in an SFNT
-   *   'OS/2' table.
+   *   Possible bit mask values for the `ulUnicodeRangeX' fields in an SFNT
+   *   `OS/2' table.
    */
 
   /* ulUnicodeRange1 */

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 442 - 452
thirdparty/freetype/include/freetype/tttables.h


+ 16 - 18
thirdparty/freetype/include/freetype/tttags.h

@@ -1,19 +1,19 @@
-/****************************************************************************
- *
- * tttags.h
- *
- *   Tags for TrueType and OpenType tables (specification only).
- *
- * Copyright (C) 1996-2019 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.
- *
- */
+/***************************************************************************/
+/*                                                                         */
+/*  tttags.h                                                               */
+/*                                                                         */
+/*    Tags for TrueType and OpenType tables (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 TTAGS_H_
@@ -46,8 +46,6 @@ FT_BEGIN_HEADER
 #define TTAG_CFF2  FT_MAKE_TAG( 'C', 'F', 'F', '2' )
 #define TTAG_CID   FT_MAKE_TAG( 'C', 'I', 'D', ' ' )
 #define TTAG_cmap  FT_MAKE_TAG( 'c', 'm', 'a', 'p' )
-#define TTAG_COLR  FT_MAKE_TAG( 'C', 'O', 'L', 'R' )
-#define TTAG_CPAL  FT_MAKE_TAG( 'C', 'P', 'A', 'L' )
 #define TTAG_cvar  FT_MAKE_TAG( 'c', 'v', 'a', 'r' )
 #define TTAG_cvt   FT_MAKE_TAG( 'c', 'v', 't', ' ' )
 #define TTAG_DSIG  FT_MAKE_TAG( 'D', 'S', 'I', 'G' )

+ 63 - 0
thirdparty/freetype/include/freetype/ttunpat.h

@@ -0,0 +1,63 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ttunpat.h                                                              */
+/*                                                                         */
+/*    Definitions for the unpatented TrueType hinting system.              */
+/*    Obsolete, retained for backward compatibility.                       */
+/*                                                                         */
+/*  Copyright 2003-2017 by                                                 */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  Written by Graham Asher <[email protected]>                  */
+/*                                                                         */
+/*  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 TTUNPAT_H_
+#define TTUNPAT_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
+
+
+ /***************************************************************************
+  *
+  * @constant:
+  *   FT_PARAM_TAG_UNPATENTED_HINTING
+  *
+  * @description:
+  *   Deprecated.
+  *
+  *   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 /* TTUNPAT_H_ */
+
+
+/* END */

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