Browse Source

Update FreeType to 2.7.1.

Lasse Öörni 9 years ago
parent
commit
2ebbbd477b
100 changed files with 4402 additions and 1900 deletions
  1. 1 1
      Docs/Urho3D.dox
  2. 1 1
      README.md
  3. 1 0
      Source/ThirdParty/FreeType/CMakeLists.txt
  4. 13 12
      Source/ThirdParty/FreeType/README
  5. 799 2
      Source/ThirdParty/FreeType/docs/CHANGES
  6. 2 0
      Source/ThirdParty/FreeType/docs/CMAKE
  7. 13 16
      Source/ThirdParty/FreeType/docs/CUSTOMIZE
  8. 92 90
      Source/ThirdParty/FreeType/docs/DEBUG
  9. 1 1
      Source/ThirdParty/FreeType/docs/FTL.TXT
  10. 8 3
      Source/ThirdParty/FreeType/docs/INSTALL
  11. 26 26
      Source/ThirdParty/FreeType/docs/INSTALL.ANY
  12. 68 26
      Source/ThirdParty/FreeType/docs/INSTALL.CROSS
  13. 14 12
      Source/ThirdParty/FreeType/docs/INSTALL.GNU
  14. 20 1
      Source/ThirdParty/FreeType/docs/INSTALL.UNIX
  15. 1 1
      Source/ThirdParty/FreeType/docs/INSTALL.VMS
  16. 4 2
      Source/ThirdParty/FreeType/docs/LICENSE.TXT
  17. 1 1
      Source/ThirdParty/FreeType/docs/TODO
  18. 123 0
      Source/ThirdParty/FreeType/docs/VERSIONS.TXT
  19. 156 131
      Source/ThirdParty/FreeType/docs/formats.txt
  20. 1 1
      Source/ThirdParty/FreeType/docs/raster.txt
  21. 14 28
      Source/ThirdParty/FreeType/docs/release
  22. 48 228
      Source/ThirdParty/FreeType/include/freetype/config/ftconfig.h
  23. 13 12
      Source/ThirdParty/FreeType/include/freetype/config/ftheader.h
  24. 194 94
      Source/ThirdParty/FreeType/include/freetype/config/ftoption.h
  25. 9 8
      Source/ThirdParty/FreeType/include/freetype/config/ftstdlib.h
  26. 377 139
      Source/ThirdParty/FreeType/include/freetype/freetype.h
  27. 11 6
      Source/ThirdParty/FreeType/include/freetype/ftadvanc.h
  28. 171 17
      Source/ThirdParty/FreeType/include/freetype/ftautoh.h
  29. 4 5
      Source/ThirdParty/FreeType/include/freetype/ftbbox.h
  30. 8 7
      Source/ThirdParty/FreeType/include/freetype/ftbdf.h
  31. 20 7
      Source/ThirdParty/FreeType/include/freetype/ftbitmap.h
  32. 5 5
      Source/ThirdParty/FreeType/include/freetype/ftbzip2.h
  33. 13 13
      Source/ThirdParty/FreeType/include/freetype/ftcache.h
  34. 42 19
      Source/ThirdParty/FreeType/include/freetype/ftcffdrv.h
  35. 15 0
      Source/ThirdParty/FreeType/include/freetype/ftchapters.h
  36. 9 7
      Source/ThirdParty/FreeType/include/freetype/ftcid.h
  37. 130 103
      Source/ThirdParty/FreeType/include/freetype/fterrdef.h
  38. 73 45
      Source/ThirdParty/FreeType/include/freetype/fterrors.h
  39. 95 0
      Source/ThirdParty/FreeType/include/freetype/ftfntfmt.h
  40. 6 5
      Source/ThirdParty/FreeType/include/freetype/ftgasp.h
  41. 6 21
      Source/ThirdParty/FreeType/include/freetype/ftglyph.h
  42. 16 17
      Source/ThirdParty/FreeType/include/freetype/ftgxval.h
  43. 10 11
      Source/ThirdParty/FreeType/include/freetype/ftgzip.h
  44. 66 183
      Source/ThirdParty/FreeType/include/freetype/ftimage.h
  45. 6 5
      Source/ThirdParty/FreeType/include/freetype/ftincrem.h
  46. 111 76
      Source/ThirdParty/FreeType/include/freetype/ftlcdfil.h
  47. 5 6
      Source/ThirdParty/FreeType/include/freetype/ftlist.h
  48. 5 5
      Source/ThirdParty/FreeType/include/freetype/ftlzw.h
  49. 5 5
      Source/ThirdParty/FreeType/include/freetype/ftmac.h
  50. 108 24
      Source/ThirdParty/FreeType/include/freetype/ftmm.h
  51. 46 20
      Source/ThirdParty/FreeType/include/freetype/ftmodapi.h
  52. 5 5
      Source/ThirdParty/FreeType/include/freetype/ftmoderr.h
  53. 17 16
      Source/ThirdParty/FreeType/include/freetype/ftotval.h
  54. 27 14
      Source/ThirdParty/FreeType/include/freetype/ftoutln.h
  55. 5 5
      Source/ThirdParty/FreeType/include/freetype/ftpfr.h
  56. 7 12
      Source/ThirdParty/FreeType/include/freetype/ftrender.h
  57. 4 4
      Source/ThirdParty/FreeType/include/freetype/ftsizes.h
  58. 4 4
      Source/ThirdParty/FreeType/include/freetype/ftsnames.h
  59. 42 8
      Source/ThirdParty/FreeType/include/freetype/ftstroke.h
  60. 9 6
      Source/ThirdParty/FreeType/include/freetype/ftsynth.h
  61. 13 5
      Source/ThirdParty/FreeType/include/freetype/ftsystem.h
  62. 8 8
      Source/ThirdParty/FreeType/include/freetype/fttrigon.h
  63. 206 27
      Source/ThirdParty/FreeType/include/freetype/ftttdrv.h
  64. 9 5
      Source/ThirdParty/FreeType/include/freetype/fttypes.h
  65. 7 7
      Source/ThirdParty/FreeType/include/freetype/ftwinfnt.h
  66. 4 4
      Source/ThirdParty/FreeType/include/freetype/internal/autohint.h
  67. 277 30
      Source/ThirdParty/FreeType/include/freetype/internal/ftcalc.h
  68. 5 5
      Source/ThirdParty/FreeType/include/freetype/internal/ftdebug.h
  69. 5 14
      Source/ThirdParty/FreeType/include/freetype/internal/ftdriver.h
  70. 22 36
      Source/ThirdParty/FreeType/include/freetype/internal/ftgloadr.h
  71. 136 0
      Source/ThirdParty/FreeType/include/freetype/internal/fthash.h
  72. 31 16
      Source/ThirdParty/FreeType/include/freetype/internal/ftmemory.h
  73. 51 50
      Source/ThirdParty/FreeType/include/freetype/internal/ftobjs.h
  74. 4 4
      Source/ThirdParty/FreeType/include/freetype/internal/ftpic.h
  75. 17 8
      Source/ThirdParty/FreeType/include/freetype/internal/ftrfork.h
  76. 102 22
      Source/ThirdParty/FreeType/include/freetype/internal/ftserv.h
  77. 5 5
      Source/ThirdParty/FreeType/include/freetype/internal/ftstream.h
  78. 3 1
      Source/ThirdParty/FreeType/include/freetype/internal/fttrace.h
  79. 14 16
      Source/ThirdParty/FreeType/include/freetype/internal/ftvalid.h
  80. 2 2
      Source/ThirdParty/FreeType/include/freetype/internal/internal.h
  81. 15 13
      Source/ThirdParty/FreeType/include/freetype/internal/psaux.h
  82. 6 6
      Source/ThirdParty/FreeType/include/freetype/internal/pshints.h
  83. 4 4
      Source/ThirdParty/FreeType/include/freetype/internal/services/svbdf.h
  84. 5 4
      Source/ThirdParty/FreeType/include/freetype/internal/services/svcid.h
  85. 55 0
      Source/ThirdParty/FreeType/include/freetype/internal/services/svfntfmt.h
  86. 7 4
      Source/ThirdParty/FreeType/include/freetype/internal/services/svgldict.h
  87. 4 4
      Source/ThirdParty/FreeType/include/freetype/internal/services/svgxval.h
  88. 4 4
      Source/ThirdParty/FreeType/include/freetype/internal/services/svkern.h
  89. 155 0
      Source/ThirdParty/FreeType/include/freetype/internal/services/svmetric.h
  90. 72 27
      Source/ThirdParty/FreeType/include/freetype/internal/services/svmm.h
  91. 4 4
      Source/ThirdParty/FreeType/include/freetype/internal/services/svotval.h
  92. 4 4
      Source/ThirdParty/FreeType/include/freetype/internal/services/svpfr.h
  93. 4 4
      Source/ThirdParty/FreeType/include/freetype/internal/services/svpostnm.h
  94. 6 5
      Source/ThirdParty/FreeType/include/freetype/internal/services/svprop.h
  95. 4 4
      Source/ThirdParty/FreeType/include/freetype/internal/services/svpscmap.h
  96. 4 4
      Source/ThirdParty/FreeType/include/freetype/internal/services/svpsinfo.h
  97. 4 4
      Source/ThirdParty/FreeType/include/freetype/internal/services/svsfnt.h
  98. 9 10
      Source/ThirdParty/FreeType/include/freetype/internal/services/svttcmap.h
  99. 4 4
      Source/ThirdParty/FreeType/include/freetype/internal/services/svtteng.h
  100. 5 4
      Source/ThirdParty/FreeType/include/freetype/internal/services/svttglyf.h

+ 1 - 1
Docs/Urho3D.dox

@@ -188,7 +188,7 @@ Urho3D uses the following third-party libraries:
 - Box2D 2.3.0 (http://box2d.org)
 - Box2D 2.3.0 (http://box2d.org)
 - Bullet 2.83.6 (http://www.bulletphysics.org)
 - Bullet 2.83.6 (http://www.bulletphysics.org)
 - Civetweb 1.7 (https://github.com/civetweb/civetweb)
 - Civetweb 1.7 (https://github.com/civetweb/civetweb)
-- FreeType 2.5.0 (https://www.freetype.org)
+- FreeType 2.7.1 (https://www.freetype.org)
 - GLEW 1.13.0 (http://glew.sourceforge.net)
 - GLEW 1.13.0 (http://glew.sourceforge.net)
 - jo_jpeg 1.52 (http://www.jonolick.com/uploads/7/9/2/1/7921194/jo_jpeg.cpp)
 - jo_jpeg 1.52 (http://www.jonolick.com/uploads/7/9/2/1/7921194/jo_jpeg.cpp)
 - kNet (https://github.com/juj/kNet)
 - kNet (https://github.com/juj/kNet)

+ 1 - 1
README.md

@@ -149,7 +149,7 @@ Urho3D uses the following third-party libraries:
 - Box2D 2.3.0 (http://box2d.org)
 - Box2D 2.3.0 (http://box2d.org)
 - Bullet 2.83.6 (http://www.bulletphysics.org)
 - Bullet 2.83.6 (http://www.bulletphysics.org)
 - Civetweb 1.7 (https://github.com/civetweb/civetweb)
 - Civetweb 1.7 (https://github.com/civetweb/civetweb)
-- FreeType 2.5.0 (https://www.freetype.org)
+- FreeType 2.7.1 (https://www.freetype.org)
 - GLEW 1.13.0 (http://glew.sourceforge.net)
 - GLEW 1.13.0 (http://glew.sourceforge.net)
 - jo_jpeg 1.52 (http://www.jonolick.com/uploads/7/9/2/1/7921194/jo_jpeg.cpp)
 - jo_jpeg 1.52 (http://www.jonolick.com/uploads/7/9/2/1/7921194/jo_jpeg.cpp)
 - kNet (https://github.com/juj/kNet)
 - kNet (https://github.com/juj/kNet)

+ 1 - 0
Source/ThirdParty/FreeType/CMakeLists.txt

@@ -36,6 +36,7 @@ set (SOURCE_FILES
     src/base/ftbase.c
     src/base/ftbase.c
     src/base/ftbbox.c
     src/base/ftbbox.c
     src/base/ftbitmap.c
     src/base/ftbitmap.c
+    src/base/ftfntfmt.c
     src/base/ftfstype.c
     src/base/ftfstype.c
     src/base/ftgasp.c
     src/base/ftgasp.c
     src/base/ftglyph.c
     src/base/ftglyph.c

+ 13 - 12
Source/ThirdParty/FreeType/README

@@ -1,4 +1,4 @@
-  FreeType 2.5.0
+  FreeType 2.7.1
   ==============
   ==============
 
 
   Homepage: http://www.freetype.org
   Homepage: http://www.freetype.org
@@ -16,7 +16,7 @@
   the file `docs/LICENSE.TXT' for the available licenses.
   the file `docs/LICENSE.TXT' for the available licenses.
 
 
   The FreeType 2 API reference is located in `docs/reference'; use the
   The FreeType 2 API reference is located in `docs/reference'; use the
-  file   `ft2-doc.html'   as   the   top  entry   point.    Additional
+  file   `ft2-toc.html'   as   the   top  entry   point.    Additional
   documentation is available as a separate package from our sites.  Go
   documentation is available as a separate package from our sites.  Go
   to
   to
 
 
@@ -24,9 +24,9 @@
 
 
   and download one of the following files.
   and download one of the following files.
 
 
-    freetype-doc-2.5.0.tar.bz2
-    freetype-doc-2.5.0.tar.gz
-    ftdoc250.zip
+    freetype-doc-2.7.1.tar.bz2
+    freetype-doc-2.7.1.tar.gz
+    ftdoc271.zip
 
 
   To view the documentation online, go to
   To view the documentation online, go to
 
 
@@ -42,6 +42,7 @@
     general use and discussion:      [email protected]
     general use and discussion:      [email protected]
     engine internals, porting, etc.: [email protected]
     engine internals, porting, etc.: [email protected]
     announcements:                   [email protected]
     announcements:                   [email protected]
+    git repository tracker:          [email protected]
 
 
   The lists are moderated; see
   The lists are moderated; see
 
 
@@ -53,15 +54,15 @@
   Bugs
   Bugs
   ====
   ====
 
 
-  Please report bugs  by e-mail to `[email protected]'.  Don't
-  forget to  send a  detailed explanation of  the problem --  there is
-  nothing  worse than  receiving a  terse message  that only  says `it
-  doesn't work'.
-
-  Alternatively, you may submit a bug report at
+  Please submit bug reports at
 
 
     https://savannah.nongnu.org/bugs/?group=freetype
     https://savannah.nongnu.org/bugs/?group=freetype
 
 
+  Alternatively,    you   might    report    bugs    by   e-mail    to
+  `[email protected]'.   Don't  forget   to  send  a  detailed
+  explanation of the problem --  there is nothing worse than receiving
+  a terse message that only says `it doesn't work'.
+
 
 
   Enjoy!
   Enjoy!
 
 
@@ -70,7 +71,7 @@
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright 2006-2013 by
+Copyright 2006-2016 by
 David Turner, Robert Wilhelm, and Werner Lemberg.
 David Turner, Robert Wilhelm, and Werner Lemberg.
 
 
 This  file is  part of  the FreeType  project, and  may only  be used,
 This  file is  part of  the FreeType  project, and  may only  be used,

+ 799 - 2
Source/ThirdParty/FreeType/docs/CHANGES

@@ -1,4 +1,798 @@
 
 
+CHANGES BETWEEN 2.7 and 2.7.1
+
+  I. IMPORTANT CHANGES
+
+    - Support for the new CFF2 font format as introduced with OpenType
+      1.8 has been contributed by Dave Arnolds from Adobe.
+
+    - Preliminary support for variation fonts as specified in OpenType
+      1.8 (in addition to the  already existing support for Adobe's MM
+      and Apple's  GX formats).  Dave Arnolds  contributed handling of
+      advance  width change  variation;  more will  come  in the  next
+      version.
+
+
+  II. IMPORTANT BUG FIXES
+
+    - Handling of  raw CID fonts was partially  broken (bug introduced
+      in 2.6.4).
+
+
+  III. MISCELLANEOUS
+
+    - Some limits for TrueType  bytecode execution have been tightened
+      to  speed   up  FreeType's  handling  of   malformed  fonts,  in
+      particular to quickly abort endless loops.
+
+      - The  number of  twilight points  can no  longer be  set to  an
+        arbitrarily large value.
+
+      - The total number of jump  opcode instructions (like JMPR) with
+        negative arguments  is dynamically restricted; the  same holds
+        for the total number of iterations in LOOPCALL opcodes.
+
+      The dynamic limits are based on  the number of points in a glyph
+      and the number of CVT entries.  Please report if you encounter a
+      font where the selected values are not adequate.
+
+    - PCF family names are made more `colourful'; they now include the
+      foundry  and information  whether they contain  wide characters.
+      For example,  you no longer get `Fixed' but  rather `Sony Fixed'
+      or `Misc Fixed Wide'.
+
+    - A new  function `FT_Get_Var_Blend_Coordinates'  (with its  alias
+      name  `FT_Get_MM_Blend_Coordinates') to retrieve the  normalized
+      blend  coordinates of the currently  selected variation instance
+      has been added to the Multiple Masters interface.
+
+    - A new  function `FT_Get_Var_Design_Coordinates' to  retrieve the
+      design coordinates of the  currently selected variation instance
+      has been added to the Multiple Masters interface.
+
+    - A new load flag `FT_LOAD_BITMAP_METRICS_ONLY' to retrieve bitmap
+      information without loading the (embedded) bitmap itself.
+
+    - Retrieving   advance   widths   from   bitmap   strikes   (using
+      `FT_Get_Advance' and `FT_Get_Advances') have been sped up.
+
+    - The  usual round  of  fuzzer fixes  to  better reject  malformed
+      fonts.
+
+    - The `ftmulti' demo program can now switch engines with key `H'.
+
+    - The  `ftstring'  demo  program   can  now  show  some  built-in,
+      non-latin sample strings (to be selected with the TAB key).
+
+    - The  `ftview'  demo program  can  now  switch between  a  font's
+      charmaps using the TAB key.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.6.5 and 2.7
+
+  I. IMPORTANT CHANGES
+
+    - As announced earlier, the 2.7.x series now uses the new subpixel
+      hinting  mode as  the  default, emulating  a  modern version  of
+      ClearType.
+
+      This change inevitably leads to different rendering results, and
+      you   might   change   the   `TT_CONFIG_OPTION_SUBPIXEL_HINTING'
+      configuration option to  adapt it to your taste (or  use the new
+      `FREETYPE_PROPERTIES'    environment    variable).    See    the
+      corresponding entry  below for  version 2.6.4, which  gives more
+      information.
+
+    - A new option  `FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES' has been
+      introduced.   If  set (which  is  the  default), an  environment
+      variable  `FREETYPE_PROPERTIES' can  be used  to control  driver
+      properties.  Example:
+
+        FREETYPE_PROPERTIES=truetype:interpreter-version=35 \
+                            cff:no-stem-darkening=1 \
+                            autofitter:warping=1
+
+      This allows to select, say, the subpixel hinting mode at runtime
+      for a given application.  See file `ftoption.h' for more.
+
+
+  II. IMPORTANT BUG FIXES
+
+    - After  loading a  named instance  of  a GX  variation font,  the
+      `face_index'  value  in  the returned  `FT_Face'  structure  now
+      correctly holds the named instance  index in the upper 16bits as
+      documented.
+
+
+  III. MISCELLANEOUS
+
+    - A new macro `FT_IS_NAMED_INSTANCE' to  test whether a given face
+      is a named instance.
+
+    - More fixes to GX font handling.
+
+    - Apple's   `GETVARIATION'  bytecode   operator  (needed   for  GX
+      variation font support) has been implemented.
+
+    - Another round  of fuzzer fixes,  mainly to reject  invalid fonts
+      faster.
+
+    - Handling of raw CID fonts  was broken (bug introduced in version
+      2.6.4).
+
+    - The smooth rasterizer has been streamlined  to make it faster by
+      approx. 20%.
+
+    - The `ftgrid'  demo program now  understands command  line option
+      `-d' to give start-up design coordinates.
+
+    - The `ftdump' demo program has  a new command line option `-p' to
+      dump TrueType bytecode instructions.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.6.4 and 2.6.5
+
+  I. IMPORTANT BUG FIXES
+
+    - Compilation works again  on Mac OS X (bug introduced  in version
+      2.6.4).
+
+
+  II. IMPORTANT CHANGES
+
+    - The new  subpixel hinting  mode is now  disabled by  default; it
+      will  be enabled  by default  in the  forthcoming 2.7.x  series.
+      Main reason for reverting this feature is the principle of least
+      surprise: a  sudden change in  appearance of all fonts  (even if
+      the rendering improves  for almost all recent  fonts) should not
+      be expected in a new micro version of a series.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.6.3 and 2.6.4
+
+  I. IMPORTANT CHANGES
+
+    - A new  subpixel hinting  mode has  been contributed  by Nikolaus
+      Waxweiler, which is now the  default rendering mode for TrueType
+      fonts.  It implements  (almost everything of) version  40 of the
+      bytecode engine.
+
+      The existing code  base in FreeType (the  `Infinality code') was
+      stripped to the bare minimum  and all configurability removed in
+      the  name  of speed  and  simplicity.   The configurability  was
+      mainly aimed  at legacy  fonts like Arial,  Times New  Roman, or
+      Courier.  [Legacy fonts are fonts  that modify vertical stems to
+      achieve clean black-and-white bitmaps.]  The new mode focuses on
+      applying a minimal set of rules to all fonts indiscriminately so
+      that modern and web fonts  render well while legacy fonts render
+      okay.
+
+      Activation  of the  subpixel hinting  support can  be controlled
+      with   the   `TT_CONFIG_OPTION_SUBPIXEL_HINTING'   configuration
+      option  at compile  time: If  set to  value 1,  you get  the old
+      Infinality  mode  (which  was  never  the  default  due  to  its
+      slowness).  Value 2 activates the new subpixel hinting mode, and
+      value 3 activates both.  The default is value 2.
+
+      At run time,  you can select the subpixel hinting  mode with the
+      `interpreter-version'  property (provided  you have  compiled in
+      the corresponding hinting mode); see `ftttdrv.h' for more.
+
+    - Support  for  the  following  scripts  has  been  added  to  the
+      auto-hinter.
+
+        Armenian, Cherokee, Ethiopic, Georgian, Gujarati, Gurmukhi,
+        Malayalam, Sinhala, Tamil
+
+
+  II. MISCELLANEOUS
+
+    - Type 42 fonts as created by LilyPond are now supported.
+
+    - Minor rendering improvments in the auto-hinter.
+
+    - For experimental  reasons, the old  CFF engine now  supports all
+      CFF operators except `random', including the deprecated Multiple
+      Masters  instructions.  This  allows the  display of  fonts like
+      `ITCGaramondMM-It.otf' (without font variations, though).
+
+    - Another round of fixes to improve handling of invalid fonts.
+
+    - The `ftgrid' demo program now displays the rendered pixels also;
+      this can be switched off with the `b' key.  Selection of various
+      LCD filtering modes can be done with the `L' key.
+
+    - The demo programs  have been extended to allow  selection of all
+      available TrueType bytecode engines.
+
+    - A very early beta version of a new, Qt based demo program called
+      `ftinspect'  is  part  of  the   source  code  bundle;  it  will
+      eventually supersede  the other  demo programs.   Currently, you
+      have to compile  it manually with `qmake; make';  note that many
+      features are still missing.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.6.2 and 2.6.3
+
+  I. IMPORTANT CHANGES
+
+    - Khmer,  Myanmar, Bengali,  and Kannada  script support  has been
+      added to the auto-hinter.
+
+
+  II. MISCELLANEOUS
+
+    - Better  support of  Indic  scripts like  Devanagari  by using  a
+      top-to-bottom hinting flow.
+
+    - All  FreeType macros  starting  with two  underscores have  been
+      renamed to  avoid a violation of  both the C and  C++ standards.
+      Example: Header  macros of the  form `__FOO_H__' are  now called
+      `FOO_H_'.  In most cases,  this should be completely transparent
+      to the user.   The exception to this  is `__FTERRORS_H__', which
+      must be  sometimes undefined by  the user to get  FreeType error
+      strings:  Both this  form and  the new  `FTERRORS_H_' macro  are
+      accepted for backwards compatibility.
+
+    - Minor improvements mainly to the Type 1 driver.
+
+    - The  new CFF  engine now  supports all  Type 2  operators except
+      `random'.
+
+    - The macro `_STANDALONE_', used for  compiling the B/W and smooth
+      rasterizers  as   stand-alone  modules,  has  been   renamed  to
+      `STANDALONE_', since macro names starting with an underscore and
+      followed by an uppercase letter are reserved in both C and C++.
+
+    - Function  `FT_Library_SetLcdFilterWeights'  now  also  activates
+      custom LCD filter weights (instead of just adjusting them).
+
+    - Support for  `unpatented hinting'  has been  completely removed:
+      Consequently,  the two  functions `FT_Face_CheckTrueTypePatents'
+      and  `FT_Face_SetUnpatentedHinting'  now  return  always  false,
+      doing nothing.
+
+    - The `ftgamma' demo  program has been modernized;  the gamma grid
+      display has been moved from `ftview' to this program.
+
+    - In `ftview',  it is now possible to cycle through  the available
+      LCD filtering modes.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.6.1 and 2.6.2
+
+  I. IMPORTANT CHANGES
+
+    - The auto-hinter now supports stem darkening, to be controlled by
+      the    new   `no-stem-darkening'    and   `darkening-parameters'
+      properties.   This is  an  experimental  feature contributed  by
+      Nikolaus Waxweiler, and  the interface might change  in a future
+      release.
+
+    - By default, stem darkening is now switched off (for both the CFF
+      engine and the  auto-hinter).  The main reason is  that you need
+      linear  alpha  blending  and  gamma correction  to  get  correct
+      rendering results, and  the latter is not yet  available in most
+      freely  available  rendering  stacks like  X11.   Applying  stem
+      darkening without proper gamma correction  leads to far too dark
+      rendering results.
+
+    - The   meaning  of   `FT_RENDER_MODE_LIGHT'  has   been  slightly
+      modified.   It  now  essentially  means `no  hinting  along  the
+      horizontal  axis'; in  particular,  no change  of glyph  advance
+      widths.  Consequently, the auto-hinter  is used for all scalable
+      font  formats  except  for  CFF.    It  is  planned  that  other
+      font-specific rendering engines (TrueType, Type 1) will follow.
+
+
+  II. MISCELLANEOUS
+
+    - The default  LCD filter  has been changed  to be  normalized and
+      color-balanced.
+
+    - For    better    compatibility   with    FontConfig,    function
+      `FT_Library_SetLcdFilter'  accepts   a  new   enumeration  value
+      `FT_LCD_FILTER_LEGACY1'   (which  has   the   same  meaning   as
+      `FT_LCD_FILTER_LEGACY').
+
+    - A large number of bugs have been detected by using the libFuzzer
+      framework,  which should  further  improve  handling of  invalid
+      fonts.  Thanks again to Kostya Serebryany and Bungeman!
+
+    - `TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES',  a   new  configuration
+      option, controls the maximum number of executed opcodes within a
+      bytecode program.  You don't want to change this except for very
+      special  situations (e.g.,  making a  library fuzzer  spend less
+      time to handle broken fonts).
+
+    - The smooth renderer has been made faster.
+
+    - The `ftstring'  demo program  now supports  sub-pixel rendering;
+      use key `l' to cycle through the LCD modes.
+
+    - The `ftstring'  demo program now supports  colour rendering; use
+      the `space' key to cycle through various colour combinations.
+
+    - The graphical demo programs now use a default gamma value of 1.8
+      (instead of 1.2).
+
+
+======================================================================
+
+CHANGES BETWEEN 2.6 and 2.6.1
+
+  I. IMPORTANT BUG FIXES
+
+    - It turned  out that for CFFs  only the advance widths  should be
+      taken from the  `htmx' table, not the side  bearings.  This bug,
+      introduced in  version 2.6.0, makes  it necessary to  upgrade if
+      you are using  CFFs; otherwise, you get cropped  glyphs with GUI
+      interfaces like GTK or Qt.
+
+    - Accessing Type 42 fonts returned  incorrect results if the glyph
+      order of the embedded TrueType font differs from the glyph order
+      of the Type 42 charstrings table.
+
+
+  II. IMPORTANT CHANGES
+
+    - The header  file layout  has been  changed (again),  moving  all
+      header files except `ft2build.h' into a subdirectory tree.
+
+      Doing so  reduces the  possibility of  header file  name clashes
+      (e.g., FTGL's  `FTGlyph.h' with FreeType's `ftglyph.h')  on case
+      insensitive file systems like Mac OS X or Windows.
+
+      Applications  that  use  (a)  the  `freetype-config'  script  or
+      FreeType's `freetype2.pc' file for pkg-config to get the include
+      directory  for the  compiler,  and (b)  the  documented way  for
+      header inclusion like
+
+        #include <ft2build.h>
+        #include FT_FREETYPE_H
+        ...
+
+      don't need any change to the source code.
+
+    - Simple access  to named instances  in GX variation fonts  is now
+      available (in addition to the  previous method via FreeType's MM
+      interface).   In  the `FT_Face'  structure,  bits  16-30 of  the
+      `face_index' field hold the current named instance index for the
+      given face  index, and bits  16-30 of `style_flags'  contain the
+      number of  instances for  the given face  index.  `FT_Open_Face'
+      and friends also understand the  extended bits of the face index
+      parameter.
+
+      You need to enable  TT_CONFIG_OPTION_GX_VAR_SUPPORT for this new
+      feature.  Otherwise, bits  16-30 of the two fields  are zero (or
+      are ignored).
+
+    - Lao script support has been added to the auto-hinter.
+
+
+  III. MISCELLANEOUS
+
+    - The auto-hinter's Arabic script support has been enhanced.
+
+    - Superscript-like and  subscript-like glyphs  as used  by various
+      phonetic alphabets like the IPA  are now better supported by the
+      auto-hinter.
+
+    - The TrueType bytecode interpreter now runs slightly faster.
+
+    - Improved support for builds with cmake.
+
+    - The  function  `FT_CeilFix'  now   always  rounds  towards  plus
+      infinity.
+
+    - The  function  `FT_FloorFix'  now always  rounds  towards  minus
+      infinity.
+
+    - A  new load  flag `FT_LOAD_COMPUTE_METRICS'  has been  added; it
+      makes FreeType  ignore pre-computed  metrics, as needed  by font
+      validating  or  font  editing  programs.  Right  now,  only  the
+      TrueType  module supports  it  to ignore  data  from the  `hdmx'
+      table.
+
+    - Another round of bug fixes  to better handle broken fonts, found
+      by Kostya Serebryany <[email protected]>.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.5.5 and 2.6
+
+  I. IMPORTANT CHANGES
+
+    - Behdad  Esfahbod contributed  code  for improved  thread-safety,
+      which results in the following model.
+
+      * An `FT_Face' object can only be safely used from one thread at
+        a time.
+
+      * An `FT_Library'  object can  now be used  without modification
+        from multiple threads at the same time.
+
+      * `FT_Face' creation and destruction  with the same `FT_Library'
+        object can only be done from one thread at a time.
+
+      One can use a single  `FT_Library' object across threads as long
+      as a mutex lock is used around `FT_New_Face' and `FT_Done_Face'.
+      Any calls to `FT_Load_Glyph' and similar API are safe and do not
+      need the lock  to be held as  long as the same  `FT_Face' is not
+      used from multiple threads at the same time.
+
+    - Thai script support has been added to the auto-hinter.
+
+    - Arabic script support has been added to the auto-hinter.
+
+    - Following OpenType version 1.7,  advance widths and side bearing
+      values in  CFFs (wrapped  in an SFNT  structure) are  now always
+      taken from the `hmtx' table.
+
+    - Following OpenType  version 1.7, the  PostScript font name  of a
+      CFF font (wrapped in an SFNT structure) is now always taken from
+      the `name'  table.  This is  also true for  OpenType Collections
+      (i.e., TTCs using  CFFs subfonts instead of TTFs),  where it may
+      have a significant difference.
+
+    - Fonts natively hinted for  ClearType are now supported, properly
+      handling selector index 3 of the INSTCTRL bytecode instruction.
+
+    - Major improvements to the GX TrueType variation font handling.
+
+
+  II. MISCELLANEOUS
+
+    - A new auto-hinter  property `warping' can switch on  and off the
+      warping code  if this  experimental feature  is compiled  in (by
+      defining  the AF_CONFIG_OPTION_USE_WARPER  configuration option;
+      by default  this option is  now enabled but warping  is switched
+      off).
+
+      The AF_CONFIG_OPTION_USE_WARPER option itself is an old feature,
+      available   since  2006.    Warping   only   works  in   `light'
+      auto-hinting mode.   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.
+
+      See  file  `ftautoh.h' for  more;  the  demo programs  `ftdiff',
+      `ftview', and `ftgrid' can toggle warping with key `w'.
+
+    - Some  fields  in  the  `FTC_ImageTypeRec'  structure  have  been
+      changed from signed to unsigned  type, which better reflects the
+      actual usage.  It is also an additional means to protect against
+      malformed input.
+
+      This  change doesn't  break  the ABI;  however,  it might  cause
+      compiler warnings.
+
+    - Function `FT_Bitmap_New'  has been renamed  to `FT_Bitmap_Init',
+      since  this name  better reflects  its function.   For backwards
+      compatibility, the old function name is still available.
+
+    - Function   `FT_Get_X11_Font_Format'   has    been   renamed   to
+      `FT_Get_Font_Format',  since  this   name  better  reflects  its
+      function.  For backwards compatibility, the old function name is
+      still available.
+
+      Additionally, the header  file macro for this  function has been
+      renamed to  `FT_FONT_FORMATS_H' (the old name  `FT_XFREE86_H' is
+      retained for backwards compatibility).
+
+    - Various improvements to the `ftgrid' demo program.
+
+      . It  can  now  display  GX and  MM  fonts  while  interactively
+        manipulating the axes (with keys F2, F3, and F4).
+
+      . Anti-aliasing rendering  modes can now be  selected (with keys
+        F5 and F6).
+
+      . The display of point numbers can be toggled with key `D'.
+
+    - Various improvements to the `ftdump' demo program.
+
+      . It now displays information on MM and GX variation axes.
+
+      . New  command line option  `-u' makes  it output data  in utf-8
+        encoding.
+
+    - The `ftmulti'  demo program can  now handle up  to six MM  or GX
+      axes.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.5.4 and 2.5.5
+
+  I. IMPORTANT BUG FIXES
+
+    - Handling of  uncompressed PCF files works again (bug  introduced
+      in version 2.5.4).
+
+
+======================================================================
+
+CHANGES BETWEEN 2.5.3 and 2.5.4
+
+  I. IMPORTANT BUG FIXES
+
+    - A   variant  of   vulnerability  CVE-2014-2240   was  identified
+      (cf.  http://savannah.nongnu.org/bugs/?43661) and  fixed in  the
+      new CFF driver.  All users should upgrade.
+
+    - The new auto-hinter code using HarfBuzz crashed for some invalid
+      fonts.
+
+    - Many fixes to better protect against malformed input.
+
+
+  II. IMPORTANT CHANGES
+
+    - Full auto-hinter support of the Devanagari script.
+
+    - Experimental auto-hinter support of the Telugu script.
+
+    - CFF stem darkening behaviour can now be controlled at build time
+      using the eight macros
+
+        CFF_CONFIG_OPTION_DARKENING_PARAMETER_{X,Y}{1,2,3,4}    .
+
+    - Some fields in the `FT_Bitmap'  structure have been changed from
+      signed to unsigned type, which better reflects the actual usage.
+      It  is also  an additional  means to  protect against  malformed
+      input.
+
+      This  change doesn't  break  the ABI;  however,  it might  cause
+      compiler warnings.
+
+
+  III. MISCELLANEOUS
+
+    - Improvements to  the auto-hinter's algorithm to  recognize stems
+      and local extrema.
+
+    - Function `FT_Get_SubGlyph_Info' always returned an error even in
+      case of success.
+
+    - Version  2.5.1 introduced  major bugs  in  the cjk  part of  the
+      auto-hinter, which are now fixed.
+
+    - The  `FT_Sfnt_Tag'  enumeration  values  have  been  changed  to
+      uppercase,  e.g.  `FT_SFNT_HEAD'.   The lowercase  variants  are
+      deprecated.    This  is   for  orthogonality   with  all   other
+      enumeration (and enumeration-like) values in FreeType.
+
+    - `cmake' now supports builds of FreeType as an OS X framework and
+      for iOS.
+
+    - Improved project files for vc2010, introducing a property file.
+
+    - The  documentation generator  for  the API  reference  has  been
+      updated to produce  better HTML code (with proper  CSS).  At the
+      same time, the documentation got a better structure.
+
+    - The FT_LOAD_BITMAP_CROP flag is obsolete;  it is not used by any
+      driver.
+
+    - The  TrueType  DELTAP[123]  bytecode instructions  now  work  in
+      subpixel hinting  mode as described in  the ClearType whitepaper
+      (i.e., for touched points in the non-subpixel direction).
+
+    - Many small improvements to the internal arithmetic routines.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.5.2 and 2.5.3
+
+  I. IMPORTANT BUG FIXES
+
+    - A vulnerability (CVE-2014-2240) was  identified and fixed in the
+      new  CFF  driver  (cf.  http://savannah.nongnu.org/bugs/?41697).
+      All users should upgrade.
+
+    - More  bug  fixes related  to  correct  positioning of  composite
+      glyphs.
+
+    - Many fixes to better protect against malformed input.
+
+
+  II. IMPORTANT CHANGES
+
+    - FreeType can now use the HarfBuzz library to greatly improve the
+      auto-hinting of  fonts that  use OpenType features:  Many glyphs
+      that are part  of such features but don't have  cmap entries are
+      now handled  properly, for  example small caps  or superscripts.
+      Define the configuration  macro FT_CONFIG_OPTION_USE_HARFBUZZ to
+      activate HarfBuzz support.
+
+      You need HarfBuzz version 0.9.19 or newer.
+
+      Note that HarfBuzz depends on  FreeType; this currently causes a
+      chicken-and-egg problem  that can be  solved as follows  in case
+      HarfBuzz is not yet installed on your system.
+
+        1. Compile  and  install  FreeType without  the  configuration
+           macro FT_CONFIG_OPTION_USE_HARFBUZZ.
+
+        2. Compile and install HarfBuzz.
+
+        3. Define  macro  FT_CONFIG_OPTION_USE_HARFBUZZ, then  compile
+           and install FreeType again.
+
+      With FreeType's  `configure' script the procedure  boils down to
+      configure, build, and install Freetype, then configure, compile,
+      and  install  HarfBuzz,  then configure,  compile,  and  install
+      FreeType again (after executing `make distclean').
+
+    - All  libraries FreeType  depends on  are now  checked using  the
+      `pkg-config' configuration files  first, followed by alternative
+      methods.
+
+    - The  new  value  `auto'  for the  various  `--with-XXX'  library
+      options   (for   example   `--with-harfbuzz=auto')   makes   the
+      `configure' script automatically link to the libraries it finds.
+      This is now the default.
+
+    - In case FreeType's `configure' script  can't find a library, you
+      can  pass environment  variables to  circumvent pkg-config,  and
+      those variables  have been  harmonized as  a consequence  of the
+      changes mentioned above:
+
+        LIBZ           -> removed; use LIBZ_CFLAGS and LIBZ_LIBS
+        LIBBZ2         -> removed; use BZIP2_CFLAGS and BZIP2_LIBS
+        LIBPNG_LDFLAGS -> LIBPNG_LIBS
+
+      `./configure --help' shows all available environment variables.
+
+    - The `freetype-config'  script now understands  option `--static'
+      to emit static linking information.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.5.1 and 2.5.2
+
+  I. IMPORTANT BUG FIXES
+
+    - Improving the display of some broken TrueType fonts introduced a
+      bug  that made  FreeType crash  on some  popular (but  not fully
+      conformant) fonts like `ahronbd.ttf'.
+
+    - Another round of improvements to correct positioning and hinting
+      of composite glyphs in TrueType fonts.
+
+
+  II. MISCELLANEOUS
+
+    - Version  2.5.1  introduced a  bug  in  handling embedded  bitmap
+      strikes of  TrueType fonts,  causing garbage display  under some
+      circumstances.
+
+    - The   `ftgrid'   demo   program    couldn't   be   compiled   in
+      non-development builds.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.5 and 2.5.1
+
+  I. IMPORTANT BUG FIXES
+
+    - For  some WinFNT  files,  the last  glyph  wasn't displayed  but
+      incorrectly marked as invalid.
+
+    - The vertical size of glyphs was  incorrectly set after a call to
+      `FT_GlyphSlot_Embolden', resulting in clipped glyphs.
+
+    - Many fields of the `PCLT' table in SFNT based fonts (if accessed
+      with `FT_Get_Sfnt_Table') were computed incorrectly.
+
+    - In TrueType fonts,  hinting of composite glyphs  could sometimes
+      deliver  incorrect positions  of  components or  even  distorted
+      shapes.
+
+
+  II. IMPORTANT CHANGES
+
+    - WOFF font format support has been added.
+
+    - The auto-hinter now supports Hebrew.  Greek and Cyrillic support
+      has been improved.
+
+    - Support for the forthcoming `OS/2'  SFNT table version 5, as can
+      be found e.g. in the `Sitka' font family for Windows 8.1.
+
+    - The header  file layout  has been changed.   After installation,
+      all files are now located in `<prefix>/include/freetype2'.
+
+      Applications  that  use   (a)  `freetype-config'  or  FreeType's
+      `pkg-config' file to get the include directory for the compiler,
+      and (b) the documented way for header inclusion like
+
+        #include <ft2build.h>
+        #include FT_FREETYPE_H
+        ...
+
+      don't need any change to the source code.
+
+
+  III. MISCELLANEOUS
+
+    - The stem  darkening feature  of the  new CFF  engine can  now be
+      fine-tuned with the new `darkening-parameters' property.
+
+    - `ftgrid' has been updated to toggle various engines with the `H'
+      key, similar to `ftview' and `ftdiff'.
+
+    - The functionality of `ttdebug' has been greatly enhanced.
+
+      . It now displays twilight, storage, and control value data; key
+        `T' shows the twilight point  table, key `S' the storage data,
+        and key `C' the control value table.
+
+      . Some  keys  have  been  reassigned  from  lowercase  to  their
+        uppercase equivalents; for example `q'  to quit the program is
+        now `Q'.
+
+      . Key `f' finishes the current function.
+
+      . Key `R' restarts the debugger.
+
+      . Keys `b' and `p' set a breakpoint.
+
+      . Key `B' provides a function call backtrace.
+
+    - Better support of ARMv7 and x86_64 processors.
+
+    - Apple's `sbix' color bitmap format is now supported.
+
+    - Improved   auto-hinter  rendering   for  many   TrueType  fonts,
+      especially in the range 20-40ppem.
+
+    - A  new face  flag  `FT_FACE_FLAG_COLOR' has  been  added (to  be
+      accessed with the macro `FT_HAS_COLOR').
+
+    - `FT_Gzip_Uncompress'   (modeled    after   zlib's   `uncompress'
+      function)  has been  added; this  is a  by-product of  the newly
+      added WOFF support.
+
+    - Support for  a build with  `cmake' has been contributed  by John
+      Cary <[email protected]>.
+
+    - Support for x64  builds with Visual C++ has  been contributed by
+      Kenneth Miller <[email protected]>
+
+    - Manual pages for most demo programs have been added.
+
+    - The GETINFO bytecode instruction for TrueType fonts was buggy if
+      used to retrieve subpixel hinting information.  It was necessary
+      to set  selector bit 6  to get  results for selector  bits 7-10,
+      which is wrong.
+
+    - Improved computation  of emulated vertical metrics  for TrueType
+      fonts.
+
+    - Fixed horizontal start-up position of vertical phantom points in
+      TrueType bytecode.
+
+
+======================================================================
+
 CHANGES BETWEEN 2.4.12 and 2.5
 CHANGES BETWEEN 2.4.12 and 2.5
 
 
   I. IMPORTANT BUG FIXES
   I. IMPORTANT BUG FIXES
@@ -65,6 +859,9 @@ CHANGES BETWEEN 2.4.12 and 2.5
       it accepts a new command line  option `-H' to select the hinting
       it accepts a new command line  option `-H' to select the hinting
       engine.
       engine.
 
 
+    - `ftdump's verbose option has been renamed to `-V'.  For all demo
+      programs, `-v' now shows version information.
+
     - Another round of TrueType subpixel hinting fixes.
     - Another round of TrueType subpixel hinting fixes.
 
 
     - The `apinames' tool can now create an import file for NetWare.
     - The `apinames' tool can now create an import file for NetWare.
@@ -3178,7 +3975,7 @@ BETA-8 (RELEASE CANDIDATE) CHANGES
         automatically when needed.
         automatically when needed.
 
 
   - Reformatted all  modules source  code in order  to get rid  of the
   - Reformatted all  modules source  code in order  to get rid  of the
-    basic data types redifinitions (i.e. `TT_Int' instead of `FT_Int',
+    basic data types redefinitions (i.e. `TT_Int' instead of `FT_Int',
     `T1_Fixed'  instead  of  `FT_Fixed').  Hence  the  format-specific
     `T1_Fixed'  instead  of  `FT_Fixed').  Hence  the  format-specific
     prefixes like  `TT_', `T1_',  `T2_' and `CID_'  are only  used for
     prefixes like  `TT_', `T1_',  `T2_' and `CID_'  are only  used for
     relevant structures.
     relevant structures.
@@ -3879,7 +4676,7 @@ Extensions support:
 
 
 ------------------------------------------------------------------------
 ------------------------------------------------------------------------
 
 
-Copyright 2000-2013 by
+Copyright 2000-2016 by
 David Turner, Robert Wilhelm, and Werner Lemberg.
 David Turner, Robert Wilhelm, and Werner Lemberg.
 
 
 This  file  is  part  of the  FreeType  project, and may  only be  used,
 This  file  is  part  of the  FreeType  project, and may  only be  used,

+ 2 - 0
Source/ThirdParty/FreeType/docs/CMAKE

@@ -0,0 +1,2 @@
+Support for a cmake build has been contributed.  See the remarks in the
+top-level `CMakeLists.txt' file for more.

+ 13 - 16
Source/ThirdParty/FreeType/docs/CUSTOMIZE

@@ -8,10 +8,9 @@ How to customize the compilation of the library
 
 
 I. Configuration macros
 I. Configuration macros
 
 
-  The  file found  in `include/freetype/config/ftoption.h'  contains a
-  list  of  commented configuration  macros  that  can  be toggled  by
-  developers  to  indicate  which  features  should  be  active  while
-  building the library.
+  The  file `include/freetype/config/ftoption.h'  contains a  list  of
+  commented configuration macros that can  be toggled by developers to
+  indicate which features should be active while building the library.
 
 
   These  options range  from debug  level to  availability  of certain
   These  options range  from debug  level to  availability  of certain
   features,   like  native   TrueType  hinting   through   a  bytecode
   features,   like  native   TrueType  hinting   through   a  bytecode
@@ -36,8 +35,8 @@ II. Modules list
   can keep the source files `clean'.
   can keep the source files `clean'.
 
 
   If  you don't  use  GNU make  you  have to  manually  edit the  file
   If  you don't  use  GNU make  you  have to  manually  edit the  file
-  `include/freetype/config/ftmodule.h'  (which is  *not* used  with if
-  compiled with GNU make) to  add or remove the drivers and components
+  `include/freetype/config/ftmodule.h' (which  is *not* used  with  if
+  compiled with GNU make) to add  or remove the drivers and components
   you want  to compile into  the library.  See `INSTALL.ANY'  for more
   you want  to compile into  the library.  See `INSTALL.ANY'  for more
   information.
   information.
 
 
@@ -101,14 +100,12 @@ IV. Overriding default configuration and module headers
     can do something like:
     can do something like:
 
 
       custom/
       custom/
-        freetype/
-          config/
-            ftoption.h    => custom options header
-            ftmodule.h    => custom modules list
+        config/
+          ftoption.h      => custom options header
+          ftmodule.h      => custom modules list
 
 
       include/            => normal FreeType 2 include
       include/            => normal FreeType 2 include
-        freetype/
-          ...
+        ...
 
 
     then change the C include path to always give the path to `custom'
     then change the C include path to always give the path to `custom'
     before the FreeType 2 `include'.
     before the FreeType 2 `include'.
@@ -120,15 +117,15 @@ IV. Overriding default configuration and module headers
     name  the configuration  headers.  To  do  so, you  need a  custom
     name  the configuration  headers.  To  do  so, you  need a  custom
     `ft2build.h' whose content can be as simple as:
     `ft2build.h' whose content can be as simple as:
 
 
-      #ifndef __FT2_BUILD_MY_PLATFORM_H__
-      #define __FT2_BUILD_MY_PLATFORM_H__
+      #ifndef FT2_BUILD_MY_PLATFORM_H_
+      #define FT2_BUILD_MY_PLATFORM_H_
 
 
       #define FT_CONFIG_OPTIONS_H  <custom/my-ftoption.h>
       #define FT_CONFIG_OPTIONS_H  <custom/my-ftoption.h>
       #define FT_CONFIG_MODULES_H  <custom/my-ftmodule.h>
       #define FT_CONFIG_MODULES_H  <custom/my-ftmodule.h>
 
 
       #include <freetype/config/ftheader.h>
       #include <freetype/config/ftheader.h>
 
 
-      #endif /* __FT2_BUILD_MY_PLATFORM_H__ */
+      #endif /* FT2_BUILD_MY_PLATFORM_H_ */
 
 
     Place those files in a separate directory, e.g.,
     Place those files in a separate directory, e.g.,
 
 
@@ -142,7 +139,7 @@ IV. Overriding default configuration and module headers
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright 2003, 2005, 2006, 2012 by
+Copyright 2003-2016 by
 David Turner, Robert Wilhelm, and Werner Lemberg.
 David Turner, Robert Wilhelm, and Werner Lemberg.
 
 
 This  file is  part of  the FreeType  project, and  may only  be used,
 This  file is  part of  the FreeType  project, and  may only  be used,

+ 92 - 90
Source/ThirdParty/FreeType/docs/DEBUG

@@ -4,63 +4,63 @@ Debugging within the FreeType sources
 I. Configuration macros
 I. Configuration macros
 -----------------------
 -----------------------
 
 
-There  are several ways  to enable  debugging features  in a  FreeType 2
-builds.   This is controlled  through the  definition of  special macros
+There are  several ways to enable  debugging features in a  FreeType 2
+builds.  This is  controlled through the definition  of special macros
 located in the file `ftoptions.h'.  The macros are:
 located in the file `ftoptions.h'.  The macros are:
 
 
 
 
   FT_DEBUG_LEVEL_ERROR
   FT_DEBUG_LEVEL_ERROR
 
 
-    #define this macro  if you want to compile  the FT_ERROR macro calls
-    to  print error messages  during program  execution.  This  will not
-    stop  the  program.   Very  useful  to  spot  invalid  fonts  during
+    #define this macro if you want to compile the FT_ERROR macro calls
+    to print error  messages during program execution.   This will not
+    stop  the  program.  Very  useful  to  spot invalid  fonts  during
     development and to code workarounds for them.
     development and to code workarounds for them.
 
 
   FT_DEBUG_LEVEL_TRACE
   FT_DEBUG_LEVEL_TRACE
 
 
-    #define this macro  if you want to compile  both macros FT_ERROR and
-    FT_TRACE.   This also  includes the  variants  FT_TRACE0, FT_TRACE1,
+    #define this macro if you want to compile both macros FT_ERROR and
+    FT_TRACE.  This  also includes the variants  FT_TRACE0, FT_TRACE1,
     FT_TRACE2, ..., FT_TRACE7.
     FT_TRACE2, ..., FT_TRACE7.
 
 
-    The  trace  macros are  used  to  send  debugging messages  when  an
-    appropriate  `debug  level' is  configured  at  runtime through  the
+    The  trace macros  are used  to  send debugging  messages when  an
+    appropriate  `debug level'  is configured  at runtime  through the
     FT2_DEBUG environment variable (more on this later).
     FT2_DEBUG environment variable (more on this later).
 
 
   FT_DEBUG_MEMORY
   FT_DEBUG_MEMORY
 
 
-    If  this macro is  #defined, the  FreeType engine  is linked  with a
-    small  but  effective  debugging  memory  manager  that  tracks  all
+    If this  macro is #defined, the  FreeType engine is linked  with a
+    small  but  effective debugging  memory  manager  that tracks  all
     allocations and frees that are performed within the font engine.
     allocations and frees that are performed within the font engine.
 
 
-    When  the  FT2_DEBUG_MEMORY   environment  variable  is  defined  at
-    runtime,  a call  to FT_Done_FreeType  will dump  memory statistics,
-    including the list of leaked memory blocks with the source locations
-    where these were allocated.  It is always a very good idea to define
-    this in development builds.  This works with _any_ program linked to
-    FreeType, but  requires a big  deal of memory (the  debugging memory
-    manager never frees the blocks to the heap in order to detect double
-    frees).
+    When  the  FT2_DEBUG_MEMORY  environment variable  is  defined  at
+    runtime, a  call to FT_Done_FreeType will  dump memory statistics,
+    including  the  list  of  leaked memory  blocks  with  the  source
+    locations where  these were allocated.   It is always a  very good
+    idea to define this in  development builds.  This works with _any_
+    program linked to FreeType, but requires a big deal of memory (the
+    debugging memory  manager never  frees the blocks  to the  heap in
+    order to detect double frees).
 
 
-    When FT2_DEBUG_MEMORY isn't defined at runtime, the debugging memory
-    manager is ignored, and performance is unaffected.
+    When  FT2_DEBUG_MEMORY isn't  defined  at  runtime, the  debugging
+    memory manager is ignored, and performance is unaffected.
 
 
 
 
 II. Debugging macros
 II. Debugging macros
 --------------------
 --------------------
 
 
-Several macros can be used within the FreeType sources to help debugging
-its code:
+Several  macros  can be  used  within  the  FreeType sources  to  help
+debugging its code:
 
 
 
 
   1. FT_ERROR(( ... ))
   1. FT_ERROR(( ... ))
 
 
-    This macro is  used to send debug messages  that indicate relatively
-    serious  errors (like  broken font  files),  but will  not stop  the
-    execution of  the running program.   Its code is compiled  only when
-    either FT_DEBUG_LEVEL_ERROR  or FT_DEBUG_LEVEL_TRACE are  defined in
+    This macro is used to send debug messages that indicate relatively
+    serious errors  (like broken  font files), but  will not  stop the
+    execution of the running program.   Its code is compiled only when
+    either FT_DEBUG_LEVEL_ERROR or FT_DEBUG_LEVEL_TRACE are defined in
     `ftoption.h'.
     `ftoption.h'.
 
 
-    Note that you  have to use a printf-like  signature, but with double
+    Note that you have to use a printf-like signature, but with double
     parentheses, like in
     parentheses, like in
 
 
       FT_ERROR(( "your %s is not %s\n", "foo", "bar" ));
       FT_ERROR(( "your %s is not %s\n", "foo", "bar" ));
@@ -68,128 +68,130 @@ its code:
 
 
   2. FT_ASSERT( condition )
   2. FT_ASSERT( condition )
 
 
-    This macro  is used to check  strong assertions at  runtime.  If its
-    condition isn't TRUE,  the program will abort with  a panic message.
-    Its   code   is  compiled   when   either  FT_DEBUG_LEVEL_ERROR   or
-    FT_DEBUG_LEVEL_TRACE are defined.  You don't need double parentheses
-    here.  For example
+    This macro is used to check  strong assertions at runtime.  If its
+    condition isn't TRUE, the program will abort with a panic message.
+    Its  code   is  compiled   when  either   FT_DEBUG_LEVEL_ERROR  or
+    FT_DEBUG_LEVEL_TRACE   are  defined.    You   don't  need   double
+    parentheses here.  For example
 
 
       FT_ASSERT( ptr != NULL );
       FT_ASSERT( ptr != NULL );
 
 
 
 
   3. FT_TRACE( level, (message...) )
   3. FT_TRACE( level, (message...) )
 
 
-    The  FT_TRACE  macro  is  used  to  send  general-purpose  debugging
-    messages during  program execution.   This macro uses  an *implicit*
-    macro named FT_COMPONENT used to name the current FreeType component
-    being run.
+    The  FT_TRACE  macro is  used  to  send general-purpose  debugging
+    messages during program execution.   This macro uses an *implicit*
+    macro  named  FT_COMPONENT  used  to  name  the  current  FreeType
+    component being run.
 
 
-    The developer should always  define FT_COMPONENT as appropriate, for
-    example as in
+    The developer  should always  define FT_COMPONENT  as appropriate,
+    for example as in
 
 
       #undef  FT_COMPONENT
       #undef  FT_COMPONENT
       #define FT_COMPONENT  trace_io
       #define FT_COMPONENT  trace_io
 
 
-    The  value  of  the  FT_COMPONENT  macro  is  an  enumeration  named
-    trace_XXXX where XXXX  is one of the component  names defined in the
-    internal file `freetype/internal/fttrace.h'.  If you modify FreeType
-    source  and insert  new trace_XXXX macro,  you  must register  it in
-    fttrace.h. If you insert or remove many trace macros,  you can check
-    the undefined or the unused trace macro by src/tools/chktrcmp.py.
+    The  value  of the  FT_COMPONENT  macro  is an  enumeration  named
+    `trace_XXXX' where `XXXX' is one of the component names defined in
+    the internal  file `internal/fttrace.h'.   If you  modify FreeType
+    source and insert new `trace_XXXX'  macro, you must register it in
+    `fttrace.h'. If  you insert or  remove many trace macros,  you can
+    check   the    undefined   or   the   unused    trace   macro   by
+    `src/tools/chktrcmp.py'.
 
 
-    Each  such component  is assigned  a `debug  level', ranging  from 0
-    to  7,  through  the  use  of  the  FT2_DEBUG  environment  variable
+    Each such component is assigned a `debug level', ranging from 0 to
+    7,  through   the  use  of  the   FT2_DEBUG  environment  variable
     (described below) when a program linked with FreeType starts.
     (described below) when a program linked with FreeType starts.
 
 
-    When FT_TRACE  is called, its  level is compared  to the one  of the
-    corresponding component.   Messages with trace  levels *higher* than
+    When FT_TRACE is  called, its level is compared to  the one of the
+    corresponding component.  Messages with trace levels *higher* than
     the corresponding component level are filtered and never printed.
     the corresponding component level are filtered and never printed.
 
 
-    This  means that  trace messages  with level  0 are  always printed,
-    those with level 2 are only  printed when the component level is *at
-    least* 2.
+    This means  that trace messages  with level 0 are  always printed,
+    those with  level 2 are only  printed when the component  level is
+    *at least* 2.
 
 
-    The  second  parameter  to  FT_TRACE must  contain  parentheses  and
+    The  second parameter  to  FT_TRACE must  contain parentheses  and
     correspond to a printf-like call, as in
     correspond to a printf-like call, as in
 
 
       FT_TRACE( 2, ( "your %s is not %s\n", "foo", "bar" ) )
       FT_TRACE( 2, ( "your %s is not %s\n", "foo", "bar" ) )
 
 
-    The shortcut macros  FT_TRACE0, FT_TRACE1, FT_TRACE2, ..., FT_TRACE7
-    can be  used with  constant level indices,  and are much  cleaner to
-    use, as in
+    The   shortcut  macros   FT_TRACE0,  FT_TRACE1,   FT_TRACE2,  ...,
+    FT_TRACE7 can  be used with  constant level indices, and  are much
+    cleaner to use, as in
 
 
-     FT_TRACE2(( "your %s is not %s\n", "foo", "bar" ));
+      FT_TRACE2(( "your %s is not %s\n", "foo", "bar" ));
 
 
 
 
 III. Environment variables
 III. Environment variables
 --------------------------
 --------------------------
 
 
-The  following  environment   variables  control  debugging  output  and
+The  following  environment  variables control  debugging  output  and
 behaviour of FreeType at runtime.
 behaviour of FreeType at runtime.
 
 
 
 
   FT2_DEBUG
   FT2_DEBUG
 
 
-    This   variable  is   only  used   when  FreeType   is   built  with
-    FT_DEBUG_LEVEL_TRACE defined.  It contains a list of component level
-    definitions, following this format:
+    This  variable   is  only  used   when  FreeType  is   built  with
+    FT_DEBUG_LEVEL_TRACE  defined.  It  contains a  list of  component
+    level definitions, following this format:
 
 
-       component1:level1 component2:level2 component3:level3 ...
+      component1:level1 component2:level2 component3:level3 ...
 
 
-    where `componentX' is the name of a tracing component, as defined in
-    `fttrace.h',  but  without the  `trace_'  prefix.   `levelX' is  the
+    where `componentX' is the name  of a tracing component, as defined
+    in `fttrace.h', but without the  `trace_' prefix.  `levelX' is the
     corresponding level to use at runtime.
     corresponding level to use at runtime.
 
 
-    `any'  is a  special  component  name that  will  be interpreted  as
+    `any'  is a  special component  name that  will be  interpreted as
     `any/all components'.  For example, the following definitions
     `any/all components'.  For example, the following definitions
 
 
-       set FT2_DEBUG=any:2 memory:5 io:4        (on Windows)
-       export FT2_DEBUG="any:2 memory:5 io:4"   (on Linux with bash)
+      set FT2_DEBUG=any:2 memory:5 io:4        (on Windows)
+      export FT2_DEBUG="any:2 memory:5 io:4"   (on Linux with bash)
 
 
-    both stipulate that  all components should have level  2, except for
-    the memory and io components which will be set to trace levels 5 and
-    4, respectively.
+    both stipulate that all components should have level 2, except for
+    the memory and  io components which will be set  to trace levels 5
+    and 4, respectively.
 
 
 
 
   FT2_DEBUG_MEMORY
   FT2_DEBUG_MEMORY
 
 
-    This  environment variable, when  defined, tells  FreeType to  use a
-    debugging memory  manager that will  track leaking memory  blocks as
-    well as other  common errors like double frees.   It is also capable
-    of  reporting  _where_  the  leaking blocks  were  allocated,  which
-    considerably saves time when debugging new additions to the library.
+    This environment variable,  when defined, tells FreeType  to use a
+    debugging memory manager that will  track leaking memory blocks as
+    well as other common errors like double frees.  It is also capable
+    of  reporting _where_  the  leaking blocks  were allocated,  which
+    considerably  saves  time  when  debugging new  additions  to  the
+    library.
 
 
-    This  code  is  only  compiled  when  FreeType  is  built  with  the
-    FT_DEBUG_MEMORY macro  #defined in  `ftoption.h' though, it  will be
+    This  code  is only  compiled  when  FreeType  is built  with  the
+    FT_DEBUG_MEMORY macro #defined in  `ftoption.h' though, it will be
     ignored in other builds.
     ignored in other builds.
 
 
 
 
   FT2_ALLOC_TOTAL_MAX
   FT2_ALLOC_TOTAL_MAX
 
 
-    This  variable is ignored  if FT2_DEBUG_MEMORY  is not  defined.  It
-    allows you to specify a maximum heap size for all memory allocations
-    performed by FreeType.   This is very useful to  test the robustness
-    of  the  font  engine and  programs  that  use  it in  tight  memory
-    conditions.
+    This variable is  ignored if FT2_DEBUG_MEMORY is  not defined.  It
+    allows  you  to  specify  a  maximum  heap  size  for  all  memory
+    allocations performed  by FreeType.  This  is very useful  to test
+    the robustness  of the  font engine  and programs  that use  it in
+    tight memory conditions.
 
 
-    If it is  undefined, or if its value is  not strictly positive, then
+    If it is undefined, or if its value is not strictly positive, then
     no allocation bounds are checked at runtime.
     no allocation bounds are checked at runtime.
 
 
 
 
   FT2_ALLOC_COUNT_MAX
   FT2_ALLOC_COUNT_MAX
 
 
-    This  variable is ignored  if FT2_DEBUG_MEMORY  is not  defined.  It
-    allows  you  to  specify  a  maximum number  of  memory  allocations
-    performed    by     FreeType    before    returning     the    error
-    FT_Err_Out_Of_Memory.  This is useful  for debugging and testing the
-    engine's robustness.
+    This variable is  ignored if FT2_DEBUG_MEMORY is  not defined.  It
+    allows  you to  specify  a maximum  number  of memory  allocations
+    performed    by    FreeType    before    returning    the    error
+    FT_Err_Out_Of_Memory.  This  is useful  for debugging  and testing
+    the engine's robustness.
 
 
-    If it is  undefined, or if its value is  not strictly positive, then
+    If it is undefined, or if its value is not strictly positive, then
     no allocation bounds are checked at runtime.
     no allocation bounds are checked at runtime.
 
 
 ------------------------------------------------------------------------
 ------------------------------------------------------------------------
 
 
-Copyright 2002, 2003, 2004, 2005, 2009 by
+Copyright 2002-2016 by
 David Turner, Robert Wilhelm, and Werner Lemberg.
 David Turner, Robert Wilhelm, and Werner Lemberg.
 
 
 This  file is  part  of the  FreeType  project, and  may  only be  used,
 This  file is  part  of the  FreeType  project, and  may  only be  used,

+ 1 - 1
Source/ThirdParty/FreeType/docs/FTL.TXT

@@ -48,7 +48,7 @@ Introduction
   encourage you to use the following text:
   encourage you to use the following text:
 
 
    """
    """
-    Portions of this software are copyright © <year> The FreeType
+    Portions of this software are copyright © <year> The FreeType
     Project (www.freetype.org).  All rights reserved.
     Project (www.freetype.org).  All rights reserved.
    """
    """
 
 

+ 8 - 3
Source/ThirdParty/FreeType/docs/INSTALL

@@ -43,7 +43,12 @@ I. Normal installation and upgrades
     directory, where <system> stands for your OS or environment.
     directory, where <system> stands for your OS or environment.
 
 
 
 
-  5. From you own IDE, or own Makefiles
+  5. Using cmake
+
+    See the top-level `CMakeLists.txt' file for more information.
+
+
+  6. From you own IDE, or own Makefiles
 
 
     If  you  want  to  create   your  own  project  file,  follow  the
     If  you  want  to  create   your  own  project  file,  follow  the
     instructions   given  in  the   `INSTALL.ANY'  document   of  this
     instructions   given  in  the   `INSTALL.ANY'  document   of  this
@@ -70,8 +75,8 @@ II. Custom builds of the library
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright   2000-2008, 2010-2011
-by David Turner, Robert Wilhelm, and Werner Lemberg.
+Copyright 2000-2016 by
+David Turner, Robert Wilhelm, and Werner Lemberg.
 
 
 This  file is  part of  the FreeType  project, and  may only  be used,
 This  file is  part of  the FreeType  project, and  may only  be used,
 modified,  and distributed  under the  terms of  the  FreeType project
 modified,  and distributed  under the  terms of  the  FreeType project

+ 26 - 26
Source/ThirdParty/FreeType/docs/INSTALL.ANY

@@ -16,8 +16,8 @@ I. Standard procedure
     which are not correctly supported by this compiler while being ISO
     which are not correctly supported by this compiler while being ISO
     C compliant!
     C compliant!
 
 
-  * You  need  to  add  the directories  `freetype2/include'  to  your
-    include path when compiling the library.
+  * You need to add the directory `include' to your  include path when
+    compiling the library.
 
 
   * FreeType 2 is made of  several components; each of them is located
   * FreeType 2 is made of  several components; each of them is located
     in    a   subdirectory    of   `freetype2/src'.     For   example,
     in    a   subdirectory    of   `freetype2/src'.     For   example,
@@ -33,25 +33,25 @@ I. Standard procedure
 
 
       src/base/ftbase.c
       src/base/ftbase.c
 
 
-      src/base/ftbbox.c       -- recommended, see <freetype/ftbbox.h>
-      src/base/ftglyph.c      -- recommended, see <freetype/ftglyph.h>
+      src/base/ftbbox.c       -- recommended, see <ftbbox.h>
+      src/base/ftglyph.c      -- recommended, see <ftglyph.h>
 
 
-      src/base/ftbdf.c        -- optional, see <freetype/ftbdf.h>
-      src/base/ftbitmap.c     -- optional, see <freetype/ftbitmap.h>
-      src/base/ftcid.c        -- optional, see <freetype/ftcid.h>
+      src/base/ftbdf.c        -- optional, see <ftbdf.h>
+      src/base/ftbitmap.c     -- optional, see <ftbitmap.h>
+      src/base/ftcid.c        -- optional, see <ftcid.h>
+      src/base/ftfntfmt.c     -- optional, see <ftfntfmt.h>
       src/base/ftfstype.c     -- optional
       src/base/ftfstype.c     -- optional
-      src/base/ftgasp.c       -- optional, see <freetype/ftgasp.h>
-      src/base/ftgxval.c      -- optional, see <freetype/ftgxval.h>
-      src/base/ftlcdfil.c     -- optional, see <freetype/ftlcdfil.h>
-      src/base/ftmm.c         -- optional, see <freetype/ftmm.h>
-      src/base/ftotval.c      -- optional, see <freetype/ftotval.h>
+      src/base/ftgasp.c       -- optional, see <ftgasp.h>
+      src/base/ftgxval.c      -- optional, see <ftgxval.h>
+      src/base/ftlcdfil.c     -- optional, see <ftlcdfil.h>
+      src/base/ftmm.c         -- optional, see <ftmm.h>
+      src/base/ftotval.c      -- optional, see <ftotval.h>
       src/base/ftpatent.c     -- optional
       src/base/ftpatent.c     -- optional
-      src/base/ftpfr.c        -- optional, see <freetype/ftpfr.h>
-      src/base/ftstroke.c     -- optional, see <freetype/ftstroke.h>
-      src/base/ftsynth.c      -- optional, see <freetype/ftsynth.h>
-      src/base/fttype1.c      -- optional, see <freetype/t1tables.h>
-      src/base/ftwinfnt.c     -- optional, see <freetype/ftwinfnt.h>
-      src/base/ftxf86.c       -- optional, see <freetype/ftxf86.h>
+      src/base/ftpfr.c        -- optional, see <ftpfr.h>
+      src/base/ftstroke.c     -- optional, see <ftstroke.h>
+      src/base/ftsynth.c      -- optional, see <ftsynth.h>
+      src/base/fttype1.c      -- optional, see <t1tables.h>
+      src/base/ftwinfnt.c     -- optional, see <ftwinfnt.h>
 
 
       src/base/ftmac.c        -- only on the Macintosh
       src/base/ftmac.c        -- only on the Macintosh
 
 
@@ -103,9 +103,9 @@ I. Standard procedure
       `type1cid.c' needs `psaux.c', `pshinter.c', and `psnames.c'
       `type1cid.c' needs `psaux.c', `pshinter.c', and `psnames.c'
       `type42.c'   needs `truetype.c'
       `type42.c'   needs `truetype.c'
 
 
-      To use `ftbzip2.c', an application must be linked with a library
-      which implements bzip2 support  (and the bzip2 header files must
-      be available also during compilation).
+      Please consult the central  `include/freetype/config/ftoption.h'
+      configuration file for details on additional libraries necessary
+      for some optional features.
 
 
 
 
   Read the file `CUSTOMIZE' in case  you want to compile only a subset
   Read the file `CUSTOMIZE' in case  you want to compile only a subset
@@ -132,10 +132,10 @@ II. Support for flat-directory compilation
 
 
   2. Compile sources
   2. Compile sources
 
 
-      cc -c -Ifreetype2/include -DFT2_BUILD_LIBRARY ftsystem.c
-      cc -c -Ifreetype2/include -DFT2_BUILD_LIBRARY ftinit.c
-      cc -c -Ifreetype2/include -DFT2_BUILD_LIBRARY ftdebug.c
-      cc -c -Ifreetype2/include -DFT2_BUILD_LIBRARY ftbase.c
+      cc -c -Iinclude -DFT2_BUILD_LIBRARY ftsystem.c
+      cc -c -Iinclude -DFT2_BUILD_LIBRARY ftinit.c
+      cc -c -Iinclude -DFT2_BUILD_LIBRARY ftdebug.c
+      cc -c -Iinclude -DFT2_BUILD_LIBRARY ftbase.c
       etc.
       etc.
 
 
     You don't  need to define  the FT_FLAT_COMPILATION macro  (as this
     You don't  need to define  the FT_FLAT_COMPILATION macro  (as this
@@ -143,7 +143,7 @@ II. Support for flat-directory compilation
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright 2003, 2005, 2006, 2009, 2010 by
+Copyright 2003-2016 by
 David Turner, Robert Wilhelm, and Werner Lemberg.
 David Turner, Robert Wilhelm, and Werner Lemberg.
 
 
 This  file is  part of  the FreeType  project, and  may only  be used,
 This  file is  part of  the FreeType  project, and  may only  be used,

+ 68 - 26
Source/ThirdParty/FreeType/docs/INSTALL.CROSS

@@ -1,26 +1,27 @@
 This document contains instructions on how to cross-build the FreeType
 This document contains instructions on how to cross-build the FreeType
 library on Unix systems, for example, building binaries for Linux/MIPS
 library on Unix systems, for example, building binaries for Linux/MIPS
-on  FreeBSD/i386.   Before   reading  this  document,  please  consult
-INSTALL.UNIX for required tools and the basic self-building procedure.
+on  FreeBSD/i386.  Before  reading this  document, please  consult the
+file  `INSTALL.UNIX' for  required tools  and the  basic self-building
+procedure.
 
 
 
 
   1. Required Tools
   1. Required Tools
   -----------------
   -----------------
 
 
     For self-building the FreeType library  on a Unix system, GNU Make
     For self-building the FreeType library  on a Unix system, GNU Make
-    3.80 or  newer is required.   INSTALL.UNIX  contains  hints how to
+    3.80 or newer  is required.  `INSTALL.UNIX' contains  hints how to
     check the installed `make'.
     check the installed `make'.
 
 
     The GNU C  compiler to cross-build the target  system is required.
     The GNU C  compiler to cross-build the target  system is required.
-    At present, using non-GNU cross compiler is not tested.  The cross
+    Currently, using a non-GNU cross  compiler is untested.  The cross
     compiler is  expected to be  installed with a system  prefix.  For
     compiler is  expected to be  installed with a system  prefix.  For
     example, if  your building system  is FreeBSD/i386 and  the target
     example, if  your building system  is FreeBSD/i386 and  the target
-    system is Linux/MIPS, the  cross compiler should be installed with
+    system is Linux/MIPS, the cross  compiler should be installed with
     the name `mips-ip22-linuxelf-gcc'.
     the name `mips-ip22-linuxelf-gcc'.
 
 
     A C  compiler for a self-build  is required also, to  build a tool
     A C  compiler for a self-build  is required also, to  build a tool
-    that  is executed  during  the building  procedure.  Non-GNU  self
-    compilers are acceptable, but such a setup is not tested yet.
+    (`apinames') that is executed during the build procedure.  Non-GNU
+    self compilers are acceptable, but such a setup is untested.
 
 
 
 
   2. Configuration
   2. Configuration
@@ -28,10 +29,10 @@ INSTALL.UNIX for required tools and the basic self-building procedure.
 
 
     2.1. Building and target system
     2.1. Building and target system
 
 
-      To configure for  cross-build, the options `--host=<system>' and
-      `--build=<system>' must be passed to configure.  For example, if
-      your building  system is FreeBSD/i386  and the target  system is
-      Linux/MIPS, say
+      To configure  a cross-build,  the options  `--host=<system>' and
+      `--build=<system>'  must be  passed to  the `configure'  script.
+      For example, if your build system is FreeBSD/i386 and the target
+      system is Linux/MIPS, say
 
 
         ./configure \
         ./configure \
           --build=i386-unknown-freebsd \
           --build=i386-unknown-freebsd \
@@ -58,22 +59,63 @@ INSTALL.UNIX for required tools and the basic self-building procedure.
     2.2. The prefix to install FreeType2
     2.2. The prefix to install FreeType2
 
 
       Setting `--prefix=<prefix>'  properly is important.   The prefix
       Setting `--prefix=<prefix>'  properly is important.   The prefix
-      to install FreeType2 is  written into the freetype-config script
-      and freetype2.pc configuration file.
+      to  install  FreeType2  is written  into  the  `freetype-config'
+      script and `freetype2.pc' configuration file.
 
 
       If  the built  FreeType  2 library  is  used as  a  part of  the
       If  the built  FreeType  2 library  is  used as  a  part of  the
       cross-building system,  the prefix  is expected to  be different
       cross-building system,  the prefix  is expected to  be different
-      from the self-building  system.  For example, configuration with
-      `--prefix=/usr/local'  installs binaries  into  the system  wide
-      `/usr/local'  directory  which  then  can't be  executed.   This
-      causes confusion in configuration  of all applications which use
-      FreeType2.   Instead,  use a  prefix to install  the cross-build
-      into     a     separate     system    tree,     for     example,
-      `--prefix=/usr/local/mips-ip22-linux/'.
-
-      On the other  hand, if the built FreeType2 is used  as a part of
-      the target system, the prefix to install should reflect the file
-      system structure of the target system.
+      from  the self-building  system.  For  example, a  configuration
+      with   `--prefix=/usr/local'   installs    binaries   into   the
+      system-wide `/usr/local' directory, which then can't be executed
+      due  to the  incorrect architecture.   This causes  confusion in
+      configuration of all applications  that use FreeType2.  Instead,
+      use a prefix  to install the cross-build into  a separate system
+      tree, for example, `--prefix=/usr/local/mips-ip22-linux/'.
+
+      On the other hand, if the built  FreeType 2 library is used as a
+      part of the target system,  the prefix to install should reflect
+      the file system structure of the target system.
+
+
+    2.3. Library dependencies
+
+      FreeType normally depends on external libraries like `libpng' or
+      `libharfbuzz'.   The  easiest case  is  to  deactivate all  such
+      dependencies  using the  `--without-XXX' configuration  options.
+      However, if you  want to use those libraries,  you should ensure
+      that  they  are available  both  on  the  target system  and  as
+      (cross-compiled) libraries on the build system.
+
+      FreeType uses  `pkg-config' to find  most of the  libraries; the
+      other libraries it links to  are expected in the standard system
+      directories.   Since the  default pkg-config's  meta-information
+      files (like `harfbuzz.pc') of the build platform don't work, use
+      one of the two possible solutions below.
+
+        o Use pkg-config's meta-information files that are adjusted to
+          cross-compile  and  cross-link  with the  target  platform's
+          libraries.  Make sure those files are found before the build
+          system's default files.  Example:
+
+            ./configure \
+              --build=i386-unknown-freebsd \
+              --host=mips-ip22-linuxelf \
+              PKG_CONFIG_LIBDIR="/usr/local/mips-ip22-linux/lib/pkgconfig" \
+              [other options]
+
+          See the manpage of `pkg-config' for more details.
+
+        o Set variables like LIBPNG_LIBS  as additional options to the
+          `configure' script, overriding the values `pkg-config' would
+          provide.  `configure --help' shows the available environment
+          variables.  Example:
+
+            ./configure \
+              --build=i386-unknown-freebsd \
+              --host=mips-ip22-linuxelf \
+              LIBPNG_CFLAGS="-I/usr/local/mips-ip22-linux/include" \
+              LIBPNG_LIBS="-L/usr/local/mips-ip22-linux/lib -lpng12" \
+              [other options]
 
 
 
 
   3. Building command
   3. Building command
@@ -121,8 +163,8 @@ INSTALL.UNIX for required tools and the basic self-building procedure.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright 2006, 2008, 2012 by suzuki toshiya
-David Turner, Robert Wilhelm, and Werner Lemberg.
+Copyright 2006-2016 by
+suzuki toshiya, David Turner, Robert Wilhelm, and Werner Lemberg.
 
 
 
 
 This  file is  part of  the FreeType  project, and  may only  be used,
 This  file is  part of  the FreeType  project, and  may only  be used,

+ 14 - 12
Source/ThirdParty/FreeType/docs/INSTALL.GNU

@@ -1,7 +1,7 @@
-This document contains instructions  how to build the FreeType library
-on non-Unix systems  with the help of GNU Make.  Note  that if you are
-running Cygwin or MSys in  Windows, you should follow the instructions
-in the file INSTALL.UNIX instead.
+This document contains instructions how  to build the FreeType library
+on non-Unix systems with  the help of GNU Make.  Note  that if you are
+running  Cygwin  or  MinGW/MSYS  in Windows,  you  should  follow  the
+instructions in the file `INSTALL.UNIX' instead.
 
 
 
 
   FreeType 2 includes a powerful and flexible build system that allows
   FreeType 2 includes a powerful and flexible build system that allows
@@ -52,10 +52,10 @@ in the file INSTALL.UNIX instead.
 
 
       The following settings are used:
       The following settings are used:
 
 
-        platform                     win32
+        platform                     windows
         compiler                     gcc
         compiler                     gcc
-        configuration directory      .\builds\win32
-        configuration rules          .\builds\win32\w32-gcc.mk
+        configuration directory      .\builds\windows
+        configuration rules          .\builds\windows\w32-gcc.mk
 
 
       If this does not correspond to your system or settings please
       If this does not correspond to your system or settings please
       remove the file 'config.mk' from this directory then read the
       remove the file 'config.mk' from this directory then read the
@@ -138,15 +138,17 @@ in the file INSTALL.UNIX instead.
 
 
   Final note
   Final note
 
 
-    The build  system builds a  statically linked library of  the font
-    engine in the  `objs' directory.  It does _not_  support the build
-    of  DLLs on  Windows and  OS/2.  If  you need  these, you  have to
-    either   use  an   IDE-specific  project   file,  or   follow  the
+    The above instructions build a  _statically_ linked library of the
+    font engine in the `objs' directory.   On Windows, you can build a
+    DLL  either  with  MinGW  (within an  MSYS  shell,  following  the
+    instructions in `INSTALL.UNIX'), or you  use one of the Visual C++
+    project files; see  the  subdirectories  of `builds/windows'.  For
+    everything else,  you are on  your own,  and you might  follow the
     instructions in `INSTALL.ANY' to create your own Makefiles.
     instructions in `INSTALL.ANY' to create your own Makefiles.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright 2003, 2004, 2005, 2006, 2008 by
+Copyright 2003-2016 by
 David Turner, Robert Wilhelm, and Werner Lemberg.
 David Turner, Robert Wilhelm, and Werner Lemberg.
 
 
 This  file is  part of  the FreeType  project, and  may only  be used,
 This  file is  part of  the FreeType  project, and  may only  be used,

+ 20 - 1
Source/ThirdParty/FreeType/docs/INSTALL.UNIX

@@ -81,9 +81,28 @@ or MSys on Win32:
       make
       make
       make install
       make install
 
 
+
+  3.1 Interdependency with HarfBuzz
+  .................................
+
+    Note that there  is a chicken-and-egg problem  currently since the
+    HarfBuzz library  (used by the  auto-hinter to improve  support of
+    OpenType  fonts)  depends on  FreeType,  which  can be  solved  as
+    follows in case HarfBuzz is not yet installed on your system.
+
+    1. Call    FreeType's     `configure'    script     with    option
+       `--without-harfbuzz', then compile and install FreeType.
+
+    2. Compile and install HarfBuzz.
+
+    3. Call    FreeType's    `configure'   script    without    option
+       `--without-harfbuzz' (after  executing `make  distclean'), then
+       compile and install FreeType again.
+
+
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright 2003-2007, 2013 by
+Copyright 2003-2016 by
 David Turner, Robert Wilhelm, and Werner Lemberg.
 David Turner, Robert Wilhelm, and Werner Lemberg.
 
 
 This  file is  part of  the FreeType  project, and  may only  be used,
 This  file is  part of  the FreeType  project, and  may only  be used,

+ 1 - 1
Source/ThirdParty/FreeType/docs/INSTALL.VMS

@@ -49,7 +49,7 @@ V7.2-1.
 
 
 ------------------------------------------------------------------------
 ------------------------------------------------------------------------
 
 
-Copyright 2000, 2004 by
+Copyright 2000-2016 by
 David Turner, Robert Wilhelm, and Werner Lemberg.
 David Turner, Robert Wilhelm, and Werner Lemberg.
 
 
 This  file  is  part  of the  FreeType  project, and may  only be  used,
 This  file  is  part  of the  FreeType  project, and may  only be  used,

+ 4 - 2
Source/ThirdParty/FreeType/docs/LICENSE.TXT

@@ -23,9 +23,11 @@ any of your projects or products.
     GPL.  Note  that the  FTL is  incompatible  with  GPLv2 due  to  its
     GPL.  Note  that the  FTL is  incompatible  with  GPLv2 due  to  its
     advertisement clause.
     advertisement clause.
 
 
-The contributed BDF and PCF drivers come with a license similar  to that
+The contributed BDF and PCF drivers  come with a license similar to that
 of the X Window System.  It is compatible to the above two licenses (see
 of the X Window System.  It is compatible to the above two licenses (see
-file src/bdf/README and src/pcf/README).
+file src/bdf/README and  src/pcf/README).  The same holds  for the files
+`fthash.c' and  `fthash.h'; their  code was  part of  the BDF  driver in
+earlier FreeType versions.
 
 
 The gzip module uses the zlib license (see src/gzip/zlib.h) which too is
 The gzip module uses the zlib license (see src/gzip/zlib.h) which too is
 compatible to the above two licenses.
 compatible to the above two licenses.

+ 1 - 1
Source/ThirdParty/FreeType/docs/TODO

@@ -27,7 +27,7 @@ Other bugs have been registered at the savannah bugzilla of FreeType.
 
 
 ------------------------------------------------------------------------
 ------------------------------------------------------------------------
 
 
-Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007 by
+Copyright 2001-2016 by
 David Turner, Robert Wilhelm, and Werner Lemberg.
 David Turner, Robert Wilhelm, and Werner Lemberg.
 
 
 This  file  is  part  of the  FreeType  project, and may  only be  used,
 This  file  is  part  of the  FreeType  project, and may  only be  used,

+ 123 - 0
Source/ThirdParty/FreeType/docs/VERSIONS.TXT

@@ -0,0 +1,123 @@
+Due  to our  use of  `libtool' to  generate and  install the  FreeType 2
+libraries on  Unix systems, as  well as  other historical events,  it is
+generally very  difficult to  know precisely which  release of  the font
+engine is installed on a given system.
+
+This file tries  to explain why and to document  ways to properly detect
+FreeType on Unix.
+
+
+1. Version and Release numbers
+------------------------------
+
+For each new  public release of FreeType 2, there  are generally *three*
+distinct `version' numbers to consider:
+
+  * The official FreeType 2 release number, like 2.3.1 or 2.4.10.
+
+  * The libtool (and  Unix) specific version number,  like 13.0.7.  This
+    is what `freetype-config --version' returns.
+
+  * The platform-specific  shared object  number, used for  example when
+    the library is installed as `/usr/lib/libfreetype.so.6.7.1'.
+
+The platform-specific  number is, unsurprisingly,  platform-specific and
+varies  with the  operating system  you are  using (several  variants of
+Linux, FreeBSD,  Solaris, etc.).  You  should thus _never_ use  it, even
+for simple tests.
+
+The libtool-specific  number does  not equal the  release number  but is
+tied to it.
+
+The release number is available  at *compile* time through the following
+macros defined in FT_FREETYPE_H:
+
+  - FREETYPE_MAJOR: major release number
+  - FREETYPE_MINOR: minor release number
+  - FREETYPE_PATCH: patch release number
+
+See below for a small autoconf fragment.
+
+The  release  number   is  also  available  at   *runtime*  through  the
+`FT_Library_Version' API.
+
+
+2. History
+----------
+
+The  following   table  gives,  for   all  releases  since   2.4.0,  the
+corresponding libtool number, as well  as the shared object number found
+on _most_ systems, but not all of them:
+
+
+    release     libtool     so
+  -------------------------------
+     2.7.1      19.0.13   6.13.0
+     2.7.0      18.6.12   6.12.6
+     2.6.5      18.5.12   6.12.5
+     2.6.4      18.4.12   6.12.4
+     2.6.3      18.3.12   6.12.3
+     2.6.2      18.2.12   6.12.2
+     2.6.1      18.1.12   6.12.1
+     2.6.0      18.0.12   6.12.0
+     2.5.5      17.4.11   6.11.4
+     2.5.4      17.3.11   6.11.3
+     2.5.3      17.2.11   6.11.2
+     2.5.2      17.1.11   6.11.1
+     2.5.1      17.0.11   6.11.0
+     2.5.0      16.2.10   6.10.2
+     2.4.12     16.1.10   6.10.1
+     2.4.11     16.0.10   6.10.0
+     2.4.10     15.0.9    6.9.0
+     2.4.9      14.1.8    6.8.1
+     2.4.8      14.0.8    6.8.0
+     2.4.7      13.2.7    6.7.2
+     2.4.6      13.1.7    6.7.1
+     2.4.5      13.0.7    6.7.0
+     2.4.4      12.2.6    6.6.2
+     2.4.3      12.1.6    6.6.1
+     2.4.2      12.0.6    6.6.0
+     2.4.1      11.1.5    6.5.1
+     2.4.0      11.0.5    6.5.0
+
+
+3. Autoconf Code Fragment
+-------------------------
+
+Lars Clausen contributed the following autoconf fragment to detect which
+version of  FreeType is  installed on  a system.  This  one tests  for a
+version that  is at least 2.0.9;  you should change it  to check against
+other release numbers.
+
+
+  AC_MSG_CHECKING([whether FreeType version is 2.0.9 or higher])
+  old_CPPFLAGS="$CPPFLAGS"
+  CPPFLAGS=`freetype-config --cflags`
+  AC_TRY_CPP([
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+#if (FREETYPE_MAJOR*1000 + FREETYPE_MINOR)*1000 + FREETYPE_PATCH < 2000009
+#error Freetype version too low.
+#endif
+  ],
+  [AC_MSG_RESULT(yes)
+   FREETYPE_LIBS=`freetype-config --libs`
+   AC_SUBST(FREETYPE_LIBS)
+   AC_DEFINE(HAVE_FREETYPE,1,[Define if you have the FreeType2 library])
+   CPPFLAGS="$old_CPPFLAGS"],
+  [AC_MSG_ERROR([Need FreeType library version 2.0.9 or higher])])
+
+------------------------------------------------------------------------
+
+Copyright 2002-2016 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.
+
+
+--- end of VERSIONS.TXT ---

+ 156 - 131
Source/ThirdParty/FreeType/docs/formats.txt

@@ -1,141 +1,161 @@
-This  file  contains a  list  of various  font  formats.   It gives  the
+This  file contains  a list  of various  font formats.   It gives  the
 reference document and whether it is supported in FreeType 2.
 reference document and whether it is supported in FreeType 2.
 
 
+Table fields
+------------
 
 
-  file type:
-    The only special  case is `MAC'; on older Mac  OS versions, a `file'
-    is  stored as  a  data and  a  resource fork,  this  is, within  two
-    separate data chunks.   In all other cases, the  font data is stored
-    in a single file.
-
-  wrapper format:
-    The format used  to represent the font data.  In  the table below it
-    is used only if the font format differs.  Possible values are `SFNT'
-    (binary), `PS' (a text header, followed by binary or text data),
-    `LZW' (compressed with either `gzip' or `compress'), and
+  wrapper format
+    The format used to represent the font data.  In the table below it
+    is  used only  if the  font format  differs.  Possible  values are
+    `SFNT' (binary), `PS'  (a text header, followed by  binary or text
+    data), `LZW'  (compressed with  either `gzip' or  `compress'), and
     `BZ2' (compressed with `bzip2`).
     `BZ2' (compressed with `bzip2`).
 
 
-  font format:
-    How the font  is to be accessed, possibly  after converting the file
-    type and  wrapper format  into a generic  form.  Bitmap  formats are
-    `BDF',  `PCF', and  one  form  of `WINFNT';  all  others are  vector
-    formats.
-
-  font type:
-    Sub-formats  of the font  format.  `SBIT'  and `MACSBIT'  are bitmap
-    formats, `MM' and `VAR' support optical axes.
-
-  glyph access:
-    If not specified, the glyph access is `standard' to the font format.
-    Values are  `CID' for CID-keyed  fonts, `SYNTHETIC' for  fonts which
-    are modified  versions of other  fonts by means of  a transformation
-    matrix, `COLLECTION' for collecting  multiple fonts (sharing most of
-    the data) into a single file, and `TYPE_0' for PS fonts which are to
-    be accessed in a tree-like structure.
-
-  FreeType driver:
-    The module in  the FreeType library which handles  the specific font
-    format.   A missing entry  means that  FreeType doesn't  support the
+  font format
+    How the font is to be accessed, possibly after converting the file
+    type and wrapper  format into a generic form.   Bitmap formats are
+    `BDF',  `PCF', and  one form  of `WINFNT';  all others  are vector
+    formats.   `PS' indicates  third-order,  `TT' second-order  Bézier
+    curves.
+
+  font type
+    Sub-formats of the  font format.  `SBIT' and  `MACSBIT' are bitmap
+    formats,  `MM' and  `VAR' support  optical axes.   `CFF2' supports
+    optical axes also.
+
+  glyph access
+    If  not specified,  the glyph  access  is `standard'  to the  font
+    format.   Values are  `CID' for  CID-keyed fonts,  `SYNTHETIC' for
+    fonts that  are modified  versions of  other fonts  by means  of a
+    transformation matrix, and  `TYPE_0' for PS fonts which  are to be
+    accessed in a tree-like structure.
+
+  FreeType driver
+    The module in the FreeType library which handles the specific font
+    format.  A missing  entry means that FreeType  doesn't support the
     font format (yet).
     font format (yet).
 
 
 
 
-Please  send  additions  and/or  corrections  to [email protected]  or  to  the
-FreeType developer's list  at [email protected] (for subscribers
-only).   If you  can provide  a font  example for  a format  which isn't
-supported yet please send a mail too.
-
-
-file wrapper font   font    glyph      FreeType reference
-type format  format type    access     driver   documents
-----------------------------------------------------------------------------
-
----  ---     BDF    ---     ---        bdf      5005.BDF_Spec.pdf, X11
-
-
----  SFNT    PS     TYPE_1  ---        type1    Type 1 GX Font Format
-                                                (for the Mac) [3]
-MAC  SFNT    PS     TYPE_1  ---        type1    Type 1 GX Font Format
-                                                (for the Mac) [3]
----  SFNT    PS     TYPE_1  CID        cid      5180.sfnt.pdf (for the Mac)
-                                                [3]
-MAC  SFNT    PS     TYPE_1  CID        cid      5180.sfnt.pdf (for the Mac)
-                                                [3]
----  SFNT    PS     CFF     ---        cff      OT spec, 5176.CFF.pdf
-                                                (`OTTO' format)
-MAC  SFNT    PS     CFF     ---        cff      OT spec, 5176.CFF.pdf
-                                                (`OTTO' format)
----  SFNT    PS     CFF     CID        cff      OT spec, 5176.CFF.pdf
-MAC  SFNT    PS     CFF     CID        cff      OT spec, 5176.CFF.pdf
----  SFNT    PS     CFF     SYNTHETIC  ---      OT spec, 5176.CFF.pdf
-MAC  SFNT    PS     CFF     SYNTHETIC  ---      OT spec, 5176.CFF.pdf
----  SFNT    TT     SBIT    ---        sfnt     XFree86 (bitmaps only;
-                                                with `head' table)
----  SFNT    TT     MACSBIT ---        sfnt     OT spec (for the Mac;
-                                                bitmaps only; `bhed' table)
-MAC  SFNT    TT     MACSBIT ---        sfnt     OT spec (for the Mac;
-                                                bitmaps only; `bhed' table)
----  SFNT    TT     ---     ---        truetype OT spec (`normal' TT font)
-MAC  SFNT    TT     ---     ---        truetype OT spec (`normal' TT font)
-MAC  SFNT    TT     VAR     ---        truetype GX spec (`?var' tables)
----  SFNT    TT     ---     COLLECTION truetype OT spec (this can't be CFF)
-MAC  SFNT    TT     ---     COLLECTION truetype OT spec (this can't be CFF)
-
-
----  ---     PS     TYPE_1  ---        type1    T1_SPEC.pdf
-                                                (`normal' Type 1 font)
-MAC  ---     PS     TYPE_1  ---        type1    T1_SPEC.pdf
-                                                (`normal' Type 1 font)
----  ---     PS     TYPE_1  CID        cid      PLRM.pdf (CID Font Type 0;
-                                                Type 9 font)
----  ---     PS     MM      ---        type1    5015.Type1_Supp.pdf
-                                                (Multiple Masters)
----  ---     PS     CFF     ---        cff      5176.CFF.pdf (`pure' CFF)
----  ---     PS     CFF     CID        cff      5176.CFF.pdf (`pure' CFF)
----  ---     PS     CFF     SYNTHETIC  ---      5176.CFF.pdf (`pure' CFF)
----  PS      PS     CFF     ---        ---      PLRM.pdf (Type 2) [1]
----  PS      PS     CFF     CID        ---      PLRM.pdf (Type 2) [1]
----  PS      PS     CFF     SYNTHETIC  ---      PLRM.pdf (Type 2) [1]
----  ---     PS     ---     TYPE_0     ---      PLRM.pdf
----  ---     PS     TYPE_3  ---        ---      PLRM.pdf (never supported)
----  ---     PS     TYPE_3  CID        ---      PLRM.pdf (CID Font Type 1;
-                                                Type 10 font; never supported)
----  PS      PS     TYPE_14 ---        ---      PLRM.pdf (Chameleon font;
-                                                Type 14 font; never supported?)
----  ---     PS     TYPE_32 CID        ---      PLRM.pdf (CID Font Type 4;
-                                                Type 32 font; never supported?)
----  PS      TT     ---     ---        type42   5012.Type42_Spec.pdf
-                                                (Type 42 font)
----  PS      TT     ---     CID        ---      PLRM.pdf (CID Font Type 2;
-                                                Type 11 font)
-
-
----  ?       ?      CEF     ?          cff      ?
-
-
----  ---     PCF    ---     ---        pcf      X11 [4]
----  LZW     PCF    ---     ---        pcf      X11 [4]
----  BZ2     PCF    ---     ---        pcf      X11 [4]
-
-
----  ---     PFR    PFR0    ---        pfr      [2]
----  ---     PFR    PFR1    ---        ---      (undocumented, proprietary;
-                                                probably never supported)
-
-
----  ---     WINFNT ---     ---        winfonts MS Windows 3 Developer's Notes
----  ---     WINFNT VECTOR  ---        ---      MS Windows 3 Developer's Notes
-
-
-[1] Support should be rather simple since this is identical to `CFF' but
-    in a PS wrapper.
+Notes
+-----
+
+  The  SFNT  container  format also  provides  `collections'  (usually
+  having the file extension `.ttc'  or `.otc').  A collection contains
+  multiple font faces that share some tables to avoid redundancy, thus
+  reducing the file  size.  In FreeType, elements of  a collection can
+  be accessed with a proper face index.
+
+  Both  the GX  and the  OpenType 1.8  variation fonts  provide `named
+  instances'.  FreeType  maps them to  face indices (they can  also be
+  accessed with the standard MM interface).
+
+  Other  font  formats  (not  using the  SFNT  wrapper)  also  provide
+  multiple faces  within one  file; they are  marked with  an asterisk
+  (`*') in the table below.
+
+  FreeType can  be configured to  support Mac  files (on older  Mac OS
+  versions, a `file' is stored as a data and a resource fork, this is,
+  within two  separate data chunks).  If  a file can't be  opened as a
+  font, FreeType then checks whether it  is a resource fork, trying to
+  extract  the contained  font data  from  either a  `POST' or  `sfnt'
+  resource.
+
+
+Please  send additions  and/or  corrections to  [email protected]  or to  the
+FreeType   developer's   list    at   [email protected]   (for
+subscribers only).   If you can  provide a  font example for  a format
+which isn't supported yet please send a mail too.
+
+
+  wrapper font    font    glyph      FreeType reference
+  format  format  type    access     driver   documents
+ -----------------------------------------------------------------------------
+
+  ---     BDF     ---     ---        bdf      5005.BDF_Spec.pdf, X11
+
+
+  SFNT    PS      TYPE_1  ---        type1    Type 1 GX Font Format
+                                              (for the Mac) [3]
+  SFNT    PS      TYPE_1  CID        cid      5180.sfnt.pdf (for the Mac)
+                                              [3]
+  SFNT    PS      CFF     ---        cff      OT spec, 5176.CFF.pdf
+                                              (`OTTO' format)
+  SFNT    PS      CFF     CID        cff      OT spec, 5176.CFF.pdf
+  SFNT    PS      CFF     SYNTHETIC  ---      OT spec, 5176.CFF.pdf
+  SFNT    PS      CFF2    ---        cff      OT spec 1.8
+
+  SFNT    TT      SBIT    ---        sfnt     XFree86 (bitmaps only;
+                                              with `head' table)
+  SFNT    TT      MACSBIT ---        sfnt     OT spec (for the Mac;
+                                              bitmaps only; `bhed' table)
+  SFNT    TT      ---     ---        truetype OT spec (`normal' TT font)
+  SFNT    TT      VAR     ---        truetype GX spec (`?var' tables)
+  SFNT    TT      VAR     ---        truetype OT spec 1.8
+                                              (`?var' + `?VAR' tables)
+
+
+  ---     PS      TYPE_1  ---        type1    T1_SPEC.pdf
+                                              (`normal' Type 1 font)
+  ---     PS      TYPE_1  CID        cid      PLRM.pdf (CID Font Type 0;
+                                              Type 9 font)
+  ---     PS      MM      ---        type1    5015.Type1_Supp.pdf
+                                              (Multiple Masters)
+  ---     PS      CFF     ---        cff      5176.CFF.pdf (`pure' CFF)
+  ---     PS*     CFF     CID        cff      5176.CFF.pdf (`pure' CFF)
+  ---     PS      CFF     SYNTHETIC  ---      5176.CFF.pdf (`pure' CFF)
+  ---     PS      CFF/MM  ---        cff      old 5167.CFF.pdf (`pure' CFF)
+                                              [3]
+  ---     PS*     CFF/MM  CID        cff      old 5167.CFF.pdf (`pure' CFF)
+                                              [3]
+  ---     PS      CFF/MM  SYNTHETIC  ---      old 5167.CFF.pdf (`pure' CFF)
+                                              [3]
+  PS      PS      CFF     ---        ---      PLRM.pdf (Type 2) [1]
+  PS      PS*     CFF     CID        ---      PLRM.pdf (Type 2) [1]
+  PS      PS      CFF     SYNTHETIC  ---      PLRM.pdf (Type 2) [1]
+  PS      PS      CFF/MM  ---        ---      PLRM.pdf (Type 2) [1]
+  PS      PS*     CFF/MM  CID        ---      PLRM.pdf (Type 2) [1]
+  PS      PS      CFF/MM  SYNTHETIC  ---      PLRM.pdf (Type 2) [1]
+  ---     PS      ---     TYPE_0     ---      PLRM.pdf
+  ---     PS      TYPE_3  ---        ---      PLRM.pdf (never supported)
+  ---     PS      TYPE_3  CID        ---      PLRM.pdf (CID Font Type 1;
+                                              Type 10 font; never supported)
+  PS      PS      TYPE_14 ---        ---      PLRM.pdf (Chameleon font;
+                                              Type 14 font; never supported?)
+  ---     PS      TYPE_32 CID        ---      PLRM.pdf (CID Font Type 4;
+                                              Type 32 font; never supported?)
+  PS      TT      ---     ---        type42   5012.Type42_Spec.pdf
+                                              (Type 42 font)
+  PS      TT      ---     CID        ---      PLRM.pdf (CID Font Type 2;
+                                              Type 11 font)
+
+
+  ?       ?       CEF     ?          cff      ?
+
+
+  ---     PCF     ---     ---        pcf      X11 [4]
+  LZW     PCF     ---     ---        pcf      X11 [4]
+  BZ2     PCF     ---     ---        pcf      X11 [4]
+
+
+  ---     PFR*    PFR0    ---        pfr      [2]
+  ---     PFR     PFR1    ---        ---      (undocumented, proprietary;
+                                              probably never supported)
+
+
+  ---     WINFNT* ---     ---        winfonts Windows developer's notes [5]
+  ---     WINFNT  VECTOR  ---        ---      Windows developer's notes [5]
+
+
+[1] Support should  be rather simple since this is  identical to `CFF'
+    but in a PS wrapper.
 
 
 [2] Official PFR specification:
 [2] Official PFR specification:
 
 
       http://www.bitstream.com/categories/developer/truedoc/pfrspec.html
       http://www.bitstream.com/categories/developer/truedoc/pfrspec.html
       http://www.bitstream.com/categories/developer/truedoc/pfrspec1.2.pdf
       http://www.bitstream.com/categories/developer/truedoc/pfrspec1.2.pdf
 
 
-    The  syntax of  the  auxiliary data  is  not defined  there, but  is
-    partially defined in  MHP 1.0.3 (also called ETSI  TS 101812 V1.3.1)
+    The syntax  of the  auxiliary data  is not  defined there,  but is
+    partially defined in MHP 1.0.3 (also called ETSI TS 101812 V1.3.1)
     section 7.4.
     section 7.4.
 
 
       http://www.etsi.org/
       http://www.etsi.org/
@@ -143,7 +163,8 @@ MAC  ---     PS     TYPE_1  ---        type1    T1_SPEC.pdf
 
 
     (free registration required).
     (free registration required).
 
 
-[3] Support is rudimentary currently; some tables are not loaded yet.
+[3] Support  is rudimentary  currently; some  tables or  data are  not
+    loaded yet.
 
 
 [4] See
 [4] See
 
 
@@ -151,17 +172,21 @@ MAC  ---     PS     TYPE_1  ---        type1    T1_SPEC.pdf
       Elias Israel, Erik Fortune, Digital Press, 1992
       Elias Israel, Erik Fortune, Digital Press, 1992
       ISBN 1-55558-096-3
       ISBN 1-55558-096-3
 
 
-    for a specification  given in Appendix D on pgs. 436-450.   However,
-    this information  might be out of  date; unfortunately,  there is no
-    PCF  specification available  online, and this book is out of print.
-    George  Williams deduced  the font  format from the X11  sources and
+    for a specification given in Appendix D on pgs. 436-450.  However,
+    this information might be out  of date; unfortunately, there is no
+    PCF specification available online, and this book is out of print.
+    George Williams deduced  the font format from the  X11 sources and
     documented it for his FontForge font editor:
     documented it for his FontForge font editor:
 
 
-      http://fontforge.sourceforge.net/pcf-format.html
+      http://fontforge.github.io/pcf-format.html
+
+[5] This is from MS Windows 3; see Microsoft's Knowledge Base article at
+
+      http://support.microsoft.com/kb/65123
 
 
 ------------------------------------------------------------------------
 ------------------------------------------------------------------------
 
 
-Copyright 2004, 2005, 2008, 2009, 2010 by
+Copyright 2004-2016 by
 David Turner, Robert Wilhelm, and Werner Lemberg.
 David Turner, Robert Wilhelm, and Werner Lemberg.
 
 
 This  file is  part  of the  FreeType  project, and  may  only be  used,
 This  file is  part  of the  FreeType  project, and  may  only be  used,

+ 1 - 1
Source/ThirdParty/FreeType/docs/raster.txt

@@ -618,7 +618,7 @@ II. Rendering Technology
 
 
 ------------------------------------------------------------------------
 ------------------------------------------------------------------------
 
 
-Copyright 2003, 2007 by
+Copyright 2003-2016 by
 David Turner, Robert Wilhelm, and Werner Lemberg.
 David Turner, Robert Wilhelm, and Werner Lemberg.
 
 
 This  file  is  part  of the  FreeType  project, and may  only be  used,
 This  file  is  part  of the  FreeType  project, and may  only be  used,

+ 14 - 28
Source/ThirdParty/FreeType/docs/release

@@ -13,7 +13,7 @@ How to prepare a new release
 
 
 . README: Update.
 . README: Update.
 
 
-. docs/VERSION.DLL: Document changed `version_info'.
+. docs/VERSIONS.TXT: Document changed `version_info'.
 
 
 . ChangeLog:   Announce  new  release   (both  in  the  freetype2  and
 . ChangeLog:   Announce  new  release   (both  in  the  freetype2  and
   freetype2-demos modules).
   freetype2-demos modules).
@@ -41,7 +41,8 @@ How to prepare a new release
 . Run  src/tools/chktrcmp.py  and check  that there  are no  undefined
 . Run  src/tools/chktrcmp.py  and check  that there  are no  undefined
   trace_XXXX macros.
   trace_XXXX macros.
 
 
-. Tag the git repositories (freetype2, freetype2-demos) with
+. After pushing the new release,  tag the git repositories (freetype2,
+  freetype2-demos) with
 
 
     git tag VER-<version> -m "" -u <committer>
     git tag VER-<version> -m "" -u <committer>
 
 
@@ -49,8 +50,6 @@ How to prepare a new release
 
 
     git push --tags
     git push --tags
 
 
-  TODO: Tag the home page CVS on savannah.nongnu.org.
-
 . Check with
 . Check with
 
 
     git clean -ndx
     git clean -ndx
@@ -63,9 +62,9 @@ How to prepare a new release
 
 
 . Create     the     doc    bundles    (freetype-doc-<version>.tar.gz,
 . Create     the     doc    bundles    (freetype-doc-<version>.tar.gz,
   freetype-doc-<version>.tar.bz2,    ftdoc<version>.zip).    This   is
   freetype-doc-<version>.tar.bz2,    ftdoc<version>.zip).    This   is
-  everything below
+  everything in
 
 
-    freetype.freedesktop.org:/srv/freetype.freedesktop.org/www/freetype2/docs/
+    <freetype-web git repository>/freetype2/docs
 
 
   except the `reference' subdirectory.   Do *not* use option `-l' from
   except the `reference' subdirectory.   Do *not* use option `-l' from
   zip!
   zip!
@@ -77,7 +76,7 @@ How to prepare a new release
 
 
     #!/bin/sh
     #!/bin/sh
 
 
-    VERSION=2.4.8
+    VERSION=2.5.1
     SAVANNAH_USER=wl
     SAVANNAH_USER=wl
     SOURCEFORGE_USER=wlemb
     SOURCEFORGE_USER=wlemb
 
 
@@ -161,7 +160,7 @@ How to prepare a new release
 
 
     #!/bin/sh
     #!/bin/sh
 
 
-    VERSION=2.4.8
+    VERSION=2.5.1
     SOURCEFORGE_USER=wlemb
     SOURCEFORGE_USER=wlemb
 
 
     #####################################################################
     #####################################################################
@@ -171,39 +170,26 @@ How to prepare a new release
 
 
     # EOF
     # EOF
 
 
-. On   SourceForge,   tag   the   just   uploaded   `ftXXXX.zip'   and
+. On   SourceForge,   tag   the    just   uploaded   `ftXXX.zip'   and
   `freetype-XXX.tar.bz2'  files as the  default files to  download for
   `freetype-XXX.tar.bz2'  files as the  default files to  download for
   `Windows' and `Others', respectively.
   `Windows' and `Others', respectively.
 
 
 . Copy the reference files (generated by `make dist') to
 . Copy the reference files (generated by `make dist') to
 
 
-    freetype.freedesktop.org:/srv/freetype.freedesktop.org/www/freetype2/docs/reference
-
-  and
-
-    shell.sf.net:/home/groups/f/fr/freetype/htdocs/freetype2/docs/reference
-
-  TODO: Create  FreeType  home  page  CVS  on savannah.nongnu.org  and
-        update it accordingly.
-
-        Write script to automatically do this.
-
-        Mirror FreeType's savannah home page everywhere.
-
-. Update
-
-    freetype.freedesktop.org:/srv/freetype.freedesktop.org/www/index2.html
+    <freetype-web git repository>/freetype2/docs/reference
 
 
-  and copy it to
+. Update the `freetype-web' repository.  `git push' then automatically
+  triggers an update  of the public web pages  within ten minutes, due
+  to a cron script (on [email protected]) that rsyncs with
 
 
-    shell.sf.net:/home/groups/f/fr/freetype/htdocs/index2.html
+    freedesktop.org://srv/freetype.freedesktop.org/www
 
 
 . Announce new release on [email protected] and to relevant
 . Announce new release on [email protected] and to relevant
   newsgroups.
   newsgroups.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright 2003, 2005-2007, 2009, 2011-2012 by
+Copyright 2003-2016 by
 David Turner, Robert Wilhelm, and Werner Lemberg.
 David Turner, Robert Wilhelm, and Werner Lemberg.
 
 
 This  file is  part of  the FreeType  project, and  may only  be used,
 This  file is  part of  the FreeType  project, and  may only  be used,

+ 48 - 228
Source/ThirdParty/FreeType/include/freetype/config/ftconfig.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    ANSI-specific configuration file (specification only).               */
 /*    ANSI-specific configuration file (specification only).               */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2004, 2006-2008, 2010-2011, 2013 by                     */
+/*  Copyright 1996-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -15,7 +15,6 @@
 /*                                                                         */
 /*                                                                         */
 /***************************************************************************/
 /***************************************************************************/
 
 
-// Modified by Lasse Oorni for Urho3D
 
 
   /*************************************************************************/
   /*************************************************************************/
   /*                                                                       */
   /*                                                                       */
@@ -28,16 +27,16 @@
   /* Note however that if some specific modifications are needed, we       */
   /* Note however that if some specific modifications are needed, we       */
   /* advise you to place a modified copy in your build directory.          */
   /* advise you to place a modified copy in your build directory.          */
   /*                                                                       */
   /*                                                                       */
-  /* The build directory is usually `freetype/builds/<system>', and        */
-  /* contains system-specific files that are always included first when    */
-  /* building the library.                                                 */
+  /* 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/freetype/config'.           */
+  /* This ANSI version should stay in `include/config/'.                   */
   /*                                                                       */
   /*                                                                       */
   /*************************************************************************/
   /*************************************************************************/
 
 
-#ifndef __FTCONFIG_H__
-#define __FTCONFIG_H__
+#ifndef FTCONFIG_H_
+#define FTCONFIG_H_
 
 
 #include <ft2build.h>
 #include <ft2build.h>
 #include FT_CONFIG_OPTIONS_H
 #include FT_CONFIG_OPTIONS_H
@@ -54,7 +53,7 @@ FT_BEGIN_HEADER
   /* These macros can be toggled to suit a specific system.  The current   */
   /* These macros can be toggled to suit a specific system.  The current   */
   /* ones are defaults used to compile FreeType in an ANSI C environment   */
   /* ones are defaults used to compile FreeType in an ANSI C environment   */
   /* (16bit compilers are also supported).  Copy this file to your own     */
   /* (16bit compilers are also supported).  Copy this file to your own     */
-  /* `freetype/builds/<system>' directory, and edit it to port the engine. */
+  /* `builds/<system>' directory, and edit it to port the engine.          */
   /*                                                                       */
   /*                                                                       */
   /*************************************************************************/
   /*************************************************************************/
 
 
@@ -144,6 +143,14 @@ FT_BEGIN_HEADER
 #endif
 #endif
 
 
 
 
+  /* Fix compiler warning with sgi compiler */
+#if defined( __sgi ) && !defined( __GNUC__ )
+#if defined( _COMPILER_VERSION ) && ( _COMPILER_VERSION >= 730 )
+#pragma set woff 3505
+#endif
+#endif
+
+
   /*************************************************************************/
   /*************************************************************************/
   /*                                                                       */
   /*                                                                       */
   /* <Section>                                                             */
   /* <Section>                                                             */
@@ -267,6 +274,21 @@ FT_BEGIN_HEADER
 #define FT_INT64   long
 #define FT_INT64   long
 #define FT_UINT64  unsigned 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.     */
+  /*                                                                       */
+#elif !defined( __STDC__ ) || defined( FT_CONFIG_OPTION_FORCE_INT64 )
+
+#if defined( __STDC_VERSION__ ) && __STDC_VERSION__ >= 199901L
+
+#define FT_LONG64
+#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 */
@@ -301,27 +323,9 @@ FT_BEGIN_HEADER
 #define FT_INT64   long long int
 #define FT_INT64   long long int
 #define FT_UINT64  unsigned long long int
 #define FT_UINT64  unsigned long long int
 
 
-#endif /* FT_SIZEOF_LONG == (64 / FT_CHAR_BIT) */
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* A 64-bit data type will create compilation problems if you compile    */
-  /* in strict ANSI mode.  To avoid them, we disable its use if __STDC__   */
-  /* is defined.  You can however ignore this rule by defining the         */
-  /* FT_CONFIG_OPTION_FORCE_INT64 configuration macro.                     */
-  /*                                                                       */
-#if defined( FT_LONG64 ) && !defined( FT_CONFIG_OPTION_FORCE_INT64 )
-
-#ifdef __STDC__
+#endif /* __STDC_VERSION__ >= 199901L */
 
 
-  /* undefine the 64-bit macros in strict ANSI compilation mode */
-#undef FT_LONG64
-#undef FT_INT64
-
-#endif /* __STDC__ */
-
-#endif /* FT_LONG64 && !FT_CONFIG_OPTION_FORCE_INT64 */
+#endif /* FT_SIZEOF_LONG == (64 / FT_CHAR_BIT) */
 
 
 #ifdef FT_LONG64
 #ifdef FT_LONG64
   typedef FT_INT64   FT_Int64;
   typedef FT_INT64   FT_Int64;
@@ -329,210 +333,26 @@ FT_BEGIN_HEADER
 #endif
 #endif
 
 
 
 
+  /*************************************************************************/
+  /*                                                                       */
+  /* miscellaneous                                                         */
+  /*                                                                       */
+  /*************************************************************************/
+
+
 #define FT_BEGIN_STMNT  do {
 #define FT_BEGIN_STMNT  do {
 #define FT_END_STMNT    } while ( 0 )
 #define FT_END_STMNT    } while ( 0 )
 #define FT_DUMMY_STMNT  FT_BEGIN_STMNT FT_END_STMNT
 #define FT_DUMMY_STMNT  FT_BEGIN_STMNT FT_END_STMNT
 
 
 
 
-#ifndef  FT_CONFIG_OPTION_NO_ASSEMBLER
-  /* Provide assembler fragments for performance-critical functions. */
-  /* These must be defined `static __inline__' with GCC.             */
-
-#if defined( __CC_ARM ) || defined( __ARMCC__ )  /* RVCT */
-
-#define FT_MULFIX_ASSEMBLER  FT_MulFix_arm
-
-  /* documentation is in freetype.h */
-
-  static __inline FT_Int32
-  FT_MulFix_arm( FT_Int32  a,
-                 FT_Int32  b )
-  {
-    register FT_Int32  t, t2;
-
-
-    __asm
-    {
-      smull t2, t,  b,  a           /* (lo=t2,hi=t) = a*b */
-      mov   a,  t,  asr #31         /* a   = (hi >> 31) */
-      add   a,  a,  #0x8000         /* a  += 0x8000 */
-      adds  t2, t2, a               /* t2 += a */
-      adc   t,  t,  #0              /* t  += carry */
-      mov   a,  t2, lsr #16         /* a   = t2 >> 16 */
-      orr   a,  a,  t,  lsl #16     /* a  |= t << 16 */
-    }
-    return a;
-  }
-
-#endif /* __CC_ARM || __ARMCC__ */
-
-
-#ifdef __GNUC__
-
-// Urho3D: restored previous architecture check to prevent iOS build failure
-#if defined( __arm__ ) && !defined( __thumb__ )    && \
-    !( defined( __CC_ARM ) || defined( __ARMCC__ ) )
-#define FT_MULFIX_ASSEMBLER  FT_MulFix_arm
-
-  /* documentation is in freetype.h */
-
-  static __inline__ FT_Int32
-  FT_MulFix_arm( FT_Int32  a,
-                 FT_Int32  b )
-  {
-    register FT_Int32  t, t2;
-
-
-    __asm__ __volatile__ (
-      "smull  %1, %2, %4, %3\n\t"       /* (lo=%1,hi=%2) = a*b */
-      "mov    %0, %2, asr #31\n\t"      /* %0  = (hi >> 31) */
-      "add    %0, %0, #0x8000\n\t"      /* %0 += 0x8000 */
-      "adds   %1, %1, %0\n\t"           /* %1 += %0 */
-      "adc    %2, %2, #0\n\t"           /* %2 += carry */
-      "mov    %0, %1, lsr #16\n\t"      /* %0  = %1 >> 16 */
-      "orr    %0, %0, %2, lsl #16\n\t"  /* %0 |= %2 << 16 */
-      : "=r"(a), "=&r"(t2), "=&r"(t)
-      : "r"(a), "r"(b)
-      : "cc" );
-    return a;
-  }
-
-#endif /* __arm__ && !__thumb__ && !( __CC_ARM || __ARMCC__ ) */
-
-
-#if defined( __i386__ )
-
-#define FT_MULFIX_ASSEMBLER  FT_MulFix_i386
-
-  /* documentation is in freetype.h */
-
-  static __inline__ FT_Int32
-  FT_MulFix_i386( FT_Int32  a,
-                  FT_Int32  b )
-  {
-    register FT_Int32  result;
-
-
-    __asm__ __volatile__ (
-      "imul  %%edx\n"
-      "movl  %%edx, %%ecx\n"
-      "sarl  $31, %%ecx\n"
-      "addl  $0x8000, %%ecx\n"
-      "addl  %%ecx, %%eax\n"
-      "adcl  $0, %%edx\n"
-      "shrl  $16, %%eax\n"
-      "shll  $16, %%edx\n"
-      "addl  %%edx, %%eax\n"
-      : "=a"(result), "=d"(b)
-      : "a"(a), "d"(b)
-      : "%ecx", "cc" );
-    return result;
-  }
-
-#endif /* i386 */
-
-#endif /* __GNUC__ */
-
-
-#ifdef _MSC_VER /* Visual C++ */
-
-#ifdef _M_IX86
-
-#define FT_MULFIX_ASSEMBLER  FT_MulFix_i386
-
-  /* documentation is in freetype.h */
-
-  static __inline FT_Int32
-  FT_MulFix_i386( FT_Int32  a,
-                  FT_Int32  b )
-  {
-    register FT_Int32  result;
-
-    __asm
-    {
-      mov eax, a
-      mov edx, b
-      imul edx
-      mov ecx, edx
-      sar ecx, 31
-      add ecx, 8000h
-      add eax, ecx
-      adc edx, 0
-      shr eax, 16
-      shl edx, 16
-      add eax, edx
-      mov result, eax
-    }
-    return result;
-  }
-
-#endif /* _M_IX86 */
-
-#endif /* _MSC_VER */
-
-
-#if defined( __GNUC__ ) && defined( __x86_64__ )
-
-#define FT_MULFIX_ASSEMBLER  FT_MulFix_x86_64
-
-  static __inline__ FT_Int32
-  FT_MulFix_x86_64( FT_Int32  a,
-                    FT_Int32  b )
-  {
-    /* Temporarily disable the warning that C90 doesn't support */
-    /* `long long'.                                             */
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wlong-long"
-
-#if 1
-    /* Technically not an assembly fragment, but GCC does a really good */
-    /* job at inlining it and generating good machine code for it.      */
-    long long  ret, tmp;
-
-
-    ret  = (long long)a * b;
-    tmp  = ret >> 63;
-    ret += 0x8000 + tmp;
-
-    return (FT_Int32)( ret >> 16 );
+  /* typeof condition taken from gnulib's `intprops.h' header file */
+#if ( ( defined( __GNUC__ ) && __GNUC__ >= 2 )                       || \
+      ( defined( __IBMC__ ) && __IBMC__ >= 1210 &&                      \
+        defined( __IBM__TYPEOF__ ) )                                 || \
+      ( defined( __SUNPRO_C ) && __SUNPRO_C >= 0x5110 && !__STDC__ ) )
+#define FT_TYPEOF( type )  ( __typeof__ ( type ) )
 #else
 #else
-
-    /* For some reason, GCC 4.6 on Ubuntu 12.04 generates invalid machine  */
-    /* code from the lines below.  The main issue is that `wide_a' is not  */
-    /* properly initialized by sign-extending `a'.  Instead, the generated */
-    /* machine code assumes that the register that contains `a' on input   */
-    /* can be used directly as a 64-bit value, which is wrong most of the  */
-    /* time.                                                               */
-    long long  wide_a = (long long)a;
-    long long  wide_b = (long long)b;
-    long long  result;
-
-
-    __asm__ __volatile__ (
-      "imul %2, %1\n"
-      "mov %1, %0\n"
-      "sar $63, %0\n"
-      "lea 0x8000(%1, %0), %0\n"
-      "sar $16, %0\n"
-      : "=&r"(result), "=&r"(wide_a)
-      : "r"(wide_b)
-      : "cc" );
-
-    return (FT_Int32)result;
-#endif
-
-#pragma GCC diagnostic pop
-  }
-
-#endif /* __GNUC__ && __x86_64__ */
-
-#endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */
-
-
-#ifdef FT_CONFIG_OPTION_INLINE_MULFIX
-#ifdef FT_MULFIX_ASSEMBLER
-#define FT_MULFIX_INLINED  FT_MULFIX_ASSEMBLER
-#endif
+#define FT_TYPEOF( type )  /* empty */
 #endif
 #endif
 
 
 
 
@@ -656,7 +476,7 @@ FT_BEGIN_HEADER
 FT_END_HEADER
 FT_END_HEADER
 
 
 
 
-#endif /* __FTCONFIG_H__ */
+#endif /* FTCONFIG_H_ */
 
 
 
 
 /* END */
 /* END */

+ 13 - 12
Source/ThirdParty/FreeType/include/freetype/config/ftheader.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    Build macros of the FreeType 2 library.                              */
 /*    Build macros of the FreeType 2 library.                              */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2008, 2010, 2012, 2013 by                               */
+/*  Copyright 1996-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -15,8 +15,8 @@
 /*                                                                         */
 /*                                                                         */
 /***************************************************************************/
 /***************************************************************************/
 
 
-#ifndef __FT_HEADER_H__
-#define __FT_HEADER_H__
+#ifndef FTHEADER_H_
+#define FTHEADER_H_
 
 
 
 
   /*@***********************************************************************/
   /*@***********************************************************************/
@@ -710,14 +710,16 @@
   /*************************************************************************
   /*************************************************************************
    *
    *
    * @macro:
    * @macro:
-   *   FT_XFREE86_H
+   *   FT_FONT_FORMATS_H
    *
    *
    * @description:
    * @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 the XFree86 and
-   *   X.Org X11 servers.
+   *   FreeType~2 API which provides functions specific to font formats.
    */
    */
-#define FT_XFREE86_H  <freetype/ftxf86.h>
+#define FT_FONT_FORMATS_H  <freetype/ftfntfmt.h>
+
+  /* deprecated */
+#define FT_XFREE86_H  FT_FONT_FORMATS_H
 
 
 
 
   /*************************************************************************
   /*************************************************************************
@@ -751,8 +753,7 @@
    *   FT_UNPATENTED_HINTING_H
    *   FT_UNPATENTED_HINTING_H
    *
    *
    * @description:
    * @description:
-   *   A macro used in #include statements to name the file containing the
-   *   FreeType~2 API which performs color filtering for subpixel rendering.
+   *   Deprecated.
    */
    */
 #define FT_UNPATENTED_HINTING_H  <freetype/ttunpat.h>
 #define FT_UNPATENTED_HINTING_H  <freetype/ttunpat.h>
 
 
@@ -764,7 +765,7 @@
    *
    *
    * @description:
    * @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.
+   *   FreeType~2 API which performs incremental glyph loading.
    */
    */
 #define FT_INCREMENTAL_H  <freetype/ftincrem.h>
 #define FT_INCREMENTAL_H  <freetype/ftincrem.h>
 
 
@@ -817,7 +818,7 @@
 
 
 
 
   /*
   /*
-   * Include internal headers definitions from <freetype/internal/...>
+   * Include internal headers definitions from <internal/...>
    * only when building the library.
    * only when building the library.
    */
    */
 #ifdef FT2_BUILD_LIBRARY
 #ifdef FT2_BUILD_LIBRARY
@@ -826,7 +827,7 @@
 #endif /* FT2_BUILD_LIBRARY */
 #endif /* FT2_BUILD_LIBRARY */
 
 
 
 
-#endif /* __FT2_BUILD_H__ */
+#endif /* FTHEADER_H_ */
 
 
 
 
 /* END */
 /* END */

+ 194 - 94
Source/ThirdParty/FreeType/include/freetype/config/ftoption.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    User-selectable configuration macros (specification only).           */
 /*    User-selectable configuration macros (specification only).           */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2013 by                                                 */
+/*  Copyright 1996-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -16,8 +16,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __FTOPTION_H__
-#define __FTOPTION_H__
+#ifndef FTOPTION_H_
+#define FTOPTION_H_
 
 
 
 
 #include <ft2build.h>
 #include <ft2build.h>
@@ -61,7 +61,7 @@ FT_BEGIN_HEADER
   /*    that are statically linked to the library at compile time.  By     */
   /*    that are statically linked to the library at compile time.  By     */
   /*    default, this file is <freetype/config/ftmodule.h>.                */
   /*    default, this file is <freetype/config/ftmodule.h>.                */
   /*                                                                       */
   /*                                                                       */
-  /*  We highly recommend using the third method whenever possible.        */
+  /* We highly recommend using the third method whenever possible.         */
   /*                                                                       */
   /*                                                                       */
   /*************************************************************************/
   /*************************************************************************/
 
 
@@ -75,6 +75,36 @@ FT_BEGIN_HEADER
   /*************************************************************************/
   /*************************************************************************/
 
 
 
 
+  /*************************************************************************/
+  /*                                                                       */
+  /* If you enable this configuration option, FreeType recognizes an       */
+  /* environment variable called `FREETYPE_PROPERTIES', which can be used  */
+  /* to control the various font drivers and modules.  The controllable    */
+  /* properties are listed in the section `Controlling FreeType Modules'   */
+  /* in the reference's table of contents; currently there are properties  */
+  /* for the auto-hinter (file `ftautoh.h'), CFF (file `ftcffdrv.h'), and  */
+  /* TrueType (file `ftttdrv.h').                                          */
+  /*                                                                       */
+  /* `FREETYPE_PROPERTIES' has the following syntax form (broken here into */
+  /* multiple lines for better readability).                               */
+  /*                                                                       */
+  /*   <optional whitespace>                                               */
+  /*   <module-name1> ':'                                                  */
+  /*   <property-name1> '=' <property-value1>                              */
+  /*   <whitespace>                                                        */
+  /*   <module-name2> ':'                                                  */
+  /*   <property-name2> '=' <property-value2>                              */
+  /*   ...                                                                 */
+  /*                                                                       */
+  /* Example:                                                              */
+  /*                                                                       */
+  /*   FREETYPE_PROPERTIES=truetype:interpreter-version=35 \               */
+  /*                       cff:no-stem-darkening=1 \                       */
+  /*                       autofitter:warping=1                            */
+  /*                                                                       */
+#define FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
+
+
   /*************************************************************************/
   /*************************************************************************/
   /*                                                                       */
   /*                                                                       */
   /* Uncomment the line below if you want to activate sub-pixel rendering  */
   /* Uncomment the line below if you want to activate sub-pixel rendering  */
@@ -216,7 +246,7 @@ FT_BEGIN_HEADER
 
 
   /*************************************************************************/
   /*************************************************************************/
   /*                                                                       */
   /*                                                                       */
-  /*  PNG bitmap support.                                                  */
+  /* PNG bitmap support.                                                   */
   /*                                                                       */
   /*                                                                       */
   /*   FreeType now handles loading color bitmap glyphs in the PNG format. */
   /*   FreeType now handles loading color bitmap glyphs in the PNG format. */
   /*   This requires help from the external libpng library.  Uncompressed  */
   /*   This requires help from the external libpng library.  Uncompressed  */
@@ -228,6 +258,19 @@ FT_BEGIN_HEADER
 /* #define FT_CONFIG_OPTION_USE_PNG */
 /* #define FT_CONFIG_OPTION_USE_PNG */
 
 
 
 
+  /*************************************************************************/
+  /*                                                                       */
+  /* HarfBuzz support.                                                     */
+  /*                                                                       */
+  /*   FreeType uses the HarfBuzz library to improve auto-hinting of       */
+  /*   OpenType fonts.  If available, many glyphs not directly addressable */
+  /*   by a font's character map will be hinted also.                      */
+  /*                                                                       */
+  /*   Define this macro if you want to enable this `feature'.             */
+  /*                                                                       */
+/* #define FT_CONFIG_OPTION_USE_HARFBUZZ */
+
+
   /*************************************************************************/
   /*************************************************************************/
   /*                                                                       */
   /*                                                                       */
   /* DLL export compilation                                                */
   /* DLL export compilation                                                */
@@ -365,10 +408,6 @@ FT_BEGIN_HEADER
   /* The size in bytes of the render pool used by the scan-line converter  */
   /* The size in bytes of the render pool used by the scan-line converter  */
   /* to do all of its work.                                                */
   /* to do all of its work.                                                */
   /*                                                                       */
   /*                                                                       */
-  /* This must be greater than 4KByte if you use FreeType to rasterize     */
-  /* glyphs; otherwise, you may set it to zero to avoid unnecessary        */
-  /* allocation of the render pool.                                        */
-  /*                                                                       */
 #define FT_RENDER_POOL_SIZE  16384L
 #define FT_RENDER_POOL_SIZE  16384L
 
 
 
 
@@ -422,6 +461,8 @@ FT_BEGIN_HEADER
   /*     af_glyph_hints_dump_points                                        */
   /*     af_glyph_hints_dump_points                                        */
   /*     af_glyph_hints_dump_segments                                      */
   /*     af_glyph_hints_dump_segments                                      */
   /*     af_glyph_hints_dump_edges                                         */
   /*     af_glyph_hints_dump_edges                                         */
+  /*     af_glyph_hints_get_num_segments                                   */
+  /*     af_glyph_hints_get_segment_offset                                 */
   /*                                                                       */
   /*                                                                       */
   /*   As an argument, they use another global variable:                   */
   /*   As an argument, they use another global variable:                   */
   /*                                                                       */
   /*                                                                       */
@@ -481,7 +522,21 @@ FT_BEGIN_HEADER
   /*   code will be used.                                                  */
   /*   code will be used.                                                  */
   /*                                                                       */
   /*                                                                       */
   /*   Setting this macro is needed for systems that prohibit address      */
   /*   Setting this macro is needed for systems that prohibit address      */
-  /*   fixups, such as BREW.                                               */
+  /*   fixups, such as BREW.  [Note that standard compilers like gcc or    */
+  /*   clang handle PIC generation automatically; you don't have to set    */
+  /*   FT_CONFIG_OPTION_PIC, which is only necessary for very special      */
+  /*   compilers.]                                                         */
+  /*                                                                       */
+  /*   Note that FT_CONFIG_OPTION_PIC support is not available for all     */
+  /*   modules (see `modules.cfg' for a complete list).  For building with */
+  /*   FT_CONFIG_OPTION_PIC support, do the following.                     */
+  /*                                                                       */
+  /*     0. Clone the repository.                                          */
+  /*     1. Define FT_CONFIG_OPTION_PIC.                                   */
+  /*     2. Remove all subdirectories in `src' that don't have             */
+  /*        FT_CONFIG_OPTION_PIC support.                                  */
+  /*     3. Comment out the corresponding modules in `modules.cfg'.        */
+  /*     4. Compile.                                                       */
   /*                                                                       */
   /*                                                                       */
 /* #define FT_CONFIG_OPTION_PIC */
 /* #define FT_CONFIG_OPTION_PIC */
 
 
@@ -528,7 +583,7 @@ FT_BEGIN_HEADER
   /* does not contain any glyph name though.                               */
   /* does not contain any glyph name though.                               */
   /*                                                                       */
   /*                                                                       */
   /* Accessing SFNT names is done through the functions declared in        */
   /* Accessing SFNT names is done through the functions declared in        */
-  /* `freetype/ftsnames.h'.                                                */
+  /* `ftsnames.h'.                                                         */
   /*                                                                       */
   /*                                                                       */
 #define TT_CONFIG_OPTION_SFNT_NAMES
 #define TT_CONFIG_OPTION_SFNT_NAMES
 
 
@@ -575,86 +630,53 @@ FT_BEGIN_HEADER
   /*************************************************************************/
   /*************************************************************************/
   /*                                                                       */
   /*                                                                       */
   /* Define TT_CONFIG_OPTION_SUBPIXEL_HINTING if you want to compile       */
   /* Define TT_CONFIG_OPTION_SUBPIXEL_HINTING if you want to compile       */
-  /* EXPERIMENTAL subpixel hinting support into the TrueType driver.  This */
-  /* replaces the native TrueType hinting mechanism when anything but      */
-  /* FT_RENDER_MODE_MONO is requested.                                     */
-  /*                                                                       */
-  /* Enabling this causes the TrueType driver to ignore instructions under */
-  /* certain conditions.  This is done in accordance with the guide here,  */
-  /* with some minor differences:                                          */
-  /*                                                                       */
-  /*  http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx */
+  /* subpixel hinting support into the TrueType driver.  This modifies the */
+  /* TrueType hinting mechanism when anything but FT_RENDER_MODE_MONO is   */
+  /* requested.                                                            */
   /*                                                                       */
   /*                                                                       */
-  /* By undefining this, you only compile the code necessary to hint       */
-  /* TrueType glyphs with native TT hinting.                               */
+  /* In particular, it modifies the bytecode interpreter to interpret (or  */
+  /* not) instructions in a certain way so that all TrueType fonts look    */
+  /* like they do in a Windows ClearType (DirectWrite) environment.  See   */
+  /* [1] for a technical overview on what this means.  See `ttinterp.h'    */
+  /* for more details on the LEAN option.                                  */
   /*                                                                       */
   /*                                                                       */
-  /*   This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be    */
-  /*   defined.                                                            */
-  /*                                                                       */
-#define TT_CONFIG_OPTION_SUBPIXEL_HINTING
-
-
-  /*************************************************************************/
+  /* There are three options.                                              */
   /*                                                                       */
   /*                                                                       */
-  /* If you define TT_CONFIG_OPTION_UNPATENTED_HINTING, a special version  */
-  /* of the TrueType bytecode interpreter is used that doesn't implement   */
-  /* any of the patented opcodes and algorithms.  The patents related to   */
-  /* TrueType hinting have expired worldwide since May 2010; this option   */
-  /* is now deprecated.                                                    */
+  /* 1. This option is associated with the `Infinality' moniker.           */
+  /*    Contributed by an individual nicknamed Infinality with the goal of */
+  /*    making TrueType fonts render better than on Windows.  A high       */
+  /*    amount of configurability and flexibility, down to rules for       */
+  /*    single glyphs in fonts, but also very slow.  Its experimental and  */
+  /*    slow nature and the original developer losing interest meant that  */
+  /*    this option was never enabled in default builds.                   */
   /*                                                                       */
   /*                                                                       */
-  /* Note that the TT_CONFIG_OPTION_UNPATENTED_HINTING macro is *ignored*  */
-  /* if you define TT_CONFIG_OPTION_BYTECODE_INTERPRETER; in other words,  */
-  /* either define TT_CONFIG_OPTION_BYTECODE_INTERPRETER or                */
-  /* TT_CONFIG_OPTION_UNPATENTED_HINTING but not both at the same time.    */
+  /* 2. The new default mode for the TrueType driver.  The Infinality code */
+  /*    base was stripped to the bare minimum and all configurability      */
+  /*    removed in the name of speed and simplicity.  The configurability  */
+  /*    was mainly aimed at legacy fonts like Arial, Times New Roman, or   */
+  /*    Courier.  Legacy fonts are fonts that modify vertical stems to     */
+  /*    achieve clean black-and-white bitmaps.  The new mode focuses on    */
+  /*    applying a minimal set of rules to all fonts indiscriminately so   */
+  /*    that modern and web fonts render well while legacy fonts render    */
+  /*    okay.                                                              */
   /*                                                                       */
   /*                                                                       */
-  /* This macro is only useful for a small number of font files (mostly    */
-  /* for Asian scripts) that require bytecode interpretation to properly   */
-  /* load glyphs.  For all other fonts, this produces unpleasant results,  */
-  /* thus the unpatented interpreter is never used to load glyphs from     */
-  /* TrueType fonts unless one of the following two options is used.       */
+  /* 3. Compile both.                                                      */
   /*                                                                       */
   /*                                                                       */
-  /*   - The unpatented interpreter is explicitly activated by the user    */
-  /*     through the FT_PARAM_TAG_UNPATENTED_HINTING parameter tag         */
-  /*     when opening the FT_Face.                                         */
+  /* By undefining these, you get rendering behavior like on Windows       */
+  /* without ClearType, i.e., Windows XP without ClearType enabled and     */
+  /* Win9x (interpreter version v35).  Or not, depending on how much       */
+  /* hinting blood and testing tears the font designer put into a given    */
+  /* font.  If you define one or both subpixel hinting options, you can    */
+  /* switch between between v35 and the ones you define.                   */
   /*                                                                       */
   /*                                                                       */
-  /*   - FreeType detects that the FT_Face corresponds to one of the       */
-  /*     `trick' fonts (e.g., `Mingliu') it knows about.  The font engine  */
-  /*     contains a hard-coded list of font names and other matching       */
-  /*     parameters (see function `tt_face_init' in file                   */
-  /*     `src/truetype/ttobjs.c').                                         */
+  /* This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be      */
+  /* defined.                                                              */
   /*                                                                       */
   /*                                                                       */
-  /* Here a sample code snippet for using FT_PARAM_TAG_UNPATENTED_HINTING. */
+  /* [1] http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx */
   /*                                                                       */
   /*                                                                       */
-  /*   {                                                                   */
-  /*     FT_Parameter  parameter;                                          */
-  /*     FT_Open_Args  open_args;                                          */
-  /*                                                                       */
-  /*                                                                       */
-  /*     parameter.tag = FT_PARAM_TAG_UNPATENTED_HINTING;                  */
-  /*                                                                       */
-  /*     open_args.flags      = FT_OPEN_PATHNAME | FT_OPEN_PARAMS;         */
-  /*     open_args.pathname   = my_font_pathname;                          */
-  /*     open_args.num_params = 1;                                         */
-  /*     open_args.params     = &parameter;                                */
-  /*                                                                       */
-  /*     error = FT_Open_Face( library, &open_args, index, &face );        */
-  /*     ...                                                               */
-  /*   }                                                                   */
-  /*                                                                       */
-/* #define TT_CONFIG_OPTION_UNPATENTED_HINTING */
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* Define TT_CONFIG_OPTION_INTERPRETER_SWITCH to compile the TrueType    */
-  /* bytecode interpreter with a huge switch statement, rather than a call */
-  /* table.  This results in smaller and faster code for a number of       */
-  /* architectures.                                                        */
-  /*                                                                       */
-  /* Note however that on some compiler/processor combinations, undefining */
-  /* this macro will generate faster, though larger, code.                 */
-  /*                                                                       */
-#define TT_CONFIG_OPTION_INTERPRETER_SWITCH
+/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING  1         */
+#define TT_CONFIG_OPTION_SUBPIXEL_HINTING  2
+/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING  ( 1 | 2 ) */
 
 
 
 
   /*************************************************************************/
   /*************************************************************************/
@@ -671,7 +693,7 @@ FT_BEGIN_HEADER
   /* fonts will not have them.                                             */
   /* fonts will not have them.                                             */
   /*                                                                       */
   /*                                                                       */
   /*   http://www.microsoft.com/typography/otspec/glyf.htm                 */
   /*   http://www.microsoft.com/typography/otspec/glyf.htm                 */
-  /*   http://fonts.apple.com/TTRefMan/RM06/Chap6glyf.html                 */
+  /*   https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6glyf.html */
   /*                                                                       */
   /*                                                                       */
 #undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED
 #undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED
 
 
@@ -694,6 +716,24 @@ FT_BEGIN_HEADER
 #define TT_CONFIG_OPTION_BDF
 #define TT_CONFIG_OPTION_BDF
 
 
 
 
+  /*************************************************************************/
+  /*                                                                       */
+  /* Option TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES controls the maximum     */
+  /* number of bytecode instructions executed for a single run of the      */
+  /* bytecode interpreter, needed to prevent infinite loops.  You don't    */
+  /* want to change this except for very special situations (e.g., making  */
+  /* a library fuzzer spend less time to handle broken fonts).             */
+  /*                                                                       */
+  /* It is not expected that this value is ever modified by a configuring  */
+  /* script; instead, it gets surrounded with #ifndef ... #endif so that   */
+  /* the value can be set as a preprocessor option on the compiler's       */
+  /* command line.                                                         */
+  /*                                                                       */
+#ifndef TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES
+#define TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES  1000000L
+#endif
+
+
   /*************************************************************************/
   /*************************************************************************/
   /*************************************************************************/
   /*************************************************************************/
   /****                                                                 ****/
   /****                                                                 ****/
@@ -758,6 +798,30 @@ FT_BEGIN_HEADER
   /*************************************************************************/
   /*************************************************************************/
 
 
 
 
+  /*************************************************************************/
+  /*                                                                       */
+  /* Using CFF_CONFIG_OPTION_DARKENING_PARAMETER_{X,Y}{1,2,3,4} it is      */
+  /* possible to set up the default values of the four control points that */
+  /* define the stem darkening behaviour of the (new) CFF engine.  For     */
+  /* more details please read the documentation of the                     */
+  /* `darkening-parameters' property of the cff driver module (file        */
+  /* `ftcffdrv.h'), which allows the control at run-time.                  */
+  /*                                                                       */
+  /* Do *not* undefine these macros!                                       */
+  /*                                                                       */
+#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1   500
+#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1   400
+
+#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2  1000
+#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2   275
+
+#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3  1667
+#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3   275
+
+#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4  2333
+#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4     0
+
+
   /*************************************************************************/
   /*************************************************************************/
   /*                                                                       */
   /*                                                                       */
   /* CFF_CONFIG_OPTION_OLD_ENGINE controls whether the pre-Adobe CFF       */
   /* CFF_CONFIG_OPTION_OLD_ENGINE controls whether the pre-Adobe CFF       */
@@ -798,36 +862,72 @@ FT_BEGIN_HEADER
   /* grid.  To find out the optimal scaling and shifting value, various    */
   /* grid.  To find out the optimal scaling and shifting value, various    */
   /* parameter combinations are tried and scored.                          */
   /* parameter combinations are tried and scored.                          */
   /*                                                                       */
   /*                                                                       */
-  /* This experimental option is only active if the render mode is         */
-  /* FT_RENDER_MODE_LIGHT.                                                 */
+  /* This experimental option is active only if the rendering mode is      */
+  /* FT_RENDER_MODE_LIGHT; you can switch warping on and off with the      */
+  /* `warping' property of the auto-hinter (see file `ftautoh.h' for more  */
+  /* information; by default it is switched off).                          */
   /*                                                                       */
   /*                                                                       */
-/* #define AF_CONFIG_OPTION_USE_WARPER */
+#define AF_CONFIG_OPTION_USE_WARPER
 
 
   /* */
   /* */
 
 
 
 
   /*
   /*
-   *  This macro is obsolete.  Support has been removed in FreeType
-   *  version 2.5.
+   * This macro is obsolete.  Support has been removed in FreeType
+   * version 2.5.
    */
    */
 /* #define FT_CONFIG_OPTION_OLD_INTERNALS */
 /* #define FT_CONFIG_OPTION_OLD_INTERNALS */
 
 
 
 
   /*
   /*
-   * This macro is defined if either unpatented or native TrueType
-   * hinting is requested by the definitions above.
+   * This macro is defined if native TrueType hinting is requested by the
+   * definitions above.
    */
    */
 #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
 #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
 #define  TT_USE_BYTECODE_INTERPRETER
 #define  TT_USE_BYTECODE_INTERPRETER
-#undef   TT_CONFIG_OPTION_UNPATENTED_HINTING
-#elif defined TT_CONFIG_OPTION_UNPATENTED_HINTING
-#define  TT_USE_BYTECODE_INTERPRETER
+
+#if TT_CONFIG_OPTION_SUBPIXEL_HINTING & 1
+#define  TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
+#endif
+
+#if TT_CONFIG_OPTION_SUBPIXEL_HINTING & 2
+#define  TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
+#endif
+#endif
+
+
+  /*
+   * Check CFF darkening parameters.  The checks are the same as in function
+   * `cff_property_set' in file `cffdrivr.c'.
+   */
+#if CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 < 0   || \
+    CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 < 0   || \
+    CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 < 0   || \
+    CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 < 0   || \
+                                                      \
+    CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 < 0   || \
+    CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 < 0   || \
+    CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 < 0   || \
+    CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 < 0   || \
+                                                      \
+    CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 >        \
+      CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2     || \
+    CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 >        \
+      CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3     || \
+    CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 >        \
+      CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4     || \
+                                                      \
+    CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 > 500 || \
+    CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 > 500 || \
+    CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 > 500 || \
+    CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 > 500
+#error "Invalid CFF darkening parameters!"
 #endif
 #endif
 
 
 FT_END_HEADER
 FT_END_HEADER
 
 
 
 
-#endif /* __FTOPTION_H__ */
+#endif /* FTOPTION_H_ */
 
 
 
 
 /* END */
 /* END */

+ 9 - 8
Source/ThirdParty/FreeType/include/freetype/config/ftstdlib.h

@@ -5,7 +5,7 @@
 /*    ANSI-specific library and header configuration file (specification   */
 /*    ANSI-specific library and header configuration file (specification   */
 /*    only).                                                               */
 /*    only).                                                               */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2002-2007, 2009, 2011-2012 by                                */
+/*  Copyright 2002-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -23,14 +23,13 @@
   /* FreeType normally requires.  It also defines macros to rename the     */
   /* FreeType normally requires.  It also defines macros to rename the     */
   /* standard functions within the FreeType source code.                   */
   /* standard functions within the FreeType source code.                   */
   /*                                                                       */
   /*                                                                       */
-  /* Load a file which defines __FTSTDLIB_H__ before this one to override  */
-  /* it.                                                                   */
+  /* Load a file which defines FTSTDLIB_H_ before this one to override it. */
   /*                                                                       */
   /*                                                                       */
   /*************************************************************************/
   /*************************************************************************/
 
 
 
 
-#ifndef __FTSTDLIB_H__
-#define __FTSTDLIB_H__
+#ifndef FTSTDLIB_H_
+#define FTSTDLIB_H_
 
 
 
 
 #include <stddef.h>
 #include <stddef.h>
@@ -64,6 +63,8 @@
 #define FT_INT_MAX     INT_MAX
 #define FT_INT_MAX     INT_MAX
 #define FT_INT_MIN     INT_MIN
 #define FT_INT_MIN     INT_MIN
 #define FT_UINT_MAX    UINT_MAX
 #define FT_UINT_MAX    UINT_MAX
+#define FT_LONG_MIN    LONG_MIN
+#define FT_LONG_MAX    LONG_MAX
 #define FT_ULONG_MAX   ULONG_MAX
 #define FT_ULONG_MAX   ULONG_MAX
 
 
 
 
@@ -141,8 +142,8 @@
   /**********************************************************************/
   /**********************************************************************/
 
 
 
 
-#define ft_atol   atol
-#define ft_labs   labs
+#define ft_strtol  strtol
+#define ft_getenv  getenv
 
 
 
 
   /**********************************************************************/
   /**********************************************************************/
@@ -168,7 +169,7 @@
 #include <stdarg.h>
 #include <stdarg.h>
 
 
 
 
-#endif /* __FTSTDLIB_H__ */
+#endif /* FTSTDLIB_H_ */
 
 
 
 
 /* END */
 /* END */

File diff suppressed because it is too large
+ 377 - 139
Source/ThirdParty/FreeType/include/freetype/freetype.h


+ 11 - 6
Source/ThirdParty/FreeType/include/freetype/ftadvanc.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    Quick computation of advance widths (specification only).            */
 /*    Quick computation of advance widths (specification only).            */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2008, 2013 by                                                */
+/*  Copyright 2008-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -16,8 +16,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __FTADVANC_H__
-#define __FTADVANC_H__
+#ifndef FTADVANC_H_
+#define FTADVANC_H_
 
 
 
 
 #include <ft2build.h>
 #include <ft2build.h>
@@ -48,6 +48,11 @@ FT_BEGIN_HEADER
    * @description:
    * @description:
    *   This section contains functions to quickly extract advance values
    *   This section contains functions to quickly extract advance values
    *   without handling glyph outlines, if possible.
    *   without handling glyph outlines, if possible.
+   *
+   * @order:
+   *   FT_Get_Advance
+   *   FT_Get_Advances
+   *
    */
    */
 
 
 
 
@@ -72,7 +77,7 @@ FT_BEGIN_HEADER
   /*    and hinting of the glyph outline, are extremely slow by            */
   /*    and hinting of the glyph outline, are extremely slow by            */
   /*    comparison.                                                        */
   /*    comparison.                                                        */
   /*                                                                       */
   /*                                                                       */
-#define FT_ADVANCE_FLAG_FAST_ONLY  0x20000000UL
+#define FT_ADVANCE_FLAG_FAST_ONLY  0x20000000L
 
 
 
 
   /*************************************************************************/
   /*************************************************************************/
@@ -171,12 +176,12 @@ FT_BEGIN_HEADER
                    FT_Int32   load_flags,
                    FT_Int32   load_flags,
                    FT_Fixed  *padvances );
                    FT_Fixed  *padvances );
 
 
-/* */
+  /* */
 
 
 
 
 FT_END_HEADER
 FT_END_HEADER
 
 
-#endif /* __FTADVANC_H__ */
+#endif /* FTADVANC_H_ */
 
 
 
 
 /* END */
 /* END */

+ 171 - 17
Source/ThirdParty/FreeType/include/freetype/ftautoh.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType API for controlling the auto-hinter (specification only).   */
 /*    FreeType API for controlling the auto-hinter (specification only).   */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2012, 2013 by                                                */
+/*  Copyright 2012-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -16,8 +16,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __FTAUTOH_H__
-#define __FTAUTOH_H__
+#ifndef FTAUTOH_H_
+#define FTAUTOH_H_
 
 
 #include <ft2build.h>
 #include <ft2build.h>
 #include FT_FREETYPE_H
 #include FT_FREETYPE_H
@@ -219,8 +219,8 @@ FT_BEGIN_HEADER
    *       U+0F00 - U+0FFF  // Tibetan
    *       U+0F00 - U+0FFF  // Tibetan
    *       U+1900 - U+194F  // Limbu
    *       U+1900 - U+194F  // Limbu
    *       U+1B80 - U+1BBF  // Sundanese
    *       U+1B80 - U+1BBF  // Sundanese
-   *       U+1C80 - U+1CDF  // Meetei Mayak
    *       U+A800 - U+A82F  // Syloti Nagri
    *       U+A800 - U+A82F  // Syloti Nagri
+   *       U+ABC0 - U+ABFF  // Meetei Mayek
    *      U+11800 - U+118DF // Sharada
    *      U+11800 - U+118DF // Sharada
    *     }
    *     }
    *
    *
@@ -245,12 +245,12 @@ FT_BEGIN_HEADER
    *   The data exchange structure for the @glyph-to-script-map property.
    *   The data exchange structure for the @glyph-to-script-map property.
    *
    *
    */
    */
-   typedef struct  FT_Prop_GlyphToScriptMap_
-   {
-     FT_Face   face;
-     FT_Byte*  map;
+  typedef struct  FT_Prop_GlyphToScriptMap_
+  {
+    FT_Face     face;
+    FT_UShort*  map;
 
 
-   } FT_Prop_GlyphToScriptMap;
+  } FT_Prop_GlyphToScriptMap;
 
 
 
 
   /**************************************************************************
   /**************************************************************************
@@ -287,7 +287,52 @@ FT_BEGIN_HEADER
    *   face-specific property like @glyph-to-script-map, or by auto-hinting
    *   face-specific property like @glyph-to-script-map, or by auto-hinting
    *   any glyph from that face.  In particular, if you have already created
    *   any glyph from that face.  In particular, if you have already created
    *   an @FT_Face structure but not loaded any glyph (using the
    *   an @FT_Face structure but not loaded any glyph (using the
-   *   auto-hinter), a change of the fallback glyph will affect this face.
+   *   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.
    *
    *
    */
    */
 
 
@@ -339,19 +384,128 @@ FT_BEGIN_HEADER
    *   The data exchange structure for the @increase-x-height property.
    *   The data exchange structure for the @increase-x-height property.
    *
    *
    */
    */
-   typedef struct  FT_Prop_IncreaseXHeight_
-   {
-     FT_Face  face;
-     FT_UInt  limit;
+  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 `light' auto-hinting mode.  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 `light' 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.
+   *
+   */
+
+
+  /**************************************************************************
+   *
+   * @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_Prop_IncreaseXHeight;
 
 
+  /* */
 
 
- /* */
 
 
 FT_END_HEADER
 FT_END_HEADER
 
 
-#endif /* __FTAUTOH_H__ */
+#endif /* FTAUTOH_H_ */
 
 
 
 
 /* END */
 /* END */

+ 4 - 5
Source/ThirdParty/FreeType/include/freetype/ftbbox.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType exact bbox computation (specification).                     */
 /*    FreeType exact bbox computation (specification).                     */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2001, 2003, 2007, 2011, 2013 by                         */
+/*  Copyright 1996-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -27,8 +27,8 @@
   /*************************************************************************/
   /*************************************************************************/
 
 
 
 
-#ifndef __FTBBOX_H__
-#define __FTBBOX_H__
+#ifndef FTBBOX_H_
+#define FTBBOX_H_
 
 
 
 
 #include <ft2build.h>
 #include <ft2build.h>
@@ -85,13 +85,12 @@ FT_BEGIN_HEADER
   FT_Outline_Get_BBox( FT_Outline*  outline,
   FT_Outline_Get_BBox( FT_Outline*  outline,
                        FT_BBox     *abbox );
                        FT_BBox     *abbox );
 
 
-
   /* */
   /* */
 
 
 
 
 FT_END_HEADER
 FT_END_HEADER
 
 
-#endif /* __FTBBOX_H__ */
+#endif /* FTBBOX_H_ */
 
 
 
 
 /* END */
 /* END */

+ 8 - 7
Source/ThirdParty/FreeType/include/freetype/ftbdf.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType API for accessing BDF-specific strings (specification).     */
 /*    FreeType API for accessing BDF-specific strings (specification).     */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2002, 2003, 2004, 2006, 2009 by                              */
+/*  Copyright 2002-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -16,8 +16,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __FTBDF_H__
-#define __FTBDF_H__
+#ifndef FTBDF_H_
+#define FTBDF_H_
 
 
 #include <ft2build.h>
 #include <ft2build.h>
 #include FT_FREETYPE_H
 #include FT_FREETYPE_H
@@ -53,7 +53,7 @@ FT_BEGIN_HEADER
   /**********************************************************************
   /**********************************************************************
    *
    *
    * @enum:
    * @enum:
-   *    FT_PropertyType
+   *    BDF_PropertyType
    *
    *
    * @description:
    * @description:
    *    A list of BDF property types.
    *    A list of BDF property types.
@@ -106,7 +106,8 @@ FT_BEGIN_HEADER
   *      The property type.
   *      The property type.
   *
   *
   *    u.atom ::
   *    u.atom ::
-  *      The atom string, if type is @BDF_PROPERTY_TYPE_ATOM.
+  *      The atom string, if type is @BDF_PROPERTY_TYPE_ATOM.  May be
+  *      NULL, indicating an empty string.
   *
   *
   *    u.integer ::
   *    u.integer ::
   *      A signed integer, if type is @BDF_PROPERTY_TYPE_INTEGER.
   *      A signed integer, if type is @BDF_PROPERTY_TYPE_INTEGER.
@@ -199,11 +200,11 @@ FT_BEGIN_HEADER
                        const char*       prop_name,
                        const char*       prop_name,
                        BDF_PropertyRec  *aproperty );
                        BDF_PropertyRec  *aproperty );
 
 
- /* */
+  /* */
 
 
 FT_END_HEADER
 FT_END_HEADER
 
 
-#endif /* __FTBDF_H__ */
+#endif /* FTBDF_H_ */
 
 
 
 
 /* END */
 /* END */

+ 20 - 7
Source/ThirdParty/FreeType/include/freetype/ftbitmap.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType utility functions for bitmaps (specification).              */
 /*    FreeType utility functions for bitmaps (specification).              */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2004-2006, 2008, 2013 by                                     */
+/*  Copyright 2004-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -16,8 +16,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __FTBITMAP_H__
-#define __FTBITMAP_H__
+#ifndef FTBITMAP_H_
+#define FTBITMAP_H_
 
 
 
 
 #include <ft2build.h>
 #include <ft2build.h>
@@ -45,7 +45,9 @@ FT_BEGIN_HEADER
   /*    Handling FT_Bitmap objects.                                        */
   /*    Handling FT_Bitmap objects.                                        */
   /*                                                                       */
   /*                                                                       */
   /* <Description>                                                         */
   /* <Description>                                                         */
-  /*    This section contains functions for converting FT_Bitmap objects.  */
+  /*    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').        */
   /*                                                                       */
   /*                                                                       */
   /*************************************************************************/
   /*************************************************************************/
 
 
@@ -53,7 +55,7 @@ FT_BEGIN_HEADER
   /*************************************************************************/
   /*************************************************************************/
   /*                                                                       */
   /*                                                                       */
   /* <Function>                                                            */
   /* <Function>                                                            */
-  /*    FT_Bitmap_New                                                      */
+  /*    FT_Bitmap_Init                                                     */
   /*                                                                       */
   /*                                                                       */
   /* <Description>                                                         */
   /* <Description>                                                         */
   /*    Initialize a pointer to an @FT_Bitmap structure.                   */
   /*    Initialize a pointer to an @FT_Bitmap structure.                   */
@@ -61,6 +63,14 @@ FT_BEGIN_HEADER
   /* <InOut>                                                               */
   /* <InOut>                                                               */
   /*    abitmap :: A pointer to the bitmap structure.                      */
   /*    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 );
+
+
+  /* deprecated */
   FT_EXPORT( void )
   FT_EXPORT( void )
   FT_Bitmap_New( FT_Bitmap  *abitmap );
   FT_Bitmap_New( FT_Bitmap  *abitmap );
 
 
@@ -122,6 +132,9 @@ FT_BEGIN_HEADER
   /*    If you want to embolden the bitmap owned by a @FT_GlyphSlotRec,    */
   /*    If you want to embolden the bitmap owned by a @FT_GlyphSlotRec,    */
   /*    you should call @FT_GlyphSlot_Own_Bitmap on the slot first.        */
   /*    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_EXPORT( FT_Error )
   FT_Bitmap_Embolden( FT_Library  library,
   FT_Bitmap_Embolden( FT_Library  library,
                       FT_Bitmap*  bitmap,
                       FT_Bitmap*  bitmap,
@@ -197,7 +210,7 @@ FT_BEGIN_HEADER
   /*    FT_Bitmap_Done                                                     */
   /*    FT_Bitmap_Done                                                     */
   /*                                                                       */
   /*                                                                       */
   /* <Description>                                                         */
   /* <Description>                                                         */
-  /*    Destroy a bitmap object created with @FT_Bitmap_New.               */
+  /*    Destroy a bitmap object initialized with @FT_Bitmap_Init.          */
   /*                                                                       */
   /*                                                                       */
   /* <Input>                                                               */
   /* <Input>                                                               */
   /*    library :: A handle to a library object.                           */
   /*    library :: A handle to a library object.                           */
@@ -221,7 +234,7 @@ FT_BEGIN_HEADER
 
 
 FT_END_HEADER
 FT_END_HEADER
 
 
-#endif /* __FTBITMAP_H__ */
+#endif /* FTBITMAP_H_ */
 
 
 
 
 /* END */
 /* END */

+ 5 - 5
Source/ThirdParty/FreeType/include/freetype/ftbzip2.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    Bzip2-compressed stream support.                                     */
 /*    Bzip2-compressed stream support.                                     */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2010 by                                                      */
+/*  Copyright 2010-2016 by                                                 */
 /*  Joel Klinghed.                                                         */
 /*  Joel Klinghed.                                                         */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -16,8 +16,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __FTBZIP2_H__
-#define __FTBZIP2_H__
+#ifndef FTBZIP2_H_
+#define FTBZIP2_H_
 
 
 #include <ft2build.h>
 #include <ft2build.h>
 #include FT_FREETYPE_H
 #include FT_FREETYPE_H
@@ -91,12 +91,12 @@ FT_BEGIN_HEADER
   FT_Stream_OpenBzip2( FT_Stream  stream,
   FT_Stream_OpenBzip2( FT_Stream  stream,
                        FT_Stream  source );
                        FT_Stream  source );
 
 
- /* */
+  /* */
 
 
 
 
 FT_END_HEADER
 FT_END_HEADER
 
 
-#endif /* __FTBZIP2_H__ */
+#endif /* FTBZIP2_H_ */
 
 
 
 
 /* END */
 /* END */

+ 13 - 13
Source/ThirdParty/FreeType/include/freetype/ftcache.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType Cache subsystem (specification).                            */
 /*    FreeType Cache subsystem (specification).                            */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2008, 2010, 2013 by                                     */
+/*  Copyright 1996-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -16,8 +16,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __FTCACHE_H__
-#define __FTCACHE_H__
+#ifndef FTCACHE_H_
+#define FTCACHE_H_
 
 
 
 
 #include <ft2build.h>
 #include <ft2build.h>
@@ -209,10 +209,10 @@ FT_BEGIN_HEADER
   typedef FT_Error
   typedef FT_Error
   (*FTC_Face_Requester)( FTC_FaceID  face_id,
   (*FTC_Face_Requester)( FTC_FaceID  face_id,
                          FT_Library  library,
                          FT_Library  library,
-                         FT_Pointer  request_data,
+                         FT_Pointer  req_data,
                          FT_Face*    aface );
                          FT_Face*    aface );
 
 
- /* */
+  /* */
 
 
 
 
   /*************************************************************************/
   /*************************************************************************/
@@ -667,8 +667,8 @@ FT_BEGIN_HEADER
   typedef struct  FTC_ImageTypeRec_
   typedef struct  FTC_ImageTypeRec_
   {
   {
     FTC_FaceID  face_id;
     FTC_FaceID  face_id;
-    FT_Int      width;
-    FT_Int      height;
+    FT_UInt     width;
+    FT_UInt     height;
     FT_Int32    flags;
     FT_Int32    flags;
 
 
   } FTC_ImageTypeRec;
   } FTC_ImageTypeRec;
@@ -749,7 +749,7 @@ FT_BEGIN_HEADER
   /*    aglyph :: The corresponding @FT_Glyph object.  0~in case of        */
   /*    aglyph :: The corresponding @FT_Glyph object.  0~in case of        */
   /*              failure.                                                 */
   /*              failure.                                                 */
   /*                                                                       */
   /*                                                                       */
-  /*    anode  :: Used to return the address of of the corresponding cache */
+  /*    anode  :: Used to return the address of the corresponding cache    */
   /*              node after incrementing its reference count (see note    */
   /*              node after incrementing its reference count (see note    */
   /*              below).                                                  */
   /*              below).                                                  */
   /*                                                                       */
   /*                                                                       */
@@ -802,7 +802,7 @@ FT_BEGIN_HEADER
   /*    aglyph     :: The corresponding @FT_Glyph object.  0~in case of    */
   /*    aglyph     :: The corresponding @FT_Glyph object.  0~in case of    */
   /*                  failure.                                             */
   /*                  failure.                                             */
   /*                                                                       */
   /*                                                                       */
-  /*    anode      :: Used to return the address of of the corresponding   */
+  /*    anode      :: Used to return the address of the corresponding      */
   /*                  cache node after incrementing its reference count    */
   /*                  cache node after incrementing its reference count    */
   /*                  (see note below).                                    */
   /*                  (see note below).                                    */
   /*                                                                       */
   /*                                                                       */
@@ -957,7 +957,7 @@ FT_BEGIN_HEADER
   /* <Output>                                                              */
   /* <Output>                                                              */
   /*    sbit   :: A handle to a small bitmap descriptor.                   */
   /*    sbit   :: A handle to a small bitmap descriptor.                   */
   /*                                                                       */
   /*                                                                       */
-  /*    anode  :: Used to return the address of of the corresponding cache */
+  /*    anode  :: Used to return the address of the corresponding cache    */
   /*              node after incrementing its reference count (see note    */
   /*              node after incrementing its reference count (see note    */
   /*              below).                                                  */
   /*              below).                                                  */
   /*                                                                       */
   /*                                                                       */
@@ -1012,7 +1012,7 @@ FT_BEGIN_HEADER
   /* <Output>                                                              */
   /* <Output>                                                              */
   /*    sbit       :: A handle to a small bitmap descriptor.               */
   /*    sbit       :: A handle to a small bitmap descriptor.               */
   /*                                                                       */
   /*                                                                       */
-  /*    anode      :: Used to return the address of of the corresponding   */
+  /*    anode      :: Used to return the address of the corresponding      */
   /*                  cache node after incrementing its reference count    */
   /*                  cache node after incrementing its reference count    */
   /*                  (see note below).                                    */
   /*                  (see note below).                                    */
   /*                                                                       */
   /*                                                                       */
@@ -1046,12 +1046,12 @@ FT_BEGIN_HEADER
                               FTC_SBit      *sbit,
                               FTC_SBit      *sbit,
                               FTC_Node      *anode );
                               FTC_Node      *anode );
 
 
+  /* */
 
 
- /* */
 
 
 FT_END_HEADER
 FT_END_HEADER
 
 
-#endif /* __FTCACHE_H__ */
+#endif /* FTCACHE_H_ */
 
 
 
 
 /* END */
 /* END */

+ 42 - 19
Source/ThirdParty/FreeType/include/freetype/ftcffdrv.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType API for controlling the CFF driver (specification only).    */
 /*    FreeType API for controlling the CFF driver (specification only).    */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2013 by                                                      */
+/*  Copyright 2013-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -16,8 +16,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __FTCFFDRV_H__
-#define __FTCFFDRV_H__
+#ifndef FTCFFDRV_H_
+#define FTCFFDRV_H_
 
 
 #include <ft2build.h>
 #include <ft2build.h>
 #include FT_FREETYPE_H
 #include FT_FREETYPE_H
@@ -89,7 +89,7 @@ FT_BEGIN_HEADER
    *   features preserve the design's weight and spacing much better than
    *   features preserve the design's weight and spacing much better than
    *   aliased type would.
    *   aliased type would.
    *
    *
-   *   2) Aligment in the vertical direction: Weights and spacing along the
+   *   2) Alignment in the vertical direction: Weights and spacing along the
    *   y~axis are less critical; what is much more important is the visual
    *   y~axis are less critical; what is much more important is the visual
    *   alignment of related features (like cap-height and x-height).  The
    *   alignment of related features (like cap-height and x-height).  The
    *   sense of alignment for these is enhanced by the sharpness of grid-fit
    *   sense of alignment for these is enhanced by the sharpness of grid-fit
@@ -108,13 +108,19 @@ FT_BEGIN_HEADER
    *   in one of four ways, top edge up or down, bottom edge up or down.
    *   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
    *   Unless there are conflicting hstems, the smallest movement is taken
    *   to minimize distortion.
    *   to minimize distortion.
+   *
+   * @order:
+   *   hinting-engine[cff]
+   *   no-stem-darkening[cff]
+   *   darkening-parameters[cff]
+   *
    */
    */
 
 
 
 
   /**************************************************************************
   /**************************************************************************
    *
    *
    * @property:
    * @property:
-   *   hinting-engine
+   *   hinting-engine[cff]
    *
    *
    * @description:
    * @description:
    *   Thanks to Adobe, which contributed a new hinting (and parsing)
    *   Thanks to Adobe, which contributed a new hinting (and parsing)
@@ -142,6 +148,8 @@ FT_BEGIN_HEADER
    * @note:
    * @note:
    *   This property can be used with @FT_Property_Get also.
    *   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').
    */
    */
 
 
 
 
@@ -151,8 +159,8 @@ FT_BEGIN_HEADER
    *   FT_CFF_HINTING_XXX
    *   FT_CFF_HINTING_XXX
    *
    *
    * @description:
    * @description:
-   *   A list of constants used for the @hinting-engine property to select
-   *   the hinting engine for CFF fonts.
+   *   A list of constants used for the @hinting-engine[cff] property to
+   *   select the hinting engine for CFF fonts.
    *
    *
    * @values:
    * @values:
    *   FT_CFF_HINTING_FREETYPE ::
    *   FT_CFF_HINTING_FREETYPE ::
@@ -169,12 +177,13 @@ FT_BEGIN_HEADER
   /**************************************************************************
   /**************************************************************************
    *
    *
    * @property:
    * @property:
-   *   no-stem-darkening
+   *   no-stem-darkening[cff]
    *
    *
    * @description:
    * @description:
    *   By default, the Adobe CFF engine darkens stems at smaller sizes,
    *   By default, the Adobe CFF engine darkens stems at smaller sizes,
-   *   regardless of hinting, to enhance contrast.  Setting this property,
-   *   stem darkening gets switched off.
+   *   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.
    *   Note that stem darkening is never applied if @FT_LOAD_NO_SCALE is set.
    *
    *
@@ -192,13 +201,16 @@ FT_BEGIN_HEADER
    * @note:
    * @note:
    *   This property can be used with @FT_Property_Get also.
    *   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).
+   *
    */
    */
 
 
 
 
   /**************************************************************************
   /**************************************************************************
    *
    *
    * @property:
    * @property:
-   *   darkening-parameters
+   *   darkening-parameters[cff]
    *
    *
    * @description:
    * @description:
    *   By default, the Adobe CFF engine darkens stems as follows (if the
    *   By default, the Adobe CFF engine darkens stems as follows (if the
@@ -211,9 +223,11 @@ FT_BEGIN_HEADER
    *     stem width >= 2.333px: darkening amount = 0px
    *     stem width >= 2.333px: darkening amount = 0px
    *   }
    *   }
    *
    *
-   *   and piecewise linear in-between.  Using the `darkening-parameters'
-   *   property, these four control points can be changed, as the following
-   *   example demonstrates.
+   *   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_Library  library;
@@ -231,22 +245,31 @@ FT_BEGIN_HEADER
    *
    *
    *   The x~values give the stem width, and the y~values the darkening
    *   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
    *   amount.  The unit is 1000th of pixels.  All coordinate values must be
-   *   positive; the x~values must be monotonically increasing, and the
-   *   y~values smaller than or equal to 500 (corresponding to half a
-   *   pixel).
+   *   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:
    * @note:
    *   This property can be used with @FT_Property_Get also.
    *   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
+   *   }
    */
    */
 
 
+  /* */
 
 
- /* */
 
 
 FT_END_HEADER
 FT_END_HEADER
 
 
 
 
-#endif /* __FTCFFDRV_H__ */
+#endif /* FTCFFDRV_H_ */
 
 
 
 
 /* END */
 /* END */

+ 15 - 0
Source/ThirdParty/FreeType/include/freetype/ftchapters.h

@@ -15,6 +15,7 @@
 /*    General Remarks                                                      */
 /*    General Remarks                                                      */
 /*                                                                         */
 /*                                                                         */
 /* <Sections>                                                              */
 /* <Sections>                                                              */
+/*    header_inclusion                                                     */
 /*    user_allocation                                                      */
 /*    user_allocation                                                      */
 /*                                                                         */
 /*                                                                         */
 /***************************************************************************/
 /***************************************************************************/
@@ -118,3 +119,17 @@
 /*    lcd_filtering                                                        */
 /*    lcd_filtering                                                        */
 /*                                                                         */
 /*                                                                         */
 /***************************************************************************/
 /***************************************************************************/
+
+/***************************************************************************/
+/*                                                                         */
+/* <Chapter>                                                               */
+/*    error_codes                                                          */
+/*                                                                         */
+/* <Title>                                                                 */
+/*    Error Codes                                                          */
+/*                                                                         */
+/* <Sections>                                                              */
+/*    error_enumerations                                                   */
+/*    error_code_values                                                    */
+/*                                                                         */
+/***************************************************************************/

+ 9 - 7
Source/ThirdParty/FreeType/include/freetype/ftcid.h

@@ -4,7 +4,8 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType API for accessing CID font information (specification).     */
 /*    FreeType API for accessing CID font information (specification).     */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2007, 2009 by Dereg Clegg, Michael Toftdal.                  */
+/*  Copyright 2007-2016 by                                                 */
+/*  Dereg Clegg and Michael Toftdal.                                       */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  modified, and distributed under the terms of the FreeType project      */
 /*  modified, and distributed under the terms of the FreeType project      */
@@ -15,8 +16,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __FTCID_H__
-#define __FTCID_H__
+#ifndef FTCID_H_
+#define FTCID_H_
 
 
 #include <ft2build.h>
 #include <ft2build.h>
 #include FT_FREETYPE_H
 #include FT_FREETYPE_H
@@ -96,8 +97,8 @@ FT_BEGIN_HEADER
    *
    *
    * @description:
    * @description:
    *    Retrieve the type of the input face, CID keyed or not.  In
    *    Retrieve the type of the input face, CID keyed or not.  In
-   *    constrast to the @FT_IS_CID_KEYED macro this function returns
-   *    successfully also for CID-keyed fonts in an SNFT wrapper.
+   *    contrast to the @FT_IS_CID_KEYED macro this function returns
+   *    successfully also for CID-keyed fonts in an SFNT wrapper.
    *
    *
    * @input:
    * @input:
    *    face ::
    *    face ::
@@ -156,11 +157,12 @@ FT_BEGIN_HEADER
                                FT_UInt   glyph_index,
                                FT_UInt   glyph_index,
                                FT_UInt  *cid );
                                FT_UInt  *cid );
 
 
- /* */
+  /* */
+
 
 
 FT_END_HEADER
 FT_END_HEADER
 
 
-#endif /* __FTCID_H__ */
+#endif /* FTCID_H_ */
 
 
 
 
 /* END */
 /* END */

+ 130 - 103
Source/ThirdParty/FreeType/include/freetype/fterrdef.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType error codes (specification).                                */
 /*    FreeType error codes (specification).                                */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2002, 2004, 2006, 2007, 2010-2013 by                         */
+/*  Copyright 2002-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -16,234 +16,261 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-  /*******************************************************************/
-  /*******************************************************************/
-  /*****                                                         *****/
-  /*****                LIST OF ERROR CODES/MESSAGES             *****/
-  /*****                                                         *****/
-  /*******************************************************************/
-  /*******************************************************************/
+  /*************************************************************************/
+  /*                                                                       */
+  /* <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.                                   */
+  /*                                                                       */
+  /*************************************************************************/
 
 
 
 
-  /* You need to define both FT_ERRORDEF_ and FT_NOERRORDEF_ before */
-  /* including this file.                                           */
-
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Enum>                                                                */
+  /*    FT_Err_XXX                                                         */
+  /*                                                                       */
+  /*************************************************************************/
 
 
   /* generic errors */
   /* generic errors */
 
 
-  FT_NOERRORDEF_( Ok,                                        0x00, \
+  FT_NOERRORDEF_( Ok,                                        0x00,
                   "no error" )
                   "no error" )
 
 
-  FT_ERRORDEF_( Cannot_Open_Resource,                        0x01, \
+  FT_ERRORDEF_( Cannot_Open_Resource,                        0x01,
                 "cannot open resource" )
                 "cannot open resource" )
-  FT_ERRORDEF_( Unknown_File_Format,                         0x02, \
+  FT_ERRORDEF_( Unknown_File_Format,                         0x02,
                 "unknown file format" )
                 "unknown file format" )
-  FT_ERRORDEF_( Invalid_File_Format,                         0x03, \
+  FT_ERRORDEF_( Invalid_File_Format,                         0x03,
                 "broken file" )
                 "broken file" )
-  FT_ERRORDEF_( Invalid_Version,                             0x04, \
+  FT_ERRORDEF_( Invalid_Version,                             0x04,
                 "invalid FreeType version" )
                 "invalid FreeType version" )
-  FT_ERRORDEF_( Lower_Module_Version,                        0x05, \
+  FT_ERRORDEF_( Lower_Module_Version,                        0x05,
                 "module version is too low" )
                 "module version is too low" )
-  FT_ERRORDEF_( Invalid_Argument,                            0x06, \
+  FT_ERRORDEF_( Invalid_Argument,                            0x06,
                 "invalid argument" )
                 "invalid argument" )
-  FT_ERRORDEF_( Unimplemented_Feature,                       0x07, \
+  FT_ERRORDEF_( Unimplemented_Feature,                       0x07,
                 "unimplemented feature" )
                 "unimplemented feature" )
-  FT_ERRORDEF_( Invalid_Table,                               0x08, \
+  FT_ERRORDEF_( Invalid_Table,                               0x08,
                 "broken table" )
                 "broken table" )
-  FT_ERRORDEF_( Invalid_Offset,                              0x09, \
+  FT_ERRORDEF_( Invalid_Offset,                              0x09,
                 "broken offset within table" )
                 "broken offset within table" )
-  FT_ERRORDEF_( Array_Too_Large,                             0x0A, \
+  FT_ERRORDEF_( Array_Too_Large,                             0x0A,
                 "array allocation size too large" )
                 "array allocation size too large" )
-  FT_ERRORDEF_( Missing_Module,                              0x0B, \
+  FT_ERRORDEF_( Missing_Module,                              0x0B,
                 "missing module" )
                 "missing module" )
-  FT_ERRORDEF_( Missing_Property,                            0x0C, \
+  FT_ERRORDEF_( Missing_Property,                            0x0C,
                 "missing property" )
                 "missing property" )
 
 
   /* glyph/character errors */
   /* glyph/character errors */
 
 
-  FT_ERRORDEF_( Invalid_Glyph_Index,                         0x10, \
+  FT_ERRORDEF_( Invalid_Glyph_Index,                         0x10,
                 "invalid glyph index" )
                 "invalid glyph index" )
-  FT_ERRORDEF_( Invalid_Character_Code,                      0x11, \
+  FT_ERRORDEF_( Invalid_Character_Code,                      0x11,
                 "invalid character code" )
                 "invalid character code" )
-  FT_ERRORDEF_( Invalid_Glyph_Format,                        0x12, \
+  FT_ERRORDEF_( Invalid_Glyph_Format,                        0x12,
                 "unsupported glyph image format" )
                 "unsupported glyph image format" )
-  FT_ERRORDEF_( Cannot_Render_Glyph,                         0x13, \
+  FT_ERRORDEF_( Cannot_Render_Glyph,                         0x13,
                 "cannot render this glyph format" )
                 "cannot render this glyph format" )
-  FT_ERRORDEF_( Invalid_Outline,                             0x14, \
+  FT_ERRORDEF_( Invalid_Outline,                             0x14,
                 "invalid outline" )
                 "invalid outline" )
-  FT_ERRORDEF_( Invalid_Composite,                           0x15, \
+  FT_ERRORDEF_( Invalid_Composite,                           0x15,
                 "invalid composite glyph" )
                 "invalid composite glyph" )
-  FT_ERRORDEF_( Too_Many_Hints,                              0x16, \
+  FT_ERRORDEF_( Too_Many_Hints,                              0x16,
                 "too many hints" )
                 "too many hints" )
-  FT_ERRORDEF_( Invalid_Pixel_Size,                          0x17, \
+  FT_ERRORDEF_( Invalid_Pixel_Size,                          0x17,
                 "invalid pixel size" )
                 "invalid pixel size" )
 
 
   /* handle errors */
   /* handle errors */
 
 
-  FT_ERRORDEF_( Invalid_Handle,                              0x20, \
+  FT_ERRORDEF_( Invalid_Handle,                              0x20,
                 "invalid object handle" )
                 "invalid object handle" )
-  FT_ERRORDEF_( Invalid_Library_Handle,                      0x21, \
+  FT_ERRORDEF_( Invalid_Library_Handle,                      0x21,
                 "invalid library handle" )
                 "invalid library handle" )
-  FT_ERRORDEF_( Invalid_Driver_Handle,                       0x22, \
+  FT_ERRORDEF_( Invalid_Driver_Handle,                       0x22,
                 "invalid module handle" )
                 "invalid module handle" )
-  FT_ERRORDEF_( Invalid_Face_Handle,                         0x23, \
+  FT_ERRORDEF_( Invalid_Face_Handle,                         0x23,
                 "invalid face handle" )
                 "invalid face handle" )
-  FT_ERRORDEF_( Invalid_Size_Handle,                         0x24, \
+  FT_ERRORDEF_( Invalid_Size_Handle,                         0x24,
                 "invalid size handle" )
                 "invalid size handle" )
-  FT_ERRORDEF_( Invalid_Slot_Handle,                         0x25, \
+  FT_ERRORDEF_( Invalid_Slot_Handle,                         0x25,
                 "invalid glyph slot handle" )
                 "invalid glyph slot handle" )
-  FT_ERRORDEF_( Invalid_CharMap_Handle,                      0x26, \
+  FT_ERRORDEF_( Invalid_CharMap_Handle,                      0x26,
                 "invalid charmap handle" )
                 "invalid charmap handle" )
-  FT_ERRORDEF_( Invalid_Cache_Handle,                        0x27, \
+  FT_ERRORDEF_( Invalid_Cache_Handle,                        0x27,
                 "invalid cache manager handle" )
                 "invalid cache manager handle" )
-  FT_ERRORDEF_( Invalid_Stream_Handle,                       0x28, \
+  FT_ERRORDEF_( Invalid_Stream_Handle,                       0x28,
                 "invalid stream handle" )
                 "invalid stream handle" )
 
 
   /* driver errors */
   /* driver errors */
 
 
-  FT_ERRORDEF_( Too_Many_Drivers,                            0x30, \
+  FT_ERRORDEF_( Too_Many_Drivers,                            0x30,
                 "too many modules" )
                 "too many modules" )
-  FT_ERRORDEF_( Too_Many_Extensions,                         0x31, \
+  FT_ERRORDEF_( Too_Many_Extensions,                         0x31,
                 "too many extensions" )
                 "too many extensions" )
 
 
   /* memory errors */
   /* memory errors */
 
 
-  FT_ERRORDEF_( Out_Of_Memory,                               0x40, \
+  FT_ERRORDEF_( Out_Of_Memory,                               0x40,
                 "out of memory" )
                 "out of memory" )
-  FT_ERRORDEF_( Unlisted_Object,                             0x41, \
+  FT_ERRORDEF_( Unlisted_Object,                             0x41,
                 "unlisted object" )
                 "unlisted object" )
 
 
   /* stream errors */
   /* stream errors */
 
 
-  FT_ERRORDEF_( Cannot_Open_Stream,                          0x51, \
+  FT_ERRORDEF_( Cannot_Open_Stream,                          0x51,
                 "cannot open stream" )
                 "cannot open stream" )
-  FT_ERRORDEF_( Invalid_Stream_Seek,                         0x52, \
+  FT_ERRORDEF_( Invalid_Stream_Seek,                         0x52,
                 "invalid stream seek" )
                 "invalid stream seek" )
-  FT_ERRORDEF_( Invalid_Stream_Skip,                         0x53, \
+  FT_ERRORDEF_( Invalid_Stream_Skip,                         0x53,
                 "invalid stream skip" )
                 "invalid stream skip" )
-  FT_ERRORDEF_( Invalid_Stream_Read,                         0x54, \
+  FT_ERRORDEF_( Invalid_Stream_Read,                         0x54,
                 "invalid stream read" )
                 "invalid stream read" )
-  FT_ERRORDEF_( Invalid_Stream_Operation,                    0x55, \
+  FT_ERRORDEF_( Invalid_Stream_Operation,                    0x55,
                 "invalid stream operation" )
                 "invalid stream operation" )
-  FT_ERRORDEF_( Invalid_Frame_Operation,                     0x56, \
+  FT_ERRORDEF_( Invalid_Frame_Operation,                     0x56,
                 "invalid frame operation" )
                 "invalid frame operation" )
-  FT_ERRORDEF_( Nested_Frame_Access,                         0x57, \
+  FT_ERRORDEF_( Nested_Frame_Access,                         0x57,
                 "nested frame access" )
                 "nested frame access" )
-  FT_ERRORDEF_( Invalid_Frame_Read,                          0x58, \
+  FT_ERRORDEF_( Invalid_Frame_Read,                          0x58,
                 "invalid frame read" )
                 "invalid frame read" )
 
 
   /* raster errors */
   /* raster errors */
 
 
-  FT_ERRORDEF_( Raster_Uninitialized,                        0x60, \
+  FT_ERRORDEF_( Raster_Uninitialized,                        0x60,
                 "raster uninitialized" )
                 "raster uninitialized" )
-  FT_ERRORDEF_( Raster_Corrupted,                            0x61, \
+  FT_ERRORDEF_( Raster_Corrupted,                            0x61,
                 "raster corrupted" )
                 "raster corrupted" )
-  FT_ERRORDEF_( Raster_Overflow,                             0x62, \
+  FT_ERRORDEF_( Raster_Overflow,                             0x62,
                 "raster overflow" )
                 "raster overflow" )
-  FT_ERRORDEF_( Raster_Negative_Height,                      0x63, \
+  FT_ERRORDEF_( Raster_Negative_Height,                      0x63,
                 "negative height while rastering" )
                 "negative height while rastering" )
 
 
   /* cache errors */
   /* cache errors */
 
 
-  FT_ERRORDEF_( Too_Many_Caches,                             0x70, \
+  FT_ERRORDEF_( Too_Many_Caches,                             0x70,
                 "too many registered caches" )
                 "too many registered caches" )
 
 
   /* TrueType and SFNT errors */
   /* TrueType and SFNT errors */
 
 
-  FT_ERRORDEF_( Invalid_Opcode,                              0x80, \
+  FT_ERRORDEF_( Invalid_Opcode,                              0x80,
                 "invalid opcode" )
                 "invalid opcode" )
-  FT_ERRORDEF_( Too_Few_Arguments,                           0x81, \
+  FT_ERRORDEF_( Too_Few_Arguments,                           0x81,
                 "too few arguments" )
                 "too few arguments" )
-  FT_ERRORDEF_( Stack_Overflow,                              0x82, \
+  FT_ERRORDEF_( Stack_Overflow,                              0x82,
                 "stack overflow" )
                 "stack overflow" )
-  FT_ERRORDEF_( Code_Overflow,                               0x83, \
+  FT_ERRORDEF_( Code_Overflow,                               0x83,
                 "code overflow" )
                 "code overflow" )
-  FT_ERRORDEF_( Bad_Argument,                                0x84, \
+  FT_ERRORDEF_( Bad_Argument,                                0x84,
                 "bad argument" )
                 "bad argument" )
-  FT_ERRORDEF_( Divide_By_Zero,                              0x85, \
+  FT_ERRORDEF_( Divide_By_Zero,                              0x85,
                 "division by zero" )
                 "division by zero" )
-  FT_ERRORDEF_( Invalid_Reference,                           0x86, \
+  FT_ERRORDEF_( Invalid_Reference,                           0x86,
                 "invalid reference" )
                 "invalid reference" )
-  FT_ERRORDEF_( Debug_OpCode,                                0x87, \
+  FT_ERRORDEF_( Debug_OpCode,                                0x87,
                 "found debug opcode" )
                 "found debug opcode" )
-  FT_ERRORDEF_( ENDF_In_Exec_Stream,                         0x88, \
+  FT_ERRORDEF_( ENDF_In_Exec_Stream,                         0x88,
                 "found ENDF opcode in execution stream" )
                 "found ENDF opcode in execution stream" )
-  FT_ERRORDEF_( Nested_DEFS,                                 0x89, \
+  FT_ERRORDEF_( Nested_DEFS,                                 0x89,
                 "nested DEFS" )
                 "nested DEFS" )
-  FT_ERRORDEF_( Invalid_CodeRange,                           0x8A, \
+  FT_ERRORDEF_( Invalid_CodeRange,                           0x8A,
                 "invalid code range" )
                 "invalid code range" )
-  FT_ERRORDEF_( Execution_Too_Long,                          0x8B, \
+  FT_ERRORDEF_( Execution_Too_Long,                          0x8B,
                 "execution context too long" )
                 "execution context too long" )
-  FT_ERRORDEF_( Too_Many_Function_Defs,                      0x8C, \
+  FT_ERRORDEF_( Too_Many_Function_Defs,                      0x8C,
                 "too many function definitions" )
                 "too many function definitions" )
-  FT_ERRORDEF_( Too_Many_Instruction_Defs,                   0x8D, \
+  FT_ERRORDEF_( Too_Many_Instruction_Defs,                   0x8D,
                 "too many instruction definitions" )
                 "too many instruction definitions" )
-  FT_ERRORDEF_( Table_Missing,                               0x8E, \
+  FT_ERRORDEF_( Table_Missing,                               0x8E,
                 "SFNT font table missing" )
                 "SFNT font table missing" )
-  FT_ERRORDEF_( Horiz_Header_Missing,                        0x8F, \
+  FT_ERRORDEF_( Horiz_Header_Missing,                        0x8F,
                 "horizontal header (hhea) table missing" )
                 "horizontal header (hhea) table missing" )
-  FT_ERRORDEF_( Locations_Missing,                           0x90, \
+  FT_ERRORDEF_( Locations_Missing,                           0x90,
                 "locations (loca) table missing" )
                 "locations (loca) table missing" )
-  FT_ERRORDEF_( Name_Table_Missing,                          0x91, \
+  FT_ERRORDEF_( Name_Table_Missing,                          0x91,
                 "name table missing" )
                 "name table missing" )
-  FT_ERRORDEF_( CMap_Table_Missing,                          0x92, \
+  FT_ERRORDEF_( CMap_Table_Missing,                          0x92,
                 "character map (cmap) table missing" )
                 "character map (cmap) table missing" )
-  FT_ERRORDEF_( Hmtx_Table_Missing,                          0x93, \
+  FT_ERRORDEF_( Hmtx_Table_Missing,                          0x93,
                 "horizontal metrics (hmtx) table missing" )
                 "horizontal metrics (hmtx) table missing" )
-  FT_ERRORDEF_( Post_Table_Missing,                          0x94, \
+  FT_ERRORDEF_( Post_Table_Missing,                          0x94,
                 "PostScript (post) table missing" )
                 "PostScript (post) table missing" )
-  FT_ERRORDEF_( Invalid_Horiz_Metrics,                       0x95, \
+  FT_ERRORDEF_( Invalid_Horiz_Metrics,                       0x95,
                 "invalid horizontal metrics" )
                 "invalid horizontal metrics" )
-  FT_ERRORDEF_( Invalid_CharMap_Format,                      0x96, \
+  FT_ERRORDEF_( Invalid_CharMap_Format,                      0x96,
                 "invalid character map (cmap) format" )
                 "invalid character map (cmap) format" )
-  FT_ERRORDEF_( Invalid_PPem,                                0x97, \
+  FT_ERRORDEF_( Invalid_PPem,                                0x97,
                 "invalid ppem value" )
                 "invalid ppem value" )
-  FT_ERRORDEF_( Invalid_Vert_Metrics,                        0x98, \
+  FT_ERRORDEF_( Invalid_Vert_Metrics,                        0x98,
                 "invalid vertical metrics" )
                 "invalid vertical metrics" )
-  FT_ERRORDEF_( Could_Not_Find_Context,                      0x99, \
+  FT_ERRORDEF_( Could_Not_Find_Context,                      0x99,
                 "could not find context" )
                 "could not find context" )
-  FT_ERRORDEF_( Invalid_Post_Table_Format,                   0x9A, \
+  FT_ERRORDEF_( Invalid_Post_Table_Format,                   0x9A,
                 "invalid PostScript (post) table format" )
                 "invalid PostScript (post) table format" )
-  FT_ERRORDEF_( Invalid_Post_Table,                          0x9B, \
+  FT_ERRORDEF_( Invalid_Post_Table,                          0x9B,
                 "invalid PostScript (post) table" )
                 "invalid PostScript (post) table" )
 
 
   /* CFF, CID, and Type 1 errors */
   /* CFF, CID, and Type 1 errors */
 
 
-  FT_ERRORDEF_( Syntax_Error,                                0xA0, \
+  FT_ERRORDEF_( Syntax_Error,                                0xA0,
                 "opcode syntax error" )
                 "opcode syntax error" )
-  FT_ERRORDEF_( Stack_Underflow,                             0xA1, \
+  FT_ERRORDEF_( Stack_Underflow,                             0xA1,
                 "argument stack underflow" )
                 "argument stack underflow" )
-  FT_ERRORDEF_( Ignore,                                      0xA2, \
+  FT_ERRORDEF_( Ignore,                                      0xA2,
                 "ignore" )
                 "ignore" )
-  FT_ERRORDEF_( No_Unicode_Glyph_Name,                       0xA3, \
+  FT_ERRORDEF_( No_Unicode_Glyph_Name,                       0xA3,
                 "no Unicode glyph name found" )
                 "no Unicode glyph name found" )
-  FT_ERRORDEF_( Glyph_Too_Big,                               0xA4, \
-                "glyph to big for hinting" )
+  FT_ERRORDEF_( Glyph_Too_Big,                               0xA4,
+                "glyph too big for hinting" )
 
 
   /* BDF errors */
   /* BDF errors */
 
 
-  FT_ERRORDEF_( Missing_Startfont_Field,                     0xB0, \
+  FT_ERRORDEF_( Missing_Startfont_Field,                     0xB0,
                 "`STARTFONT' field missing" )
                 "`STARTFONT' field missing" )
-  FT_ERRORDEF_( Missing_Font_Field,                          0xB1, \
+  FT_ERRORDEF_( Missing_Font_Field,                          0xB1,
                 "`FONT' field missing" )
                 "`FONT' field missing" )
-  FT_ERRORDEF_( Missing_Size_Field,                          0xB2, \
+  FT_ERRORDEF_( Missing_Size_Field,                          0xB2,
                 "`SIZE' field missing" )
                 "`SIZE' field missing" )
-  FT_ERRORDEF_( Missing_Fontboundingbox_Field,               0xB3, \
+  FT_ERRORDEF_( Missing_Fontboundingbox_Field,               0xB3,
                 "`FONTBOUNDINGBOX' field missing" )
                 "`FONTBOUNDINGBOX' field missing" )
-  FT_ERRORDEF_( Missing_Chars_Field,                         0xB4, \
+  FT_ERRORDEF_( Missing_Chars_Field,                         0xB4,
                 "`CHARS' field missing" )
                 "`CHARS' field missing" )
-  FT_ERRORDEF_( Missing_Startchar_Field,                     0xB5, \
+  FT_ERRORDEF_( Missing_Startchar_Field,                     0xB5,
                 "`STARTCHAR' field missing" )
                 "`STARTCHAR' field missing" )
-  FT_ERRORDEF_( Missing_Encoding_Field,                      0xB6, \
+  FT_ERRORDEF_( Missing_Encoding_Field,                      0xB6,
                 "`ENCODING' field missing" )
                 "`ENCODING' field missing" )
-  FT_ERRORDEF_( Missing_Bbx_Field,                           0xB7, \
+  FT_ERRORDEF_( Missing_Bbx_Field,                           0xB7,
                 "`BBX' field missing" )
                 "`BBX' field missing" )
-  FT_ERRORDEF_( Bbx_Too_Big,                                 0xB8, \
+  FT_ERRORDEF_( Bbx_Too_Big,                                 0xB8,
                 "`BBX' too big" )
                 "`BBX' too big" )
-  FT_ERRORDEF_( Corrupted_Font_Header,                       0xB9, \
+  FT_ERRORDEF_( Corrupted_Font_Header,                       0xB9,
                 "Font header corrupted or missing fields" )
                 "Font header corrupted or missing fields" )
-  FT_ERRORDEF_( Corrupted_Font_Glyphs,                       0xBA, \
+  FT_ERRORDEF_( Corrupted_Font_Glyphs,                       0xBA,
                 "Font glyphs corrupted or missing fields" )
                 "Font glyphs corrupted or missing fields" )
 
 
+  /* */
+
 
 
 /* END */
 /* END */

+ 73 - 45
Source/ThirdParty/FreeType/include/freetype/fterrors.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType error code handling (specification).                        */
 /*    FreeType error code handling (specification).                        */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2002, 2004, 2007, 2013 by                               */
+/*  Copyright 1996-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -18,70 +18,98 @@
 
 
   /*************************************************************************/
   /*************************************************************************/
   /*                                                                       */
   /*                                                                       */
-  /* This special header file is used to define the handling of FT2        */
-  /* enumeration constants.  It can also be used to generate error message */
-  /* strings with a small macro trick explained below.                     */
+  /* <Section>                                                             */
+  /*   error_enumerations                                                  */
   /*                                                                       */
   /*                                                                       */
-  /* I - Error Formats                                                     */
-  /* -----------------                                                     */
+  /* <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   */
   /*   The configuration macro FT_CONFIG_OPTION_USE_MODULE_ERRORS can be   */
-  /*   defined in ftoption.h in order to make the higher byte indicate     */
+  /*   defined in `ftoption.h' in order to make the higher byte indicate   */
   /*   the module where the error has happened (this is not compatible     */
   /*   the module where the error has happened (this is not compatible     */
-  /*   with standard builds of FreeType 2).  See the file `ftmoderr.h' for */
-  /*   more details.                                                       */
+  /*   with standard builds of FreeType&nbsp;2, however).  See the file    */
+  /*   `ftmoderr.h' for more details.                                      */
   /*                                                                       */
   /*                                                                       */
+  /*   *Error* *Message* *Strings*                                         */
   /*                                                                       */
   /*                                                                       */
-  /* II - Error Message strings                                            */
-  /* --------------------------                                            */
-  /*                                                                       */
-  /*   The error definitions below are made through special macros that    */
-  /*   allow client applications to build a table of error message strings */
-  /*   if they need it.  The strings are not included in a normal build of */
-  /*   FreeType 2 to save space (most client applications do not use       */
-  /*   them).                                                              */
+  /*   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&nbsp;2 to    */
+  /*   save space (most client applications do not use them).              */
   /*                                                                       */
   /*                                                                       */
   /*   To do so, you have to define the following macros before including  */
   /*   To do so, you have to define the following macros before including  */
-  /*   this file:                                                          */
+  /*   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     */
-  /*     (see below).                                                      */
+  /*   {                                                                   */
+  /*     FT_ERROR_START_LIST                                               */
+  /*   }                                                                   */
   /*                                                                       */
   /*                                                                       */
-  /*   FT_ERROR_DEF( e, v, s ) ::                                          */
-  /*     This macro is called to define one single error.                  */
-  /*     `e' is the error code identifier (e.g. FT_Err_Invalid_Argument).  */
-  /*     `v' is the error numerical value.                                 */
-  /*     `s' is the corresponding error string.                            */
+  /*   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_END_LIST ::                                                */
-  /*     This macro ends the list.                                         */
+  /*   {                                                                   */
+  /*     FT_ERROR_DEF( e, v, s )                                           */
+  /*   }                                                                   */
   /*                                                                       */
   /*                                                                       */
-  /*   Additionally, you have to undefine __FTERRORS_H__ before #including */
+  /*   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.                                                          */
   /*   this file.                                                          */
   /*                                                                       */
   /*                                                                       */
-  /*   Here is a simple example:                                           */
+  /*   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                                                      */
   /*     {                                                                 */
   /*     {                                                                 */
-  /*       #undef __FTERRORS_H__                                           */
-  /*       #define FT_ERRORDEF( e, v, s )  { e, s },                       */
-  /*       #define FT_ERROR_START_LIST     {                               */
-  /*       #define FT_ERROR_END_LIST       { 0, 0 } };                     */
+  /*       int          err_code;                                          */
+  /*       const char*  err_msg;                                           */
+  /*     } ft_errors[] =                                                   */
   /*                                                                       */
   /*                                                                       */
-  /*       const struct                                                    */
-  /*       {                                                               */
-  /*         int          err_code;                                        */
-  /*         const char*  err_msg;                                         */
-  /*       } ft_errors[] =                                                 */
+  /*     #include FT_ERRORS_H                                              */
+  /*   }                                                                   */
   /*                                                                       */
   /*                                                                       */
-  /*       #include FT_ERRORS_H                                            */
-  /*     }                                                                 */
+  /*   Note that `FT_Err_Ok' is _not_ defined with `FT_ERRORDEF' but with  */
+  /*   `FT_NOERRORDEF'; it is always zero.                                 */
   /*                                                                       */
   /*                                                                       */
   /*************************************************************************/
   /*************************************************************************/
 
 
-
-#ifndef __FTERRORS_H__
+  /* */
+
+  /* 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 backwards compatibility.                                 */
+  /*                                                                   */
+#if !( defined( FTERRORS_H_ ) && defined ( __FTERRORS_H__ ) )
+#define FTERRORS_H_
 #define __FTERRORS_H__
 #define __FTERRORS_H__
 
 
 
 
@@ -192,7 +220,7 @@
 #undef FT_ERR_PREFIX
 #undef FT_ERR_PREFIX
 #endif
 #endif
 
 
-#endif /* __FTERRORS_H__ */
+#endif /* !(FTERRORS_H_ && __FTERRORS_H__) */
 
 
 
 
 /* END */
 /* END */

+ 95 - 0
Source/ThirdParty/FreeType/include/freetype/ftfntfmt.h

@@ -0,0 +1,95 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftfntfmt.h                                                             */
+/*                                                                         */
+/*    Support functions for font formats.                                  */
+/*                                                                         */
+/*  Copyright 2002-2016 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_
+#define FTFNTFMT_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>                                                             */
+  /*   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 );
+
+
+  /* deprecated */
+  FT_EXPORT( const char* )
+  FT_Get_X11_Font_Format( FT_Face  face );
+
+
+  /* */
+
+
+FT_END_HEADER
+
+#endif /* FTFNTFMT_H_ */
+
+
+/* END */

+ 6 - 5
Source/ThirdParty/FreeType/include/freetype/ftgasp.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    Access of TrueType's `gasp' table (specification).                   */
 /*    Access of TrueType's `gasp' table (specification).                   */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2007, 2008, 2011 by                                          */
+/*  Copyright 2007-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -16,8 +16,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef _FT_GASP_H_
-#define _FT_GASP_H_
+#ifndef FTGASP_H_
+#define FTGASP_H_
 
 
 #include <ft2build.h>
 #include <ft2build.h>
 #include FT_FREETYPE_H
 #include FT_FREETYPE_H
@@ -120,9 +120,10 @@
   FT_Get_Gasp( FT_Face  face,
   FT_Get_Gasp( FT_Face  face,
                FT_UInt  ppem );
                FT_UInt  ppem );
 
 
-/* */
+  /* */
 
 
-#endif /* _FT_GASP_H_ */
+
+#endif /* FTGASP_H_ */
 
 
 
 
 /* END */
 /* END */

+ 6 - 21
Source/ThirdParty/FreeType/include/freetype/ftglyph.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType convenience functions to handle glyphs (specification).     */
 /*    FreeType convenience functions to handle glyphs (specification).     */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2003, 2006, 2008, 2009, 2011, 2013 by                   */
+/*  Copyright 1996-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -29,8 +29,8 @@
   /*************************************************************************/
   /*************************************************************************/
 
 
 
 
-#ifndef __FTGLYPH_H__
-#define __FTGLYPH_H__
+#ifndef FTGLYPH_H_
+#define FTGLYPH_H_
 
 
 
 
 #include <ft2build.h>
 #include <ft2build.h>
@@ -325,22 +325,8 @@ FT_BEGIN_HEADER
   } FT_Glyph_BBox_Mode;
   } FT_Glyph_BBox_Mode;
 
 
 
 
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Enum>                                                                */
-  /*    ft_glyph_bbox_xxx                                                  */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    These constants are deprecated.  Use the corresponding             */
-  /*    @FT_Glyph_BBox_Mode values instead.                                */
-  /*                                                                       */
-  /* <Values>                                                              */
-  /*   ft_glyph_bbox_unscaled  :: See @FT_GLYPH_BBOX_UNSCALED.             */
-  /*   ft_glyph_bbox_subpixels :: See @FT_GLYPH_BBOX_SUBPIXELS.            */
-  /*   ft_glyph_bbox_gridfit   :: See @FT_GLYPH_BBOX_GRIDFIT.              */
-  /*   ft_glyph_bbox_truncate  :: See @FT_GLYPH_BBOX_TRUNCATE.             */
-  /*   ft_glyph_bbox_pixels    :: See @FT_GLYPH_BBOX_PIXELS.               */
-  /*                                                                       */
+  /* these constants are deprecated; use the corresponding */
+  /* `FT_Glyph_BBox_Mode' values instead                   */
 #define ft_glyph_bbox_unscaled   FT_GLYPH_BBOX_UNSCALED
 #define ft_glyph_bbox_unscaled   FT_GLYPH_BBOX_UNSCALED
 #define ft_glyph_bbox_subpixels  FT_GLYPH_BBOX_SUBPIXELS
 #define ft_glyph_bbox_subpixels  FT_GLYPH_BBOX_SUBPIXELS
 #define ft_glyph_bbox_gridfit    FT_GLYPH_BBOX_GRIDFIT
 #define ft_glyph_bbox_gridfit    FT_GLYPH_BBOX_GRIDFIT
@@ -603,13 +589,12 @@ FT_BEGIN_HEADER
   FT_EXPORT( FT_Error )
   FT_EXPORT( FT_Error )
   FT_Matrix_Invert( FT_Matrix*  matrix );
   FT_Matrix_Invert( FT_Matrix*  matrix );
 
 
-
   /* */
   /* */
 
 
 
 
 FT_END_HEADER
 FT_END_HEADER
 
 
-#endif /* __FTGLYPH_H__ */
+#endif /* FTGLYPH_H_ */
 
 
 
 
 /* END */
 /* END */

+ 16 - 17
Source/ThirdParty/FreeType/include/freetype/ftgxval.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType API for validating TrueTypeGX/AAT tables (specification).   */
 /*    FreeType API for validating TrueTypeGX/AAT tables (specification).   */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2004-2006, 2013 by                                           */
+/*  Copyright 2004-2016 by                                                 */
 /*  Masatake YAMATO, Redhat K.K,                                           */
 /*  Masatake YAMATO, Redhat K.K,                                           */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
@@ -25,8 +25,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __FTGXVAL_H__
-#define __FTGXVAL_H__
+#ifndef FTGXVAL_H_
+#define FTGXVAL_H_
 
 
 #include <ft2build.h>
 #include <ft2build.h>
 #include FT_FREETYPE_H
 #include FT_FREETYPE_H
@@ -57,9 +57,19 @@ FT_BEGIN_HEADER
   /*    some TrueTypeGX tables (feat, mort, morx, bsln, just, kern, opbd,  */
   /*    some TrueTypeGX tables (feat, mort, morx, bsln, just, kern, opbd,  */
   /*    trak, prop, lcar).                                                 */
   /*    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                                               */
+  /*                                                                       */
   /*************************************************************************/
   /*************************************************************************/
 
 
-
   /*************************************************************************/
   /*************************************************************************/
   /*                                                                       */
   /*                                                                       */
   /*                                                                       */
   /*                                                                       */
@@ -171,8 +181,6 @@ FT_BEGIN_HEADER
                           FT_VALIDATE_lcar )
                           FT_VALIDATE_lcar )
 
 
 
 
-  /* */
-
  /**********************************************************************
  /**********************************************************************
   *
   *
   * @function:
   * @function:
@@ -221,8 +229,6 @@ FT_BEGIN_HEADER
                           FT_UInt   table_length );
                           FT_UInt   table_length );
 
 
 
 
-  /* */
-
  /**********************************************************************
  /**********************************************************************
   *
   *
   * @function:
   * @function:
@@ -248,8 +254,6 @@ FT_BEGIN_HEADER
                       FT_Bytes  table );
                       FT_Bytes  table );
 
 
 
 
-  /* */
-
  /**********************************************************************
  /**********************************************************************
   *
   *
   * @enum:
   * @enum:
@@ -277,8 +281,6 @@ FT_BEGIN_HEADER
 #define FT_VALIDATE_CKERN  ( FT_VALIDATE_MS | FT_VALIDATE_APPLE )
 #define FT_VALIDATE_CKERN  ( FT_VALIDATE_MS | FT_VALIDATE_APPLE )
 
 
 
 
-  /* */
-
  /**********************************************************************
  /**********************************************************************
   *
   *
   * @function:
   * @function:
@@ -320,8 +322,6 @@ FT_BEGIN_HEADER
                            FT_Bytes  *ckern_table );
                            FT_Bytes  *ckern_table );
 
 
 
 
-  /* */
-
  /**********************************************************************
  /**********************************************************************
   *
   *
   * @function:
   * @function:
@@ -346,13 +346,12 @@ FT_BEGIN_HEADER
   FT_ClassicKern_Free( FT_Face   face,
   FT_ClassicKern_Free( FT_Face   face,
                        FT_Bytes  table );
                        FT_Bytes  table );
 
 
-
- /* */
+  /* */
 
 
 
 
 FT_END_HEADER
 FT_END_HEADER
 
 
-#endif /* __FTGXVAL_H__ */
+#endif /* FTGXVAL_H_ */
 
 
 
 
 /* END */
 /* END */

+ 10 - 11
Source/ThirdParty/FreeType/include/freetype/ftgzip.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    Gzip-compressed stream support.                                      */
 /*    Gzip-compressed stream support.                                      */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2002-2004, 2006, 2013 by                                     */
+/*  Copyright 2002-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -16,8 +16,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __FTGZIP_H__
-#define __FTGZIP_H__
+#ifndef FTGZIP_H_
+#define FTGZIP_H_
 
 
 #include <ft2build.h>
 #include <ft2build.h>
 #include FT_FREETYPE_H
 #include FT_FREETYPE_H
@@ -117,11 +117,11 @@ FT_BEGIN_HEADER
   *
   *
   * @inout:
   * @inout:
   *   output_len ::
   *   output_len ::
-  *     Before calling the function, this is the 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'.
+  *     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:
   * @return:
   *   FreeType error code.  0~means success.
   *   FreeType error code.  0~means success.
@@ -137,13 +137,12 @@ FT_BEGIN_HEADER
                       const FT_Byte*  input,
                       const FT_Byte*  input,
                       FT_ULong        input_len );
                       FT_ULong        input_len );
 
 
-
- /* */
+  /* */
 
 
 
 
 FT_END_HEADER
 FT_END_HEADER
 
 
-#endif /* __FTGZIP_H__ */
+#endif /* FTGZIP_H_ */
 
 
 
 
 /* END */
 /* END */

+ 66 - 183
Source/ThirdParty/FreeType/include/freetype/ftimage.h

@@ -5,7 +5,7 @@
 /*    FreeType glyph image formats and default raster interface            */
 /*    FreeType glyph image formats and default raster interface            */
 /*    (specification).                                                     */
 /*    (specification).                                                     */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2010, 2013 by                                           */
+/*  Copyright 1996-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -24,12 +24,12 @@
   /*************************************************************************/
   /*************************************************************************/
 
 
 
 
-#ifndef __FTIMAGE_H__
-#define __FTIMAGE_H__
+#ifndef FTIMAGE_H_
+#define FTIMAGE_H_
 
 
 
 
-  /* _STANDALONE_ is from ftgrays.c */
-#ifndef _STANDALONE_
+  /* STANDALONE_ is from ftgrays.c */
+#ifndef STANDALONE_
 #include <ft2build.h>
 #include <ft2build.h>
 #endif
 #endif
 
 
@@ -193,67 +193,14 @@ FT_BEGIN_HEADER
   } FT_Pixel_Mode;
   } FT_Pixel_Mode;
 
 
 
 
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Enum>                                                                */
-  /*    ft_pixel_mode_xxx                                                  */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A list of deprecated constants.  Use the corresponding             */
-  /*    @FT_Pixel_Mode values instead.                                     */
-  /*                                                                       */
-  /* <Values>                                                              */
-  /*    ft_pixel_mode_none  :: See @FT_PIXEL_MODE_NONE.                    */
-  /*    ft_pixel_mode_mono  :: See @FT_PIXEL_MODE_MONO.                    */
-  /*    ft_pixel_mode_grays :: See @FT_PIXEL_MODE_GRAY.                    */
-  /*    ft_pixel_mode_pal2  :: See @FT_PIXEL_MODE_GRAY2.                   */
-  /*    ft_pixel_mode_pal4  :: See @FT_PIXEL_MODE_GRAY4.                   */
-  /*                                                                       */
+  /* these constants are deprecated; use the corresponding `FT_Pixel_Mode' */
+  /* values instead.                                                       */
 #define ft_pixel_mode_none   FT_PIXEL_MODE_NONE
 #define ft_pixel_mode_none   FT_PIXEL_MODE_NONE
 #define ft_pixel_mode_mono   FT_PIXEL_MODE_MONO
 #define ft_pixel_mode_mono   FT_PIXEL_MODE_MONO
 #define ft_pixel_mode_grays  FT_PIXEL_MODE_GRAY
 #define ft_pixel_mode_grays  FT_PIXEL_MODE_GRAY
 #define ft_pixel_mode_pal2   FT_PIXEL_MODE_GRAY2
 #define ft_pixel_mode_pal2   FT_PIXEL_MODE_GRAY2
 #define ft_pixel_mode_pal4   FT_PIXEL_MODE_GRAY4
 #define ft_pixel_mode_pal4   FT_PIXEL_MODE_GRAY4
 
 
- /* */
-
-#if 0
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Enum>                                                                */
-  /*    FT_Palette_Mode                                                    */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    THIS TYPE IS DEPRECATED.  DO NOT USE IT!                           */
-  /*                                                                       */
-  /*    An enumeration type to describe the format of a bitmap palette,    */
-  /*    used with ft_pixel_mode_pal4 and ft_pixel_mode_pal8.               */
-  /*                                                                       */
-  /* <Values>                                                              */
-  /*    ft_palette_mode_rgb  :: The palette is an array of 3-byte RGB      */
-  /*                            records.                                   */
-  /*                                                                       */
-  /*    ft_palette_mode_rgba :: The palette is an array of 4-byte RGBA     */
-  /*                            records.                                   */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    As ft_pixel_mode_pal2, pal4 and pal8 are currently unused by       */
-  /*    FreeType, these types are not handled by the library itself.       */
-  /*                                                                       */
-  typedef enum  FT_Palette_Mode_
-  {
-    ft_palette_mode_rgb = 0,
-    ft_palette_mode_rgba,
-
-    ft_palette_mode_max   /* do not remove */
-
-  } FT_Palette_Mode;
-
-  /* */
-
-#endif
-
 
 
   /*************************************************************************/
   /*************************************************************************/
   /*                                                                       */
   /*                                                                       */
@@ -311,20 +258,15 @@ FT_BEGIN_HEADER
   /*                    field is intended for paletted pixel modes.  Not   */
   /*                    field is intended for paletted pixel modes.  Not   */
   /*                    used currently.                                    */
   /*                    used currently.                                    */
   /*                                                                       */
   /*                                                                       */
-  /* <Note>                                                                */
-  /*   For now, the only pixel modes supported by FreeType are mono and    */
-  /*   grays.  However, drivers might be added in the future to support    */
-  /*   more `colorful' options.                                            */
-  /*                                                                       */
   typedef struct  FT_Bitmap_
   typedef struct  FT_Bitmap_
   {
   {
-    int             rows;
-    int             width;
+    unsigned int    rows;
+    unsigned int    width;
     int             pitch;
     int             pitch;
     unsigned char*  buffer;
     unsigned char*  buffer;
-    short           num_grays;
-    char            pixel_mode;
-    char            palette_mode;
+    unsigned short  num_grays;
+    unsigned char   pixel_mode;
+    unsigned char   palette_mode;
     void*           palette;
     void*           palette;
 
 
   } FT_Bitmap;
   } FT_Bitmap;
@@ -381,7 +323,7 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /*                                                                       */
   /*    flags      :: A set of bit flags used to characterize the outline  */
   /*    flags      :: A set of bit flags used to characterize the outline  */
   /*                  and give hints to the scan-converter and hinter on   */
   /*                  and give hints to the scan-converter and hinter on   */
-  /*                  how to convert/grid-fit it.  See @FT_OUTLINE_FLAGS.  */
+  /*                  how to convert/grid-fit it.  See @FT_OUTLINE_XXX.    */
   /*                                                                       */
   /*                                                                       */
   /* <Note>                                                                */
   /* <Note>                                                                */
   /*    The B/W rasterizer only checks bit~2 in the `tags' array for the   */
   /*    The B/W rasterizer only checks bit~2 in the `tags' array for the   */
@@ -402,6 +344,8 @@ FT_BEGIN_HEADER
 
 
   } FT_Outline;
   } FT_Outline;
 
 
+  /* */
+
   /* Following limits must be consistent with */
   /* Following limits must be consistent with */
   /* FT_Outline.{n_contours,n_points}         */
   /* FT_Outline.{n_contours,n_points}         */
 #define FT_OUTLINE_CONTOURS_MAX  SHRT_MAX
 #define FT_OUTLINE_CONTOURS_MAX  SHRT_MAX
@@ -411,7 +355,7 @@ FT_BEGIN_HEADER
   /*************************************************************************/
   /*************************************************************************/
   /*                                                                       */
   /*                                                                       */
   /* <Enum>                                                                */
   /* <Enum>                                                                */
-  /*    FT_OUTLINE_FLAGS                                                   */
+  /*    FT_OUTLINE_XXX                                                     */
   /*                                                                       */
   /*                                                                       */
   /* <Description>                                                         */
   /* <Description>                                                         */
   /*    A list of bit-field constants use for the flags in an outline's    */
   /*    A list of bit-field constants use for the flags in an outline's    */
@@ -492,24 +436,8 @@ FT_BEGIN_HEADER
 #define FT_OUTLINE_SINGLE_PASS      0x200
 #define FT_OUTLINE_SINGLE_PASS      0x200
 
 
 
 
- /*************************************************************************
-  *
-  * @enum:
-  *   ft_outline_flags
-  *
-  * @description:
-  *   These constants are deprecated.  Please use the corresponding
-  *   @FT_OUTLINE_FLAGS values.
-  *
-  * @values:
-  *   ft_outline_none            :: See @FT_OUTLINE_NONE.
-  *   ft_outline_owner           :: See @FT_OUTLINE_OWNER.
-  *   ft_outline_even_odd_fill   :: See @FT_OUTLINE_EVEN_ODD_FILL.
-  *   ft_outline_reverse_fill    :: See @FT_OUTLINE_REVERSE_FILL.
-  *   ft_outline_ignore_dropouts :: See @FT_OUTLINE_IGNORE_DROPOUTS.
-  *   ft_outline_high_precision  :: See @FT_OUTLINE_HIGH_PRECISION.
-  *   ft_outline_single_pass     :: See @FT_OUTLINE_SINGLE_PASS.
-  */
+  /* these constants are deprecated; use the corresponding */
+  /* `FT_OUTLINE_XXX' values instead                       */
 #define ft_outline_none             FT_OUTLINE_NONE
 #define ft_outline_none             FT_OUTLINE_NONE
 #define ft_outline_owner            FT_OUTLINE_OWNER
 #define ft_outline_owner            FT_OUTLINE_OWNER
 #define ft_outline_even_odd_fill    FT_OUTLINE_EVEN_ODD_FILL
 #define ft_outline_even_odd_fill    FT_OUTLINE_EVEN_ODD_FILL
@@ -796,22 +724,8 @@ FT_BEGIN_HEADER
   } FT_Glyph_Format;
   } FT_Glyph_Format;
 
 
 
 
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Enum>                                                                */
-  /*    ft_glyph_format_xxx                                                */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A list of deprecated constants.  Use the corresponding             */
-  /*    @FT_Glyph_Format values instead.                                   */
-  /*                                                                       */
-  /* <Values>                                                              */
-  /*    ft_glyph_format_none      :: See @FT_GLYPH_FORMAT_NONE.            */
-  /*    ft_glyph_format_composite :: See @FT_GLYPH_FORMAT_COMPOSITE.       */
-  /*    ft_glyph_format_bitmap    :: See @FT_GLYPH_FORMAT_BITMAP.          */
-  /*    ft_glyph_format_outline   :: See @FT_GLYPH_FORMAT_OUTLINE.         */
-  /*    ft_glyph_format_plotter   :: See @FT_GLYPH_FORMAT_PLOTTER.         */
-  /*                                                                       */
+  /* these constants are deprecated; use the corresponding */
+  /* `FT_Glyph_Format' values instead.                     */
 #define ft_glyph_format_none       FT_GLYPH_FORMAT_NONE
 #define ft_glyph_format_none       FT_GLYPH_FORMAT_NONE
 #define ft_glyph_format_composite  FT_GLYPH_FORMAT_COMPOSITE
 #define ft_glyph_format_composite  FT_GLYPH_FORMAT_COMPOSITE
 #define ft_glyph_format_bitmap     FT_GLYPH_FORMAT_BITMAP
 #define ft_glyph_format_bitmap     FT_GLYPH_FORMAT_BITMAP
@@ -833,11 +747,11 @@ FT_BEGIN_HEADER
   /*************************************************************************/
   /*************************************************************************/
   /*                                                                       */
   /*                                                                       */
   /* A raster is a scan converter, in charge of rendering an outline into  */
   /* A raster is a scan converter, in charge of rendering an outline into  */
-  /* a a bitmap.  This section contains the public API for rasters.        */
+  /* a bitmap.  This section contains the public API for rasters.          */
   /*                                                                       */
   /*                                                                       */
   /* Note that in FreeType 2, all rasters are now encapsulated within      */
   /* Note that in FreeType 2, all rasters are now encapsulated within      */
-  /* specific modules called `renderers'.  See `freetype/ftrender.h' for   */
-  /* more details on renderers.                                            */
+  /* specific modules called `renderers'.  See `ftrender.h' for more       */
+  /* details on renderers.                                                 */
   /*                                                                       */
   /*                                                                       */
   /*************************************************************************/
   /*************************************************************************/
 
 
@@ -856,6 +770,21 @@ FT_BEGIN_HEADER
   /* <Description>                                                         */
   /* <Description>                                                         */
   /*    This section contains technical definitions.                       */
   /*    This section contains technical definitions.                       */
   /*                                                                       */
   /*                                                                       */
+  /* <Order>                                                               */
+  /*    FT_Raster                                                          */
+  /*    FT_Span                                                            */
+  /*    FT_SpanFunc                                                        */
+  /*                                                                       */
+  /*    FT_Raster_Params                                                   */
+  /*    FT_RASTER_FLAG_XXX                                                 */
+  /*                                                                       */
+  /*    FT_Raster_NewFunc                                                  */
+  /*    FT_Raster_DoneFunc                                                 */
+  /*    FT_Raster_ResetFunc                                                */
+  /*    FT_Raster_SetModeFunc                                              */
+  /*    FT_Raster_RenderFunc                                               */
+  /*    FT_Raster_Funcs                                                    */
+  /*                                                                       */
   /*************************************************************************/
   /*************************************************************************/
 
 
 
 
@@ -865,8 +794,8 @@ FT_BEGIN_HEADER
   /*    FT_Raster                                                          */
   /*    FT_Raster                                                          */
   /*                                                                       */
   /*                                                                       */
   /* <Description>                                                         */
   /* <Description>                                                         */
-  /*    A handle (pointer) to a raster object.  Each object can be used    */
-  /*    independently to convert an outline into a bitmap or pixmap.       */
+  /*    An opaque handle (pointer) to a raster object.  Each object can be */
+  /*    used independently to convert an outline into a bitmap or pixmap.  */
   /*                                                                       */
   /*                                                                       */
   typedef struct FT_RasterRec_*  FT_Raster;
   typedef struct FT_RasterRec_*  FT_Raster;
 
 
@@ -877,8 +806,8 @@ FT_BEGIN_HEADER
   /*    FT_Span                                                            */
   /*    FT_Span                                                            */
   /*                                                                       */
   /*                                                                       */
   /* <Description>                                                         */
   /* <Description>                                                         */
-  /*    A structure used to model a single span of gray (or black) pixels  */
-  /*    when rendering a monochrome or anti-aliased bitmap.                */
+  /*    A structure used to model a single span of gray pixels when        */
+  /*    rendering an anti-aliased bitmap.                                  */
   /*                                                                       */
   /*                                                                       */
   /* <Fields>                                                              */
   /* <Fields>                                                              */
   /*    x        :: The span's horizontal start position.                  */
   /*    x        :: The span's horizontal start position.                  */
@@ -886,8 +815,7 @@ FT_BEGIN_HEADER
   /*    len      :: The span's length in pixels.                           */
   /*    len      :: The span's length in pixels.                           */
   /*                                                                       */
   /*                                                                       */
   /*    coverage :: The span color/coverage, ranging from 0 (background)   */
   /*    coverage :: The span color/coverage, ranging from 0 (background)   */
-  /*                to 255 (foreground).  Only used for anti-aliased       */
-  /*                rendering.                                             */
+  /*                to 255 (foreground).                                   */
   /*                                                                       */
   /*                                                                       */
   /* <Note>                                                                */
   /* <Note>                                                                */
   /*    This structure is used by the span drawing callback type named     */
   /*    This structure is used by the span drawing callback type named     */
@@ -932,16 +860,6 @@ FT_BEGIN_HEADER
   /*    This can be used to write anti-aliased outlines directly to a      */
   /*    This can be used to write anti-aliased outlines directly to a      */
   /*    given background bitmap, and even perform translucency.            */
   /*    given background bitmap, and even perform translucency.            */
   /*                                                                       */
   /*                                                                       */
-  /*    Note that the `count' field cannot be greater than a fixed value   */
-  /*    defined by the `FT_MAX_GRAY_SPANS' configuration macro in          */
-  /*    `ftoption.h'.  By default, this value is set to~32, which means    */
-  /*    that if there are more than 32~spans on a given scanline, the      */
-  /*    callback is called several times with the same `y' parameter in    */
-  /*    order to draw all callbacks.                                       */
-  /*                                                                       */
-  /*    Otherwise, the callback is only called once per scan-line, and     */
-  /*    only for those scanlines that do have `gray' pixels on them.       */
-  /*                                                                       */
   typedef void
   typedef void
   (*FT_SpanFunc)( int             y,
   (*FT_SpanFunc)( int             y,
                   int             count,
                   int             count,
@@ -957,22 +875,7 @@ FT_BEGIN_HEADER
   /*    FT_Raster_BitTest_Func                                             */
   /*    FT_Raster_BitTest_Func                                             */
   /*                                                                       */
   /*                                                                       */
   /* <Description>                                                         */
   /* <Description>                                                         */
-  /*    THIS TYPE IS DEPRECATED.  DO NOT USE IT.                           */
-  /*                                                                       */
-  /*    A function used as a call-back by the monochrome scan-converter    */
-  /*    to test whether a given target pixel is already set to the drawing */
-  /*    `color'.  These tests are crucial to implement drop-out control    */
-  /*    per-se the TrueType spec.                                          */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    y     :: The pixel's y~coordinate.                                 */
-  /*                                                                       */
-  /*    x     :: The pixel's x~coordinate.                                 */
-  /*                                                                       */
-  /*    user  :: User-supplied data that is passed to the callback.        */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*   1~if the pixel is `set', 0~otherwise.                               */
+  /*    Deprecated, unimplemented.                                         */
   /*                                                                       */
   /*                                                                       */
   typedef int
   typedef int
   (*FT_Raster_BitTest_Func)( int    y,
   (*FT_Raster_BitTest_Func)( int    y,
@@ -986,21 +889,7 @@ FT_BEGIN_HEADER
   /*    FT_Raster_BitSet_Func                                              */
   /*    FT_Raster_BitSet_Func                                              */
   /*                                                                       */
   /*                                                                       */
   /* <Description>                                                         */
   /* <Description>                                                         */
-  /*    THIS TYPE IS DEPRECATED.  DO NOT USE IT.                           */
-  /*                                                                       */
-  /*    A function used as a call-back by the monochrome scan-converter    */
-  /*    to set an individual target pixel.  This is crucial to implement   */
-  /*    drop-out control according to the TrueType specification.          */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    y     :: The pixel's y~coordinate.                                 */
-  /*                                                                       */
-  /*    x     :: The pixel's x~coordinate.                                 */
-  /*                                                                       */
-  /*    user  :: User-supplied data that is passed to the callback.        */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    1~if the pixel is `set', 0~otherwise.                              */
+  /*    Deprecated, unimplemented.                                         */
   /*                                                                       */
   /*                                                                       */
   typedef void
   typedef void
   (*FT_Raster_BitSet_Func)( int    y,
   (*FT_Raster_BitSet_Func)( int    y,
@@ -1034,8 +923,8 @@ FT_BEGIN_HEADER
   /*                              pixmap's buffer _must_ be zeroed before  */
   /*                              pixmap's buffer _must_ be zeroed before  */
   /*                              rendering.                               */
   /*                              rendering.                               */
   /*                                                                       */
   /*                                                                       */
-  /*                              Note that for now, direct rendering is   */
-  /*                              only possible with anti-aliased glyphs.  */
+  /*                              Direct rendering is only possible with   */
+  /*                              anti-aliased glyphs.                     */
   /*                                                                       */
   /*                                                                       */
   /*    FT_RASTER_FLAG_CLIP    :: This flag is only used in direct         */
   /*    FT_RASTER_FLAG_CLIP    :: This flag is only used in direct         */
   /*                              rendering mode.  If set, the output will */
   /*                              rendering mode.  If set, the output will */
@@ -1053,7 +942,8 @@ FT_BEGIN_HEADER
 #define FT_RASTER_FLAG_DIRECT   0x2
 #define FT_RASTER_FLAG_DIRECT   0x2
 #define FT_RASTER_FLAG_CLIP     0x4
 #define FT_RASTER_FLAG_CLIP     0x4
 
 
-  /* deprecated */
+  /* these constants are deprecated; use the corresponding */
+  /* `FT_RASTER_FLAG_XXX' values instead                   */
 #define ft_raster_flag_default  FT_RASTER_FLAG_DEFAULT
 #define ft_raster_flag_default  FT_RASTER_FLAG_DEFAULT
 #define ft_raster_flag_aa       FT_RASTER_FLAG_AA
 #define ft_raster_flag_aa       FT_RASTER_FLAG_AA
 #define ft_raster_flag_direct   FT_RASTER_FLAG_DIRECT
 #define ft_raster_flag_direct   FT_RASTER_FLAG_DIRECT
@@ -1079,11 +969,11 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /*                                                                       */
   /*    gray_spans  :: The gray span drawing callback.                     */
   /*    gray_spans  :: The gray span drawing callback.                     */
   /*                                                                       */
   /*                                                                       */
-  /*    black_spans :: The black span drawing callback.  UNIMPLEMENTED!    */
+  /*    black_spans :: Unused.                                             */
   /*                                                                       */
   /*                                                                       */
-  /*    bit_test    :: The bit test callback.  UNIMPLEMENTED!              */
+  /*    bit_test    :: Unused.                                             */
   /*                                                                       */
   /*                                                                       */
-  /*    bit_set     :: The bit set callback.  UNIMPLEMENTED!               */
+  /*    bit_set     :: Unused.                                             */
   /*                                                                       */
   /*                                                                       */
   /*    user        :: User-supplied data that is passed to each drawing   */
   /*    user        :: User-supplied data that is passed to each drawing   */
   /*                   callback.                                           */
   /*                   callback.                                           */
@@ -1100,15 +990,9 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /*                                                                       */
   /*    If the @FT_RASTER_FLAG_DIRECT bit flag is set in `flags', the      */
   /*    If the @FT_RASTER_FLAG_DIRECT bit flag is set in `flags', the      */
   /*    raster will call the `gray_spans' callback to draw gray pixel      */
   /*    raster will call the `gray_spans' callback to draw gray pixel      */
-  /*    spans, in the case of an aa glyph bitmap, it will call             */
-  /*    `black_spans', and `bit_test' and `bit_set' in the case of a       */
-  /*    monochrome bitmap.  This allows direct composition over a          */
-  /*    pre-existing bitmap through user-provided callbacks to perform the */
-  /*    span drawing/composition.                                          */
-  /*                                                                       */
-  /*    Note that the `bit_test' and `bit_set' callbacks are required when */
-  /*    rendering a monochrome bitmap, as they are crucial to implement    */
-  /*    correct drop-out control as defined in the TrueType specification. */
+  /*    spans.  This allows direct composition over a pre-existing bitmap  */
+  /*    through user-provided callbacks to perform the span drawing and    */
+  /*    composition.    Not supported by the monochrome rasterizer.        */
   /*                                                                       */
   /*                                                                       */
   typedef struct  FT_Raster_Params_
   typedef struct  FT_Raster_Params_
   {
   {
@@ -1116,9 +1000,9 @@ FT_BEGIN_HEADER
     const void*             source;
     const void*             source;
     int                     flags;
     int                     flags;
     FT_SpanFunc             gray_spans;
     FT_SpanFunc             gray_spans;
-    FT_SpanFunc             black_spans;  /* doesn't work! */
-    FT_Raster_BitTest_Func  bit_test;     /* doesn't work! */
-    FT_Raster_BitSet_Func   bit_set;      /* doesn't work! */
+    FT_SpanFunc             black_spans;  /* unused */
+    FT_Raster_BitTest_Func  bit_test;     /* unused */
+    FT_Raster_BitSet_Func   bit_set;      /* unused */
     void*                   user;
     void*                   user;
     FT_BBox                 clip_box;
     FT_BBox                 clip_box;
 
 
@@ -1179,10 +1063,10 @@ FT_BEGIN_HEADER
   /*    FT_Raster_ResetFunc                                                */
   /*    FT_Raster_ResetFunc                                                */
   /*                                                                       */
   /*                                                                       */
   /* <Description>                                                         */
   /* <Description>                                                         */
-  /*    FreeType provides an area of memory called the `render pool',      */
-  /*    available to all registered rasters.  This pool can be freely used */
-  /*    during a given scan-conversion but is shared by all rasters.  Its  */
-  /*    content is thus transient.                                         */
+  /*    FreeType used to provide an area of memory called the `render      */
+  /*    pool' available to all registered rasters.  This was not thread    */
+  /*    safe however and now FreeType never allocates this pool.  NULL     */
+  /*    is always passed in as pool_base.                                  */
   /*                                                                       */
   /*                                                                       */
   /*    This function is called each time the render pool changes, or just */
   /*    This function is called each time the render pool changes, or just */
   /*    after a new raster object is created.                              */
   /*    after a new raster object is created.                              */
@@ -1195,10 +1079,9 @@ FT_BEGIN_HEADER
   /*    pool_size :: The size in bytes of the render pool.                 */
   /*    pool_size :: The size in bytes of the render pool.                 */
   /*                                                                       */
   /*                                                                       */
   /* <Note>                                                                */
   /* <Note>                                                                */
-  /*    Rasters can ignore the render pool and rely on dynamic memory      */
+  /*    Rasters should ignore the render pool and rely on dynamic or stack */
   /*    allocation if they want to (a handle to the memory allocator is    */
   /*    allocation if they want to (a handle to the memory allocator is    */
-  /*    passed to the raster constructor).  However, this is not           */
-  /*    recommended for efficiency purposes.                               */
+  /*    passed to the raster constructor).                                 */
   /*                                                                       */
   /*                                                                       */
   typedef void
   typedef void
   (*FT_Raster_ResetFunc)( FT_Raster       raster,
   (*FT_Raster_ResetFunc)( FT_Raster       raster,
@@ -1297,6 +1180,7 @@ FT_BEGIN_HEADER
   typedef struct  FT_Raster_Funcs_
   typedef struct  FT_Raster_Funcs_
   {
   {
     FT_Glyph_Format        glyph_format;
     FT_Glyph_Format        glyph_format;
+
     FT_Raster_NewFunc      raster_new;
     FT_Raster_NewFunc      raster_new;
     FT_Raster_ResetFunc    raster_reset;
     FT_Raster_ResetFunc    raster_reset;
     FT_Raster_SetModeFunc  raster_set_mode;
     FT_Raster_SetModeFunc  raster_set_mode;
@@ -1305,13 +1189,12 @@ FT_BEGIN_HEADER
 
 
   } FT_Raster_Funcs;
   } FT_Raster_Funcs;
 
 
-
   /* */
   /* */
 
 
 
 
 FT_END_HEADER
 FT_END_HEADER
 
 
-#endif /* __FTIMAGE_H__ */
+#endif /* FTIMAGE_H_ */
 
 
 
 
 /* END */
 /* END */

+ 6 - 5
Source/ThirdParty/FreeType/include/freetype/ftincrem.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType incremental loading (specification).                        */
 /*    FreeType incremental loading (specification).                        */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2002, 2003, 2006, 2007, 2008, 2010 by                        */
+/*  Copyright 2002-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -16,8 +16,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __FTINCREM_H__
-#define __FTINCREM_H__
+#ifndef FTINCREM_H_
+#define FTINCREM_H_
 
 
 #include <ft2build.h>
 #include <ft2build.h>
 #include FT_FREETYPE_H
 #include FT_FREETYPE_H
@@ -45,7 +45,7 @@ FT_BEGIN_HEADER
    * @description:
    * @description:
    *   This section contains various functions used to perform so-called
    *   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,
+   *   from a given @FT_Face are provided by the client application.
    *
    *
    *   Apart from that, all other tables are loaded normally from the font
    *   Apart from that, all other tables are loaded normally from the font
    *   file.  This mode is useful when FreeType is used within another
    *   file.  This mode is useful when FreeType is used within another
@@ -345,9 +345,10 @@ FT_BEGIN_HEADER
 
 
   /* */
   /* */
 
 
+
 FT_END_HEADER
 FT_END_HEADER
 
 
-#endif /* __FTINCREM_H__ */
+#endif /* FTINCREM_H_ */
 
 
 
 
 /* END */
 /* END */

+ 111 - 76
Source/ThirdParty/FreeType/include/freetype/ftlcdfil.h

@@ -5,7 +5,7 @@
 /*    FreeType API for color filtering of subpixel bitmap glyphs           */
 /*    FreeType API for color filtering of subpixel bitmap glyphs           */
 /*    (specification).                                                     */
 /*    (specification).                                                     */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2006-2008, 2010, 2013 by                                     */
+/*  Copyright 2006-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -17,8 +17,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __FT_LCD_FILTER_H__
-#define __FT_LCD_FILTER_H__
+#ifndef FTLCDFIL_H_
+#define FTLCDFIL_H_
 
 
 #include <ft2build.h>
 #include <ft2build.h>
 #include FT_FREETYPE_H
 #include FT_FREETYPE_H
@@ -41,56 +41,91 @@ FT_BEGIN_HEADER
    *   LCD Filtering
    *   LCD Filtering
    *
    *
    * @abstract:
    * @abstract:
-   *   Reduce color fringes of LCD-optimized bitmaps.
+   *   Reduce color fringes of subpixel-rendered bitmaps.
    *
    *
    * @description:
    * @description:
-   *   The @FT_Library_SetLcdFilter API can be used to specify a low-pass
-   *   filter, which is then applied to LCD-optimized bitmaps generated
-   *   through @FT_Render_Glyph.  This is useful to reduce color fringes
-   *   that would occur with unfiltered rendering.
+   *   Subpixel 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.  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.
    *
    *
    *   Note that no filter is active by default, and that this function is
    *   Note that no filter is active by default, and that this function is
    *   *not* implemented in default builds of the library.  You need to
    *   *not* implemented in default builds of the library.  You need to
    *   #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING in your `ftoption.h' file
    *   #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING in your `ftoption.h' file
-   *   in order to activate it.
-   *
-   *   FreeType generates alpha coverage maps, which are linear by nature.
-   *   For instance, the value 0x80 in bitmap representation means that
-   *   (within numerical precision) 0x80/0xff fraction of that pixel is
-   *   covered by the glyph's outline.  The blending function for placing
-   *   text over a background is
-   *
-   *   {
-   *     dst = alpha * src + (1 - alpha) * dst    ,
-   *   }
-   *
-   *   which is known as OVER.  However, when calculating the output of the
-   *   OVER operator, the source colors should first be transformed to a
-   *   linear color space, then alpha blended in that space, and transformed
-   *   back to the output color space.
-   *
-   *   When linear light blending is used, the default FIR5 filtering
-   *   weights (as given by FT_LCD_FILTER_DEFAULT) are no longer optimal, as
-   *   they have been designed for black on white rendering while lacking
-   *   gamma correction.  To preserve color neutrality, weights for a FIR5
-   *   filter should be chosen according to two free parameters `a' and `c',
-   *   and the FIR weights should be
-   *
-   *   {
-   *     [a - c, a + c, 2 * a, a + c, a - c]    .
-   *   }
-   *
-   *   This formula generates equal weights for all the color primaries
-   *   across the filter kernel, which makes it colorless.  One suggested
-   *   set of weights is
-   *
-   *   {
-   *     [0x10, 0x50, 0x60, 0x50, 0x10]    ,
-   *   }
-   *
-   *   where `a' has value 0x30 and `b' value 0x20.  The weights in filter
-   *   may have a sum larger than 0x100, which increases coloration slightly
-   *   but also improves contrast.
+   *   in order to activate it and explicitly call @FT_Library_SetLcdFilter
+   *   to enable it.
+   *
+   *   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.
    */
    */
 
 
 
 
@@ -111,10 +146,23 @@ FT_BEGIN_HEADER
    *     The default filter reduces color fringes considerably, at the cost
    *     The default filter reduces color fringes considerably, at the cost
    *     of a slight blurriness in the output.
    *     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 ::
    *   FT_LCD_FILTER_LIGHT ::
-   *     The light filter is a variant that produces less blurriness at the
-   *     cost of slightly more color fringes than the default one.  It might
-   *     be better, depending on taste, your monitor, or your personal vision.
+   *     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_LEGACY ::
    *     This filter corresponds to the original libXft color filter.  It
    *     This filter corresponds to the original libXft color filter.  It
@@ -126,14 +174,23 @@ FT_BEGIN_HEADER
    *     This filter is only provided for comparison purposes, and might be
    *     This filter is only provided for comparison purposes, and might be
    *     disabled or stay unsupported in the future.
    *     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:
    * @since:
-   *   2.3.0
+   *   2.3.0 (`FT_LCD_FILTER_LEGACY1' since 2.6.2)
    */
    */
   typedef enum  FT_LcdFilter_
   typedef enum  FT_LcdFilter_
   {
   {
     FT_LCD_FILTER_NONE    = 0,
     FT_LCD_FILTER_NONE    = 0,
     FT_LCD_FILTER_DEFAULT = 1,
     FT_LCD_FILTER_DEFAULT = 1,
     FT_LCD_FILTER_LIGHT   = 2,
     FT_LCD_FILTER_LIGHT   = 2,
+    FT_LCD_FILTER_LEGACY1 = 3,
     FT_LCD_FILTER_LEGACY  = 16,
     FT_LCD_FILTER_LEGACY  = 16,
 
 
     FT_LCD_FILTER_MAX   /* do not remove */
     FT_LCD_FILTER_MAX   /* do not remove */
@@ -176,22 +233,6 @@ FT_BEGIN_HEADER
    *   defined in your build of the library, which should correspond to all
    *   defined in your build of the library, which should correspond to all
    *   default builds of FreeType.
    *   default builds of FreeType.
    *
    *
-   *   The filter affects glyph bitmaps rendered through @FT_Render_Glyph,
-   *   @FT_Outline_Get_Bitmap, @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 larger or taller than the dimensions of the corresponding
-   *   outline with regards to the pixel grid.  For example, for
-   *   @FT_RENDER_MODE_LCD, the filter adds up to 3~pixels to the left, and
-   *   up to 3~pixels to the right.
-   *
-   *   The bitmap offset values are adjusted correctly, so clients shouldn't
-   *   need to modify their layout and glyph positioning code when enabling
-   *   the filter.
-   *
    * @since:
    * @since:
    *   2.3.0
    *   2.3.0
    */
    */
@@ -206,11 +247,8 @@ FT_BEGIN_HEADER
    *   FT_Library_SetLcdFilterWeights
    *   FT_Library_SetLcdFilterWeights
    *
    *
    * @description:
    * @description:
-   *   Use this function to override the filter weights selected by
-   *   @FT_Library_SetLcdFilter.  By default, FreeType uses the quintuple
-   *   (0x00, 0x55, 0x56, 0x55, 0x00) for FT_LCD_FILTER_LIGHT, and (0x10,
-   *   0x40, 0x70, 0x40, 0x10) for FT_LCD_FILTER_DEFAULT and
-   *   FT_LCD_FILTER_LEGACY.
+   *   This function can be used to enable LCD filter with custom weights,
+   *   instead of using presets in @FT_Library_SetLcdFilter.
    *
    *
    * @input:
    * @input:
    *   library ::
    *   library ::
@@ -230,9 +268,6 @@ FT_BEGIN_HEADER
    *   defined in your build of the library, which should correspond to all
    *   defined in your build of the library, which should correspond to all
    *   default builds of FreeType.
    *   default builds of FreeType.
    *
    *
-   *   This function must be called after @FT_Library_SetLcdFilter to have
-   *   any effect.
-   *
    * @since:
    * @since:
    *   2.4.0
    *   2.4.0
    */
    */
@@ -245,7 +280,7 @@ FT_BEGIN_HEADER
 
 
 FT_END_HEADER
 FT_END_HEADER
 
 
-#endif /* __FT_LCD_FILTER_H__ */
+#endif /* FTLCDFIL_H_ */
 
 
 
 
 /* END */
 /* END */

+ 5 - 6
Source/ThirdParty/FreeType/include/freetype/ftlist.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    Generic list support for FreeType (specification).                   */
 /*    Generic list support for FreeType (specification).                   */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2001, 2003, 2007, 2010, 2013 by                         */
+/*  Copyright 1996-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -24,8 +24,8 @@
   /*************************************************************************/
   /*************************************************************************/
 
 
 
 
-#ifndef __FTLIST_H__
-#define __FTLIST_H__
+#ifndef FTLIST_H_
+#define FTLIST_H_
 
 
 
 
 #include <ft2build.h>
 #include <ft2build.h>
@@ -248,7 +248,7 @@ FT_BEGIN_HEADER
   /*    list    :: A handle to the list.                                   */
   /*    list    :: A handle to the list.                                   */
   /*                                                                       */
   /*                                                                       */
   /*    destroy :: A list destructor that will be applied to each element  */
   /*    destroy :: A list destructor that will be applied to each element  */
-  /*               of the list.                                            */
+  /*               of the list.  Set this to NULL if not needed.           */
   /*                                                                       */
   /*                                                                       */
   /*    memory  :: The current memory object that handles deallocation.    */
   /*    memory  :: The current memory object that handles deallocation.    */
   /*                                                                       */
   /*                                                                       */
@@ -265,13 +265,12 @@ FT_BEGIN_HEADER
                     FT_Memory           memory,
                     FT_Memory           memory,
                     void*               user );
                     void*               user );
 
 
-
   /* */
   /* */
 
 
 
 
 FT_END_HEADER
 FT_END_HEADER
 
 
-#endif /* __FTLIST_H__ */
+#endif /* FTLIST_H_ */
 
 
 
 
 /* END */
 /* END */

+ 5 - 5
Source/ThirdParty/FreeType/include/freetype/ftlzw.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    LZW-compressed stream support.                                       */
 /*    LZW-compressed stream support.                                       */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2004, 2006 by                                                */
+/*  Copyright 2004-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -16,8 +16,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __FTLZW_H__
-#define __FTLZW_H__
+#ifndef FTLZW_H_
+#define FTLZW_H_
 
 
 #include <ft2build.h>
 #include <ft2build.h>
 #include FT_FREETYPE_H
 #include FT_FREETYPE_H
@@ -88,12 +88,12 @@ FT_BEGIN_HEADER
   FT_Stream_OpenLZW( FT_Stream  stream,
   FT_Stream_OpenLZW( FT_Stream  stream,
                      FT_Stream  source );
                      FT_Stream  source );
 
 
- /* */
+  /* */
 
 
 
 
 FT_END_HEADER
 FT_END_HEADER
 
 
-#endif /* __FTLZW_H__ */
+#endif /* FTLZW_H_ */
 
 
 
 
 /* END */
 /* END */

+ 5 - 5
Source/ThirdParty/FreeType/include/freetype/ftmac.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    Additional Mac-specific API.                                         */
 /*    Additional Mac-specific API.                                         */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2001, 2004, 2006, 2007, 2013 by                         */
+/*  Copyright 1996-2016 by                                                 */
 /*  Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg.     */
 /*  Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg.     */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -18,15 +18,15 @@
 
 
 /***************************************************************************/
 /***************************************************************************/
 /*                                                                         */
 /*                                                                         */
-/* NOTE: Include this file after <freetype/freetype.h> and after any       */
+/* NOTE: Include this file after FT_FREETYPE_H and after any               */
 /*       Mac-specific headers (because this header uses Mac types such as  */
 /*       Mac-specific headers (because this header uses Mac types such as  */
 /*       Handle, FSSpec, FSRef, etc.)                                      */
 /*       Handle, FSSpec, FSRef, etc.)                                      */
 /*                                                                         */
 /*                                                                         */
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __FTMAC_H__
-#define __FTMAC_H__
+#ifndef FTMAC_H_
+#define FTMAC_H_
 
 
 
 
 #include <ft2build.h>
 #include <ft2build.h>
@@ -268,7 +268,7 @@ FT_BEGIN_HEADER
 FT_END_HEADER
 FT_END_HEADER
 
 
 
 
-#endif /* __FTMAC_H__ */
+#endif /* FTMAC_H_ */
 
 
 
 
 /* END */
 /* END */

+ 108 - 24
Source/ThirdParty/FreeType/include/freetype/ftmm.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType Multiple Master font interface (specification).             */
 /*    FreeType Multiple Master font interface (specification).             */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2001, 2003, 2004, 2006, 2009, 2013 by                   */
+/*  Copyright 1996-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -16,8 +16,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __FTMM_H__
-#define __FTMM_H__
+#ifndef FTMM_H_
+#define FTMM_H_
 
 
 
 
 #include <ft2build.h>
 #include <ft2build.h>
@@ -95,8 +95,8 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /*                                                                       */
   /*    num_designs :: Number of designs; should be normally 2^num_axis    */
   /*    num_designs :: Number of designs; should be normally 2^num_axis    */
   /*                   even though the Type~1 specification strangely      */
   /*                   even though the Type~1 specification strangely      */
-  /*                   allows for intermediate designs to be present. This */
-  /*                   number cannot exceed~16.                            */
+  /*                   allows for intermediate designs to be present.      */
+  /*                   This number cannot exceed~16.                       */
   /*                                                                       */
   /*                                                                       */
   /*    axis        :: A table of axis descriptors.                        */
   /*    axis        :: A table of axis descriptors.                        */
   /*                                                                       */
   /*                                                                       */
@@ -171,6 +171,7 @@ FT_BEGIN_HEADER
   {
   {
     FT_Fixed*  coords;
     FT_Fixed*  coords;
     FT_UInt    strid;
     FT_UInt    strid;
+    FT_UInt    psid;   /* since 2.7.1 */
 
 
   } FT_Var_Named_Style;
   } FT_Var_Named_Style;
 
 
@@ -195,17 +196,25 @@ FT_BEGIN_HEADER
   /*                       (where every glyph could have a different       */
   /*                       (where every glyph could have a different       */
   /*                       number of designs).                             */
   /*                       number of designs).                             */
   /*                                                                       */
   /*                                                                       */
-  /*    num_namedstyles :: The number of named styles; only meaningful for */
-  /*                       GX that allows certain design coordinates to    */
-  /*                       have a string ID (in the `name' table)          */
-  /*                       associated with them.  The font can tell the    */
-  /*                       user that, for example, Weight=1.5 is `Bold'.   */
+  /*    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'.               */
   /*                                                                       */
   /*                                                                       */
-  /*    axis            :: A table of axis descriptors.                    */
+  /*                       For Type 1 Multiple Masters fonts, this value   */
+  /*                       is always zero because the format does not      */
+  /*                       support named styles.                           */
+  /*                                                                       */
+  /*    axis            :: An axis descriptor table.                       */
   /*                       GX fonts contain slightly more data than MM.    */
   /*                       GX fonts contain slightly more data than MM.    */
+  /*                       Memory management of this pointer is done       */
+  /*                       internally by FreeType.                         */
   /*                                                                       */
   /*                                                                       */
-  /*    namedstyles     :: A table of named styles.                        */
+  /*    namedstyle      :: A named style table.                            */
   /*                       Only meaningful with GX.                        */
   /*                       Only meaningful with GX.                        */
+  /*                       Memory management of this pointer is done       */
+  /*                       internally by FreeType.                         */
   /*                                                                       */
   /*                                                                       */
   typedef struct  FT_MM_Var_
   typedef struct  FT_MM_Var_
   {
   {
@@ -218,9 +227,6 @@ FT_BEGIN_HEADER
   } FT_MM_Var;
   } FT_MM_Var;
 
 
 
 
-  /* */
-
-
   /*************************************************************************/
   /*************************************************************************/
   /*                                                                       */
   /*                                                                       */
   /* <Function>                                                            */
   /* <Function>                                                            */
@@ -258,7 +264,8 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /*                                                                       */
   /* <Output>                                                              */
   /* <Output>                                                              */
   /*    amaster :: The Multiple Masters/GX var descriptor.                 */
   /*    amaster :: The Multiple Masters/GX var descriptor.                 */
-  /*               Allocates a data structure, which the user must free.   */
+  /*               Allocates a data structure, which the user must         */
+  /*               deallocate with `free' after use.                       */
   /*                                                                       */
   /*                                                                       */
   /* <Return>                                                              */
   /* <Return>                                                              */
   /*    FreeType error code.  0~means success.                             */
   /*    FreeType error code.  0~means success.                             */
@@ -283,8 +290,10 @@ FT_BEGIN_HEADER
   /*    face       :: A handle to the source face.                         */
   /*    face       :: A handle to the source face.                         */
   /*                                                                       */
   /*                                                                       */
   /* <Input>                                                               */
   /* <Input>                                                               */
-  /*    num_coords :: The number of design coordinates (must be equal to   */
-  /*                  the number of axes in the font).                     */
+  /*    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.                      */
   /*    coords     :: An array of design coordinates.                      */
   /*                                                                       */
   /*                                                                       */
@@ -310,8 +319,10 @@ FT_BEGIN_HEADER
   /*    face       :: A handle to the source face.                         */
   /*    face       :: A handle to the source face.                         */
   /*                                                                       */
   /*                                                                       */
   /* <Input>                                                               */
   /* <Input>                                                               */
-  /*    num_coords :: The number of design coordinates (must be equal to   */
-  /*                  the number of axes in the font).                     */
+  /*    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.                      */
   /*    coords     :: An array of design coordinates.                      */
   /*                                                                       */
   /*                                                                       */
@@ -324,6 +335,34 @@ FT_BEGIN_HEADER
                                  FT_Fixed*  coords );
                                  FT_Fixed*  coords );
 
 
 
 
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Get_Var_Design_Coordinates                                      */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    For Multiple Master and GX Var fonts, get the design coordinates   */
+  /*    of the currently selected interpolated font.                       */
+  /*                                                                       */
+  /* <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.                             */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Get_Var_Design_Coordinates( FT_Face    face,
+                                 FT_UInt    num_coords,
+                                 FT_Fixed*  coords );
+
+
   /*************************************************************************/
   /*************************************************************************/
   /*                                                                       */
   /*                                                                       */
   /* <Function>                                                            */
   /* <Function>                                                            */
@@ -337,11 +376,14 @@ FT_BEGIN_HEADER
   /*    face       :: A handle to the source face.                         */
   /*    face       :: A handle to the source face.                         */
   /*                                                                       */
   /*                                                                       */
   /* <Input>                                                               */
   /* <Input>                                                               */
-  /*    num_coords :: The number of design coordinates (must be equal to   */
-  /*                  the number of axes in the font).                     */
+  /*    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   */
   /*    coords     :: The design coordinates array (each element must be   */
-  /*                  between 0 and 1.0).                                  */
+  /*                  between 0 and 1.0 for MM fonts, and between -1.0 and */
+  /*                  1.0 for GX var fonts).                               */
   /*                                                                       */
   /*                                                                       */
   /* <Return>                                                              */
   /* <Return>                                                              */
   /*    FreeType error code.  0~means success.                             */
   /*    FreeType error code.  0~means success.                             */
@@ -352,6 +394,35 @@ FT_BEGIN_HEADER
                                FT_Fixed*  coords );
                                FT_Fixed*  coords );
 
 
 
 
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Get_MM_Blend_Coordinates                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    For Multiple Masters and GX var fonts, get the normalized blend    */
+  /*    coordinates of the currently selected interpolated font.           */
+  /*                                                                       */
+  /* <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 MM fonts, and to~0  */
+  /*                  for GX var fonts.                                    */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    coords     :: The normalized blend coordinates array.              */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0~means success.                             */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Get_MM_Blend_Coordinates( FT_Face    face,
+                               FT_UInt    num_coords,
+                               FT_Fixed*  coords );
+
+
   /*************************************************************************/
   /*************************************************************************/
   /*                                                                       */
   /*                                                                       */
   /* <Function>                                                            */
   /* <Function>                                                            */
@@ -366,12 +437,25 @@ FT_BEGIN_HEADER
                                 FT_Fixed*  coords );
                                 FT_Fixed*  coords );
 
 
 
 
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Get_Var_Blend_Coordinates                                       */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This is another name of @FT_Get_MM_Blend_Coordinates.              */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Get_Var_Blend_Coordinates( FT_Face    face,
+                                FT_UInt    num_coords,
+                                FT_Fixed*  coords );
+
   /* */
   /* */
 
 
 
 
 FT_END_HEADER
 FT_END_HEADER
 
 
-#endif /* __FTMM_H__ */
+#endif /* FTMM_H_ */
 
 
 
 
 /* END */
 /* END */

+ 46 - 20
Source/ThirdParty/FreeType/include/freetype/ftmodapi.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType modules public interface (specification).                   */
 /*    FreeType modules public interface (specification).                   */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2003, 2006, 2008-2010, 2012, 2013 by                    */
+/*  Copyright 1996-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -16,8 +16,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __FTMODAPI_H__
-#define __FTMODAPI_H__
+#ifndef FTMODAPI_H_
+#define FTMODAPI_H_
 
 
 
 
 #include <ft2build.h>
 #include <ft2build.h>
@@ -63,7 +63,7 @@ FT_BEGIN_HEADER
   /*      psaux                                                            */
   /*      psaux                                                            */
   /*      pshinter                                                         */
   /*      pshinter                                                         */
   /*      psnames                                                          */
   /*      psnames                                                          */
-  /*      raster1, raster5                                                 */
+  /*      raster1                                                          */
   /*      sfnt                                                             */
   /*      sfnt                                                             */
   /*      smooth, smooth-lcd, smooth-lcdv                                  */
   /*      smooth, smooth-lcd, smooth-lcdv                                  */
   /*      truetype                                                         */
   /*      truetype                                                         */
@@ -75,6 +75,33 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /*                                                                       */
   /*    Note that the FreeType Cache sub-system is not a FreeType module.  */
   /*    Note that the FreeType Cache sub-system is not a FreeType module.  */
   /*                                                                       */
   /*                                                                       */
+  /* <Order>                                                               */
+  /*    FT_Module                                                          */
+  /*    FT_Module_Constructor                                              */
+  /*    FT_Module_Destructor                                               */
+  /*    FT_Module_Requester                                                */
+  /*    FT_Module_Class                                                    */
+  /*                                                                       */
+  /*    FT_Add_Module                                                      */
+  /*    FT_Get_Module                                                      */
+  /*    FT_Remove_Module                                                   */
+  /*    FT_Add_Default_Modules                                             */
+  /*                                                                       */
+  /*    FT_Property_Set                                                    */
+  /*    FT_Property_Get                                                    */
+  /*                                                                       */
+  /*    FT_New_Library                                                     */
+  /*    FT_Done_Library                                                    */
+  /*    FT_Reference_Library                                               */
+  /*                                                                       */
+  /*    FT_Renderer                                                        */
+  /*    FT_Renderer_Class                                                  */
+  /*                                                                       */
+  /*    FT_Get_Renderer                                                    */
+  /*    FT_Set_Renderer                                                    */
+  /*                                                                       */
+  /*    FT_Set_Debug_Hook                                                  */
+  /*                                                                       */
   /*************************************************************************/
   /*************************************************************************/
 
 
 
 
@@ -84,12 +111,14 @@ FT_BEGIN_HEADER
 #define FT_MODULE_HINTER              4  /* this module is a glyph hinter */
 #define FT_MODULE_HINTER              4  /* this module is a glyph hinter */
 #define FT_MODULE_STYLER              8  /* this module is a styler       */
 #define FT_MODULE_STYLER              8  /* this module is a styler       */
 
 
-#define FT_MODULE_DRIVER_SCALABLE     0x100   /* the driver supports      */
+#define FT_MODULE_DRIVER_SCALABLE      0x100  /* the driver supports      */
                                               /* scalable fonts           */
                                               /* scalable fonts           */
-#define FT_MODULE_DRIVER_NO_OUTLINES  0x200   /* the driver does not      */
+#define FT_MODULE_DRIVER_NO_OUTLINES   0x200  /* the driver does not      */
                                               /* support vector outlines  */
                                               /* support vector outlines  */
-#define FT_MODULE_DRIVER_HAS_HINTER   0x400   /* the driver provides its  */
+#define FT_MODULE_DRIVER_HAS_HINTER    0x400  /* the driver provides its  */
                                               /* own hinter               */
                                               /* own hinter               */
+#define FT_MODULE_DRIVER_HINTS_LIGHTLY 0x800  /* the driver's hinter      */
+                                              /* produces LIGHT hints     */
 
 
 
 
   /* deprecated values */
   /* deprecated values */
@@ -98,9 +127,10 @@ FT_BEGIN_HEADER
 #define ft_module_hinter              FT_MODULE_HINTER
 #define ft_module_hinter              FT_MODULE_HINTER
 #define ft_module_styler              FT_MODULE_STYLER
 #define ft_module_styler              FT_MODULE_STYLER
 
 
-#define ft_module_driver_scalable     FT_MODULE_DRIVER_SCALABLE
-#define ft_module_driver_no_outlines  FT_MODULE_DRIVER_NO_OUTLINES
-#define ft_module_driver_has_hinter   FT_MODULE_DRIVER_HAS_HINTER
+#define ft_module_driver_scalable       FT_MODULE_DRIVER_SCALABLE
+#define ft_module_driver_no_outlines    FT_MODULE_DRIVER_NO_OUTLINES
+#define ft_module_driver_has_hinter     FT_MODULE_DRIVER_HAS_HINTER
+#define ft_module_driver_hints_lightly  FT_MODULE_DRIVER_HINTS_LIGHTLY
 
 
 
 
   typedef FT_Pointer  FT_Module_Interface;
   typedef FT_Pointer  FT_Module_Interface;
@@ -442,7 +472,9 @@ FT_BEGIN_HEADER
   /* <Description>                                                         */
   /* <Description>                                                         */
   /*    This function is used to create a new FreeType library instance    */
   /*    This function is used to create a new FreeType library instance    */
   /*    from a given memory object.  It is thus possible to use libraries  */
   /*    from a given memory object.  It is thus possible to use libraries  */
-  /*    with distinct memory allocators within the same program.           */
+  /*    with distinct memory allocators within the same program.  Note,    */
+  /*    however, that the used @FT_Memory structure is expected to remain  */
+  /*    valid for the life of the @FT_Library object.                      */
   /*                                                                       */
   /*                                                                       */
   /*    Normally, you would call this function (followed by a call to      */
   /*    Normally, you would call this function (followed by a call to      */
   /*    @FT_Add_Default_Modules or a series of calls to @FT_Add_Module)    */
   /*    @FT_Add_Default_Modules or a series of calls to @FT_Add_Module)    */
@@ -491,7 +523,7 @@ FT_BEGIN_HEADER
   FT_EXPORT( FT_Error )
   FT_EXPORT( FT_Error )
   FT_Done_Library( FT_Library  library );
   FT_Done_Library( FT_Library  library );
 
 
-/* */
+  /* */
 
 
   typedef void
   typedef void
   (*FT_DebugHook_Func)( void*  arg );
   (*FT_DebugHook_Func)( void*  arg );
@@ -581,12 +613,7 @@ FT_BEGIN_HEADER
    *       The library doesn't implement any kind of bytecode interpreter.
    *       The library doesn't implement any kind of bytecode interpreter.
    *
    *
    *     FT_TRUETYPE_ENGINE_TYPE_UNPATENTED ::
    *     FT_TRUETYPE_ENGINE_TYPE_UNPATENTED ::
-   *       The library implements a bytecode interpreter that doesn't
-   *       support the patented operations of the TrueType virtual machine.
-   *
-   *       Its main use is to load certain Asian fonts that position and
-   *       scale glyph components with bytecode instructions.  It produces
-   *       bad output for most other fonts.
+   *       Deprecated and removed.
    *
    *
    *     FT_TRUETYPE_ENGINE_TYPE_PATENTED ::
    *     FT_TRUETYPE_ENGINE_TYPE_PATENTED ::
    *       The library implements a bytecode interpreter that covers
    *       The library implements a bytecode interpreter that covers
@@ -629,13 +656,12 @@ FT_BEGIN_HEADER
   FT_EXPORT( FT_TrueTypeEngineType )
   FT_EXPORT( FT_TrueTypeEngineType )
   FT_Get_TrueType_Engine_Type( FT_Library  library );
   FT_Get_TrueType_Engine_Type( FT_Library  library );
 
 
-
   /* */
   /* */
 
 
 
 
 FT_END_HEADER
 FT_END_HEADER
 
 
-#endif /* __FTMODAPI_H__ */
+#endif /* FTMODAPI_H_ */
 
 
 
 
 /* END */
 /* END */

+ 5 - 5
Source/ThirdParty/FreeType/include/freetype/ftmoderr.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType module error offsets (specification).                       */
 /*    FreeType module error offsets (specification).                       */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2001-2005, 2010, 2013 by                                     */
+/*  Copyright 2001-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -74,7 +74,7 @@
   /* with something like                                                   */
   /* with something like                                                   */
   /*                                                                       */
   /*                                                                       */
   /*   {                                                                   */
   /*   {                                                                   */
-  /*     #undef __FTMODERR_H__                                             */
+  /*     #undef FTMODERR_H_                                                */
   /*     #define FT_MODERRDEF( e, v, s )  { FT_Mod_Err_ ## e, s },         */
   /*     #define FT_MODERRDEF( e, v, s )  { FT_Mod_Err_ ## e, s },         */
   /*     #define FT_MODERR_START_LIST     {                                */
   /*     #define FT_MODERR_START_LIST     {                                */
   /*     #define FT_MODERR_END_LIST       { 0, 0 } };                      */
   /*     #define FT_MODERR_END_LIST       { 0, 0 } };                      */
@@ -91,8 +91,8 @@
   /*************************************************************************/
   /*************************************************************************/
 
 
 
 
-#ifndef __FTMODERR_H__
-#define __FTMODERR_H__
+#ifndef FTMODERR_H_
+#define FTMODERR_H_
 
 
 
 
   /*******************************************************************/
   /*******************************************************************/
@@ -188,7 +188,7 @@
 #undef FT_NEED_EXTERN_C
 #undef FT_NEED_EXTERN_C
 
 
 
 
-#endif /* __FTMODERR_H__ */
+#endif /* FTMODERR_H_ */
 
 
 
 
 /* END */
 /* END */

+ 17 - 16
Source/ThirdParty/FreeType/include/freetype/ftotval.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType API for validating OpenType tables (specification).         */
 /*    FreeType API for validating OpenType tables (specification).         */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2004-2007, 2013 by                                           */
+/*  Copyright 2004-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -27,8 +27,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __FTOTVAL_H__
-#define __FTOTVAL_H__
+#ifndef FTOTVAL_H_
+#define FTOTVAL_H_
 
 
 #include <ft2build.h>
 #include <ft2build.h>
 #include FT_FREETYPE_H
 #include FT_FREETYPE_H
@@ -58,6 +58,12 @@ FT_BEGIN_HEADER
   /*    This section contains the declaration of functions to validate     */
   /*    This section contains the declaration of functions to validate     */
   /*    some OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH).         */
   /*    some OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH).         */
   /*                                                                       */
   /*                                                                       */
+  /* <Order>                                                               */
+  /*    FT_OpenType_Validate                                               */
+  /*    FT_OpenType_Free                                                   */
+  /*                                                                       */
+  /*    FT_VALIDATE_OTXXX                                                  */
+  /*                                                                       */
   /*************************************************************************/
   /*************************************************************************/
 
 
 
 
@@ -100,14 +106,12 @@ FT_BEGIN_HEADER
 #define FT_VALIDATE_JSTF  0x1000
 #define FT_VALIDATE_JSTF  0x1000
 #define FT_VALIDATE_MATH  0x2000
 #define FT_VALIDATE_MATH  0x2000
 
 
-#define FT_VALIDATE_OT  FT_VALIDATE_BASE | \
-                        FT_VALIDATE_GDEF | \
-                        FT_VALIDATE_GPOS | \
-                        FT_VALIDATE_GSUB | \
-                        FT_VALIDATE_JSTF | \
-                        FT_VALIDATE_MATH
-
-  /* */
+#define FT_VALIDATE_OT  ( FT_VALIDATE_BASE | \
+                          FT_VALIDATE_GDEF | \
+                          FT_VALIDATE_GPOS | \
+                          FT_VALIDATE_GSUB | \
+                          FT_VALIDATE_JSTF | \
+                          FT_VALIDATE_MATH )
 
 
  /**********************************************************************
  /**********************************************************************
   *
   *
@@ -165,8 +169,6 @@ FT_BEGIN_HEADER
                         FT_Bytes  *GSUB_table,
                         FT_Bytes  *GSUB_table,
                         FT_Bytes  *JSTF_table );
                         FT_Bytes  *JSTF_table );
 
 
-  /* */
-
  /**********************************************************************
  /**********************************************************************
   *
   *
   * @function:
   * @function:
@@ -191,13 +193,12 @@ FT_BEGIN_HEADER
   FT_OpenType_Free( FT_Face   face,
   FT_OpenType_Free( FT_Face   face,
                     FT_Bytes  table );
                     FT_Bytes  table );
 
 
-
- /* */
+  /* */
 
 
 
 
 FT_END_HEADER
 FT_END_HEADER
 
 
-#endif /* __FTOTVAL_H__ */
+#endif /* FTOTVAL_H_ */
 
 
 
 
 /* END */
 /* END */

+ 27 - 14
Source/ThirdParty/FreeType/include/freetype/ftoutln.h

@@ -5,7 +5,7 @@
 /*    Support for the FT_Outline type used to store glyph shapes of        */
 /*    Support for the FT_Outline type used to store glyph shapes of        */
 /*    most scalable font formats (specification).                          */
 /*    most scalable font formats (specification).                          */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2003, 2005-2013 by                                      */
+/*  Copyright 1996-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -17,8 +17,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __FTOUTLN_H__
-#define __FTOUTLN_H__
+#ifndef FTOUTLN_H_
+#define FTOUTLN_H_
 
 
 
 
 #include <ft2build.h>
 #include <ft2build.h>
@@ -52,7 +52,6 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /*                                                                       */
   /* <Order>                                                               */
   /* <Order>                                                               */
   /*    FT_Outline                                                         */
   /*    FT_Outline                                                         */
-  /*    FT_OUTLINE_FLAGS                                                   */
   /*    FT_Outline_New                                                     */
   /*    FT_Outline_New                                                     */
   /*    FT_Outline_Done                                                    */
   /*    FT_Outline_Done                                                    */
   /*    FT_Outline_Copy                                                    */
   /*    FT_Outline_Copy                                                    */
@@ -68,13 +67,17 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /*                                                                       */
   /*    FT_Outline_Get_Bitmap                                              */
   /*    FT_Outline_Get_Bitmap                                              */
   /*    FT_Outline_Render                                                  */
   /*    FT_Outline_Render                                                  */
-  /*                                                                       */
   /*    FT_Outline_Decompose                                               */
   /*    FT_Outline_Decompose                                               */
   /*    FT_Outline_Funcs                                                   */
   /*    FT_Outline_Funcs                                                   */
-  /*    FT_Outline_MoveTo_Func                                             */
-  /*    FT_Outline_LineTo_Func                                             */
-  /*    FT_Outline_ConicTo_Func                                            */
-  /*    FT_Outline_CubicTo_Func                                            */
+  /*    FT_Outline_MoveToFunc                                              */
+  /*    FT_Outline_LineToFunc                                              */
+  /*    FT_Outline_ConicToFunc                                             */
+  /*    FT_Outline_CubicToFunc                                             */
+  /*                                                                       */
+  /*    FT_Orientation                                                     */
+  /*    FT_Outline_Get_Orientation                                         */
+  /*                                                                       */
+  /*    FT_OUTLINE_XXX                                                     */
   /*                                                                       */
   /*                                                                       */
   /*************************************************************************/
   /*************************************************************************/
 
 
@@ -112,6 +115,10 @@ FT_BEGIN_HEADER
   /*    outline for stroking purposes (otherwise it would result in a      */
   /*    outline for stroking purposes (otherwise it would result in a      */
   /*    visible dot when round caps are used).                             */
   /*    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_EXPORT( FT_Error )
   FT_Outline_Decompose( FT_Outline*              outline,
   FT_Outline_Decompose( FT_Outline*              outline,
                         const FT_Outline_Funcs*  func_interface,
                         const FT_Outline_Funcs*  func_interface,
@@ -210,6 +217,10 @@ FT_BEGIN_HEADER
   /* <Return>                                                              */
   /* <Return>                                                              */
   /*    FreeType error code.  0~means success.                             */
   /*    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_EXPORT( FT_Error )
   FT_Outline_Check( FT_Outline*  outline );
   FT_Outline_Check( FT_Outline*  outline );
 
 
@@ -351,10 +362,13 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /*                                                                       */
   /*    {                                                                  */
   /*    {                                                                  */
   /*      FT_Load_Glyph( face, index, FT_LOAD_DEFAULT );                   */
   /*      FT_Load_Glyph( face, index, FT_LOAD_DEFAULT );                   */
-  /*      if ( face->slot->format == FT_GLYPH_FORMAT_OUTLINE )             */
-  /*        FT_Outline_Embolden( &face->slot->outline, strength );         */
+  /*      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_EXPORT( FT_Error )
   FT_Outline_Embolden( FT_Outline*  outline,
   FT_Outline_Embolden( FT_Outline*  outline,
                        FT_Pos       strength );
                        FT_Pos       strength );
@@ -532,7 +546,7 @@ FT_BEGIN_HEADER
   *
   *
   * @description:
   * @description:
   *   This function analyzes a glyph outline and tries to compute its
   *   This function analyzes a glyph outline and tries to compute its
-  *   fill orientation (see @FT_Orientation).  This is done by integrating 
+  *   fill orientation (see @FT_Orientation).  This is done by integrating
   *   the total area covered by the outline. The positive integral
   *   the total area covered by the outline. The positive integral
   *   corresponds to the clockwise orientation and @FT_ORIENTATION_POSTSCRIPT
   *   corresponds to the clockwise orientation and @FT_ORIENTATION_POSTSCRIPT
   *   is returned. The negative integral corresponds to the counter-clockwise
   *   is returned. The negative integral corresponds to the counter-clockwise
@@ -552,13 +566,12 @@ FT_BEGIN_HEADER
   FT_EXPORT( FT_Orientation )
   FT_EXPORT( FT_Orientation )
   FT_Outline_Get_Orientation( FT_Outline*  outline );
   FT_Outline_Get_Orientation( FT_Outline*  outline );
 
 
-
   /* */
   /* */
 
 
 
 
 FT_END_HEADER
 FT_END_HEADER
 
 
-#endif /* __FTOUTLN_H__ */
+#endif /* FTOUTLN_H_ */
 
 
 
 
 /* END */
 /* END */

+ 5 - 5
Source/ThirdParty/FreeType/include/freetype/ftpfr.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType API for accessing PFR-specific data (specification only).   */
 /*    FreeType API for accessing PFR-specific data (specification only).   */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2002, 2003, 2004, 2006, 2008, 2009 by                        */
+/*  Copyright 2002-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -16,8 +16,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __FTPFR_H__
-#define __FTPFR_H__
+#ifndef FTPFR_H_
+#define FTPFR_H_
 
 
 #include <ft2build.h>
 #include <ft2build.h>
 #include FT_FREETYPE_H
 #include FT_FREETYPE_H
@@ -161,12 +161,12 @@ FT_BEGIN_HEADER
                       FT_UInt   gindex,
                       FT_UInt   gindex,
                       FT_Pos   *aadvance );
                       FT_Pos   *aadvance );
 
 
- /* */
+  /* */
 
 
 
 
 FT_END_HEADER
 FT_END_HEADER
 
 
-#endif /* __FTPFR_H__ */
+#endif /* FTPFR_H_ */
 
 
 
 
 /* END */
 /* END */

+ 7 - 12
Source/ThirdParty/FreeType/include/freetype/ftrender.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType renderer modules public interface (specification).          */
 /*    FreeType renderer modules public interface (specification).          */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2001, 2005, 2006, 2010 by                               */
+/*  Copyright 1996-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -16,8 +16,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __FTRENDER_H__
-#define __FTRENDER_H__
+#ifndef FTRENDER_H_
+#define FTRENDER_H_
 
 
 
 
 #include <ft2build.h>
 #include <ft2build.h>
@@ -75,6 +75,7 @@ FT_BEGIN_HEADER
   {
   {
     FT_Long                 glyph_size;
     FT_Long                 glyph_size;
     FT_Glyph_Format         glyph_format;
     FT_Glyph_Format         glyph_format;
+
     FT_Glyph_InitFunc       glyph_init;
     FT_Glyph_InitFunc       glyph_init;
     FT_Glyph_DoneFunc       glyph_done;
     FT_Glyph_DoneFunc       glyph_done;
     FT_Glyph_CopyFunc       glyph_copy;
     FT_Glyph_CopyFunc       glyph_copy;
@@ -212,13 +213,8 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /*                                                                       */
   /*    This doesn't change the current renderer for other formats.        */
   /*    This doesn't change the current renderer for other formats.        */
   /*                                                                       */
   /*                                                                       */
-  /*    Currently, only the B/W renderer, if compiled with                 */
-  /*    FT_RASTER_OPTION_ANTI_ALIASING (providing a 5-levels               */
-  /*    anti-aliasing mode; this option must be set directly in            */
-  /*    `ftraster.c' and is undefined by default) accepts a single tag     */
-  /*    `pal5' to set its gray palette as a character string with          */
-  /*    5~elements.  Consequently, the third and fourth argument are zero  */
-  /*    normally.                                                          */
+  /*    Currently, no FreeType renderer module uses `parameters'; you      */
+  /*    should thus always pass NULL as the value.                         */
   /*                                                                       */
   /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_EXPORT( FT_Error )
   FT_Set_Renderer( FT_Library     library,
   FT_Set_Renderer( FT_Library     library,
@@ -226,13 +222,12 @@ FT_BEGIN_HEADER
                    FT_UInt        num_params,
                    FT_UInt        num_params,
                    FT_Parameter*  parameters );
                    FT_Parameter*  parameters );
 
 
-
   /* */
   /* */
 
 
 
 
 FT_END_HEADER
 FT_END_HEADER
 
 
-#endif /* __FTRENDER_H__ */
+#endif /* FTRENDER_H_ */
 
 
 
 
 /* END */
 /* END */

+ 4 - 4
Source/ThirdParty/FreeType/include/freetype/ftsizes.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType size objects management (specification).                    */
 /*    FreeType size objects management (specification).                    */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2001, 2003, 2004, 2006, 2009, 2013 by                   */
+/*  Copyright 1996-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -25,8 +25,8 @@
   /*************************************************************************/
   /*************************************************************************/
 
 
 
 
-#ifndef __FTSIZES_H__
-#define __FTSIZES_H__
+#ifndef FTSIZES_H_
+#define FTSIZES_H_
 
 
 
 
 #include <ft2build.h>
 #include <ft2build.h>
@@ -153,7 +153,7 @@ FT_BEGIN_HEADER
 
 
 FT_END_HEADER
 FT_END_HEADER
 
 
-#endif /* __FTSIZES_H__ */
+#endif /* FTSIZES_H_ */
 
 
 
 
 /* END */
 /* END */

+ 4 - 4
Source/ThirdParty/FreeType/include/freetype/ftsnames.h

@@ -7,7 +7,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    This is _not_ used to retrieve glyph names!                          */
 /*    This is _not_ used to retrieve glyph names!                          */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2003, 2006, 2009, 2010, 2013 by                         */
+/*  Copyright 1996-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -19,8 +19,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __FT_SFNT_NAMES_H__
-#define __FT_SFNT_NAMES_H__
+#ifndef FTSNAMES_H_
+#define FTSNAMES_H_
 
 
 
 
 #include <ft2build.h>
 #include <ft2build.h>
@@ -194,7 +194,7 @@ FT_BEGIN_HEADER
 
 
 FT_END_HEADER
 FT_END_HEADER
 
 
-#endif /* __FT_SFNT_NAMES_H__ */
+#endif /* FTSNAMES_H_ */
 
 
 
 
 /* END */
 /* END */

+ 42 - 8
Source/ThirdParty/FreeType/include/freetype/ftstroke.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType path stroker (specification).                               */
 /*    FreeType path stroker (specification).                               */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2002-2006, 2008, 2009, 2011-2012 by                          */
+/*  Copyright 2002-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -16,8 +16,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __FT_STROKE_H__
-#define __FT_STROKE_H__
+#ifndef FTSTROKE_H_
+#define FTSTROKE_H_
 
 
 #include <ft2build.h>
 #include <ft2build.h>
 #include FT_OUTLINE_H
 #include FT_OUTLINE_H
@@ -46,6 +46,38 @@ FT_BEGIN_HEADER
   *    This can be useful to generate `bordered' glyph, i.e., glyphs
   *    This can be useful to generate `bordered' glyph, i.e., glyphs
   *    displayed with a coloured (and anti-aliased) border around their
   *    displayed with a coloured (and anti-aliased) border around their
   *    shape.
   *    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
+  *
   */
   */
 
 
 
 
@@ -55,7 +87,7 @@ FT_BEGIN_HEADER
   *   FT_Stroker
   *   FT_Stroker
   *
   *
   * @description:
   * @description:
-  *   Opaque handler to a path stroker object.
+  *   Opaque handle to a path stroker object.
   */
   */
   typedef struct FT_StrokerRec_*  FT_Stroker;
   typedef struct FT_StrokerRec_*  FT_Stroker;
 
 
@@ -276,6 +308,8 @@ FT_BEGIN_HEADER
    * @note:
    * @note:
    *   The radius is expressed in the same units as the outline
    *   The radius is expressed in the same units as the outline
    *   coordinates.
    *   coordinates.
+   *
+   *   This function calls @FT_Stroker_Rewind automatically.
    */
    */
   FT_EXPORT( void )
   FT_EXPORT( void )
   FT_Stroker_Set( FT_Stroker           stroker,
   FT_Stroker_Set( FT_Stroker           stroker,
@@ -570,10 +604,10 @@ FT_BEGIN_HEADER
    *   receive all new data.
    *   receive all new data.
    *
    *
    *   When an outline, or a sub-path, is `closed', the stroker generates
    *   When an outline, or a sub-path, is `closed', the stroker generates
-   *   two independent `border' outlines, named `left' and `right'
+   *   two independent `border' outlines, named `left' and `right'.
    *
    *
    *   When the outline, or a sub-path, is `opened', the stroker merges
    *   When the outline, or a sub-path, is `opened', the stroker merges
-   *   the `border' outlines with caps. The `left' border receives all
+   *   the `border' outlines with caps.  The `left' border receives all
    *   points, while the `right' border becomes empty.
    *   points, while the `right' border becomes empty.
    *
    *
    *   Use the function @FT_Stroker_Export instead if you want to
    *   Use the function @FT_Stroker_Export instead if you want to
@@ -736,11 +770,11 @@ FT_BEGIN_HEADER
                          FT_Bool      inside,
                          FT_Bool      inside,
                          FT_Bool      destroy );
                          FT_Bool      destroy );
 
 
- /* */
+  /* */
 
 
 FT_END_HEADER
 FT_END_HEADER
 
 
-#endif /* __FT_STROKE_H__ */
+#endif /* FTSTROKE_H_ */
 
 
 
 
 /* END */
 /* END */

+ 9 - 6
Source/ThirdParty/FreeType/include/freetype/ftsynth.h

@@ -5,7 +5,7 @@
 /*    FreeType synthesizing code for emboldening and slanting              */
 /*    FreeType synthesizing code for emboldening and slanting              */
 /*    (specification).                                                     */
 /*    (specification).                                                     */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2000-2001, 2003, 2006, 2008, 2012, 2013 by                   */
+/*  Copyright 2000-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -41,8 +41,8 @@
   /* adapted to the particular needs.                               */
   /* adapted to the particular needs.                               */
 
 
 
 
-#ifndef __FTSYNTH_H__
-#define __FTSYNTH_H__
+#ifndef FTSYNTH_H_
+#define FTSYNTH_H_
 
 
 
 
 #include <ft2build.h>
 #include <ft2build.h>
@@ -62,8 +62,10 @@ FT_BEGIN_HEADER
   /* a wrapper for @FT_Outline_Embolden and @FT_Bitmap_Embolden.           */
   /* a wrapper for @FT_Outline_Embolden and @FT_Bitmap_Embolden.           */
   /*                                                                       */
   /*                                                                       */
   /* For emboldened outlines the height, width, and advance metrics are    */
   /* For emboldened outlines the height, width, and advance metrics are    */
-  /* increased by the strength of the emboldening.  You can also call      */
-  /* @FT_Outline_Get_CBox to get precise values.                           */
+  /* increased by the strength of the emboldening -- this even affects     */
+  /* mono-width fonts!                                                     */
+  /*                                                                       */
+  /* You can also call @FT_Outline_Get_CBox to get precise values.         */
   FT_EXPORT( void )
   FT_EXPORT( void )
   FT_GlyphSlot_Embolden( FT_GlyphSlot  slot );
   FT_GlyphSlot_Embolden( FT_GlyphSlot  slot );
 
 
@@ -73,9 +75,10 @@ FT_BEGIN_HEADER
 
 
   /* */
   /* */
 
 
+
 FT_END_HEADER
 FT_END_HEADER
 
 
-#endif /* __FTSYNTH_H__ */
+#endif /* FTSYNTH_H_ */
 
 
 
 
 /* END */
 /* END */

+ 13 - 5
Source/ThirdParty/FreeType/include/freetype/ftsystem.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType low-level system interface definition (specification).      */
 /*    FreeType low-level system interface definition (specification).      */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002, 2005, 2010 by                               */
+/*  Copyright 1996-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -16,8 +16,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __FTSYSTEM_H__
-#define __FTSYSTEM_H__
+#ifndef FTSYSTEM_H_
+#define FTSYSTEM_H_
 
 
 
 
 #include <ft2build.h>
 #include <ft2build.h>
@@ -192,6 +192,10 @@ FT_BEGIN_HEADER
    * @description:
    * @description:
    *   A handle to an input stream.
    *   A handle to an input stream.
    *
    *
+   * @also:
+   *   See @FT_StreamRec for the publicly accessible fields of a given
+   *   stream object.
+   *
    */
    */
   typedef struct FT_StreamRec_*  FT_Stream;
   typedef struct FT_StreamRec_*  FT_Stream;
 
 
@@ -285,6 +289,11 @@ FT_BEGIN_HEADER
    *   size ::
    *   size ::
    *     The stream size in bytes.
    *     The stream size in bytes.
    *
    *
+   *     In case of compressed streams where the size is unknown before
+   *     actually doing the decompression, the value is set to 0x7FFFFFFF.
+   *     (Note that this size value can occur for normal streams also; it is
+   *     thus just a hint.)
+   *
    *   pos ::
    *   pos ::
    *     The current position within the stream.
    *     The current position within the stream.
    *
    *
@@ -335,13 +344,12 @@ FT_BEGIN_HEADER
 
 
   } FT_StreamRec;
   } FT_StreamRec;
 
 
-
   /* */
   /* */
 
 
 
 
 FT_END_HEADER
 FT_END_HEADER
 
 
-#endif /* __FTSYSTEM_H__ */
+#endif /* FTSYSTEM_H_ */
 
 
 
 
 /* END */
 /* END */

+ 8 - 8
Source/ThirdParty/FreeType/include/freetype/fttrigon.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType trigonometric functions (specification).                    */
 /*    FreeType trigonometric functions (specification).                    */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2001, 2003, 2005, 2007, 2013 by                              */
+/*  Copyright 2001-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -16,8 +16,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __FTTRIGON_H__
-#define __FTTRIGON_H__
+#ifndef FTTRIGON_H_
+#define FTTRIGON_H_
 
 
 #include FT_FREETYPE_H
 #include FT_FREETYPE_H
 
 
@@ -225,8 +225,8 @@ FT_BEGIN_HEADER
    *
    *
    * @description:
    * @description:
    *   Return the unit vector corresponding to a given angle.  After the
    *   Return the unit vector corresponding to a given angle.  After the
-   *   call, the value of `vec.x' will be `sin(angle)', and the value of
-   *   `vec.y' will be `cos(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
    *   This function is useful to retrieve both the sinus and cosinus of a
    *   given angle quickly.
    *   given angle quickly.
@@ -237,7 +237,7 @@ FT_BEGIN_HEADER
    *
    *
    * @input:
    * @input:
    *   angle ::
    *   angle ::
-   *     The address of angle.
+   *     The input angle.
    *
    *
    */
    */
   FT_EXPORT( void )
   FT_EXPORT( void )
@@ -259,7 +259,7 @@ FT_BEGIN_HEADER
    *
    *
    * @input:
    * @input:
    *   angle ::
    *   angle ::
-   *     The address of angle.
+   *     The input angle.
    *
    *
    */
    */
   FT_EXPORT( void )
   FT_EXPORT( void )
@@ -344,7 +344,7 @@ FT_BEGIN_HEADER
 
 
 FT_END_HEADER
 FT_END_HEADER
 
 
-#endif /* __FTTRIGON_H__ */
+#endif /* FTTRIGON_H_ */
 
 
 
 
 /* END */
 /* END */

+ 206 - 27
Source/ThirdParty/FreeType/include/freetype/ftttdrv.h

@@ -5,7 +5,7 @@
 /*    FreeType API for controlling the TrueType driver                     */
 /*    FreeType API for controlling the TrueType driver                     */
 /*    (specification only).                                                */
 /*    (specification only).                                                */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2013 by                                                      */
+/*  Copyright 2013-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -17,8 +17,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __FTTTDRV_H__
-#define __FTTTDRV_H__
+#ifndef FTTTDRV_H_
+#define FTTTDRV_H_
 
 
 #include <ft2build.h>
 #include <ft2build.h>
 #include FT_FREETYPE_H
 #include FT_FREETYPE_H
@@ -52,6 +52,83 @@ FT_BEGIN_HEADER
    *
    *
    *   The TrueType driver's module name is `truetype'.
    *   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_ _Backwards_ _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 backwards 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 backwards
+   *   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.
+   *
    */
    */
 
 
 
 
@@ -61,31 +138,37 @@ FT_BEGIN_HEADER
    *   interpreter-version
    *   interpreter-version
    *
    *
    * @description:
    * @description:
-   *   Currently, two versions are available, representing the bytecode
-   *   interpreter with and without subpixel hinting support,
-   *   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.  The
-   *   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) font-specific
-   *   tweaks.
+
+   *   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
    *   Details on subpixel hinting and some of the necessary tweaks can be
    *   found in Greg Hitchcock's whitepaper at
    *   found in Greg Hitchcock's whitepaper at
-   *   `http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx'.
+   *   `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 activate subpixel
+   *   The following example code demonstrates how to deactivate subpixel
    *   hinting (omitting the error handling).
    *   hinting (omitting the error handling).
    *
    *
    *   {
    *   {
    *     FT_Library  library;
    *     FT_Library  library;
    *     FT_Face     face;
    *     FT_Face     face;
-   *     FT_UInt     interpreter_version = TT_INTERPRETER_VERSION_38;
+   *     FT_UInt     interpreter_version = TT_INTERPRETER_VERSION_35;
    *
    *
    *
    *
    *     FT_Init_FreeType( &library );
    *     FT_Init_FreeType( &library );
@@ -98,6 +181,8 @@ FT_BEGIN_HEADER
    * @note:
    * @note:
    *   This property can be used with @FT_Property_Get also.
    *   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').
    */
    */
 
 
 
 
@@ -120,9 +205,19 @@ FT_BEGIN_HEADER
    *
    *
    *   TT_INTERPRETER_VERSION_38 ::
    *   TT_INTERPRETER_VERSION_38 ::
    *     Version~38 corresponds to MS rasterizer v.1.9; it is roughly
    *     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).
+   *     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:
    * @note:
    *   This property controls the behaviour of the bytecode interpreter
    *   This property controls the behaviour of the bytecode interpreter
@@ -130,21 +225,105 @@ FT_BEGIN_HEADER
    *   get rasterized!  In particular, it does not control subpixel color
    *   get rasterized!  In particular, it does not control subpixel color
    *   filtering.
    *   filtering.
    *
    *
-   *   If FreeType has not been compiled with configuration option
-   *   FT_CONFIG_OPTION_SUBPIXEL_HINTING, selecting version~38 causes an
-   *   `FT_Err_Unimplemented_Feature' error.
+   *   If FreeType has not been compiled with the configuration option
+   *   FT_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_35  35
 #define TT_INTERPRETER_VERSION_38  38
 #define TT_INTERPRETER_VERSION_38  38
-
+#define TT_INTERPRETER_VERSION_40  40
 
 
  /* */
  /* */
 
 
+
 FT_END_HEADER
 FT_END_HEADER
 
 
 
 
-#endif /* __FTTTDRV_H__ */
+#endif /* FTTTDRV_H_ */
 
 
 
 
 /* END */
 /* END */

+ 9 - 5
Source/ThirdParty/FreeType/include/freetype/fttypes.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType simple types definitions (specification only).              */
 /*    FreeType simple types definitions (specification only).              */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2002, 2004, 2006-2009, 2012, 2013 by                    */
+/*  Copyright 1996-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -16,8 +16,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __FTTYPES_H__
-#define __FTTYPES_H__
+#ifndef FTTYPES_H_
+#define FTTYPES_H_
 
 
 
 
 #include <ft2build.h>
 #include <ft2build.h>
@@ -57,6 +57,8 @@ FT_BEGIN_HEADER
   /*    FT_UInt16                                                          */
   /*    FT_UInt16                                                          */
   /*    FT_Int32                                                           */
   /*    FT_Int32                                                           */
   /*    FT_UInt32                                                          */
   /*    FT_UInt32                                                          */
+  /*    FT_Int64                                                           */
+  /*    FT_UInt64                                                          */
   /*    FT_Short                                                           */
   /*    FT_Short                                                           */
   /*    FT_UShort                                                          */
   /*    FT_UShort                                                          */
   /*    FT_Long                                                            */
   /*    FT_Long                                                            */
@@ -78,7 +80,9 @@ FT_BEGIN_HEADER
   /*    FT_F2Dot14                                                         */
   /*    FT_F2Dot14                                                         */
   /*    FT_UnitVector                                                      */
   /*    FT_UnitVector                                                      */
   /*    FT_F26Dot6                                                         */
   /*    FT_F26Dot6                                                         */
+  /*    FT_Data                                                            */
   /*                                                                       */
   /*                                                                       */
+  /*    FT_MAKE_TAG                                                        */
   /*                                                                       */
   /*                                                                       */
   /*    FT_Generic                                                         */
   /*    FT_Generic                                                         */
   /*    FT_Generic_Finalizer                                               */
   /*    FT_Generic_Finalizer                                               */
@@ -567,9 +571,9 @@ FT_BEGIN_HEADER
 
 
   } FT_ListRec;
   } FT_ListRec;
 
 
-
   /* */
   /* */
 
 
+
 #define FT_IS_EMPTY( list )  ( (list).head == 0 )
 #define FT_IS_EMPTY( list )  ( (list).head == 0 )
 #define FT_BOOL( x )  ( (FT_Bool)( x ) )
 #define FT_BOOL( x )  ( (FT_Bool)( x ) )
 
 
@@ -592,7 +596,7 @@ FT_BEGIN_HEADER
 
 
 FT_END_HEADER
 FT_END_HEADER
 
 
-#endif /* __FTTYPES_H__ */
+#endif /* FTTYPES_H_ */
 
 
 
 
 /* END */
 /* END */

+ 7 - 7
Source/ThirdParty/FreeType/include/freetype/ftwinfnt.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType API for accessing Windows fnt-specific data.                */
 /*    FreeType API for accessing Windows fnt-specific data.                */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2003, 2004, 2008 by                                          */
+/*  Copyright 2003-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -16,8 +16,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __FTWINFNT_H__
-#define __FTWINFNT_H__
+#ifndef FTWINFNT_H_
+#define FTWINFNT_H_
 
 
 #include <ft2build.h>
 #include <ft2build.h>
 #include FT_FREETYPE_H
 #include FT_FREETYPE_H
@@ -59,7 +59,7 @@ FT_BEGIN_HEADER
    *   A list of valid values for the `charset' byte in
    *   A list of valid values for the `charset' byte in
    *   @FT_WinFNT_HeaderRec.  Exact mapping tables for the various cpXXXX
    *   @FT_WinFNT_HeaderRec.  Exact mapping tables for the various cpXXXX
    *   encodings (except for cp1361) can be found at
    *   encodings (except for cp1361) can be found at
-   *   ftp://ftp.unicode.org/public in the MAPPINGS/VENDORS/MICSFT/WINDOWS
+   *   ftp://ftp.unicode.org/Public in the MAPPINGS/VENDORS/MICSFT/WINDOWS
    *   subdirectory.  cp1361 is roughly a superset of
    *   subdirectory.  cp1361 is roughly a superset of
    *   MAPPINGS/OBSOLETE/EASTASIA/KSC/JOHAB.TXT.
    *   MAPPINGS/OBSOLETE/EASTASIA/KSC/JOHAB.TXT.
    *
    *
@@ -95,7 +95,7 @@ FT_BEGIN_HEADER
    *       second default codepage that most international versions of
    *       second default codepage that most international versions of
    *       Windows have.  It is one of the OEM codepages from
    *       Windows have.  It is one of the OEM codepages from
    *
    *
-   *         http://www.microsoft.com/globaldev/reference/cphome.mspx,
+   *         https://msdn.microsoft.com/en-us/goglobal/bb964655,
    *
    *
    *       and is used for the `DOS boxes', to support legacy applications.
    *       and is used for the `DOS boxes', to support legacy applications.
    *       A German Windows version for example usually uses ANSI codepage
    *       A German Windows version for example usually uses ANSI codepage
@@ -259,12 +259,12 @@ FT_BEGIN_HEADER
   FT_Get_WinFNT_Header( FT_Face               face,
   FT_Get_WinFNT_Header( FT_Face               face,
                         FT_WinFNT_HeaderRec  *aheader );
                         FT_WinFNT_HeaderRec  *aheader );
 
 
-
   /* */
   /* */
 
 
+
 FT_END_HEADER
 FT_END_HEADER
 
 
-#endif /* __FTWINFNT_H__ */
+#endif /* FTWINFNT_H_ */
 
 
 
 
 /* END */
 /* END */

+ 4 - 4
Source/ThirdParty/FreeType/include/freetype/internal/autohint.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    High-level `autohint' module-specific interface (specification).     */
 /*    High-level `autohint' module-specific interface (specification).     */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2002, 2007, 2009, 2012 by                               */
+/*  Copyright 1996-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -24,8 +24,8 @@
   /*************************************************************************/
   /*************************************************************************/
 
 
 
 
-#ifndef __AUTOHINT_H__
-#define __AUTOHINT_H__
+#ifndef AUTOHINT_H_
+#define AUTOHINT_H_
 
 
 
 
   /*************************************************************************/
   /*************************************************************************/
@@ -238,7 +238,7 @@ FT_BEGIN_HEADER
 
 
 FT_END_HEADER
 FT_END_HEADER
 
 
-#endif /* __AUTOHINT_H__ */
+#endif /* AUTOHINT_H_ */
 
 
 
 
 /* END */
 /* END */

+ 277 - 30
Source/ThirdParty/FreeType/include/freetype/internal/ftcalc.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    Arithmetic computations (specification).                             */
 /*    Arithmetic computations (specification).                             */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2006, 2008, 2009, 2012-2013 by                          */
+/*  Copyright 1996-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -16,8 +16,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __FTCALC_H__
-#define __FTCALC_H__
+#ifndef FTCALC_H_
+#define FTCALC_H_
 
 
 
 
 #include <ft2build.h>
 #include <ft2build.h>
@@ -27,36 +27,223 @@
 FT_BEGIN_HEADER
 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.                                    */
+  /* FT_MulDiv() and FT_MulFix() are declared in freetype.h.               */
   /*                                                                       */
   /*                                                                       */
-  FT_BASE( FT_Int32 )
-  FT_SqrtFixed( FT_Int32  x );
+  /*************************************************************************/
 
 
-#endif /* 0 */
+#ifndef  FT_CONFIG_OPTION_NO_ASSEMBLER
+  /* Provide assembler fragments for performance-critical functions. */
+  /* These must be defined `static __inline__' with GCC.             */
 
 
+#if defined( __CC_ARM ) || defined( __ARMCC__ )  /* RVCT */
 
 
-  /*************************************************************************/
-  /*                                                                       */
-  /* FT_MulDiv() and FT_MulFix() are declared in freetype.h.               */
-  /*                                                                       */
-  /*************************************************************************/
+#define FT_MULFIX_ASSEMBLER  FT_MulFix_arm
+
+  /* documentation is in freetype.h */
+
+  static __inline FT_Int32
+  FT_MulFix_arm( FT_Int32  a,
+                 FT_Int32  b )
+  {
+    FT_Int32  t, t2;
+
+
+    __asm
+    {
+      smull t2, t,  b,  a           /* (lo=t2,hi=t) = a*b */
+      mov   a,  t,  asr #31         /* a   = (hi >> 31) */
+      add   a,  a,  #0x8000         /* a  += 0x8000 */
+      adds  t2, t2, a               /* t2 += a */
+      adc   t,  t,  #0              /* t  += carry */
+      mov   a,  t2, lsr #16         /* a   = t2 >> 16 */
+      orr   a,  a,  t,  lsl #16     /* a  |= t << 16 */
+    }
+    return a;
+  }
+
+#endif /* __CC_ARM || __ARMCC__ */
+
+
+#ifdef __GNUC__
+
+#if defined( __arm__ )                                 && \
+    ( !defined( __thumb__ ) || defined( __thumb2__ ) ) && \
+    !( defined( __CC_ARM ) || defined( __ARMCC__ ) )
+
+#define FT_MULFIX_ASSEMBLER  FT_MulFix_arm
+
+  /* documentation is in freetype.h */
+
+  static __inline__ FT_Int32
+  FT_MulFix_arm( FT_Int32  a,
+                 FT_Int32  b )
+  {
+    FT_Int32  t, t2;
+
+
+    __asm__ __volatile__ (
+      "smull  %1, %2, %4, %3\n\t"       /* (lo=%1,hi=%2) = a*b */
+      "mov    %0, %2, asr #31\n\t"      /* %0  = (hi >> 31) */
+#if defined( __clang__ ) && defined( __thumb2__ )
+      "add.w  %0, %0, #0x8000\n\t"      /* %0 += 0x8000 */
+#else
+      "add    %0, %0, #0x8000\n\t"      /* %0 += 0x8000 */
+#endif
+      "adds   %1, %1, %0\n\t"           /* %1 += %0 */
+      "adc    %2, %2, #0\n\t"           /* %2 += carry */
+      "mov    %0, %1, lsr #16\n\t"      /* %0  = %1 >> 16 */
+      "orr    %0, %0, %2, lsl #16\n\t"  /* %0 |= %2 << 16 */
+      : "=r"(a), "=&r"(t2), "=&r"(t)
+      : "r"(a), "r"(b)
+      : "cc" );
+    return a;
+  }
+
+#endif /* __arm__                      && */
+       /* ( __thumb2__ || !__thumb__ ) && */
+       /* !( __CC_ARM || __ARMCC__ )      */
+
+
+#if defined( __i386__ )
+
+#define FT_MULFIX_ASSEMBLER  FT_MulFix_i386
+
+  /* documentation is in freetype.h */
+
+  static __inline__ FT_Int32
+  FT_MulFix_i386( FT_Int32  a,
+                  FT_Int32  b )
+  {
+    FT_Int32  result;
+
+
+    __asm__ __volatile__ (
+      "imul  %%edx\n"
+      "movl  %%edx, %%ecx\n"
+      "sarl  $31, %%ecx\n"
+      "addl  $0x8000, %%ecx\n"
+      "addl  %%ecx, %%eax\n"
+      "adcl  $0, %%edx\n"
+      "shrl  $16, %%eax\n"
+      "shll  $16, %%edx\n"
+      "addl  %%edx, %%eax\n"
+      : "=a"(result), "=d"(b)
+      : "a"(a), "d"(b)
+      : "%ecx", "cc" );
+    return result;
+  }
+
+#endif /* i386 */
+
+#endif /* __GNUC__ */
+
+
+#ifdef _MSC_VER /* Visual C++ */
+
+#ifdef _M_IX86
+
+#define FT_MULFIX_ASSEMBLER  FT_MulFix_i386
+
+  /* documentation is in freetype.h */
+
+  static __inline FT_Int32
+  FT_MulFix_i386( FT_Int32  a,
+                  FT_Int32  b )
+  {
+    FT_Int32  result;
+
+    __asm
+    {
+      mov eax, a
+      mov edx, b
+      imul edx
+      mov ecx, edx
+      sar ecx, 31
+      add ecx, 8000h
+      add eax, ecx
+      adc edx, 0
+      shr eax, 16
+      shl edx, 16
+      add eax, edx
+      mov result, eax
+    }
+    return result;
+  }
+
+#endif /* _M_IX86 */
+
+#endif /* _MSC_VER */
+
+
+#if defined( __GNUC__ ) && defined( __x86_64__ )
+
+#define FT_MULFIX_ASSEMBLER  FT_MulFix_x86_64
+
+  static __inline__ FT_Int32
+  FT_MulFix_x86_64( FT_Int32  a,
+                    FT_Int32  b )
+  {
+    /* Temporarily disable the warning that C90 doesn't support */
+    /* `long long'.                                             */
+#if __GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ >= 6 )
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wlong-long"
+#endif
+
+#if 1
+    /* Technically not an assembly fragment, but GCC does a really good */
+    /* job at inlining it and generating good machine code for it.      */
+    long long  ret, tmp;
+
+
+    ret  = (long long)a * b;
+    tmp  = ret >> 63;
+    ret += 0x8000 + tmp;
+
+    return (FT_Int32)( ret >> 16 );
+#else
+
+    /* For some reason, GCC 4.6 on Ubuntu 12.04 generates invalid machine  */
+    /* code from the lines below.  The main issue is that `wide_a' is not  */
+    /* properly initialized by sign-extending `a'.  Instead, the generated */
+    /* machine code assumes that the register that contains `a' on input   */
+    /* can be used directly as a 64-bit value, which is wrong most of the  */
+    /* time.                                                               */
+    long long  wide_a = (long long)a;
+    long long  wide_b = (long long)b;
+    long long  result;
+
+
+    __asm__ __volatile__ (
+      "imul %2, %1\n"
+      "mov %1, %0\n"
+      "sar $63, %0\n"
+      "lea 0x8000(%1, %0), %0\n"
+      "sar $16, %0\n"
+      : "=&r"(result), "=&r"(wide_a)
+      : "r"(wide_b)
+      : "cc" );
+
+    return (FT_Int32)result;
+#endif
+
+#if __GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ >= 6 )
+#pragma GCC diagnostic pop
+#endif
+  }
+
+#endif /* __GNUC__ && __x86_64__ */
+
+#endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */
+
+
+#ifdef FT_CONFIG_OPTION_INLINE_MULFIX
+#ifdef FT_MULFIX_ASSEMBLER
+#define FT_MulFix( a, b )  FT_MULFIX_ASSEMBLER( (FT_Int32)(a), (FT_Int32)(b) )
+#endif
+#endif
 
 
 
 
   /*************************************************************************/
   /*************************************************************************/
@@ -112,6 +299,18 @@ FT_BEGIN_HEADER
                               FT_Long           scaling );
                               FT_Long           scaling );
 
 
 
 
+  /*
+   *  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.
    *  Return -1, 0, or +1, depending on the orientation of a given corner.
    *  We use the Cartesian coordinate system, with positive vertical values
    *  We use the Cartesian coordinate system, with positive vertical values
@@ -124,10 +323,11 @@ FT_BEGIN_HEADER
                          FT_Pos  out_x,
                          FT_Pos  out_x,
                          FT_Pos  out_y );
                          FT_Pos  out_y );
 
 
+
   /*
   /*
    *  Return TRUE if a corner is flat or nearly flat.  This is equivalent to
    *  Return TRUE if a corner is flat or nearly flat.  This is equivalent to
-   *  saying that the angle difference between the `in' and `out' vectors is
-   *  very small.
+   *  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_BASE( FT_Int )
   ft_corner_is_flat( FT_Pos  in_x,
   ft_corner_is_flat( FT_Pos  in_x,
@@ -139,9 +339,31 @@ 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 ) )
+
+#if FT_SIZEOF_INT == 4
+
+#define FT_MSB( x )  ( 31 - __builtin_clz( x ) )
+
+#elif FT_SIZEOF_LONG == 4
+
+#define FT_MSB( x )  ( 31 - __builtin_clzl( x ) )
+
+#endif
+
+#endif /* __GNUC__ */
+#endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */
+
+#ifndef FT_MSB
+
   FT_BASE( FT_Int )
   FT_BASE( FT_Int )
   FT_MSB( FT_UInt32  z );
   FT_MSB( FT_UInt32  z );
 
 
+#endif
+
 
 
   /*
   /*
    *  Return sqrt(x*x+y*y), which is the same as `FT_Vector_Length' but uses
    *  Return sqrt(x*x+y*y), which is the same as `FT_Vector_Length' but uses
@@ -152,6 +374,31 @@ FT_BEGIN_HEADER
             FT_Fixed  y );
             FT_Fixed  y );
 
 
 
 
+#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.                                    */
+  /*                                                                       */
+  FT_BASE( FT_Int32 )
+  FT_SqrtFixed( FT_Int32  x );
+
+#endif /* 0 */
+
+
 #define INT_TO_F26DOT6( x )    ( (FT_Long)(x) << 6  )
 #define INT_TO_F26DOT6( x )    ( (FT_Long)(x) << 6  )
 #define INT_TO_F2DOT14( x )    ( (FT_Long)(x) << 14 )
 #define INT_TO_F2DOT14( x )    ( (FT_Long)(x) << 14 )
 #define INT_TO_FIXED( x )      ( (FT_Long)(x) << 16 )
 #define INT_TO_FIXED( x )      ( (FT_Long)(x) << 16 )
@@ -165,7 +412,7 @@ FT_BEGIN_HEADER
 
 
 FT_END_HEADER
 FT_END_HEADER
 
 
-#endif /* __FTCALC_H__ */
+#endif /* FTCALC_H_ */
 
 
 
 
 /* END */
 /* END */

+ 5 - 5
Source/ThirdParty/FreeType/include/freetype/internal/ftdebug.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    Debugging and logging component (specification).                     */
 /*    Debugging and logging component (specification).                     */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2002, 2004, 2006-2009, 2013 by                          */
+/*  Copyright 1996-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -21,8 +21,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __FTDEBUG_H__
-#define __FTDEBUG_H__
+#ifndef FTDEBUG_H_
+#define FTDEBUG_H_
 
 
 
 
 #include <ft2build.h>
 #include <ft2build.h>
@@ -140,7 +140,7 @@ FT_BEGIN_HEADER
   /*    This function may be useful if you want to control FreeType 2's    */
   /*    This function may be useful if you want to control FreeType 2's    */
   /*    debug level in your application.                                   */
   /*    debug level in your application.                                   */
   /*                                                                       */
   /*                                                                       */
-  FT_BASE( const char * )
+  FT_BASE( const char* )
   FT_Trace_Get_Name( FT_Int  idx );
   FT_Trace_Get_Name( FT_Int  idx );
 
 
 
 
@@ -249,7 +249,7 @@ FT_BEGIN_HEADER
 
 
 FT_END_HEADER
 FT_END_HEADER
 
 
-#endif /* __FTDEBUG_H__ */
+#endif /* FTDEBUG_H_ */
 
 
 
 
 /* END */
 /* END */

+ 5 - 14
Source/ThirdParty/FreeType/include/freetype/internal/ftdriver.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType font driver interface (specification).                      */
 /*    FreeType font driver interface (specification).                      */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2003, 2006, 2008, 2011-2013 by                          */
+/*  Copyright 1996-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -16,8 +16,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __FTDRIVER_H__
-#define __FTDRIVER_H__
+#ifndef FTDRIVER_H_
+#define FTDRIVER_H_
 
 
 
 
 #include <ft2build.h>
 #include <ft2build.h>
@@ -67,15 +67,6 @@ FT_BEGIN_HEADER
                        FT_Int32      load_flags );
                        FT_Int32      load_flags );
 
 
 
 
-  typedef FT_UInt
-  (*FT_CharMap_CharIndexFunc)( FT_CharMap  charmap,
-                               FT_Long     charcode );
-
-  typedef FT_Long
-  (*FT_CharMap_CharNextFunc)( FT_CharMap  charmap,
-                              FT_Long     charcode );
-
-
   typedef FT_Error
   typedef FT_Error
   (*FT_Face_GetKerningFunc)( FT_Face     face,
   (*FT_Face_GetKerningFunc)( FT_Face     face,
                              FT_UInt     left_glyph,
                              FT_UInt     left_glyph,
@@ -213,7 +204,7 @@ FT_BEGIN_HEADER
   /*    And when it is no longer needed a `destroy' function needs to be   */
   /*    And when it is no longer needed a `destroy' function needs to be   */
   /*    called to release that allocation.                                 */
   /*    called to release that allocation.                                 */
   /*                                                                       */
   /*                                                                       */
-  /*    `fcinit.c' (ft_create_default_module_classes) already contains a   */
+  /*    `ftinit.c' (ft_create_default_module_classes) already contains a   */
   /*    mechanism to call these functions for the default modules          */
   /*    mechanism to call these functions for the default modules          */
   /*    described in `ftmodule.h'.                                         */
   /*    described in `ftmodule.h'.                                         */
   /*                                                                       */
   /*                                                                       */
@@ -403,7 +394,7 @@ FT_BEGIN_HEADER
 
 
 FT_END_HEADER
 FT_END_HEADER
 
 
-#endif /* __FTDRIVER_H__ */
+#endif /* FTDRIVER_H_ */
 
 
 
 
 /* END */
 /* END */

+ 22 - 36
Source/ThirdParty/FreeType/include/freetype/internal/ftgloadr.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    The FreeType glyph loader (specification).                           */
 /*    The FreeType glyph loader (specification).                           */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2002, 2003, 2005, 2006 by                                    */
+/*  Copyright 2002-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg                       */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg                       */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -16,8 +16,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __FTGLOADR_H__
-#define __FTGLOADR_H__
+#ifndef FTGLOADR_H_
+#define FTGLOADR_H_
 
 
 
 
 #include <ft2build.h>
 #include <ft2build.h>
@@ -36,24 +36,6 @@ FT_BEGIN_HEADER
   /*    The glyph loader is an internal object used to load several glyphs */
   /*    The glyph loader is an internal object used to load several glyphs */
   /*    together (for example, in the case of composites).                 */
   /*    together (for example, in the case of composites).                 */
   /*                                                                       */
   /*                                                                       */
-  /* <Note>                                                                */
-  /*    The glyph loader implementation is not part of the high-level API, */
-  /*    hence the forward structure declaration.                           */
-  /*                                                                       */
-  typedef struct FT_GlyphLoaderRec_*  FT_GlyphLoader ;
-
-
-#if 0  /* moved to freetype.h in version 2.2 */
-#define FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS          1
-#define FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES      2
-#define FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID        4
-#define FT_SUBGLYPH_FLAG_SCALE                   8
-#define FT_SUBGLYPH_FLAG_XY_SCALE             0x40
-#define FT_SUBGLYPH_FLAG_2X2                  0x80
-#define FT_SUBGLYPH_FLAG_USE_MY_METRICS      0x200
-#endif
-
-
   typedef struct  FT_SubGlyphRec_
   typedef struct  FT_SubGlyphRec_
   {
   {
     FT_Int     index;
     FT_Int     index;
@@ -89,7 +71,7 @@ FT_BEGIN_HEADER
 
 
     void*            other;            /* for possible future extension? */
     void*            other;            /* for possible future extension? */
 
 
-  } FT_GlyphLoaderRec;
+  } FT_GlyphLoaderRec, *FT_GlyphLoader;
 
 
 
 
   /* create new empty glyph loader */
   /* create new empty glyph loader */
@@ -121,21 +103,25 @@ FT_BEGIN_HEADER
                               FT_UInt         n_contours );
                               FT_UInt         n_contours );
 
 
 
 
-#define FT_GLYPHLOADER_CHECK_P( _loader, _count )                         \
-   ( (_count) == 0 || ((_loader)->base.outline.n_points    +              \
-                       (_loader)->current.outline.n_points +              \
-                       (unsigned long)(_count)) <= (_loader)->max_points )
+#define FT_GLYPHLOADER_CHECK_P( _loader, _count )       \
+  ( (_count) == 0                                    || \
+    ( (FT_UInt)(_loader)->base.outline.n_points    +    \
+      (FT_UInt)(_loader)->current.outline.n_points +    \
+      (FT_UInt)(_count) ) <= (_loader)->max_points   )
 
 
-#define FT_GLYPHLOADER_CHECK_C( _loader, _count )                          \
-  ( (_count) == 0 || ((_loader)->base.outline.n_contours    +              \
-                      (_loader)->current.outline.n_contours +              \
-                      (unsigned long)(_count)) <= (_loader)->max_contours )
+#define FT_GLYPHLOADER_CHECK_C( _loader, _count )         \
+  ( (_count) == 0                                      || \
+    ( (FT_UInt)(_loader)->base.outline.n_contours    +    \
+      (FT_UInt)(_loader)->current.outline.n_contours +    \
+      (FT_UInt)(_count) ) <= (_loader)->max_contours   )
 
 
-#define FT_GLYPHLOADER_CHECK_POINTS( _loader, _points,_contours )      \
-  ( ( FT_GLYPHLOADER_CHECK_P( _loader, _points )   &&                  \
-      FT_GLYPHLOADER_CHECK_C( _loader, _contours ) )                   \
-    ? 0                                                                \
-    : FT_GlyphLoader_CheckPoints( (_loader), (_points), (_contours) ) )
+#define FT_GLYPHLOADER_CHECK_POINTS( _loader, _points, _contours ) \
+  ( ( FT_GLYPHLOADER_CHECK_P( _loader, _points )   &&              \
+      FT_GLYPHLOADER_CHECK_C( _loader, _contours ) )               \
+    ? 0                                                            \
+    : FT_GlyphLoader_CheckPoints( (_loader),                       \
+                                  (FT_UInt)(_points),              \
+                                  (FT_UInt)(_contours) ) )
 
 
 
 
   /* check that there is enough space to add `n_subs' sub-glyphs to */
   /* check that there is enough space to add `n_subs' sub-glyphs to */
@@ -162,7 +148,7 @@ FT_BEGIN_HEADER
 
 
 FT_END_HEADER
 FT_END_HEADER
 
 
-#endif /* __FTGLOADR_H__ */
+#endif /* FTGLOADR_H_ */
 
 
 
 
 /* END */
 /* END */

+ 136 - 0
Source/ThirdParty/FreeType/include/freetype/internal/fthash.h

@@ -0,0 +1,136 @@
+/***************************************************************************/
+/*                                                                         */
+/*  fthash.h                                                               */
+/*                                                                         */
+/*    Hashing functions (specification).                                   */
+/*                                                                         */
+/***************************************************************************/
+
+/*
+ * Copyright 2000 Computing Research Labs, New Mexico State University
+ * Copyright 2001-2015
+ *   Francesco Zappa Nardelli
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COMPUTING RESEARCH LAB OR NEW MEXICO STATE UNIVERSITY BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
+ * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * 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                            */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+#ifndef FTHASH_H_
+#define FTHASH_H_
+
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+
+FT_BEGIN_HEADER
+
+
+  typedef union  FT_Hashkey_
+  {
+    FT_Int       num;
+    const char*  str;
+
+  } FT_Hashkey;
+
+
+  typedef struct  FT_HashnodeRec_
+  {
+    FT_Hashkey  key;
+    size_t      data;
+
+  } FT_HashnodeRec;
+
+  typedef struct FT_HashnodeRec_  *FT_Hashnode;
+
+
+  typedef FT_ULong
+  (*FT_Hash_LookupFunc)( FT_Hashkey*  key );
+
+  typedef FT_Bool
+  (*FT_Hash_CompareFunc)( FT_Hashkey*  a,
+                          FT_Hashkey*  b );
+
+
+  typedef struct  FT_HashRec_
+  {
+    FT_UInt  limit;
+    FT_UInt  size;
+    FT_UInt  used;
+
+    FT_Hash_LookupFunc   lookup;
+    FT_Hash_CompareFunc  compare;
+
+    FT_Hashnode*  table;
+
+  } FT_HashRec;
+
+  typedef struct FT_HashRec_  *FT_Hash;
+
+
+  FT_Error
+  ft_hash_str_init( FT_Hash    hash,
+                    FT_Memory  memory );
+
+  FT_Error
+  ft_hash_num_init( FT_Hash    hash,
+                    FT_Memory  memory );
+
+  void
+  ft_hash_str_free( FT_Hash    hash,
+                    FT_Memory  memory );
+
+#define ft_hash_num_free  ft_hash_str_free
+
+  FT_Error
+  ft_hash_str_insert( const char*  key,
+                      size_t       data,
+                      FT_Hash      hash,
+                      FT_Memory    memory );
+
+  FT_Error
+  ft_hash_num_insert( FT_Int     num,
+                      size_t     data,
+                      FT_Hash    hash,
+                      FT_Memory  memory );
+
+  size_t*
+  ft_hash_str_lookup( const char*  key,
+                      FT_Hash      hash );
+
+  size_t*
+  ft_hash_num_lookup( FT_Int   num,
+                      FT_Hash  hash );
+
+
+FT_END_HEADER
+
+
+#endif /* FTHASH_H_ */
+
+
+/* END */

+ 31 - 16
Source/ThirdParty/FreeType/include/freetype/internal/ftmemory.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    The FreeType memory management macros (specification).               */
 /*    The FreeType memory management macros (specification).               */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2002, 2004-2007, 2010, 2013 by                          */
+/*  Copyright 1996-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg                       */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg                       */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -16,8 +16,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __FTMEMORY_H__
-#define __FTMEMORY_H__
+#ifndef FTMEMORY_H_
+#define FTMEMORY_H_
 
 
 
 
 #include <ft2build.h>
 #include <ft2build.h>
@@ -65,13 +65,15 @@ FT_BEGIN_HEADER
 
 
 #ifdef __cplusplus
 #ifdef __cplusplus
 
 
-  extern "C++"
+extern "C++"
+{
   template <typename T> inline T*
   template <typename T> inline T*
   cplusplus_typeof(        T*,
   cplusplus_typeof(        T*,
                     void  *v )
                     void  *v )
   {
   {
     return static_cast <T*> ( v );
     return static_cast <T*> ( v );
   }
   }
+}
 
 
 #define FT_ASSIGNP( p, val )  (p) = cplusplus_typeof( (p), (val) )
 #define FT_ASSIGNP( p, val )  (p) = cplusplus_typeof( (p), (val) )
 
 
@@ -106,10 +108,12 @@ FT_BEGIN_HEADER
 
 
   /*
   /*
    *  The allocation functions return a pointer, and the error code
    *  The allocation functions return a pointer, and the error code
-   *  is written to through the `p_error' parameter.  See below for
-   *  for documentation.
+   *  is written to through the `p_error' parameter.
    */
    */
 
 
+  /* The `q' variants of the functions below (`q' for `quick') don't fill */
+  /* the allocated or reallocated memory with zero bytes.                 */
+
   FT_BASE( FT_Pointer )
   FT_BASE( FT_Pointer )
   ft_mem_alloc( FT_Memory  memory,
   ft_mem_alloc( FT_Memory  memory,
                 FT_Long    size,
                 FT_Long    size,
@@ -141,6 +145,9 @@ FT_BEGIN_HEADER
                const void*  P );
                const void*  P );
 
 
 
 
+  /* The `Q' variants of the macros below (`Q' for `quick') don't fill */
+  /* the allocated or reallocated memory with zero bytes.              */
+
 #define FT_MEM_ALLOC( ptr, size )                               \
 #define FT_MEM_ALLOC( ptr, size )                               \
           FT_ASSIGNP_INNER( ptr, ft_mem_alloc( memory,          \
           FT_ASSIGNP_INNER( ptr, ft_mem_alloc( memory,          \
                                                (FT_Long)(size), \
                                                (FT_Long)(size), \
@@ -215,11 +222,14 @@ FT_BEGIN_HEADER
 #define FT_MEM_SET_ERROR( cond )  ( (cond), error != 0 )
 #define FT_MEM_SET_ERROR( cond )  ( (cond), error != 0 )
 
 
 
 
-#define FT_MEM_SET( dest, byte, count )     ft_memset( dest, byte, count )
+#define FT_MEM_SET( dest, byte, count )               \
+          ft_memset( dest, byte, (FT_Offset)(count) )
 
 
-#define FT_MEM_COPY( dest, source, count )  ft_memcpy( dest, source, count )
+#define FT_MEM_COPY( dest, source, count )              \
+          ft_memcpy( dest, source, (FT_Offset)(count) )
 
 
-#define FT_MEM_MOVE( dest, source, count )  ft_memmove( dest, source, count )
+#define FT_MEM_MOVE( dest, source, count )               \
+          ft_memmove( dest, source, (FT_Offset)(count) )
 
 
 
 
 #define FT_MEM_ZERO( dest, count )  FT_MEM_SET( dest, 0, count )
 #define FT_MEM_ZERO( dest, count )  FT_MEM_SET( dest, 0, count )
@@ -227,14 +237,19 @@ FT_BEGIN_HEADER
 #define FT_ZERO( p )                FT_MEM_ZERO( p, sizeof ( *(p) ) )
 #define FT_ZERO( p )                FT_MEM_ZERO( p, sizeof ( *(p) ) )
 
 
 
 
-#define FT_ARRAY_ZERO( dest, count )                        \
-          FT_MEM_ZERO( dest, (count) * sizeof ( *(dest) ) )
+#define FT_ARRAY_ZERO( dest, count )                             \
+          FT_MEM_ZERO( dest,                                     \
+                       (FT_Offset)(count) * sizeof ( *(dest) ) )
 
 
-#define FT_ARRAY_COPY( dest, source, count )                        \
-          FT_MEM_COPY( dest, source, (count) * sizeof ( *(dest) ) )
+#define FT_ARRAY_COPY( dest, source, count )                     \
+          FT_MEM_COPY( dest,                                     \
+                       source,                                   \
+                       (FT_Offset)(count) * sizeof ( *(dest) ) )
 
 
-#define FT_ARRAY_MOVE( dest, source, count )                        \
-          FT_MEM_MOVE( dest, source, (count) * sizeof ( *(dest) ) )
+#define FT_ARRAY_MOVE( dest, source, count )                     \
+          FT_MEM_MOVE( dest,                                     \
+                       source,                                   \
+                       (FT_Offset)(count) * sizeof ( *(dest) ) )
 
 
 
 
   /*
   /*
@@ -372,7 +387,7 @@ FT_BEGIN_HEADER
 
 
 FT_END_HEADER
 FT_END_HEADER
 
 
-#endif /* __FTMEMORY_H__ */
+#endif /* FTMEMORY_H_ */
 
 
 
 
 /* END */
 /* END */

+ 51 - 50
Source/ThirdParty/FreeType/include/freetype/internal/ftobjs.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    The FreeType private base classes (specification).                   */
 /*    The FreeType private base classes (specification).                   */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2006, 2008, 2010, 2012-2013 by                          */
+/*  Copyright 1996-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -23,8 +23,8 @@
   /*************************************************************************/
   /*************************************************************************/
 
 
 
 
-#ifndef __FTOBJS_H__
-#define __FTOBJS_H__
+#ifndef FTOBJS_H_
+#define FTOBJS_H_
 
 
 #include <ft2build.h>
 #include <ft2build.h>
 #include FT_RENDER_H
 #include FT_RENDER_H
@@ -72,24 +72,27 @@ FT_BEGIN_HEADER
 
 
 #define FT_ABS( a )     ( (a) < 0 ? -(a) : (a) )
 #define FT_ABS( a )     ( (a) < 0 ? -(a) : (a) )
 
 
-
-#define FT_PAD_FLOOR( x, n )  ( (x) & ~((n)-1) )
+  /*
+   *  Approximate sqrt(x*x+y*y) using the `alpha max plus beta min'
+   *  algorithm.  We use alpha = 1, beta = 3/8, giving us results with a
+   *  largest error less than 7% compared to the exact value.
+   */
+#define FT_HYPOT( x, y )                 \
+          ( x = FT_ABS( x ),             \
+            y = FT_ABS( y ),             \
+            x > y ? x + ( 3 * y >> 3 )   \
+                  : y + ( 3 * x >> 3 ) )
+
+  /* we use FT_TYPEOF to suppress signedness compilation warnings */
+#define FT_PAD_FLOOR( x, n )  ( (x) & ~FT_TYPEOF( x )( (n)-1 ) )
 #define FT_PAD_ROUND( x, n )  FT_PAD_FLOOR( (x) + ((n)/2), n )
 #define FT_PAD_ROUND( x, n )  FT_PAD_FLOOR( (x) + ((n)/2), n )
 #define FT_PAD_CEIL( x, n )   FT_PAD_FLOOR( (x) + ((n)-1), n )
 #define FT_PAD_CEIL( x, n )   FT_PAD_FLOOR( (x) + ((n)-1), n )
 
 
-#define FT_PIX_FLOOR( x )     ( (x) & ~63 )
+#define FT_PIX_FLOOR( x )     ( (x) & ~FT_TYPEOF( x )63 )
 #define FT_PIX_ROUND( x )     FT_PIX_FLOOR( (x) + 32 )
 #define FT_PIX_ROUND( x )     FT_PIX_FLOOR( (x) + 32 )
 #define FT_PIX_CEIL( x )      FT_PIX_FLOOR( (x) + 63 )
 #define FT_PIX_CEIL( x )      FT_PIX_FLOOR( (x) + 63 )
 
 
 
 
-  /*
-   *  Return the highest power of 2 that is <= value; this correspond to
-   *  the highest bit in a given 32-bit value.
-   */
-  FT_BASE( FT_UInt32 )
-  ft_highpow2( FT_UInt32  value );
-
-
   /*
   /*
    *  character classification functions -- since these are used to parse
    *  character classification functions -- since these are used to parse
    *  font files, we must not use those in <ctypes.h> which are
    *  font files, we must not use those in <ctypes.h> which are
@@ -190,6 +193,7 @@ FT_BEGIN_HEADER
   typedef struct  FT_CMap_ClassRec_
   typedef struct  FT_CMap_ClassRec_
   {
   {
     FT_ULong               size;
     FT_ULong               size;
+
     FT_CMap_InitFunc       init;
     FT_CMap_InitFunc       init;
     FT_CMap_DoneFunc       done;
     FT_CMap_DoneFunc       done;
     FT_CMap_CharIndexFunc  char_index;
     FT_CMap_CharIndexFunc  char_index;
@@ -338,12 +342,6 @@ FT_BEGIN_HEADER
   /*      this data when first opened.  This field exists only if          */
   /*      this data when first opened.  This field exists only if          */
   /*      @FT_CONFIG_OPTION_INCREMENTAL is defined.                        */
   /*      @FT_CONFIG_OPTION_INCREMENTAL is defined.                        */
   /*                                                                       */
   /*                                                                       */
-  /*    ignore_unpatented_hinter ::                                        */
-  /*      This boolean flag instructs the glyph loader to ignore the       */
-  /*      native font hinter, if one is found.  This is exclusively used   */
-  /*      in the case when the unpatented hinter is compiled within the    */
-  /*      library.                                                         */
-  /*                                                                       */
   /*    refcount ::                                                        */
   /*    refcount ::                                                        */
   /*      A counter initialized to~1 at the time an @FT_Face structure is  */
   /*      A counter initialized to~1 at the time an @FT_Face structure is  */
   /*      created.  @FT_Reference_Face increments this counter, and        */
   /*      created.  @FT_Reference_Face increments this counter, and        */
@@ -362,7 +360,6 @@ FT_BEGIN_HEADER
     FT_Incremental_InterfaceRec*  incremental_interface;
     FT_Incremental_InterfaceRec*  incremental_interface;
 #endif
 #endif
 
 
-    FT_Bool             ignore_unpatented_hinter;
     FT_Int              refcount;
     FT_Int              refcount;
 
 
   } FT_Face_InternalRec;
   } FT_Face_InternalRec;
@@ -402,7 +399,7 @@ FT_BEGIN_HEADER
   /*    glyph_hints       :: Format-specific glyph hints management.       */
   /*    glyph_hints       :: Format-specific glyph hints management.       */
   /*                                                                       */
   /*                                                                       */
 
 
-#define FT_GLYPH_OWN_BITMAP  0x1
+#define FT_GLYPH_OWN_BITMAP  0x1U
 
 
   typedef struct  FT_Slot_InternalRec_
   typedef struct  FT_Slot_InternalRec_
   {
   {
@@ -503,6 +500,9 @@ FT_BEGIN_HEADER
 #define FT_DRIVER_HAS_HINTER( x )  ( FT_MODULE_CLASS( x )->module_flags & \
 #define FT_DRIVER_HAS_HINTER( x )  ( FT_MODULE_CLASS( x )->module_flags & \
                                      FT_MODULE_DRIVER_HAS_HINTER )
                                      FT_MODULE_DRIVER_HAS_HINTER )
 
 
+#define FT_DRIVER_HINTS_LIGHTLY( x )  ( FT_MODULE_CLASS( x )->module_flags & \
+                                        FT_MODULE_DRIVER_HINTS_LIGHTLY )
+
 
 
   /*************************************************************************/
   /*************************************************************************/
   /*                                                                       */
   /*                                                                       */
@@ -531,7 +531,16 @@ FT_BEGIN_HEADER
 
 
   FT_BASE( FT_Pointer )
   FT_BASE( FT_Pointer )
   ft_module_get_service( FT_Module    module,
   ft_module_get_service( FT_Module    module,
-                         const char*  service_id );
+                         const char*  service_id,
+                         FT_Bool      global );
+
+#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
+  FT_BASE( FT_Error )
+  ft_property_string_set( FT_Library        library,
+                          const FT_String*  module_name,
+                          const FT_String*  property_name,
+                          FT_String*        value );
+#endif
 
 
   /* */
   /* */
 
 
@@ -611,12 +620,12 @@ FT_BEGIN_HEADER
 
 
 #define FT_REQUEST_WIDTH( req )                                            \
 #define FT_REQUEST_WIDTH( req )                                            \
           ( (req)->horiResolution                                          \
           ( (req)->horiResolution                                          \
-              ? (FT_Pos)( (req)->width * (req)->horiResolution + 36 ) / 72 \
+              ? ( (req)->width * (FT_Pos)(req)->horiResolution + 36 ) / 72 \
               : (req)->width )
               : (req)->width )
 
 
 #define FT_REQUEST_HEIGHT( req )                                            \
 #define FT_REQUEST_HEIGHT( req )                                            \
           ( (req)->vertResolution                                           \
           ( (req)->vertResolution                                           \
-              ? (FT_Pos)( (req)->height * (req)->vertResolution + 36 ) / 72 \
+              ? ( (req)->height * (FT_Pos)(req)->vertResolution + 36 ) / 72 \
               : (req)->height )
               : (req)->height )
 
 
 
 
@@ -738,9 +747,8 @@ FT_BEGIN_HEADER
   /*     faces_list   :: The list of faces currently opened by this        */
   /*     faces_list   :: The list of faces currently opened by this        */
   /*                     driver.                                           */
   /*                     driver.                                           */
   /*                                                                       */
   /*                                                                       */
-  /*     glyph_loader :: The glyph loader for all faces managed by this    */
-  /*                     driver.  This object isn't defined for unscalable */
-  /*                     formats.                                          */
+  /*     glyph_loader :: Unused.  Used to be glyph loader for all faces    */
+  /*                     managed by this driver.                           */
   /*                                                                       */
   /*                                                                       */
   typedef struct  FT_DriverRec_
   typedef struct  FT_DriverRec_
   {
   {
@@ -770,13 +778,6 @@ FT_BEGIN_HEADER
 #define FT_DEBUG_HOOK_TRUETYPE            0
 #define FT_DEBUG_HOOK_TRUETYPE            0
 
 
 
 
-  /* Set this debug hook to a non-null pointer to force unpatented hinting */
-  /* for all faces when both TT_USE_BYTECODE_INTERPRETER and               */
-  /* TT_CONFIG_OPTION_UNPATENTED_HINTING are defined.  This is only used   */
-  /* during debugging.                                                     */
-#define FT_DEBUG_HOOK_UNPATENTED_HINTING  1
-
-
   typedef void  (*FT_Bitmap_LcdFilterFunc)( FT_Bitmap*      bitmap,
   typedef void  (*FT_Bitmap_LcdFilterFunc)( FT_Bitmap*      bitmap,
                                             FT_Render_Mode  render_mode,
                                             FT_Render_Mode  render_mode,
                                             FT_Library      library );
                                             FT_Library      library );
@@ -842,7 +843,7 @@ FT_BEGIN_HEADER
   /*                        filtering callback function.                   */
   /*                        filtering callback function.                   */
   /*                                                                       */
   /*                                                                       */
   /*    pic_container    :: Contains global structs and tables, instead    */
   /*    pic_container    :: Contains global structs and tables, instead    */
-  /*                        of defining them globallly.                    */
+  /*                        of defining them globally.                     */
   /*                                                                       */
   /*                                                                       */
   /*    refcount         :: A counter initialized to~1 at the time an      */
   /*    refcount         :: A counter initialized to~1 at the time an      */
   /*                        @FT_Library structure is created.              */
   /*                        @FT_Library structure is created.              */
@@ -875,7 +876,7 @@ FT_BEGIN_HEADER
 #ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
 #ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
     FT_LcdFilter             lcd_filter;
     FT_LcdFilter             lcd_filter;
     FT_Int                   lcd_extra;        /* number of extra pixels */
     FT_Int                   lcd_extra;        /* number of extra pixels */
-    FT_Byte                  lcd_weights[7];   /* filter weights, if any */
+    FT_Byte                  lcd_weights[5];   /* filter weights, if any */
     FT_Bitmap_LcdFilterFunc  lcd_filter_func;  /* filtering callback     */
     FT_Bitmap_LcdFilterFunc  lcd_filter_func;  /* filtering callback     */
 #endif
 #endif
 
 
@@ -980,8 +981,8 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /*                                                                       */
   /* <Description>                                                         */
   /* <Description>                                                         */
   /*    Used to initialize an instance of FT_Outline_Funcs struct.         */
   /*    Used to initialize an instance of FT_Outline_Funcs struct.         */
-  /*    When FT_CONFIG_OPTION_PIC is defined an init funtion will need to  */
-  /*    be called with a pre-allocated structure to be filled.             */
+  /*    When FT_CONFIG_OPTION_PIC is defined an init function will need    */
+  /*    to be called with a pre-allocated structure to be filled.          */
   /*    When FT_CONFIG_OPTION_PIC is not defined the struct will be        */
   /*    When FT_CONFIG_OPTION_PIC is not defined the struct will be        */
   /*    allocated in the global scope (or the scope where the macro        */
   /*    allocated in the global scope (or the scope where the macro        */
   /*    is used).                                                          */
   /*    is used).                                                          */
@@ -1039,8 +1040,8 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /*                                                                       */
   /* <Description>                                                         */
   /* <Description>                                                         */
   /*    Used to initialize an instance of FT_Raster_Funcs struct.          */
   /*    Used to initialize an instance of FT_Raster_Funcs struct.          */
-  /*    When FT_CONFIG_OPTION_PIC is defined an init funtion will need to  */
-  /*    be called with a pre-allocated structure to be filled.             */
+  /*    When FT_CONFIG_OPTION_PIC is defined an init function will need    */
+  /*    to be called with a pre-allocated structure to be filled.          */
   /*    When FT_CONFIG_OPTION_PIC is not defined the struct will be        */
   /*    When FT_CONFIG_OPTION_PIC is not defined the struct will be        */
   /*    allocated in the global scope (or the scope where the macro        */
   /*    allocated in the global scope (or the scope where the macro        */
   /*    is used).                                                          */
   /*    is used).                                                          */
@@ -1099,8 +1100,8 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /*                                                                       */
   /* <Description>                                                         */
   /* <Description>                                                         */
   /*    Used to initialize an instance of FT_Glyph_Class struct.           */
   /*    Used to initialize an instance of FT_Glyph_Class struct.           */
-  /*    When FT_CONFIG_OPTION_PIC is defined an init funtion will need to  */
-  /*    be called with a pre-allocated stcture to be filled.               */
+  /*    When FT_CONFIG_OPTION_PIC is defined an init function will need    */
+  /*    to be called with a pre-allocated structure to be filled.          */
   /*    When FT_CONFIG_OPTION_PIC is not defined the struct will be        */
   /*    When FT_CONFIG_OPTION_PIC is not defined the struct will be        */
   /*    allocated in the global scope (or the scope where the macro        */
   /*    allocated in the global scope (or the scope where the macro        */
   /*    is used).                                                          */
   /*    is used).                                                          */
@@ -1173,11 +1174,11 @@ FT_BEGIN_HEADER
   /* <Description>                                                         */
   /* <Description>                                                         */
   /*    Used to initialize an instance of FT_Renderer_Class struct.        */
   /*    Used to initialize an instance of FT_Renderer_Class struct.        */
   /*                                                                       */
   /*                                                                       */
-  /*    When FT_CONFIG_OPTION_PIC is defined a `create' funtion will need  */
-  /*    to be called with a pointer where the allocated structure is       */
+  /*    When FT_CONFIG_OPTION_PIC is defined a `create' function will      */
+  /*    need to be called with a pointer where the allocated structure is  */
   /*    returned.  And when it is no longer needed a `destroy' function    */
   /*    returned.  And when it is no longer needed a `destroy' function    */
   /*    needs to be called to release that allocation.                     */
   /*    needs to be called to release that allocation.                     */
-  /*    `fcinit.c' (ft_create_default_module_classes) already contains     */
+  /*    `ftinit.c' (ft_create_default_module_classes) already contains     */
   /*    a mechanism to call these functions for the default modules        */
   /*    a mechanism to call these functions for the default modules        */
   /*    described in `ftmodule.h'.                                         */
   /*    described in `ftmodule.h'.                                         */
   /*                                                                       */
   /*                                                                       */
@@ -1377,11 +1378,11 @@ FT_BEGIN_HEADER
   /* <Description>                                                         */
   /* <Description>                                                         */
   /*    Used to initialize an instance of an FT_Module_Class struct.       */
   /*    Used to initialize an instance of an FT_Module_Class struct.       */
   /*                                                                       */
   /*                                                                       */
-  /*    When FT_CONFIG_OPTION_PIC is defined a `create' funtion needs to   */
-  /*    be called with a pointer where the allocated structure is          */
+  /*    When FT_CONFIG_OPTION_PIC is defined a `create' function needs     */
+  /*    to be called with a pointer where the allocated structure is       */
   /*    returned.  And when it is no longer needed a `destroy' function    */
   /*    returned.  And when it is no longer needed a `destroy' function    */
   /*    needs to be called to release that allocation.                     */
   /*    needs to be called to release that allocation.                     */
-  /*    `fcinit.c' (ft_create_default_module_classes) already contains     */
+  /*    `ftinit.c' (ft_create_default_module_classes) already contains     */
   /*    a mechanism to call these functions for the default modules        */
   /*    a mechanism to call these functions for the default modules        */
   /*    described in `ftmodule.h'.                                         */
   /*    described in `ftmodule.h'.                                         */
   /*                                                                       */
   /*                                                                       */
@@ -1563,7 +1564,7 @@ FT_BEGIN_HEADER
 
 
 FT_END_HEADER
 FT_END_HEADER
 
 
-#endif /* __FTOBJS_H__ */
+#endif /* FTOBJS_H_ */
 
 
 
 
 /* END */
 /* END */

+ 4 - 4
Source/ThirdParty/FreeType/include/freetype/internal/ftpic.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    The FreeType position independent code services (declaration).       */
 /*    The FreeType position independent code services (declaration).       */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2009, 2012 by                                                */
+/*  Copyright 2009-2016 by                                                 */
 /*  Oran Agra and Mickey Gabel.                                            */
 /*  Oran Agra and Mickey Gabel.                                            */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -23,8 +23,8 @@
   /*************************************************************************/
   /*************************************************************************/
 
 
 
 
-#ifndef __FTPIC_H__
-#define __FTPIC_H__
+#ifndef FTPIC_H_
+#define FTPIC_H_
 
 
 
 
 FT_BEGIN_HEADER
 FT_BEGIN_HEADER
@@ -65,7 +65,7 @@ FT_BEGIN_HEADER
 
 
 FT_END_HEADER
 FT_END_HEADER
 
 
-#endif /* __FTPIC_H__ */
+#endif /* FTPIC_H_ */
 
 
 
 
 /* END */
 /* END */

+ 17 - 8
Source/ThirdParty/FreeType/include/freetype/internal/ftrfork.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    Embedded resource forks accessor (specification).                    */
 /*    Embedded resource forks accessor (specification).                    */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2004, 2006, 2007, 2012 by                                    */
+/*  Copyright 2004-2016 by                                                 */
 /*  Masatake YAMATO and Redhat K.K.                                        */
 /*  Masatake YAMATO and Redhat K.K.                                        */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -21,8 +21,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __FTRFORK_H__
-#define __FTRFORK_H__
+#ifndef FTRFORK_H_
+#define FTRFORK_H_
 
 
 
 
 #include <ft2build.h>
 #include <ft2build.h>
@@ -43,11 +43,12 @@ FT_BEGIN_HEADER
 
 
   typedef struct  FT_RFork_Ref_
   typedef struct  FT_RFork_Ref_
   {
   {
-    FT_UShort  res_id;
-    FT_ULong   offset;
+    FT_Short  res_id;
+    FT_Long   offset;
 
 
   } FT_RFork_Ref;
   } FT_RFork_Ref;
 
 
+
 #ifdef FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK
 #ifdef FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK
   typedef FT_Error
   typedef FT_Error
   (*ft_raccess_guess_func)( FT_Library  library,
   (*ft_raccess_guess_func)( FT_Library  library,
@@ -83,7 +84,7 @@ FT_BEGIN_HEADER
 
 
   /* this array is a storage in non-PIC mode, so ; is needed in END */
   /* this array is a storage in non-PIC mode, so ; is needed in END */
 #define CONST_FT_RFORK_RULE_ARRAY_BEGIN( name, type )  \
 #define CONST_FT_RFORK_RULE_ARRAY_BEGIN( name, type )  \
-          const type name[] = {
+          static const type name[] = {
 #define CONST_FT_RFORK_RULE_ARRAY_ENTRY( func_suffix, type_suffix )  \
 #define CONST_FT_RFORK_RULE_ARRAY_ENTRY( func_suffix, type_suffix )  \
           { raccess_guess_ ## func_suffix,                           \
           { raccess_guess_ ## func_suffix,                           \
             FT_RFork_Rule_ ## type_suffix },
             FT_RFork_Rule_ ## type_suffix },
@@ -94,7 +95,7 @@ FT_BEGIN_HEADER
   /* this array is a function in PIC mode, so no ; is needed in END */
   /* this array is a function in PIC mode, so no ; is needed in END */
 #define CONST_FT_RFORK_RULE_ARRAY_BEGIN( name, type )  \
 #define CONST_FT_RFORK_RULE_ARRAY_BEGIN( name, type )  \
           void                                         \
           void                                         \
-          FT_Init_ ## name( type*  storage )           \
+          FT_Init_Table_ ## name( type*  storage )     \
           {                                            \
           {                                            \
             type*  local = storage;                    \
             type*  local = storage;                    \
                                                        \
                                                        \
@@ -224,6 +225,13 @@ FT_BEGIN_HEADER
   /*    tag ::                                                             */
   /*    tag ::                                                             */
   /*      The resource 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>                                                              */
   /* <Output>                                                              */
   /*    offsets ::                                                         */
   /*    offsets ::                                                         */
   /*      The stream offsets for the resource data specified by `tag'.     */
   /*      The stream offsets for the resource data specified by `tag'.     */
@@ -246,13 +254,14 @@ FT_BEGIN_HEADER
                               FT_Long     map_offset,
                               FT_Long     map_offset,
                               FT_Long     rdata_pos,
                               FT_Long     rdata_pos,
                               FT_Long     tag,
                               FT_Long     tag,
+                              FT_Bool     sort_by_res_id,
                               FT_Long   **offsets,
                               FT_Long   **offsets,
                               FT_Long    *count );
                               FT_Long    *count );
 
 
 
 
 FT_END_HEADER
 FT_END_HEADER
 
 
-#endif /* __FTRFORK_H__ */
+#endif /* FTRFORK_H_ */
 
 
 
 
 /* END */
 /* END */

+ 102 - 22
Source/ThirdParty/FreeType/include/freetype/internal/ftserv.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    The FreeType services (specification only).                          */
 /*    The FreeType services (specification only).                          */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2003-2007, 2009, 2012, 2013 by                               */
+/*  Copyright 2003-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -28,8 +28,8 @@
   /*************************************************************************/
   /*************************************************************************/
 
 
 
 
-#ifndef __FTSERV_H__
-#define __FTSERV_H__
+#ifndef FTSERV_H_
+#define FTSERV_H_
 
 
 
 
 FT_BEGIN_HEADER
 FT_BEGIN_HEADER
@@ -109,27 +109,27 @@ FT_BEGIN_HEADER
    */
    */
 #ifdef __cplusplus
 #ifdef __cplusplus
 
 
-#define FT_FACE_FIND_GLOBAL_SERVICE( face, ptr, id )               \
-  FT_BEGIN_STMNT                                                   \
-    FT_Module    module = FT_MODULE( FT_FACE( face )->driver );    \
-    FT_Pointer   _tmp_;                                            \
-    FT_Pointer*  _pptr_ = (FT_Pointer*)&(ptr);                     \
-                                                                   \
-                                                                   \
-    _tmp_ = ft_module_get_service( module, FT_SERVICE_ID_ ## id ); \
-    *_pptr_ = _tmp_;                                               \
+#define FT_FACE_FIND_GLOBAL_SERVICE( face, ptr, id )                  \
+  FT_BEGIN_STMNT                                                      \
+    FT_Module    module = FT_MODULE( FT_FACE( face )->driver );       \
+    FT_Pointer   _tmp_;                                               \
+    FT_Pointer*  _pptr_ = (FT_Pointer*)&(ptr);                        \
+                                                                      \
+                                                                      \
+    _tmp_ = ft_module_get_service( module, FT_SERVICE_ID_ ## id, 1 ); \
+    *_pptr_ = _tmp_;                                                  \
   FT_END_STMNT
   FT_END_STMNT
 
 
 #else /* !C++ */
 #else /* !C++ */
 
 
-#define FT_FACE_FIND_GLOBAL_SERVICE( face, ptr, id )               \
-  FT_BEGIN_STMNT                                                   \
-    FT_Module   module = FT_MODULE( FT_FACE( face )->driver );     \
-    FT_Pointer  _tmp_;                                             \
-                                                                   \
-                                                                   \
-    _tmp_ = ft_module_get_service( module, FT_SERVICE_ID_ ## id ); \
-    ptr   = _tmp_;                                                 \
+#define FT_FACE_FIND_GLOBAL_SERVICE( face, ptr, id )                  \
+  FT_BEGIN_STMNT                                                      \
+    FT_Module   module = FT_MODULE( FT_FACE( face )->driver );        \
+    FT_Pointer  _tmp_;                                                \
+                                                                      \
+                                                                      \
+    _tmp_ = ft_module_get_service( module, FT_SERVICE_ID_ ## id, 1 ); \
+    ptr   = _tmp_;                                                    \
   FT_END_STMNT
   FT_END_STMNT
 
 
 #endif /* !C++ */
 #endif /* !C++ */
@@ -167,6 +167,7 @@ FT_BEGIN_HEADER
   /*    FT_DEFINE_SERVICEDESCREC5                                          */
   /*    FT_DEFINE_SERVICEDESCREC5                                          */
   /*    FT_DEFINE_SERVICEDESCREC6                                          */
   /*    FT_DEFINE_SERVICEDESCREC6                                          */
   /*    FT_DEFINE_SERVICEDESCREC7                                          */
   /*    FT_DEFINE_SERVICEDESCREC7                                          */
+  /*    FT_DEFINE_SERVICEDESCREC8                                          */
   /*                                                                       */
   /*                                                                       */
   /* <Description>                                                         */
   /* <Description>                                                         */
   /*    Used to initialize an array of FT_ServiceDescRec structures.       */
   /*    Used to initialize an array of FT_ServiceDescRec structures.       */
@@ -283,6 +284,28 @@ FT_BEGIN_HEADER
     { NULL, NULL }                                                          \
     { NULL, NULL }                                                          \
   };
   };
 
 
+#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 )                 \
+  static const FT_ServiceDescRec  class_[] =                                \
+  {                                                                         \
+    { serv_id_1, serv_data_1 },                                             \
+    { serv_id_2, serv_data_2 },                                             \
+    { serv_id_3, serv_data_3 },                                             \
+    { serv_id_4, serv_data_4 },                                             \
+    { serv_id_5, serv_data_5 },                                             \
+    { serv_id_6, serv_data_6 },                                             \
+    { serv_id_7, serv_data_7 },                                             \
+    { serv_id_8, serv_data_8 },                                             \
+    { NULL, NULL }                                                          \
+  };
+
 #else /* FT_CONFIG_OPTION_PIC */
 #else /* FT_CONFIG_OPTION_PIC */
 
 
 #define FT_DEFINE_SERVICEDESCREC1( class_,                                  \
 #define FT_DEFINE_SERVICEDESCREC1( class_,                                  \
@@ -593,6 +616,62 @@ FT_BEGIN_HEADER
     return FT_Err_Ok;                                                       \
     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;                                                       \
+  }
+
 #endif /* FT_CONFIG_OPTION_PIC */
 #endif /* FT_CONFIG_OPTION_PIC */
 
 
 
 
@@ -739,6 +818,7 @@ FT_BEGIN_HEADER
 #define FT_SERVICE_GLYPH_DICT_H         <freetype/internal/services/svgldict.h>
 #define FT_SERVICE_GLYPH_DICT_H         <freetype/internal/services/svgldict.h>
 #define FT_SERVICE_GX_VALIDATE_H        <freetype/internal/services/svgxval.h>
 #define FT_SERVICE_GX_VALIDATE_H        <freetype/internal/services/svgxval.h>
 #define FT_SERVICE_KERNING_H            <freetype/internal/services/svkern.h>
 #define FT_SERVICE_KERNING_H            <freetype/internal/services/svkern.h>
+#define FT_SERVICE_METRICS_VARIATIONS_H <freetype/internal/services/svmetric.h>
 #define FT_SERVICE_MULTIPLE_MASTERS_H   <freetype/internal/services/svmm.h>
 #define FT_SERVICE_MULTIPLE_MASTERS_H   <freetype/internal/services/svmm.h>
 #define FT_SERVICE_OPENTYPE_VALIDATE_H  <freetype/internal/services/svotval.h>
 #define FT_SERVICE_OPENTYPE_VALIDATE_H  <freetype/internal/services/svotval.h>
 #define FT_SERVICE_PFR_H                <freetype/internal/services/svpfr.h>
 #define FT_SERVICE_PFR_H                <freetype/internal/services/svpfr.h>
@@ -750,14 +830,14 @@ FT_BEGIN_HEADER
 #define FT_SERVICE_TRUETYPE_ENGINE_H    <freetype/internal/services/svtteng.h>
 #define FT_SERVICE_TRUETYPE_ENGINE_H    <freetype/internal/services/svtteng.h>
 #define FT_SERVICE_TT_CMAP_H            <freetype/internal/services/svttcmap.h>
 #define FT_SERVICE_TT_CMAP_H            <freetype/internal/services/svttcmap.h>
 #define FT_SERVICE_WINFNT_H             <freetype/internal/services/svwinfnt.h>
 #define FT_SERVICE_WINFNT_H             <freetype/internal/services/svwinfnt.h>
-#define FT_SERVICE_XFREE86_NAME_H       <freetype/internal/services/svxf86nm.h>
+#define FT_SERVICE_FONT_FORMAT_H        <freetype/internal/services/svfntfmt.h>
 #define FT_SERVICE_TRUETYPE_GLYF_H      <freetype/internal/services/svttglyf.h>
 #define FT_SERVICE_TRUETYPE_GLYF_H      <freetype/internal/services/svttglyf.h>
 
 
  /* */
  /* */
 
 
 FT_END_HEADER
 FT_END_HEADER
 
 
-#endif /* __FTSERV_H__ */
+#endif /* FTSERV_H_ */
 
 
 
 
 /* END */
 /* END */

+ 5 - 5
Source/ThirdParty/FreeType/include/freetype/internal/ftstream.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    Stream handling (specification).                                     */
 /*    Stream handling (specification).                                     */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2002, 2004-2006, 2011, 2013 by                          */
+/*  Copyright 1996-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -16,8 +16,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __FTSTREAM_H__
-#define __FTSTREAM_H__
+#ifndef FTSTREAM_H_
+#define FTSTREAM_H_
 
 
 
 
 #include <ft2build.h>
 #include <ft2build.h>
@@ -361,7 +361,7 @@ FT_BEGIN_HEADER
                   FT_Long    distance );
                   FT_Long    distance );
 
 
   /* return current stream position */
   /* return current stream position */
-  FT_BASE( FT_Long )
+  FT_BASE( FT_ULong )
   FT_Stream_Pos( FT_Stream  stream );
   FT_Stream_Pos( FT_Stream  stream );
 
 
   /* read bytes from a stream into a user-allocated buffer, returns an */
   /* read bytes from a stream into a user-allocated buffer, returns an */
@@ -530,7 +530,7 @@ FT_BEGIN_HEADER
 
 
 FT_END_HEADER
 FT_END_HEADER
 
 
-#endif /* __FTSTREAM_H__ */
+#endif /* FTSTREAM_H_ */
 
 
 
 
 /* END */
 /* END */

+ 3 - 1
Source/ThirdParty/FreeType/include/freetype/internal/fttrace.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    Tracing handling (specification only).                               */
 /*    Tracing handling (specification only).                               */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2002, 2004-2007, 2009, 2011-2013 by                          */
+/*  Copyright 2002-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -148,5 +148,7 @@ FT_TRACE_DEF( afcjk )
 FT_TRACE_DEF( aflatin )
 FT_TRACE_DEF( aflatin )
 FT_TRACE_DEF( aflatin2 )
 FT_TRACE_DEF( aflatin2 )
 FT_TRACE_DEF( afwarp )
 FT_TRACE_DEF( afwarp )
+FT_TRACE_DEF( afshaper )
+FT_TRACE_DEF( afglobal )
 
 
 /* END */
 /* END */

+ 14 - 16
Source/ThirdParty/FreeType/include/freetype/internal/ftvalid.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType validation support (specification).                         */
 /*    FreeType validation support (specification).                         */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2004, 2013 by                                                */
+/*  Copyright 2004-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -16,8 +16,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __FTVALID_H__
-#define __FTVALID_H__
+#ifndef FTVALID_H_
+#define FTVALID_H_
 
 
 #include <ft2build.h>
 #include <ft2build.h>
 #include FT_CONFIG_STANDARD_LIBRARY_H   /* for ft_setjmp and ft_longjmp */
 #include FT_CONFIG_STANDARD_LIBRARY_H   /* for ft_setjmp and ft_longjmp */
@@ -87,13 +87,13 @@ FT_BEGIN_HEADER
   /* validator structure */
   /* validator structure */
   typedef struct  FT_ValidatorRec_
   typedef struct  FT_ValidatorRec_
   {
   {
+    ft_jmp_buf          jump_buffer; /* used for exception handling      */
+
     const FT_Byte*      base;        /* address of table in memory       */
     const FT_Byte*      base;        /* address of table in memory       */
     const FT_Byte*      limit;       /* `base' + sizeof(table) in memory */
     const FT_Byte*      limit;       /* `base' + sizeof(table) in memory */
     FT_ValidationLevel  level;       /* validation level                 */
     FT_ValidationLevel  level;       /* validation level                 */
     FT_Error            error;       /* error returned. 0 means success  */
     FT_Error            error;       /* error returned. 0 means success  */
 
 
-    ft_jmp_buf          jump_buffer; /* used for exception handling      */
-
   } FT_ValidatorRec;
   } FT_ValidatorRec;
 
 
 #if defined( _MSC_VER )
 #if defined( _MSC_VER )
@@ -126,36 +126,34 @@ FT_BEGIN_HEADER
   /* Calls ft_validate_error.  Assumes that the `valid' local variable */
   /* Calls ft_validate_error.  Assumes that the `valid' local variable */
   /* holds a pointer to the current validator object.                  */
   /* holds a pointer to the current validator object.                  */
   /*                                                                   */
   /*                                                                   */
-  /* Use preprocessor prescan to pass FT_ERR_PREFIX.                   */
-  /*                                                                   */
-#define FT_INVALID( _prefix, _error )  FT_INVALID_( _prefix, _error )
-#define FT_INVALID_( _prefix, _error ) \
-          ft_validator_error( valid, _prefix ## _error )
+#define FT_INVALID( _error )  FT_INVALID_( _error )
+#define FT_INVALID_( _error ) \
+          ft_validator_error( valid, FT_THROW( _error ) )
 
 
   /* called when a broken table is detected */
   /* called when a broken table is detected */
 #define FT_INVALID_TOO_SHORT \
 #define FT_INVALID_TOO_SHORT \
-          FT_INVALID( FT_ERR_PREFIX, Invalid_Table )
+          FT_INVALID( Invalid_Table )
 
 
   /* called when an invalid offset is detected */
   /* called when an invalid offset is detected */
 #define FT_INVALID_OFFSET \
 #define FT_INVALID_OFFSET \
-          FT_INVALID( FT_ERR_PREFIX, Invalid_Offset )
+          FT_INVALID( Invalid_Offset )
 
 
   /* called when an invalid format/value is detected */
   /* called when an invalid format/value is detected */
 #define FT_INVALID_FORMAT \
 #define FT_INVALID_FORMAT \
-          FT_INVALID( FT_ERR_PREFIX, Invalid_Table )
+          FT_INVALID( Invalid_Table )
 
 
   /* called when an invalid glyph index is detected */
   /* called when an invalid glyph index is detected */
 #define FT_INVALID_GLYPH_ID \
 #define FT_INVALID_GLYPH_ID \
-          FT_INVALID( FT_ERR_PREFIX, Invalid_Glyph_Index )
+          FT_INVALID( Invalid_Glyph_Index )
 
 
   /* called when an invalid field value is detected */
   /* called when an invalid field value is detected */
 #define FT_INVALID_DATA \
 #define FT_INVALID_DATA \
-          FT_INVALID( FT_ERR_PREFIX, Invalid_Table )
+          FT_INVALID( Invalid_Table )
 
 
 
 
 FT_END_HEADER
 FT_END_HEADER
 
 
-#endif /* __FTVALID_H__ */
+#endif /* FTVALID_H_ */
 
 
 
 
 /* END */
 /* END */

+ 2 - 2
Source/ThirdParty/FreeType/include/freetype/internal/internal.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    Internal header files (specification only).                          */
 /*    Internal header files (specification only).                          */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2004, 2013 by                                           */
+/*  Copyright 1996-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -30,6 +30,7 @@
 #define FT_INTERNAL_MEMORY_H              <freetype/internal/ftmemory.h>
 #define FT_INTERNAL_MEMORY_H              <freetype/internal/ftmemory.h>
 #define FT_INTERNAL_DEBUG_H               <freetype/internal/ftdebug.h>
 #define FT_INTERNAL_DEBUG_H               <freetype/internal/ftdebug.h>
 #define FT_INTERNAL_CALC_H                <freetype/internal/ftcalc.h>
 #define FT_INTERNAL_CALC_H                <freetype/internal/ftcalc.h>
+#define FT_INTERNAL_HASH_H                <freetype/internal/fthash.h>
 #define FT_INTERNAL_DRIVER_H              <freetype/internal/ftdriver.h>
 #define FT_INTERNAL_DRIVER_H              <freetype/internal/ftdriver.h>
 #define FT_INTERNAL_TRACE_H               <freetype/internal/fttrace.h>
 #define FT_INTERNAL_TRACE_H               <freetype/internal/fttrace.h>
 #define FT_INTERNAL_GLYPH_LOADER_H        <freetype/internal/ftgloadr.h>
 #define FT_INTERNAL_GLYPH_LOADER_H        <freetype/internal/ftgloadr.h>
@@ -43,7 +44,6 @@
 
 
 #define FT_INTERNAL_POSTSCRIPT_AUX_H      <freetype/internal/psaux.h>
 #define FT_INTERNAL_POSTSCRIPT_AUX_H      <freetype/internal/psaux.h>
 #define FT_INTERNAL_POSTSCRIPT_HINTS_H    <freetype/internal/pshints.h>
 #define FT_INTERNAL_POSTSCRIPT_HINTS_H    <freetype/internal/pshints.h>
-#define FT_INTERNAL_POSTSCRIPT_GLOBALS_H  <freetype/internal/psglobal.h>
 
 
 #define FT_INTERNAL_AUTOHINT_H            <freetype/internal/autohint.h>
 #define FT_INTERNAL_AUTOHINT_H            <freetype/internal/autohint.h>
 
 

+ 15 - 13
Source/ThirdParty/FreeType/include/freetype/internal/psaux.h

@@ -5,7 +5,7 @@
 /*    Auxiliary functions and data structures related to PostScript fonts  */
 /*    Auxiliary functions and data structures related to PostScript fonts  */
 /*    (specification).                                                     */
 /*    (specification).                                                     */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 1996-2004, 2006, 2008, 2009, 2012 by                         */
+/*  Copyright 1996-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -17,13 +17,14 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __PSAUX_H__
-#define __PSAUX_H__
+#ifndef PSAUX_H_
+#define PSAUX_H_
 
 
 
 
 #include <ft2build.h>
 #include <ft2build.h>
 #include FT_INTERNAL_OBJECTS_H
 #include FT_INTERNAL_OBJECTS_H
 #include FT_INTERNAL_TYPE1_TYPES_H
 #include FT_INTERNAL_TYPE1_TYPES_H
+#include FT_INTERNAL_HASH_H
 #include FT_SERVICE_POSTSCRIPT_CMAPS_H
 #include FT_SERVICE_POSTSCRIPT_CMAPS_H
 
 
 
 
@@ -71,10 +72,10 @@ FT_BEGIN_HEADER
     (*done)( PS_Table  table );
     (*done)( PS_Table  table );
 
 
     FT_Error
     FT_Error
-    (*add)( PS_Table    table,
-            FT_Int      idx,
-            void*       object,
-            FT_PtrDist  length );
+    (*add)( PS_Table  table,
+            FT_Int    idx,
+            void*     object,
+            FT_UInt   length );
 
 
     void
     void
     (*release)( PS_Table  table );
     (*release)( PS_Table  table );
@@ -122,12 +123,12 @@ FT_BEGIN_HEADER
     FT_Byte*           block;          /* current memory block           */
     FT_Byte*           block;          /* current memory block           */
     FT_Offset          cursor;         /* current cursor in memory block */
     FT_Offset          cursor;         /* current cursor in memory block */
     FT_Offset          capacity;       /* current size of memory block   */
     FT_Offset          capacity;       /* current size of memory block   */
-    FT_Long            init;
+    FT_ULong           init;
 
 
     FT_Int             max_elems;
     FT_Int             max_elems;
     FT_Int             num_elems;
     FT_Int             num_elems;
     FT_Byte**          elements;       /* addresses of table elements */
     FT_Byte**          elements;       /* addresses of table elements */
-    FT_PtrDist*        lengths;        /* lengths of table elements   */
+    FT_UInt*           lengths;        /* lengths of table elements   */
 
 
     FT_Memory          memory;
     FT_Memory          memory;
     PS_Table_FuncsRec  funcs;
     PS_Table_FuncsRec  funcs;
@@ -365,7 +366,7 @@ FT_BEGIN_HEADER
     (*to_bytes)( PS_Parser  parser,
     (*to_bytes)( PS_Parser  parser,
                  FT_Byte*   bytes,
                  FT_Byte*   bytes,
                  FT_Offset  max_bytes,
                  FT_Offset  max_bytes,
-                 FT_Long*   pnum_bytes,
+                 FT_ULong*  pnum_bytes,
                  FT_Bool    delimiters );
                  FT_Bool    delimiters );
 
 
     FT_Int
     FT_Int
@@ -675,9 +676,10 @@ FT_BEGIN_HEADER
     FT_Byte**            glyph_names;
     FT_Byte**            glyph_names;
 
 
     FT_Int               lenIV;        /* internal for sub routine calls */
     FT_Int               lenIV;        /* internal for sub routine calls */
-    FT_UInt              num_subrs;
+    FT_Int               num_subrs;
     FT_Byte**            subrs;
     FT_Byte**            subrs;
-    FT_PtrDist*          subrs_len;    /* array of subrs length (optional) */
+    FT_UInt*             subrs_len;    /* array of subrs length (optional) */
+    FT_Hash              subrs_hash;   /* used if `num_subrs' was massaged */
 
 
     FT_Matrix            font_matrix;
     FT_Matrix            font_matrix;
     FT_Vector            font_offset;
     FT_Vector            font_offset;
@@ -871,7 +873,7 @@ FT_BEGIN_HEADER
 
 
 FT_END_HEADER
 FT_END_HEADER
 
 
-#endif /* __PSAUX_H__ */
+#endif /* PSAUX_H_ */
 
 
 
 
 /* END */
 /* END */

+ 6 - 6
Source/ThirdParty/FreeType/include/freetype/internal/pshints.h

@@ -6,7 +6,7 @@
 /*    recorders (specification only).  These are used to support native    */
 /*    recorders (specification only).  These are used to support native    */
 /*    T1/T2 hints in the `type1', `cid', and `cff' font drivers.           */
 /*    T1/T2 hints in the `type1', `cid', and `cff' font drivers.           */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2001-2003, 2005-2007, 2009, 2012 by                          */
+/*  Copyright 2001-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -18,8 +18,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __PSHINTS_H__
-#define __PSHINTS_H__
+#ifndef PSHINTS_H_
+#define PSHINTS_H_
 
 
 
 
 #include <ft2build.h>
 #include <ft2build.h>
@@ -45,7 +45,7 @@ FT_BEGIN_HEADER
                           T1_Private*   private_dict,
                           T1_Private*   private_dict,
                           PSH_Globals*  aglobals );
                           PSH_Globals*  aglobals );
 
 
-  typedef FT_Error
+  typedef void
   (*PSH_Globals_SetScaleFunc)( PSH_Globals  globals,
   (*PSH_Globals_SetScaleFunc)( PSH_Globals  globals,
                                FT_Fixed     x_scale,
                                FT_Fixed     x_scale,
                                FT_Fixed     y_scale,
                                FT_Fixed     y_scale,
@@ -465,7 +465,7 @@ FT_BEGIN_HEADER
   typedef void
   typedef void
   (*T2_Hints_StemsFunc)( T2_Hints   hints,
   (*T2_Hints_StemsFunc)( T2_Hints   hints,
                          FT_UInt    dimension,
                          FT_UInt    dimension,
-                         FT_UInt    count,
+                         FT_Int     count,
                          FT_Fixed*  coordinates );
                          FT_Fixed*  coordinates );
 
 
 
 
@@ -716,7 +716,7 @@ FT_BEGIN_HEADER
 
 
 FT_END_HEADER
 FT_END_HEADER
 
 
-#endif /* __PSHINTS_H__ */
+#endif /* PSHINTS_H_ */
 
 
 
 
 /* END */
 /* END */

+ 4 - 4
Source/ThirdParty/FreeType/include/freetype/internal/services/svbdf.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    The FreeType BDF services (specification).                           */
 /*    The FreeType BDF services (specification).                           */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2003, 2009, 2012 by                                          */
+/*  Copyright 2003-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -16,8 +16,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __SVBDF_H__
-#define __SVBDF_H__
+#ifndef SVBDF_H_
+#define SVBDF_H_
 
 
 #include FT_BDF_H
 #include FT_BDF_H
 #include FT_INTERNAL_SERVICE_H
 #include FT_INTERNAL_SERVICE_H
@@ -76,7 +76,7 @@ FT_BEGIN_HEADER
 FT_END_HEADER
 FT_END_HEADER
 
 
 
 
-#endif /* __SVBDF_H__ */
+#endif /* SVBDF_H_ */
 
 
 
 
 /* END */
 /* END */

+ 5 - 4
Source/ThirdParty/FreeType/include/freetype/internal/services/svcid.h

@@ -4,7 +4,8 @@
 /*                                                                         */
 /*                                                                         */
 /*    The FreeType CID font services (specification).                      */
 /*    The FreeType CID font services (specification).                      */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2007, 2009, 2012 by Derek Clegg, Michael Toftdal.            */
+/*  Copyright 2007-2016 by                                                 */
+/*  Derek Clegg and Michael Toftdal.                                       */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  modified, and distributed under the terms of the FreeType project      */
 /*  modified, and distributed under the terms of the FreeType project      */
@@ -15,8 +16,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __SVCID_H__
-#define __SVCID_H__
+#ifndef SVCID_H_
+#define SVCID_H_
 
 
 #include FT_INTERNAL_SERVICE_H
 #include FT_INTERNAL_SERVICE_H
 
 
@@ -83,7 +84,7 @@ FT_BEGIN_HEADER
 FT_END_HEADER
 FT_END_HEADER
 
 
 
 
-#endif /* __SVCID_H__ */
+#endif /* SVCID_H_ */
 
 
 
 
 /* END */
 /* END */

+ 55 - 0
Source/ThirdParty/FreeType/include/freetype/internal/services/svfntfmt.h

@@ -0,0 +1,55 @@
+/***************************************************************************/
+/*                                                                         */
+/*  svfntfmt.h                                                             */
+/*                                                                         */
+/*    The FreeType font format service (specification only).               */
+/*                                                                         */
+/*  Copyright 2003-2016 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_
+#define SVFNTFMT_H_
+
+#include FT_INTERNAL_SERVICE_H
+
+
+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.
+   */
+
+#define FT_SERVICE_ID_FONT_FORMAT  "font-format"
+
+#define FT_FONT_FORMAT_TRUETYPE  "TrueType"
+#define FT_FONT_FORMAT_TYPE_1    "Type 1"
+#define FT_FONT_FORMAT_BDF       "BDF"
+#define FT_FONT_FORMAT_PCF       "PCF"
+#define FT_FONT_FORMAT_TYPE_42   "Type 42"
+#define FT_FONT_FORMAT_CID       "CID Type 1"
+#define FT_FONT_FORMAT_CFF       "CFF"
+#define FT_FONT_FORMAT_PFR       "PFR"
+#define FT_FONT_FORMAT_WINFNT    "Windows FNT"
+
+  /* */
+
+
+FT_END_HEADER
+
+
+#endif /* SVFNTFMT_H_ */
+
+
+/* END */

+ 7 - 4
Source/ThirdParty/FreeType/include/freetype/internal/services/svgldict.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    The FreeType glyph dictionary services (specification).              */
 /*    The FreeType glyph dictionary services (specification).              */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2003, 2009, 2012 by                                          */
+/*  Copyright 2003-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -16,8 +16,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __SVGLDICT_H__
-#define __SVGLDICT_H__
+#ifndef SVGLDICT_H_
+#define SVGLDICT_H_
 
 
 #include FT_INTERNAL_SERVICE_H
 #include FT_INTERNAL_SERVICE_H
 
 
@@ -85,4 +85,7 @@ FT_BEGIN_HEADER
 FT_END_HEADER
 FT_END_HEADER
 
 
 
 
-#endif /* __SVGLDICT_H__ */
+#endif /* SVGLDICT_H_ */
+
+
+/* END */

+ 4 - 4
Source/ThirdParty/FreeType/include/freetype/internal/services/svgxval.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    FreeType API for validating TrueTypeGX/AAT tables (specification).   */
 /*    FreeType API for validating TrueTypeGX/AAT tables (specification).   */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2004, 2005 by                                                */
+/*  Copyright 2004-2016 by                                                 */
 /*  Masatake YAMATO, Red Hat K.K.,                                         */
 /*  Masatake YAMATO, Red Hat K.K.,                                         */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
@@ -25,8 +25,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __SVGXVAL_H__
-#define __SVGXVAL_H__
+#ifndef SVGXVAL_H_
+#define SVGXVAL_H_
 
 
 #include FT_GX_VALIDATE_H
 #include FT_GX_VALIDATE_H
 #include FT_INTERNAL_VALIDATE_H
 #include FT_INTERNAL_VALIDATE_H
@@ -66,7 +66,7 @@ FT_BEGIN_HEADER
 FT_END_HEADER
 FT_END_HEADER
 
 
 
 
-#endif /* __SVGXVAL_H__ */
+#endif /* SVGXVAL_H_ */
 
 
 
 
 /* END */
 /* END */

+ 4 - 4
Source/ThirdParty/FreeType/include/freetype/internal/services/svkern.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    The FreeType Kerning service (specification).                        */
 /*    The FreeType Kerning service (specification).                        */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2006 by                                                      */
+/*  Copyright 2006-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -16,8 +16,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __SVKERN_H__
-#define __SVKERN_H__
+#ifndef SVKERN_H_
+#define SVKERN_H_
 
 
 #include FT_INTERNAL_SERVICE_H
 #include FT_INTERNAL_SERVICE_H
 #include FT_TRUETYPE_TABLES_H
 #include FT_TRUETYPE_TABLES_H
@@ -45,7 +45,7 @@ FT_BEGIN_HEADER
 FT_END_HEADER
 FT_END_HEADER
 
 
 
 
-#endif /* __SVKERN_H__ */
+#endif /* SVKERN_H_ */
 
 
 
 
 /* END */
 /* END */

+ 155 - 0
Source/ThirdParty/FreeType/include/freetype/internal/services/svmetric.h

@@ -0,0 +1,155 @@
+/***************************************************************************/
+/*                                                                         */
+/*  svmetric.h                                                             */
+/*                                                                         */
+/*    The FreeType services for metrics variations (specification).        */
+/*                                                                         */
+/*  Copyright 2016 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_
+#define SVMETRIC_H_
+
+#include FT_INTERNAL_SERVICE_H
+
+
+FT_BEGIN_HEADER
+
+
+  /*
+   *  A service to manage the `HVAR, `MVAR', and `VVAR' OpenType tables.
+   *
+   */
+
+#define FT_SERVICE_ID_METRICS_VARIATIONS  "metrics-variations"
+
+
+  /* HVAR */
+
+  typedef FT_Error
+  (*FT_HAdvance_Adjust_Func)( FT_Face  face,
+                              FT_UInt  gindex,
+                              FT_Int  *avalue );
+
+  typedef FT_Error
+  (*FT_LSB_Adjust_Func)( FT_Face  face,
+                         FT_UInt  gindex,
+                         FT_Int  *avalue );
+
+  typedef FT_Error
+  (*FT_RSB_Adjust_Func)( FT_Face  face,
+                         FT_UInt  gindex,
+                         FT_Int  *avalue );
+
+  /* VVAR */
+
+  typedef FT_Error
+  (*FT_VAdvance_Adjust_Func)( FT_Face  face,
+                              FT_UInt  gindex,
+                              FT_Int  *avalue );
+
+  typedef FT_Error
+  (*FT_TSB_Adjust_Func)( FT_Face  face,
+                         FT_UInt  gindex,
+                         FT_Int  *avalue );
+
+  typedef FT_Error
+  (*FT_BSB_Adjust_Func)( FT_Face  face,
+                         FT_UInt  gindex,
+                         FT_Int  *avalue );
+
+  typedef FT_Error
+  (*FT_VOrg_Adjust_Func)( FT_Face  face,
+                          FT_UInt  gindex,
+                          FT_Int  *avalue );
+
+  /* MVAR */
+
+  typedef FT_Error
+  (*FT_Metrics_Adjust_Func)( FT_Face   face,
+                             FT_ULong  tag,
+                             FT_Int   *avalue );
+
+
+  FT_DEFINE_SERVICE( MetricsVariations )
+  {
+    FT_HAdvance_Adjust_Func  hadvance_adjust;
+    FT_LSB_Adjust_Func       lsb_adjust;
+    FT_RSB_Adjust_Func       rsb_adjust;
+
+    FT_VAdvance_Adjust_Func  vadvance_adjust;
+    FT_TSB_Adjust_Func       tsb_adjust;
+    FT_BSB_Adjust_Func       bsb_adjust;
+    FT_VOrg_Adjust_Func      vorg_adjust;
+
+    FT_Metrics_Adjust_Func   metrics_adjust;
+  };
+
+
+#ifndef 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_  ) \
+  static const FT_Service_MetricsVariationsRec  class_ =           \
+  {                                                                \
+    hadvance_adjust_,                                              \
+    lsb_adjust_,                                                   \
+    rsb_adjust_,                                                   \
+    vadvance_adjust_,                                              \
+    tsb_adjust_,                                                   \
+    bsb_adjust_,                                                   \
+    vorg_adjust_,                                                  \
+    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 */
+
+  /* */
+
+
+FT_END_HEADER
+
+#endif /* SVMETRIC_H_ */
+
+
+/* END */

+ 72 - 27
Source/ThirdParty/FreeType/include/freetype/internal/services/svmm.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    The FreeType Multiple Masters and GX var services (specification).   */
 /*    The FreeType Multiple Masters and GX var services (specification).   */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2003, 2004, 2009, 2012 by                                    */
+/*  Copyright 2003-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -16,8 +16,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __SVMM_H__
-#define __SVMM_H__
+#ifndef SVMM_H_
+#define SVMM_H_
 
 
 #include FT_INTERNAL_SERVICE_H
 #include FT_INTERNAL_SERVICE_H
 
 
@@ -58,46 +58,91 @@ FT_BEGIN_HEADER
                            FT_UInt   num_coords,
                            FT_UInt   num_coords,
                            FT_Long*  coords );
                            FT_Long*  coords );
 
 
+  typedef FT_Error
+  (*FT_Get_Var_Design_Func)( FT_Face    face,
+                             FT_UInt    num_coords,
+                             FT_Fixed*  coords );
+
+  typedef FT_Error
+  (*FT_Get_MM_Blend_Func)( FT_Face   face,
+                           FT_UInt   num_coords,
+                           FT_Long*  coords );
+
+  typedef FT_Error
+  (*FT_Get_Var_Blend_Func)( FT_Face      face,
+                            FT_UInt     *num_coords,
+                            FT_Fixed*   *coords,
+                            FT_MM_Var*  *mm_var );
+
+  typedef void
+  (*FT_Done_Blend_Func)( FT_Face );
+
 
 
   FT_DEFINE_SERVICE( MultiMasters )
   FT_DEFINE_SERVICE( MultiMasters )
   {
   {
     FT_Get_MM_Func          get_mm;
     FT_Get_MM_Func          get_mm;
     FT_Set_MM_Design_Func   set_mm_design;
     FT_Set_MM_Design_Func   set_mm_design;
     FT_Set_MM_Blend_Func    set_mm_blend;
     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_Get_MM_Var_Func      get_mm_var;
     FT_Set_Var_Design_Func  set_var_design;
     FT_Set_Var_Design_Func  set_var_design;
+    FT_Get_Var_Design_Func  get_var_design;
+
+    /* for internal use; only needed for code sharing between modules */
+    FT_Get_Var_Blend_Func   get_var_blend;
+    FT_Done_Blend_Func      done_blend;
   };
   };
 
 
 
 
 #ifndef FT_CONFIG_OPTION_PIC
 #ifndef FT_CONFIG_OPTION_PIC
 
 
-#define FT_DEFINE_SERVICE_MULTIMASTERSREC( class_,                          \
-                                           get_mm_,                         \
-                                           set_mm_design_,                  \
-                                           set_mm_blend_,                   \
-                                           get_mm_var_,                     \
-                                           set_var_design_ )                \
-  static const FT_Service_MultiMastersRec  class_ =                         \
-  {                                                                         \
-    get_mm_, set_mm_design_, set_mm_blend_, get_mm_var_, set_var_design_    \
+#define FT_DEFINE_SERVICE_MULTIMASTERSREC( class_,           \
+                                           get_mm_,          \
+                                           set_mm_design_,   \
+                                           set_mm_blend_,    \
+                                           get_mm_blend_,    \
+                                           get_mm_var_,      \
+                                           set_var_design_,  \
+                                           get_var_design_,  \
+                                           get_var_blend_,   \
+                                           done_blend_     ) \
+  static const FT_Service_MultiMastersRec  class_ =          \
+  {                                                          \
+    get_mm_,                                                 \
+    set_mm_design_,                                          \
+    set_mm_blend_,                                           \
+    get_mm_blend_,                                           \
+    get_mm_var_,                                             \
+    set_var_design_,                                         \
+    get_var_design_,                                         \
+    get_var_blend_,                                          \
+    done_blend_                                              \
   };
   };
 
 
 #else /* FT_CONFIG_OPTION_PIC */
 #else /* FT_CONFIG_OPTION_PIC */
 
 
-#define FT_DEFINE_SERVICE_MULTIMASTERSREC( class_,                          \
-                                           get_mm_,                         \
-                                           set_mm_design_,                  \
-                                           set_mm_blend_,                   \
-                                           get_mm_var_,                     \
-                                           set_var_design_ )                \
-  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_var     = get_mm_var_;                                    \
-    clazz->set_var_design = set_var_design_;                                \
+#define FT_DEFINE_SERVICE_MULTIMASTERSREC( class_,               \
+                                           get_mm_,              \
+                                           set_mm_design_,       \
+                                           set_mm_blend_,        \
+                                           get_mm_blend_,        \
+                                           get_mm_var_,          \
+                                           set_var_design_,      \
+                                           get_var_design_,      \
+                                           get_var_blend_,       \
+                                           done_blend_ )         \
+  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->get_var_blend  = get_var_blend_;                      \
+    clazz->done_blend     = done_blend_;                         \
   }
   }
 
 
 #endif /* FT_CONFIG_OPTION_PIC */
 #endif /* FT_CONFIG_OPTION_PIC */
@@ -107,7 +152,7 @@ FT_BEGIN_HEADER
 
 
 FT_END_HEADER
 FT_END_HEADER
 
 
-#endif /* __SVMM_H__ */
+#endif /* SVMM_H_ */
 
 
 
 
 /* END */
 /* END */

+ 4 - 4
Source/ThirdParty/FreeType/include/freetype/internal/services/svotval.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    The FreeType OpenType validation service (specification).            */
 /*    The FreeType OpenType validation service (specification).            */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2004, 2006 by                                                */
+/*  Copyright 2004-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -16,8 +16,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __SVOTVAL_H__
-#define __SVOTVAL_H__
+#ifndef SVOTVAL_H_
+#define SVOTVAL_H_
 
 
 #include FT_OPENTYPE_VALIDATE_H
 #include FT_OPENTYPE_VALIDATE_H
 #include FT_INTERNAL_VALIDATE_H
 #include FT_INTERNAL_VALIDATE_H
@@ -49,7 +49,7 @@ FT_BEGIN_HEADER
 FT_END_HEADER
 FT_END_HEADER
 
 
 
 
-#endif /* __SVOTVAL_H__ */
+#endif /* SVOTVAL_H_ */
 
 
 
 
 /* END */
 /* END */

+ 4 - 4
Source/ThirdParty/FreeType/include/freetype/internal/services/svpfr.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    Internal PFR service functions (specification).                      */
 /*    Internal PFR service functions (specification).                      */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2003, 2006 by                                                */
+/*  Copyright 2003-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -16,8 +16,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __SVPFR_H__
-#define __SVPFR_H__
+#ifndef SVPFR_H_
+#define SVPFR_H_
 
 
 #include FT_PFR_H
 #include FT_PFR_H
 #include FT_INTERNAL_SERVICE_H
 #include FT_INTERNAL_SERVICE_H
@@ -60,7 +60,7 @@ FT_BEGIN_HEADER
 
 
 FT_END_HEADER
 FT_END_HEADER
 
 
-#endif /* __SVPFR_H__ */
+#endif /* SVPFR_H_ */
 
 
 
 
 /* END */
 /* END */

+ 4 - 4
Source/ThirdParty/FreeType/include/freetype/internal/services/svpostnm.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    The FreeType PostScript name services (specification).               */
 /*    The FreeType PostScript name services (specification).               */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2003, 2007, 2009, 2012 by                                    */
+/*  Copyright 2003-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -16,8 +16,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __SVPOSTNM_H__
-#define __SVPOSTNM_H__
+#ifndef SVPOSTNM_H_
+#define SVPOSTNM_H_
 
 
 #include FT_INTERNAL_SERVICE_H
 #include FT_INTERNAL_SERVICE_H
 
 
@@ -75,7 +75,7 @@ FT_BEGIN_HEADER
 FT_END_HEADER
 FT_END_HEADER
 
 
 
 
-#endif /* __SVPOSTNM_H__ */
+#endif /* SVPOSTNM_H_ */
 
 
 
 
 /* END */
 /* END */

+ 6 - 5
Source/ThirdParty/FreeType/include/freetype/internal/services/svprop.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    The FreeType property service (specification).                       */
 /*    The FreeType property service (specification).                       */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2012 by                                                      */
+/*  Copyright 2012-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -16,8 +16,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __SVPROP_H__
-#define __SVPROP_H__
+#ifndef SVPROP_H_
+#define SVPROP_H_
 
 
 
 
 FT_BEGIN_HEADER
 FT_BEGIN_HEADER
@@ -29,7 +29,8 @@ FT_BEGIN_HEADER
   typedef FT_Error
   typedef FT_Error
   (*FT_Properties_SetFunc)( FT_Module    module,
   (*FT_Properties_SetFunc)( FT_Module    module,
                             const char*  property_name,
                             const char*  property_name,
-                            const void*  value );
+                            const void*  value,
+                            FT_Bool      value_is_string );
 
 
   typedef FT_Error
   typedef FT_Error
   (*FT_Properties_GetFunc)( FT_Module    module,
   (*FT_Properties_GetFunc)( FT_Module    module,
@@ -75,7 +76,7 @@ FT_BEGIN_HEADER
 FT_END_HEADER
 FT_END_HEADER
 
 
 
 
-#endif /* __SVPROP_H__ */
+#endif /* SVPROP_H_ */
 
 
 
 
 /* END */
 /* END */

+ 4 - 4
Source/ThirdParty/FreeType/include/freetype/internal/services/svpscmap.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    The FreeType PostScript charmap service (specification).             */
 /*    The FreeType PostScript charmap service (specification).             */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2003, 2006, 2009, 2012 by                                    */
+/*  Copyright 2003-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -16,8 +16,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __SVPSCMAP_H__
-#define __SVPSCMAP_H__
+#ifndef SVPSCMAP_H_
+#define SVPSCMAP_H_
 
 
 #include FT_INTERNAL_OBJECTS_H
 #include FT_INTERNAL_OBJECTS_H
 
 
@@ -171,7 +171,7 @@ FT_BEGIN_HEADER
 FT_END_HEADER
 FT_END_HEADER
 
 
 
 
-#endif /* __SVPSCMAP_H__ */
+#endif /* SVPSCMAP_H_ */
 
 
 
 
 /* END */
 /* END */

+ 4 - 4
Source/ThirdParty/FreeType/include/freetype/internal/services/svpsinfo.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    The FreeType PostScript info service (specification).                */
 /*    The FreeType PostScript info service (specification).                */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2003, 2004, 2009, 2011, 2012 by                              */
+/*  Copyright 2003-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -16,8 +16,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __SVPSINFO_H__
-#define __SVPSINFO_H__
+#ifndef SVPSINFO_H_
+#define SVPSINFO_H_
 
 
 #include FT_INTERNAL_SERVICE_H
 #include FT_INTERNAL_SERVICE_H
 #include FT_INTERNAL_TYPE1_TYPES_H
 #include FT_INTERNAL_TYPE1_TYPES_H
@@ -105,7 +105,7 @@ FT_BEGIN_HEADER
 FT_END_HEADER
 FT_END_HEADER
 
 
 
 
-#endif /* __SVPSINFO_H__ */
+#endif /* SVPSINFO_H_ */
 
 
 
 
 /* END */
 /* END */

+ 4 - 4
Source/ThirdParty/FreeType/include/freetype/internal/services/svsfnt.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    The FreeType SFNT table loading service (specification).             */
 /*    The FreeType SFNT table loading service (specification).             */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2003, 2004, 2009, 2012 by                                    */
+/*  Copyright 2003-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -16,8 +16,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __SVSFNT_H__
-#define __SVSFNT_H__
+#ifndef SVSFNT_H_
+#define SVSFNT_H_
 
 
 #include FT_INTERNAL_SERVICE_H
 #include FT_INTERNAL_SERVICE_H
 #include FT_TRUETYPE_TABLES_H
 #include FT_TRUETYPE_TABLES_H
@@ -97,7 +97,7 @@ FT_BEGIN_HEADER
 FT_END_HEADER
 FT_END_HEADER
 
 
 
 
-#endif /* __SVSFNT_H__ */
+#endif /* SVSFNT_H_ */
 
 
 
 
 /* END */
 /* END */

+ 9 - 10
Source/ThirdParty/FreeType/include/freetype/internal/services/svttcmap.h

@@ -4,10 +4,8 @@
 /*                                                                         */
 /*                                                                         */
 /*    The FreeType TrueType/sfnt cmap extra information service.           */
 /*    The FreeType TrueType/sfnt cmap extra information service.           */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2003 by                                                      */
-/*  Masatake YAMATO, Redhat K.K.                                           */
-/*                                                                         */
-/*  Copyright 2003, 2008, 2009, 2012 by                                    */
+/*  Copyright 2003-2016 by                                                 */
+/*  Masatake YAMATO, Redhat K.K.,                                          */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -21,8 +19,8 @@
 /* Development of this service is support of
 /* Development of this service is support of
    Information-technology Promotion Agency, Japan. */
    Information-technology Promotion Agency, Japan. */
 
 
-#ifndef __SVTTCMAP_H__
-#define __SVTTCMAP_H__
+#ifndef SVTTCMAP_H_
+#define SVTTCMAP_H_
 
 
 #include FT_INTERNAL_SERVICE_H
 #include FT_INTERNAL_SERVICE_H
 #include FT_TRUETYPE_TABLES_H
 #include FT_TRUETYPE_TABLES_H
@@ -47,14 +45,15 @@ FT_BEGIN_HEADER
   /* <Fields>                                                              */
   /* <Fields>                                                              */
   /*    language ::                                                        */
   /*    language ::                                                        */
   /*      The language ID used in Mac fonts.  Definitions of values are in */
   /*      The language ID used in Mac fonts.  Definitions of values are in */
-  /*      freetype/ttnameid.h.                                             */
+  /*      `ttnameid.h'.                                                    */
   /*                                                                       */
   /*                                                                       */
   /*    format ::                                                          */
   /*    format ::                                                          */
-  /*      The cmap format.  OpenType 1.5 defines the formats 0 (byte       */
+  /*      The cmap format.  OpenType 1.6 defines the formats 0 (byte       */
   /*      encoding table), 2~(high-byte mapping through table), 4~(segment */
   /*      encoding table), 2~(high-byte mapping through table), 4~(segment */
   /*      mapping to delta values), 6~(trimmed table mapping), 8~(mixed    */
   /*      mapping to delta values), 6~(trimmed table mapping), 8~(mixed    */
   /*      16-bit and 32-bit coverage), 10~(trimmed array), 12~(segmented   */
   /*      16-bit and 32-bit coverage), 10~(trimmed array), 12~(segmented   */
-  /*      coverage), and 14 (Unicode Variation Sequences).                 */
+  /*      coverage), 13~(last resort font), and 14 (Unicode Variation      */
+  /*      Sequences).                                                      */
   /*                                                                       */
   /*                                                                       */
   typedef struct  TT_CMapInfo_
   typedef struct  TT_CMapInfo_
   {
   {
@@ -101,7 +100,7 @@ FT_BEGIN_HEADER
 
 
 FT_END_HEADER
 FT_END_HEADER
 
 
-#endif /* __SVTTCMAP_H__ */
+#endif /* SVTTCMAP_H_ */
 
 
 
 
 /* END */
 /* END */

+ 4 - 4
Source/ThirdParty/FreeType/include/freetype/internal/services/svtteng.h

@@ -4,7 +4,7 @@
 /*                                                                         */
 /*                                                                         */
 /*    The FreeType TrueType engine query service (specification).          */
 /*    The FreeType TrueType engine query service (specification).          */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2006 by                                                      */
+/*  Copyright 2006-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -16,8 +16,8 @@
 /***************************************************************************/
 /***************************************************************************/
 
 
 
 
-#ifndef __SVTTENG_H__
-#define __SVTTENG_H__
+#ifndef SVTTENG_H_
+#define SVTTENG_H_
 
 
 #include FT_INTERNAL_SERVICE_H
 #include FT_INTERNAL_SERVICE_H
 #include FT_MODULE_H
 #include FT_MODULE_H
@@ -47,7 +47,7 @@ FT_BEGIN_HEADER
 FT_END_HEADER
 FT_END_HEADER
 
 
 
 
-#endif /* __SVTTENG_H__ */
+#endif /* SVTTENG_H_ */
 
 
 
 
 /* END */
 /* END */

+ 5 - 4
Source/ThirdParty/FreeType/include/freetype/internal/services/svttglyf.h

@@ -4,7 +4,8 @@
 /*                                                                         */
 /*                                                                         */
 /*    The FreeType TrueType glyph service.                                 */
 /*    The FreeType TrueType glyph service.                                 */
 /*                                                                         */
 /*                                                                         */
-/*  Copyright 2007, 2009, 2012 by David Turner.                            */
+/*  Copyright 2007-2016 by                                                 */
+/*  David Turner.                                                          */
 /*                                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*  modified, and distributed under the terms of the FreeType project      */
 /*  modified, and distributed under the terms of the FreeType project      */
@@ -14,8 +15,8 @@
 /*                                                                         */
 /*                                                                         */
 /***************************************************************************/
 /***************************************************************************/
 
 
-#ifndef __SVTTGLYF_H__
-#define __SVTTGLYF_H__
+#ifndef SVTTGLYF_H_
+#define SVTTGLYF_H_
 
 
 #include FT_INTERNAL_SERVICE_H
 #include FT_INTERNAL_SERVICE_H
 #include FT_TRUETYPE_TABLES_H
 #include FT_TRUETYPE_TABLES_H
@@ -62,7 +63,7 @@ FT_BEGIN_HEADER
 
 
 FT_END_HEADER
 FT_END_HEADER
 
 
-#endif /* __SVTTGLYF_H__ */
+#endif /* SVTTGLYF_H_ */
 
 
 
 
 /* END */
 /* END */

Some files were not shown because too many files changed in this diff