* src/cache/ftccache.i: fixed a bug that prevented compilation in
debug mode of template instantiation * src/cff/cffparse.c: fixed the CFF table loader. It didn't accept empty arrays, and this prevented the loading of certain fonts. * src/pshinter/pshalgo2.c, src/pshinter/pshalgo3.c: adding fix to prevent seg fault when hints are provided in an empty glyph !! * include/freetype/ftimage.h: removed incorrect "zft_" definitions and updated constants documentation comments * include/freetype/freetype.h (FT_FaceRec): updating documentation comment. The "descender" value is always *negative*, not positive !
This commit is contained in:
parent
00d9f40cf7
commit
25f845aa64
16
ChangeLog
16
ChangeLog
|
@ -1,3 +1,19 @@
|
|||
2002-09-09 David Turner <david@freetype.org>
|
||||
|
||||
* src/cache/ftccache.i: fixed a bug that prevented compilation in
|
||||
debug mode of template instantiation
|
||||
|
||||
* src/cff/cffparse.c: fixed the CFF table loader. It didn't accept
|
||||
empty arrays, and this prevented the loading of certain fonts.
|
||||
|
||||
* src/pshinter/pshalgo2.c, src/pshinter/pshalgo3.c: adding fix to
|
||||
prevent seg fault when hints are provided in an empty glyph !!
|
||||
|
||||
2002-09-09 Owen Taylor <owen@redhat.com>
|
||||
|
||||
* src/pcf/pcfdriver.c (PCF_Glyph_Load): fixing incorrect computation
|
||||
of bitmap metrics.
|
||||
|
||||
2002-09-08 David Turner <david@freetype.org>
|
||||
|
||||
* src/smooth/ftsmooth.c, src/base/ftobjs.c,
|
||||
|
|
|
@ -746,9 +746,9 @@ FT_BEGIN_HEADER
|
|||
/* descender :: The face's descender is the vertical */
|
||||
/* distance from the baseline to the */
|
||||
/* bottommost point of any glyph in the face. */
|
||||
/* This field's value is positive, expressed */
|
||||
/* This field's value is *negative*, expressed */
|
||||
/* in font units. Some font designs use a */
|
||||
/* value different from `-bbox.yMin'. Only */
|
||||
/* value different from `bbox.yMin'. Only */
|
||||
/* relevant for scalable formats. */
|
||||
/* */
|
||||
/* height :: The face's height is the vertical distance */
|
||||
|
|
|
@ -422,25 +422,25 @@ FT_BEGIN_HEADER
|
|||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Const> */
|
||||
/* FT_OUTLINE_NONE */
|
||||
/* ft_outline_none */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* This constant is deprecated. Please use @FT_OUTLINE_NONE */
|
||||
/* instead. */
|
||||
/* */
|
||||
#define zft_outline_none FT_OUTLINE_NONE
|
||||
#define ft_outline_none FT_OUTLINE_NONE
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Const> */
|
||||
/* FT_OUTLINE_OWNER */
|
||||
/* ft_outline_owner */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* This constant is deprecated. Please use @FT_OUTLINE_OWNER */
|
||||
/* instead. */
|
||||
/* */
|
||||
#define zft_outline_owner FT_OUTLINE_OWNER
|
||||
#define ft_outline_owner FT_OUTLINE_OWNER
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
|
@ -452,55 +452,55 @@ FT_BEGIN_HEADER
|
|||
/* This constant is deprecated. Please use @FT_OUTLINE_EVEN_ODD_FILL */
|
||||
/* instead. */
|
||||
/* */
|
||||
#define zft_outline_even_off_fill FT_OUTLINE_EVEN_ODD_FILL
|
||||
#define ft_outline_even_off_fill FT_OUTLINE_EVEN_ODD_FILL
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Const> */
|
||||
/* FT_OUTLINE_REVERSE_FILL */
|
||||
/* ft_outline_reverse_fill */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* This constant is deprecated. Please use @FT_OUTLINE_REVERSE_FILL */
|
||||
/* instead. */
|
||||
/* */
|
||||
#define zft_outline_reverse_fill FT_OUTLINE_REVERSE_FILL
|
||||
#define ft_outline_reverse_fill FT_OUTLINE_REVERSE_FILL
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Const> */
|
||||
/* FT_OUTLINE_IGNORE_DROPOUTS */
|
||||
/* ft_outline_ignore_dropouts */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* This constant is deprecated. Please use */
|
||||
/* @FT_OUTLINE_IGNORE_DROPOUTS instead. */
|
||||
/* */
|
||||
#define zft_outline_ignore_dropouts FT_OUTLINE_IGNORE_DROPOUTS
|
||||
#define ft_outline_ignore_dropouts FT_OUTLINE_IGNORE_DROPOUTS
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Const> */
|
||||
/* FT_OUTLINE_HIGH_PRECISION */
|
||||
/* ft_outline_high_precision */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* This constant is deprecated. Please use */
|
||||
/* @FT_OUTLINE_HIGH_PRECISION instead. */
|
||||
/* */
|
||||
#define zft_outline_high_precision FT_OUTLINE_HIGH_PRECISION
|
||||
#define ft_outline_high_precision FT_OUTLINE_HIGH_PRECISION
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Const> */
|
||||
/* FT_OUTLINE_SINGLE_PASS */
|
||||
/* ft_outline_single_pass */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* This constant is deprecated. Please use @FT_OUTLINE_SINGLE_PASS */
|
||||
/* instead. */
|
||||
/* */
|
||||
#define zft_outline_single_pass FT_OUTLINE_SINGLE_PASS
|
||||
#define ft_outline_single_pass FT_OUTLINE_SINGLE_PASS
|
||||
|
||||
/* */
|
||||
|
||||
|
|
|
@ -89,16 +89,6 @@
|
|||
bucket = cache->buckets + idx;
|
||||
}
|
||||
|
||||
#ifdef FT_DEBUG_LEVEL_ERROR
|
||||
if ( query->family != family ||
|
||||
family->fam_index >= cache->manager->families.size )
|
||||
{
|
||||
FT_ERROR((
|
||||
"ftc_cache_lookup: invalid query (bad 'family' field)\n" ));
|
||||
return FTC_Err_Invalid_Argument;
|
||||
}
|
||||
#endif
|
||||
|
||||
pnode = bucket;
|
||||
|
||||
for ( ;; )
|
||||
|
|
|
@ -542,16 +542,15 @@
|
|||
const CFF_Field_Handler* field;
|
||||
|
||||
|
||||
/* first of all, a trivial check */
|
||||
if ( num_args < 1 )
|
||||
goto Stack_Underflow;
|
||||
|
||||
*parser->top = p;
|
||||
code = v;
|
||||
if ( v == 12 )
|
||||
{
|
||||
/* two byte operator */
|
||||
p++;
|
||||
if ( p >= limit )
|
||||
goto Syntax_Error;
|
||||
|
||||
code = 0x100 | p[0];
|
||||
}
|
||||
code = code | parser->object_code;
|
||||
|
@ -565,6 +564,11 @@
|
|||
FT_Byte* q = (FT_Byte*)parser->object + field->offset;
|
||||
|
||||
|
||||
/* check that we have enough arguments -- except for */
|
||||
/* delta encoded arrays, which can be empty */
|
||||
if ( field->kind != cff_kind_delta && num_args < 1 )
|
||||
goto Stack_Underflow;
|
||||
|
||||
switch ( field->kind )
|
||||
{
|
||||
case cff_kind_bool:
|
||||
|
|
|
@ -414,7 +414,8 @@ THE SOFTWARE.
|
|||
slot->metrics.horiAdvance = metric->characterWidth << 6 ;
|
||||
slot->metrics.horiBearingX = metric->leftSideBearing << 6 ;
|
||||
slot->metrics.horiBearingY = metric->ascent << 6 ;
|
||||
slot->metrics.width = metric->characterWidth << 6 ;
|
||||
slot->metrics.width = ( metric->rightSideBearing -
|
||||
metric->leftSideBearing ) << 6;
|
||||
slot->metrics.height = bitmap->rows << 6;
|
||||
|
||||
slot->linearHoriAdvance = (FT_Fixed)bitmap->width << 16;
|
||||
|
|
|
@ -1128,7 +1128,7 @@
|
|||
|
||||
|
||||
/* process secondary hints to "selected" points */
|
||||
if ( num_masks > 1 )
|
||||
if ( num_masks > 1 && glyph->num_points > 0 )
|
||||
{
|
||||
first = mask->end_point;
|
||||
mask++;
|
||||
|
|
|
@ -1297,7 +1297,7 @@
|
|||
|
||||
|
||||
/* process secondary hints to "selected" points */
|
||||
if ( num_masks > 1 )
|
||||
if ( num_masks > 1 && glyph->num_points > 0 )
|
||||
{
|
||||
first = mask->end_point;
|
||||
mask++;
|
||||
|
|
|
@ -720,7 +720,7 @@
|
|||
sbit_metrics->y_scale = 1 << 16;
|
||||
#endif
|
||||
|
||||
sbit_metrics->ascender = strike->hori.ascender << 6;
|
||||
sbit_metrics->ascender = strike->hori.ascender << 6;
|
||||
sbit_metrics->descender = strike->hori.descender << 6;
|
||||
|
||||
/* XXX: Is this correct? */
|
||||
|
|
Loading…
Reference in New Issue