mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 22:00:46 +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
aaa3ee6255
commit
bbbea06c66
1 changed files with 7 additions and 14 deletions
|
@ -161,11 +161,12 @@ static GSFontEnumerator *sharedEnumerator = nil;
|
||||||
|
|
||||||
- init
|
- init
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
[super init];
|
[super init];
|
||||||
ASSIGN(fontDictionary, [NSMutableDictionary dictionaryWithCapacity:25]);
|
ASSIGN(fontDictionary, [NSMutableDictionary dictionaryWithCapacity:25]);
|
||||||
for (i = 0; i < 256; i++)
|
weight = 0;
|
||||||
widths[i] = 0.0;
|
traits = 0;
|
||||||
|
mostCompatibleStringEncoding = NSASCIIStringEncoding;
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -174,7 +175,6 @@ static GSFontEnumerator *sharedEnumerator = nil;
|
||||||
RELEASE(fontDictionary);
|
RELEASE(fontDictionary);
|
||||||
RELEASE(fontName);
|
RELEASE(fontName);
|
||||||
RELEASE(familyName);
|
RELEASE(familyName);
|
||||||
RELEASE(weight);
|
|
||||||
RELEASE(encodingScheme);
|
RELEASE(encodingScheme);
|
||||||
[super dealloc];
|
[super dealloc];
|
||||||
}
|
}
|
||||||
|
@ -190,7 +190,6 @@ static GSFontEnumerator *sharedEnumerator = nil;
|
||||||
copy->fontDictionary = [fontDictionary copyWithZone: zone];
|
copy->fontDictionary = [fontDictionary copyWithZone: zone];
|
||||||
copy->fontName = [fontName copyWithZone: zone];
|
copy->fontName = [fontName copyWithZone: zone];
|
||||||
copy->familyName = [familyName copyWithZone: zone];
|
copy->familyName = [familyName copyWithZone: zone];
|
||||||
copy->weight = [weight copyWithZone: zone];
|
|
||||||
copy->encodingScheme = [encodingScheme copyWithZone: zone];
|
copy->encodingScheme = [encodingScheme copyWithZone: zone];
|
||||||
}
|
}
|
||||||
return copy;
|
return copy;
|
||||||
|
@ -205,7 +204,6 @@ static GSFontEnumerator *sharedEnumerator = nil;
|
||||||
copy->fontDictionary = [fontDictionary copyWithZone: zone];
|
copy->fontDictionary = [fontDictionary copyWithZone: zone];
|
||||||
copy->fontName = [fontName copyWithZone: zone];
|
copy->fontName = [fontName copyWithZone: zone];
|
||||||
copy->familyName = [familyName copyWithZone: zone];
|
copy->familyName = [familyName copyWithZone: zone];
|
||||||
copy->weight = [weight copyWithZone: zone];
|
|
||||||
copy->encodingScheme = [encodingScheme copyWithZone: zone];
|
copy->encodingScheme = [encodingScheme copyWithZone: zone];
|
||||||
return copy;
|
return copy;
|
||||||
}
|
}
|
||||||
|
@ -310,11 +308,6 @@ static GSFontEnumerator *sharedEnumerator = nil;
|
||||||
return xHeight;
|
return xHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (float*) widths
|
|
||||||
{
|
|
||||||
return widths;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (float)defaultLineHeightForFont
|
- (float)defaultLineHeightForFont
|
||||||
{
|
{
|
||||||
// ascent plus descent plus some suitable linegap
|
// ascent plus descent plus some suitable linegap
|
||||||
|
@ -431,7 +424,7 @@ static GSFontEnumerator *sharedEnumerator = nil;
|
||||||
|
|
||||||
- (NSStringEncoding)mostCompatibleStringEncoding
|
- (NSStringEncoding)mostCompatibleStringEncoding
|
||||||
{
|
{
|
||||||
return NSASCIIStringEncoding;
|
return mostCompatibleStringEncoding;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (float) widthOfString: (NSString*)string
|
- (float) widthOfString: (NSString*)string
|
||||||
|
@ -441,12 +434,12 @@ static GSFontEnumerator *sharedEnumerator = nil;
|
||||||
|
|
||||||
- (NSFontTraitMask) traits
|
- (NSFontTraitMask) traits
|
||||||
{
|
{
|
||||||
return 0;
|
return traits;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) weight
|
- (int) weight
|
||||||
{
|
{
|
||||||
return 0;
|
return weight;
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue