Override the new default font name methods.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@17468 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Alexander Malmberg 2003-08-10 21:31:12 +00:00
parent 7aa7388f5a
commit 957a0e4d76
2 changed files with 40 additions and 7 deletions

View file

@ -1,3 +1,8 @@
2003-08-10 23:26 Alexander Malmberg <alexander@malmberg.org>
* Source/art/ftfont.m: Override the new default font name methods.
Log the glyph when logging FTC_SBitCache_Lookup errors.
2003-08-09 Fred Kiefer <FredKiefer@gmx.de>
* Tools/xpbs.m

View file

@ -576,11 +576,39 @@ static void load_font_configuration(void)
@end
@implementation FTFontEnumerator
- (void) enumerateFontsAndFamilies
-(void) enumerateFontsAndFamilies
{
ASSIGN(allFontNames, fcfg_allFontNames);
ASSIGN(allFontFamilies, fcfg_allFontFamilies);
}
-(NSString *) defaultSystemFontName
{
if ([fcfg_allFontNames containsObject: @"BitstreamVeraSans-Roman"])
return @"BitstreamVeraSans-Roman";
if ([fcfg_allFontNames containsObject: @"FreeSans"])
return @"FreeSans";
return @"Helvetica";
}
-(NSString *) defaultBoldSystemFontName
{
if ([fcfg_allFontNames containsObject: @"BitstreamVeraSans-Bold"])
return @"BitstreamVeraSans-Bold";
if ([fcfg_allFontNames containsObject: @"FreeSansBold"])
return @"FreeSansBold";
return @"Helvetica-Bold";
}
-(NSString *) defaultFixedPitchFontName
{
if ([fcfg_allFontNames containsObject: @"BitstreamVeraSansMono-Roman"])
return @"BitstreamVeraSansMono-Roman";
if ([fcfg_allFontNames containsObject: @"FreeMono"])
return @"FreeMono";
return @"Courier";
}
@end
@ -988,8 +1016,8 @@ static FT_Error ft_get_face(FTC_FaceID fid, FT_Library lib, FT_Pointer data, FT_
{
if ((error=FTC_SBitCache_Lookup(ftc_sbitcache, &cur, glyph, &sbit, NULL)))
{
NSLog(@"FTC_SBitCache_Lookup() failed with error %08x (%08x, %ix%i, %08x)\n",
error, cur.font.face_id, cur.font.pix_width, cur.font.pix_height,
NSLog(@"FTC_SBitCache_Lookup() failed with error %08x (%08x, %08x, %ix%i, %08x)\n",
error, glyph, cur.font.face_id, cur.font.pix_width, cur.font.pix_height,
#ifdef FT212_STUFF
cur.type
#else
@ -1372,8 +1400,8 @@ static FT_Error ft_get_face(FTC_FaceID fid, FT_Library lib, FT_Pointer data, FT_
{
if ((error=FTC_SBitCache_Lookup(ftc_sbitcache, &cur, glyph, &sbit, NULL)))
{
NSLog(@"FTC_SBitCache_Lookup() failed with error %08x (%08x, %ix%i, %08x)\n",
error, cur.font.face_id, cur.font.pix_width, cur.font.pix_height,
NSLog(@"FTC_SBitCache_Lookup() failed with error %08x (%08x, %08x, %ix%i, %08x)\n",
error, glyph, cur.font.face_id, cur.font.pix_width, cur.font.pix_height,
#ifdef FT212_STUFF
cur.type
#else
@ -1695,8 +1723,8 @@ static FT_Error ft_get_face(FTC_FaceID fid, FT_Library lib, FT_Pointer data, FT_
if ((error=FTC_SBitCache_Lookup(ftc_sbitcache, &cur, glyph, &sbit, NULL)))
{
NSLog(@"FTC_SBitCache_Lookup() failed with error %08x (%08x, %ix%i, %08x)\n",
error, cur.font.face_id, cur.font.pix_width, cur.font.pix_height,
NSLog(@"FTC_SBitCache_Lookup() failed with error %08x (%08x, %08x, %ix%i, %08x)\n",
error, glyph, cur.font.face_id, cur.font.pix_width, cur.font.pix_height,
#ifdef FT212_STUFF
cur.type
#else