mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 15:11:37 +00:00
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:
parent
f6a7203f71
commit
6320b89750
1 changed files with 7 additions and 14 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue