Fix Savannah bug #30106.
Point numbers for FreeType's implementation of hinting masks are collected before the final number of points of a glyph has been determined; in particular, the code for handling the `endchar' opcode can reduce the number of points. * src/pshinter/pshalgo.c (psh_glyph_find_strong_points): Assure that `end_point' is not larger than `glyph->num_points'.
This commit is contained in:
parent
3624110cc2
commit
8d22746c9e
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
||||||
|
2010-06-11 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
|
Fix Savannah bug #30106.
|
||||||
|
|
||||||
|
Point numbers for FreeType's implementation of hinting masks are
|
||||||
|
collected before the final number of points of a glyph has been
|
||||||
|
determined; in particular, the code for handling the `endchar'
|
||||||
|
opcode can reduce the number of points.
|
||||||
|
|
||||||
|
* src/pshinter/pshalgo.c (psh_glyph_find_strong_points): Assure that
|
||||||
|
`end_point' is not larger than `glyph->num_points'.
|
||||||
|
|
||||||
2010-06-11 Werner Lemberg <wl@gnu.org>
|
2010-06-11 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
[cff]: Improve debugging output.
|
[cff]: Improve debugging output.
|
||||||
|
|
|
@ -4,7 +4,8 @@
|
||||||
/* */
|
/* */
|
||||||
/* PostScript hinting algorithm (body). */
|
/* 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. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used */
|
/* This file is part of the FreeType project, and may only be used */
|
||||||
|
@ -1690,7 +1691,10 @@
|
||||||
/* process secondary hints to `selected' points */
|
/* process secondary hints to `selected' points */
|
||||||
if ( num_masks > 1 && glyph->num_points > 0 )
|
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++;
|
mask++;
|
||||||
for ( ; num_masks > 1; num_masks--, mask++ )
|
for ( ; num_masks > 1; num_masks--, mask++ )
|
||||||
{
|
{
|
||||||
|
@ -1698,7 +1702,9 @@
|
||||||
FT_Int count;
|
FT_Int count;
|
||||||
|
|
||||||
|
|
||||||
next = mask->end_point;
|
next = mask->end_point > glyph->num_points
|
||||||
|
? glyph->num_points
|
||||||
|
: mask->end_point;
|
||||||
count = next - first;
|
count = next - first;
|
||||||
if ( count > 0 )
|
if ( count > 0 )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue