diff --git a/ChangeLog b/ChangeLog index 91fa85c33..72abfac96 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-06-25 Werner Lemberg + + Fix Savannah bug #30261. + + * src/pfr/pfrobjs.c (pfr_face_init): Reject fonts which contain + neither outline nor bitmap glyphs. + 2010-06-25 Werner Lemberg Fix Savannah bug #30254. diff --git a/src/pfr/pfrobjs.c b/src/pfr/pfrobjs.c index 56d617d88..307e6d3fe 100644 --- a/src/pfr/pfrobjs.c +++ b/src/pfr/pfrobjs.c @@ -4,7 +4,7 @@ /* */ /* FreeType PFR object methods (body). */ /* */ -/* Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008 by */ +/* Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -146,8 +146,17 @@ if ( phy_font->chars[nn].gps_offset != 0 ) break; - if ( nn == phy_font->num_chars ) - pfrface->face_flags = 0; /* not scalable */ + if ( phy_font->num_strikes > 0 ) + { + if ( nn == phy_font->num_chars ) + pfrface->face_flags = 0; /* not scalable */ + } + else + { + FT_ERROR(( "pfr_face_init: font doesn't contain glyphs\n" )); + error = PFR_Err_Invalid_File_Format; + goto Exit; + } } if ( (phy_font->flags & PFR_PHY_PROPORTIONAL) == 0 )