shithub: freetype+ttf2subf

Download patch

ref: e13391333f501967db8823025ce8c63259b5d57e
parent: 9e6e903cc4f6f2de86356d551e74eace75927c31
author: David Turner <[email protected]>
date: Mon Jun 8 09:31:55 EDT 2020

Make macros for header file names optional.

We no longer have to take care of the 8.3 file name limit; this
allows us (a) to introduce longer, meaningful file names, and (b) to
avoid macro names in `#include' lines altogether since some
compilers (most notably Visual C++) doesn't support this properly.

*/*: Replace

   #include FOO_H

with

   #include <freetype/foo.h>

or something similar.  Also update the documentation.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+2020-06-08  David Turner  <[email protected]>
+
+	Make macros for header file names optional.
+
+	We no longer have to take care of the 8.3 file name limit; this
+	allows us (a) to introduce longer, meaningful file names, and (b) to
+	avoid macro names in `#include' lines altogether since some
+	compilers (most notably Visual C++) doesn't support this properly.
+
+	*/*: Replace
+
+	   #include FOO_H
+
+	with
+
+	   #include <freetype/foo.h>
+
+	or something similar.  Also update the documentation.
+
 2020-06-02  Werner Lemberg  <[email protected]>
 
 	* src/sfnt/ttcmap.c (tt_face_build_cmaps): Trace number of cmaps.
--- a/builds/amiga/src/base/ftdebug.c
+++ b/builds/amiga/src/base/ftdebug.c
@@ -68,8 +68,8 @@
 
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_INTERNAL_DEBUG_H
+#include <freetype/freetype.h>
+#include <freetype/internal/ftdebug.h>
 
 
 #ifdef FT_DEBUG_LEVEL_ERROR
@@ -152,7 +152,7 @@
 
   static const char*  ft_trace_toggles[trace_count + 1] =
   {
-#include FT_INTERNAL_TRACE_H
+#include <freetype/internal/fttrace.h>
     NULL
   };
 
--- a/builds/amiga/src/base/ftsystem.c
+++ b/builds/amiga/src/base/ftsystem.c
@@ -96,10 +96,10 @@
 
 #include <ft2build.h>
 #include FT_CONFIG_CONFIG_H
-#include FT_INTERNAL_DEBUG_H
-#include FT_SYSTEM_H
-#include FT_ERRORS_H
-#include FT_TYPES_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/ftsystem.h>
+#include <freetype/fterrors.h>
+#include <freetype/fttypes.h>
 
 #include <stdio.h>
 #include <stdlib.h>
--- a/builds/cmake/testbuild.sh
+++ b/builds/cmake/testbuild.sh
@@ -93,7 +93,7 @@
 #include <stdlib.h>
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
 
 
 FT_Library library;
--- a/builds/mac/ftmac.c
+++ b/builds/mac/ftmac.c
@@ -63,9 +63,9 @@
 
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_TRUETYPE_TAGS_H
-#include FT_INTERNAL_STREAM_H
+#include <freetype/freetype.h>
+#include <freetype/tttags.h>
+#include <freetype/internal/ftstream.h>
 #include "ftbase.h"
 
 #if defined( __GNUC__ ) || defined( __IBMC__ )
--- a/builds/unix/freetype2.m4
+++ b/builds/unix/freetype2.m4
@@ -15,7 +15,7 @@
 # generated by Autoconf, under the same distribution terms as the rest of
 # that program.
 #
-# serial 4
+# serial 5
 
 # AC_CHECK_FT2([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
 # Test for FreeType 2, and define FT2_CFLAGS and FT2_LIBS.
@@ -116,7 +116,7 @@
              AC_LANG_SOURCE([[
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
 #include <stdio.h>
 #include <stdlib.h>
 
--- a/builds/unix/ftsystem.c
+++ b/builds/unix/ftsystem.c
@@ -19,11 +19,11 @@
 #include <ft2build.h>
   /* we use our special ftconfig.h file, not the standard one */
 #include <ftconfig.h>
-#include FT_INTERNAL_DEBUG_H
-#include FT_SYSTEM_H
-#include FT_ERRORS_H
-#include FT_TYPES_H
-#include FT_INTERNAL_STREAM_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/ftsystem.h>
+#include <freetype/fterrors.h>
+#include <freetype/fttypes.h>
+#include <freetype/internal/ftstream.h>
 
   /* memory-mapping includes and definitions */
 #ifdef HAVE_UNISTD_H
--- a/builds/vms/ftsystem.c
+++ b/builds/vms/ftsystem.c
@@ -19,11 +19,11 @@
 #include <ft2build.h>
   /* we use our special ftconfig.h file, not the standard one */
 #include <ftconfig.h>
-#include FT_INTERNAL_DEBUG_H
-#include FT_SYSTEM_H
-#include FT_ERRORS_H
-#include FT_TYPES_H
-#include FT_INTERNAL_OBJECTS_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/ftsystem.h>
+#include <freetype/fterrors.h>
+#include <freetype/fttypes.h>
+#include <freetype/internal/ftobjs.h>
 
   /* memory-mapping includes and definitions */
 #ifdef HAVE_UNISTD_H
--- a/builds/wince/ftdebug.c
+++ b/builds/wince/ftdebug.c
@@ -42,8 +42,8 @@
 
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_INTERNAL_DEBUG_H
+#include <freetype/freetype.h>
+#include <freetype/internal/ftdebug.h>
 
 
 #ifdef FT_DEBUG_LEVEL_ERROR
@@ -154,7 +154,7 @@
 
   static const char*  ft_trace_toggles[trace_count + 1] =
   {
-#include FT_INTERNAL_TRACE_H
+#include <freetype/internal/fttrace.h>
     NULL
   };
 
--- a/builds/windows/ftdebug.c
+++ b/builds/windows/ftdebug.c
@@ -42,8 +42,8 @@
 
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_INTERNAL_DEBUG_H
+#include <freetype/freetype.h>
+#include <freetype/internal/ftdebug.h>
 
 
 #ifdef FT_DEBUG_LEVEL_ERROR
@@ -138,7 +138,7 @@
 
   static const char*  ft_trace_toggles[trace_count + 1] =
   {
-#include FT_INTERNAL_TRACE_H
+#include <freetype/internal/fttrace.h>
     NULL
   };
 
--- a/docs/INSTALL.ANY
+++ b/docs/INSTALL.ANY
@@ -8,13 +8,15 @@
 I. Standard procedure
 ---------------------
 
-  * DISABLE PRE-COMPILED  HEADERS!  This is very  important for Visual
-    C++, because FreeType uses lines like:
+  * If you use macro names  for FreeType header files (while mandatory
+    in earlier versions,  this is now optional  since FreeType version
+    2.11) it  is necessary to  disable pre-compiled headers.   This is
+    very important for Visual C++, because lines like
 
       #include FT_FREETYPE_H
 
-    which are not correctly supported by this compiler while being ISO
-    C compliant!
+    are not  correctly supported  by this compiler  while being  ISO C
+    compliant!
 
   * You need to add the directory `include' to your  include path when
     compiling the library.
--- a/docs/VERSIONS.TXT
+++ b/docs/VERSIONS.TXT
@@ -38,7 +38,7 @@
 tied to it.
 
 The  release  number  is  available  at  *compile*  time  through  the
-following macros defined in FT_FREETYPE_H:
+following macros defined in `freetype.h':
 
   - FREETYPE_MAJOR: major release number
   - FREETYPE_MINOR: minor release number
@@ -99,7 +99,7 @@
   AC_TRY_CPP([
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
 
 #if FREETYPE_MAJOR*10000 + FREETYPE_MINOR*100 + FREETYPE_PATCH < 21002
 #  error FreeType version too low.
--- a/include/freetype/config/ftheader.h
+++ b/include/freetype/config/ftheader.h
@@ -73,24 +73,27 @@
    *   Macro definitions used to `#include` specific header files.
    *
    * @description:
-   *   The following macros are defined to the name of specific FreeType~2
-   *   header files.  They can be used directly in `#include` statements as
-   *   in:
+   *   In addition to the normal scheme of including header files like
    *
    *   ```
+   *     #include <freetype/freetype.h>
+   *     #include <freetype/ftmm.h>
+   *     #include <freetype/ftglyph.h>
+   *   ```
+   *
+   *   it is possible to used named macros instead.  They can be used
+   *   directly in `#include` statements as in
+   *
+   *   ```
    *     #include FT_FREETYPE_H
    *     #include FT_MULTIPLE_MASTERS_H
    *     #include FT_GLYPH_H
    *   ```
    *
-   *   There are several reasons why we are now using macros to name public
-   *   header files.  The first one is that such macros are not limited to
-   *   the infamous 8.3~naming rule required by DOS (and
-   *   `FT_MULTIPLE_MASTERS_H` is a lot more meaningful than `ftmm.h`).
+   *   These macros were introduced to overcome the infamous 8.3~naming rule
+   *   required by DOS (and `FT_MULTIPLE_MASTERS_H` is a lot more meaningful
+   *   than `ftmm.h`).
    *
-   *   The second reason is that it allows for more flexibility in the way
-   *   FreeType~2 is installed on a given system.
-   *
    */
 
 
@@ -797,16 +800,19 @@
 #define FT_CACHE_INTERNAL_IMAGE_H    FT_CACHE_H
 #define FT_CACHE_INTERNAL_SBITS_H    FT_CACHE_H
 
-
-  /*
-   * Include internal headers definitions from `<internal/...>` only when
-   * building the library.
-   */
+/* TODO(david): Move this section below to a different header */
 #ifdef FT2_BUILD_LIBRARY
-#define  FT_INTERNAL_INTERNAL_H  <freetype/internal/internal.h>
-#include FT_INTERNAL_INTERNAL_H
-#endif /* FT2_BUILD_LIBRARY */
+#if defined( _MSC_VER )      /* Visual C++ (and Intel C++) */
 
+  /* We disable the warning `conditional expression is constant' here */
+  /* in order to compile cleanly with the maximum level of warnings.  */
+  /* In particular, the warning complains about stuff like `while(0)' */
+  /* which is very useful in macro definitions.  There is no benefit  */
+  /* in having it enabled.                                            */
+#pragma warning( disable : 4127 )
+
+#endif /* _MSC_VER */
+#endif /* FT2_BUILD_LIBRARY */
 
 #endif /* FTHEADER_H_ */
 
--- a/include/freetype/freetype.h
+++ b/include/freetype/freetype.h
@@ -22,17 +22,13 @@
 
 #ifndef FT_FREETYPE_H
 #error "`ft2build.h' hasn't been included yet!"
-#error "Please always use macros to include FreeType header files."
-#error "Example:"
-#error "  #include <ft2build.h>"
-#error "  #include FT_FREETYPE_H"
 #endif
 
 
 #include <ft2build.h>
 #include FT_CONFIG_CONFIG_H
-#include FT_TYPES_H
-#include FT_ERRORS_H
+#include <freetype/fttypes.h>
+#include <freetype/fterrors.h>
 
 
 FT_BEGIN_HEADER
@@ -51,22 +47,15 @@
    *   How client applications should include FreeType header files.
    *
    * @description:
-   *   To be as flexible as possible (and for historical reasons), FreeType
-   *   uses a very special inclusion scheme to load header files, for example
+   *   To be as flexible as possible (and for historical reasons), you must
+   *   load file `ft2build.h` first before other header files, for example
    *
    *   ```
    *     #include <ft2build.h>
    *
-   *     #include FT_FREETYPE_H
-   *     #include FT_OUTLINE_H
+   *     #include <freetype/freetype.h>
+   *     #include <freetype/ftoutln.h>
    *   ```
-   *
-   *   A compiler and its preprocessor only needs an include path to find the
-   *   file `ft2build.h`; the exact locations and names of the other FreeType
-   *   header files are hidden by @header_file_macros, loaded by
-   *   `ft2build.h`.  The API documentation always gives the header macro
-   *   name needed for a particular function.
-   *
    */
 
 
--- a/include/freetype/ftadvanc.h
+++ b/include/freetype/ftadvanc.h
@@ -21,7 +21,7 @@
 
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
 
 #ifdef FREETYPE_H
 #error "freetype.h of FreeType 1 has been loaded!"
--- a/include/freetype/ftbbox.h
+++ b/include/freetype/ftbbox.h
@@ -32,7 +32,7 @@
 
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
 
 #ifdef FREETYPE_H
 #error "freetype.h of FreeType 1 has been loaded!"
--- a/include/freetype/ftbdf.h
+++ b/include/freetype/ftbdf.h
@@ -20,7 +20,7 @@
 #define FTBDF_H_
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
 
 #ifdef FREETYPE_H
 #error "freetype.h of FreeType 1 has been loaded!"
--- a/include/freetype/ftbitmap.h
+++ b/include/freetype/ftbitmap.h
@@ -21,8 +21,8 @@
 
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_COLOR_H
+#include <freetype/freetype.h>
+#include <freetype/ftcolor.h>
 
 #ifdef FREETYPE_H
 #error "freetype.h of FreeType 1 has been loaded!"
--- a/include/freetype/ftbzip2.h
+++ b/include/freetype/ftbzip2.h
@@ -20,7 +20,7 @@
 #define FTBZIP2_H_
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
 
 #ifdef FREETYPE_H
 #error "freetype.h of FreeType 1 has been loaded!"
--- a/include/freetype/ftcache.h
+++ b/include/freetype/ftcache.h
@@ -21,7 +21,7 @@
 
 
 #include <ft2build.h>
-#include FT_GLYPH_H
+#include <freetype/ftglyph.h>
 
 
 FT_BEGIN_HEADER
--- a/include/freetype/ftcid.h
+++ b/include/freetype/ftcid.h
@@ -20,7 +20,7 @@
 #define FTCID_H_
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
 
 #ifdef FREETYPE_H
 #error "freetype.h of FreeType 1 has been loaded!"
--- a/include/freetype/ftcolor.h
+++ b/include/freetype/ftcolor.h
@@ -20,7 +20,7 @@
 #define FTCOLOR_H_
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
 
 #ifdef FREETYPE_H
 #error "freetype.h of FreeType 1 has been loaded!"
--- a/include/freetype/ftdriver.h
+++ b/include/freetype/ftdriver.h
@@ -20,8 +20,8 @@
 #define FTDRIVER_H_
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_PARAMETER_TAGS_H
+#include <freetype/freetype.h>
+#include <freetype/ftparams.h>
 
 #ifdef FREETYPE_H
 #error "freetype.h of FreeType 1 has been loaded!"
--- a/include/freetype/fterrors.h
+++ b/include/freetype/fterrors.h
@@ -89,7 +89,7 @@
    *       const char*  err_msg;
    *     } ft_errors[] =
    *
-   *     #include FT_ERRORS_H
+   *     #include <freetype/fterrors.h>
    *   ```
    *
    *   An alternative to using an array is a switch statement.
@@ -124,7 +124,7 @@
 
 
   /* include module base error codes */
-#include FT_MODULE_ERRORS_H
+#include <freetype/ftmoderr.h>
 
 
   /*******************************************************************/
@@ -197,7 +197,7 @@
 
 
   /* now include the error codes */
-#include FT_ERROR_DEFINITIONS_H
+#include <freetype/fterrdef.h>
 
 
 #ifdef FT_ERROR_END_LIST
@@ -232,11 +232,16 @@
 #undef FT_ERR_PREFIX
 #endif
 
-  /* FT_INCLUDE_ERR_PROTOS:  Control if function prototypes should be       */
-  /*                         included with `#include FT_ERRORS_H'.  This is */
-  /*                         only true where `FT_ERRORDEF` is undefined.    */
-  /* FT_ERR_PROTOS_DEFINED:  Actual multiple-inclusion protection of        */
-  /*                         `fterrors.h`.                                  */
+  /* FT_INCLUDE_ERR_PROTOS: Control whether function prototypes should be */
+  /*                        included with                                 */
+  /*                                                                      */
+  /*                          #include <freetype/fterrors.h>              */
+  /*                                                                      */
+  /*                        This is only true where `FT_ERRORDEF` is      */
+  /*                        undefined.                                    */
+  /*                                                                      */
+  /* FT_ERR_PROTOS_DEFINED: Actual multiple-inclusion protection of       */
+  /*                        `fterrors.h`.                                 */
 #ifdef FT_INCLUDE_ERR_PROTOS
 #undef FT_INCLUDE_ERR_PROTOS
 
--- a/include/freetype/ftfntfmt.h
+++ b/include/freetype/ftfntfmt.h
@@ -20,7 +20,7 @@
 #define FTFNTFMT_H_
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
 
 #ifdef FREETYPE_H
 #error "freetype.h of FreeType 1 has been loaded!"
--- a/include/freetype/ftgasp.h
+++ b/include/freetype/ftgasp.h
@@ -20,7 +20,7 @@
 #define FTGASP_H_
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
 
 #ifdef FREETYPE_H
 #error "freetype.h of FreeType 1 has been loaded!"
--- a/include/freetype/ftglyph.h
+++ b/include/freetype/ftglyph.h
@@ -34,7 +34,7 @@
 
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
 
 #ifdef FREETYPE_H
 #error "freetype.h of FreeType 1 has been loaded!"
--- a/include/freetype/ftgxval.h
+++ b/include/freetype/ftgxval.h
@@ -29,7 +29,7 @@
 #define FTGXVAL_H_
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
 
 #ifdef FREETYPE_H
 #error "freetype.h of FreeType 1 has been loaded!"
--- a/include/freetype/ftgzip.h
+++ b/include/freetype/ftgzip.h
@@ -20,7 +20,7 @@
 #define FTGZIP_H_
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
 
 #ifdef FREETYPE_H
 #error "freetype.h of FreeType 1 has been loaded!"
--- a/include/freetype/ftincrem.h
+++ b/include/freetype/ftincrem.h
@@ -20,8 +20,8 @@
 #define FTINCREM_H_
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_PARAMETER_TAGS_H
+#include <freetype/freetype.h>
+#include <freetype/ftparams.h>
 
 #ifdef FREETYPE_H
 #error "freetype.h of FreeType 1 has been loaded!"
--- a/include/freetype/ftlcdfil.h
+++ b/include/freetype/ftlcdfil.h
@@ -21,8 +21,8 @@
 #define FTLCDFIL_H_
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_PARAMETER_TAGS_H
+#include <freetype/freetype.h>
+#include <freetype/ftparams.h>
 
 #ifdef FREETYPE_H
 #error "freetype.h of FreeType 1 has been loaded!"
--- a/include/freetype/ftlist.h
+++ b/include/freetype/ftlist.h
@@ -29,7 +29,7 @@
 
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
 
 #ifdef FREETYPE_H
 #error "freetype.h of FreeType 1 has been loaded!"
--- a/include/freetype/ftlzw.h
+++ b/include/freetype/ftlzw.h
@@ -20,7 +20,7 @@
 #define FTLZW_H_
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
 
 #ifdef FREETYPE_H
 #error "freetype.h of FreeType 1 has been loaded!"
--- a/include/freetype/ftmm.h
+++ b/include/freetype/ftmm.h
@@ -21,7 +21,7 @@
 
 
 #include <ft2build.h>
-#include FT_TYPE1_TABLES_H
+#include <freetype/t1tables.h>
 
 
 FT_BEGIN_HEADER
--- a/include/freetype/ftmodapi.h
+++ b/include/freetype/ftmodapi.h
@@ -21,7 +21,7 @@
 
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
 
 #ifdef FREETYPE_H
 #error "freetype.h of FreeType 1 has been loaded!"
--- a/include/freetype/ftmoderr.h
+++ b/include/freetype/ftmoderr.h
@@ -94,7 +94,7 @@
    *     const char*  mod_err_msg
    *   } ft_mod_errors[] =
    *
-   *   #include FT_MODULE_ERRORS_H
+   *   #include <freetype/ftmoderr.h>
    * ```
    *
    */
--- a/include/freetype/ftotval.h
+++ b/include/freetype/ftotval.h
@@ -31,7 +31,7 @@
 #define FTOTVAL_H_
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
 
 #ifdef FREETYPE_H
 #error "freetype.h of FreeType 1 has been loaded!"
--- a/include/freetype/ftoutln.h
+++ b/include/freetype/ftoutln.h
@@ -22,7 +22,7 @@
 
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
 
 #ifdef FREETYPE_H
 #error "freetype.h of FreeType 1 has been loaded!"
--- a/include/freetype/ftparams.h
+++ b/include/freetype/ftparams.h
@@ -20,7 +20,7 @@
 #define FTPARAMS_H_
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
 
 #ifdef FREETYPE_H
 #error "freetype.h of FreeType 1 has been loaded!"
--- a/include/freetype/ftpfr.h
+++ b/include/freetype/ftpfr.h
@@ -20,7 +20,7 @@
 #define FTPFR_H_
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
 
 #ifdef FREETYPE_H
 #error "freetype.h of FreeType 1 has been loaded!"
--- a/include/freetype/ftrender.h
+++ b/include/freetype/ftrender.h
@@ -21,8 +21,8 @@
 
 
 #include <ft2build.h>
-#include FT_MODULE_H
-#include FT_GLYPH_H
+#include <freetype/ftmodapi.h>
+#include <freetype/ftglyph.h>
 
 
 FT_BEGIN_HEADER
--- a/include/freetype/ftsizes.h
+++ b/include/freetype/ftsizes.h
@@ -30,7 +30,7 @@
 
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
 
 #ifdef FREETYPE_H
 #error "freetype.h of FreeType 1 has been loaded!"
--- a/include/freetype/ftsnames.h
+++ b/include/freetype/ftsnames.h
@@ -24,8 +24,8 @@
 
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_PARAMETER_TAGS_H
+#include <freetype/freetype.h>
+#include <freetype/ftparams.h>
 
 #ifdef FREETYPE_H
 #error "freetype.h of FreeType 1 has been loaded!"
--- a/include/freetype/ftstroke.h
+++ b/include/freetype/ftstroke.h
@@ -20,8 +20,8 @@
 #define FTSTROKE_H_
 
 #include <ft2build.h>
-#include FT_OUTLINE_H
-#include FT_GLYPH_H
+#include <freetype/ftoutln.h>
+#include <freetype/ftglyph.h>
 
 
 FT_BEGIN_HEADER
--- a/include/freetype/ftsynth.h
+++ b/include/freetype/ftsynth.h
@@ -46,7 +46,7 @@
 
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
 
 #ifdef FREETYPE_H
 #error "freetype.h of FreeType 1 has been loaded!"
--- a/include/freetype/fttrigon.h
+++ b/include/freetype/fttrigon.h
@@ -19,7 +19,7 @@
 #ifndef FTTRIGON_H_
 #define FTTRIGON_H_
 
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
 
 #ifdef FREETYPE_H
 #error "freetype.h of FreeType 1 has been loaded!"
--- a/include/freetype/fttypes.h
+++ b/include/freetype/fttypes.h
@@ -22,8 +22,8 @@
 
 #include <ft2build.h>
 #include FT_CONFIG_CONFIG_H
-#include FT_SYSTEM_H
-#include FT_IMAGE_H
+#include <freetype/ftsystem.h>
+#include <freetype/ftimage.h>
 
 #include <stddef.h>
 
--- a/include/freetype/ftwinfnt.h
+++ b/include/freetype/ftwinfnt.h
@@ -20,7 +20,7 @@
 #define FTWINFNT_H_
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
 
 #ifdef FREETYPE_H
 #error "freetype.h of FreeType 1 has been loaded!"
--- a/include/freetype/internal/autohint.h
+++ b/include/freetype/internal/autohint.h
@@ -71,7 +71,7 @@
 
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
 
 
 FT_BEGIN_HEADER
--- a/include/freetype/internal/cffotypes.h
+++ b/include/freetype/internal/cffotypes.h
@@ -20,11 +20,11 @@
 #define CFFOTYPES_H_
 
 #include <ft2build.h>
-#include FT_INTERNAL_OBJECTS_H
-#include FT_INTERNAL_CFF_TYPES_H
-#include FT_INTERNAL_TRUETYPE_TYPES_H
-#include FT_SERVICE_POSTSCRIPT_CMAPS_H
-#include FT_INTERNAL_POSTSCRIPT_HINTS_H
+#include <freetype/internal/ftobjs.h>
+#include <freetype/internal/cfftypes.h>
+#include <freetype/internal/tttypes.h>
+#include <freetype/internal/services/svpscmap.h>
+#include <freetype/internal/pshints.h>
 
 
 FT_BEGIN_HEADER
--- a/include/freetype/internal/cfftypes.h
+++ b/include/freetype/internal/cfftypes.h
@@ -22,12 +22,12 @@
 
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_TYPE1_TABLES_H
-#include FT_INTERNAL_SERVICE_H
-#include FT_SERVICE_POSTSCRIPT_CMAPS_H
-#include FT_INTERNAL_POSTSCRIPT_HINTS_H
-#include FT_INTERNAL_TYPE1_TYPES_H
+#include <freetype/freetype.h>
+#include <freetype/t1tables.h>
+#include <freetype/internal/ftserv.h>
+#include <freetype/internal/services/svpscmap.h>
+#include <freetype/internal/pshints.h>
+#include <freetype/internal/t1types.h>
 
 
 FT_BEGIN_HEADER
--- a/include/freetype/internal/ftcalc.h
+++ b/include/freetype/internal/ftcalc.h
@@ -21,7 +21,7 @@
 
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
 
 
 FT_BEGIN_HEADER
--- a/include/freetype/internal/ftdebug.h
+++ b/include/freetype/internal/ftdebug.h
@@ -27,7 +27,7 @@
 
 #include <ft2build.h>
 #include FT_CONFIG_CONFIG_H
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
 
 
 FT_BEGIN_HEADER
@@ -56,7 +56,7 @@
   /* defining the enumeration */
   typedef enum  FT_Trace_
   {
-#include FT_INTERNAL_TRACE_H
+#include <freetype/internal/fttrace.h>
     trace_count
 
   } FT_Trace;
--- a/include/freetype/internal/ftdrv.h
+++ b/include/freetype/internal/ftdrv.h
@@ -21,7 +21,7 @@
 
 
 #include <ft2build.h>
-#include FT_MODULE_H
+#include <freetype/ftmodapi.h>
 
 
 FT_BEGIN_HEADER
--- a/include/freetype/internal/ftgloadr.h
+++ b/include/freetype/internal/ftgloadr.h
@@ -21,7 +21,7 @@
 
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
 
 
 FT_BEGIN_HEADER
@@ -137,8 +137,6 @@
   /* add the current glyph to the base glyph */
   FT_BASE( void )
   FT_GlyphLoader_Add( FT_GlyphLoader  loader );
-
- /* */
 
 
 FT_END_HEADER
--- a/include/freetype/internal/fthash.h
+++ b/include/freetype/internal/fthash.h
@@ -44,7 +44,7 @@
 
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
 
 
 FT_BEGIN_HEADER
--- a/include/freetype/internal/ftmemory.h
+++ b/include/freetype/internal/ftmemory.h
@@ -22,7 +22,7 @@
 
 #include <ft2build.h>
 #include FT_CONFIG_CONFIG_H
-#include FT_TYPES_H
+#include <freetype/fttypes.h>
 
 
 FT_BEGIN_HEADER
@@ -388,8 +388,6 @@
 
 #define FT_STRCPYN( dst, src, size )                                         \
           ft_mem_strcpyn( (char*)dst, (const char*)(src), (FT_ULong)(size) )
-
- /* */
 
 
 FT_END_HEADER
--- a/include/freetype/internal/ftobjs.h
+++ b/include/freetype/internal/ftobjs.h
@@ -27,18 +27,18 @@
 #define FTOBJS_H_
 
 #include <ft2build.h>
-#include FT_RENDER_H
-#include FT_SIZES_H
-#include FT_LCD_FILTER_H
-#include FT_INTERNAL_MEMORY_H
-#include FT_INTERNAL_GLYPH_LOADER_H
-#include FT_INTERNAL_DRIVER_H
-#include FT_INTERNAL_AUTOHINT_H
-#include FT_INTERNAL_SERVICE_H
-#include FT_INTERNAL_CALC_H
+#include <freetype/ftrender.h>
+#include <freetype/ftsizes.h>
+#include <freetype/ftlcdfil.h>
+#include <freetype/internal/ftmemory.h>
+#include <freetype/internal/ftgloadr.h>
+#include <freetype/internal/ftdrv.h>
+#include <freetype/internal/autohint.h>
+#include <freetype/internal/ftserv.h>
+#include <freetype/internal/ftcalc.h>
 
 #ifdef FT_CONFIG_OPTION_INCREMENTAL
-#include FT_INCREMENTAL_H
+#include <freetype/ftincrem.h>
 #endif
 
 
@@ -653,7 +653,7 @@
   FT_BASE( void )
   FT_Done_GlyphSlot( FT_GlyphSlot  slot );
 
- /* */
+  /* */
 
 #define FT_REQUEST_WIDTH( req )                                            \
           ( (req)->horiResolution                                          \
--- a/include/freetype/internal/ftpsprop.h
+++ b/include/freetype/internal/ftpsprop.h
@@ -21,7 +21,7 @@
 
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
 
 
 FT_BEGIN_HEADER
--- a/include/freetype/internal/ftrfork.h
+++ b/include/freetype/internal/ftrfork.h
@@ -26,7 +26,7 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_OBJECTS_H
+#include <freetype/internal/ftobjs.h>
 
 
 FT_BEGIN_HEADER
--- a/include/freetype/internal/ftserv.h
+++ b/include/freetype/internal/ftserv.h
@@ -486,33 +486,6 @@
 
   /* */
 
-  /*
-   * The header files containing the services.
-   */
-
-#define FT_SERVICE_BDF_H                <freetype/internal/services/svbdf.h>
-#define FT_SERVICE_CFF_TABLE_LOAD_H     <freetype/internal/services/svcfftl.h>
-#define FT_SERVICE_CID_H                <freetype/internal/services/svcid.h>
-#define FT_SERVICE_FONT_FORMAT_H        <freetype/internal/services/svfntfmt.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_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_OPENTYPE_VALIDATE_H  <freetype/internal/services/svotval.h>
-#define FT_SERVICE_PFR_H                <freetype/internal/services/svpfr.h>
-#define FT_SERVICE_POSTSCRIPT_CMAPS_H   <freetype/internal/services/svpscmap.h>
-#define FT_SERVICE_POSTSCRIPT_INFO_H    <freetype/internal/services/svpsinfo.h>
-#define FT_SERVICE_POSTSCRIPT_NAME_H    <freetype/internal/services/svpostnm.h>
-#define FT_SERVICE_PROPERTIES_H         <freetype/internal/services/svprop.h>
-#define FT_SERVICE_SFNT_H               <freetype/internal/services/svsfnt.h>
-#define FT_SERVICE_TRUETYPE_ENGINE_H    <freetype/internal/services/svtteng.h>
-#define FT_SERVICE_TRUETYPE_GLYF_H      <freetype/internal/services/svttglyf.h>
-#define FT_SERVICE_TT_CMAP_H            <freetype/internal/services/svttcmap.h>
-#define FT_SERVICE_WINFNT_H             <freetype/internal/services/svwinfnt.h>
-
- /* */
-
 FT_END_HEADER
 
 #endif /* FTSERV_H_ */
--- a/include/freetype/internal/ftstream.h
+++ b/include/freetype/internal/ftstream.h
@@ -21,8 +21,8 @@
 
 
 #include <ft2build.h>
-#include FT_SYSTEM_H
-#include FT_INTERNAL_OBJECTS_H
+#include <freetype/ftsystem.h>
+#include <freetype/internal/ftobjs.h>
 
 
 FT_BEGIN_HEADER
--- a/include/freetype/internal/internal.h
+++ /dev/null
@@ -1,67 +1,0 @@
-/****************************************************************************
- *
- * internal.h
- *
- *   Internal header files (specification only).
- *
- * Copyright (C) 1996-2020 by
- * David Turner, Robert Wilhelm, and Werner Lemberg.
- *
- * This file is part of the FreeType project, and may only be used,
- * modified, and distributed under the terms of the FreeType project
- * license, LICENSE.TXT.  By continuing to use, modify, or distribute
- * this file you indicate that you have read the license and
- * understand and accept it fully.
- *
- */
-
-
-  /**************************************************************************
-   *
-   * This file is automatically included by `ft2build.h`.  Do not include it
-   * manually!
-   *
-   */
-
-
-#define FT_INTERNAL_OBJECTS_H             <freetype/internal/ftobjs.h>
-#define FT_INTERNAL_STREAM_H              <freetype/internal/ftstream.h>
-#define FT_INTERNAL_MEMORY_H              <freetype/internal/ftmemory.h>
-#define FT_INTERNAL_DEBUG_H               <freetype/internal/ftdebug.h>
-#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/ftdrv.h>
-#define FT_INTERNAL_TRACE_H               <freetype/internal/fttrace.h>
-#define FT_INTERNAL_GLYPH_LOADER_H        <freetype/internal/ftgloadr.h>
-#define FT_INTERNAL_SFNT_H                <freetype/internal/sfnt.h>
-#define FT_INTERNAL_SERVICE_H             <freetype/internal/ftserv.h>
-#define FT_INTERNAL_RFORK_H               <freetype/internal/ftrfork.h>
-#define FT_INTERNAL_VALIDATE_H            <freetype/internal/ftvalid.h>
-
-#define FT_INTERNAL_TRUETYPE_TYPES_H      <freetype/internal/tttypes.h>
-#define FT_INTERNAL_TYPE1_TYPES_H         <freetype/internal/t1types.h>
-#define FT_INTERNAL_WOFF_TYPES_H          <freetype/internal/wofftypes.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_PROPS_H    <freetype/internal/ftpsprop.h>
-
-#define FT_INTERNAL_AUTOHINT_H            <freetype/internal/autohint.h>
-
-#define FT_INTERNAL_CFF_TYPES_H           <freetype/internal/cfftypes.h>
-#define FT_INTERNAL_CFF_OBJECTS_TYPES_H   <freetype/internal/cffotypes.h>
-
-
-#if defined( _MSC_VER )      /* Visual C++ (and Intel C++) */
-
-  /* We disable the warning `conditional expression is constant' here */
-  /* in order to compile cleanly with the maximum level of warnings.  */
-  /* In particular, the warning complains about stuff like `while(0)' */
-  /* which is very useful in macro definitions.  There is no benefit  */
-  /* in having it enabled.                                            */
-#pragma warning( disable : 4127 )
-
-#endif /* _MSC_VER */
-
-
-/* END */
--- a/include/freetype/internal/psaux.h
+++ b/include/freetype/internal/psaux.h
@@ -22,13 +22,13 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_OBJECTS_H
-#include FT_INTERNAL_TYPE1_TYPES_H
-#include FT_INTERNAL_HASH_H
-#include FT_INTERNAL_TRUETYPE_TYPES_H
-#include FT_SERVICE_POSTSCRIPT_CMAPS_H
-#include FT_INTERNAL_CFF_TYPES_H
-#include FT_INTERNAL_CFF_OBJECTS_TYPES_H
+#include <freetype/internal/ftobjs.h>
+#include <freetype/internal/t1types.h>
+#include <freetype/internal/fthash.h>
+#include <freetype/internal/tttypes.h>
+#include <freetype/internal/services/svpscmap.h>
+#include <freetype/internal/cfftypes.h>
+#include <freetype/internal/cffotypes.h>
 
 
 
--- a/include/freetype/internal/pshints.h
+++ b/include/freetype/internal/pshints.h
@@ -23,8 +23,8 @@
 
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_TYPE1_TABLES_H
+#include <freetype/freetype.h>
+#include <freetype/t1tables.h>
 
 
 FT_BEGIN_HEADER
--- a/include/freetype/internal/services/svbdf.h
+++ b/include/freetype/internal/services/svbdf.h
@@ -19,8 +19,8 @@
 #ifndef SVBDF_H_
 #define SVBDF_H_
 
-#include FT_BDF_H
-#include FT_INTERNAL_SERVICE_H
+#include <freetype/ftbdf.h>
+#include <freetype/internal/ftserv.h>
 
 
 FT_BEGIN_HEADER
--- a/include/freetype/internal/services/svcfftl.h
+++ b/include/freetype/internal/services/svcfftl.h
@@ -19,8 +19,8 @@
 #ifndef SVCFFTL_H_
 #define SVCFFTL_H_
 
-#include FT_INTERNAL_SERVICE_H
-#include FT_INTERNAL_CFF_TYPES_H
+#include <freetype/internal/ftserv.h>
+#include <freetype/internal/cfftypes.h>
 
 
 FT_BEGIN_HEADER
--- a/include/freetype/internal/services/svcid.h
+++ b/include/freetype/internal/services/svcid.h
@@ -19,7 +19,7 @@
 #ifndef SVCID_H_
 #define SVCID_H_
 
-#include FT_INTERNAL_SERVICE_H
+#include <freetype/internal/ftserv.h>
 
 
 FT_BEGIN_HEADER
--- a/include/freetype/internal/services/svfntfmt.h
+++ b/include/freetype/internal/services/svfntfmt.h
@@ -19,7 +19,7 @@
 #ifndef SVFNTFMT_H_
 #define SVFNTFMT_H_
 
-#include FT_INTERNAL_SERVICE_H
+#include <freetype/internal/ftserv.h>
 
 
 FT_BEGIN_HEADER
--- a/include/freetype/internal/services/svgldict.h
+++ b/include/freetype/internal/services/svgldict.h
@@ -19,7 +19,7 @@
 #ifndef SVGLDICT_H_
 #define SVGLDICT_H_
 
-#include FT_INTERNAL_SERVICE_H
+#include <freetype/internal/ftserv.h>
 
 
 FT_BEGIN_HEADER
--- a/include/freetype/internal/services/svgxval.h
+++ b/include/freetype/internal/services/svgxval.h
@@ -28,8 +28,8 @@
 #ifndef SVGXVAL_H_
 #define SVGXVAL_H_
 
-#include FT_GX_VALIDATE_H
-#include FT_INTERNAL_VALIDATE_H
+#include <freetype/ftgxval.h>
+#include <freetype/internal/ftvalid.h>
 
 FT_BEGIN_HEADER
 
--- a/include/freetype/internal/services/svkern.h
+++ b/include/freetype/internal/services/svkern.h
@@ -19,8 +19,8 @@
 #ifndef SVKERN_H_
 #define SVKERN_H_
 
-#include FT_INTERNAL_SERVICE_H
-#include FT_TRUETYPE_TABLES_H
+#include <freetype/internal/ftserv.h>
+#include <freetype/tttables.h>
 
 
 FT_BEGIN_HEADER
--- a/include/freetype/internal/services/svmetric.h
+++ b/include/freetype/internal/services/svmetric.h
@@ -19,7 +19,7 @@
 #ifndef SVMETRIC_H_
 #define SVMETRIC_H_
 
-#include FT_INTERNAL_SERVICE_H
+#include <freetype/internal/ftserv.h>
 
 
 FT_BEGIN_HEADER
--- a/include/freetype/internal/services/svmm.h
+++ b/include/freetype/internal/services/svmm.h
@@ -19,7 +19,7 @@
 #ifndef SVMM_H_
 #define SVMM_H_
 
-#include FT_INTERNAL_SERVICE_H
+#include <freetype/internal/ftserv.h>
 
 
 FT_BEGIN_HEADER
--- a/include/freetype/internal/services/svotval.h
+++ b/include/freetype/internal/services/svotval.h
@@ -19,8 +19,8 @@
 #ifndef SVOTVAL_H_
 #define SVOTVAL_H_
 
-#include FT_OPENTYPE_VALIDATE_H
-#include FT_INTERNAL_VALIDATE_H
+#include <freetype/ftotval.h>
+#include <freetype/internal/ftvalid.h>
 
 FT_BEGIN_HEADER
 
--- a/include/freetype/internal/services/svpfr.h
+++ b/include/freetype/internal/services/svpfr.h
@@ -19,8 +19,8 @@
 #ifndef SVPFR_H_
 #define SVPFR_H_
 
-#include FT_PFR_H
-#include FT_INTERNAL_SERVICE_H
+#include <freetype/ftpfr.h>
+#include <freetype/internal/ftserv.h>
 
 
 FT_BEGIN_HEADER
@@ -56,7 +56,6 @@
 
   };
 
- /* */
 
 FT_END_HEADER
 
--- a/include/freetype/internal/services/svpostnm.h
+++ b/include/freetype/internal/services/svpostnm.h
@@ -19,7 +19,7 @@
 #ifndef SVPOSTNM_H_
 #define SVPOSTNM_H_
 
-#include FT_INTERNAL_SERVICE_H
+#include <freetype/internal/ftserv.h>
 
 
 FT_BEGIN_HEADER
--- a/include/freetype/internal/services/svpscmap.h
+++ b/include/freetype/internal/services/svpscmap.h
@@ -19,7 +19,7 @@
 #ifndef SVPSCMAP_H_
 #define SVPSCMAP_H_
 
-#include FT_INTERNAL_OBJECTS_H
+#include <freetype/internal/ftobjs.h>
 
 
 FT_BEGIN_HEADER
--- a/include/freetype/internal/services/svpsinfo.h
+++ b/include/freetype/internal/services/svpsinfo.h
@@ -19,8 +19,8 @@
 #ifndef SVPSINFO_H_
 #define SVPSINFO_H_
 
-#include FT_INTERNAL_SERVICE_H
-#include FT_INTERNAL_TYPE1_TYPES_H
+#include <freetype/internal/ftserv.h>
+#include <freetype/internal/t1types.h>
 
 
 FT_BEGIN_HEADER
--- a/include/freetype/internal/services/svsfnt.h
+++ b/include/freetype/internal/services/svsfnt.h
@@ -19,8 +19,8 @@
 #ifndef SVSFNT_H_
 #define SVSFNT_H_
 
-#include FT_INTERNAL_SERVICE_H
-#include FT_TRUETYPE_TABLES_H
+#include <freetype/internal/ftserv.h>
+#include <freetype/tttables.h>
 
 
 FT_BEGIN_HEADER
--- a/include/freetype/internal/services/svttcmap.h
+++ b/include/freetype/internal/services/svttcmap.h
@@ -22,8 +22,8 @@
 #ifndef SVTTCMAP_H_
 #define SVTTCMAP_H_
 
-#include FT_INTERNAL_SERVICE_H
-#include FT_TRUETYPE_TABLES_H
+#include <freetype/internal/ftserv.h>
+#include <freetype/tttables.h>
 
 
 FT_BEGIN_HEADER
--- a/include/freetype/internal/services/svtteng.h
+++ b/include/freetype/internal/services/svtteng.h
@@ -19,8 +19,8 @@
 #ifndef SVTTENG_H_
 #define SVTTENG_H_
 
-#include FT_INTERNAL_SERVICE_H
-#include FT_MODULE_H
+#include <freetype/internal/ftserv.h>
+#include <freetype/ftmodapi.h>
 
 
 FT_BEGIN_HEADER
--- a/include/freetype/internal/services/svttglyf.h
+++ b/include/freetype/internal/services/svttglyf.h
@@ -18,8 +18,8 @@
 #ifndef SVTTGLYF_H_
 #define SVTTGLYF_H_
 
-#include FT_INTERNAL_SERVICE_H
-#include FT_TRUETYPE_TABLES_H
+#include <freetype/internal/ftserv.h>
+#include <freetype/tttables.h>
 
 
 FT_BEGIN_HEADER
--- a/include/freetype/internal/services/svwinfnt.h
+++ b/include/freetype/internal/services/svwinfnt.h
@@ -19,8 +19,8 @@
 #ifndef SVWINFNT_H_
 #define SVWINFNT_H_
 
-#include FT_INTERNAL_SERVICE_H
-#include FT_WINFONTS_H
+#include <freetype/internal/ftserv.h>
+#include <freetype/ftwinfnt.h>
 
 
 FT_BEGIN_HEADER
--- a/include/freetype/internal/sfnt.h
+++ b/include/freetype/internal/sfnt.h
@@ -21,9 +21,9 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DRIVER_H
-#include FT_INTERNAL_TRUETYPE_TYPES_H
-#include FT_INTERNAL_WOFF_TYPES_H
+#include <freetype/internal/ftdrv.h>
+#include <freetype/internal/tttypes.h>
+#include <freetype/internal/wofftypes.h>
 
 
 FT_BEGIN_HEADER
--- a/include/freetype/internal/t1types.h
+++ b/include/freetype/internal/t1types.h
@@ -22,11 +22,11 @@
 
 
 #include <ft2build.h>
-#include FT_TYPE1_TABLES_H
-#include FT_INTERNAL_POSTSCRIPT_HINTS_H
-#include FT_INTERNAL_SERVICE_H
-#include FT_INTERNAL_HASH_H
-#include FT_SERVICE_POSTSCRIPT_CMAPS_H
+#include <freetype/t1tables.h>
+#include <freetype/internal/pshints.h>
+#include <freetype/internal/ftserv.h>
+#include <freetype/internal/fthash.h>
+#include <freetype/internal/services/svpscmap.h>
 
 
 FT_BEGIN_HEADER
--- a/include/freetype/internal/tttypes.h
+++ b/include/freetype/internal/tttypes.h
@@ -22,12 +22,12 @@
 
 
 #include <ft2build.h>
-#include FT_TRUETYPE_TABLES_H
-#include FT_INTERNAL_OBJECTS_H
-#include FT_COLOR_H
+#include <freetype/tttables.h>
+#include <freetype/internal/ftobjs.h>
+#include <freetype/ftcolor.h>
 
 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
-#include FT_MULTIPLE_MASTERS_H
+#include <freetype/ftmm.h>
 #endif
 
 
--- a/include/freetype/internal/wofftypes.h
+++ b/include/freetype/internal/wofftypes.h
@@ -22,8 +22,8 @@
 
 
 #include <ft2build.h>
-#include FT_TRUETYPE_TABLES_H
-#include FT_INTERNAL_OBJECTS_H
+#include <freetype/tttables.h>
+#include <freetype/internal/ftobjs.h>
 
 
 FT_BEGIN_HEADER
--- a/include/freetype/t1tables.h
+++ b/include/freetype/t1tables.h
@@ -22,7 +22,7 @@
 
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
 
 #ifdef FREETYPE_H
 #error "freetype.h of FreeType 1 has been loaded!"
--- a/include/freetype/tttables.h
+++ b/include/freetype/tttables.h
@@ -22,7 +22,7 @@
 
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
 
 #ifdef FREETYPE_H
 #error "freetype.h of FreeType 1 has been loaded!"
--- a/include/freetype/tttags.h
+++ b/include/freetype/tttags.h
@@ -21,7 +21,7 @@
 
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
 
 #ifdef FREETYPE_H
 #error "freetype.h of FreeType 1 has been loaded!"
--- a/include/ft2build.h
+++ b/include/ft2build.h
@@ -18,16 +18,14 @@
 
   /**************************************************************************
    *
-   * This is the 'entry point' for FreeType header file inclusions.  It is
-   * the only header file which should be included directly; all other
-   * FreeType header files should be accessed with macro names (after
-   * including `ft2build.h`).
+   * This is the 'entry point' for FreeType header file inclusions, to be
+   * loaded before all other header files.
    *
    * A typical example is
    *
    * ```
    *   #include <ft2build.h>
-   *   #include FT_FREETYPE_H
+   *   #include <freetype/freetype.h>
    * ```
    *
    */
--- a/src/autofit/afcjk.c
+++ b/src/autofit/afcjk.c
@@ -23,8 +23,8 @@
    */
 
 #include <ft2build.h>
-#include FT_ADVANCES_H
-#include FT_INTERNAL_DEBUG_H
+#include <freetype/ftadvanc.h>
+#include <freetype/internal/ftdebug.h>
 
 #include "afglobal.h"
 #include "aflatin.h"
--- a/src/autofit/aferrors.h
+++ b/src/autofit/aferrors.h
@@ -26,7 +26,7 @@
 #ifndef AFERRORS_H_
 #define AFERRORS_H_
 
-#include FT_MODULE_ERRORS_H
+#include <freetype/ftmoderr.h>
 
 #undef FTERRORS_H_
 
@@ -34,7 +34,7 @@
 #define FT_ERR_PREFIX  AF_Err_
 #define FT_ERR_BASE    FT_Mod_Err_Autofit
 
-#include FT_ERRORS_H
+#include <freetype/fterrors.h>
 
 #endif /* AFERRORS_H_ */
 
--- a/src/autofit/afglobal.c
+++ b/src/autofit/afglobal.c
@@ -19,7 +19,7 @@
 #include "afglobal.h"
 #include "afranges.h"
 #include "afshaper.h"
-#include FT_INTERNAL_DEBUG_H
+#include <freetype/internal/ftdebug.h>
 
 
   /**************************************************************************
--- a/src/autofit/afhints.c
+++ b/src/autofit/afhints.c
@@ -18,8 +18,8 @@
 
 #include "afhints.h"
 #include "aferrors.h"
-#include FT_INTERNAL_CALC_H
-#include FT_INTERNAL_DEBUG_H
+#include <freetype/internal/ftcalc.h>
+#include <freetype/internal/ftdebug.h>
 
 
   /**************************************************************************
--- a/src/autofit/aflatin.c
+++ b/src/autofit/aflatin.c
@@ -17,8 +17,8 @@
 
 
 #include <ft2build.h>
-#include FT_ADVANCES_H
-#include FT_INTERNAL_DEBUG_H
+#include <freetype/ftadvanc.h>
+#include <freetype/internal/ftdebug.h>
 
 #include "afglobal.h"
 #include "aflatin.h"
--- a/src/autofit/aflatin2.c
+++ b/src/autofit/aflatin2.c
@@ -22,7 +22,7 @@
 
 
 #include <ft2build.h>
-#include FT_ADVANCES_H
+#include <freetype/ftadvanc.h>
 
 
 #ifdef FT_OPTION_AUTOFIT2
--- a/src/autofit/afloader.c
+++ b/src/autofit/afloader.c
@@ -22,7 +22,7 @@
 #include "aferrors.h"
 #include "afmodule.h"
 
-#include FT_INTERNAL_CALC_H
+#include <freetype/internal/ftcalc.h>
 
 
   /* Initialize glyph loader. */
--- a/src/autofit/afmodule.c
+++ b/src/autofit/afmodule.c
@@ -53,10 +53,10 @@
   void*  _af_debug_hints = _af_debug_hints_rec;
 #endif
 
-#include FT_INTERNAL_OBJECTS_H
-#include FT_INTERNAL_DEBUG_H
-#include FT_DRIVER_H
-#include FT_SERVICE_PROPERTIES_H
+#include <freetype/internal/ftobjs.h>
+#include <freetype/internal/ftdebug.h>
+#include <freetype/ftdriver.h>
+#include <freetype/internal/services/svprop.h>
 
 
   /**************************************************************************
--- a/src/autofit/afmodule.h
+++ b/src/autofit/afmodule.h
@@ -20,8 +20,8 @@
 #define AFMODULE_H_
 
 #include <ft2build.h>
-#include FT_INTERNAL_OBJECTS_H
-#include FT_MODULE_H
+#include <freetype/internal/ftobjs.h>
+#include <freetype/ftmodapi.h>
 
 
 FT_BEGIN_HEADER
--- a/src/autofit/afshaper.c
+++ b/src/autofit/afshaper.c
@@ -17,8 +17,8 @@
 
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_ADVANCES_H
+#include <freetype/freetype.h>
+#include <freetype/ftadvanc.h>
 #include "afglobal.h"
 #include "aftypes.h"
 #include "afshaper.h"
--- a/src/autofit/afshaper.h
+++ b/src/autofit/afshaper.h
@@ -21,7 +21,7 @@
 
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
 
 
 #ifdef FT_CONFIG_OPTION_USE_HARFBUZZ
--- a/src/autofit/aftypes.h
+++ b/src/autofit/aftypes.h
@@ -34,10 +34,10 @@
 
 #include <ft2build.h>
 
-#include FT_FREETYPE_H
-#include FT_OUTLINE_H
-#include FT_INTERNAL_OBJECTS_H
-#include FT_INTERNAL_DEBUG_H
+#include <freetype/freetype.h>
+#include <freetype/ftoutln.h>
+#include <freetype/internal/ftobjs.h>
+#include <freetype/internal/ftdebug.h>
 
 #include "afblue.h"
 
--- a/src/base/ftadvanc.c
+++ b/src/base/ftadvanc.c
@@ -17,10 +17,10 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
+#include <freetype/internal/ftdebug.h>
 
-#include FT_ADVANCES_H
-#include FT_INTERNAL_OBJECTS_H
+#include <freetype/ftadvanc.h>
+#include <freetype/internal/ftobjs.h>
 
 
   static FT_Error
--- a/src/base/ftbase.h
+++ b/src/base/ftbase.h
@@ -21,7 +21,7 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_OBJECTS_H
+#include <freetype/internal/ftobjs.h>
 
 
 FT_BEGIN_HEADER
--- a/src/base/ftbbox.c
+++ b/src/base/ftbbox.c
@@ -25,13 +25,13 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
+#include <freetype/internal/ftdebug.h>
 
-#include FT_BBOX_H
-#include FT_IMAGE_H
-#include FT_OUTLINE_H
-#include FT_INTERNAL_CALC_H
-#include FT_INTERNAL_OBJECTS_H
+#include <freetype/ftbbox.h>
+#include <freetype/ftimage.h>
+#include <freetype/ftoutln.h>
+#include <freetype/internal/ftcalc.h>
+#include <freetype/internal/ftobjs.h>
 
 
   typedef struct  TBBox_Rec_
--- a/src/base/ftbdf.c
+++ b/src/base/ftbdf.c
@@ -17,10 +17,10 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
+#include <freetype/internal/ftdebug.h>
 
-#include FT_INTERNAL_OBJECTS_H
-#include FT_SERVICE_BDF_H
+#include <freetype/internal/ftobjs.h>
+#include <freetype/internal/services/svbdf.h>
 
 
   /* documentation is in ftbdf.h */
--- a/src/base/ftbitmap.c
+++ b/src/base/ftbitmap.c
@@ -17,11 +17,11 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
+#include <freetype/internal/ftdebug.h>
 
-#include FT_BITMAP_H
-#include FT_IMAGE_H
-#include FT_INTERNAL_OBJECTS_H
+#include <freetype/ftbitmap.h>
+#include <freetype/ftimage.h>
+#include <freetype/internal/ftobjs.h>
 
 
   /**************************************************************************
--- a/src/base/ftcalc.c
+++ b/src/base/ftcalc.c
@@ -33,11 +33,11 @@
 
 
 #include <ft2build.h>
-#include FT_GLYPH_H
-#include FT_TRIGONOMETRY_H
-#include FT_INTERNAL_CALC_H
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_OBJECTS_H
+#include <freetype/ftglyph.h>
+#include <freetype/fttrigon.h>
+#include <freetype/internal/ftcalc.h>
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftobjs.h>
 
 
 #ifdef FT_MULFIX_ASSEMBLER
--- a/src/base/ftcid.c
+++ b/src/base/ftcid.c
@@ -17,9 +17,9 @@
 
 
 #include <ft2build.h>
-#include FT_CID_H
-#include FT_INTERNAL_OBJECTS_H
-#include FT_SERVICE_CID_H
+#include <freetype/ftcid.h>
+#include <freetype/internal/ftobjs.h>
+#include <freetype/internal/services/svcid.h>
 
 
   /* documentation is in ftcid.h */
--- a/src/base/ftcolor.c
+++ b/src/base/ftcolor.c
@@ -17,10 +17,10 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_SFNT_H
-#include FT_INTERNAL_TRUETYPE_TYPES_H
-#include FT_COLOR_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/sfnt.h>
+#include <freetype/internal/tttypes.h>
+#include <freetype/ftcolor.h>
 
 
 #ifdef TT_CONFIG_OPTION_COLOR_LAYERS
--- a/src/base/ftdbgmem.c
+++ b/src/base/ftdbgmem.c
@@ -18,11 +18,11 @@
 
 #include <ft2build.h>
 #include FT_CONFIG_CONFIG_H
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_MEMORY_H
-#include FT_SYSTEM_H
-#include FT_ERRORS_H
-#include FT_TYPES_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftmemory.h>
+#include <freetype/ftsystem.h>
+#include <freetype/fterrors.h>
+#include <freetype/fttypes.h>
 
 
 #ifdef FT_DEBUG_MEMORY
--- a/src/base/ftdebug.c
+++ b/src/base/ftdebug.c
@@ -42,8 +42,8 @@
 
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_INTERNAL_DEBUG_H
+#include <freetype/freetype.h>
+#include <freetype/internal/ftdebug.h>
 
 
 #ifdef FT_DEBUG_LEVEL_ERROR
@@ -126,7 +126,7 @@
 
   static const char*  ft_trace_toggles[trace_count + 1] =
   {
-#include FT_INTERNAL_TRACE_H
+#include <freetype/internal/fttrace.h>
     NULL
   };
 
--- a/src/base/fterrors.c
+++ b/src/base/fterrors.c
@@ -17,8 +17,8 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
-#include FT_ERRORS_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/fterrors.h>
 
 
   /* documentation is in fterrors.h */
@@ -38,7 +38,7 @@
 #define FT_ERRORDEF( e, v, s )    case v: return s;
 #define FT_ERROR_END_LIST       }
 
-#include FT_ERRORS_H
+#include <freetype/fterrors.h>
 
 #endif /* defined( FT_CONFIG_OPTION_ERROR_STRINGS ) || ... */
 
--- a/src/base/ftfntfmt.c
+++ b/src/base/ftfntfmt.c
@@ -17,9 +17,9 @@
 
 
 #include <ft2build.h>
-#include FT_FONT_FORMATS_H
-#include FT_INTERNAL_OBJECTS_H
-#include FT_SERVICE_FONT_FORMAT_H
+#include <freetype/ftfntfmt.h>
+#include <freetype/internal/ftobjs.h>
+#include <freetype/internal/services/svfntfmt.h>
 
 
   /* documentation is in ftfntfmt.h */
--- a/src/base/ftfstype.c
+++ b/src/base/ftfstype.c
@@ -16,10 +16,10 @@
  */
 
 #include <ft2build.h>
-#include FT_TYPE1_TABLES_H
-#include FT_TRUETYPE_TABLES_H
-#include FT_INTERNAL_SERVICE_H
-#include FT_SERVICE_POSTSCRIPT_INFO_H
+#include <freetype/t1tables.h>
+#include <freetype/tttables.h>
+#include <freetype/internal/ftserv.h>
+#include <freetype/internal/services/svpsinfo.h>
 
 
   /* documentation is in freetype.h */
--- a/src/base/ftgasp.c
+++ b/src/base/ftgasp.c
@@ -17,8 +17,8 @@
 
 
 #include <ft2build.h>
-#include FT_GASP_H
-#include FT_INTERNAL_TRUETYPE_TYPES_H
+#include <freetype/ftgasp.h>
+#include <freetype/internal/tttypes.h>
 
 
   FT_EXPORT_DEF( FT_Int )
--- a/src/base/ftgloadr.c
+++ b/src/base/ftgloadr.c
@@ -17,10 +17,10 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_GLYPH_LOADER_H
-#include FT_INTERNAL_MEMORY_H
-#include FT_INTERNAL_OBJECTS_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftgloadr.h>
+#include <freetype/internal/ftmemory.h>
+#include <freetype/internal/ftobjs.h>
 
 #undef  FT_COMPONENT
 #define FT_COMPONENT  gloader
--- a/src/base/ftglyph.c
+++ b/src/base/ftglyph.c
@@ -29,12 +29,12 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
+#include <freetype/internal/ftdebug.h>
 
-#include FT_GLYPH_H
-#include FT_OUTLINE_H
-#include FT_BITMAP_H
-#include FT_INTERNAL_OBJECTS_H
+#include <freetype/ftglyph.h>
+#include <freetype/ftoutln.h>
+#include <freetype/ftbitmap.h>
+#include <freetype/internal/ftobjs.h>
 
 
   /**************************************************************************
--- a/src/base/ftgxval.c
+++ b/src/base/ftgxval.c
@@ -26,10 +26,10 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
+#include <freetype/internal/ftdebug.h>
 
-#include FT_INTERNAL_OBJECTS_H
-#include FT_SERVICE_GX_VALIDATE_H
+#include <freetype/internal/ftobjs.h>
+#include <freetype/internal/services/svgxval.h>
 
 
   /* documentation is in ftgxval.h */
--- a/src/base/fthash.c
+++ b/src/base/fthash.c
@@ -40,8 +40,8 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_HASH_H
-#include FT_INTERNAL_MEMORY_H
+#include <freetype/internal/fthash.h>
+#include <freetype/internal/ftmemory.h>
 
 
 #define INITIAL_HT_SIZE  241
--- a/src/base/ftinit.c
+++ b/src/base/ftinit.c
@@ -39,9 +39,9 @@
 
 #include <ft2build.h>
 #include FT_CONFIG_CONFIG_H
-#include FT_INTERNAL_OBJECTS_H
-#include FT_INTERNAL_DEBUG_H
-#include FT_MODULE_H
+#include <freetype/internal/ftobjs.h>
+#include <freetype/internal/ftdebug.h>
+#include <freetype/ftmodapi.h>
 
 
   /**************************************************************************
--- a/src/base/ftlcdfil.c
+++ b/src/base/ftlcdfil.c
@@ -17,11 +17,11 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
+#include <freetype/internal/ftdebug.h>
 
-#include FT_LCD_FILTER_H
-#include FT_IMAGE_H
-#include FT_INTERNAL_OBJECTS_H
+#include <freetype/ftlcdfil.h>
+#include <freetype/ftimage.h>
+#include <freetype/internal/ftobjs.h>
 
 
 #ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
--- a/src/base/ftmac.c
+++ b/src/base/ftmac.c
@@ -66,9 +66,9 @@
 
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_TRUETYPE_TAGS_H
-#include FT_INTERNAL_STREAM_H
+#include <freetype/freetype.h>
+#include <freetype/tttags.h>
+#include <freetype/internal/ftstream.h>
 #include "ftbase.h"
 
 
--- a/src/base/ftmm.c
+++ b/src/base/ftmm.c
@@ -17,12 +17,12 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
+#include <freetype/internal/ftdebug.h>
 
-#include FT_MULTIPLE_MASTERS_H
-#include FT_INTERNAL_OBJECTS_H
-#include FT_SERVICE_MULTIPLE_MASTERS_H
-#include FT_SERVICE_METRICS_VARIATIONS_H
+#include <freetype/ftmm.h>
+#include <freetype/internal/ftobjs.h>
+#include <freetype/internal/services/svmm.h>
+#include <freetype/internal/services/svmetric.h>
 
 
   /**************************************************************************
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -17,31 +17,31 @@
 
 
 #include <ft2build.h>
-#include FT_LIST_H
-#include FT_OUTLINE_H
-#include FT_FONT_FORMATS_H
+#include <freetype/ftlist.h>
+#include <freetype/ftoutln.h>
+#include <freetype/ftfntfmt.h>
 
-#include FT_INTERNAL_VALIDATE_H
-#include FT_INTERNAL_OBJECTS_H
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_RFORK_H
-#include FT_INTERNAL_STREAM_H
-#include FT_INTERNAL_SFNT_H            /* for SFNT_Load_Table_Func */
-#include FT_INTERNAL_POSTSCRIPT_AUX_H  /* for PS_Driver            */
+#include <freetype/internal/ftvalid.h>
+#include <freetype/internal/ftobjs.h>
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftrfork.h>
+#include <freetype/internal/ftstream.h>
+#include <freetype/internal/sfnt.h>          /* for SFNT_Load_Table_Func */
+#include <freetype/internal/psaux.h>         /* for PS_Driver            */
 
-#include FT_TRUETYPE_TABLES_H
-#include FT_TRUETYPE_TAGS_H
-#include FT_TRUETYPE_IDS_H
+#include <freetype/tttables.h>
+#include <freetype/tttags.h>
+#include <freetype/ttnameid.h>
 
-#include FT_SERVICE_PROPERTIES_H
-#include FT_SERVICE_SFNT_H
-#include FT_SERVICE_POSTSCRIPT_NAME_H
-#include FT_SERVICE_GLYPH_DICT_H
-#include FT_SERVICE_TT_CMAP_H
-#include FT_SERVICE_KERNING_H
-#include FT_SERVICE_TRUETYPE_ENGINE_H
+#include <freetype/internal/services/svprop.h>
+#include <freetype/internal/services/svsfnt.h>
+#include <freetype/internal/services/svpostnm.h>
+#include <freetype/internal/services/svgldict.h>
+#include <freetype/internal/services/svttcmap.h>
+#include <freetype/internal/services/svkern.h>
+#include <freetype/internal/services/svtteng.h>
 
-#include FT_DRIVER_H
+#include <freetype/ftdriver.h>
 
 #ifdef FT_CONFIG_OPTION_MAC_FONTS
 #include "ftbase.h"
@@ -50,7 +50,7 @@
 
 #ifdef FT_DEBUG_LEVEL_TRACE
 
-#include FT_BITMAP_H
+#include <freetype/ftbitmap.h>
 
 #if defined( _MSC_VER )      /* Visual C++ (and Intel C++)   */
   /* We disable the warning `conversion from XXX to YYY,     */
--- a/src/base/ftotval.c
+++ b/src/base/ftotval.c
@@ -16,11 +16,11 @@
  */
 
 #include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
+#include <freetype/internal/ftdebug.h>
 
-#include FT_INTERNAL_OBJECTS_H
-#include FT_SERVICE_OPENTYPE_VALIDATE_H
-#include FT_OPENTYPE_VALIDATE_H
+#include <freetype/internal/ftobjs.h>
+#include <freetype/internal/services/svotval.h>
+#include <freetype/ftotval.h>
 
 
   /* documentation is in ftotval.h */
--- a/src/base/ftoutln.c
+++ b/src/base/ftoutln.c
@@ -17,11 +17,11 @@
 
 
 #include <ft2build.h>
-#include FT_OUTLINE_H
-#include FT_INTERNAL_OBJECTS_H
-#include FT_INTERNAL_CALC_H
-#include FT_INTERNAL_DEBUG_H
-#include FT_TRIGONOMETRY_H
+#include <freetype/ftoutln.h>
+#include <freetype/internal/ftobjs.h>
+#include <freetype/internal/ftcalc.h>
+#include <freetype/internal/ftdebug.h>
+#include <freetype/fttrigon.h>
 
 
   /**************************************************************************
--- a/src/base/ftpatent.c
+++ b/src/base/ftpatent.c
@@ -17,12 +17,12 @@
  */
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_TRUETYPE_TAGS_H
-#include FT_INTERNAL_OBJECTS_H
-#include FT_INTERNAL_STREAM_H
-#include FT_SERVICE_SFNT_H
-#include FT_SERVICE_TRUETYPE_GLYF_H
+#include <freetype/freetype.h>
+#include <freetype/tttags.h>
+#include <freetype/internal/ftobjs.h>
+#include <freetype/internal/ftstream.h>
+#include <freetype/internal/services/svsfnt.h>
+#include <freetype/internal/services/svttglyf.h>
 
 
   /* documentation is in freetype.h */
--- a/src/base/ftpfr.c
+++ b/src/base/ftpfr.c
@@ -16,10 +16,10 @@
  */
 
 #include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
+#include <freetype/internal/ftdebug.h>
 
-#include FT_INTERNAL_OBJECTS_H
-#include FT_SERVICE_PFR_H
+#include <freetype/internal/ftobjs.h>
+#include <freetype/internal/services/svpfr.h>
 
 
   /* check the format */
--- a/src/base/ftpsprop.c
+++ b/src/base/ftpsprop.c
@@ -18,11 +18,11 @@
 
 
 #include <ft2build.h>
-#include FT_DRIVER_H
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_POSTSCRIPT_AUX_H
-#include FT_INTERNAL_OBJECTS_H
-#include FT_INTERNAL_POSTSCRIPT_PROPS_H
+#include <freetype/ftdriver.h>
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/psaux.h>
+#include <freetype/internal/ftobjs.h>
+#include <freetype/internal/ftpsprop.h>
 
 
   /**************************************************************************
--- a/src/base/ftrfork.c
+++ b/src/base/ftrfork.c
@@ -25,9 +25,9 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_STREAM_H
-#include FT_INTERNAL_RFORK_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftstream.h>
+#include <freetype/internal/ftrfork.h>
 
 #include "ftbase.h"
 
--- a/src/base/ftsnames.c
+++ b/src/base/ftsnames.c
@@ -20,11 +20,11 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
+#include <freetype/internal/ftdebug.h>
 
-#include FT_SFNT_NAMES_H
-#include FT_INTERNAL_TRUETYPE_TYPES_H
-#include FT_INTERNAL_STREAM_H
+#include <freetype/ftsnames.h>
+#include <freetype/internal/tttypes.h>
+#include <freetype/internal/ftstream.h>
 
 
 #ifdef TT_CONFIG_OPTION_SFNT_NAMES
--- a/src/base/ftstream.c
+++ b/src/base/ftstream.c
@@ -17,8 +17,8 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_STREAM_H
-#include FT_INTERNAL_DEBUG_H
+#include <freetype/internal/ftstream.h>
+#include <freetype/internal/ftdebug.h>
 
 
   /**************************************************************************
--- a/src/base/ftstroke.c
+++ b/src/base/ftstroke.c
@@ -17,12 +17,12 @@
 
 
 #include <ft2build.h>
-#include FT_STROKER_H
-#include FT_TRIGONOMETRY_H
-#include FT_OUTLINE_H
-#include FT_INTERNAL_MEMORY_H
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_OBJECTS_H
+#include <freetype/ftstroke.h>
+#include <freetype/fttrigon.h>
+#include <freetype/ftoutln.h>
+#include <freetype/internal/ftmemory.h>
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftobjs.h>
 
 
   /* declare an extern to access `ft_outline_glyph_class' globally */
--- a/src/base/ftsynth.c
+++ b/src/base/ftsynth.c
@@ -17,11 +17,11 @@
 
 
 #include <ft2build.h>
-#include FT_SYNTHESIS_H
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_OBJECTS_H
-#include FT_OUTLINE_H
-#include FT_BITMAP_H
+#include <freetype/ftsynth.h>
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftobjs.h>
+#include <freetype/ftoutln.h>
+#include <freetype/ftbitmap.h>
 
 
   /**************************************************************************
--- a/src/base/ftsystem.c
+++ b/src/base/ftsystem.c
@@ -27,11 +27,11 @@
 
 #include <ft2build.h>
 #include FT_CONFIG_CONFIG_H
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_STREAM_H
-#include FT_SYSTEM_H
-#include FT_ERRORS_H
-#include FT_TYPES_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftstream.h>
+#include <freetype/ftsystem.h>
+#include <freetype/fterrors.h>
+#include <freetype/fttypes.h>
 
 
   /**************************************************************************
--- a/src/base/fttrigon.c
+++ b/src/base/fttrigon.c
@@ -30,9 +30,9 @@
    */
 
 #include <ft2build.h>
-#include FT_INTERNAL_OBJECTS_H
-#include FT_INTERNAL_CALC_H
-#include FT_TRIGONOMETRY_H
+#include <freetype/internal/ftobjs.h>
+#include <freetype/internal/ftcalc.h>
+#include <freetype/fttrigon.h>
 
 
   /* the Cordic shrink factor 0.858785336480436 * 2^32 */
--- a/src/base/fttype1.c
+++ b/src/base/fttype1.c
@@ -17,10 +17,10 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_OBJECTS_H
-#include FT_INTERNAL_SERVICE_H
-#include FT_SERVICE_POSTSCRIPT_INFO_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftobjs.h>
+#include <freetype/internal/ftserv.h>
+#include <freetype/internal/services/svpsinfo.h>
 
 
   /* documentation is in t1tables.h */
--- a/src/base/ftutil.c
+++ b/src/base/ftutil.c
@@ -17,10 +17,10 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_MEMORY_H
-#include FT_INTERNAL_OBJECTS_H
-#include FT_LIST_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftmemory.h>
+#include <freetype/internal/ftobjs.h>
+#include <freetype/ftlist.h>
 
 
   /**************************************************************************
--- a/src/base/ftwinfnt.c
+++ b/src/base/ftwinfnt.c
@@ -17,10 +17,10 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
-#include FT_WINFONTS_H
-#include FT_INTERNAL_OBJECTS_H
-#include FT_SERVICE_WINFNT_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/ftwinfnt.h>
+#include <freetype/internal/ftobjs.h>
+#include <freetype/internal/services/svwinfnt.h>
 
 
   /* documentation is in ftwinfnt.h */
--- a/src/bdf/bdf.h
+++ b/src/bdf/bdf.h
@@ -31,9 +31,9 @@
  */
 
 #include <ft2build.h>
-#include FT_INTERNAL_OBJECTS_H
-#include FT_INTERNAL_STREAM_H
-#include FT_INTERNAL_HASH_H
+#include <freetype/internal/ftobjs.h>
+#include <freetype/internal/ftstream.h>
+#include <freetype/internal/fthash.h>
 
 
 FT_BEGIN_HEADER
--- a/src/bdf/bdfdrivr.c
+++ b/src/bdf/bdfdrivr.c
@@ -26,14 +26,14 @@
 
 #include <ft2build.h>
 
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_STREAM_H
-#include FT_INTERNAL_OBJECTS_H
-#include FT_BDF_H
-#include FT_TRUETYPE_IDS_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftstream.h>
+#include <freetype/internal/ftobjs.h>
+#include <freetype/ftbdf.h>
+#include <freetype/ttnameid.h>
 
-#include FT_SERVICE_BDF_H
-#include FT_SERVICE_FONT_FORMAT_H
+#include <freetype/internal/services/svbdf.h>
+#include <freetype/internal/services/svfntfmt.h>
 
 #include "bdf.h"
 #include "bdfdrivr.h"
--- a/src/bdf/bdfdrivr.h
+++ b/src/bdf/bdfdrivr.h
@@ -29,7 +29,7 @@
 #define BDFDRIVR_H_
 
 #include <ft2build.h>
-#include FT_INTERNAL_DRIVER_H
+#include <freetype/internal/ftdrv.h>
 
 #include "bdf.h"
 
--- a/src/bdf/bdferror.h
+++ b/src/bdf/bdferror.h
@@ -29,7 +29,7 @@
 #ifndef BDFERROR_H_
 #define BDFERROR_H_
 
-#include FT_MODULE_ERRORS_H
+#include <freetype/ftmoderr.h>
 
 #undef FTERRORS_H_
 
@@ -37,7 +37,7 @@
 #define FT_ERR_PREFIX  BDF_Err_
 #define FT_ERR_BASE    FT_Mod_Err_BDF
 
-#include FT_ERRORS_H
+#include <freetype/fterrors.h>
 
 #endif /* BDFERROR_H_ */
 
--- a/src/bdf/bdflib.c
+++ b/src/bdf/bdflib.c
@@ -33,10 +33,10 @@
 
 #include <ft2build.h>
 
-#include FT_FREETYPE_H
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_STREAM_H
-#include FT_INTERNAL_OBJECTS_H
+#include <freetype/freetype.h>
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftstream.h>
+#include <freetype/internal/ftobjs.h>
 
 #include "bdf.h"
 #include "bdferror.h"
--- a/src/bzip2/ftbzip2.c
+++ b/src/bzip2/ftbzip2.c
@@ -23,14 +23,14 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_MEMORY_H
-#include FT_INTERNAL_STREAM_H
-#include FT_INTERNAL_DEBUG_H
-#include FT_BZIP2_H
+#include <freetype/internal/ftmemory.h>
+#include <freetype/internal/ftstream.h>
+#include <freetype/internal/ftdebug.h>
+#include <freetype/ftbzip2.h>
 #include FT_CONFIG_STANDARD_LIBRARY_H
 
 
-#include FT_MODULE_ERRORS_H
+#include <freetype/ftmoderr.h>
 
 #undef FTERRORS_H_
 
@@ -38,7 +38,7 @@
 #define FT_ERR_PREFIX  Bzip2_Err_
 #define FT_ERR_BASE    FT_Mod_Err_Bzip2
 
-#include FT_ERRORS_H
+#include <freetype/fterrors.h>
 
 
 #ifdef FT_CONFIG_OPTION_USE_BZIP2
--- a/src/cache/ftcbasic.c
+++ b/src/cache/ftcbasic.c
@@ -17,9 +17,9 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_OBJECTS_H
-#include FT_INTERNAL_DEBUG_H
-#include FT_CACHE_H
+#include <freetype/internal/ftobjs.h>
+#include <freetype/internal/ftdebug.h>
+#include <freetype/ftcache.h>
 #include "ftcglyph.h"
 #include "ftcimage.h"
 #include "ftcsbits.h"
--- a/src/cache/ftccache.c
+++ b/src/cache/ftccache.c
@@ -18,8 +18,8 @@
 
 #include <ft2build.h>
 #include "ftcmanag.h"
-#include FT_INTERNAL_OBJECTS_H
-#include FT_INTERNAL_DEBUG_H
+#include <freetype/internal/ftobjs.h>
+#include <freetype/internal/ftdebug.h>
 
 #include "ftccback.h"
 #include "ftcerror.h"
--- a/src/cache/ftccback.h
+++ b/src/cache/ftccback.h
@@ -19,7 +19,7 @@
 #define FTCCBACK_H_
 
 #include <ft2build.h>
-#include FT_CACHE_H
+#include <freetype/ftcache.h>
 #include "ftcmru.h"
 #include "ftcimage.h"
 #include "ftcmanag.h"
--- a/src/cache/ftccmap.c
+++ b/src/cache/ftccmap.c
@@ -17,12 +17,12 @@
 
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_CACHE_H
+#include <freetype/freetype.h>
+#include <freetype/ftcache.h>
 #include "ftcmanag.h"
-#include FT_INTERNAL_MEMORY_H
-#include FT_INTERNAL_OBJECTS_H
-#include FT_INTERNAL_DEBUG_H
+#include <freetype/internal/ftmemory.h>
+#include <freetype/internal/ftobjs.h>
+#include <freetype/internal/ftdebug.h>
 
 #include "ftccback.h"
 #include "ftcerror.h"
--- a/src/cache/ftcerror.h
+++ b/src/cache/ftcerror.h
@@ -26,7 +26,7 @@
 #ifndef FTCERROR_H_
 #define FTCERROR_H_
 
-#include FT_MODULE_ERRORS_H
+#include <freetype/ftmoderr.h>
 
 #undef FTERRORS_H_
 
@@ -34,7 +34,7 @@
 #define FT_ERR_PREFIX  FTC_Err_
 #define FT_ERR_BASE    FT_Mod_Err_Cache
 
-#include FT_ERRORS_H
+#include <freetype/fterrors.h>
 
 #endif /* FTCERROR_H_ */
 
--- a/src/cache/ftcglyph.c
+++ b/src/cache/ftcglyph.c
@@ -17,10 +17,10 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_OBJECTS_H
-#include FT_CACHE_H
+#include <freetype/internal/ftobjs.h>
+#include <freetype/ftcache.h>
 #include "ftcglyph.h"
-#include FT_ERRORS_H
+#include <freetype/fterrors.h>
 
 #include "ftccback.h"
 #include "ftcerror.h"
--- a/src/cache/ftcimage.c
+++ b/src/cache/ftcimage.c
@@ -17,10 +17,10 @@
 
 
 #include <ft2build.h>
-#include FT_CACHE_H
+#include <freetype/ftcache.h>
 #include "ftcimage.h"
-#include FT_INTERNAL_MEMORY_H
-#include FT_INTERNAL_OBJECTS_H
+#include <freetype/internal/ftmemory.h>
+#include <freetype/internal/ftobjs.h>
 
 #include "ftccback.h"
 #include "ftcerror.h"
--- a/src/cache/ftcimage.h
+++ b/src/cache/ftcimage.h
@@ -37,7 +37,7 @@
 
 
 #include <ft2build.h>
-#include FT_CACHE_H
+#include <freetype/ftcache.h>
 #include "ftcglyph.h"
 
 FT_BEGIN_HEADER
--- a/src/cache/ftcmanag.c
+++ b/src/cache/ftcmanag.c
@@ -17,11 +17,11 @@
 
 
 #include <ft2build.h>
-#include FT_CACHE_H
+#include <freetype/ftcache.h>
 #include "ftcmanag.h"
-#include FT_INTERNAL_OBJECTS_H
-#include FT_INTERNAL_DEBUG_H
-#include FT_SIZES_H
+#include <freetype/internal/ftobjs.h>
+#include <freetype/internal/ftdebug.h>
+#include <freetype/ftsizes.h>
 
 #include "ftccback.h"
 #include "ftcerror.h"
--- a/src/cache/ftcmanag.h
+++ b/src/cache/ftcmanag.h
@@ -64,7 +64,7 @@
 
 
 #include <ft2build.h>
-#include FT_CACHE_H
+#include <freetype/ftcache.h>
 #include "ftcmru.h"
 #include "ftccache.h"
 
--- a/src/cache/ftcmru.c
+++ b/src/cache/ftcmru.c
@@ -17,10 +17,10 @@
 
 
 #include <ft2build.h>
-#include FT_CACHE_H
+#include <freetype/ftcache.h>
 #include "ftcmru.h"
-#include FT_INTERNAL_OBJECTS_H
-#include FT_INTERNAL_DEBUG_H
+#include <freetype/internal/ftobjs.h>
+#include <freetype/internal/ftdebug.h>
 
 #include "ftcerror.h"
 
--- a/src/cache/ftcmru.h
+++ b/src/cache/ftcmru.h
@@ -45,7 +45,7 @@
 
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
 
 #ifdef FREETYPE_H
 #error "freetype.h of FreeType 1 has been loaded!"
--- a/src/cache/ftcsbits.c
+++ b/src/cache/ftcsbits.c
@@ -17,11 +17,11 @@
 
 
 #include <ft2build.h>
-#include FT_CACHE_H
+#include <freetype/ftcache.h>
 #include "ftcsbits.h"
-#include FT_INTERNAL_OBJECTS_H
-#include FT_INTERNAL_DEBUG_H
-#include FT_ERRORS_H
+#include <freetype/internal/ftobjs.h>
+#include <freetype/internal/ftdebug.h>
+#include <freetype/fterrors.h>
 
 #include "ftccback.h"
 #include "ftcerror.h"
--- a/src/cache/ftcsbits.h
+++ b/src/cache/ftcsbits.h
@@ -21,7 +21,7 @@
 
 
 #include <ft2build.h>
-#include FT_CACHE_H
+#include <freetype/ftcache.h>
 #include "ftcglyph.h"
 
 
--- a/src/cff/cffcmap.c
+++ b/src/cff/cffcmap.c
@@ -17,7 +17,7 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
+#include <freetype/internal/ftdebug.h>
 #include "cffcmap.h"
 #include "cffload.h"
 
--- a/src/cff/cffcmap.h
+++ b/src/cff/cffcmap.h
@@ -19,7 +19,7 @@
 #ifndef CFFCMAP_H_
 #define CFFCMAP_H_
 
-#include FT_INTERNAL_CFF_OBJECTS_TYPES_H
+#include <freetype/internal/cffotypes.h>
 
 FT_BEGIN_HEADER
 
--- a/src/cff/cffdrivr.c
+++ b/src/cff/cffdrivr.c
@@ -17,17 +17,17 @@
 
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_STREAM_H
-#include FT_INTERNAL_SFNT_H
-#include FT_INTERNAL_POSTSCRIPT_AUX_H
-#include FT_INTERNAL_POSTSCRIPT_PROPS_H
-#include FT_SERVICE_CID_H
-#include FT_SERVICE_POSTSCRIPT_INFO_H
-#include FT_SERVICE_POSTSCRIPT_NAME_H
-#include FT_SERVICE_TT_CMAP_H
-#include FT_SERVICE_CFF_TABLE_LOAD_H
+#include <freetype/freetype.h>
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftstream.h>
+#include <freetype/internal/sfnt.h>
+#include <freetype/internal/psaux.h>
+#include <freetype/internal/ftpsprop.h>
+#include <freetype/internal/services/svcid.h>
+#include <freetype/internal/services/svpsinfo.h>
+#include <freetype/internal/services/svpostnm.h>
+#include <freetype/internal/services/svttcmap.h>
+#include <freetype/internal/services/svcfftl.h>
 
 #include "cffdrivr.h"
 #include "cffgload.h"
@@ -37,16 +37,16 @@
 #include "cffobjs.h"
 
 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
-#include FT_SERVICE_MULTIPLE_MASTERS_H
-#include FT_SERVICE_METRICS_VARIATIONS_H
+#include <freetype/internal/services/svmm.h>
+#include <freetype/internal/services/svmetric.h>
 #endif
 
 #include "cfferrs.h"
 
-#include FT_SERVICE_FONT_FORMAT_H
-#include FT_SERVICE_GLYPH_DICT_H
-#include FT_SERVICE_PROPERTIES_H
-#include FT_DRIVER_H
+#include <freetype/internal/services/svfntfmt.h>
+#include <freetype/internal/services/svgldict.h>
+#include <freetype/internal/services/svprop.h>
+#include <freetype/ftdriver.h>
 
 
   /**************************************************************************
--- a/src/cff/cffdrivr.h
+++ b/src/cff/cffdrivr.h
@@ -21,7 +21,7 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DRIVER_H
+#include <freetype/internal/ftdrv.h>
 
 
 FT_BEGIN_HEADER
--- a/src/cff/cfferrs.h
+++ b/src/cff/cfferrs.h
@@ -25,7 +25,7 @@
 #ifndef CFFERRS_H_
 #define CFFERRS_H_
 
-#include FT_MODULE_ERRORS_H
+#include <freetype/ftmoderr.h>
 
 #undef FTERRORS_H_
 
@@ -34,7 +34,7 @@
 #define FT_ERR_BASE    FT_Mod_Err_CFF
 
 
-#include FT_ERRORS_H
+#include <freetype/fterrors.h>
 
 #endif /* CFFERRS_H_ */
 
--- a/src/cff/cffgload.c
+++ b/src/cff/cffgload.c
@@ -17,13 +17,13 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_STREAM_H
-#include FT_INTERNAL_SFNT_H
-#include FT_INTERNAL_CALC_H
-#include FT_INTERNAL_POSTSCRIPT_AUX_H
-#include FT_OUTLINE_H
-#include FT_DRIVER_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftstream.h>
+#include <freetype/internal/sfnt.h>
+#include <freetype/internal/ftcalc.h>
+#include <freetype/internal/psaux.h>
+#include <freetype/ftoutln.h>
+#include <freetype/ftdriver.h>
 
 #include "cffload.h"
 #include "cffgload.h"
--- a/src/cff/cffgload.h
+++ b/src/cff/cffgload.h
@@ -21,8 +21,8 @@
 
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_INTERNAL_CFF_OBJECTS_TYPES_H
+#include <freetype/freetype.h>
+#include <freetype/internal/cffotypes.h>
 
 
 FT_BEGIN_HEADER
--- a/src/cff/cffload.c
+++ b/src/cff/cffload.c
@@ -17,16 +17,16 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_OBJECTS_H
-#include FT_INTERNAL_STREAM_H
-#include FT_TRUETYPE_TAGS_H
-#include FT_TYPE1_TABLES_H
-#include FT_INTERNAL_POSTSCRIPT_AUX_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftobjs.h>
+#include <freetype/internal/ftstream.h>
+#include <freetype/tttags.h>
+#include <freetype/t1tables.h>
+#include <freetype/internal/psaux.h>
 
 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
-#include FT_MULTIPLE_MASTERS_H
-#include FT_SERVICE_MULTIPLE_MASTERS_H
+#include <freetype/ftmm.h>
+#include <freetype/internal/services/svmm.h>
 #endif
 
 #include "cffload.h"
--- a/src/cff/cffload.h
+++ b/src/cff/cffload.h
@@ -21,9 +21,9 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_CFF_TYPES_H
+#include <freetype/internal/cfftypes.h>
 #include "cffparse.h"
-#include FT_INTERNAL_CFF_OBJECTS_TYPES_H  /* for CFF_Face */
+#include <freetype/internal/cffotypes.h>  /* for CFF_Face */
 
 
 FT_BEGIN_HEADER
--- a/src/cff/cffobjs.c
+++ b/src/cff/cffobjs.c
@@ -18,22 +18,22 @@
 
 #include <ft2build.h>
 
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_CALC_H
-#include FT_INTERNAL_STREAM_H
-#include FT_ERRORS_H
-#include FT_TRUETYPE_IDS_H
-#include FT_TRUETYPE_TAGS_H
-#include FT_INTERNAL_SFNT_H
-#include FT_DRIVER_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftcalc.h>
+#include <freetype/internal/ftstream.h>
+#include <freetype/fterrors.h>
+#include <freetype/ttnameid.h>
+#include <freetype/tttags.h>
+#include <freetype/internal/sfnt.h>
+#include <freetype/ftdriver.h>
 
 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
-#include FT_MULTIPLE_MASTERS_H
-#include FT_SERVICE_MULTIPLE_MASTERS_H
-#include FT_SERVICE_METRICS_VARIATIONS_H
+#include <freetype/ftmm.h>
+#include <freetype/internal/services/svmm.h>
+#include <freetype/internal/services/svmetric.h>
 #endif
 
-#include FT_INTERNAL_CFF_OBJECTS_TYPES_H
+#include <freetype/internal/cffotypes.h>
 #include "cffobjs.h"
 #include "cffload.h"
 #include "cffcmap.h"
@@ -40,8 +40,8 @@
 
 #include "cfferrs.h"
 
-#include FT_INTERNAL_POSTSCRIPT_AUX_H
-#include FT_SERVICE_CFF_TABLE_LOAD_H
+#include <freetype/internal/psaux.h>
+#include <freetype/internal/services/svcfftl.h>
 
 
   /**************************************************************************
--- a/src/cff/cffparse.c
+++ b/src/cff/cffparse.c
@@ -18,11 +18,11 @@
 
 #include <ft2build.h>
 #include "cffparse.h"
-#include FT_INTERNAL_STREAM_H
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_CALC_H
-#include FT_INTERNAL_POSTSCRIPT_AUX_H
-#include FT_LIST_H
+#include <freetype/internal/ftstream.h>
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftcalc.h>
+#include <freetype/internal/psaux.h>
+#include <freetype/ftlist.h>
 
 #include "cfferrs.h"
 #include "cffload.h"
--- a/src/cff/cffparse.h
+++ b/src/cff/cffparse.h
@@ -21,8 +21,8 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_CFF_TYPES_H
-#include FT_INTERNAL_OBJECTS_H
+#include <freetype/internal/cfftypes.h>
+#include <freetype/internal/ftobjs.h>
 
 
 FT_BEGIN_HEADER
--- a/src/cid/ciderrs.h
+++ b/src/cid/ciderrs.h
@@ -25,7 +25,7 @@
 #ifndef CIDERRS_H_
 #define CIDERRS_H_
 
-#include FT_MODULE_ERRORS_H
+#include <freetype/ftmoderr.h>
 
 #undef FTERRORS_H_
 
@@ -33,7 +33,7 @@
 #define FT_ERR_PREFIX  CID_Err_
 #define FT_ERR_BASE    FT_Mod_Err_CID
 
-#include FT_ERRORS_H
+#include <freetype/fterrors.h>
 
 #endif /* CIDERRS_H_ */
 
--- a/src/cid/cidgload.c
+++ b/src/cid/cidgload.c
@@ -19,14 +19,14 @@
 #include <ft2build.h>
 #include "cidload.h"
 #include "cidgload.h"
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_STREAM_H
-#include FT_OUTLINE_H
-#include FT_INTERNAL_CALC_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftstream.h>
+#include <freetype/ftoutln.h>
+#include <freetype/internal/ftcalc.h>
 
-#include FT_INTERNAL_POSTSCRIPT_AUX_H
-#include FT_INTERNAL_CFF_TYPES_H
-#include FT_DRIVER_H
+#include <freetype/internal/psaux.h>
+#include <freetype/internal/cfftypes.h>
+#include <freetype/ftdriver.h>
 
 #include "ciderrs.h"
 
--- a/src/cid/cidload.c
+++ b/src/cid/cidload.c
@@ -17,11 +17,11 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
+#include <freetype/internal/ftdebug.h>
 #include FT_CONFIG_CONFIG_H
-#include FT_MULTIPLE_MASTERS_H
-#include FT_INTERNAL_TYPE1_TYPES_H
-#include FT_INTERNAL_POSTSCRIPT_AUX_H
+#include <freetype/ftmm.h>
+#include <freetype/internal/t1types.h>
+#include <freetype/internal/psaux.h>
 
 #include "cidload.h"
 
--- a/src/cid/cidload.h
+++ b/src/cid/cidload.h
@@ -21,7 +21,7 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_STREAM_H
+#include <freetype/internal/ftstream.h>
 #include "cidparse.h"
 
 
--- a/src/cid/cidobjs.c
+++ b/src/cid/cidobjs.c
@@ -17,16 +17,16 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_STREAM_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftstream.h>
 
 #include "cidgload.h"
 #include "cidload.h"
 
-#include FT_SERVICE_POSTSCRIPT_CMAPS_H
-#include FT_INTERNAL_POSTSCRIPT_AUX_H
-#include FT_INTERNAL_POSTSCRIPT_HINTS_H
-#include FT_DRIVER_H
+#include <freetype/internal/services/svpscmap.h>
+#include <freetype/internal/psaux.h>
+#include <freetype/internal/pshints.h>
+#include <freetype/ftdriver.h>
 
 #include "ciderrs.h"
 
--- a/src/cid/cidobjs.h
+++ b/src/cid/cidobjs.h
@@ -21,9 +21,9 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_OBJECTS_H
+#include <freetype/internal/ftobjs.h>
 #include FT_CONFIG_CONFIG_H
-#include FT_INTERNAL_TYPE1_TYPES_H
+#include <freetype/internal/t1types.h>
 
 
 FT_BEGIN_HEADER
--- a/src/cid/cidparse.c
+++ b/src/cid/cidparse.c
@@ -17,9 +17,9 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_OBJECTS_H
-#include FT_INTERNAL_STREAM_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftobjs.h>
+#include <freetype/internal/ftstream.h>
 
 #include "cidparse.h"
 
--- a/src/cid/cidparse.h
+++ b/src/cid/cidparse.h
@@ -21,9 +21,9 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_TYPE1_TYPES_H
-#include FT_INTERNAL_STREAM_H
-#include FT_INTERNAL_POSTSCRIPT_AUX_H
+#include <freetype/internal/t1types.h>
+#include <freetype/internal/ftstream.h>
+#include <freetype/internal/psaux.h>
 
 
 FT_BEGIN_HEADER
--- a/src/cid/cidriver.c
+++ b/src/cid/cidriver.c
@@ -19,19 +19,19 @@
 #include <ft2build.h>
 #include "cidriver.h"
 #include "cidgload.h"
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_POSTSCRIPT_PROPS_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftpsprop.h>
 
 #include "ciderrs.h"
 
-#include FT_SERVICE_POSTSCRIPT_NAME_H
-#include FT_SERVICE_FONT_FORMAT_H
-#include FT_SERVICE_POSTSCRIPT_INFO_H
-#include FT_SERVICE_CID_H
-#include FT_SERVICE_PROPERTIES_H
-#include FT_DRIVER_H
+#include <freetype/internal/services/svpostnm.h>
+#include <freetype/internal/services/svfntfmt.h>
+#include <freetype/internal/services/svpsinfo.h>
+#include <freetype/internal/services/svcid.h>
+#include <freetype/internal/services/svprop.h>
+#include <freetype/ftdriver.h>
 
-#include FT_INTERNAL_POSTSCRIPT_AUX_H
+#include <freetype/internal/psaux.h>
 
 
   /**************************************************************************
--- a/src/cid/cidriver.h
+++ b/src/cid/cidriver.h
@@ -21,7 +21,7 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DRIVER_H
+#include <freetype/internal/ftdrv.h>
 
 
 FT_BEGIN_HEADER
--- a/src/gxvalid/gxvalid.h
+++ b/src/gxvalid/gxvalid.h
@@ -29,12 +29,12 @@
 #define GXVALID_H_
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
 
-#include "gxverror.h"          /* must come before FT_INTERNAL_VALIDATE_H */
+#include "gxverror.h"                     /* must come before `ftvalid.h' */
 
-#include FT_INTERNAL_VALIDATE_H
-#include FT_INTERNAL_STREAM_H
+#include <freetype/internal/ftvalid.h>
+#include <freetype/internal/ftstream.h>
 
 
 FT_BEGIN_HEADER
--- a/src/gxvalid/gxvcommn.h
+++ b/src/gxvalid/gxvcommn.h
@@ -45,8 +45,8 @@
 
 #include <ft2build.h>
 #include "gxvalid.h"
-#include FT_INTERNAL_DEBUG_H
-#include FT_SFNT_NAMES_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/ftsnames.h>
 
 
 FT_BEGIN_HEADER
--- a/src/gxvalid/gxverror.h
+++ b/src/gxvalid/gxverror.h
@@ -35,7 +35,7 @@
 #ifndef GXVERROR_H_
 #define GXVERROR_H_
 
-#include FT_MODULE_ERRORS_H
+#include <freetype/ftmoderr.h>
 
 #undef FTERRORS_H_
 
@@ -43,7 +43,7 @@
 #define FT_ERR_PREFIX  GXV_Err_
 #define FT_ERR_BASE    FT_Mod_Err_GXvalid
 
-#include FT_ERRORS_H
+#include <freetype/fterrors.h>
 
 #endif /* GXVERROR_H_ */
 
--- a/src/gxvalid/gxvjust.c
+++ b/src/gxvalid/gxvjust.c
@@ -28,7 +28,7 @@
 #include "gxvalid.h"
 #include "gxvcommn.h"
 
-#include FT_SFNT_NAMES_H
+#include <freetype/ftsnames.h>
 
 
   /**************************************************************************
--- a/src/gxvalid/gxvkern.c
+++ b/src/gxvalid/gxvkern.c
@@ -28,8 +28,8 @@
 #include "gxvalid.h"
 #include "gxvcommn.h"
 
-#include FT_SFNT_NAMES_H
-#include FT_SERVICE_GX_VALIDATE_H
+#include <freetype/ftsnames.h>
+#include <freetype/internal/services/svgxval.h>
 
 
   /**************************************************************************
--- a/src/gxvalid/gxvmod.c
+++ b/src/gxvalid/gxvmod.c
@@ -26,11 +26,11 @@
 
 
 #include <ft2build.h>
-#include FT_TRUETYPE_TABLES_H
-#include FT_TRUETYPE_TAGS_H
-#include FT_GX_VALIDATE_H
-#include FT_INTERNAL_OBJECTS_H
-#include FT_SERVICE_GX_VALIDATE_H
+#include <freetype/tttables.h>
+#include <freetype/tttags.h>
+#include <freetype/ftgxval.h>
+#include <freetype/internal/ftobjs.h>
+#include <freetype/internal/services/svgxval.h>
 
 #include "gxvmod.h"
 #include "gxvalid.h"
--- a/src/gxvalid/gxvmod.h
+++ b/src/gxvalid/gxvmod.h
@@ -30,7 +30,7 @@
 #define GXVMOD_H_
 
 #include <ft2build.h>
-#include FT_MODULE_H
+#include <freetype/ftmodapi.h>
 
 
 FT_BEGIN_HEADER
--- a/src/gxvalid/gxvmort.h
+++ b/src/gxvalid/gxvmort.h
@@ -31,7 +31,7 @@
 #include "gxvalid.h"
 #include "gxvcommn.h"
 
-#include FT_SFNT_NAMES_H
+#include <freetype/ftsnames.h>
 
 
   typedef struct  GXV_mort_featureRec_
--- a/src/gxvalid/gxvmorx.h
+++ b/src/gxvalid/gxvmorx.h
@@ -33,7 +33,7 @@
 #include "gxvcommn.h"
 #include "gxvmort.h"
 
-#include FT_SFNT_NAMES_H
+#include <freetype/ftsnames.h>
 
 
   FT_LOCAL( void )
--- a/src/gzip/ftgzip.c
+++ b/src/gzip/ftgzip.c
@@ -21,14 +21,14 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_MEMORY_H
-#include FT_INTERNAL_STREAM_H
-#include FT_INTERNAL_DEBUG_H
-#include FT_GZIP_H
+#include <freetype/internal/ftmemory.h>
+#include <freetype/internal/ftstream.h>
+#include <freetype/internal/ftdebug.h>
+#include <freetype/ftgzip.h>
 #include FT_CONFIG_STANDARD_LIBRARY_H
 
 
-#include FT_MODULE_ERRORS_H
+#include <freetype/ftmoderr.h>
 
 #undef FTERRORS_H_
 
@@ -36,7 +36,7 @@
 #define FT_ERR_PREFIX  Gzip_Err_
 #define FT_ERR_BASE    FT_Mod_Err_Gzip
 
-#include FT_ERRORS_H
+#include <freetype/fterrors.h>
 
 
 #ifdef FT_CONFIG_OPTION_USE_ZLIB
--- a/src/lzw/ftlzw.c
+++ b/src/lzw/ftlzw.c
@@ -22,14 +22,14 @@
  */
 
 #include <ft2build.h>
-#include FT_INTERNAL_MEMORY_H
-#include FT_INTERNAL_STREAM_H
-#include FT_INTERNAL_DEBUG_H
-#include FT_LZW_H
+#include <freetype/internal/ftmemory.h>
+#include <freetype/internal/ftstream.h>
+#include <freetype/internal/ftdebug.h>
+#include <freetype/ftlzw.h>
 #include FT_CONFIG_STANDARD_LIBRARY_H
 
 
-#include FT_MODULE_ERRORS_H
+#include <freetype/ftmoderr.h>
 
 #undef FTERRORS_H_
 
@@ -37,7 +37,7 @@
 #define FT_ERR_PREFIX  LZW_Err_
 #define FT_ERR_BASE    FT_Mod_Err_LZW
 
-#include FT_ERRORS_H
+#include <freetype/fterrors.h>
 
 
 #ifdef FT_CONFIG_OPTION_USE_LZW
--- a/src/lzw/ftzopen.c
+++ b/src/lzw/ftzopen.c
@@ -20,9 +20,9 @@
  */
 
 #include "ftzopen.h"
-#include FT_INTERNAL_MEMORY_H
-#include FT_INTERNAL_STREAM_H
-#include FT_INTERNAL_DEBUG_H
+#include <freetype/internal/ftmemory.h>
+#include <freetype/internal/ftstream.h>
+#include <freetype/internal/ftdebug.h>
 
 
   static int
--- a/src/lzw/ftzopen.h
+++ b/src/lzw/ftzopen.h
@@ -23,7 +23,7 @@
 #define FTZOPEN_H_
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
 
 
   /*
--- a/src/otvalid/otvalid.h
+++ b/src/otvalid/otvalid.h
@@ -21,12 +21,12 @@
 
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
 
-#include "otverror.h"           /* must come before FT_INTERNAL_VALIDATE_H */
+#include "otverror.h"                      /* must come before `ftvalid.h' */
 
-#include FT_INTERNAL_VALIDATE_H
-#include FT_INTERNAL_STREAM_H
+#include <freetype/internal/ftvalid.h>
+#include <freetype/internal/ftstream.h>
 
 
 FT_BEGIN_HEADER
--- a/src/otvalid/otvcommn.h
+++ b/src/otvalid/otvcommn.h
@@ -22,7 +22,7 @@
 
 #include <ft2build.h>
 #include "otvalid.h"
-#include FT_INTERNAL_DEBUG_H
+#include <freetype/internal/ftdebug.h>
 
 
 FT_BEGIN_HEADER
--- a/src/otvalid/otverror.h
+++ b/src/otvalid/otverror.h
@@ -26,7 +26,7 @@
 #ifndef OTVERROR_H_
 #define OTVERROR_H_
 
-#include FT_MODULE_ERRORS_H
+#include <freetype/ftmoderr.h>
 
 #undef FTERRORS_H_
 
@@ -34,7 +34,7 @@
 #define FT_ERR_PREFIX  OTV_Err_
 #define FT_ERR_BASE    FT_Mod_Err_OTvalid
 
-#include FT_ERRORS_H
+#include <freetype/fterrors.h>
 
 #endif /* OTVERROR_H_ */
 
--- a/src/otvalid/otvmod.c
+++ b/src/otvalid/otvmod.c
@@ -17,11 +17,11 @@
 
 
 #include <ft2build.h>
-#include FT_TRUETYPE_TABLES_H
-#include FT_TRUETYPE_TAGS_H
-#include FT_OPENTYPE_VALIDATE_H
-#include FT_INTERNAL_OBJECTS_H
-#include FT_SERVICE_OPENTYPE_VALIDATE_H
+#include <freetype/tttables.h>
+#include <freetype/tttags.h>
+#include <freetype/ftotval.h>
+#include <freetype/internal/ftobjs.h>
+#include <freetype/internal/services/svotval.h>
 
 #include "otvmod.h"
 #include "otvalid.h"
--- a/src/otvalid/otvmod.h
+++ b/src/otvalid/otvmod.h
@@ -22,7 +22,7 @@
 
 
 #include <ft2build.h>
-#include FT_MODULE_H
+#include <freetype/ftmodapi.h>
 
 
 FT_BEGIN_HEADER
--- a/src/pcf/pcf.h
+++ b/src/pcf/pcf.h
@@ -30,8 +30,8 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DRIVER_H
-#include FT_INTERNAL_STREAM_H
+#include <freetype/internal/ftdrv.h>
+#include <freetype/internal/ftstream.h>
 
 
 FT_BEGIN_HEADER
--- a/src/pcf/pcfdrivr.c
+++ b/src/pcf/pcfdrivr.c
@@ -27,15 +27,15 @@
 
 #include <ft2build.h>
 
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_STREAM_H
-#include FT_INTERNAL_OBJECTS_H
-#include FT_GZIP_H
-#include FT_LZW_H
-#include FT_BZIP2_H
-#include FT_ERRORS_H
-#include FT_BDF_H
-#include FT_TRUETYPE_IDS_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftstream.h>
+#include <freetype/internal/ftobjs.h>
+#include <freetype/ftgzip.h>
+#include <freetype/ftlzw.h>
+#include <freetype/ftbzip2.h>
+#include <freetype/fterrors.h>
+#include <freetype/ftbdf.h>
+#include <freetype/ttnameid.h>
 
 #include "pcf.h"
 #include "pcfdrivr.h"
@@ -47,10 +47,10 @@
 #undef  FT_COMPONENT
 #define FT_COMPONENT  pcfread
 
-#include FT_SERVICE_BDF_H
-#include FT_SERVICE_FONT_FORMAT_H
-#include FT_SERVICE_PROPERTIES_H
-#include FT_DRIVER_H
+#include <freetype/internal/services/svbdf.h>
+#include <freetype/internal/services/svfntfmt.h>
+#include <freetype/internal/services/svprop.h>
+#include <freetype/ftdriver.h>
 
 
   /**************************************************************************
--- a/src/pcf/pcfdrivr.h
+++ b/src/pcf/pcfdrivr.h
@@ -29,7 +29,7 @@
 #define PCFDRIVR_H_
 
 #include <ft2build.h>
-#include FT_INTERNAL_DRIVER_H
+#include <freetype/internal/ftdrv.h>
 
 
 FT_BEGIN_HEADER
--- a/src/pcf/pcferror.h
+++ b/src/pcf/pcferror.h
@@ -25,7 +25,7 @@
 #ifndef PCFERROR_H_
 #define PCFERROR_H_
 
-#include FT_MODULE_ERRORS_H
+#include <freetype/ftmoderr.h>
 
 #undef FTERRORS_H_
 
@@ -33,7 +33,7 @@
 #define FT_ERR_PREFIX  PCF_Err_
 #define FT_ERR_BASE    FT_Mod_Err_PCF
 
-#include FT_ERRORS_H
+#include <freetype/fterrors.h>
 
 #endif /* PCFERROR_H_ */
 
--- a/src/pcf/pcfread.c
+++ b/src/pcf/pcfread.c
@@ -27,9 +27,9 @@
 
 #include <ft2build.h>
 
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_STREAM_H
-#include FT_INTERNAL_OBJECTS_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftstream.h>
+#include <freetype/internal/ftobjs.h>
 
 #include "pcf.h"
 #include "pcfread.h"
--- a/src/pfr/pfrcmap.c
+++ b/src/pfr/pfrcmap.c
@@ -17,7 +17,7 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
+#include <freetype/internal/ftdebug.h>
 #include "pfrcmap.h"
 #include "pfrobjs.h"
 
--- a/src/pfr/pfrcmap.h
+++ b/src/pfr/pfrcmap.h
@@ -20,7 +20,7 @@
 #define PFRCMAP_H_
 
 #include <ft2build.h>
-#include FT_INTERNAL_OBJECTS_H
+#include <freetype/internal/ftobjs.h>
 #include "pfrtypes.h"
 
 
--- a/src/pfr/pfrdrivr.c
+++ b/src/pfr/pfrdrivr.c
@@ -17,10 +17,10 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_STREAM_H
-#include FT_SERVICE_PFR_H
-#include FT_SERVICE_FONT_FORMAT_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftstream.h>
+#include <freetype/internal/services/svpfr.h>
+#include <freetype/internal/services/svfntfmt.h>
 #include "pfrdrivr.h"
 #include "pfrobjs.h"
 
--- a/src/pfr/pfrdrivr.h
+++ b/src/pfr/pfrdrivr.h
@@ -21,7 +21,7 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DRIVER_H
+#include <freetype/internal/ftdrv.h>
 
 
 FT_BEGIN_HEADER
--- a/src/pfr/pfrerror.h
+++ b/src/pfr/pfrerror.h
@@ -25,7 +25,7 @@
 #ifndef PFRERROR_H_
 #define PFRERROR_H_
 
-#include FT_MODULE_ERRORS_H
+#include <freetype/ftmoderr.h>
 
 #undef FTERRORS_H_
 
@@ -33,7 +33,7 @@
 #define FT_ERR_PREFIX  PFR_Err_
 #define FT_ERR_BASE    FT_Mod_Err_PFR
 
-#include FT_ERRORS_H
+#include <freetype/fterrors.h>
 
 #endif /* PFRERROR_H_ */
 
--- a/src/pfr/pfrgload.c
+++ b/src/pfr/pfrgload.c
@@ -19,7 +19,7 @@
 #include "pfrgload.h"
 #include "pfrsbit.h"
 #include "pfrload.h"            /* for macro definitions */
-#include FT_INTERNAL_DEBUG_H
+#include <freetype/internal/ftdebug.h>
 
 #include "pfrerror.h"
 
--- a/src/pfr/pfrload.c
+++ b/src/pfr/pfrload.c
@@ -17,8 +17,8 @@
 
 
 #include "pfrload.h"
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_STREAM_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftstream.h>
 
 #include "pfrerror.h"
 
--- a/src/pfr/pfrload.h
+++ b/src/pfr/pfrload.h
@@ -20,7 +20,7 @@
 #define PFRLOAD_H_
 
 #include "pfrobjs.h"
-#include FT_INTERNAL_STREAM_H
+#include <freetype/internal/ftstream.h>
 
 
 FT_BEGIN_HEADER
--- a/src/pfr/pfrobjs.c
+++ b/src/pfr/pfrobjs.c
@@ -21,10 +21,10 @@
 #include "pfrgload.h"
 #include "pfrcmap.h"
 #include "pfrsbit.h"
-#include FT_OUTLINE_H
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_CALC_H
-#include FT_TRUETYPE_IDS_H
+#include <freetype/ftoutln.h>
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftcalc.h>
+#include <freetype/ttnameid.h>
 
 #include "pfrerror.h"
 
--- a/src/pfr/pfrsbit.c
+++ b/src/pfr/pfrsbit.c
@@ -18,8 +18,8 @@
 
 #include "pfrsbit.h"
 #include "pfrload.h"
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_STREAM_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftstream.h>
 
 #include "pfrerror.h"
 
--- a/src/pfr/pfrtypes.h
+++ b/src/pfr/pfrtypes.h
@@ -20,7 +20,7 @@
 #define PFRTYPES_H_
 
 #include <ft2build.h>
-#include FT_INTERNAL_OBJECTS_H
+#include <freetype/internal/ftobjs.h>
 
 FT_BEGIN_HEADER
 
--- a/src/psaux/afmparse.c
+++ b/src/psaux/afmparse.c
@@ -16,9 +16,9 @@
  */
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_POSTSCRIPT_AUX_H
+#include <freetype/freetype.h>
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/psaux.h>
 
 #ifndef T1_CONFIG_OPTION_NO_AFM
 
--- a/src/psaux/afmparse.h
+++ b/src/psaux/afmparse.h
@@ -21,7 +21,7 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_POSTSCRIPT_AUX_H
+#include <freetype/internal/psaux.h>
 
 
 FT_BEGIN_HEADER
--- a/src/psaux/cffdecode.c
+++ b/src/psaux/cffdecode.c
@@ -17,10 +17,10 @@
 
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_SERVICE_H
-#include FT_SERVICE_CFF_TABLE_LOAD_H
+#include <freetype/freetype.h>
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftserv.h>
+#include <freetype/internal/services/svcfftl.h>
 
 #include "cffdecode.h"
 #include "psobjs.h"
--- a/src/psaux/cffdecode.h
+++ b/src/psaux/cffdecode.h
@@ -21,7 +21,7 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_POSTSCRIPT_AUX_H
+#include <freetype/internal/psaux.h>
 
 
 FT_BEGIN_HEADER
--- a/src/psaux/psarrst.c
+++ b/src/psaux/psarrst.c
@@ -37,7 +37,7 @@
 
 
 #include "psft.h"
-#include FT_INTERNAL_DEBUG_H
+#include <freetype/internal/ftdebug.h>
 
 #include "psglue.h"
 #include "psarrst.h"
--- a/src/psaux/psauxerr.h
+++ b/src/psaux/psauxerr.h
@@ -26,7 +26,7 @@
 #ifndef PSAUXERR_H_
 #define PSAUXERR_H_
 
-#include FT_MODULE_ERRORS_H
+#include <freetype/ftmoderr.h>
 
 #undef FTERRORS_H_
 
@@ -34,7 +34,7 @@
 #define FT_ERR_PREFIX  PSaux_Err_
 #define FT_ERR_BASE    FT_Mod_Err_PSaux
 
-#include FT_ERRORS_H
+#include <freetype/fterrors.h>
 
 #endif /* PSAUXERR_H_ */
 
--- a/src/psaux/psauxmod.h
+++ b/src/psaux/psauxmod.h
@@ -21,9 +21,9 @@
 
 
 #include <ft2build.h>
-#include FT_MODULE_H
+#include <freetype/ftmodapi.h>
 
-#include FT_INTERNAL_POSTSCRIPT_AUX_H
+#include <freetype/internal/psaux.h>
 
 
 FT_BEGIN_HEADER
--- a/src/psaux/psblues.c
+++ b/src/psaux/psblues.c
@@ -37,7 +37,7 @@
 
 
 #include "psft.h"
-#include FT_INTERNAL_DEBUG_H
+#include <freetype/internal/ftdebug.h>
 
 #include "psblues.h"
 #include "pshints.h"
--- a/src/psaux/psconv.c
+++ b/src/psaux/psconv.c
@@ -17,8 +17,8 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_POSTSCRIPT_AUX_H
-#include FT_INTERNAL_DEBUG_H
+#include <freetype/internal/psaux.h>
+#include <freetype/internal/ftdebug.h>
 
 #include "psconv.h"
 #include "psauxerr.h"
--- a/src/psaux/psconv.h
+++ b/src/psaux/psconv.h
@@ -21,7 +21,7 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_POSTSCRIPT_AUX_H
+#include <freetype/internal/psaux.h>
 
 FT_BEGIN_HEADER
 
--- a/src/psaux/pserror.h
+++ b/src/psaux/pserror.h
@@ -40,7 +40,7 @@
 #define PSERROR_H_
 
 
-#include FT_MODULE_ERRORS_H
+#include <freetype/ftmoderr.h>
 
 #undef FTERRORS_H_
 
@@ -49,7 +49,7 @@
 #define FT_ERR_BASE    FT_Mod_Err_CF2
 
 
-#include FT_ERRORS_H
+#include <freetype/fterrors.h>
 #include "psft.h"
 
 
--- a/src/psaux/psfont.c
+++ b/src/psaux/psfont.c
@@ -37,7 +37,7 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_CALC_H
+#include <freetype/internal/ftcalc.h>
 
 #include "psft.h"
 
--- a/src/psaux/psfont.h
+++ b/src/psaux/psfont.h
@@ -40,7 +40,7 @@
 #define PSFONT_H_
 
 
-#include FT_SERVICE_CFF_TABLE_LOAD_H
+#include <freetype/internal/services/svcfftl.h>
 
 #include "psft.h"
 #include "psblues.h"
--- a/src/psaux/psft.c
+++ b/src/psaux/psft.c
@@ -37,7 +37,7 @@
 
 
 #include "psft.h"
-#include FT_INTERNAL_DEBUG_H
+#include <freetype/internal/ftdebug.h>
 
 #include "psfont.h"
 #include "pserror.h"
@@ -45,11 +45,11 @@
 #include "cffdecode.h"
 
 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
-#include FT_MULTIPLE_MASTERS_H
-#include FT_SERVICE_MULTIPLE_MASTERS_H
+#include <freetype/ftmm.h>
+#include <freetype/internal/services/svmm.h>
 #endif
 
-#include FT_SERVICE_CFF_TABLE_LOAD_H
+#include <freetype/internal/services/svcfftl.h>
 
 
 #define CF2_MAX_SIZE  cf2_intToFixed( 2000 )    /* max ppem */
--- a/src/psaux/psft.h
+++ b/src/psaux/psft.h
@@ -47,10 +47,10 @@
 #define CF2_NDEBUG
 
 
-#include FT_SYSTEM_H
+#include <freetype/ftsystem.h>
 
 #include "psglue.h"
-#include FT_INTERNAL_POSTSCRIPT_AUX_H    /* for PS_Decoder */
+#include <freetype/internal/psaux.h>    /* for PS_Decoder */
 
 
 FT_BEGIN_HEADER
--- a/src/psaux/pshints.c
+++ b/src/psaux/pshints.c
@@ -37,7 +37,7 @@
 
 
 #include "psft.h"
-#include FT_INTERNAL_DEBUG_H
+#include <freetype/internal/ftdebug.h>
 
 #include "psglue.h"
 #include "psfont.h"
--- a/src/psaux/psintrp.c
+++ b/src/psaux/psintrp.c
@@ -37,8 +37,8 @@
 
 
 #include "psft.h"
-#include FT_INTERNAL_DEBUG_H
-#include FT_SERVICE_CFF_TABLE_LOAD_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/services/svcfftl.h>
 
 #include "psglue.h"
 #include "psfont.h"
--- a/src/psaux/psobjs.c
+++ b/src/psaux/psobjs.c
@@ -17,10 +17,10 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_POSTSCRIPT_AUX_H
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_CALC_H
-#include FT_DRIVER_H
+#include <freetype/internal/psaux.h>
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftcalc.h>
+#include <freetype/ftdriver.h>
 
 #include "psobjs.h"
 #include "psconv.h"
--- a/src/psaux/psobjs.h
+++ b/src/psaux/psobjs.h
@@ -21,8 +21,8 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_POSTSCRIPT_AUX_H
-#include FT_INTERNAL_CFF_OBJECTS_TYPES_H
+#include <freetype/internal/psaux.h>
+#include <freetype/internal/cffotypes.h>
 
 
 FT_BEGIN_HEADER
--- a/src/psaux/psread.c
+++ b/src/psaux/psread.c
@@ -37,7 +37,7 @@
 
 
 #include "psft.h"
-#include FT_INTERNAL_DEBUG_H
+#include <freetype/internal/ftdebug.h>
 
 #include "psglue.h"
 
--- a/src/psaux/psstack.c
+++ b/src/psaux/psstack.c
@@ -37,7 +37,7 @@
 
 
 #include "psft.h"
-#include FT_INTERNAL_DEBUG_H
+#include <freetype/internal/ftdebug.h>
 
 #include "psglue.h"
 #include "psfont.h"
--- a/src/psaux/pstypes.h
+++ b/src/psaux/pstypes.h
@@ -40,7 +40,7 @@
 #define PSTYPES_H_
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
 
 
 FT_BEGIN_HEADER
--- a/src/psaux/t1cmap.c
+++ b/src/psaux/t1cmap.c
@@ -18,7 +18,7 @@
 
 #include "t1cmap.h"
 
-#include FT_INTERNAL_DEBUG_H
+#include <freetype/internal/ftdebug.h>
 
 #include "psauxerr.h"
 
--- a/src/psaux/t1cmap.h
+++ b/src/psaux/t1cmap.h
@@ -20,8 +20,8 @@
 #define T1CMAP_H_
 
 #include <ft2build.h>
-#include FT_INTERNAL_OBJECTS_H
-#include FT_INTERNAL_TYPE1_TYPES_H
+#include <freetype/internal/ftobjs.h>
+#include <freetype/internal/t1types.h>
 
 FT_BEGIN_HEADER
 
--- a/src/psaux/t1decode.c
+++ b/src/psaux/t1decode.c
@@ -17,11 +17,11 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_CALC_H
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_POSTSCRIPT_HINTS_H
-#include FT_INTERNAL_HASH_H
-#include FT_OUTLINE_H
+#include <freetype/internal/ftcalc.h>
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/pshints.h>
+#include <freetype/internal/fthash.h>
+#include <freetype/ftoutln.h>
 
 #include "t1decode.h"
 #include "psobjs.h"
--- a/src/psaux/t1decode.h
+++ b/src/psaux/t1decode.h
@@ -21,8 +21,8 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_POSTSCRIPT_AUX_H
-#include FT_INTERNAL_TYPE1_TYPES_H
+#include <freetype/internal/psaux.h>
+#include <freetype/internal/t1types.h>
 
 
 FT_BEGIN_HEADER
--- a/src/pshinter/pshalgo.c
+++ b/src/pshinter/pshalgo.c
@@ -17,9 +17,9 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_OBJECTS_H
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_CALC_H
+#include <freetype/internal/ftobjs.h>
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftcalc.h>
 #include "pshalgo.h"
 
 #include "pshnterr.h"
--- a/src/pshinter/pshglob.c
+++ b/src/pshinter/pshglob.c
@@ -18,9 +18,9 @@
 
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_INTERNAL_OBJECTS_H
-#include FT_INTERNAL_CALC_H
+#include <freetype/freetype.h>
+#include <freetype/internal/ftobjs.h>
+#include <freetype/internal/ftcalc.h>
 #include "pshglob.h"
 
 #ifdef DEBUG_HINTER
--- a/src/pshinter/pshglob.h
+++ b/src/pshinter/pshglob.h
@@ -20,8 +20,8 @@
 #define PSHGLOB_H_
 
 
-#include FT_FREETYPE_H
-#include FT_INTERNAL_POSTSCRIPT_HINTS_H
+#include <freetype/freetype.h>
+#include <freetype/internal/pshints.h>
 
 
 FT_BEGIN_HEADER
--- a/src/pshinter/pshmod.c
+++ b/src/pshinter/pshmod.c
@@ -17,7 +17,7 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_OBJECTS_H
+#include <freetype/internal/ftobjs.h>
 #include "pshrec.h"
 #include "pshalgo.h"
 
--- a/src/pshinter/pshmod.h
+++ b/src/pshinter/pshmod.h
@@ -21,7 +21,7 @@
 
 
 #include <ft2build.h>
-#include FT_MODULE_H
+#include <freetype/ftmodapi.h>
 
 
 FT_BEGIN_HEADER
--- a/src/pshinter/pshnterr.h
+++ b/src/pshinter/pshnterr.h
@@ -25,7 +25,7 @@
 #ifndef PSHNTERR_H_
 #define PSHNTERR_H_
 
-#include FT_MODULE_ERRORS_H
+#include <freetype/ftmoderr.h>
 
 #undef FTERRORS_H_
 
@@ -33,7 +33,7 @@
 #define FT_ERR_PREFIX  PSH_Err_
 #define FT_ERR_BASE    FT_Mod_Err_PShinter
 
-#include FT_ERRORS_H
+#include <freetype/fterrors.h>
 
 #endif /* PSHNTERR_H_ */
 
--- a/src/pshinter/pshrec.c
+++ b/src/pshinter/pshrec.c
@@ -17,10 +17,10 @@
 
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_INTERNAL_OBJECTS_H
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_CALC_H
+#include <freetype/freetype.h>
+#include <freetype/internal/ftobjs.h>
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftcalc.h>
 
 #include "pshrec.h"
 #include "pshalgo.h"
--- a/src/pshinter/pshrec.h
+++ b/src/pshinter/pshrec.h
@@ -33,7 +33,7 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_POSTSCRIPT_HINTS_H
+#include <freetype/internal/pshints.h>
 #include "pshglob.h"
 
 
--- a/src/psnames/psmodule.c
+++ b/src/psnames/psmodule.c
@@ -17,9 +17,9 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_OBJECTS_H
-#include FT_SERVICE_POSTSCRIPT_CMAPS_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftobjs.h>
+#include <freetype/internal/services/svpscmap.h>
 
 #include "psmodule.h"
 
--- a/src/psnames/psmodule.h
+++ b/src/psnames/psmodule.h
@@ -21,7 +21,7 @@
 
 
 #include <ft2build.h>
-#include FT_MODULE_H
+#include <freetype/ftmodapi.h>
 
 
 FT_BEGIN_HEADER
--- a/src/psnames/psnamerr.h
+++ b/src/psnames/psnamerr.h
@@ -26,7 +26,7 @@
 #ifndef PSNAMERR_H_
 #define PSNAMERR_H_
 
-#include FT_MODULE_ERRORS_H
+#include <freetype/ftmoderr.h>
 
 #undef FTERRORS_H_
 
@@ -34,7 +34,7 @@
 #define FT_ERR_PREFIX  PSnames_Err_
 #define FT_ERR_BASE    FT_Mod_Err_PSnames
 
-#include FT_ERRORS_H
+#include <freetype/fterrors.h>
 
 #endif /* PSNAMERR_H_ */
 
--- a/src/raster/ftraster.c
+++ b/src/raster/ftraster.c
@@ -64,8 +64,8 @@
 
 #include <ft2build.h>
 #include "ftraster.h"
-#include FT_INTERNAL_CALC_H   /* for FT_MulDiv and FT_MulDiv_No_Round */
-#include FT_OUTLINE_H         /* for FT_Outline_Get_CBox              */
+#include <freetype/internal/ftcalc.h> /* for FT_MulDiv and FT_MulDiv_No_Round */
+#include <freetype/ftoutln.h>         /* for FT_Outline_Get_CBox              */
 
 #endif /* !STANDALONE_ */
 
@@ -226,8 +226,8 @@
 #else /* !STANDALONE_ */
 
 
-#include FT_INTERNAL_OBJECTS_H
-#include FT_INTERNAL_DEBUG_H       /* for FT_TRACE, FT_ERROR, and FT_THROW */
+#include <freetype/internal/ftobjs.h>
+#include <freetype/internal/ftdebug.h> /* for FT_TRACE, FT_ERROR, and FT_THROW */
 
 #include "rasterrs.h"
 
--- a/src/raster/ftraster.h
+++ b/src/raster/ftraster.h
@@ -22,7 +22,7 @@
 
 #include <ft2build.h>
 #include FT_CONFIG_CONFIG_H
-#include FT_IMAGE_H
+#include <freetype/ftimage.h>
 
 
 FT_BEGIN_HEADER
--- a/src/raster/ftrend1.c
+++ b/src/raster/ftrend1.c
@@ -17,9 +17,9 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_OBJECTS_H
-#include FT_OUTLINE_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftobjs.h>
+#include <freetype/ftoutln.h>
 #include "ftrend1.h"
 #include "ftraster.h"
 
--- a/src/raster/ftrend1.h
+++ b/src/raster/ftrend1.h
@@ -21,7 +21,7 @@
 
 
 #include <ft2build.h>
-#include FT_RENDER_H
+#include <freetype/ftrender.h>
 
 
 FT_BEGIN_HEADER
--- a/src/raster/rasterrs.h
+++ b/src/raster/rasterrs.h
@@ -26,7 +26,7 @@
 #ifndef RASTERRS_H_
 #define RASTERRS_H_
 
-#include FT_MODULE_ERRORS_H
+#include <freetype/ftmoderr.h>
 
 #undef FTERRORS_H_
 
@@ -34,7 +34,7 @@
 #define FT_ERR_PREFIX  Raster_Err_
 #define FT_ERR_BASE    FT_Mod_Err_Raster
 
-#include FT_ERRORS_H
+#include <freetype/fterrors.h>
 
 #endif /* RASTERRS_H_ */
 
--- a/src/sfnt/pngshim.c
+++ b/src/sfnt/pngshim.c
@@ -18,9 +18,9 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_STREAM_H
-#include FT_TRUETYPE_TAGS_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftstream.h>
+#include <freetype/tttags.h>
 #include FT_CONFIG_STANDARD_LIBRARY_H
 
 
--- a/src/sfnt/sfdriver.c
+++ b/src/sfnt/sfdriver.c
@@ -17,10 +17,10 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_SFNT_H
-#include FT_INTERNAL_OBJECTS_H
-#include FT_TRUETYPE_IDS_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/sfnt.h>
+#include <freetype/internal/ftobjs.h>
+#include <freetype/ttnameid.h>
 
 #include "sfdriver.h"
 #include "ttload.h"
@@ -43,7 +43,7 @@
 
 #ifdef TT_CONFIG_OPTION_BDF
 #include "ttbdf.h"
-#include FT_SERVICE_BDF_H
+#include <freetype/internal/services/svbdf.h>
 #endif
 
 #include "ttcmap.h"
@@ -50,14 +50,14 @@
 #include "ttkern.h"
 #include "ttmtx.h"
 
-#include FT_SERVICE_GLYPH_DICT_H
-#include FT_SERVICE_POSTSCRIPT_NAME_H
-#include FT_SERVICE_SFNT_H
-#include FT_SERVICE_TT_CMAP_H
+#include <freetype/internal/services/svgldict.h>
+#include <freetype/internal/services/svpostnm.h>
+#include <freetype/internal/services/svsfnt.h>
+#include <freetype/internal/services/svttcmap.h>
 
 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
-#include FT_MULTIPLE_MASTERS_H
-#include FT_SERVICE_MULTIPLE_MASTERS_H
+#include <freetype/ftmm.h>
+#include <freetype/internal/services/svmm.h>
 #endif
 
 
--- a/src/sfnt/sfdriver.h
+++ b/src/sfnt/sfdriver.h
@@ -21,7 +21,7 @@
 
 
 #include <ft2build.h>
-#include FT_MODULE_H
+#include <freetype/ftmodapi.h>
 
 
 FT_BEGIN_HEADER
--- a/src/sfnt/sferrors.h
+++ b/src/sfnt/sferrors.h
@@ -25,7 +25,7 @@
 #ifndef SFERRORS_H_
 #define SFERRORS_H_
 
-#include FT_MODULE_ERRORS_H
+#include <freetype/ftmoderr.h>
 
 #undef FTERRORS_H_
 
@@ -33,7 +33,7 @@
 #define FT_ERR_PREFIX  SFNT_Err_
 #define FT_ERR_BASE    FT_Mod_Err_SFNT
 
-#include FT_ERRORS_H
+#include <freetype/fterrors.h>
 
 #endif /* SFERRORS_H_ */
 
--- a/src/sfnt/sfobjs.c
+++ b/src/sfnt/sfobjs.c
@@ -23,16 +23,16 @@
 #include "ttkern.h"
 #include "sfwoff.h"
 #include "sfwoff2.h"
-#include FT_INTERNAL_SFNT_H
-#include FT_INTERNAL_DEBUG_H
-#include FT_TRUETYPE_IDS_H
-#include FT_TRUETYPE_TAGS_H
-#include FT_SERVICE_POSTSCRIPT_CMAPS_H
-#include FT_SFNT_NAMES_H
+#include <freetype/internal/sfnt.h>
+#include <freetype/internal/ftdebug.h>
+#include <freetype/ttnameid.h>
+#include <freetype/tttags.h>
+#include <freetype/internal/services/svpscmap.h>
+#include <freetype/ftsnames.h>
 
 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
-#include FT_SERVICE_MULTIPLE_MASTERS_H
-#include FT_SERVICE_METRICS_VARIATIONS_H
+#include <freetype/internal/services/svmm.h>
+#include <freetype/internal/services/svmetric.h>
 #endif
 
 #include "sferrors.h"
--- a/src/sfnt/sfobjs.h
+++ b/src/sfnt/sfobjs.h
@@ -21,8 +21,8 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_SFNT_H
-#include FT_INTERNAL_OBJECTS_H
+#include <freetype/internal/sfnt.h>
+#include <freetype/internal/ftobjs.h>
 
 
 FT_BEGIN_HEADER
--- a/src/sfnt/sfwoff.c
+++ b/src/sfnt/sfwoff.c
@@ -18,10 +18,10 @@
 
 #include <ft2build.h>
 #include "sfwoff.h"
-#include FT_TRUETYPE_TAGS_H
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_STREAM_H
-#include FT_GZIP_H
+#include <freetype/tttags.h>
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftstream.h>
+#include <freetype/ftgzip.h>
 
 
   /**************************************************************************
--- a/src/sfnt/sfwoff.h
+++ b/src/sfnt/sfwoff.h
@@ -21,8 +21,8 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_SFNT_H
-#include FT_INTERNAL_OBJECTS_H
+#include <freetype/internal/sfnt.h>
+#include <freetype/internal/ftobjs.h>
 
 
 FT_BEGIN_HEADER
--- a/src/sfnt/sfwoff2.c
+++ b/src/sfnt/sfwoff2.c
@@ -18,9 +18,9 @@
 #include <ft2build.h>
 #include "sfwoff2.h"
 #include "woff2tags.h"
-#include FT_TRUETYPE_TAGS_H
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_STREAM_H
+#include <freetype/tttags.h>
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftstream.h>
 
 
 #ifdef FT_CONFIG_OPTION_USE_BROTLI
--- a/src/sfnt/sfwoff2.h
+++ b/src/sfnt/sfwoff2.h
@@ -21,8 +21,8 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_SFNT_H
-#include FT_INTERNAL_OBJECTS_H
+#include <freetype/internal/sfnt.h>
+#include <freetype/internal/ftobjs.h>
 
 
 FT_BEGIN_HEADER
--- a/src/sfnt/ttbdf.c
+++ b/src/sfnt/ttbdf.c
@@ -17,9 +17,9 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_STREAM_H
-#include FT_TRUETYPE_TAGS_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftstream.h>
+#include <freetype/tttags.h>
 #include "ttbdf.h"
 
 #include "sferrors.h"
--- a/src/sfnt/ttbdf.h
+++ b/src/sfnt/ttbdf.h
@@ -22,7 +22,7 @@
 
 #include <ft2build.h>
 #include "ttload.h"
-#include FT_BDF_H
+#include <freetype/ftbdf.h>
 
 
 FT_BEGIN_HEADER
--- a/src/sfnt/ttcmap.c
+++ b/src/sfnt/ttcmap.c
@@ -17,13 +17,13 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
+#include <freetype/internal/ftdebug.h>
 
-#include "sferrors.h"           /* must come before FT_INTERNAL_VALIDATE_H */
+#include "sferrors.h"                      /* must come before `ftvalid.h' */
 
-#include FT_INTERNAL_VALIDATE_H
-#include FT_INTERNAL_STREAM_H
-#include FT_SERVICE_POSTSCRIPT_CMAPS_H
+#include <freetype/internal/ftvalid.h>
+#include <freetype/internal/ftstream.h>
+#include <freetype/internal/services/svpscmap.h>
 #include "ttload.h"
 #include "ttcmap.h"
 #include "ttpost.h"
--- a/src/sfnt/ttcmap.h
+++ b/src/sfnt/ttcmap.h
@@ -21,9 +21,9 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_TRUETYPE_TYPES_H
-#include FT_INTERNAL_VALIDATE_H
-#include FT_SERVICE_TT_CMAP_H
+#include <freetype/internal/tttypes.h>
+#include <freetype/internal/ftvalid.h>
+#include <freetype/internal/services/svttcmap.h>
 
 FT_BEGIN_HEADER
 
--- a/src/sfnt/ttcolr.c
+++ b/src/sfnt/ttcolr.c
@@ -28,10 +28,10 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_STREAM_H
-#include FT_TRUETYPE_TAGS_H
-#include FT_COLOR_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftstream.h>
+#include <freetype/tttags.h>
+#include <freetype/ftcolor.h>
 
 
 #ifdef TT_CONFIG_OPTION_COLOR_LAYERS
--- a/src/sfnt/ttcpal.c
+++ b/src/sfnt/ttcpal.c
@@ -28,10 +28,10 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_STREAM_H
-#include FT_TRUETYPE_TAGS_H
-#include FT_COLOR_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftstream.h>
+#include <freetype/tttags.h>
+#include <freetype/ftcolor.h>
 
 
 #ifdef TT_CONFIG_OPTION_COLOR_LAYERS
--- a/src/sfnt/ttkern.c
+++ b/src/sfnt/ttkern.c
@@ -18,9 +18,9 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_STREAM_H
-#include FT_TRUETYPE_TAGS_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftstream.h>
+#include <freetype/tttags.h>
 #include "ttkern.h"
 
 #include "sferrors.h"
--- a/src/sfnt/ttkern.h
+++ b/src/sfnt/ttkern.h
@@ -22,8 +22,8 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_STREAM_H
-#include FT_INTERNAL_TRUETYPE_TYPES_H
+#include <freetype/internal/ftstream.h>
+#include <freetype/internal/tttypes.h>
 
 
 FT_BEGIN_HEADER
--- a/src/sfnt/ttload.c
+++ b/src/sfnt/ttload.c
@@ -18,9 +18,9 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_STREAM_H
-#include FT_TRUETYPE_TAGS_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftstream.h>
+#include <freetype/tttags.h>
 #include "ttload.h"
 
 #include "sferrors.h"
--- a/src/sfnt/ttload.h
+++ b/src/sfnt/ttload.h
@@ -22,8 +22,8 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_STREAM_H
-#include FT_INTERNAL_TRUETYPE_TYPES_H
+#include <freetype/internal/ftstream.h>
+#include <freetype/internal/tttypes.h>
 
 
 FT_BEGIN_HEADER
--- a/src/sfnt/ttmtx.c
+++ b/src/sfnt/ttmtx.c
@@ -17,12 +17,12 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_STREAM_H
-#include FT_TRUETYPE_TAGS_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftstream.h>
+#include <freetype/tttags.h>
 
 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
-#include FT_SERVICE_METRICS_VARIATIONS_H
+#include <freetype/internal/services/svmetric.h>
 #endif
 
 #include "ttmtx.h"
--- a/src/sfnt/ttmtx.h
+++ b/src/sfnt/ttmtx.h
@@ -21,8 +21,8 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_STREAM_H
-#include FT_INTERNAL_TRUETYPE_TYPES_H
+#include <freetype/internal/ftstream.h>
+#include <freetype/internal/tttypes.h>
 
 
 FT_BEGIN_HEADER
--- a/src/sfnt/ttpost.c
+++ b/src/sfnt/ttpost.c
@@ -26,9 +26,9 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_STREAM_H
-#include FT_TRUETYPE_TAGS_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftstream.h>
+#include <freetype/tttags.h>
 
 
 #ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
@@ -54,7 +54,7 @@
 #ifdef FT_CONFIG_OPTION_POSTSCRIPT_NAMES
 
 
-#include FT_SERVICE_POSTSCRIPT_CMAPS_H
+#include <freetype/internal/services/svpscmap.h>
 
 #define MAC_NAME( x )  (FT_String*)psnames->macintosh_name( (FT_UInt)(x) )
 
--- a/src/sfnt/ttpost.h
+++ b/src/sfnt/ttpost.h
@@ -23,7 +23,7 @@
 
 #include <ft2build.h>
 #include FT_CONFIG_CONFIG_H
-#include FT_INTERNAL_TRUETYPE_TYPES_H
+#include <freetype/internal/tttypes.h>
 
 
 FT_BEGIN_HEADER
--- a/src/sfnt/ttsbit.c
+++ b/src/sfnt/ttsbit.c
@@ -20,10 +20,10 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_STREAM_H
-#include FT_TRUETYPE_TAGS_H
-#include FT_BITMAP_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftstream.h>
+#include <freetype/tttags.h>
+#include <freetype/ftbitmap.h>
 
 
 #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
--- a/src/sfnt/woff2tags.c
+++ b/src/sfnt/woff2tags.c
@@ -17,7 +17,7 @@
 
 
 #include <ft2build.h>
-#include FT_TRUETYPE_TAGS_H
+#include <freetype/tttags.h>
 
 
   /*
--- a/src/sfnt/woff2tags.h
+++ b/src/sfnt/woff2tags.h
@@ -21,7 +21,7 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_OBJECTS_H
+#include <freetype/internal/ftobjs.h>
 
 
 FT_BEGIN_HEADER
--- a/src/smooth/ftgrays.c
+++ b/src/smooth/ftgrays.c
@@ -280,10 +280,10 @@
 
 #include <ft2build.h>
 #include "ftgrays.h"
-#include FT_INTERNAL_OBJECTS_H
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_CALC_H
-#include FT_OUTLINE_H
+#include <freetype/internal/ftobjs.h>
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftcalc.h>
+#include <freetype/ftoutln.h>
 
 #include "ftsmerrs.h"
 
--- a/src/smooth/ftgrays.h
+++ b/src/smooth/ftgrays.h
@@ -28,7 +28,7 @@
 #include "ftimage.h"
 #else
 #include <ft2build.h>
-#include FT_IMAGE_H
+#include <freetype/ftimage.h>
 #endif
 
 
--- a/src/smooth/ftsmerrs.h
+++ b/src/smooth/ftsmerrs.h
@@ -26,7 +26,7 @@
 #ifndef FTSMERRS_H_
 #define FTSMERRS_H_
 
-#include FT_MODULE_ERRORS_H
+#include <freetype/ftmoderr.h>
 
 #undef FTERRORS_H_
 
@@ -34,7 +34,7 @@
 #define FT_ERR_PREFIX  Smooth_Err_
 #define FT_ERR_BASE    FT_Mod_Err_Smooth
 
-#include FT_ERRORS_H
+#include <freetype/fterrors.h>
 
 #endif /* FTSMERRS_H_ */
 
--- a/src/smooth/ftsmooth.c
+++ b/src/smooth/ftsmooth.c
@@ -17,9 +17,9 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_OBJECTS_H
-#include FT_OUTLINE_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftobjs.h>
+#include <freetype/ftoutln.h>
 #include "ftsmooth.h"
 #include "ftgrays.h"
 
--- a/src/smooth/ftsmooth.h
+++ b/src/smooth/ftsmooth.h
@@ -21,7 +21,7 @@
 
 
 #include <ft2build.h>
-#include FT_RENDER_H
+#include <freetype/ftrender.h>
 
 
 FT_BEGIN_HEADER
--- a/src/tools/ftrandom/ftrandom.c
+++ b/src/tools/ftrandom/ftrandom.c
@@ -45,8 +45,8 @@
 #include <time.h>
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_OUTLINE_H
+#include <freetype/freetype.h>
+#include <freetype/ftoutln.h>
 
 #define true     1
 #define false    0
--- a/src/tools/test_afm.c
+++ b/src/tools/test_afm.c
@@ -3,9 +3,9 @@
  *     -L../../objs/.libs -lfreetype -lz -static
  */
 #include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_INTERNAL_STREAM_H
-#include FT_INTERNAL_POSTSCRIPT_AUX_H
+#include <freetype/freetype.h>
+#include <freetype/internal/ftstream.h>
+#include <freetype/internal/psaux.h>
 
   void dump_fontinfo( AFM_FontInfo  fi )
   {
--- a/src/tools/test_bbox.c
+++ b/src/tools/test_bbox.c
@@ -1,6 +1,6 @@
 #include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_BBOX_H
+#include <freetype/freetype.h>
+#include <freetype/ftbbox.h>
 
 
 #include <time.h>    /* for clock() */
--- a/src/tools/test_trig.c
+++ b/src/tools/test_trig.c
@@ -1,6 +1,6 @@
 #include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_TRIGONOMETRY_H
+#include <freetype/freetype.h>
+#include <freetype/fttrigon.h>
 
 #include <math.h>
 #include <stdio.h>
--- a/src/truetype/ttdriver.c
+++ b/src/truetype/ttdriver.c
@@ -17,21 +17,21 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_STREAM_H
-#include FT_INTERNAL_SFNT_H
-#include FT_SERVICE_FONT_FORMAT_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftstream.h>
+#include <freetype/internal/sfnt.h>
+#include <freetype/internal/services/svfntfmt.h>
 
 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
-#include FT_MULTIPLE_MASTERS_H
-#include FT_SERVICE_MULTIPLE_MASTERS_H
-#include FT_SERVICE_METRICS_VARIATIONS_H
+#include <freetype/ftmm.h>
+#include <freetype/internal/services/svmm.h>
+#include <freetype/internal/services/svmetric.h>
 #endif
 
-#include FT_SERVICE_TRUETYPE_ENGINE_H
-#include FT_SERVICE_TRUETYPE_GLYF_H
-#include FT_SERVICE_PROPERTIES_H
-#include FT_DRIVER_H
+#include <freetype/internal/services/svtteng.h>
+#include <freetype/internal/services/svttglyf.h>
+#include <freetype/internal/services/svprop.h>
+#include <freetype/ftdriver.h>
 
 #include "ttdriver.h"
 #include "ttgload.h"
--- a/src/truetype/ttdriver.h
+++ b/src/truetype/ttdriver.h
@@ -21,7 +21,7 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DRIVER_H
+#include <freetype/internal/ftdrv.h>
 
 
 FT_BEGIN_HEADER
--- a/src/truetype/tterrors.h
+++ b/src/truetype/tterrors.h
@@ -26,7 +26,7 @@
 #ifndef TTERRORS_H_
 #define TTERRORS_H_
 
-#include FT_MODULE_ERRORS_H
+#include <freetype/ftmoderr.h>
 
 #undef FTERRORS_H_
 
@@ -34,7 +34,7 @@
 #define FT_ERR_PREFIX  TT_Err_
 #define FT_ERR_BASE    FT_Mod_Err_TrueType
 
-#include FT_ERRORS_H
+#include <freetype/fterrors.h>
 
 #endif /* TTERRORS_H_ */
 
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -17,15 +17,15 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
+#include <freetype/internal/ftdebug.h>
 #include FT_CONFIG_CONFIG_H
-#include FT_INTERNAL_CALC_H
-#include FT_INTERNAL_STREAM_H
-#include FT_INTERNAL_SFNT_H
-#include FT_TRUETYPE_TAGS_H
-#include FT_OUTLINE_H
-#include FT_DRIVER_H
-#include FT_LIST_H
+#include <freetype/internal/ftcalc.h>
+#include <freetype/internal/ftstream.h>
+#include <freetype/internal/sfnt.h>
+#include <freetype/tttags.h>
+#include <freetype/ftoutln.h>
+#include <freetype/ftdriver.h>
+#include <freetype/ftlist.h>
 
 #include "ttgload.h"
 #include "ttpload.h"
--- a/src/truetype/ttgxvar.c
+++ b/src/truetype/ttgxvar.c
@@ -40,14 +40,14 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
+#include <freetype/internal/ftdebug.h>
 #include FT_CONFIG_CONFIG_H
-#include FT_INTERNAL_STREAM_H
-#include FT_INTERNAL_SFNT_H
-#include FT_TRUETYPE_TAGS_H
-#include FT_TRUETYPE_IDS_H
-#include FT_MULTIPLE_MASTERS_H
-#include FT_LIST_H
+#include <freetype/internal/ftstream.h>
+#include <freetype/internal/sfnt.h>
+#include <freetype/tttags.h>
+#include <freetype/ttnameid.h>
+#include <freetype/ftmm.h>
+#include <freetype/ftlist.h>
 
 #include "ttpload.h"
 #include "ttgxvar.h"
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -21,12 +21,12 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_CALC_H
-#include FT_TRIGONOMETRY_H
-#include FT_SYSTEM_H
-#include FT_DRIVER_H
-#include FT_MULTIPLE_MASTERS_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftcalc.h>
+#include <freetype/fttrigon.h>
+#include <freetype/ftsystem.h>
+#include <freetype/ftdriver.h>
+#include <freetype/ftmm.h>
 
 #include "ttinterp.h"
 #include "tterrors.h"
--- a/src/truetype/ttobjs.c
+++ b/src/truetype/ttobjs.c
@@ -17,11 +17,11 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_STREAM_H
-#include FT_TRUETYPE_TAGS_H
-#include FT_INTERNAL_SFNT_H
-#include FT_DRIVER_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftstream.h>
+#include <freetype/tttags.h>
+#include <freetype/internal/sfnt.h>
+#include <freetype/ftdriver.h>
 
 #include "ttgload.h"
 #include "ttpload.h"
--- a/src/truetype/ttobjs.h
+++ b/src/truetype/ttobjs.h
@@ -21,8 +21,8 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_OBJECTS_H
-#include FT_INTERNAL_TRUETYPE_TYPES_H
+#include <freetype/internal/ftobjs.h>
+#include <freetype/internal/tttypes.h>
 
 
 FT_BEGIN_HEADER
--- a/src/truetype/ttpload.c
+++ b/src/truetype/ttpload.c
@@ -17,10 +17,10 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_OBJECTS_H
-#include FT_INTERNAL_STREAM_H
-#include FT_TRUETYPE_TAGS_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftobjs.h>
+#include <freetype/internal/ftstream.h>
+#include <freetype/tttags.h>
 
 #include "ttpload.h"
 
--- a/src/truetype/ttpload.h
+++ b/src/truetype/ttpload.h
@@ -21,7 +21,7 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_TRUETYPE_TYPES_H
+#include <freetype/internal/tttypes.h>
 
 
 FT_BEGIN_HEADER
--- a/src/truetype/ttsubpix.c
+++ b/src/truetype/ttsubpix.c
@@ -16,13 +16,13 @@
  */
 
 #include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_CALC_H
-#include FT_INTERNAL_STREAM_H
-#include FT_INTERNAL_SFNT_H
-#include FT_TRUETYPE_TAGS_H
-#include FT_OUTLINE_H
-#include FT_DRIVER_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftcalc.h>
+#include <freetype/internal/ftstream.h>
+#include <freetype/internal/sfnt.h>
+#include <freetype/tttags.h>
+#include <freetype/ftoutln.h>
+#include <freetype/ftdriver.h>
 
 #include "ttsubpix.h"
 
--- a/src/type1/t1afm.c
+++ b/src/type1/t1afm.c
@@ -18,9 +18,9 @@
 
 #include <ft2build.h>
 #include "t1afm.h"
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_STREAM_H
-#include FT_INTERNAL_POSTSCRIPT_AUX_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftstream.h>
+#include <freetype/internal/psaux.h>
 #include "t1errors.h"
 
 
--- a/src/type1/t1afm.h
+++ b/src/type1/t1afm.h
@@ -21,7 +21,7 @@
 
 #include <ft2build.h>
 #include "t1objs.h"
-#include FT_INTERNAL_TYPE1_TYPES_H
+#include <freetype/internal/t1types.h>
 
 FT_BEGIN_HEADER
 
--- a/src/type1/t1driver.c
+++ b/src/type1/t1driver.c
@@ -27,20 +27,20 @@
 #include "t1afm.h"
 #endif
 
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_STREAM_H
-#include FT_INTERNAL_HASH_H
-#include FT_INTERNAL_POSTSCRIPT_PROPS_H
-#include FT_DRIVER_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftstream.h>
+#include <freetype/internal/fthash.h>
+#include <freetype/internal/ftpsprop.h>
+#include <freetype/ftdriver.h>
 
-#include FT_SERVICE_MULTIPLE_MASTERS_H
-#include FT_SERVICE_GLYPH_DICT_H
-#include FT_SERVICE_FONT_FORMAT_H
-#include FT_SERVICE_POSTSCRIPT_NAME_H
-#include FT_SERVICE_POSTSCRIPT_CMAPS_H
-#include FT_SERVICE_POSTSCRIPT_INFO_H
-#include FT_SERVICE_PROPERTIES_H
-#include FT_SERVICE_KERNING_H
+#include <freetype/internal/services/svmm.h>
+#include <freetype/internal/services/svgldict.h>
+#include <freetype/internal/services/svfntfmt.h>
+#include <freetype/internal/services/svpostnm.h>
+#include <freetype/internal/services/svpscmap.h>
+#include <freetype/internal/services/svpsinfo.h>
+#include <freetype/internal/services/svprop.h>
+#include <freetype/internal/services/svkern.h>
 
 
   /**************************************************************************
--- a/src/type1/t1driver.h
+++ b/src/type1/t1driver.h
@@ -21,7 +21,7 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DRIVER_H
+#include <freetype/internal/ftdrv.h>
 
 
 FT_BEGIN_HEADER
--- a/src/type1/t1errors.h
+++ b/src/type1/t1errors.h
@@ -25,7 +25,7 @@
 #ifndef T1ERRORS_H_
 #define T1ERRORS_H_
 
-#include FT_MODULE_ERRORS_H
+#include <freetype/ftmoderr.h>
 
 #undef FTERRORS_H_
 
@@ -33,7 +33,7 @@
 #define FT_ERR_PREFIX  T1_Err_
 #define FT_ERR_BASE    FT_Mod_Err_Type1
 
-#include FT_ERRORS_H
+#include <freetype/fterrors.h>
 
 #endif /* T1ERRORS_H_ */
 
--- a/src/type1/t1gload.c
+++ b/src/type1/t1gload.c
@@ -18,13 +18,13 @@
 
 #include <ft2build.h>
 #include "t1gload.h"
-#include FT_INTERNAL_CALC_H
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_STREAM_H
-#include FT_OUTLINE_H
-#include FT_INTERNAL_POSTSCRIPT_AUX_H
-#include FT_INTERNAL_CFF_TYPES_H
-#include FT_DRIVER_H
+#include <freetype/internal/ftcalc.h>
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftstream.h>
+#include <freetype/ftoutln.h>
+#include <freetype/internal/psaux.h>
+#include <freetype/internal/cfftypes.h>
+#include <freetype/ftdriver.h>
 
 #include "t1errors.h"
 
--- a/src/type1/t1load.c
+++ b/src/type1/t1load.c
@@ -61,12 +61,12 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
+#include <freetype/internal/ftdebug.h>
 #include FT_CONFIG_CONFIG_H
-#include FT_MULTIPLE_MASTERS_H
-#include FT_INTERNAL_TYPE1_TYPES_H
-#include FT_INTERNAL_CALC_H
-#include FT_INTERNAL_HASH_H
+#include <freetype/ftmm.h>
+#include <freetype/internal/t1types.h>
+#include <freetype/internal/ftcalc.h>
+#include <freetype/internal/fthash.h>
 
 #include "t1load.h"
 #include "t1errors.h"
--- a/src/type1/t1load.h
+++ b/src/type1/t1load.h
@@ -21,9 +21,9 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_STREAM_H
-#include FT_INTERNAL_POSTSCRIPT_AUX_H
-#include FT_MULTIPLE_MASTERS_H
+#include <freetype/internal/ftstream.h>
+#include <freetype/internal/psaux.h>
+#include <freetype/ftmm.h>
 
 #include "t1parse.h"
 
--- a/src/type1/t1objs.c
+++ b/src/type1/t1objs.c
@@ -17,11 +17,11 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_CALC_H
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_STREAM_H
-#include FT_TRUETYPE_IDS_H
-#include FT_DRIVER_H
+#include <freetype/internal/ftcalc.h>
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftstream.h>
+#include <freetype/ttnameid.h>
+#include <freetype/ftdriver.h>
 
 #include "t1gload.h"
 #include "t1load.h"
@@ -32,8 +32,8 @@
 #include "t1afm.h"
 #endif
 
-#include FT_SERVICE_POSTSCRIPT_CMAPS_H
-#include FT_INTERNAL_POSTSCRIPT_AUX_H
+#include <freetype/internal/services/svpscmap.h>
+#include <freetype/internal/psaux.h>
 
 
   /**************************************************************************
--- a/src/type1/t1objs.h
+++ b/src/type1/t1objs.h
@@ -21,9 +21,9 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_OBJECTS_H
+#include <freetype/internal/ftobjs.h>
 #include FT_CONFIG_CONFIG_H
-#include FT_INTERNAL_TYPE1_TYPES_H
+#include <freetype/internal/t1types.h>
 
 
 FT_BEGIN_HEADER
--- a/src/type1/t1parse.c
+++ b/src/type1/t1parse.c
@@ -34,9 +34,9 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_STREAM_H
-#include FT_INTERNAL_POSTSCRIPT_AUX_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftstream.h>
+#include <freetype/internal/psaux.h>
 
 #include "t1parse.h"
 
--- a/src/type1/t1parse.h
+++ b/src/type1/t1parse.h
@@ -21,8 +21,8 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_TYPE1_TYPES_H
-#include FT_INTERNAL_STREAM_H
+#include <freetype/internal/t1types.h>
+#include <freetype/internal/ftstream.h>
 
 
 FT_BEGIN_HEADER
--- a/src/type42/t42drivr.c
+++ b/src/type42/t42drivr.c
@@ -39,12 +39,12 @@
 #include "t42drivr.h"
 #include "t42objs.h"
 #include "t42error.h"
-#include FT_INTERNAL_DEBUG_H
+#include <freetype/internal/ftdebug.h>
 
-#include FT_SERVICE_FONT_FORMAT_H
-#include FT_SERVICE_GLYPH_DICT_H
-#include FT_SERVICE_POSTSCRIPT_NAME_H
-#include FT_SERVICE_POSTSCRIPT_INFO_H
+#include <freetype/internal/services/svfntfmt.h>
+#include <freetype/internal/services/svgldict.h>
+#include <freetype/internal/services/svpostnm.h>
+#include <freetype/internal/services/svpsinfo.h>
 
 #undef  FT_COMPONENT
 #define FT_COMPONENT  t42
--- a/src/type42/t42drivr.h
+++ b/src/type42/t42drivr.h
@@ -21,7 +21,7 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_DRIVER_H
+#include <freetype/internal/ftdrv.h>
 
 
 FT_BEGIN_HEADER
--- a/src/type42/t42error.h
+++ b/src/type42/t42error.h
@@ -25,7 +25,7 @@
 #ifndef T42ERROR_H_
 #define T42ERROR_H_
 
-#include FT_MODULE_ERRORS_H
+#include <freetype/ftmoderr.h>
 
 #undef FTERRORS_H_
 
@@ -33,7 +33,7 @@
 #define FT_ERR_PREFIX  T42_Err_
 #define FT_ERR_BASE    FT_Mod_Err_Type42
 
-#include FT_ERRORS_H
+#include <freetype/fterrors.h>
 
 #endif /* T42ERROR_H_ */
 
--- a/src/type42/t42objs.c
+++ b/src/type42/t42objs.c
@@ -19,9 +19,9 @@
 #include "t42objs.h"
 #include "t42parse.h"
 #include "t42error.h"
-#include FT_INTERNAL_DEBUG_H
-#include FT_LIST_H
-#include FT_TRUETYPE_IDS_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/ftlist.h>
+#include <freetype/ttnameid.h>
 
 
 #undef  FT_COMPONENT
--- a/src/type42/t42objs.h
+++ b/src/type42/t42objs.h
@@ -20,14 +20,14 @@
 #define T42OBJS_H_
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_TYPE1_TABLES_H
-#include FT_INTERNAL_TYPE1_TYPES_H
+#include <freetype/freetype.h>
+#include <freetype/t1tables.h>
+#include <freetype/internal/t1types.h>
 #include "t42types.h"
-#include FT_INTERNAL_OBJECTS_H
-#include FT_INTERNAL_DRIVER_H
-#include FT_SERVICE_POSTSCRIPT_CMAPS_H
-#include FT_INTERNAL_POSTSCRIPT_HINTS_H
+#include <freetype/internal/ftobjs.h>
+#include <freetype/internal/ftdrv.h>
+#include <freetype/internal/services/svpscmap.h>
+#include <freetype/internal/pshints.h>
 
 
 FT_BEGIN_HEADER
--- a/src/type42/t42parse.c
+++ b/src/type42/t42parse.c
@@ -18,9 +18,9 @@
 
 #include "t42parse.h"
 #include "t42error.h"
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_STREAM_H
-#include FT_INTERNAL_POSTSCRIPT_AUX_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftstream.h>
+#include <freetype/internal/psaux.h>
 
 
   /**************************************************************************
--- a/src/type42/t42parse.h
+++ b/src/type42/t42parse.h
@@ -21,7 +21,7 @@
 
 
 #include "t42objs.h"
-#include FT_INTERNAL_POSTSCRIPT_AUX_H
+#include <freetype/internal/psaux.h>
 
 
 FT_BEGIN_HEADER
--- a/src/type42/t42types.h
+++ b/src/type42/t42types.h
@@ -21,10 +21,10 @@
 
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_TYPE1_TABLES_H
-#include FT_INTERNAL_TYPE1_TYPES_H
-#include FT_INTERNAL_POSTSCRIPT_HINTS_H
+#include <freetype/freetype.h>
+#include <freetype/t1tables.h>
+#include <freetype/internal/t1types.h>
+#include <freetype/internal/pshints.h>
 
 
 FT_BEGIN_HEADER
--- a/src/winfonts/fnterrs.h
+++ b/src/winfonts/fnterrs.h
@@ -26,7 +26,7 @@
 #ifndef FNTERRS_H_
 #define FNTERRS_H_
 
-#include FT_MODULE_ERRORS_H
+#include <freetype/ftmoderr.h>
 
 #undef FTERRORS_H_
 
@@ -34,7 +34,7 @@
 #define FT_ERR_PREFIX  FNT_Err_
 #define FT_ERR_BASE    FT_Mod_Err_Winfonts
 
-#include FT_ERRORS_H
+#include <freetype/fterrors.h>
 
 #endif /* FNTERRS_H_ */
 
--- a/src/winfonts/winfnt.c
+++ b/src/winfonts/winfnt.c
@@ -19,16 +19,16 @@
 
 
 #include <ft2build.h>
-#include FT_WINFONTS_H
-#include FT_INTERNAL_DEBUG_H
-#include FT_INTERNAL_STREAM_H
-#include FT_INTERNAL_OBJECTS_H
-#include FT_TRUETYPE_IDS_H
+#include <freetype/ftwinfnt.h>
+#include <freetype/internal/ftdebug.h>
+#include <freetype/internal/ftstream.h>
+#include <freetype/internal/ftobjs.h>
+#include <freetype/ttnameid.h>
 
 #include "winfnt.h"
 #include "fnterrs.h"
-#include FT_SERVICE_WINFNT_H
-#include FT_SERVICE_FONT_FORMAT_H
+#include <freetype/internal/services/svwinfnt.h>
+#include <freetype/internal/services/svfntfmt.h>
 
   /**************************************************************************
    *
--- a/src/winfonts/winfnt.h
+++ b/src/winfonts/winfnt.h
@@ -22,8 +22,8 @@
 
 
 #include <ft2build.h>
-#include FT_WINFONTS_H
-#include FT_INTERNAL_DRIVER_H
+#include <freetype/ftwinfnt.h>
+#include <freetype/internal/ftdrv.h>
 
 
 FT_BEGIN_HEADER