X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=reactos%2Flib%2F3rdparty%2Ffreetype%2Fsrc%2Fbdf%2Fbdfdrivr.c;h=caa142b5ef428b7ce2b1566bb4ec5d79cdff70fc;hp=0ea0a5ea5eb36ef2675ad714e39a730454177933;hb=2b1527a42167cd8aeb5a9ef18c599e43d1254879;hpb=50c9a384f470a1d9f54ba00f3018ac2f072893c2 diff --git a/reactos/lib/3rdparty/freetype/src/bdf/bdfdrivr.c b/reactos/lib/3rdparty/freetype/src/bdf/bdfdrivr.c index 0ea0a5ea5eb..caa142b5ef4 100644 --- a/reactos/lib/3rdparty/freetype/src/bdf/bdfdrivr.c +++ b/reactos/lib/3rdparty/freetype/src/bdf/bdfdrivr.c @@ -351,7 +351,6 @@ THE SOFTWARE. FT_UNUSED( num_params ); FT_UNUSED( params ); - FT_UNUSED( face_index ); FT_TRACE2(( "BDF driver\n" )); @@ -375,6 +374,19 @@ THE SOFTWARE. /* we have a bdf font: let's construct the face object */ face->bdffont = font; + + /* BDF 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(( "BDF_Face_Init: invalid face index\n" )); + BDF_Face_Done( bdfface ); + return FT_THROW( Invalid_Argument ); + } + { bdf_property_t* prop = NULL; @@ -674,6 +686,8 @@ THE SOFTWARE. goto Exit; } + FT_TRACE1(( "BDF_Glyph_Load: glyph index %d\n", glyph_index )); + /* index 0 is the undefined glyph */ if ( glyph_index == 0 ) glyph_index = bdf->default_glyph;