Simple printint implementation

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@11341 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 2001-11-08 18:26:39 +00:00
parent 81915f4a3c
commit 04a3436aff
119 changed files with 4892 additions and 3621 deletions

View file

@ -45,6 +45,9 @@ static BOOL boldSystemCacheNeedsRecomputing = NO;
static BOOL userCacheNeedsRecomputing = NO;
static BOOL userFixedCacheNeedsRecomputing = NO;
/* Set used to keep track of fonts we are using */
static NSMutableSet *usedFonts = nil;
@interface NSFont (Private)
- (id) initWithName: (NSString*)name
matrix: (const float*)fontMatrix;
@ -394,9 +397,21 @@ setNSFont(NSString* key, NSFont* font)
+ (void) useFont: (NSString*)name
{
NSGraphicsContext *ctxt = GSCurrentContext();
if (usedFonts == nil)
usedFonts = RETAIN([NSMutableSet setWithCapacity: 2]);
[ctxt useFont: name];
[usedFonts addObject: name];
}
+ (void) resetUsedFonts
{
if (usedFonts)
[usedFonts removeAllObjects];
}
+ (NSSet *) usedFonts
{
return usedFonts;
}
//
@ -497,7 +512,7 @@ setNSFont(NSString* key, NSFont* font)
NSGraphicsContext *ctxt = GSCurrentContext();
[ctxt setFont: self];
[ctxt useFont: fontName];
[NSFont useFont: fontName];
}
//