Cache used fonts in context

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@11430 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 2001-11-20 05:00:20 +00:00
parent bef0fa9983
commit db7b620c03
6 changed files with 45 additions and 28 deletions

View file

@ -76,11 +76,6 @@ struct NSWindow_struct
@defs(NSWindow)
};
@interface NSFont (NSViewFonts)
+ (void) resetUsedFonts;
+ (NSSet *) usedFonts;
@end
@implementation NSView
/*
@ -2900,7 +2895,7 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
[self endSetup];
}
[NSFont resetUsedFonts];
[ctxt resetUsedFonts];
/* Make sure we set the visible rect so everything is printed. */
[self _rebuildCoordinates];
_visibleRect = _bounds;
@ -2975,7 +2970,7 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
pages = ceil((float)pages / nup);
DPSPrintf(ctxt, "%%%%Pages: %d\n", pages);
}
fontNames = [NSFont usedFonts];
fontNames = [ctxt usedFonts];
if (fontNames && [fontNames count])
{
NSString *name;