(-initWithFontName:matrix:screenFont:): Return nil if it's not a valid font.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@17088 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Alexander Malmberg 2003-07-02 15:38:35 +00:00
parent 9c3ad84a95
commit 5e9f36d111
2 changed files with 7 additions and 4 deletions

View file

@ -1,3 +1,8 @@
2003-07-02 17:28 Alexander Malmberg <alexander@malmberg.org>
* Source/art/ftfont.m (-initWithFontName:matrix:screenFont:):
Return nil if it's not a valid font.
2003-07-01 16:37 Alexander Malmberg <alexander@malmberg.org>
* Source/art/ftfont.m: Use the correct set of flags when loading

View file

@ -652,10 +652,8 @@ static FT_Error ft_get_face(FTC_FaceID fid, FT_Library lib, FT_Pointer data, FT_
font_entry = [fcfg_all_fonts objectForKey: name];
if (!font_entry)
{
NSLog(@"Warning: font '%@' doesn't exist",name);
name = [fcfg_allFontNames objectAtIndex: 0];
font_entry = [fcfg_all_fonts objectForKey: name];
NSLog(@"falling back to '%@'",name);
[self release];
return nil;
}
face_info = font_entry;