ref: ea5babaa67eeed68041a73933e0a7271960c0505
parent: e23ba91af7ed886073a581fc3f2d243994ed085e
author: Werner Lemberg <[email protected]>
date: Fri Jun 25 18:44:37 EDT 2010
Fix Savannah bug #30261. * src/pfr/pfrobjs.c (pfr_face_init): Reject fonts which contain neither outline nor bitmap glyphs.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2010-06-25 Werner Lemberg <[email protected]>
+ 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 <[email protected]>
+
Fix Savannah bug #30254.
* src/cff/cffload.c (cff_index_get_pointers): Do sanity check for
--- 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 )