summaryrefslogtreecommitdiffstats
path: root/src/pshinter
diff options
context:
space:
mode:
authorNick Kralevich <nnk@google.com>2010-09-14 17:02:58 -0700
committerNick Kralevich <nnk@google.com>2010-09-15 10:32:30 -0700
commitaacb8e1368a883fcbc9fe64fd0e460cef9c9b20c (patch)
tree2b4c5412391bf31f6a54b237ea83bfde05ec3802 /src/pshinter
parentd4476115dee94297c020b3a2b067188117424e25 (diff)
downloadandroid_external_freetype-aacb8e1368a883fcbc9fe64fd0e460cef9c9b20c.tar.gz
android_external_freetype-aacb8e1368a883fcbc9fe64fd0e460cef9c9b20c.tar.bz2
android_external_freetype-aacb8e1368a883fcbc9fe64fd0e460cef9c9b20c.zip
upgrade freetype to 2.4.2.
Bug: 2969145 Change-Id: I8debbbe0bd478d9cf8c39cff5179981b5f3b371a
Diffstat (limited to 'src/pshinter')
-rw-r--r--src/pshinter/pshalgo.c12
-rw-r--r--src/pshinter/pshglob.c4
-rw-r--r--src/pshinter/pshpic.c16
3 files changed, 20 insertions, 12 deletions
diff --git a/src/pshinter/pshalgo.c b/src/pshinter/pshalgo.c
index 417dcee..4b08785 100644
--- a/src/pshinter/pshalgo.c
+++ b/src/pshinter/pshalgo.c
@@ -4,7 +4,8 @@
/* */
/* PostScript hinting algorithm (body). */
/* */
-/* Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 */
+/* by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used */
@@ -1690,7 +1691,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 +1702,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 )
{
diff --git a/src/pshinter/pshglob.c b/src/pshinter/pshglob.c
index 8a69aa1..31231ad 100644
--- a/src/pshinter/pshglob.c
+++ b/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, 2002, 2003, 2004, 2006, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used */
@@ -624,7 +624,7 @@
T1_Private* priv,
PSH_Globals *aglobals )
{
- PSH_Globals globals;
+ PSH_Globals globals = NULL;
FT_Error error;
diff --git a/src/pshinter/pshpic.c b/src/pshinter/pshpic.c
index 51a0879..5efb422 100644
--- a/src/pshinter/pshpic.c
+++ b/src/pshinter/pshpic.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for pshinter module. */
/* */
-/* Copyright 2009 by */
+/* Copyright 2009, 2010 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -38,18 +38,20 @@
}
}
+
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 = PSH_Err_Ok;
+ PSHinterPIC* container;
+ FT_Memory memory = library->memory;
+
/* allocate pointer, clear and set global container pointer */
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 */