* src/winfonts/winfnt.c (FNT_Face_Init): Check first that the driver

can handle the font at all, then check `face_index'.  Otherwise, the
driver might return the wrong error code.  This fixes Savannah bug
#21468.
This commit is contained in:
Werner Lemberg 2007-10-29 22:00:58 +00:00
parent e77b6c4955
commit 27649fb62b
2 changed files with 10 additions and 7 deletions

View File

@ -1,3 +1,10 @@
2006-10-29 Daniel Svoboda <dasvo@planeta@cz>
* src/winfonts/winfnt.c (FNT_Face_Init): Check first that the driver
can handle the font at all, then check `face_index'. Otherwise, the
driver might return the wrong error code. This fixes Savannah bug
#21468.
2006-10-21 Werner Lemberg <wl@gnu.org>
* src/sfnt/sfobjs.c (sfnt_load_face): Support bit 9 and prepare

View File

@ -697,13 +697,6 @@
/* this didn't work; try to load a single FNT font */
FNT_Font font;
if ( face_index > 0 )
{
error = FNT_Err_Bad_Argument;
goto Exit;
}
if ( FT_NEW( face->font ) )
goto Exit;
@ -714,6 +707,9 @@
font->fnt_size = stream->size;
error = fnt_font_load( font, stream );
if ( !error && face_index > 0 )
error = FNT_Err_Bad_Argument;
}
if ( error )