Skip to content
Permalink
Browse files

8227324: Upgrade to freetype 2.10.1

Reviewed-by: serb, jdv
  • Loading branch information
Phil Race
Phil Race committed Nov 25, 2019
1 parent b690482 commit e14102a00e6344a17b48fb11e372b6887f59bf1c
Showing with 1,772 additions and 1,161 deletions.
  1. +104 −1 src/java.desktop/share/legal/freetype.md
  2. +11 −4 src/java.desktop/share/native/libfreetype/include/freetype/freetype.h
  3. +4 −0 src/java.desktop/share/native/libfreetype/include/freetype/fterrors.h
  4. +1 −1 src/java.desktop/share/native/libfreetype/include/freetype/ftglyph.h
  5. +7 −9 src/java.desktop/share/native/libfreetype/include/freetype/ftimage.h
  6. +1 −1 src/java.desktop/share/native/libfreetype/include/freetype/ftmodapi.h
  7. +4 −4 src/java.desktop/share/native/libfreetype/include/freetype/ftoutln.h
  8. +1 −1 src/java.desktop/share/native/libfreetype/include/freetype/internal/ftcalc.h
  9. +2 −4 src/java.desktop/share/native/libfreetype/include/freetype/internal/ftobjs.h
  10. +11 −0 src/java.desktop/share/native/libfreetype/include/freetype/internal/ftstream.h
  11. +1 −0 src/java.desktop/share/native/libfreetype/include/freetype/internal/fttrace.h
  12. +1 −0 src/java.desktop/share/native/libfreetype/include/freetype/internal/internal.h
  13. +4 −4 src/java.desktop/share/native/libfreetype/include/freetype/internal/psaux.h
  14. +2 −2 src/java.desktop/share/native/libfreetype/include/freetype/internal/services/svgldict.h
  15. +1 −0 src/java.desktop/share/native/libfreetype/include/freetype/internal/sfnt.h
  16. +2 −2 src/java.desktop/share/native/libfreetype/include/freetype/internal/t1types.h
  17. +5 −78 src/java.desktop/share/native/libfreetype/include/freetype/internal/tttypes.h
  18. +112 −0 src/java.desktop/share/native/libfreetype/include/freetype/internal/wofftypes.h
  19. +7 −0 src/java.desktop/share/native/libfreetype/src/autofit/afblue.c
  20. +10 −0 src/java.desktop/share/native/libfreetype/src/autofit/afblue.dat
  21. +71 −68 src/java.desktop/share/native/libfreetype/src/autofit/afblue.h
  22. +4 −1 src/java.desktop/share/native/libfreetype/src/autofit/afcjk.c
  23. +11 −0 src/java.desktop/share/native/libfreetype/src/autofit/afglobal.c
  24. +47 −11 src/java.desktop/share/native/libfreetype/src/autofit/aflatin.c
  25. +15 −0 src/java.desktop/share/native/libfreetype/src/autofit/afranges.c
  26. +6 −0 src/java.desktop/share/native/libfreetype/src/autofit/afscript.h
  27. +7 −0 src/java.desktop/share/native/libfreetype/src/autofit/afstyles.h
  28. +6 −6 src/java.desktop/share/native/libfreetype/src/base/ftbbox.c
  29. +11 −4 src/java.desktop/share/native/libfreetype/src/base/ftbitmap.c
  30. +3 −0 src/java.desktop/share/native/libfreetype/src/base/ftinit.c
  31. +6 −6 src/java.desktop/share/native/libfreetype/src/base/ftlcdfil.c
  32. +2 −2 src/java.desktop/share/native/libfreetype/src/base/ftobjs.c
  33. +11 −2 src/java.desktop/share/native/libfreetype/src/base/ftoutln.c
  34. +31 −25 src/java.desktop/share/native/libfreetype/src/base/ftstroke.c
  35. +2 −2 src/java.desktop/share/native/libfreetype/src/cff/cffdrivr.c
  36. +1 −1 src/java.desktop/share/native/libfreetype/src/cff/cffobjs.c
  37. +108 −47 src/java.desktop/share/native/libfreetype/src/cff/cffparse.c
  38. +13 −0 src/java.desktop/share/native/libfreetype/src/cff/cffparse.h
  39. +2 −1 src/java.desktop/share/native/libfreetype/src/psaux/afmparse.c
  40. +1 −2 src/java.desktop/share/native/libfreetype/src/psaux/psfixed.h
  41. +3 −3 src/java.desktop/share/native/libfreetype/src/psaux/psfont.c
  42. +4 −4 src/java.desktop/share/native/libfreetype/src/psaux/psobjs.c
  43. +4 −4 src/java.desktop/share/native/libfreetype/src/psaux/psobjs.h
  44. +39 −33 src/java.desktop/share/native/libfreetype/src/raster/ftraster.c
  45. +16 −2 src/java.desktop/share/native/libfreetype/src/sfnt/sfdriver.c
  46. +1 −398 src/java.desktop/share/native/libfreetype/src/sfnt/sfobjs.c
  47. +1 −1 src/java.desktop/share/native/libfreetype/src/sfnt/sfobjs.h
  48. +434 −0 src/java.desktop/share/native/libfreetype/src/sfnt/sfwoff.c
  49. +41 −0 src/java.desktop/share/native/libfreetype/src/sfnt/sfwoff.h
  50. +1 −4 src/java.desktop/share/native/libfreetype/src/sfnt/ttcmap.c
  51. +4 −2 src/java.desktop/share/native/libfreetype/src/sfnt/ttmtx.c
  52. +148 −151 src/java.desktop/share/native/libfreetype/src/smooth/ftgrays.c
  53. +1 −1 src/java.desktop/share/native/libfreetype/src/smooth/ftsmooth.c
  54. +90 −33 src/java.desktop/share/native/libfreetype/src/truetype/ttgload.c
  55. +70 −24 src/java.desktop/share/native/libfreetype/src/truetype/ttgxvar.c
  56. +1 −0 src/java.desktop/share/native/libfreetype/src/truetype/ttgxvar.h
  57. +221 −170 src/java.desktop/share/native/libfreetype/src/truetype/ttinterp.c
  58. +27 −18 src/java.desktop/share/native/libfreetype/src/truetype/ttobjs.c
  59. +3 −3 src/java.desktop/share/native/libfreetype/src/truetype/ttpload.c
  60. +2 −2 src/java.desktop/share/native/libfreetype/src/type1/t1driver.c
  61. +12 −19 src/java.desktop/share/native/libfreetype/src/type1/t1load.c
@@ -1,4 +1,4 @@
## The FreeType Project: Freetype v2.10.0
## The FreeType Project: Freetype v2.10.1


### FreeType Notice
@@ -533,5 +533,108 @@ consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.
#########################################################################
--- fthash.c and fthash.h are covered by the following notices ---
/*
* Copyright 2000 Computing Research Labs, New Mexico State University
* Copyright 2001-2015
* Francesco Zappa Nardelli
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE COMPUTING RESEARCH LAB OR NEW MEXICO STATE UNIVERSITY BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
* OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
* THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/**************************************************************************
*
* This file is based on code from bdf.c,v 1.22 2000/03/16 20:08:50
*
* taken from Mark Leisher's xmbdfed package
*
*/
--- FreeType 2 PSaux module is covered by the following notices ---
Copyright 2006-2014 Adobe Systems Incorporated.
This software, and all works of authorship, whether in source or
object code form as indicated by the copyright notice(s) included
herein (collectively, the "Work") is made available, and may only be
used, modified, and distributed under the FreeType Project License,
LICENSE.TXT. Additionally, subject to the terms and conditions of the
FreeType Project License, each contributor to the Work hereby grants
to any individual or legal entity exercising permissions granted by
the FreeType Project License and this section (hereafter, "You" or
"Your") a perpetual, worldwide, non-exclusive, no-charge,
royalty-free, irrevocable (except as stated in this section) patent
license to make, have made, use, offer to sell, sell, import, and
otherwise transfer the Work, where such license applies only to those
patent claims licensable by such contributor that are necessarily
infringed by their contribution(s) alone or by combination of their
contribution(s) with the Work to which such contribution(s) was
submitted. If You institute patent litigation against any entity
(including a cross-claim or counterclaim in a lawsuit) alleging that
the Work or a contribution incorporated within the Work constitutes
direct or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate as of
the date such litigation is filed.
By using, modifying, or distributing the Work you indicate that you
have read and understood the terms and conditions of the
FreeType Project License as well as those provided in this section,
and you accept them fully.
#########################################################################
--- FreeType 2 PSaux module is covered by the following notices ---
Copyright 2006-2014 Adobe Systems Incorporated.
This software, and all works of authorship, whether in source or
object code form as indicated by the copyright notice(s) included
herein (collectively, the "Work") is made available, and may only be
used, modified, and distributed under the FreeType Project License,
LICENSE.TXT. Additionally, subject to the terms and conditions of the
FreeType Project License, each contributor to the Work hereby grants
to any individual or legal entity exercising permissions granted by
the FreeType Project License and this section (hereafter, "You" or
"Your") a perpetual, worldwide, non-exclusive, no-charge,
royalty-free, irrevocable (except as stated in this section) patent
license to make, have made, use, offer to sell, sell, import, and
otherwise transfer the Work, where such license applies only to those
patent claims licensable by such contributor that are necessarily
infringed by their contribution(s) alone or by combination of their
contribution(s) with the Work to which such contribution(s) was
submitted. If You institute patent litigation against any entity
(including a cross-claim or counterclaim in a lawsuit) alleging that
the Work or a contribution incorporated within the Work constitutes
direct or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate as of
the date such litigation is filed.
By using, modifying, or distributing the Work you indicate that you
have read and understood the terms and conditions of the
FreeType Project License as well as those provided in this section,
and you accept them fully.
#########################################################################
```

@@ -645,7 +645,7 @@ FT_BEGIN_HEADER
* FT_ENCODING_MS_SYMBOL ::
* Microsoft Symbol encoding, used to encode mathematical symbols and
* wingdings. For more information, see
* 'https://www.microsoft.com/typography/otspec/recom.htm',
* 'https://www.microsoft.com/typography/otspec/recom.htm#non-standard-symbol-fonts',
* 'http://www.kostis.net/charsets/symbol.htm', and
* 'http://www.kostis.net/charsets/wingding.htm'.
*
@@ -1766,6 +1766,13 @@ FT_BEGIN_HEADER
* transformed, distorted, emboldened, etc. However, it must not be
* freed.
*
* [Since 2.10.1] If @FT_LOAD_NO_SCALE is set, outline coordinates of
* OpenType variation fonts for a selected instance are internally
* handled as 26.6 fractional font units but returned as (rounded)
* integers, as expected. To get unrounded font units, don't use
* @FT_LOAD_NO_SCALE but load the glyph with @FT_LOAD_NO_HINTING and
* scale it, using the font's `units_per_EM` value as the ppem.
*
* num_subglyphs ::
* The number of subglyphs in a composite glyph. This field is only
* valid for the composite glyph format that should normally only be
@@ -3932,8 +3939,8 @@ FT_BEGIN_HEADER
* The glyph index. 0~means 'undefined character code'.
*/
FT_EXPORT( FT_UInt )
FT_Get_Name_Index( FT_Face face,
FT_String* glyph_name );
FT_Get_Name_Index( FT_Face face,
const FT_String* glyph_name );


/**************************************************************************
@@ -4774,7 +4781,7 @@ FT_BEGIN_HEADER
*/
#define FREETYPE_MAJOR 2
#define FREETYPE_MINOR 10
#define FREETYPE_PATCH 0
#define FREETYPE_PATCH 1


/**************************************************************************
@@ -244,6 +244,8 @@
#define FT_ERR_PROTOS_DEFINED


FT_BEGIN_HEADER

/**************************************************************************
*
* @function:
@@ -274,6 +276,8 @@
FT_EXPORT( const char* )
FT_Error_String( FT_Error error_code );

FT_END_HEADER


#endif /* FT_ERR_PROTOS_DEFINED */

@@ -210,7 +210,7 @@ FT_BEGIN_HEADER
*
* As the outline is extracted from a glyph slot, its coordinates are
* expressed normally in 26.6 pixels, unless the flag @FT_LOAD_NO_SCALE
* was used in @FT_Load_Glyph() or @FT_Load_Char().
* was used in @FT_Load_Glyph or @FT_Load_Char.
*
* The outline's tables are always owned by the object and are destroyed
* with it.
@@ -869,7 +869,7 @@ FT_BEGIN_HEADER
*
* @input:
* y ::
* The scanline's y~coordinate.
* The scanline's upward y~coordinate.
*
* count ::
* The number of spans to draw on this scanline.
@@ -945,19 +945,16 @@ FT_BEGIN_HEADER
* This flag is set to indicate direct rendering. In this mode, client
* applications must provide their own span callback. This lets them
* directly draw or compose over an existing bitmap. If this bit is
* not set, the target pixmap's buffer _must_ be zeroed before
* rendering.
* _not_ set, the target pixmap's buffer _must_ be zeroed before
* rendering and the output will be clipped to its size.
*
* Direct rendering is only possible with anti-aliased glyphs.
*
* FT_RASTER_FLAG_CLIP ::
* This flag is only used in direct rendering mode. If set, the output
* will be clipped to a box specified in the `clip_box` field of the
* @FT_Raster_Params structure.
*
* Note that by default, the glyph bitmap is clipped to the target
* pixmap, except in direct rendering mode where all spans are
* generated if no clipping box is set.
* @FT_Raster_Params structure. Otherwise, the `clip_box` is
* effectively set to the bounding box and all spans are generated.
*/
#define FT_RASTER_FLAG_DEFAULT 0x0
#define FT_RASTER_FLAG_AA 0x1
@@ -978,7 +975,8 @@ FT_BEGIN_HEADER
* FT_Raster_Params
*
* @description:
* A structure to hold the arguments used by a raster's render function.
* A structure to hold the parameters used by a raster's render function,
* passed as an argument to @FT_Outline_Render.
*
* @fields:
* target ::
@@ -623,7 +623,7 @@ FT_BEGIN_HEADER
* it is bytecode interpreter's execution context, `TT_ExecContext`,
* which is declared in FreeType's internal header file `tttypes.h`.
*/
typedef void
typedef FT_Error
(*FT_DebugHook_Func)( void* arg );


@@ -466,8 +466,6 @@ FT_BEGIN_HEADER
*
* @description:
* Render an outline within a bitmap using the current scan-convert.
* This function uses an @FT_Raster_Params structure as an argument,
* allowing advanced features like direct composition, translucency, etc.
*
* @input:
* library ::
@@ -485,8 +483,10 @@ FT_BEGIN_HEADER
* FreeType error code. 0~means success.
*
* @note:
* You should know what you are doing and how @FT_Raster_Params works to
* use this function.
* This advanced function uses @FT_Raster_Params as an argument,
* allowing FreeType rasterizer to be used for direct composition,
* translucency, etc. You should know how to set up @FT_Raster_Params
* for this function to work.
*
* The field `params.source` will be set to `outline` before the scan
* converter is called, which means that the value you give to it is
@@ -378,14 +378,14 @@ FT_BEGIN_HEADER
#if FT_SIZEOF_INT == 4

#include <intrin.h>
#pragma intrinsic( _BitScanReverse )

static __inline FT_Int32
FT_MSB_i386( FT_UInt32 x )
{
unsigned long where;


/* not available in older VC versions */
_BitScanReverse( &where, x );

return (FT_Int32)where;
@@ -278,14 +278,12 @@ FT_BEGIN_HEADER
#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING

typedef void (*FT_Bitmap_LcdFilterFunc)( FT_Bitmap* bitmap,
FT_Render_Mode render_mode,
FT_Byte* weights );


/* This is the default LCD filter, an in-place, 5-tap FIR filter. */
FT_BASE( void )
ft_lcd_filter_fir( FT_Bitmap* bitmap,
FT_Render_Mode mode,
FT_LcdFiveTapFilter weights );

#endif /* FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
@@ -941,8 +939,8 @@ FT_BEGIN_HEADER
FT_UInt buffer_max );

typedef FT_UInt
(*FT_Face_GetGlyphNameIndexFunc)( FT_Face face,
FT_String* glyph_name );
(*FT_Face_GetGlyphNameIndexFunc)( FT_Face face,
const FT_String* glyph_name );


#ifndef FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM
@@ -165,6 +165,17 @@ FT_BEGIN_HEADER
#define FT_BYTE_U32( p, i, s ) ( FT_UINT32( FT_BYTE_( p, i ) ) << (s) )


/*
* function acts on increases does range for emits
* pointer checking frames error
* -------------------------------------------------------------------
* FT_PEEK_XXX buffer pointer no no no no
* FT_NEXT_XXX buffer pointer yes no no no
* FT_GET_XXX stream->cursor yes yes yes no
* FT_READ_XXX stream->pos yes yes no yes
*/


/*
* `FT_PEEK_XXX' are generic macros to get data from a buffer position. No
* safety checks are performed.
@@ -48,6 +48,7 @@ FT_TRACE_DEF( cache ) /* cache sub-system (ftcache.c, etc.) */
/* SFNT driver components */
FT_TRACE_DEF( sfdriver ) /* SFNT font driver (sfdriver.c) */
FT_TRACE_DEF( sfobjs ) /* SFNT object handler (sfobjs.c) */
FT_TRACE_DEF( sfwoff ) /* WOFF format handler (sfwoff.c) */
FT_TRACE_DEF( ttbdf ) /* TrueType embedded BDF (ttbdf.c) */
FT_TRACE_DEF( ttcmap ) /* charmap handler (ttcmap.c) */
FT_TRACE_DEF( ttcolr ) /* glyph layer table (ttcolr.c) */
@@ -40,6 +40,7 @@

#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>
@@ -96,10 +96,10 @@ FT_BEGIN_HEADER
(*done)( PS_Table table );

FT_Error
(*add)( PS_Table table,
FT_Int idx,
void* object,
FT_UInt length );
(*add)( PS_Table table,
FT_Int idx,
const void* object,
FT_UInt length );

void
(*release)( PS_Table table );
@@ -41,8 +41,8 @@ FT_BEGIN_HEADER
FT_UInt buffer_max );

typedef FT_UInt
(*FT_GlyphDict_NameIndexFunc)( FT_Face face,
FT_String* glyph_name );
(*FT_GlyphDict_NameIndexFunc)( FT_Face face,
const FT_String* glyph_name );


FT_DEFINE_SERVICE( GlyphDict )
@@ -23,6 +23,7 @@
#include <ft2build.h>
#include FT_INTERNAL_DRIVER_H
#include FT_INTERNAL_TRUETYPE_TYPES_H
#include FT_INTERNAL_WOFF_TYPES_H


FT_BEGIN_HEADER
@@ -76,8 +76,8 @@ FT_BEGIN_HEADER
FT_Int code_first;
FT_Int code_last;

FT_UShort* char_index;
FT_String** char_name;
FT_UShort* char_index;
const FT_String** char_name;

} T1_EncodingRec, *T1_Encoding;

0 comments on commit e14102a

Please sign in to comment.
You can’t perform that action at this time.