mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-21 08:30:56 +00:00
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:
parent
bef0fa9983
commit
db7b620c03
6 changed files with 45 additions and 28 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue