Let the font manager handle the font convertion for font subsitution.

Correct printing for the case where we know the page range.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25386 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2007-08-12 20:12:19 +00:00
parent f6460ab632
commit 1a13394fea
3 changed files with 61 additions and 23 deletions

View file

@ -47,6 +47,7 @@
#include "AppKit/NSColor.h"
#include "AppKit/NSFileWrapper.h"
#include "AppKit/NSFont.h"
#include "AppKit/NSFontManager.h"
// For the colour name spaces
#include "AppKit/NSGraphics.h"
@ -989,8 +990,7 @@ static NSMutableDictionary *cachedCSets = nil;
- (NSFont*)_substituteFontWithName: (NSString*)fontName font: (NSFont*)baseFont
{
// FIXME: Catch case were baseFont is nil
return [NSFont fontWithName: fontName matrix: [baseFont matrix]];
return [[NSFontManager sharedFontManager] convertFont: baseFont toFace: fontName];
}
- (NSFont*)_substituteFontFor: (unichar)uchar font: (NSFont*)baseFont fromList: (NSArray *)fonts