diff options
| author | marha <marha@users.sourceforge.net> | 2014-06-26 09:46:14 +0200 |
|---|---|---|
| committer | marha <marha@users.sourceforge.net> | 2014-06-26 09:52:19 +0200 |
| commit | fba3b6d1979c1d1ad0d56d46fc2d787f111c07fb (patch) | |
| tree | a5d678a6e7030ab8114f97ba34ae2f3c37c0c4b3 /freetype/src/pcf/pcfdrivr.c | |
| parent | c30d5eefc96925b4bef781806c7a0114eca1b8e0 (diff) | |
| download | vcxsrv-fba3b6d1979c1d1ad0d56d46fc2d787f111c07fb.tar.gz vcxsrv-fba3b6d1979c1d1ad0d56d46fc2d787f111c07fb.tar.bz2 vcxsrv-fba3b6d1979c1d1ad0d56d46fc2d787f111c07fb.zip | |
Updated to freetype 2.5.3
Diffstat (limited to 'freetype/src/pcf/pcfdrivr.c')
| -rw-r--r-- | freetype/src/pcf/pcfdrivr.c | 42 |
1 files changed, 25 insertions, 17 deletions
diff --git a/freetype/src/pcf/pcfdrivr.c b/freetype/src/pcf/pcfdrivr.c index df25a645a..748cbca8f 100644 --- a/freetype/src/pcf/pcfdrivr.c +++ b/freetype/src/pcf/pcfdrivr.c @@ -218,25 +218,24 @@ THE SOFTWARE. FT_FREE( face->metrics ); /* free properties */ + if ( face->properties ) { - PCF_Property prop; - FT_Int i; + FT_Int i; - if ( face->properties ) + for ( i = 0; i < face->nprops; i++ ) { - for ( i = 0; i < face->nprops; i++ ) + PCF_Property prop = &face->properties[i]; + + + if ( prop ) { - prop = &face->properties[i]; - - if ( prop ) - { - FT_FREE( prop->name ); - if ( prop->isString ) - FT_FREE( prop->value.atom ); - } + FT_FREE( prop->name ); + if ( prop->isString ) + FT_FREE( prop->value.atom ); } } + FT_FREE( face->properties ); } @@ -264,11 +263,10 @@ THE SOFTWARE. FT_Parameter* params ) { PCF_Face face = (PCF_Face)pcfface; - FT_Error error = FT_Err_Ok; + FT_Error error; FT_UNUSED( num_params ); FT_UNUSED( params ); - FT_UNUSED( face_index ); FT_TRACE2(( "PCF driver\n" )); @@ -347,6 +345,18 @@ THE SOFTWARE. #endif } + /* PCF could not have multiple face in single font file. + * XXX: non-zero face_index is already invalid argument, but + * Type1, Type42 driver has a convention to return + * an invalid argument error when the font could be + * opened by the specified driver. + */ + if ( face_index > 0 ) { + FT_ERROR(( "PCF_Face_Init: invalid face index\n" )); + PCF_Face_Done( pcfface ); + return FT_THROW( Invalid_Argument ); + } + /* set up charmap */ { FT_String *charset_registry = face->charset_registry; @@ -482,7 +492,7 @@ THE SOFTWARE. FT_UNUSED( load_flags ); - FT_TRACE4(( "load_glyph %d ---", glyph_index )); + FT_TRACE1(( "PCF_Glyph_Load: glyph index %d\n", glyph_index )); if ( !face || glyph_index >= (FT_UInt)face->root.num_glyphs ) { @@ -576,8 +586,6 @@ THE SOFTWARE. ( face->accel.fontAscent + face->accel.fontDescent ) << 6 ); - FT_TRACE4(( " --- ok\n" )); - Exit: return error; } |
