Removed method -widths. Changed [weigth],

[mostCompatibleStringEncoding] and [traits] to return the ivars.
Set those in [init] to the default values.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7306 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2000-08-31 00:06:49 +00:00
parent f6a7203f71
commit 6320b89750

View file

@ -161,11 +161,12 @@ static GSFontEnumerator *sharedEnumerator = nil;
- init
{
int i;
[super init];
ASSIGN(fontDictionary, [NSMutableDictionary dictionaryWithCapacity:25]);
for (i = 0; i < 256; i++)
widths[i] = 0.0;
weight = 0;
traits = 0;
mostCompatibleStringEncoding = NSASCIIStringEncoding;
return self;
}
@ -174,7 +175,6 @@ static GSFontEnumerator *sharedEnumerator = nil;
RELEASE(fontDictionary);
RELEASE(fontName);
RELEASE(familyName);
RELEASE(weight);
RELEASE(encodingScheme);
[super dealloc];
}
@ -190,7 +190,6 @@ static GSFontEnumerator *sharedEnumerator = nil;
copy->fontDictionary = [fontDictionary copyWithZone: zone];
copy->fontName = [fontName copyWithZone: zone];
copy->familyName = [familyName copyWithZone: zone];
copy->weight = [weight copyWithZone: zone];
copy->encodingScheme = [encodingScheme copyWithZone: zone];
}
return copy;
@ -205,7 +204,6 @@ static GSFontEnumerator *sharedEnumerator = nil;
copy->fontDictionary = [fontDictionary copyWithZone: zone];
copy->fontName = [fontName copyWithZone: zone];
copy->familyName = [familyName copyWithZone: zone];
copy->weight = [weight copyWithZone: zone];
copy->encodingScheme = [encodingScheme copyWithZone: zone];
return copy;
}
@ -310,11 +308,6 @@ static GSFontEnumerator *sharedEnumerator = nil;
return xHeight;
}
- (float*) widths
{
return widths;
}
- (float)defaultLineHeightForFont
{
// ascent plus descent plus some suitable linegap
@ -431,7 +424,7 @@ static GSFontEnumerator *sharedEnumerator = nil;
- (NSStringEncoding)mostCompatibleStringEncoding
{
return NSASCIIStringEncoding;
return mostCompatibleStringEncoding;
}
- (float) widthOfString: (NSString*)string
@ -441,12 +434,12 @@ static GSFontEnumerator *sharedEnumerator = nil;
- (NSFontTraitMask) traits
{
return 0;
return traits;
}
- (int) weight
{
return 0;
return weight;
}
@end