From 58f56950848bae9c90da3873090c7698e0128b12 Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Wed, 14 Aug 2019 11:13:36 +0200 Subject: Update bundled Freetype to 2.10.1 [ChangeLog][Freetype] Upgraded bundled Freetype version to 2.10.1. Fixes: QTBUG-77466 Change-Id: I1de8b8b03e0ffd0b17eeafff1017df7c638c9279 Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/3rdparty/freetype/src/pshinter/Jamfile | 2 +- src/3rdparty/freetype/src/pshinter/module.mk | 2 +- src/3rdparty/freetype/src/pshinter/pshalgo.c | 50 ++++++++++---------- src/3rdparty/freetype/src/pshinter/pshalgo.h | 32 ++++++------- src/3rdparty/freetype/src/pshinter/pshglob.c | 39 +++++++-------- src/3rdparty/freetype/src/pshinter/pshglob.h | 68 +++++++++++++-------------- src/3rdparty/freetype/src/pshinter/pshinter.c | 33 +++++++------ src/3rdparty/freetype/src/pshinter/pshmod.c | 35 +++++++------- src/3rdparty/freetype/src/pshinter/pshmod.h | 32 ++++++------- src/3rdparty/freetype/src/pshinter/pshnterr.h | 46 +++++++++--------- src/3rdparty/freetype/src/pshinter/pshrec.c | 38 +++++++-------- src/3rdparty/freetype/src/pshinter/pshrec.h | 56 +++++++++++----------- src/3rdparty/freetype/src/pshinter/rules.mk | 3 +- 13 files changed, 217 insertions(+), 219 deletions(-) (limited to 'src/3rdparty/freetype/src/pshinter') diff --git a/src/3rdparty/freetype/src/pshinter/Jamfile b/src/3rdparty/freetype/src/pshinter/Jamfile index 3f5f0ae40e..0e44c19148 100644 --- a/src/3rdparty/freetype/src/pshinter/Jamfile +++ b/src/3rdparty/freetype/src/pshinter/Jamfile @@ -1,6 +1,6 @@ # FreeType 2 src/pshinter Jamfile # -# Copyright 2001-2018 by +# Copyright (C) 2001-2019 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/src/3rdparty/freetype/src/pshinter/module.mk b/src/3rdparty/freetype/src/pshinter/module.mk index 06707be3b4..0a12a260e1 100644 --- a/src/3rdparty/freetype/src/pshinter/module.mk +++ b/src/3rdparty/freetype/src/pshinter/module.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2018 by +# Copyright (C) 1996-2019 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/src/3rdparty/freetype/src/pshinter/pshalgo.c b/src/3rdparty/freetype/src/pshinter/pshalgo.c index b98077c62e..0c5ae62699 100644 --- a/src/3rdparty/freetype/src/pshinter/pshalgo.c +++ b/src/3rdparty/freetype/src/pshinter/pshalgo.c @@ -1,19 +1,19 @@ -/***************************************************************************/ -/* */ -/* pshalgo.c */ -/* */ -/* PostScript hinting algorithm (body). */ -/* */ -/* Copyright 2001-2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used */ -/* modified and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ +/**************************************************************************** + * + * pshalgo.c + * + * PostScript hinting algorithm (body). + * + * Copyright (C) 2001-2019 by + * David Turner, Robert Wilhelm, and Werner Lemberg. + * + * This file is part of the FreeType project, and may only be used + * modified and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + */ #include @@ -26,7 +26,7 @@ #undef FT_COMPONENT -#define FT_COMPONENT trace_pshalgo +#define FT_COMPONENT pshalgo #ifdef DEBUG_HINTER @@ -53,8 +53,8 @@ psh_hint_overlap( PSH_Hint hint1, PSH_Hint hint2 ) { - return hint1->org_pos + hint1->org_len >= hint2->org_pos && - hint2->org_pos + hint2->org_len >= hint1->org_pos; + return ADD_INT( hint1->org_pos, hint1->org_len ) >= hint2->org_pos && + ADD_INT( hint2->org_pos, hint2->org_len ) >= hint1->org_pos; } @@ -479,7 +479,7 @@ if ( dimension == 1 ) psh_blues_snap_stem( &globals->blues, - hint->org_pos + hint->org_len, + ADD_INT( hint->org_pos, hint->org_len ), hint->org_pos, &align ); @@ -658,8 +658,8 @@ #if 0 /* not used for now, experimental */ /* - * A variant to perform "light" hinting (i.e. FT_RENDER_MODE_LIGHT) - * of stems + * A variant to perform "light" hinting (i.e. FT_RENDER_MODE_LIGHT) + * of stems */ static void psh_hint_align_light( PSH_Hint hint, @@ -703,7 +703,7 @@ if ( dimension == 1 ) psh_blues_snap_stem( &globals->blues, - hint->org_pos + hint->org_len, + ADD_INT( hint->org_pos, hint->org_len ), hint->org_pos, &align ); @@ -1538,8 +1538,8 @@ PSH_Hint hint = sort[nn]; - if ( org_u >= hint->org_pos && - org_u <= hint->org_pos + hint->org_len ) + if ( org_u >= hint->org_pos && + org_u <= ADD_INT( hint->org_pos, hint->org_len ) ) { point->hint = hint; break; diff --git a/src/3rdparty/freetype/src/pshinter/pshalgo.h b/src/3rdparty/freetype/src/pshinter/pshalgo.h index c50683fbec..6859e95cd2 100644 --- a/src/3rdparty/freetype/src/pshinter/pshalgo.h +++ b/src/3rdparty/freetype/src/pshinter/pshalgo.h @@ -1,19 +1,19 @@ -/***************************************************************************/ -/* */ -/* pshalgo.h */ -/* */ -/* PostScript hinting algorithm (specification). */ -/* */ -/* Copyright 2001-2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ +/**************************************************************************** + * + * pshalgo.h + * + * PostScript hinting algorithm (specification). + * + * Copyright (C) 2001-2019 by + * David Turner, Robert Wilhelm, and Werner Lemberg. + * + * This file is part of the FreeType project, and may only be used, + * modified, and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + */ #ifndef PSHALGO_H_ diff --git a/src/3rdparty/freetype/src/pshinter/pshglob.c b/src/3rdparty/freetype/src/pshinter/pshglob.c index accc04921d..b021e6e42a 100644 --- a/src/3rdparty/freetype/src/pshinter/pshglob.c +++ b/src/3rdparty/freetype/src/pshinter/pshglob.c @@ -1,25 +1,26 @@ -/***************************************************************************/ -/* */ -/* pshglob.c */ -/* */ -/* PostScript hinter global hinting management (body). */ -/* Inspired by the new auto-hinter module. */ -/* */ -/* Copyright 2001-2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used */ -/* modified and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ +/**************************************************************************** + * + * pshglob.c + * + * PostScript hinter global hinting management (body). + * Inspired by the new auto-hinter module. + * + * Copyright (C) 2001-2019 by + * David Turner, Robert Wilhelm, and Werner Lemberg. + * + * This file is part of the FreeType project, and may only be used + * modified and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + */ #include #include FT_FREETYPE_H #include FT_INTERNAL_OBJECTS_H +#include FT_INTERNAL_CALC_H #include "pshglob.h" #ifdef DEBUG_HINTER @@ -568,7 +569,7 @@ for ( ; count > 0; count--, zone++ ) { - delta = stem_top - zone->org_bottom; + delta = SUB_LONG( stem_top, zone->org_bottom ); if ( delta < -blues->blue_fuzz ) break; @@ -590,7 +591,7 @@ for ( ; count > 0; count--, zone-- ) { - delta = zone->org_top - stem_bot; + delta = SUB_LONG( zone->org_top, stem_bot ); if ( delta < -blues->blue_fuzz ) break; diff --git a/src/3rdparty/freetype/src/pshinter/pshglob.h b/src/3rdparty/freetype/src/pshinter/pshglob.h index cf80bf40e6..0049d4c0bc 100644 --- a/src/3rdparty/freetype/src/pshinter/pshglob.h +++ b/src/3rdparty/freetype/src/pshinter/pshglob.h @@ -1,19 +1,19 @@ -/***************************************************************************/ -/* */ -/* pshglob.h */ -/* */ -/* PostScript hinter global hinting management. */ -/* */ -/* Copyright 2001-2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ +/**************************************************************************** + * + * pshglob.h + * + * PostScript hinter global hinting management. + * + * Copyright (C) 2001-2019 by + * David Turner, Robert Wilhelm, and Werner Lemberg. + * + * This file is part of the FreeType project, and may only be used, + * modified, and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + */ #ifndef PSHGLOB_H_ @@ -36,27 +36,27 @@ FT_BEGIN_HEADER /*************************************************************************/ - /*************************************************************************/ - /* */ - /* @constant: */ - /* PS_GLOBALS_MAX_BLUE_ZONES */ - /* */ - /* @description: */ - /* The maximum number of blue zones in a font global hints structure. */ - /* See @PS_Globals_BluesRec. */ - /* */ + /************************************************************************** + * + * @constant: + * PS_GLOBALS_MAX_BLUE_ZONES + * + * @description: + * The maximum number of blue zones in a font global hints structure. + * See @PS_Globals_BluesRec. + */ #define PS_GLOBALS_MAX_BLUE_ZONES 16 - /*************************************************************************/ - /* */ - /* @constant: */ - /* PS_GLOBALS_MAX_STD_WIDTHS */ - /* */ - /* @description: */ - /* The maximum number of standard and snap widths in either the */ - /* horizontal or vertical direction. See @PS_Globals_WidthsRec. */ - /* */ + /************************************************************************** + * + * @constant: + * PS_GLOBALS_MAX_STD_WIDTHS + * + * @description: + * The maximum number of standard and snap widths in either the + * horizontal or vertical direction. See @PS_Globals_WidthsRec. + */ #define PS_GLOBALS_MAX_STD_WIDTHS 16 diff --git a/src/3rdparty/freetype/src/pshinter/pshinter.c b/src/3rdparty/freetype/src/pshinter/pshinter.c index 0eedac452d..16c3a0a117 100644 --- a/src/3rdparty/freetype/src/pshinter/pshinter.c +++ b/src/3rdparty/freetype/src/pshinter/pshinter.c @@ -1,19 +1,19 @@ -/***************************************************************************/ -/* */ -/* pshinter.c */ -/* */ -/* FreeType PostScript Hinting module */ -/* */ -/* Copyright 2001-2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ +/**************************************************************************** + * + * pshinter.c + * + * FreeType PostScript Hinting module + * + * Copyright (C) 2001-2019 by + * David Turner, Robert Wilhelm, and Werner Lemberg. + * + * This file is part of the FreeType project, and may only be used, + * modified, and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + */ #define FT_MAKE_OPTION_SINGLE_OBJECT @@ -22,7 +22,6 @@ #include "pshalgo.c" #include "pshglob.c" #include "pshmod.c" -#include "pshpic.c" #include "pshrec.c" diff --git a/src/3rdparty/freetype/src/pshinter/pshmod.c b/src/3rdparty/freetype/src/pshinter/pshmod.c index 0b8f6f99b8..2d36ea2a6a 100644 --- a/src/3rdparty/freetype/src/pshinter/pshmod.c +++ b/src/3rdparty/freetype/src/pshinter/pshmod.c @@ -1,26 +1,25 @@ -/***************************************************************************/ -/* */ -/* pshmod.c */ -/* */ -/* FreeType PostScript hinter module implementation (body). */ -/* */ -/* Copyright 2001-2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ +/**************************************************************************** + * + * pshmod.c + * + * FreeType PostScript hinter module implementation (body). + * + * Copyright (C) 2001-2019 by + * David Turner, Robert Wilhelm, and Werner Lemberg. + * + * This file is part of the FreeType project, and may only be used, + * modified, and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + */ #include #include FT_INTERNAL_OBJECTS_H #include "pshrec.h" #include "pshalgo.h" -#include "pshpic.h" /* the Postscript Hinter module structure */ @@ -111,7 +110,7 @@ 0x10000L, 0x20000L, - &PSHINTER_INTERFACE_GET, /* module-specific interface */ + &pshinter_interface, /* module-specific interface */ (FT_Module_Constructor)ps_hinter_init, /* module_init */ (FT_Module_Destructor) ps_hinter_done, /* module_done */ diff --git a/src/3rdparty/freetype/src/pshinter/pshmod.h b/src/3rdparty/freetype/src/pshinter/pshmod.h index 556de2fbc0..ea8771308a 100644 --- a/src/3rdparty/freetype/src/pshinter/pshmod.h +++ b/src/3rdparty/freetype/src/pshinter/pshmod.h @@ -1,19 +1,19 @@ -/***************************************************************************/ -/* */ -/* pshmod.h */ -/* */ -/* PostScript hinter module interface (specification). */ -/* */ -/* Copyright 2001-2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ +/**************************************************************************** + * + * pshmod.h + * + * PostScript hinter module interface (specification). + * + * Copyright (C) 2001-2019 by + * David Turner, Robert Wilhelm, and Werner Lemberg. + * + * This file is part of the FreeType project, and may only be used, + * modified, and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + */ #ifndef PSHMOD_H_ diff --git a/src/3rdparty/freetype/src/pshinter/pshnterr.h b/src/3rdparty/freetype/src/pshinter/pshnterr.h index b9d02d2956..fb9dbca2b1 100644 --- a/src/3rdparty/freetype/src/pshinter/pshnterr.h +++ b/src/3rdparty/freetype/src/pshinter/pshnterr.h @@ -1,26 +1,26 @@ -/***************************************************************************/ -/* */ -/* pshnterr.h */ -/* */ -/* PS Hinter error codes (specification only). */ -/* */ -/* Copyright 2003-2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - - /*************************************************************************/ - /* */ - /* This file is used to define the PSHinter error enumeration constants. */ - /* */ - /*************************************************************************/ +/**************************************************************************** + * + * pshnterr.h + * + * PS Hinter error codes (specification only). + * + * Copyright (C) 2003-2019 by + * David Turner, Robert Wilhelm, and Werner Lemberg. + * + * This file is part of the FreeType project, and may only be used, + * modified, and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + */ + + + /************************************************************************** + * + * This file is used to define the PSHinter error enumeration constants. + * + */ #ifndef PSHNTERR_H_ #define PSHNTERR_H_ diff --git a/src/3rdparty/freetype/src/pshinter/pshrec.c b/src/3rdparty/freetype/src/pshinter/pshrec.c index 6648d13d60..9dd09efe4c 100644 --- a/src/3rdparty/freetype/src/pshinter/pshrec.c +++ b/src/3rdparty/freetype/src/pshinter/pshrec.c @@ -1,19 +1,19 @@ -/***************************************************************************/ -/* */ -/* pshrec.c */ -/* */ -/* FreeType PostScript hints recorder (body). */ -/* */ -/* Copyright 2001-2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ +/**************************************************************************** + * + * pshrec.c + * + * FreeType PostScript hints recorder (body). + * + * Copyright (C) 2001-2019 by + * David Turner, Robert Wilhelm, and Werner Lemberg. + * + * This file is part of the FreeType project, and may only be used, + * modified, and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + */ #include @@ -28,7 +28,7 @@ #include "pshnterr.h" #undef FT_COMPONENT -#define FT_COMPONENT trace_pshrec +#define FT_COMPONENT pshrec #ifdef DEBUG_HINTER PS_Hints ps_debug_hints = NULL; @@ -666,7 +666,7 @@ if ( len == -21 ) { flags |= PS_HINT_FLAG_BOTTOM; - pos += len; + pos = ADD_INT( pos, len ); } len = 0; } @@ -1187,7 +1187,7 @@ /* compute integer stem positions in font units */ for ( n = 0; n < count * 2; n++ ) { - y += coords[n]; + y = ADD_LONG( y, coords[n] ); stems[n] = FIXED_TO_INT( y ); } diff --git a/src/3rdparty/freetype/src/pshinter/pshrec.h b/src/3rdparty/freetype/src/pshinter/pshrec.h index 7e3dfe0d53..02cc2102ec 100644 --- a/src/3rdparty/freetype/src/pshinter/pshrec.h +++ b/src/3rdparty/freetype/src/pshinter/pshrec.h @@ -1,31 +1,31 @@ -/***************************************************************************/ -/* */ -/* pshrec.h */ -/* */ -/* Postscript (Type1/Type2) hints recorder (specification). */ -/* */ -/* Copyright 2001-2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - - /**************************************************************************/ - /* */ - /* The functions defined here are called from the Type 1, CID and CFF */ - /* font drivers to record the hints of a given character/glyph. */ - /* */ - /* The hints are recorded in a unified format, and are later processed */ - /* by the `optimizer' and `fitter' to adjust the outlines to the pixel */ - /* grid. */ - /* */ - /**************************************************************************/ +/**************************************************************************** + * + * pshrec.h + * + * Postscript (Type1/Type2) hints recorder (specification). + * + * Copyright (C) 2001-2019 by + * David Turner, Robert Wilhelm, and Werner Lemberg. + * + * This file is part of the FreeType project, and may only be used, + * modified, and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + */ + + + /*************************************************************************** + * + * The functions defined here are called from the Type 1, CID and CFF + * font drivers to record the hints of a given character/glyph. + * + * The hints are recorded in a unified format, and are later processed + * by the `optimizer' and `fitter' to adjust the outlines to the pixel + * grid. + * + */ #ifndef PSHREC_H_ diff --git a/src/3rdparty/freetype/src/pshinter/rules.mk b/src/3rdparty/freetype/src/pshinter/rules.mk index 966690efc2..58227d10f2 100644 --- a/src/3rdparty/freetype/src/pshinter/rules.mk +++ b/src/3rdparty/freetype/src/pshinter/rules.mk @@ -3,7 +3,7 @@ # -# Copyright 2001-2018 by +# Copyright (C) 2001-2019 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -31,7 +31,6 @@ PSHINTER_COMPILE := $(CC) $(ANSIFLAGS) \ PSHINTER_DRV_SRC := $(PSHINTER_DIR)/pshalgo.c \ $(PSHINTER_DIR)/pshglob.c \ $(PSHINTER_DIR)/pshmod.c \ - $(PSHINTER_DIR)/pshpic.c \ $(PSHINTER_DIR)/pshrec.c -- cgit v1.2.3