summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/freetype/src/pshinter
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2015-03-19 17:34:42 +0400
committerKonstantin Ritt <ritt.ks@gmail.com>2015-03-20 13:42:29 +0000
commit2eaf0cf8fd6e7c290497fedb08134a89e7b49b1d (patch)
tree0a4f7bf528e87d0b0a71ce7fccf702b87f4cdec1 /src/3rdparty/freetype/src/pshinter
parent77c518a50334d4dcf2476a4f39edc1e3990c7f0b (diff)
Update bundled FreeType to 2.5.5
Removed everything, imported with help of import_from_tarball.sh script, and then added a pre-generated builds/unix/ftconfig.h Task-number: QTBUG-44648 Change-Id: Iea948e41f7761f1580382b3763d04c7a61383382 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/3rdparty/freetype/src/pshinter')
-rw-r--r--src/3rdparty/freetype/src/pshinter/pshalgo.c32
-rw-r--r--src/3rdparty/freetype/src/pshinter/pshalgo.h11
-rw-r--r--src/3rdparty/freetype/src/pshinter/pshglob.c59
-rw-r--r--src/3rdparty/freetype/src/pshinter/pshglob.h4
-rw-r--r--src/3rdparty/freetype/src/pshinter/pshmod.c17
-rw-r--r--src/3rdparty/freetype/src/pshinter/pshnterr.h3
-rw-r--r--src/3rdparty/freetype/src/pshinter/pshpic.c45
-rw-r--r--src/3rdparty/freetype/src/pshinter/pshpic.h24
-rw-r--r--src/3rdparty/freetype/src/pshinter/pshrec.c54
-rw-r--r--src/3rdparty/freetype/src/pshinter/pshrec.h4
-rw-r--r--src/3rdparty/freetype/src/pshinter/rules.mk7
11 files changed, 159 insertions, 101 deletions
diff --git a/src/3rdparty/freetype/src/pshinter/pshalgo.c b/src/3rdparty/freetype/src/pshinter/pshalgo.c
index 417dcee547..644c76d101 100644
--- a/src/3rdparty/freetype/src/pshinter/pshalgo.c
+++ b/src/3rdparty/freetype/src/pshinter/pshalgo.c
@@ -4,7 +4,7 @@
/* */
/* PostScript hinting algorithm (body). */
/* */
-/* Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 2001-2010, 2012-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used */
@@ -401,13 +401,13 @@
FT_Fixed delta,
FT_Int dimension )
{
- PSH_Hint hint;
- FT_UInt count;
+ FT_UInt count;
for ( count = 0; count < table->max_hints; count++ )
{
- hint = table->hints + count;
+ PSH_Hint hint = table->hints + count;
+
hint->cur_pos = FT_MulFix( hint->org_pos, scale ) + delta;
hint->cur_len = FT_MulFix( hint->org_len, scale );
@@ -562,7 +562,7 @@
else if ( len > 0 )
{
/* This is a very small stem; we simply align it to the
- * pixel grid, trying to find the minimal displacement.
+ * pixel grid, trying to find the minimum displacement.
*
* left = pos
* right = pos + len
@@ -1161,8 +1161,8 @@
int result = PSH_DIR_NONE;
- ax = ( dx >= 0 ) ? dx : -dx;
- ay = ( dy >= 0 ) ? dy : -dy;
+ ax = FT_ABS( dx );
+ ay = FT_ABS( dy );
if ( ay * 12 < ax )
{
@@ -1406,7 +1406,6 @@
point = first;
before = point;
- after = point;
do
{
@@ -1690,7 +1689,10 @@
/* process secondary hints to `selected' points */
if ( num_masks > 1 && glyph->num_points > 0 )
{
- first = mask->end_point;
+ /* the `endchar' op can reduce the number of points */
+ first = mask->end_point > glyph->num_points
+ ? glyph->num_points
+ : mask->end_point;
mask++;
for ( ; num_masks > 1; num_masks--, mask++ )
{
@@ -1698,7 +1700,9 @@
FT_Int count;
- next = mask->end_point;
+ next = mask->end_point > glyph->num_points
+ ? glyph->num_points
+ : mask->end_point;
count = next - first;
if ( count > 0 )
{
@@ -1856,12 +1860,10 @@
point->cur_u = hint->cur_pos + hint->cur_len +
FT_MulFix( delta - hint->org_len, scale );
- else if ( hint->org_len > 0 )
+ else /* hint->org_len > 0 */
point->cur_u = hint->cur_pos +
FT_MulDiv( delta, hint->cur_len,
hint->org_len );
- else
- point->cur_u = hint->cur_pos;
}
psh_point_set_fitted( point );
}
@@ -2076,8 +2078,6 @@
start = first;
do
{
- point = first;
-
/* skip consecutive fitted points */
for (;;)
{
@@ -2190,7 +2190,7 @@
/* something to do? */
if ( outline->n_points == 0 || outline->n_contours == 0 )
- return PSH_Err_Ok;
+ return FT_Err_Ok;
#ifdef DEBUG_HINTER
diff --git a/src/3rdparty/freetype/src/pshinter/pshalgo.h b/src/3rdparty/freetype/src/pshinter/pshalgo.h
index 1a248a7052..c70f31ea94 100644
--- a/src/3rdparty/freetype/src/pshinter/pshalgo.h
+++ b/src/3rdparty/freetype/src/pshinter/pshalgo.h
@@ -4,7 +4,7 @@
/* */
/* PostScript hinting algorithm (specification). */
/* */
-/* Copyright 2001, 2002, 2003, 2008 by */
+/* Copyright 2001-2003, 2008, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -22,7 +22,6 @@
#include "pshrec.h"
#include "pshglob.h"
-#include FT_TRIGONOMETRY_H
FT_BEGIN_HEADER
@@ -168,8 +167,6 @@ FT_BEGIN_HEADER
FT_UInt flags2;
FT_Char dir_in;
FT_Char dir_out;
- FT_Angle angle_in;
- FT_Angle angle_out;
PSH_Hint hint;
FT_Pos org_u;
FT_Pos org_v;
@@ -186,12 +183,6 @@ FT_BEGIN_HEADER
} PSH_PointRec;
-#define PSH_POINT_EQUAL_ORG( a, b ) ( (a)->org_u == (b)->org_u && \
- (a)->org_v == (b)->org_v )
-
-#define PSH_POINT_ANGLE( a, b ) FT_Atan2( (b)->org_u - (a)->org_u, \
- (b)->org_v - (a)->org_v )
-
typedef struct PSH_ContourRec_
{
PSH_Point start;
diff --git a/src/3rdparty/freetype/src/pshinter/pshglob.c b/src/3rdparty/freetype/src/pshinter/pshglob.c
index 8a69aa1e84..1bcc481b9b 100644
--- a/src/3rdparty/freetype/src/pshinter/pshglob.c
+++ b/src/3rdparty/freetype/src/pshinter/pshglob.c
@@ -5,7 +5,7 @@
/* PostScript hinter global hinting management (body). */
/* Inspired by the new auto-hinter module. */
/* */
-/* Copyright 2001, 2002, 2003, 2004, 2006 by */
+/* Copyright 2001-2004, 2006, 2010, 2012-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used */
@@ -522,6 +522,28 @@
}
+ /* calculate the maximum height of given blue zones */
+ static FT_Short
+ psh_calc_max_height( FT_UInt num,
+ const FT_Short* values,
+ FT_Short cur_max )
+ {
+ FT_UInt count;
+
+
+ for ( count = 0; count < num; count += 2 )
+ {
+ FT_Short cur_height = values[count + 1] - values[count];
+
+
+ if ( cur_height > cur_max )
+ cur_max = cur_height;
+ }
+
+ return cur_max;
+ }
+
+
FT_LOCAL_DEF( void )
psh_blues_snap_stem( PSH_Blues blues,
FT_Int stem_top,
@@ -624,7 +646,7 @@
T1_Private* priv,
PSH_Globals *aglobals )
{
- PSH_Globals globals;
+ PSH_Globals globals = NULL;
FT_Error error;
@@ -684,7 +706,32 @@
priv->family_blues, priv->num_family_other_blues,
priv->family_other_blues, priv->blue_fuzz, 1 );
- globals->blues.blue_scale = priv->blue_scale;
+ /* limit the BlueScale value to `1 / max_of_blue_zone_heights' */
+ {
+ FT_Fixed max_scale;
+ FT_Short max_height = 1;
+
+
+ max_height = psh_calc_max_height( priv->num_blue_values,
+ priv->blue_values,
+ max_height );
+ max_height = psh_calc_max_height( priv->num_other_blues,
+ priv->other_blues,
+ max_height );
+ max_height = psh_calc_max_height( priv->num_family_blues,
+ priv->family_blues,
+ max_height );
+ max_height = psh_calc_max_height( priv->num_family_other_blues,
+ priv->family_other_blues,
+ max_height );
+
+ /* BlueScale is scaled 1000 times */
+ max_scale = FT_DivFix( 1000, max_height );
+ globals->blues.blue_scale = priv->blue_scale < max_scale
+ ? priv->blue_scale
+ : max_scale;
+ }
+
globals->blues.blue_shift = priv->blue_shift;
globals->blues.blue_fuzz = priv->blue_fuzz;
@@ -703,14 +750,14 @@
}
- FT_LOCAL_DEF( FT_Error )
+ FT_LOCAL_DEF( void )
psh_globals_set_scale( PSH_Globals globals,
FT_Fixed x_scale,
FT_Fixed y_scale,
FT_Fixed x_delta,
FT_Fixed y_delta )
{
- PSH_Dimension dim = &globals->dimension[0];
+ PSH_Dimension dim;
dim = &globals->dimension[0];
@@ -733,8 +780,6 @@
psh_globals_scale_widths( globals, 1 );
psh_blues_scale_zones( &globals->blues, y_scale, y_delta );
}
-
- return 0;
}
diff --git a/src/3rdparty/freetype/src/pshinter/pshglob.h b/src/3rdparty/freetype/src/pshinter/pshglob.h
index c511626157..94d972a940 100644
--- a/src/3rdparty/freetype/src/pshinter/pshglob.h
+++ b/src/3rdparty/freetype/src/pshinter/pshglob.h
@@ -4,7 +4,7 @@
/* */
/* PostScript hinter global hinting management. */
/* */
-/* Copyright 2001, 2002, 2003 by */
+/* Copyright 2001, 2002, 2003, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -167,7 +167,7 @@ FT_BEGIN_HEADER
FT_Int org_width );
#endif
- FT_LOCAL( FT_Error )
+ FT_LOCAL( void )
psh_globals_set_scale( PSH_Globals globals,
FT_Fixed x_scale,
FT_Fixed y_scale,
diff --git a/src/3rdparty/freetype/src/pshinter/pshmod.c b/src/3rdparty/freetype/src/pshinter/pshmod.c
index 91da5d7e6b..cdeaca18c9 100644
--- a/src/3rdparty/freetype/src/pshinter/pshmod.c
+++ b/src/3rdparty/freetype/src/pshinter/pshmod.c
@@ -4,7 +4,7 @@
/* */
/* FreeType PostScript hinter module implementation (body). */
/* */
-/* Copyright 2001, 2002, 2007 by */
+/* Copyright 2001, 2002, 2007, 2009, 2012 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -93,14 +93,15 @@
}
- FT_DEFINE_PSHINTER_INTERFACE(pshinter_interface,
+ FT_DEFINE_PSHINTER_INTERFACE(
+ pshinter_interface,
pshinter_get_globals_funcs,
pshinter_get_t1_funcs,
- pshinter_get_t2_funcs
- )
+ pshinter_get_t2_funcs )
- FT_DEFINE_MODULE(pshinter_module_class,
+ FT_DEFINE_MODULE(
+ pshinter_module_class,
0,
sizeof ( PS_Hinter_ModuleRec ),
@@ -108,11 +109,11 @@
0x10000L,
0x20000L,
- &FTPSHINTER_INTERFACE_GET, /* module-specific interface */
+ &PSHINTER_INTERFACE_GET, /* module-specific interface */
(FT_Module_Constructor)ps_hinter_init,
(FT_Module_Destructor) ps_hinter_done,
- (FT_Module_Requester) 0 /* no additional interface for now */
- )
+ (FT_Module_Requester) NULL ) /* no additional interface for now */
+
/* END */
diff --git a/src/3rdparty/freetype/src/pshinter/pshnterr.h b/src/3rdparty/freetype/src/pshinter/pshnterr.h
index 3c0029fbf3..7cc180f0ca 100644
--- a/src/3rdparty/freetype/src/pshinter/pshnterr.h
+++ b/src/3rdparty/freetype/src/pshinter/pshnterr.h
@@ -4,7 +4,7 @@
/* */
/* PS Hinter error codes (specification only). */
/* */
-/* Copyright 2003 by */
+/* Copyright 2003, 2012 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -29,6 +29,7 @@
#undef __FTERRORS_H__
+#undef FT_ERR_PREFIX
#define FT_ERR_PREFIX PSH_Err_
#define FT_ERR_BASE FT_Mod_Err_PShinter
diff --git a/src/3rdparty/freetype/src/pshinter/pshpic.c b/src/3rdparty/freetype/src/pshinter/pshpic.c
index 51a0879888..568f4ac4b0 100644
--- a/src/3rdparty/freetype/src/pshinter/pshpic.c
+++ b/src/3rdparty/freetype/src/pshinter/pshpic.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for pshinter module. */
/* */
-/* Copyright 2009 by */
+/* Copyright 2009, 2010, 2012, 2013 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -20,17 +20,23 @@
#include FT_FREETYPE_H
#include FT_INTERNAL_OBJECTS_H
#include "pshpic.h"
+#include "pshnterr.h"
+
#ifdef FT_CONFIG_OPTION_PIC
/* forward declaration of PIC init functions from pshmod.c */
- void FT_Init_Class_pshinter_interface( FT_Library, PSHinter_Interface*);
+ void
+ FT_Init_Class_pshinter_interface( FT_Library library,
+ PSHinter_Interface* clazz );
void
- pshinter_module_class_pic_free( FT_Library library )
+ pshinter_module_class_pic_free( FT_Library library )
{
- FT_PIC_Container* pic_container = &library->pic_container;
- FT_Memory memory = library->memory;
+ FT_PIC_Container* pic_container = &library->pic_container;
+ FT_Memory memory = library->memory;
+
+
if ( pic_container->pshinter )
{
FT_FREE( pic_container->pshinter );
@@ -38,30 +44,33 @@
}
}
+
FT_Error
- pshinter_module_class_pic_init( FT_Library library )
+ pshinter_module_class_pic_init( FT_Library library )
{
- FT_PIC_Container* pic_container = &library->pic_container;
- FT_Error error = FT_Err_Ok;
- PSHinterPIC* container;
- FT_Memory memory = library->memory;
+ FT_PIC_Container* pic_container = &library->pic_container;
+ FT_Error error = FT_Err_Ok;
+ PSHinterPIC* container = NULL;
+ FT_Memory memory = library->memory;
+
/* allocate pointer, clear and set global container pointer */
- if ( FT_ALLOC ( container, sizeof ( *container ) ) )
+ if ( FT_ALLOC( container, sizeof ( *container ) ) )
return error;
- FT_MEM_SET( container, 0, sizeof(*container) );
+ FT_MEM_SET( container, 0, sizeof ( *container ) );
pic_container->pshinter = container;
-
+
/* add call to initialization function when you add new scripts */
- FT_Init_Class_pshinter_interface(library, &container->pshinter_interface);
+ FT_Init_Class_pshinter_interface(
+ library, &container->pshinter_interface );
+
+ if ( error )
+ pshinter_module_class_pic_free( library );
-/*Exit:*/
- if(error)
- pshinter_module_class_pic_free(library);
return error;
}
-
#endif /* FT_CONFIG_OPTION_PIC */
+
/* END */
diff --git a/src/3rdparty/freetype/src/pshinter/pshpic.h b/src/3rdparty/freetype/src/pshinter/pshpic.h
index 3555d8e851..b46f853113 100644
--- a/src/3rdparty/freetype/src/pshinter/pshpic.h
+++ b/src/3rdparty/freetype/src/pshinter/pshpic.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for pshinter module. */
/* */
-/* Copyright 2009 by */
+/* Copyright 2009, 2012, 2013 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -19,27 +19,37 @@
#ifndef __PSHPIC_H__
#define __PSHPIC_H__
-
+
FT_BEGIN_HEADER
#include FT_INTERNAL_PIC_H
+
#ifndef FT_CONFIG_OPTION_PIC
-#define FTPSHINTER_INTERFACE_GET pshinter_interface
+#define PSHINTER_INTERFACE_GET pshinter_interface
#else /* FT_CONFIG_OPTION_PIC */
#include FT_INTERNAL_POSTSCRIPT_HINTS_H
- typedef struct PSHinterPIC_
+ typedef struct PSHinterPIC_
{
- PSHinter_Interface pshinter_interface;
+ PSHinter_Interface pshinter_interface;
+
} PSHinterPIC;
-#define GET_PIC(lib) ((PSHinterPIC*)((lib)->pic_container.autofit))
-#define FTPSHINTER_INTERFACE_GET (GET_PIC(library)->pshinter_interface)
+#define GET_PIC( lib ) ( (PSHinterPIC*)( (lib)->pic_container.pshinter ) )
+
+#define PSHINTER_INTERFACE_GET ( GET_PIC( library )->pshinter_interface )
+
+ /* see pshpic.c for the implementation */
+ void
+ pshinter_module_class_pic_free( FT_Library library );
+
+ FT_Error
+ pshinter_module_class_pic_init( FT_Library library );
#endif /* FT_CONFIG_OPTION_PIC */
diff --git a/src/3rdparty/freetype/src/pshinter/pshrec.c b/src/3rdparty/freetype/src/pshinter/pshrec.c
index 0910cc5e6a..73a18ffd64 100644
--- a/src/3rdparty/freetype/src/pshinter/pshrec.c
+++ b/src/3rdparty/freetype/src/pshinter/pshrec.c
@@ -4,7 +4,7 @@
/* */
/* FreeType PostScript hints recorder (body). */
/* */
-/* Copyright 2001, 2002, 2003, 2004, 2007, 2009 by */
+/* Copyright 2001-2004, 2007, 2009, 2013, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -64,7 +64,7 @@
{
FT_UInt old_max = table->max_hints;
FT_UInt new_max = count;
- FT_Error error = PSH_Err_Ok;
+ FT_Error error = FT_Err_Ok;
if ( new_max > old_max )
@@ -83,7 +83,7 @@
FT_Memory memory,
PS_Hint *ahint )
{
- FT_Error error = PSH_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_UInt count;
PS_Hint hint = 0;
@@ -139,7 +139,7 @@
{
FT_UInt old_max = ( mask->max_bits + 7 ) >> 3;
FT_UInt new_max = ( count + 7 ) >> 3;
- FT_Error error = PSH_Err_Ok;
+ FT_Error error = FT_Err_Ok;
if ( new_max > old_max )
@@ -186,7 +186,7 @@
FT_Int idx,
FT_Memory memory )
{
- FT_Error error = PSH_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_Byte* p;
@@ -236,7 +236,7 @@
{
FT_UInt old_max = table->max_masks;
FT_UInt new_max = count;
- FT_Error error = PSH_Err_Ok;
+ FT_Error error = FT_Err_Ok;
if ( new_max > old_max )
@@ -256,7 +256,7 @@
PS_Mask *amask )
{
FT_UInt count;
- FT_Error error = PSH_Err_Ok;
+ FT_Error error = FT_Err_Ok;
PS_Mask mask = 0;
@@ -287,7 +287,7 @@
FT_Memory memory,
PS_Mask *amask )
{
- FT_Error error = PSH_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_UInt count;
PS_Mask mask;
@@ -316,7 +316,7 @@
FT_UInt bit_count,
FT_Memory memory )
{
- FT_Error error = PSH_Err_Ok;
+ FT_Error error;
PS_Mask mask;
@@ -384,7 +384,7 @@
FT_UInt count;
- count = ( count1 <= count2 ) ? count1 : count2;
+ count = FT_MIN( count1, count2 );
for ( ; count >= 8; count -= 8 )
{
if ( p1[0] & p2[0] )
@@ -409,7 +409,7 @@
FT_Memory memory )
{
FT_UInt temp;
- FT_Error error = PSH_Err_Ok;
+ FT_Error error = FT_Err_Ok;
/* swap index1 and index2 so that index1 < index2 */
@@ -499,7 +499,7 @@
FT_Memory memory )
{
FT_Int index1, index2;
- FT_Error error = PSH_Err_Ok;
+ FT_Error error = FT_Err_Ok;
for ( index1 = table->num_masks - 1; index1 > 0; index1-- )
@@ -561,7 +561,7 @@
FT_Memory memory )
{
PS_Mask mask;
- FT_Error error = PSH_Err_Ok;
+ FT_Error error = FT_Err_Ok;
/* get last hint mask */
@@ -583,12 +583,13 @@
FT_UInt end_point )
{
FT_UInt count = dim->masks.num_masks;
- PS_Mask mask;
if ( count > 0 )
{
- mask = dim->masks.masks + count - 1;
+ PS_Mask mask = dim->masks.masks + count - 1;
+
+
mask->end_point = end_point;
}
}
@@ -621,7 +622,7 @@
FT_UInt end_point,
FT_Memory memory )
{
- FT_Error error = PSH_Err_Ok;
+ FT_Error error;
/* reset current mask, if any */
@@ -646,7 +647,7 @@
FT_Memory memory,
FT_Int *aindex )
{
- FT_Error error = PSH_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_UInt flags = 0;
@@ -717,7 +718,7 @@
FT_Int hint3,
FT_Memory memory )
{
- FT_Error error = PSH_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_UInt count = dim->counters.num_masks;
PS_Mask counter = dim->counters.masks;
@@ -791,18 +792,17 @@
ps_dimension_done( &hints->dimension[0], memory );
ps_dimension_done( &hints->dimension[1], memory );
- hints->error = PSH_Err_Ok;
+ hints->error = FT_Err_Ok;
hints->memory = 0;
}
- FT_LOCAL( FT_Error )
+ FT_LOCAL( void )
ps_hints_init( PS_Hints hints,
FT_Memory memory )
{
FT_MEM_ZERO( hints, sizeof ( *hints ) );
hints->memory = memory;
- return PSH_Err_Ok;
}
@@ -815,7 +815,7 @@
{
case PS_HINT_TYPE_1:
case PS_HINT_TYPE_2:
- hints->error = PSH_Err_Ok;
+ hints->error = FT_Err_Ok;
hints->hint_type = hint_type;
ps_dimension_init( &hints->dimension[0] );
@@ -823,7 +823,7 @@
break;
default:
- hints->error = PSH_Err_Invalid_Argument;
+ hints->error = FT_THROW( Invalid_Argument );
hints->hint_type = hint_type;
FT_TRACE0(( "ps_hints_open: invalid charstring type\n" ));
@@ -894,7 +894,7 @@
FT_Int dimension,
FT_Fixed* stems )
{
- FT_Error error = PSH_Err_Ok;
+ FT_Error error = FT_Err_Ok;
if ( !hints->error )
@@ -938,7 +938,7 @@
else
{
FT_ERROR(( "ps_hints_t1stem3: called with invalid hint type\n" ));
- error = PSH_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Fail;
}
}
@@ -956,7 +956,7 @@
ps_hints_t1reset( PS_Hints hints,
FT_UInt end_point )
{
- FT_Error error = PSH_Err_Ok;
+ FT_Error error = FT_Err_Ok;
if ( !hints->error )
@@ -979,7 +979,7 @@
else
{
/* invalid hint type */
- error = PSH_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Fail;
}
}
diff --git a/src/3rdparty/freetype/src/pshinter/pshrec.h b/src/3rdparty/freetype/src/pshinter/pshrec.h
index dcb3197f94..a88fe6e834 100644
--- a/src/3rdparty/freetype/src/pshinter/pshrec.h
+++ b/src/3rdparty/freetype/src/pshinter/pshrec.h
@@ -4,7 +4,7 @@
/* */
/* Postscript (Type1/Type2) hints recorder (specification). */
/* */
-/* Copyright 2001, 2002, 2003, 2006, 2008 by */
+/* Copyright 2001, 2002, 2003, 2006, 2008, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -141,7 +141,7 @@ FT_BEGIN_HEADER
/* */
/* initialize hints recorder */
- FT_LOCAL( FT_Error )
+ FT_LOCAL( void )
ps_hints_init( PS_Hints hints,
FT_Memory memory );
diff --git a/src/3rdparty/freetype/src/pshinter/rules.mk b/src/3rdparty/freetype/src/pshinter/rules.mk
index 57773394ac..888ece1058 100644
--- a/src/3rdparty/freetype/src/pshinter/rules.mk
+++ b/src/3rdparty/freetype/src/pshinter/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 2001, 2003 by
+# Copyright 2001, 2003, 2011 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -25,10 +25,11 @@ PSHINTER_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(PSHINTER_DIR))
# PSHINTER driver sources (i.e., C files)
#
-PSHINTER_DRV_SRC := $(PSHINTER_DIR)/pshrec.c \
+PSHINTER_DRV_SRC := $(PSHINTER_DIR)/pshalgo.c \
$(PSHINTER_DIR)/pshglob.c \
$(PSHINTER_DIR)/pshmod.c \
- $(PSHINTER_DIR)/pshalgo.c
+ $(PSHINTER_DIR)/pshpic.c \
+ $(PSHINTER_DIR)/pshrec.c
# PSHINTER driver headers