changeset 50479:70e706c85f1d

8203367: Upgrade to freetype 2.9.1 Reviewed-by: serb
author prr
date Mon, 04 Jun 2018 10:54:20 -0700
parents 5d371a4dc47d
children 544cb09baada
files make/lib/Awt2dLibraries.gmk src/java.desktop/share/legal/freetype.md src/java.desktop/share/native/libfreetype/UPDATING.txt src/java.desktop/share/native/libfreetype/include/freetype/config/ftconfig.h src/java.desktop/share/native/libfreetype/include/freetype/config/ftoption.h src/java.desktop/share/native/libfreetype/include/freetype/freetype.h src/java.desktop/share/native/libfreetype/include/freetype/ftdriver.h src/java.desktop/share/native/libfreetype/include/freetype/ftgasp.h src/java.desktop/share/native/libfreetype/include/freetype/internal/ftobjs.h src/java.desktop/share/native/libfreetype/src/autofit/afblue.c src/java.desktop/share/native/libfreetype/src/autofit/afblue.dat src/java.desktop/share/native/libfreetype/src/autofit/afblue.h src/java.desktop/share/native/libfreetype/src/autofit/afranges.c src/java.desktop/share/native/libfreetype/src/autofit/afscript.h src/java.desktop/share/native/libfreetype/src/autofit/aftypes.h src/java.desktop/share/native/libfreetype/src/base/ftbitmap.c src/java.desktop/share/native/libfreetype/src/base/ftlcdfil.c src/java.desktop/share/native/libfreetype/src/base/ftoutln.c src/java.desktop/share/native/libfreetype/src/cff/cffload.c src/java.desktop/share/native/libfreetype/src/psaux/psintrp.c src/java.desktop/share/native/libfreetype/src/pshinter/pshglob.c src/java.desktop/share/native/libfreetype/src/sfnt/sfobjs.c src/java.desktop/share/native/libfreetype/src/sfnt/ttcmap.c src/java.desktop/share/native/libfreetype/src/sfnt/ttpost.c src/java.desktop/share/native/libfreetype/src/sfnt/ttsbit.c src/java.desktop/share/native/libfreetype/src/smooth/ftgrays.c src/java.desktop/share/native/libfreetype/src/truetype/ttgload.c src/java.desktop/share/native/libfreetype/src/truetype/ttgxvar.c src/java.desktop/share/native/libfreetype/src/truetype/ttinterp.c src/java.desktop/share/native/libfreetype/src/truetype/ttobjs.c src/java.desktop/share/native/libfreetype/src/type1/t1load.c
diffstat 31 files changed, 515 insertions(+), 282 deletions(-) [+]
line wrap: on
line diff
--- a/make/lib/Awt2dLibraries.gmk	Fri Jun 01 09:38:08 2018 -0700
+++ b/make/lib/Awt2dLibraries.gmk	Mon Jun 04 10:54:20 2018 -0700
@@ -541,6 +541,7 @@
          E_STATEMENT_NOT_REACHED \
          E_END_OF_LOOP_CODE_NOT_REACHED, \
       DISABLED_WARNINGS_microsoft := 4267 4244 4312, \
+      DISABLED_WARNINGS_gcc := implicit-fallthrough, \
       LDFLAGS := $(LDFLAGS_JDKLIB) \
           $(call SET_SHARED_LIBRARY_ORIGIN), \
   ))
--- a/src/java.desktop/share/legal/freetype.md	Fri Jun 01 09:38:08 2018 -0700
+++ b/src/java.desktop/share/legal/freetype.md	Mon Jun 04 10:54:20 2018 -0700
@@ -1,4 +1,4 @@
-## The FreeType Project: Freetype v2.9
+## The FreeType Project: Freetype v2.9.1
 
 
 ### FreeType Notice
--- a/src/java.desktop/share/native/libfreetype/UPDATING.txt	Fri Jun 01 09:38:08 2018 -0700
+++ b/src/java.desktop/share/native/libfreetype/UPDATING.txt	Mon Jun 04 10:54:20 2018 -0700
@@ -12,6 +12,8 @@
 Before attempting compilation be sure to diff the JDK copy and the freetype copy
 of src/java.desktop/share/native/libfreetype/include/freetype/config/ftoption.h
 and re-apply the same edits made for the JDK option file.
+Also modules the JDK does not include must be commented out in
+src/java.desktop/share/native/libfreetype/include/freetype/config/ftmodule.h.
 Notably JDK is not using GZIP or LZW or BDF support which are on by default
 for the freetype distribution.
 If you don't make the edits the build will fail due to not copying the relevant
--- a/src/java.desktop/share/native/libfreetype/include/freetype/config/ftconfig.h	Fri Jun 01 09:38:08 2018 -0700
+++ b/src/java.desktop/share/native/libfreetype/include/freetype/config/ftconfig.h	Mon Jun 04 10:54:20 2018 -0700
@@ -422,9 +422,9 @@
 #endif /* !FT_BASE_DEF */
 
 
-  /*   When compiling FreeType as a DLL, some systems/compilers need a     */
-  /*   special attribute in front OR after the return type of function     */
-  /*   declarations.                                                       */
+  /*   When compiling FreeType as a DLL or DSO with hidden visibility      */
+  /*   some systems/compilers need a special attribute in front OR after   */
+  /*   the return type of function declarations.                           */
   /*                                                                       */
   /*   Two macros are used within the FreeType source code to define       */
   /*   exported library functions: FT_EXPORT and FT_EXPORT_DEF.            */
@@ -455,19 +455,28 @@
   /*                                                                       */
 #ifndef FT_EXPORT
 
-#ifdef __cplusplus
+#ifdef FT2_BUILD_LIBRARY
+
+#if defined( _WIN32 ) && ( defined( _DLL ) || defined( DLL_EXPORT ) )
+#define FT_EXPORT( x )  __declspec( dllexport )  x
+#elif defined( __GNUC__ ) && __GNUC__ >= 4
+#define FT_EXPORT( x )  __attribute__(( visibility( "default" ) ))  x
+#elif defined( __cplusplus )
 #define FT_EXPORT( x )  extern "C"  x
 #else
 #define FT_EXPORT( x )  extern  x
 #endif
 
-#ifdef _MSC_VER
-#undef FT_EXPORT
-#ifdef _DLL
-#define FT_EXPORT( x )  __declspec( dllexport )  x
 #else
+
+#if defined( FT2_DLLIMPORT )
 #define FT_EXPORT( x )  __declspec( dllimport )  x
+#elif defined( __cplusplus )
+#define FT_EXPORT( x )  extern "C"  x
+#else
+#define FT_EXPORT( x )  extern  x
 #endif
+
 #endif
 
 #endif /* !FT_EXPORT */
--- a/src/java.desktop/share/native/libfreetype/include/freetype/config/ftoption.h	Fri Jun 01 09:38:08 2018 -0700
+++ b/src/java.desktop/share/native/libfreetype/include/freetype/config/ftoption.h	Mon Jun 04 10:54:20 2018 -0700
@@ -82,6 +82,10 @@
   /* to control the various font drivers and modules.  The controllable    */
   /* properties are listed in the section @properties.                     */
   /*                                                                       */
+  /* You have to undefine this configuration option on platforms that lack */
+  /* the concept of environment variables (and thus don't have the         */
+  /* `getenv' function), for example Windows CE.                           */
+  /*                                                                       */
   /* `FREETYPE_PROPERTIES' has the following syntax form (broken here into */
   /* multiple lines for better readability).                               */
   /*                                                                       */
--- a/src/java.desktop/share/native/libfreetype/include/freetype/freetype.h	Fri Jun 01 09:38:08 2018 -0700
+++ b/src/java.desktop/share/native/libfreetype/include/freetype/freetype.h	Mon Jun 04 10:54:20 2018 -0700
@@ -724,11 +724,12 @@
   /*      Same as FT_ENCODING_JOHAB.  Deprecated.                          */
   /*                                                                       */
   /* <Note>                                                                */
-  /*    By default, FreeType automatically synthesizes a Unicode charmap   */
-  /*    for PostScript fonts, using their glyph name dictionaries.         */
-  /*    However, it also reports the encodings defined explicitly in the   */
-  /*    font file, for the cases when they are needed, with the Adobe      */
-  /*    values as well.                                                    */
+  /*    By default, FreeType enables a Unicode charmap and tags it with    */
+  /*    FT_ENCODING_UNICODE when it is either provided or can be generated */
+  /*    from PostScript glyph name dictionaries in the font file.          */
+  /*    All other encodings are considered legacy and tagged only if       */
+  /*    explicitly defined in the font file.  Otherwise, FT_ENCODING_NONE  */
+  /*    is used.                                                           */
   /*                                                                       */
   /*    FT_ENCODING_NONE is set by the BDF and PCF drivers if the charmap  */
   /*    is neither Unicode nor ISO-8859-1 (otherwise it is set to          */
@@ -1175,7 +1176,7 @@
   /*      interpolating between them.  Supported formats are Adobe MM,     */
   /*      TrueType GX, and OpenType variation fonts.                       */
   /*                                                                       */
-  /*      See the multiple-masters specific API for details.               */
+  /*      See section @multiple_masters for API details.                   */
   /*                                                                       */
   /*    FT_FACE_FLAG_GLYPH_NAMES ::                                        */
   /*      The face contains glyph names, which can be retrieved using      */
@@ -2062,8 +2063,8 @@
   /*    data :: A pointer to the parameter data.                           */
   /*                                                                       */
   /* <Note>                                                                */
-  /*    The ID and function of parameters are driver-specific.  See the    */
-  /*    various FT_PARAM_TAG_XXX flags for more information.               */
+  /*    The ID and function of parameters are driver-specific.  See        */
+  /*    section @parameter_tags for more information.                      */
   /*                                                                       */
   typedef struct  FT_Parameter_
   {
@@ -2833,6 +2834,10 @@
   /*    since its glyph indices are not listed in any of the font's        */
   /*    charmaps.                                                          */
   /*                                                                       */
+  /*    If no active cmap is set up (i.e., `face->charmap' is zero), the   */
+  /*    call to @FT_Get_Char_Index is omitted, and the function behaves    */
+  /*    identically to @FT_Load_Glyph.                                     */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_Load_Char( FT_Face   face,
                 FT_ULong  char_code,
@@ -3065,7 +3070,7 @@
    *
    *     Advance widths are rounded to integer values; however, using the
    *     `lsb_delta' and `rsb_delta' fields of @FT_GlyphSlotRec, it is
-   *     possible to get fractional advance widths for sub-pixel positioning
+   *     possible to get fractional advance widths for subpixel positioning
    *     (which is recommended to use).
    *
    *     If configuration option AF_CONFIG_OPTION_TT_SIZE_METRICS is active,
@@ -3204,13 +3209,13 @@
   /*      opacity).                                                        */
   /*                                                                       */
   /*    FT_RENDER_MODE_LCD ::                                              */
-  /*      This mode corresponds to horizontal RGB and BGR sub-pixel        */
+  /*      This mode corresponds to horizontal RGB and BGR subpixel         */
   /*      displays like LCD screens.  It produces 8-bit bitmaps that are   */
   /*      3~times the width of the original glyph outline in pixels, and   */
   /*      which use the @FT_PIXEL_MODE_LCD mode.                           */
   /*                                                                       */
   /*    FT_RENDER_MODE_LCD_V ::                                            */
-  /*      This mode corresponds to vertical RGB and BGR sub-pixel displays */
+  /*      This mode corresponds to vertical RGB and BGR subpixel displays  */
   /*      (like PDA screens, rotated LCD displays, etc.).  It produces     */
   /*      8-bit bitmaps that are 3~times the height of the original        */
   /*      glyph outline in pixels and use the @FT_PIXEL_MODE_LCD_V mode.   */
@@ -4552,7 +4557,7 @@
    */
 #define FREETYPE_MAJOR  2
 #define FREETYPE_MINOR  9
-#define FREETYPE_PATCH  0
+#define FREETYPE_PATCH  1
 
 
   /*************************************************************************/
--- a/src/java.desktop/share/native/libfreetype/include/freetype/ftdriver.h	Fri Jun 01 09:38:08 2018 -0700
+++ b/src/java.desktop/share/native/libfreetype/include/freetype/ftdriver.h	Mon Jun 04 10:54:20 2018 -0700
@@ -111,9 +111,9 @@
    *
    *   One of the reasons to not hint horizontally is antialiasing for LCD
    *   screens: The pixel geometry of modern displays supplies three
-   *   vertical sub-pixels as the eye moves horizontally across each visible
+   *   vertical subpixels as the eye moves horizontally across each visible
    *   pixel.  On devices where we can be certain this characteristic is
-   *   present a rasterizer can take advantage of the sub-pixels to add
+   *   present a rasterizer can take advantage of the subpixels to add
    *   increments of weight.  In Western writing systems this turns out to
    *   be the more critical direction anyway; the weights and spacing of
    *   vertical stems (see above) are central to Armenian, Cyrillic, Greek,
--- a/src/java.desktop/share/native/libfreetype/include/freetype/ftgasp.h	Fri Jun 01 09:38:08 2018 -0700
+++ b/src/java.desktop/share/native/libfreetype/include/freetype/ftgasp.h	Mon Jun 04 10:54:20 2018 -0700
@@ -29,6 +29,9 @@
 #endif
 
 
+FT_BEGIN_HEADER
+
+
   /***************************************************************************
    *
    * @section:
@@ -131,6 +134,8 @@
   /* */
 
 
+FT_END_HEADER
+
 #endif /* FTGASP_H_ */
 
 
--- a/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftobjs.h	Fri Jun 01 09:38:08 2018 -0700
+++ b/src/java.desktop/share/native/libfreetype/include/freetype/internal/ftobjs.h	Mon Jun 04 10:54:20 2018 -0700
@@ -155,7 +155,7 @@
 
   } FT_CMapRec;
 
-  /* typecase any pointer to a charmap handle */
+  /* typecast any pointer to a charmap handle */
 #define FT_CMAP( x )  ( (FT_CMap)( x ) )
 
   /* obvious macros */
--- a/src/java.desktop/share/native/libfreetype/src/autofit/afblue.c	Fri Jun 01 09:38:08 2018 -0700
+++ b/src/java.desktop/share/native/libfreetype/src/autofit/afblue.c	Mon Jun 04 10:54:20 2018 -0700
@@ -166,6 +166,10 @@
     '\0',
     '\xE2', '\xB4', '\x84', ' ', '\xE2', '\xB4', '\x85', ' ', '\xE2', '\xB4', '\x94', ' ', '\xE2', '\xB4', '\x95', ' ', '\xE2', '\xB4', '\x81', ' ', '\xE2', '\xB4', '\x82', ' ', '\xE2', '\xB4', '\x98', ' ', '\xE2', '\xB4', '\x9D',  /* ⴄ ⴅ ⴔ ⴕ ⴁ ⴂ ⴘ ⴝ */
     '\0',
+    '\xE1', '\xB2', '\x9C', ' ', '\xE1', '\xB2', '\x9F', ' ', '\xE1', '\xB2', '\xB3', ' ', '\xE1', '\xB2', '\xB8', ' ', '\xE1', '\xB2', '\x92', ' ', '\xE1', '\xB2', '\x94', ' ', '\xE1', '\xB2', '\x9D', ' ', '\xE1', '\xB2', '\xB4',  /* Ნ Ჟ Ჳ Ჸ Გ Ე Ო Ჴ */
+    '\0',
+    '\xE1', '\xB2', '\x98', ' ', '\xE1', '\xB2', '\xB2', ' ', '\xE1', '\xB2', '\x9D', ' ', '\xE1', '\xB2', '\xA9', ' ', '\xE1', '\xB2', '\x9B', ' ', '\xE1', '\xB2', '\xA8', ' ', '\xE1', '\xB2', '\xAF', ' ', '\xE1', '\xB2', '\xBD',  /* Ი Ჲ Ო Ჩ Მ Შ Ჯ Ჽ */
+    '\0',
     '\xE2', '\xB0', '\x85', ' ', '\xE2', '\xB0', '\x94', ' ', '\xE2', '\xB0', '\xAA', ' ', '\xE2', '\xB0', '\x84', ' ', '\xE2', '\xB0', '\x82', ' ', '\xE2', '\xB0', '\x8A', ' ', '\xE2', '\xB0', '\xAB', ' ', '\xE2', '\xB0', '\x8B',  /* Ⰵ Ⱄ Ⱚ Ⰴ Ⰲ Ⰺ Ⱛ Ⰻ */
     '\0',
     '\xE2', '\xB0', '\x85', ' ', '\xE2', '\xB0', '\x84', ' ', '\xE2', '\xB0', '\x82', ' ', '\xE2', '\xB0', '\xAA', ' ', '\xE2', '\xB0', '\x9E', ' ', '\xE2', '\xB0', '\xA1', ' ', '\xE2', '\xB0', '\x8A', ' ', '\xE2', '\xB0', '\x94',  /* Ⰵ Ⰴ Ⰲ Ⱚ Ⱎ Ⱑ Ⰺ Ⱄ */
@@ -539,6 +543,8 @@
     { AF_BLUE_STRING_GEORGIAN_MKHEDRULI_BOTTOM,    0                                 },
     { AF_BLUE_STRING_GEORGIAN_MKHEDRULI_ASCENDER,  AF_BLUE_PROPERTY_LATIN_TOP        },
     { AF_BLUE_STRING_GEORGIAN_MKHEDRULI_DESCENDER, 0                                 },
+    { AF_BLUE_STRING_GEORGIAN_MTAVRULI_TOP,        AF_BLUE_PROPERTY_LATIN_TOP        },
+    { AF_BLUE_STRING_GEORGIAN_MTAVRULI_BOTTOM,     0                                 },
     { AF_BLUE_STRING_MAX,                          0                                 },
     { AF_BLUE_STRING_GEORGIAN_ASOMTAVRULI_TOP,    AF_BLUE_PROPERTY_LATIN_TOP        },
     { AF_BLUE_STRING_GEORGIAN_ASOMTAVRULI_BOTTOM, 0                                 },
--- a/src/java.desktop/share/native/libfreetype/src/autofit/afblue.dat	Fri Jun 01 09:38:08 2018 -0700
+++ b/src/java.desktop/share/native/libfreetype/src/autofit/afblue.dat	Mon Jun 04 10:54:20 2018 -0700
@@ -242,6 +242,11 @@
   AF_BLUE_STRING_GEORGIAN_NUSKHURI_DESCENDER
     "ⴄ ⴅ ⴔ ⴕ ⴁ ⴂ ⴘ ⴝ"
 
+  AF_BLUE_STRING_GEORGIAN_MTAVRULI_TOP
+    "Ნ Ჟ Ჳ Ჸ Გ Ე Ო Ჴ"
+  AF_BLUE_STRING_GEORGIAN_MTAVRULI_BOTTOM
+    "Ი Ჲ Ო Ჩ Მ Შ Ჯ Ჽ"
+
   AF_BLUE_STRING_GLAGOLITIC_CAPITAL_TOP
     "Ⰵ Ⱄ Ⱚ Ⰴ Ⰲ Ⰺ Ⱛ Ⰻ"
   AF_BLUE_STRING_GLAGOLITIC_CAPITAL_BOTTOM
@@ -795,13 +800,14 @@
     { AF_BLUE_STRING_ETHIOPIC_BOTTOM, 0                          }
     { AF_BLUE_STRING_MAX,             0                          }
 
-  // blue zones for Mtavruli are missing (not yet defined in Unicode)
   AF_BLUE_STRINGSET_GEOR
     { AF_BLUE_STRING_GEORGIAN_MKHEDRULI_TOP,       AF_BLUE_PROPERTY_LATIN_TOP      |
                                                    AF_BLUE_PROPERTY_LATIN_X_HEIGHT   }
     { AF_BLUE_STRING_GEORGIAN_MKHEDRULI_BOTTOM,    0                                 }
     { AF_BLUE_STRING_GEORGIAN_MKHEDRULI_ASCENDER,  AF_BLUE_PROPERTY_LATIN_TOP        }
     { AF_BLUE_STRING_GEORGIAN_MKHEDRULI_DESCENDER, 0                                 }
+    { AF_BLUE_STRING_GEORGIAN_MTAVRULI_TOP,        AF_BLUE_PROPERTY_LATIN_TOP        }
+    { AF_BLUE_STRING_GEORGIAN_MTAVRULI_BOTTOM,     0                                 }
     { AF_BLUE_STRING_MAX,                          0                                 }
 
   AF_BLUE_STRINGSET_GEOK
--- a/src/java.desktop/share/native/libfreetype/src/autofit/afblue.h	Fri Jun 01 09:38:08 2018 -0700
+++ b/src/java.desktop/share/native/libfreetype/src/autofit/afblue.h	Mon Jun 04 10:54:20 2018 -0700
@@ -147,119 +147,121 @@
     AF_BLUE_STRING_GEORGIAN_NUSKHURI_BOTTOM = 1813,
     AF_BLUE_STRING_GEORGIAN_NUSKHURI_ASCENDER = 1845,
     AF_BLUE_STRING_GEORGIAN_NUSKHURI_DESCENDER = 1877,
-    AF_BLUE_STRING_GLAGOLITIC_CAPITAL_TOP = 1909,
-    AF_BLUE_STRING_GLAGOLITIC_CAPITAL_BOTTOM = 1941,
-    AF_BLUE_STRING_GLAGOLITIC_SMALL_TOP = 1973,
-    AF_BLUE_STRING_GLAGOLITIC_SMALL_BOTTOM = 2005,
-    AF_BLUE_STRING_GOTHIC_TOP = 2037,
-    AF_BLUE_STRING_GOTHIC_BOTTOM = 2077,
-    AF_BLUE_STRING_GREEK_CAPITAL_TOP = 2097,
-    AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM = 2118,
-    AF_BLUE_STRING_GREEK_SMALL_BETA_TOP = 2136,
-    AF_BLUE_STRING_GREEK_SMALL = 2154,
-    AF_BLUE_STRING_GREEK_SMALL_DESCENDER = 2178,
-    AF_BLUE_STRING_GUJARATI_TOP = 2202,
-    AF_BLUE_STRING_GUJARATI_BOTTOM = 2234,
-    AF_BLUE_STRING_GUJARATI_ASCENDER = 2266,
-    AF_BLUE_STRING_GUJARATI_DESCENDER = 2316,
-    AF_BLUE_STRING_GUJARATI_DIGIT_TOP = 2349,
-    AF_BLUE_STRING_GURMUKHI_BASE = 2369,
-    AF_BLUE_STRING_GURMUKHI_HEAD = 2401,
-    AF_BLUE_STRING_GURMUKHI_TOP = 2433,
-    AF_BLUE_STRING_GURMUKHI_BOTTOM = 2465,
-    AF_BLUE_STRING_GURMUKHI_DIGIT_TOP = 2497,
-    AF_BLUE_STRING_HEBREW_TOP = 2517,
-    AF_BLUE_STRING_HEBREW_BOTTOM = 2541,
-    AF_BLUE_STRING_HEBREW_DESCENDER = 2559,
-    AF_BLUE_STRING_KANNADA_TOP = 2574,
-    AF_BLUE_STRING_KANNADA_BOTTOM = 2618,
-    AF_BLUE_STRING_KAYAH_LI_TOP = 2650,
-    AF_BLUE_STRING_KAYAH_LI_BOTTOM = 2674,
-    AF_BLUE_STRING_KAYAH_LI_ASCENDER = 2694,
-    AF_BLUE_STRING_KAYAH_LI_DESCENDER = 2702,
-    AF_BLUE_STRING_KAYAH_LI_LARGE_DESCENDER = 2714,
-    AF_BLUE_STRING_KHMER_TOP = 2735,
-    AF_BLUE_STRING_KHMER_SUBSCRIPT_TOP = 2759,
-    AF_BLUE_STRING_KHMER_BOTTOM = 2799,
-    AF_BLUE_STRING_KHMER_DESCENDER = 2831,
-    AF_BLUE_STRING_KHMER_LARGE_DESCENDER = 2865,
-    AF_BLUE_STRING_KHMER_SYMBOLS_WAXING_TOP = 2952,
-    AF_BLUE_STRING_KHMER_SYMBOLS_WANING_BOTTOM = 2960,
-    AF_BLUE_STRING_LAO_TOP = 2968,
-    AF_BLUE_STRING_LAO_BOTTOM = 3000,
-    AF_BLUE_STRING_LAO_ASCENDER = 3032,
-    AF_BLUE_STRING_LAO_LARGE_ASCENDER = 3048,
-    AF_BLUE_STRING_LAO_DESCENDER = 3060,
-    AF_BLUE_STRING_LATIN_CAPITAL_TOP = 3084,
-    AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM = 3100,
-    AF_BLUE_STRING_LATIN_SMALL_F_TOP = 3116,
-    AF_BLUE_STRING_LATIN_SMALL_TOP = 3130,
-    AF_BLUE_STRING_LATIN_SMALL_BOTTOM = 3146,
-    AF_BLUE_STRING_LATIN_SMALL_DESCENDER = 3162,
-    AF_BLUE_STRING_LATIN_SUBS_CAPITAL_TOP = 3172,
-    AF_BLUE_STRING_LATIN_SUBS_CAPITAL_BOTTOM = 3192,
-    AF_BLUE_STRING_LATIN_SUBS_SMALL_F_TOP = 3212,
-    AF_BLUE_STRING_LATIN_SUBS_SMALL = 3232,
-    AF_BLUE_STRING_LATIN_SUBS_SMALL_DESCENDER = 3268,
-    AF_BLUE_STRING_LATIN_SUPS_CAPITAL_TOP = 3288,
-    AF_BLUE_STRING_LATIN_SUPS_CAPITAL_BOTTOM = 3319,
-    AF_BLUE_STRING_LATIN_SUPS_SMALL_F_TOP = 3348,
-    AF_BLUE_STRING_LATIN_SUPS_SMALL = 3374,
-    AF_BLUE_STRING_LATIN_SUPS_SMALL_DESCENDER = 3399,
-    AF_BLUE_STRING_LISU_TOP = 3410,
-    AF_BLUE_STRING_LISU_BOTTOM = 3442,
-    AF_BLUE_STRING_MALAYALAM_TOP = 3474,
-    AF_BLUE_STRING_MALAYALAM_BOTTOM = 3518,
-    AF_BLUE_STRING_MYANMAR_TOP = 3550,
-    AF_BLUE_STRING_MYANMAR_BOTTOM = 3582,
-    AF_BLUE_STRING_MYANMAR_ASCENDER = 3614,
-    AF_BLUE_STRING_MYANMAR_DESCENDER = 3642,
-    AF_BLUE_STRING_NKO_TOP = 3674,
-    AF_BLUE_STRING_NKO_BOTTOM = 3698,
-    AF_BLUE_STRING_NKO_SMALL_TOP = 3713,
-    AF_BLUE_STRING_NKO_SMALL_BOTTOM = 3722,
-    AF_BLUE_STRING_OL_CHIKI = 3734,
-    AF_BLUE_STRING_OLD_TURKIC_TOP = 3758,
-    AF_BLUE_STRING_OLD_TURKIC_BOTTOM = 3773,
-    AF_BLUE_STRING_OSAGE_CAPITAL_TOP = 3793,
-    AF_BLUE_STRING_OSAGE_CAPITAL_BOTTOM = 3833,
-    AF_BLUE_STRING_OSAGE_CAPITAL_DESCENDER = 3863,
-    AF_BLUE_STRING_OSAGE_SMALL_TOP = 3878,
-    AF_BLUE_STRING_OSAGE_SMALL_BOTTOM = 3918,
-    AF_BLUE_STRING_OSAGE_SMALL_ASCENDER = 3958,
-    AF_BLUE_STRING_OSAGE_SMALL_DESCENDER = 3983,
-    AF_BLUE_STRING_OSMANYA_TOP = 3998,
-    AF_BLUE_STRING_OSMANYA_BOTTOM = 4038,
-    AF_BLUE_STRING_SAURASHTRA_TOP = 4078,
-    AF_BLUE_STRING_SAURASHTRA_BOTTOM = 4110,
-    AF_BLUE_STRING_SHAVIAN_TOP = 4130,
-    AF_BLUE_STRING_SHAVIAN_BOTTOM = 4140,
-    AF_BLUE_STRING_SHAVIAN_DESCENDER = 4165,
-    AF_BLUE_STRING_SHAVIAN_SMALL_TOP = 4175,
-    AF_BLUE_STRING_SHAVIAN_SMALL_BOTTOM = 4210,
-    AF_BLUE_STRING_SINHALA_TOP = 4225,
-    AF_BLUE_STRING_SINHALA_BOTTOM = 4257,
-    AF_BLUE_STRING_SINHALA_DESCENDER = 4289,
-    AF_BLUE_STRING_SUNDANESE_TOP = 4333,
-    AF_BLUE_STRING_SUNDANESE_BOTTOM = 4357,
-    AF_BLUE_STRING_SUNDANESE_DESCENDER = 4389,
-    AF_BLUE_STRING_TAI_VIET_TOP = 4397,
-    AF_BLUE_STRING_TAI_VIET_BOTTOM = 4417,
-    AF_BLUE_STRING_TAMIL_TOP = 4429,
-    AF_BLUE_STRING_TAMIL_BOTTOM = 4461,
-    AF_BLUE_STRING_TELUGU_TOP = 4493,
-    AF_BLUE_STRING_TELUGU_BOTTOM = 4521,
-    AF_BLUE_STRING_THAI_TOP = 4549,
-    AF_BLUE_STRING_THAI_BOTTOM = 4573,
-    AF_BLUE_STRING_THAI_ASCENDER = 4601,
-    AF_BLUE_STRING_THAI_LARGE_ASCENDER = 4613,
-    AF_BLUE_STRING_THAI_DESCENDER = 4625,
-    AF_BLUE_STRING_THAI_LARGE_DESCENDER = 4641,
-    AF_BLUE_STRING_THAI_DIGIT_TOP = 4649,
-    AF_BLUE_STRING_TIFINAGH = 4661,
-    AF_BLUE_STRING_VAI_TOP = 4693,
-    AF_BLUE_STRING_VAI_BOTTOM = 4725,
-    af_blue_1_1 = 4756,
+    AF_BLUE_STRING_GEORGIAN_MTAVRULI_TOP = 1909,
+    AF_BLUE_STRING_GEORGIAN_MTAVRULI_BOTTOM = 1941,
+    AF_BLUE_STRING_GLAGOLITIC_CAPITAL_TOP = 1973,
+    AF_BLUE_STRING_GLAGOLITIC_CAPITAL_BOTTOM = 2005,
+    AF_BLUE_STRING_GLAGOLITIC_SMALL_TOP = 2037,
+    AF_BLUE_STRING_GLAGOLITIC_SMALL_BOTTOM = 2069,
+    AF_BLUE_STRING_GOTHIC_TOP = 2101,
+    AF_BLUE_STRING_GOTHIC_BOTTOM = 2141,
+    AF_BLUE_STRING_GREEK_CAPITAL_TOP = 2161,
+    AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM = 2182,
+    AF_BLUE_STRING_GREEK_SMALL_BETA_TOP = 2200,
+    AF_BLUE_STRING_GREEK_SMALL = 2218,
+    AF_BLUE_STRING_GREEK_SMALL_DESCENDER = 2242,
+    AF_BLUE_STRING_GUJARATI_TOP = 2266,
+    AF_BLUE_STRING_GUJARATI_BOTTOM = 2298,
+    AF_BLUE_STRING_GUJARATI_ASCENDER = 2330,
+    AF_BLUE_STRING_GUJARATI_DESCENDER = 2380,
+    AF_BLUE_STRING_GUJARATI_DIGIT_TOP = 2413,
+    AF_BLUE_STRING_GURMUKHI_BASE = 2433,
+    AF_BLUE_STRING_GURMUKHI_HEAD = 2465,
+    AF_BLUE_STRING_GURMUKHI_TOP = 2497,
+    AF_BLUE_STRING_GURMUKHI_BOTTOM = 2529,
+    AF_BLUE_STRING_GURMUKHI_DIGIT_TOP = 2561,
+    AF_BLUE_STRING_HEBREW_TOP = 2581,
+    AF_BLUE_STRING_HEBREW_BOTTOM = 2605,
+    AF_BLUE_STRING_HEBREW_DESCENDER = 2623,
+    AF_BLUE_STRING_KANNADA_TOP = 2638,
+    AF_BLUE_STRING_KANNADA_BOTTOM = 2682,
+    AF_BLUE_STRING_KAYAH_LI_TOP = 2714,
+    AF_BLUE_STRING_KAYAH_LI_BOTTOM = 2738,
+    AF_BLUE_STRING_KAYAH_LI_ASCENDER = 2758,
+    AF_BLUE_STRING_KAYAH_LI_DESCENDER = 2766,
+    AF_BLUE_STRING_KAYAH_LI_LARGE_DESCENDER = 2778,
+    AF_BLUE_STRING_KHMER_TOP = 2799,
+    AF_BLUE_STRING_KHMER_SUBSCRIPT_TOP = 2823,
+    AF_BLUE_STRING_KHMER_BOTTOM = 2863,
+    AF_BLUE_STRING_KHMER_DESCENDER = 2895,
+    AF_BLUE_STRING_KHMER_LARGE_DESCENDER = 2929,
+    AF_BLUE_STRING_KHMER_SYMBOLS_WAXING_TOP = 3016,
+    AF_BLUE_STRING_KHMER_SYMBOLS_WANING_BOTTOM = 3024,
+    AF_BLUE_STRING_LAO_TOP = 3032,
+    AF_BLUE_STRING_LAO_BOTTOM = 3064,
+    AF_BLUE_STRING_LAO_ASCENDER = 3096,
+    AF_BLUE_STRING_LAO_LARGE_ASCENDER = 3112,
+    AF_BLUE_STRING_LAO_DESCENDER = 3124,
+    AF_BLUE_STRING_LATIN_CAPITAL_TOP = 3148,
+    AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM = 3164,
+    AF_BLUE_STRING_LATIN_SMALL_F_TOP = 3180,
+    AF_BLUE_STRING_LATIN_SMALL_TOP = 3194,
+    AF_BLUE_STRING_LATIN_SMALL_BOTTOM = 3210,
+    AF_BLUE_STRING_LATIN_SMALL_DESCENDER = 3226,
+    AF_BLUE_STRING_LATIN_SUBS_CAPITAL_TOP = 3236,
+    AF_BLUE_STRING_LATIN_SUBS_CAPITAL_BOTTOM = 3256,
+    AF_BLUE_STRING_LATIN_SUBS_SMALL_F_TOP = 3276,
+    AF_BLUE_STRING_LATIN_SUBS_SMALL = 3296,
+    AF_BLUE_STRING_LATIN_SUBS_SMALL_DESCENDER = 3332,
+    AF_BLUE_STRING_LATIN_SUPS_CAPITAL_TOP = 3352,
+    AF_BLUE_STRING_LATIN_SUPS_CAPITAL_BOTTOM = 3383,
+    AF_BLUE_STRING_LATIN_SUPS_SMALL_F_TOP = 3412,
+    AF_BLUE_STRING_LATIN_SUPS_SMALL = 3438,
+    AF_BLUE_STRING_LATIN_SUPS_SMALL_DESCENDER = 3463,
+    AF_BLUE_STRING_LISU_TOP = 3474,
+    AF_BLUE_STRING_LISU_BOTTOM = 3506,
+    AF_BLUE_STRING_MALAYALAM_TOP = 3538,
+    AF_BLUE_STRING_MALAYALAM_BOTTOM = 3582,
+    AF_BLUE_STRING_MYANMAR_TOP = 3614,
+    AF_BLUE_STRING_MYANMAR_BOTTOM = 3646,
+    AF_BLUE_STRING_MYANMAR_ASCENDER = 3678,
+    AF_BLUE_STRING_MYANMAR_DESCENDER = 3706,
+    AF_BLUE_STRING_NKO_TOP = 3738,
+    AF_BLUE_STRING_NKO_BOTTOM = 3762,
+    AF_BLUE_STRING_NKO_SMALL_TOP = 3777,
+    AF_BLUE_STRING_NKO_SMALL_BOTTOM = 3786,
+    AF_BLUE_STRING_OL_CHIKI = 3798,
+    AF_BLUE_STRING_OLD_TURKIC_TOP = 3822,
+    AF_BLUE_STRING_OLD_TURKIC_BOTTOM = 3837,
+    AF_BLUE_STRING_OSAGE_CAPITAL_TOP = 3857,
+    AF_BLUE_STRING_OSAGE_CAPITAL_BOTTOM = 3897,
+    AF_BLUE_STRING_OSAGE_CAPITAL_DESCENDER = 3927,
+    AF_BLUE_STRING_OSAGE_SMALL_TOP = 3942,
+    AF_BLUE_STRING_OSAGE_SMALL_BOTTOM = 3982,
+    AF_BLUE_STRING_OSAGE_SMALL_ASCENDER = 4022,
+    AF_BLUE_STRING_OSAGE_SMALL_DESCENDER = 4047,
+    AF_BLUE_STRING_OSMANYA_TOP = 4062,
+    AF_BLUE_STRING_OSMANYA_BOTTOM = 4102,
+    AF_BLUE_STRING_SAURASHTRA_TOP = 4142,
+    AF_BLUE_STRING_SAURASHTRA_BOTTOM = 4174,
+    AF_BLUE_STRING_SHAVIAN_TOP = 4194,
+    AF_BLUE_STRING_SHAVIAN_BOTTOM = 4204,
+    AF_BLUE_STRING_SHAVIAN_DESCENDER = 4229,
+    AF_BLUE_STRING_SHAVIAN_SMALL_TOP = 4239,
+    AF_BLUE_STRING_SHAVIAN_SMALL_BOTTOM = 4274,
+    AF_BLUE_STRING_SINHALA_TOP = 4289,
+    AF_BLUE_STRING_SINHALA_BOTTOM = 4321,
+    AF_BLUE_STRING_SINHALA_DESCENDER = 4353,
+    AF_BLUE_STRING_SUNDANESE_TOP = 4397,
+    AF_BLUE_STRING_SUNDANESE_BOTTOM = 4421,
+    AF_BLUE_STRING_SUNDANESE_DESCENDER = 4453,
+    AF_BLUE_STRING_TAI_VIET_TOP = 4461,
+    AF_BLUE_STRING_TAI_VIET_BOTTOM = 4481,
+    AF_BLUE_STRING_TAMIL_TOP = 4493,
+    AF_BLUE_STRING_TAMIL_BOTTOM = 4525,
+    AF_BLUE_STRING_TELUGU_TOP = 4557,
+    AF_BLUE_STRING_TELUGU_BOTTOM = 4585,
+    AF_BLUE_STRING_THAI_TOP = 4613,
+    AF_BLUE_STRING_THAI_BOTTOM = 4637,
+    AF_BLUE_STRING_THAI_ASCENDER = 4665,
+    AF_BLUE_STRING_THAI_LARGE_ASCENDER = 4677,
+    AF_BLUE_STRING_THAI_DESCENDER = 4689,
+    AF_BLUE_STRING_THAI_LARGE_DESCENDER = 4705,
+    AF_BLUE_STRING_THAI_DIGIT_TOP = 4713,
+    AF_BLUE_STRING_TIFINAGH = 4725,
+    AF_BLUE_STRING_VAI_TOP = 4757,
+    AF_BLUE_STRING_VAI_BOTTOM = 4789,
+    af_blue_1_1 = 4820,
 #ifdef AF_CONFIG_OPTION_CJK
     AF_BLUE_STRING_CJK_TOP = af_blue_1_1 + 1,
     AF_BLUE_STRING_CJK_BOTTOM = af_blue_1_1 + 203,
@@ -336,41 +338,41 @@
     AF_BLUE_STRINGSET_DSRT = 75,
     AF_BLUE_STRINGSET_ETHI = 80,
     AF_BLUE_STRINGSET_GEOR = 83,
-    AF_BLUE_STRINGSET_GEOK = 88,
-    AF_BLUE_STRINGSET_GLAG = 95,
-    AF_BLUE_STRINGSET_GOTH = 100,
-    AF_BLUE_STRINGSET_GREK = 103,
-    AF_BLUE_STRINGSET_GUJR = 110,
-    AF_BLUE_STRINGSET_GURU = 116,
-    AF_BLUE_STRINGSET_HEBR = 122,
-    AF_BLUE_STRINGSET_KALI = 126,
-    AF_BLUE_STRINGSET_KHMR = 132,
-    AF_BLUE_STRINGSET_KHMS = 138,
-    AF_BLUE_STRINGSET_KNDA = 141,
-    AF_BLUE_STRINGSET_LAO = 144,
-    AF_BLUE_STRINGSET_LATN = 150,
-    AF_BLUE_STRINGSET_LATB = 157,
-    AF_BLUE_STRINGSET_LATP = 164,
-    AF_BLUE_STRINGSET_LISU = 171,
-    AF_BLUE_STRINGSET_MLYM = 174,
-    AF_BLUE_STRINGSET_MYMR = 177,
-    AF_BLUE_STRINGSET_NKOO = 182,
-    AF_BLUE_STRINGSET_NONE = 187,
-    AF_BLUE_STRINGSET_OLCK = 188,
-    AF_BLUE_STRINGSET_ORKH = 191,
-    AF_BLUE_STRINGSET_OSGE = 194,
-    AF_BLUE_STRINGSET_OSMA = 202,
-    AF_BLUE_STRINGSET_SAUR = 205,
-    AF_BLUE_STRINGSET_SHAW = 208,
-    AF_BLUE_STRINGSET_SINH = 214,
-    AF_BLUE_STRINGSET_SUND = 218,
-    AF_BLUE_STRINGSET_TAML = 222,
-    AF_BLUE_STRINGSET_TAVT = 225,
-    AF_BLUE_STRINGSET_TELU = 228,
-    AF_BLUE_STRINGSET_TFNG = 231,
-    AF_BLUE_STRINGSET_THAI = 234,
-    AF_BLUE_STRINGSET_VAII = 242,
-    af_blue_2_1 = 245,
+    AF_BLUE_STRINGSET_GEOK = 90,
+    AF_BLUE_STRINGSET_GLAG = 97,
+    AF_BLUE_STRINGSET_GOTH = 102,
+    AF_BLUE_STRINGSET_GREK = 105,
+    AF_BLUE_STRINGSET_GUJR = 112,
+    AF_BLUE_STRINGSET_GURU = 118,
+    AF_BLUE_STRINGSET_HEBR = 124,
+    AF_BLUE_STRINGSET_KALI = 128,
+    AF_BLUE_STRINGSET_KHMR = 134,
+    AF_BLUE_STRINGSET_KHMS = 140,
+    AF_BLUE_STRINGSET_KNDA = 143,
+    AF_BLUE_STRINGSET_LAO = 146,
+    AF_BLUE_STRINGSET_LATN = 152,
+    AF_BLUE_STRINGSET_LATB = 159,
+    AF_BLUE_STRINGSET_LATP = 166,
+    AF_BLUE_STRINGSET_LISU = 173,
+    AF_BLUE_STRINGSET_MLYM = 176,
+    AF_BLUE_STRINGSET_MYMR = 179,
+    AF_BLUE_STRINGSET_NKOO = 184,
+    AF_BLUE_STRINGSET_NONE = 189,
+    AF_BLUE_STRINGSET_OLCK = 190,
+    AF_BLUE_STRINGSET_ORKH = 193,
+    AF_BLUE_STRINGSET_OSGE = 196,
+    AF_BLUE_STRINGSET_OSMA = 204,
+    AF_BLUE_STRINGSET_SAUR = 207,
+    AF_BLUE_STRINGSET_SHAW = 210,
+    AF_BLUE_STRINGSET_SINH = 216,
+    AF_BLUE_STRINGSET_SUND = 220,
+    AF_BLUE_STRINGSET_TAML = 224,
+    AF_BLUE_STRINGSET_TAVT = 227,
+    AF_BLUE_STRINGSET_TELU = 230,
+    AF_BLUE_STRINGSET_TFNG = 233,
+    AF_BLUE_STRINGSET_THAI = 236,
+    AF_BLUE_STRINGSET_VAII = 244,
+    af_blue_2_1 = 247,
 #ifdef AF_CONFIG_OPTION_CJK
     AF_BLUE_STRINGSET_HANI = af_blue_2_1 + 0,
     af_blue_2_1_1 = af_blue_2_1 + 2,
--- a/src/java.desktop/share/native/libfreetype/src/autofit/afranges.c	Fri Jun 01 09:38:08 2018 -0700
+++ b/src/java.desktop/share/native/libfreetype/src/autofit/afranges.c	Mon Jun 04 10:54:20 2018 -0700
@@ -91,7 +91,7 @@
     AF_UNIRANGE_REC(  0x06E7,  0x06E8 ),
     AF_UNIRANGE_REC(  0x06EA,  0x06ED ),
     AF_UNIRANGE_REC(  0x08D4,  0x08E1 ),
-    AF_UNIRANGE_REC(  0x08E3,  0x08FF ),
+    AF_UNIRANGE_REC(  0x08D3,  0x08FF ),
     AF_UNIRANGE_REC(  0xFBB2,  0xFBC1 ),
     AF_UNIRANGE_REC(  0xFE70,  0xFE70 ),
     AF_UNIRANGE_REC(  0xFE72,  0xFE72 ),
@@ -163,6 +163,7 @@
     AF_UNIRANGE_REC(  0x09C1,  0x09C4 ),
     AF_UNIRANGE_REC(  0x09CD,  0x09CD ),
     AF_UNIRANGE_REC(  0x09E2,  0x09E3 ),
+    AF_UNIRANGE_REC(  0x09FE,  0x09FE ),
     AF_UNIRANGE_REC(       0,       0 )
   };
 
@@ -190,6 +191,7 @@
   {
     AF_UNIRANGE_REC( 0x11100, 0x11102 ),
     AF_UNIRANGE_REC( 0x11127, 0x11134 ),
+    AF_UNIRANGE_REC( 0x11146, 0x11146 ),
     AF_UNIRANGE_REC(       0,       0 )
   };
 
@@ -304,6 +306,7 @@
     AF_UNIRANGE_REC(  0x0953,  0x0957 ),
     AF_UNIRANGE_REC(  0x0962,  0x0963 ),
     AF_UNIRANGE_REC(  0xA8E0,  0xA8F1 ),
+    AF_UNIRANGE_REC(  0xA8FF,  0xA8FF ),
     AF_UNIRANGE_REC(       0,       0 )
   };
 
@@ -338,11 +341,8 @@
 
   const AF_Script_UniRangeRec  af_geor_uniranges[] =
   {
-    AF_UNIRANGE_REC(  0x10D0,  0x10FF ),  /* Georgian (Mkhedruli) */
-#if 0
-    /* the following range is proposed for inclusion in Unicode */
-    AF_UNIRANGE_REC(  0x1C90,  0x1CBF ),  /* Georgian (Mtavruli)  */
-#endif
+    AF_UNIRANGE_REC(  0x10D0,  0x10FF ),  /* Georgian (Mkhedruli)          */
+    AF_UNIRANGE_REC(  0x1C90,  0x1CBF ),  /* Georgian Extended (Mtavruli)  */
     AF_UNIRANGE_REC(       0,       0 )
   };
 
@@ -355,8 +355,8 @@
   const AF_Script_UniRangeRec  af_geok_uniranges[] =
   {
     /* Khutsuri */
-    AF_UNIRANGE_REC(  0x10A0,  0x10CD ),  /* Georgian (Asomtavruli) */
-    AF_UNIRANGE_REC(  0x2D00,  0x2D2D ),  /* Georgian (Nuskhuri)    */
+    AF_UNIRANGE_REC(  0x10A0,  0x10CD ),  /* Georgian (Asomtavruli)         */
+    AF_UNIRANGE_REC(  0x2D00,  0x2D2D ),  /* Georgian Supplement (Nuskhuri) */
     AF_UNIRANGE_REC(       0,       0 )
   };
 
@@ -425,6 +425,7 @@
     AF_UNIRANGE_REC(  0x0AC1,  0x0AC8 ),
     AF_UNIRANGE_REC(  0x0ACD,  0x0ACD ),
     AF_UNIRANGE_REC(  0x0AE2,  0x0AE3 ),
+    AF_UNIRANGE_REC(  0x0AFA,  0x0AFF ),
     AF_UNIRANGE_REC(       0,       0 )
   };
 
@@ -655,7 +656,8 @@
 
   const AF_Script_UniRangeRec  af_mlym_nonbase_uniranges[] =
   {
-    AF_UNIRANGE_REC(  0x0D01,  0x0D01 ),
+    AF_UNIRANGE_REC(  0x0D00,  0x0D01 ),
+    AF_UNIRANGE_REC(  0x0D3B,  0x0D3C ),
     AF_UNIRANGE_REC(  0x0D4D,  0x0D4E ),
     AF_UNIRANGE_REC(  0x0D62,  0x0D63 ),
     AF_UNIRANGE_REC(       0,       0 )
@@ -697,6 +699,7 @@
   const AF_Script_UniRangeRec  af_nkoo_nonbase_uniranges[] =
   {
     AF_UNIRANGE_REC(  0x07EB,  0x07F5 ),
+    AF_UNIRANGE_REC(  0x07FD,  0x07FD ),
     AF_UNIRANGE_REC(       0,       0 )
   };
 
@@ -856,6 +859,7 @@
   const AF_Script_UniRangeRec  af_telu_nonbase_uniranges[] =
   {
     AF_UNIRANGE_REC(  0x0C00,  0x0C00 ),
+    AF_UNIRANGE_REC(  0x0C04,  0x0C04 ),
     AF_UNIRANGE_REC(  0x0C3E,  0x0C40 ),
     AF_UNIRANGE_REC(  0x0C46,  0x0C56 ),
     AF_UNIRANGE_REC(  0x0C62,  0x0C63 ),
@@ -1006,10 +1010,13 @@
     AF_UNIRANGE_REC(  0xFE30,  0xFE4F ),  /* CJK Compatibility Forms                 */
     AF_UNIRANGE_REC(  0xFF00,  0xFFEF ),  /* Halfwidth and Fullwidth Forms           */
     AF_UNIRANGE_REC( 0x1B000, 0x1B0FF ),  /* Kana Supplement                         */
+    AF_UNIRANGE_REC( 0x1B100, 0x1B12F ),  /* Kana Extended-A                         */
     AF_UNIRANGE_REC( 0x1D300, 0x1D35F ),  /* Tai Xuan Hing Symbols                   */
     AF_UNIRANGE_REC( 0x20000, 0x2A6DF ),  /* CJK Unified Ideographs Extension B      */
     AF_UNIRANGE_REC( 0x2A700, 0x2B73F ),  /* CJK Unified Ideographs Extension C      */
     AF_UNIRANGE_REC( 0x2B740, 0x2B81F ),  /* CJK Unified Ideographs Extension D      */
+    AF_UNIRANGE_REC( 0x2B820, 0x2CEAF ),  /* CJK Unified Ideographs Extension E      */
+    AF_UNIRANGE_REC( 0x2CEB0, 0x2EBEF ),  /* CJK Unified Ideographs Extension F      */
     AF_UNIRANGE_REC( 0x2F800, 0x2FA1F ),  /* CJK Compatibility Ideographs Supplement */
     AF_UNIRANGE_REC(       0,       0 )
   };
--- a/src/java.desktop/share/native/libfreetype/src/autofit/afscript.h	Fri Jun 01 09:38:08 2018 -0700
+++ b/src/java.desktop/share/native/libfreetype/src/autofit/afscript.h	Mon Jun 04 10:54:20 2018 -0700
@@ -137,7 +137,7 @@
           "Georgian (Mkhedruli)",
           HB_SCRIPT_GEORGIAN,
           HINTING_BOTTOM_TO_TOP,
-          "\xE1\x83\x98 \xE1\x83\x94 \xE1\x83\x90" ) /* ი ე ა */
+          "\xE1\x83\x98 \xE1\x83\x94 \xE1\x83\x90 \xE1\xB2\xBF" ) /* ი ე ა Ი */
 
   SCRIPT( geok, GEOK,
           "Georgian (Khutsuri)",
--- a/src/java.desktop/share/native/libfreetype/src/autofit/aftypes.h	Fri Jun 01 09:38:08 2018 -0700
+++ b/src/java.desktop/share/native/libfreetype/src/autofit/aftypes.h	Mon Jun 04 10:54:20 2018 -0700
@@ -76,9 +76,9 @@
 
   typedef struct  AF_WidthRec_
   {
-    FT_Pos  org;  /* original position/width in font units              */
-    FT_Pos  cur;  /* current/scaled position/width in device sub-pixels */
-    FT_Pos  fit;  /* current/fitted position/width in device sub-pixels */
+    FT_Pos  org;  /* original position/width in font units             */
+    FT_Pos  cur;  /* current/scaled position/width in device subpixels */
+    FT_Pos  fit;  /* current/fitted position/width in device subpixels */
 
   } AF_WidthRec, *AF_Width;
 
--- a/src/java.desktop/share/native/libfreetype/src/base/ftbitmap.c	Fri Jun 01 09:38:08 2018 -0700
+++ b/src/java.desktop/share/native/libfreetype/src/base/ftbitmap.c	Mon Jun 04 10:54:20 2018 -0700
@@ -237,7 +237,7 @@
       unsigned char*  out = buffer;
 
       unsigned char*  limit = bitmap->buffer + pitch * bitmap->rows;
-      unsigned int    delta = new_pitch - pitch;
+      unsigned int    delta = new_pitch - len;
 
 
       FT_MEM_ZERO( out, new_pitch * ypixels );
@@ -247,8 +247,10 @@
       {
         FT_MEM_COPY( out, in, len );
         in  += pitch;
-        out += pitch;
+        out += len;
 
+        /* we use FT_QALLOC_MULT, which doesn't zero out the buffer;      */
+        /* consequently, we have to manually zero out the remaining bytes */
         FT_MEM_ZERO( out, delta );
         out += delta;
       }
@@ -261,14 +263,14 @@
       unsigned char*  out = buffer;
 
       unsigned char*  limit = bitmap->buffer + pitch * bitmap->rows;
-      unsigned int    delta = new_pitch - pitch;
+      unsigned int    delta = new_pitch - len;
 
 
       while ( in < limit )
       {
         FT_MEM_COPY( out, in, len );
         in  += pitch;
-        out += pitch;
+        out += len;
 
         FT_MEM_ZERO( out, delta );
         out += delta;
--- a/src/java.desktop/share/native/libfreetype/src/base/ftlcdfil.c	Fri Jun 01 09:38:08 2018 -0700
+++ b/src/java.desktop/share/native/libfreetype/src/base/ftlcdfil.c	Mon Jun 04 10:54:20 2018 -0700
@@ -77,7 +77,7 @@
 
 
     /* take care of bitmap flow */
-    if ( pitch > 0 )
+    if ( pitch > 0 && height > 0 )
       origin += pitch * (FT_Int)( height - 1 );
 
     /* horizontal in-place FIR filter */
@@ -192,7 +192,7 @@
 
 
     /* take care of bitmap flow */
-    if ( pitch > 0 )
+    if ( pitch > 0 && height > 0 )
       origin += pitch * (FT_Int)( height - 1 );
 
     /* horizontal in-place intra-pixel filter */
--- a/src/java.desktop/share/native/libfreetype/src/base/ftoutln.c	Fri Jun 01 09:38:08 2018 -0700
+++ b/src/java.desktop/share/native/libfreetype/src/base/ftoutln.c	Mon Jun 04 10:54:20 2018 -0700
@@ -286,12 +286,13 @@
     FT_TRACE5(( "FT_Outline_Decompose: Done\n", n ));
     return FT_Err_Ok;
 
+  Invalid_Outline:
+    error = FT_THROW( Invalid_Outline );
+    /* fall through */
+
   Exit:
     FT_TRACE5(( "FT_Outline_Decompose: Error 0x%x\n", error ));
     return error;
-
-  Invalid_Outline:
-    return FT_THROW( Invalid_Outline );
   }
 
 
--- a/src/java.desktop/share/native/libfreetype/src/cff/cffload.c	Fri Jun 01 09:38:08 2018 -0700
+++ b/src/java.desktop/share/native/libfreetype/src/cff/cffload.c	Mon Jun 04 10:54:20 2018 -0700
@@ -1933,6 +1933,24 @@
     else if ( priv->initial_random_seed == 0 )
       priv->initial_random_seed = 987654321;
 
+    /* some sanitizing to avoid overflows later on; */
+    /* the upper limits are ad-hoc values           */
+    if ( priv->blue_shift > 1000 || priv->blue_shift < 0 )
+    {
+      FT_TRACE2(( "cff_load_private_dict:"
+                  " setting unlikely BlueShift value %d to default (7)\n",
+                  priv->blue_shift ));
+      priv->blue_shift = 7;
+    }
+
+    if ( priv->blue_fuzz > 1000 || priv->blue_fuzz < 0 )
+    {
+      FT_TRACE2(( "cff_load_private_dict:"
+                  " setting unlikely BlueFuzz value %d to default (1)\n",
+                  priv->blue_fuzz ));
+      priv->blue_fuzz = 1;
+    }
+
   Exit:
     /* clean up */
     cff_blend_clear( subfont ); /* clear blend stack */
--- a/src/java.desktop/share/native/libfreetype/src/psaux/psintrp.c	Fri Jun 01 09:38:08 2018 -0700
+++ b/src/java.desktop/share/native/libfreetype/src/psaux/psintrp.c	Mon Jun 04 10:54:20 2018 -0700
@@ -852,7 +852,8 @@
 
         curY = ADD_INT32( curY, cf2_stack_popFixed( opStack ) );
 
-        cf2_glyphpath_moveTo( &glyphPath, curX, curY );
+        if ( !decoder->flex_state )
+          cf2_glyphpath_moveTo( &glyphPath, curX, curY );
 
         break;
 
@@ -2674,7 +2675,8 @@
 
         curX = ADD_INT32( curX, cf2_stack_popFixed( opStack ) );
 
-        cf2_glyphpath_moveTo( &glyphPath, curX, curY );
+        if ( !decoder->flex_state )
+          cf2_glyphpath_moveTo( &glyphPath, curX, curY );
 
         break;
 
--- a/src/java.desktop/share/native/libfreetype/src/pshinter/pshglob.c	Fri Jun 01 09:38:08 2018 -0700
+++ b/src/java.desktop/share/native/libfreetype/src/pshinter/pshglob.c	Mon Jun 04 10:54:20 2018 -0700
@@ -227,8 +227,8 @@
   }
 
 
-  /* Re-read blue zones from the original fonts and store them into out */
-  /* private structure.  This function re-orders, sanitizes and         */
+  /* Re-read blue zones from the original fonts and store them into our */
+  /* private structure.  This function re-orders, sanitizes, and        */
   /* fuzz-expands the zones as well.                                    */
   static void
   psh_blues_set_zones( PSH_Blues  target,
--- a/src/java.desktop/share/native/libfreetype/src/sfnt/sfobjs.c	Fri Jun 01 09:38:08 2018 -0700
+++ b/src/java.desktop/share/native/libfreetype/src/sfnt/sfobjs.c	Mon Jun 04 10:54:20 2018 -0700
@@ -1144,6 +1144,8 @@
     FT_Bool       has_outline;
     FT_Bool       is_apple_sbit;
     FT_Bool       is_apple_sbix;
+    FT_Bool       has_CBLC;
+    FT_Bool       has_CBDT;
     FT_Bool       ignore_typographic_family    = FALSE;
     FT_Bool       ignore_typographic_subfamily = FALSE;
 
@@ -1224,6 +1226,13 @@
         goto Exit;
     }
 
+    has_CBLC = !face->goto_table( face, TTAG_CBLC, stream, 0 );
+    has_CBDT = !face->goto_table( face, TTAG_CBDT, stream, 0 );
+
+    /* Ignore outlines for CBLC/CBDT fonts. */
+    if ( has_CBLC || has_CBDT )
+      has_outline = FALSE;
+
     /* OpenType 1.8.2 introduced limits to this value;    */
     /* however, they make sense for older SFNT fonts also */
     if ( face->header.Units_Per_EM <    16 ||
--- a/src/java.desktop/share/native/libfreetype/src/sfnt/ttcmap.c	Fri Jun 01 09:38:08 2018 -0700
+++ b/src/java.desktop/share/native/libfreetype/src/sfnt/ttcmap.c	Mon Jun 04 10:54:20 2018 -0700
@@ -222,10 +222,10 @@
   /***** The following charmap lookup and iteration functions all      *****/
   /***** assume that the value `charcode' fulfills the following.      *****/
   /*****                                                               *****/
-  /*****   - For one byte characters, `charcode' is simply the         *****/
+  /*****   - For one-byte characters, `charcode' is simply the         *****/
   /*****     character code.                                           *****/
   /*****                                                               *****/
-  /*****   - For two byte characters, `charcode' is the 2-byte         *****/
+  /*****   - For two-byte characters, `charcode' is the 2-byte         *****/
   /*****     character code in big endian format.  More precisely:     *****/
   /*****                                                               *****/
   /*****       (charcode >> 8)    is the first byte value              *****/
@@ -252,11 +252,11 @@
   /*   subs        518            SUBHEAD[NSUBS]  sub-headers array        */
   /*   glyph_ids   518+NSUB*8     USHORT[]        glyph ID array           */
   /*                                                                       */
-  /* The `keys' table is used to map charcode high-bytes to sub-headers.   */
+  /* The `keys' table is used to map charcode high bytes to sub-headers.   */
   /* The value of `NSUBS' is the number of sub-headers defined in the      */
   /* table and is computed by finding the maximum of the `keys' table.     */
   /*                                                                       */
-  /* Note that for any n, `keys[n]' is a byte offset within the `subs'     */
+  /* Note that for any `n', `keys[n]' is a byte offset within the `subs'   */
   /* table, i.e., it is the corresponding sub-header index multiplied      */
   /* by 8.                                                                 */
   /*                                                                       */
@@ -269,8 +269,8 @@
   /*   delta       4           SHORT           see below                   */
   /*   offset      6           USHORT          see below                   */
   /*                                                                       */
-  /* A sub-header defines, for each high-byte, the range of valid          */
-  /* low-bytes within the charmap.  Note that the range defined by `first' */
+  /* A sub-header defines, for each high byte, the range of valid          */
+  /* low bytes within the charmap.  Note that the range defined by `first' */
   /* and `count' must be completely included in the interval [0..255]      */
   /* according to the specification.                                       */
   /*                                                                       */
@@ -360,7 +360,7 @@
       /* check range within 0..255 */
       if ( valid->level >= FT_VALIDATE_PARANOID )
       {
-        if ( first_code >= 256 || first_code + code_count > 256 )
+        if ( first_code >= 256 || code_count > 256 - first_code )
           FT_INVALID_DATA;
       }
 
@@ -412,7 +412,7 @@
     {
       FT_UInt   char_lo = (FT_UInt)( char_code & 0xFF );
       FT_UInt   char_hi = (FT_UInt)( char_code >> 8 );
-      FT_Byte*  p       = table + 6;    /* keys table */
+      FT_Byte*  p       = table + 6;    /* keys table       */
       FT_Byte*  subs    = table + 518;  /* subheaders table */
       FT_Byte*  sub;
 
@@ -425,8 +425,8 @@
         sub = subs;  /* jump to first sub-header */
 
         /* check that the sub-header for this byte is 0, which */
-        /* indicates that it is really a valid one-byte value  */
-        /* Otherwise, return 0                                 */
+        /* indicates that it is really a valid one-byte value; */
+        /* otherwise, return 0                                 */
         /*                                                     */
         p += char_lo * 2;
         if ( TT_PEEK_USHORT( p ) != 0 )
@@ -445,6 +445,7 @@
         if ( sub == subs )
           goto Exit;
       }
+
       result = sub;
     }
 
@@ -517,6 +518,13 @@
         FT_UInt   pos, idx;
 
 
+        if ( char_lo >= start + count && charcode <= 0xFF )
+        {
+          /* this happens only for a malformed cmap */
+          charcode = 0x100;
+          continue;
+        }
+
         if ( offset == 0 )
         {
           if ( charcode == 0x100 )
@@ -549,19 +557,18 @@
             }
           }
         }
+
+        /* if unsuccessful, avoid `charcode' leaving */
+        /* the current 256-character block           */
+        if ( count )
+          charcode--;
       }
 
-      /* If `charcode' is <= 0xFF, retry with `charcode + 1'.  If        */
-      /* `charcode' is 0x100 after the loop, do nothing since we have    */
-      /* just reached the first sub-header for two-byte character codes. */
-      /*                                                                 */
-      /* For all other cases, we jump to the next sub-header and adjust  */
-      /* `charcode' accordingly.                                         */
+      /* If `charcode' is <= 0xFF, retry with `charcode + 1'.      */
+      /* Otherwise jump to the next 256-character block and retry. */
     Next_SubHeader:
       if ( charcode <= 0xFF )
         charcode++;
-      else if ( charcode == 0x100 )
-        ;
       else
         charcode = FT_PAD_FLOOR( charcode, 0x100 ) + 0x100;
     }
--- a/src/java.desktop/share/native/libfreetype/src/sfnt/ttpost.c	Fri Jun 01 09:38:08 2018 -0700
+++ b/src/java.desktop/share/native/libfreetype/src/sfnt/ttpost.c	Mon Jun 04 10:54:20 2018 -0700
@@ -473,8 +473,8 @@
   /*    idx    :: The glyph index.                                         */
   /*                                                                       */
   /* <InOut>                                                               */
-  /*    PSname :: The address of a string pointer.  Will be NULL in case   */
-  /*              of error, otherwise it is a pointer to the glyph name.   */
+  /*    PSname :: The address of a string pointer.  Undefined in case of   */
+  /*              error, otherwise it is a pointer to the glyph name.      */
   /*                                                                       */
   /*              You must not modify the returned string!                 */
   /*                                                                       */
--- a/src/java.desktop/share/native/libfreetype/src/sfnt/ttsbit.c	Fri Jun 01 09:38:08 2018 -0700
+++ b/src/java.desktop/share/native/libfreetype/src/sfnt/ttsbit.c	Mon Jun 04 10:54:20 2018 -0700
@@ -1514,7 +1514,7 @@
     FT_FRAME_EXIT();
 
     if ( glyph_start == glyph_end )
-      return FT_THROW( Invalid_Argument );
+      return FT_THROW( Missing_Bitmap );
     if ( glyph_start > glyph_end                     ||
          glyph_end - glyph_start < 8                 ||
          face->ebdt_size - strike_offset < glyph_end )
--- a/src/java.desktop/share/native/libfreetype/src/smooth/ftgrays.c	Fri Jun 01 09:38:08 2018 -0700
+++ b/src/java.desktop/share/native/libfreetype/src/smooth/ftgrays.c	Mon Jun 04 10:54:20 2018 -0700
@@ -404,7 +404,7 @@
   /* need to define them to "float" or "double" when experimenting with   */
   /* new algorithms                                                       */
 
-  typedef long  TPos;     /* sub-pixel coordinate              */
+  typedef long  TPos;     /* subpixel coordinate               */
   typedef int   TCoord;   /* integer scanline/pixel coordinate */
   typedef int   TArea;    /* cell areas, coordinate products   */
 
--- a/src/java.desktop/share/native/libfreetype/src/truetype/ttgload.c	Fri Jun 01 09:38:08 2018 -0700
+++ b/src/java.desktop/share/native/libfreetype/src/truetype/ttgload.c	Mon Jun 04 10:54:20 2018 -0700
@@ -1219,7 +1219,7 @@
              * Theoretically, a glyph's bytecode can toggle ClearType's
              * `backward compatibility' mode, which would allow modification
              * of the advance width.  In reality, however, applications
-             * neither allow nor expect modified advance widths if sub-pixel
+             * neither allow nor expect modified advance widths if subpixel
              * rendering is active.
              *
              */
@@ -2709,6 +2709,10 @@
          ( load_flags & FT_LOAD_NO_BITMAP ) == 0 &&
          IS_DEFAULT_INSTANCE                     )
     {
+      FT_Fixed  x_scale = size->root.metrics.x_scale;
+      FT_Fixed  y_scale = size->root.metrics.y_scale;
+
+
       error = load_sbit_image( size, glyph, glyph_index, load_flags );
       if ( FT_ERR_EQ( error, Missing_Bitmap ) )
       {
@@ -2716,9 +2720,13 @@
         /* if we have a bitmap-only font, return an empty glyph            */
         if ( !FT_IS_SCALABLE( glyph->face ) )
         {
-          TT_Face    face = (TT_Face)glyph->face;
-          FT_Short   left_bearing = 0, top_bearing = 0;
-          FT_UShort  advance_width = 0, advance_height = 0;
+          TT_Face  face = (TT_Face)glyph->face;
+
+          FT_Short  left_bearing = 0;
+          FT_Short  top_bearing  = 0;
+
+          FT_UShort  advance_width  = 0;
+          FT_UShort  advance_height = 0;
 
 
           /* to return an empty glyph, however, we need metrics data   */
@@ -2744,13 +2752,13 @@
           glyph->metrics.width  = 0;
           glyph->metrics.height = 0;
 
-          glyph->metrics.horiBearingX = left_bearing;
+          glyph->metrics.horiBearingX = FT_MulFix( left_bearing, x_scale );
           glyph->metrics.horiBearingY = 0;
-          glyph->metrics.horiAdvance  = advance_width;
+          glyph->metrics.horiAdvance  = FT_MulFix( advance_width, x_scale );
 
           glyph->metrics.vertBearingX = 0;
-          glyph->metrics.vertBearingY = top_bearing;
-          glyph->metrics.vertAdvance  = advance_height;
+          glyph->metrics.vertBearingY = FT_MulFix( top_bearing, y_scale );
+          glyph->metrics.vertAdvance  = FT_MulFix( advance_height, y_scale );
 
           glyph->format            = FT_GLYPH_FORMAT_BITMAP;
           glyph->bitmap.pixel_mode = FT_PIXEL_MODE_MONO;
@@ -2781,13 +2789,11 @@
           /* sanity checks: if `xxxAdvance' in the sbit metric */
           /* structure isn't set, use `linearXXXAdvance'      */
           if ( !glyph->metrics.horiAdvance && glyph->linearHoriAdvance )
-            glyph->metrics.horiAdvance =
-              FT_MulFix( glyph->linearHoriAdvance,
-                         size->metrics->x_scale );
+            glyph->metrics.horiAdvance = FT_MulFix( glyph->linearHoriAdvance,
+                                                    x_scale );
           if ( !glyph->metrics.vertAdvance && glyph->linearVertAdvance )
-            glyph->metrics.vertAdvance =
-              FT_MulFix( glyph->linearVertAdvance,
-                         size->metrics->y_scale );
+            glyph->metrics.vertAdvance = FT_MulFix( glyph->linearVertAdvance,
+                                                    y_scale );
         }
 
         return FT_Err_Ok;
--- a/src/java.desktop/share/native/libfreetype/src/truetype/ttgxvar.c	Fri Jun 01 09:38:08 2018 -0700
+++ b/src/java.desktop/share/native/libfreetype/src/truetype/ttgxvar.c	Mon Jun 04 10:54:20 2018 -0700
@@ -1733,17 +1733,13 @@
     /* based on the [min,def,max] values for the axis to be [-1,0,1]. */
     /* Then, if there's an `avar' table, we renormalize this range.   */
 
-    FT_TRACE5(( "%d design coordinate%s:\n",
-                num_coords,
-                num_coords == 1 ? "" : "s" ));
-
     a = mmvar->axis;
     for ( i = 0; i < num_coords; i++, a++ )
     {
       FT_Fixed  coord = coords[i];
 
 
-      FT_TRACE5(( "  %.5f\n", coord / 65536.0 ));
+      FT_TRACE5(( "    %d: %.5f\n", i, coord / 65536.0 ));
       if ( coord > a->maximum || coord < a->minimum )
       {
         FT_TRACE1((
@@ -2043,12 +2039,15 @@
 
       FT_TRACE2(( "loaded\n" ));
 
-      FT_TRACE5(( "number of GX style axes: %d\n", fvar_head.axisCount ));
+      FT_TRACE5(( "%d variation ax%s\n",
+                  fvar_head.axisCount,
+                  fvar_head.axisCount == 1 ? "is" : "es" ));
 
       if ( FT_NEW( face->blend ) )
         goto Exit;
 
-      num_axes = fvar_head.axisCount;
+      num_axes              = fvar_head.axisCount;
+      face->blend->num_axis = num_axes;
     }
     else
       num_axes = face->blend->num_axis;
@@ -2142,6 +2141,10 @@
       {
         GX_FVar_Axis  axis_rec;
 
+#ifdef FT_DEBUG_LEVEL_TRACE
+        int  invalid = 0;
+#endif
+
 
         if ( FT_STREAM_READ_FIELDS( fvaraxis_fields, &axis_rec ) )
           goto Exit;
@@ -2162,22 +2165,31 @@
         if ( a->minimum > a->def ||
              a->def > a->maximum )
         {
-          FT_TRACE2(( "TT_Get_MM_Var:"
-                      " invalid \"%s\" axis record; disabling\n",
-                      a->name ));
-
           a->minimum = a->def;
           a->maximum = a->def;
+
+#ifdef FT_DEBUG_LEVEL_TRACE
+          invalid = 1;
+#endif
         }
 
-        FT_TRACE5(( "  \"%s\":"
-                    " minimum=%.5f, default=%.5f, maximum=%.5f,"
-                    " flags=0x%04X\n",
+#ifdef FT_DEBUG_LEVEL_TRACE
+        if ( i == 0 )
+          FT_TRACE5(( "  idx   tag  "
+                   /* "  XXX  `XXXX'" */
+                      "    minimum     default     maximum   flags\n" ));
+                   /* "  XXXX.XXXXX  XXXX.XXXXX  XXXX.XXXXX  0xXXXX" */
+
+        FT_TRACE5(( "  %3d  `%s'"
+                    "  %10.5f  %10.5f  %10.5f  0x%04X%s\n",
+                    i,
                     a->name,
                     a->minimum / 65536.0,
                     a->def / 65536.0,
                     a->maximum / 65536.0,
-                    *axis_flags ));
+                    *axis_flags,
+                    invalid ? " (invalid, disabled)" : "" ));
+#endif
 
         a++;
         axis_flags++;
@@ -2202,6 +2214,10 @@
           goto Exit;
       }
 
+      FT_TRACE5(( "%d instance%s\n",
+                  fvar_head.instanceCount,
+                  fvar_head.instanceCount == 1 ? "" : "s" ));
+
       ns  = mmvar->namedstyle;
       nsc = face->blend->normalized_stylecoords;
       for ( i = 0; i < fvar_head.instanceCount; i++, ns++ )
@@ -2224,6 +2240,52 @@
         else
           ns->psid = 0xFFFF;
 
+#ifdef FT_DEBUG_LEVEL_TRACE
+        {
+          SFNT_Service  sfnt = (SFNT_Service)face->sfnt;
+
+          FT_String*  strname = NULL;
+          FT_String*  psname  = NULL;
+
+          FT_ULong  pos;
+
+
+          pos = FT_STREAM_POS();
+
+          if ( ns->strid != 0xFFFF )
+          {
+            (void)sfnt->get_name( face,
+                                  (FT_UShort)ns->strid,
+                                  &strname );
+            if ( strname && !ft_strcmp( strname, ".notdef" ) )
+              strname = NULL;
+          }
+
+          if ( ns->psid != 0xFFFF )
+          {
+            (void)sfnt->get_name( face,
+                                  (FT_UShort)ns->psid,
+                                  &psname );
+            if ( psname && !ft_strcmp( psname, ".notdef" ) )
+              psname = NULL;
+          }
+
+          (void)FT_STREAM_SEEK( pos );
+
+          FT_TRACE5(( "  instance %d (%s%s%s, %s%s%s)\n",
+                      i,
+                      strname ? "name: `" : "",
+                      strname ? strname : "unnamed",
+                      strname ? "'" : "",
+                      psname ? "PS name: `" : "",
+                      psname ? psname : "no PS name",
+                      psname ? "'" : "" ));
+
+          FT_FREE( strname );
+          FT_FREE( psname );
+        }
+#endif /* FT_DEBUG_LEVEL_TRACE */
+
         ft_var_to_normalized( face, num_axes, ns->coords, nsc );
         nsc += num_axes;
 
@@ -2381,11 +2443,12 @@
       num_coords = mmvar->num_axis;
     }
 
-    FT_TRACE5(( "normalized design coordinates:\n" ));
+    FT_TRACE5(( "TT_Set_MM_Blend:\n"
+                "  normalized design coordinates:\n" ));
 
     for ( i = 0; i < num_coords; i++ )
     {
-      FT_TRACE5(( "  %.5f\n", coords[i] / 65536.0 ));
+      FT_TRACE5(( "    %.5f\n", coords[i] / 65536.0 ));
       if ( coords[i] < -0x00010000L || coords[i] > 0x00010000L )
       {
         FT_TRACE1(( "TT_Set_MM_Blend: normalized design coordinate %.5f\n"
@@ -2761,8 +2824,9 @@
       }
     }
 
-    /* return value -1 indicates `no change' */
-    if ( !have_diff )
+    /* return value -1 indicates `no change';                      */
+    /* we can exit early if `normalizedcoords' is already computed */
+    if ( blend->normalizedcoords && !have_diff )
       return -1;
 
     if ( FT_NEW_ARRAY( normalized, mmvar->num_axis ) )
@@ -2771,6 +2835,8 @@
     if ( !face->blend->avar_loaded )
       ft_var_load_avar( face );
 
+    FT_TRACE5(( "TT_Set_Var_Design:\n"
+                "  normalized design coordinates:\n" ));
     ft_var_to_normalized( face, num_coords, blend->coords, normalized );
 
     error = tt_set_mm_blend( face, mmvar->num_axis, normalized, 0 );
--- a/src/java.desktop/share/native/libfreetype/src/truetype/ttinterp.c	Fri Jun 01 09:38:08 2018 -0700
+++ b/src/java.desktop/share/native/libfreetype/src/truetype/ttinterp.c	Mon Jun 04 10:54:20 2018 -0700
@@ -2165,7 +2165,7 @@
       val = ADD_LONG( distance,
                       exc->threshold - exc->phase + compensation ) &
               -exc->period;
-      val += exc->phase;
+      val = ADD_LONG( val, exc->phase );
       if ( val < 0 )
         val = exc->phase;
     }
@@ -2174,7 +2174,7 @@
       val = NEG_LONG( SUB_LONG( exc->threshold - exc->phase + compensation,
                                 distance ) &
                         -exc->period );
-      val -= exc->phase;
+      val = SUB_LONG( val, exc->phase );
       if ( val > 0 )
         val = -exc->phase;
     }
@@ -2216,7 +2216,7 @@
       val = ( ADD_LONG( distance,
                         exc->threshold - exc->phase + compensation ) /
                 exc->period ) * exc->period;
-      val += exc->phase;
+      val = ADD_LONG( val, exc->phase );
       if ( val < 0 )
         val = exc->phase;
     }
@@ -2225,7 +2225,7 @@
       val = NEG_LONG( ( SUB_LONG( exc->threshold - exc->phase + compensation,
                                   distance ) /
                           exc->period ) * exc->period );
-      val -= exc->phase;
+      val = SUB_LONG( val, exc->phase );
       if ( val > 0 )
         val = -exc->phase;
     }
@@ -2954,7 +2954,7 @@
   static void
   Ins_CEILING( FT_Long*  args )
   {
-    args[0] = FT_PIX_CEIL( args[0] );
+    args[0] = FT_PIX_CEIL_LONG( args[0] );
   }
 
 
@@ -3289,7 +3289,10 @@
     if ( args[0] < 0 )
       exc->error = FT_THROW( Bad_Argument );
     else
-      exc->GS.loop = args[0];
+    {
+      /* we heuristically limit the number of loops to 16 bits */
+      exc->GS.loop = args[0] > 0xFFFFL ? 0xFFFFL : args[0];
+    }
   }
 
 
@@ -5782,6 +5785,7 @@
     FT_F26Dot6  distance;
 #ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
     FT_F26Dot6  control_value_cutin = 0;
+    FT_F26Dot6  delta;
 
 
     if ( SUBPIXEL_HINTING_INFINALITY )
@@ -5817,11 +5821,15 @@
     distance = PROJECT( exc->zp1.cur + point, exc->zp0.cur + exc->GS.rp0 );
 
 #ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
+    delta = SUB_LONG( distance, args[1] );
+    if ( delta < 0 )
+      delta = NEG_LONG( delta );
+
     /* subpixel hinting - make MSIRP respect CVT cut-in; */
-    if ( SUBPIXEL_HINTING_INFINALITY                                    &&
-         exc->ignore_x_mode                                             &&
-         exc->GS.freeVector.x != 0                                      &&
-         FT_ABS( SUB_LONG( distance, args[1] ) ) >= control_value_cutin )
+    if ( SUBPIXEL_HINTING_INFINALITY  &&
+         exc->ignore_x_mode           &&
+         exc->GS.freeVector.x != 0    &&
+         delta >= control_value_cutin )
       distance = args[1];
 #endif /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */
 
@@ -5869,16 +5877,18 @@
       if ( SUBPIXEL_HINTING_INFINALITY &&
            exc->ignore_x_mode          &&
            exc->GS.freeVector.x != 0   )
-        distance = Round_None(
-                     exc,
-                     cur_dist,
-                     exc->tt_metrics.compensations[0] ) - cur_dist;
+        distance = SUB_LONG(
+                     Round_None( exc,
+                                 cur_dist,
+                                 exc->tt_metrics.compensations[0] ),
+                     cur_dist );
       else
 #endif
-        distance = exc->func_round(
-                     exc,
-                     cur_dist,
-                     exc->tt_metrics.compensations[0] ) - cur_dist;
+        distance = SUB_LONG(
+                     exc->func_round( exc,
+                                      cur_dist,
+                                      exc->tt_metrics.compensations[0] ),
+                     cur_dist );
     }
     else
       distance = 0;
@@ -5978,7 +5988,14 @@
 
     if ( ( exc->opcode & 1 ) != 0 )   /* rounding and control cut-in flag */
     {
-      if ( FT_ABS( distance - org_dist ) > control_value_cutin )
+      FT_F26Dot6  delta;
+
+
+      delta = SUB_LONG( distance, org_dist );
+      if ( delta < 0 )
+        delta = NEG_LONG( delta );
+
+      if ( delta > control_value_cutin )
         distance = org_dist;
 
 #ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
@@ -6176,7 +6193,7 @@
     minimum_distance    = exc->GS.minimum_distance;
     control_value_cutin = exc->GS.control_value_cutin;
     point               = (FT_UShort)args[0];
-    cvtEntry            = (FT_ULong)( args[1] + 1 );
+    cvtEntry            = (FT_ULong)( ADD_LONG( args[1], 1 ) );
 
 #ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
     if ( SUBPIXEL_HINTING_INFINALITY                        &&
@@ -6259,6 +6276,9 @@
 
       if ( exc->GS.gep0 == exc->GS.gep1 )
       {
+        FT_F26Dot6  delta;
+
+
         /* XXX: According to Greg Hitchcock, the following wording is */
         /*      the right one:                                        */
         /*                                                            */
@@ -6271,7 +6291,11 @@
         /*      `ttinst2.doc', version 1.66, is thus incorrect since  */
         /*      it implies `>=' instead of `>'.                       */
 
-        if ( FT_ABS( cvt_dist - org_dist ) > control_value_cutin )
+        delta = SUB_LONG( cvt_dist, org_dist );
+        if ( delta < 0 )
+          delta = NEG_LONG( delta );
+
+        if ( delta > control_value_cutin )
           cvt_dist = org_dist;
       }
 
@@ -6289,7 +6313,14 @@
            exc->ignore_x_mode           &&
            exc->GS.gep0 == exc->GS.gep1 )
       {
-        if ( FT_ABS( cvt_dist - org_dist ) > control_value_cutin )
+        FT_F26Dot6  delta;
+
+
+        delta = SUB_LONG( cvt_dist, org_dist );
+        if ( delta < 0 )
+          delta = NEG_LONG( delta );
+
+        if ( delta > control_value_cutin )
           cvt_dist = org_dist;
       }
 #endif /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */
@@ -7532,8 +7563,16 @@
       return;
     }
 
-    for ( i = 0; i < num_axes; i++ )
-      args[i] = coords[i] >> 2; /* convert 16.16 to 2.14 format */
+    if ( coords )
+    {
+      for ( i = 0; i < num_axes; i++ )
+        args[i] = coords[i] >> 2; /* convert 16.16 to 2.14 format */
+    }
+    else
+    {
+      for ( i = 0; i < num_axes; i++ )
+        args[i] = 0;
+    }
   }
 
 
@@ -8487,8 +8526,8 @@
 
   LNo_Error_:
     FT_TRACE4(( "  %d instruction%s executed\n",
-                ins_counter == 1 ? "" : "s",
-                ins_counter ));
+                ins_counter,
+                ins_counter == 1 ? "" : "s" ));
     return FT_Err_Ok;
 
   LErrorCodeOverflow_:
--- a/src/java.desktop/share/native/libfreetype/src/truetype/ttobjs.c	Fri Jun 01 09:38:08 2018 -0700
+++ b/src/java.desktop/share/native/libfreetype/src/truetype/ttobjs.c	Mon Jun 04 10:54:20 2018 -0700
@@ -147,7 +147,7 @@
   {
 
 #define TRICK_NAMES_MAX_CHARACTERS  19
-#define TRICK_NAMES_COUNT           23
+#define TRICK_NAMES_COUNT           26
 
     static const char trick_names[TRICK_NAMES_COUNT]
                                  [TRICK_NAMES_MAX_CHARACTERS + 1] =
@@ -167,12 +167,15 @@
       "DFGirl-W6-WIN-BF",   /* dftt-h6.ttf; version 1.00, 1993 */
       "DFGothic-EB",        /* DynaLab Inc. 1992-1995 */
       "DFGyoSho-Lt",        /* DynaLab Inc. 1992-1995 */
+      "DFHei-Md-HK-BF",     /* maybe DynaLab Inc. */
       "DFHSGothic-W5",      /* DynaLab Inc. 1992-1995 */
       "DFHSMincho-W3",      /* DynaLab Inc. 1992-1995 */
       "DFHSMincho-W7",      /* DynaLab Inc. 1992-1995 */
       "DFKaiSho-SB",        /* dfkaisb.ttf */
       "DFKaiShu",
+      "DFKaiShu-Md-HK-BF",  /* maybe DynaLab Inc. */
       "DFKai-SB",           /* kaiu.ttf; version 3.00, 1998 [DFKaiShu-SB-Estd-BF] */
+      "DFMing-Bd-HK-BF",    /* maybe DynaLab Inc. */
       "DLC",                /* dftt-m7.ttf; version 1.00, 1993 [DLCMingBold] */
                             /* dftt-f5.ttf; version 1.00, 1993 [DLCFongSung] */
       "DLCHayMedium",       /* dftt-b5.ttf; version 1.00, 1993 */
@@ -270,7 +273,7 @@
   tt_check_trickyness_sfnt_ids( TT_Face  face )
   {
 #define TRICK_SFNT_IDS_PER_FACE   3
-#define TRICK_SFNT_IDS_NUM_FACES  26
+#define TRICK_SFNT_IDS_NUM_FACES  29
 
     static const tt_sfnt_id_rec sfnt_id[TRICK_SFNT_IDS_NUM_FACES]
                                        [TRICK_SFNT_IDS_PER_FACE] = {
@@ -299,6 +302,11 @@
         { 0xCE5956E9UL, 0x0000BC85UL }, /* fpgm */
         { 0x8272F416UL, 0x00000045UL }  /* prep */
       },
+      { /* DFHei-Md-HK-BF */
+        { 0x1257EB46UL, 0x00000350UL }, /* cvt  */
+        { 0xF699D160UL, 0x0000715FUL }, /* fpgm */
+        { 0xD222F568UL, 0x000003BCUL }  /* prep */
+      },
       { /* DFHSGothic-W5 */
         { 0x1262EB4EUL, 0x00000350UL }, /* cvt  */
         { 0xE86A5D64UL, 0x00007940UL }, /* fpgm */
@@ -324,6 +332,16 @@
         { 0xA6E78C01UL, 0x00008998UL }, /* fpgm */
         { 0x13A42602UL, 0x0000007EUL }  /* prep */
       },
+      { /* DFKaiShu-Md-HK-BF */
+        { 0x11E5EAD4UL, 0x00000360UL }, /* cvt  */
+        { 0x9DB282B2UL, 0x0000C06EUL }, /* fpgm */
+        { 0x53E6D7CAUL, 0x00000082UL }  /* prep */
+      },
+      { /* DFMing-Bd-HK-BF */
+        { 0x1243EB18UL, 0x00000350UL }, /* cvt  */
+        { 0xBA0A8C30UL, 0x000074ADUL }, /* fpgm */
+        { 0xF3D83409UL, 0x0000037BUL }  /* prep */
+      },
       { /* DLCLiShu */
         { 0x07DCF546UL, 0x00000308UL }, /* cvt  */
         { 0x40FE7C90UL, 0x00008E2AUL }, /* fpgm */
--- a/src/java.desktop/share/native/libfreetype/src/type1/t1load.c	Fri Jun 01 09:38:08 2018 -0700
+++ b/src/java.desktop/share/native/libfreetype/src/type1/t1load.c	Mon Jun 04 10:54:20 2018 -0700
@@ -2493,6 +2493,24 @@
       type1->encoding.num_chars  = loader.num_chars;
     }
 
+    /* some sanitizing to avoid overflows later on; */
+    /* the upper limits are ad-hoc values           */
+    if ( priv->blue_shift > 1000 || priv->blue_shift < 0 )
+    {
+      FT_TRACE2(( "T1_Open_Face:"
+                  " setting unlikely BlueShift value %d to default (7)\n",
+                  priv->blue_shift ));
+      priv->blue_shift = 7;
+    }
+
+    if ( priv->blue_fuzz > 1000 || priv->blue_fuzz < 0 )
+    {
+      FT_TRACE2(( "T1_Open_Face:"
+                  " setting unlikely BlueFuzz value %d to default (1)\n",
+                  priv->blue_fuzz ));
+      priv->blue_fuzz = 1;
+    }
+
   Exit:
     t1_done_loader( &loader );
     return error;