Keep track of the family name so FTFontInfo can return it correctly.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@14440 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Alexander Malmberg 2002-09-14 11:39:51 +00:00
parent 9e2790a4f3
commit 4b78053b0b
2 changed files with 11 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2002-09-14 13:39 Alexander Malmberg <alexander@malmberg.org>
* Source/art/ftfont.m: Keep track of the family name in FTFaceInfo
so FTFontInfo can set it correctly.
2002-09-14 13:03 Alexander Malmberg <alexander@malmberg.org>
* Source/art/ftfont.m: Add support for some simple rendering hints

View file

@ -96,6 +96,8 @@ static NSMutableSet *families_seen, *families_pending;
@interface FTFaceInfo : NSObject
{
@public
NSString *familyName;
NSArray *files;
int weight;
unsigned int traits;
@ -248,6 +250,7 @@ static void add_face(NSString *family, NSString *face, NSDictionary *d,
return;
}
[families_pending addObject: family];
family = [families_pending member: family];
// NSLog(@"split %@ to '%@' '%@' %04x %i", full_name, family, face, traits, weight);
}
@ -292,6 +295,8 @@ static void add_face(NSString *family, NSString *face, NSDictionary *d,
else
fi->render_hints_hack=0x10002;
fi->familyName = [family copy];
NSDebugLLog(@"ftfont", @"adding '%@' '%@'", full_name, fi);
// printf("'%@' fi=|%@|\n", full_name, fi);
@ -511,6 +516,7 @@ static FT_Error ft_get_face(FTC_FaceID fid, FT_Library lib, FT_Pointer data, FT_
traits = font_entry->traits;
fontName = [name copy];
familyName = face_info->familyName;
memcpy(matrix, fmatrix, sizeof(matrix));
/* TODO: somehow make gnustep-gui send unicode our way. utf8? ugly, but it works */