mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-25 08:00:58 +00:00
Implement methods to modify font collections
This commit is contained in:
parent
f6555d14b0
commit
fac43795d6
1 changed files with 7 additions and 6 deletions
|
@ -94,6 +94,7 @@ static NSMutableDictionary *__sharedFontCollectionsVisibility;
|
||||||
[super dealloc];
|
[super dealloc];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This method will get the actual list of fonts
|
||||||
- (void) _runQueryWithDescriptors: (NSArray *)queryDescriptors
|
- (void) _runQueryWithDescriptors: (NSArray *)queryDescriptors
|
||||||
{
|
{
|
||||||
NSEnumerator *en = [queryDescriptors objectEnumerator];
|
NSEnumerator *en = [queryDescriptors objectEnumerator];
|
||||||
|
@ -113,8 +114,6 @@ static NSMutableDictionary *__sharedFontCollectionsVisibility;
|
||||||
[_fonts addObject: font];
|
[_fonts addObject: font];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (NSFontCollection *) fontCollectionWithDescriptors: (NSArray *)queryDescriptors
|
+ (NSFontCollection *) fontCollectionWithDescriptors: (NSArray *)queryDescriptors
|
||||||
|
@ -155,7 +154,9 @@ static NSMutableDictionary *__sharedFontCollectionsVisibility;
|
||||||
toName: (NSFontCollectionName)name
|
toName: (NSFontCollectionName)name
|
||||||
error: (NSError **)error
|
error: (NSError **)error
|
||||||
{
|
{
|
||||||
return NO;
|
NSFontCollection *fc = [__sharedFontCollections objectForKey: aname];
|
||||||
|
[__sharedFontCollections setObject: fc forKey: name];
|
||||||
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (NSArray *) allFontCollectionNames
|
+ (NSArray *) allFontCollectionNames
|
||||||
|
@ -165,7 +166,7 @@ static NSMutableDictionary *__sharedFontCollectionsVisibility;
|
||||||
|
|
||||||
+ (NSFontCollection *) fontCollectionWithName: (NSFontCollectionName)name
|
+ (NSFontCollection *) fontCollectionWithName: (NSFontCollectionName)name
|
||||||
{
|
{
|
||||||
return nil;
|
return [__sharedFontCollections objectForKey: name];
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (NSFontCollection *) fontCollectionWithName: (NSFontCollectionName)name
|
+ (NSFontCollection *) fontCollectionWithName: (NSFontCollectionName)name
|
||||||
|
@ -177,12 +178,12 @@ static NSMutableDictionary *__sharedFontCollectionsVisibility;
|
||||||
// Descriptors
|
// Descriptors
|
||||||
- (NSArray *) queryDescriptors // copy
|
- (NSArray *) queryDescriptors // copy
|
||||||
{
|
{
|
||||||
return _queryDescriptors;
|
return [_queryDescriptors copy];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSArray *) exclusionDescriptors
|
- (NSArray *) exclusionDescriptors
|
||||||
{
|
{
|
||||||
return _exclusionDescriptors;
|
return [_exclusionDescriptors copy];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSArray *) matchingDescriptors
|
- (NSArray *) matchingDescriptors
|
||||||
|
|
Loading…
Reference in a new issue