bug-gnustep
[Top][All Lists]
Advanced

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

Re: Fix: RTFConsumer, -currentFont


From: Georg Fleischmann
Subject: Re: Fix: RTFConsumer, -currentFont
Date: Tue, 3 Sep 2002 21:53:18 GMT

Hi Nicola,

> What about taking a completely different approach in the method, and
> instead doing a
>
> [NSFont fontWithName: fontName  size: fontSize];

Well, this brought up a problem with [NSFont fontWithName:size:]:
If the desired font is not available, the method returns a default font  
instead of nil (OpenStep 4.2 returns nil in this case).

Consequently, further up the chain, [NSFontManager convertFont:toFace:]  
returns the default font too. This should return the unmodified font, if the  
face is not avalable (and it indeed would, if the above method would return  
nil).

If I modify [NSFont fontWithName:size:] to return nil, all the places show up  
(seg fault), which can't handle the nil font. Quite some places...
Anyway, I feel this should to be fixed, before further optimizing the font  
handling in the RTFConsumer.

What do you think ?

Georg




reply via email to

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