sizeToFit, NSTextField and voodoo text rendering on Mac OS X 10.3.9
sizeToFit, NSTextField and voodoo text rendering on Mac OS X 10.3.9
- Subject: sizeToFit, NSTextField and voodoo text rendering on Mac OS X 10.3.9
- From: Stephane Sudre <email@hidden>
- Date: Tue, 8 Nov 2005 15:10:56 +0100
I have 2 NSTextField in a NSWindow which I'm sizeToFitting (the
NSTextFields not the window).
Everything works fine at this point.
Then I resize the window (with code) and while the NSTextFields are not
resized, the final result is that the text in the 2 NSTextFields is
partially cut.
This is not a refresh issue since when I resize the window manually,
the problem stays.
I know that text rendering in Mac OS X is not a perfect science because
for instance there used/is a bug in Installer.app where the last point
for the Welcome string is sometimes render on a line alone contrary to
the usual case. Not to mention the strange renderings there used to be
when the string box starts or ends outside the Window frame.
But I'm wondering if this is not a problem with sizeToFit which is not
sizeToFitting contrary to its name and which would produce incorrect
results.
From experience, I know there is/was also a bug in the
sizeWithAttributes: method of NSString where the returned size width
was incorrect on OS X 10.2 (1 pixel too short IIRC).
Could it be that sizeToFit is not a supported API?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden