Fix minor issues reported by <muktha.narayan@wipro.com>.

* src/autofit/aflatin.c (af_latin_compute_stem_width): Remove
redundant conditional check.
* src/base/ftsynth.c (FT_GlyphSlot_Embolden): Ditto.
* src/cff/cffload.c (cff_encoding_load): Remove conditional check
which always evaluates to `true'.
* src/pshinter/pshalgo.c (ps_glyph_interpolate_strong_points):
Ditto.
* src/truetype/ttinterp.c (Ins_IUP): Ditto.
* src/cid/cidgload.c (cid_slot_load_glyph): Don't check for NULL if
value is already dereferenced.
* src/winfonts/winfnt.c (FNT_Load_Glyph): Fix check of `face'.
This commit is contained in:
Werner Lemberg 2010-09-13 07:32:22 +02:00
parent fd0cdb7b9e
commit 5220ef58c5
8 changed files with 48 additions and 33 deletions

View File

@ -1,3 +1,19 @@
2010-09-13 Werner Lemberg <wl@gnu.org>
Fix minor issues reported by <muktha.narayan@wipro.com>.
* src/autofit/aflatin.c (af_latin_compute_stem_width): Remove
redundant conditional check.
* src/base/ftsynth.c (FT_GlyphSlot_Embolden): Ditto.
* src/cff/cffload.c (cff_encoding_load): Remove conditional check
which always evaluates to `true'.
* src/pshinter/pshalgo.c (ps_glyph_interpolate_strong_points):
Ditto.
* src/truetype/ttinterp.c (Ins_IUP): Ditto.
* src/cid/cidgload.c (cid_slot_load_glyph): Don't check for NULL if
value is already dereferenced.
* src/winfonts/winfnt.c (FNT_Load_Glyph): Fix check of `face'.
2010-08-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
Ignore the environmental setting of LIBTOOL.
@ -31,7 +47,7 @@
them in later interpretation is danger. By unsetting these flags,
`fpgm' and `prep' tables are executed again in next interpretation.
Fix Savannah bug #30798, reported by Robert Swiecki.
This fixes Savannah bug #30798, reported by Robert Święcki.
2010-08-29 Werner Lemberg <wl@gnu.org>

View File

@ -1534,21 +1534,18 @@
/* compare to standard width */
if ( axis->width_count > 0 )
delta = dist - axis->widths[0].cur;
if ( delta < 0 )
delta = -delta;
if ( delta < 40 )
{
delta = dist - axis->widths[0].cur;
dist = axis->widths[0].cur;
if ( dist < 48 )
dist = 48;
if ( delta < 0 )
delta = -delta;
if ( delta < 40 )
{
dist = axis->widths[0].cur;
if ( dist < 48 )
dist = 48;
goto Done_Width;
}
goto Done_Width;
}
if ( dist < 3 * 64 )

View File

@ -90,7 +90,7 @@
if ( slot->format != FT_GLYPH_FORMAT_OUTLINE &&
slot->format != FT_GLYPH_FORMAT_BITMAP )
slot->format != FT_GLYPH_FORMAT_BITMAP )
return;
/* some reasonable strength */
@ -108,7 +108,7 @@
xstr = xstr * 2;
ystr = xstr;
}
else if ( slot->format == FT_GLYPH_FORMAT_BITMAP )
else /* slot->format == FT_GLYPH_FORMAT_BITMAP */
{
/* round to full pixels */
xstr &= ~63;

View File

@ -1255,9 +1255,7 @@
if ( gid != 0 )
{
encoding->codes[j] = (FT_UShort)gid;
if ( encoding->count < j + 1 )
encoding->count = j + 1;
encoding->count = j + 1;
}
else
{

View File

@ -272,7 +272,6 @@
FT_Int32 load_flags )
{
CID_GlyphSlot glyph = (CID_GlyphSlot)cidglyph;
CID_Size size = (CID_Size)cidsize;
FT_Error error;
T1_DecoderRec decoder;
CID_Face face = (CID_Face)cidglyph->face;
@ -375,7 +374,7 @@
cidglyph->format = FT_GLYPH_FORMAT_OUTLINE;
if ( size && cidsize->metrics.y_ppem < 24 )
if ( cidsize->metrics.y_ppem < 24 )
cidglyph->outline.flags |= FT_OUTLINE_HIGH_PRECISION;
/* apply the font matrix */

View File

@ -1862,12 +1862,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 );
}

View File

@ -6773,12 +6773,11 @@
{
if ( ( CUR.pts.tags[point] & mask ) != 0 )
{
if ( point > 0 )
_iup_worker_interpolate( &V,
cur_touched + 1,
point - 1,
cur_touched,
point );
_iup_worker_interpolate( &V,
cur_touched + 1,
point - 1,
cur_touched,
point );
cur_touched = point;
}

View File

@ -4,7 +4,7 @@
/* */
/* FreeType font driver for Windows FNT/FON files */
/* */
/* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2007, 2008, 2009 by */
/* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* Copyright 2003 Huw D M Davies for Codeweavers */
/* Copyright 2007 Dmitry Timoshkov for Codeweavers */
@ -944,7 +944,7 @@
FT_Int32 load_flags )
{
FNT_Face face = (FNT_Face)FT_SIZE_FACE( size );
FNT_Font font = face->font;
FNT_Font font;
FT_Error error = FNT_Err_Ok;
FT_Byte* p;
FT_Int len;
@ -955,7 +955,15 @@
FT_UNUSED( load_flags );
if ( !face || !font ||
if ( !face )
{
error = FNT_Err_Invalid_Argument;
goto Exit;
}
font = face->font;
if ( !font ||
glyph_index >= (FT_UInt)( FT_FACE( face )->num_glyphs ) )
{
error = FNT_Err_Invalid_Argument;