Fix Savannah bug #30261.

* src/pfr/pfrobjs.c (pfr_face_init): Reject fonts which contain
neither outline nor bitmap glyphs.
This commit is contained in:
Werner Lemberg 2010-06-25 22:44:37 +02:00
parent e23ba91af7
commit ea5babaa67
2 changed files with 19 additions and 3 deletions

View File

@ -1,3 +1,10 @@
2010-06-25 Werner Lemberg <wl@gnu.org>
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 <wl@gnu.org>
Fix Savannah bug #30254.

View File

@ -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 )