* src/smooth/ftgrays.c (gray_raster_render): Check `outline'

correctly.

Whitespace.
This commit is contained in:
Werner Lemberg 2007-12-30 23:49:14 +00:00
parent 540b954574
commit d2e1573706
5 changed files with 66 additions and 48 deletions

View File

@ -1,20 +1,24 @@
2007-12-30 Werner Lemberg <wl@gnu.org>
* src/smooth/ftgrays.c (gray_raster_render): Check `outline'
correctly.
2007-12-21 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
Improvement of POSIX resource-fork accessor to load unsorted
references in a resource. In HelveLTMM (resource-fork
PostScript Type1 font bundled to Mac OS X since 10.3.x),
the appearance order of PFB chunks is not sorted.
Sorting the chunks by reference IDs is required.
references in a resource. In HelveLTMM (resource-fork PostScript
Type1 font bundled with Mac OS X since 10.3.x), the appearance order
of PFB chunks is not sorted; sorting the chunks by reference IDs is
required.
* include/freetype/internal/ftrfork.h (FT_RFork_Ref):
New structure type to store a pair of reference ID and offset
to the chunk.
* include/freetype/internal/ftrfork.h (FT_RFork_Ref): New structure
type to store a pair of reference ID and offset to the chunk.
* src/base/ftrfork.c (ft_raccess_sort_ref_by_id):
New function to sort FT_RFork_Ref by their reference ID.
* src/base/ftrfork.c (ft_raccess_sort_ref_by_id): New function to
sort FT_RFork_Ref by their reference IDs.
(FT_Raccess_Get_DataOffsets): Returns an array of offsets
that is sorted by reference ID.
(FT_Raccess_Get_DataOffsets): Returns an array of offsets that is
sorted by reference ID.
2007-12-14 Werner Lemberg <wl@gnu.org>

View File

@ -1075,6 +1075,7 @@ FT_BEGIN_HEADER
#define FT_Raster_New_Func FT_Raster_NewFunc
/*************************************************************************/
/* */
/* <FuncType> */
@ -1091,6 +1092,7 @@ FT_BEGIN_HEADER
#define FT_Raster_Done_Func FT_Raster_DoneFunc
/*************************************************************************/
/* */
/* <FuncType> */
@ -1125,6 +1127,7 @@ FT_BEGIN_HEADER
#define FT_Raster_Reset_Func FT_Raster_ResetFunc
/*************************************************************************/
/* */
/* <FuncType> */
@ -1150,6 +1153,7 @@ FT_BEGIN_HEADER
#define FT_Raster_Set_Mode_Func FT_Raster_SetModeFunc
/*************************************************************************/
/* */
/* <FuncType> */
@ -1190,6 +1194,7 @@ FT_BEGIN_HEADER
#define FT_Raster_Render_Func FT_Raster_RenderFunc
/*************************************************************************/
/* */
/* <Struct> */

View File

@ -4,7 +4,7 @@
/* */
/* Embedded resource forks accessor (specification). */
/* */
/* Copyright 2004, 2006 by */
/* Copyright 2004, 2006, 2007 by */
/* Masatake YAMATO and Redhat K.K. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -36,14 +36,19 @@ FT_BEGIN_HEADER
/* Don't forget to increment the number if you add a new guessing rule. */
#define FT_RACCESS_N_RULES 9
/* Structure to describe a reference in resource, by its resource id */
/* and internal offset. `POST' resource expects to be concatenated by */
/* the order of resource id, instead of its appearance in the file. */
typedef struct FT_RFork_Ref_ {
/* A structure to describe a reference in a resource by its resource ID */
/* and internal offset. The `POST' resource expects to be concatenated */
/* by the order of resource IDs instead of its appearance in the file. */
typedef struct FT_RFork_Ref_
{
FT_UShort res_id;
FT_ULong offset;
} FT_RFork_Ref;
/*************************************************************************/
/* */
/* <Function> */

View File

@ -4,7 +4,7 @@
/* */
/* Embedded resource forks accessor (body). */
/* */
/* Copyright 2004, 2005, 2006 by */
/* Copyright 2004, 2005, 2006, 2007 by */
/* Masatake YAMATO and Redhat K.K. */
/* */
/* FT_Raccess_Get_HeaderInfo() and raccess_guess_darwin_hfsplus() are */
@ -137,11 +137,11 @@
FT_RFork_Ref* b )
{
if ( a->res_id < b->res_id )
return ( -1 );
return -1;
else if ( a->res_id > b->res_id )
return ( 1 );
return 1;
else
return ( 0 );
return 0;
}
@ -226,6 +226,7 @@
*offsets = offsets_internal;
error = FT_Err_Ok;
Exit:
FT_FREE( ref );
return error;

View File

@ -1659,7 +1659,7 @@
ras.count_ex = ras.max_ex - ras.min_ex;
ras.count_ey = ras.max_ey - ras.min_ey;
/* simple heuristic used to speed-up the bezier decomposition -- see */
/* simple heuristic used to speed up the bezier decomposition -- see */
/* the code in gray_render_conic() and gray_render_cubic() for more */
/* details */
ras.conic_level = 32;
@ -1796,11 +1796,14 @@
if ( !raster || !raster->buffer || !raster->buffer_size )
return ErrRaster_Invalid_Argument;
if ( !outline )
return ErrRaster_Invalid_Outline;
/* return immediately if the outline is empty */
if ( outline->n_points == 0 || outline->n_contours <= 0 )
return 0;
if ( !outline || !outline->contours || !outline->points )
if ( !outline->contours || !outline->points )
return ErrRaster_Invalid_Outline;
if ( outline->n_points !=