bug-gnustep
[Top][All Lists]
Advanced

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

Re: Fix, NSFont, XGFont (was RTFConsumer)


From: Fred Kiefer
Subject: Re: Fix, NSFont, XGFont (was RTFConsumer)
Date: Thu, 10 Oct 2002 12:37:31 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.8) Gecko/20020204

Most of this patch looks fine for me. What is missing is the special handling now needed for the getNSFont() function. Here we should make sure, that we always return a usefull font. As the only font we can be sure about is the user font in the default size we should return this, if any font is missing here. Not returning any font here will screw up the system as we always expect the font attribute to be set to usable value.

Fred


Georg Fleischmann wrote:
Looks like [NSFont -initWithName:matrix:] is our own extension, and likely
it should return nil if the font can't be found (it now returns the
default font if I understand correctly).

In that case I suppose we need to change GSFontInfo to return nil (rather
than a font info for a default font) if the font is not found.

NSFont -initWithName:matrix: will then check the created font info, and if
it's nil, it will destroy self and return (nil) as well.


Now, with the changes NSFontManager's -convertFont methods work as they should. All seems to work fine - I got no crash :-) My suggested RTFConsumer changes work much better, too. I will send the RTFConsumer patch in a separate mail with some additional comments.







reply via email to

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