aboutsummaryrefslogtreecommitdiff
path: root/freetype/src/pfr/pfrobjs.c
diff options
context:
space:
mode:
Diffstat (limited to 'freetype/src/pfr/pfrobjs.c')
-rw-r--r--freetype/src/pfr/pfrobjs.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/freetype/src/pfr/pfrobjs.c b/freetype/src/pfr/pfrobjs.c
index e225cffb0..036d26beb 100644
--- a/freetype/src/pfr/pfrobjs.c
+++ b/freetype/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, */
@@ -23,6 +23,7 @@
#include "pfrsbit.h"
#include FT_OUTLINE_H
#include <freetype/internal/ftdebug.h>
+#include FT_TRUETYPE_IDS_H
#include "pfrerror.h"
@@ -147,7 +148,16 @@
break;
if ( nn == phy_font->num_chars )
- pfrface->face_flags = 0; /* not scalable */
+ {
+ if ( phy_font->num_strikes > 0 )
+ 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 )
@@ -243,11 +253,11 @@
charmap.face = pfrface;
- charmap.platform_id = 3;
- charmap.encoding_id = 1;
+ charmap.platform_id = TT_PLATFORM_MICROSOFT;
+ charmap.encoding_id = TT_MS_ID_UNICODE_CS;
charmap.encoding = FT_ENCODING_UNICODE;
- FT_CMap_New( &pfr_cmap_class_rec, NULL, &charmap, NULL );
+ error = FT_CMap_New( &pfr_cmap_class_rec, NULL, &charmap, NULL );
#if 0
/* Select default charmap */