bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fix: RTFConsumer, -currentFont


From: Nicola Pero
Subject: Re: Fix: RTFConsumer, -currentFont
Date: Mon, 2 Sep 2002 15:20:19 +0100 (BST)

> - (NSFont*) currentFont
> {
>   NSFontManager *fm = [NSFontManager sharedFontManager];
>   NSFont *font;
>   //  int weight;
>   
>   font = [NSFont fontWithName: fontName  size: fontSize];
>   
>   if (font == nil)
>     {
>       NSDebugMLLog(@"RTFParser", 
>                  @"Could not find font %@ size %f ", fontName, fontSize);
>       font = [NSFont userFontOfSize: fontSize];
>     }

By the way, if we can't find a font with the name, can't we guess better
than just using 'userFontOfSize:' ?

I think the RTF font table at the beginning of the file specifies an `rtf
font family' for each font, allowing us to replace it with some partially
equivalent font, rather than just getting 'userFontOfSize:'.

If you are interested in fixing this, I'd be happy to check in a patch.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]