Re: Halo around NSTextField
Re: Halo around NSTextField
- Subject: Re: Halo around NSTextField
- From: Nicko van Someren <email@hidden>
- Date: Wed, 1 Jun 2005 14:57:04 +0100
On 1 Jun 2005, at 13:09, Stefan Schüßler wrote:
I have a transparent (e.g. 50% black) window with NSTextFields.
Depending on the text color there's a small halo around the text:
...
Is this a general text rending bug?
Yes and no. What I think you are seeing is the anti-aliasing of the
text showing up as opaque pixels of greys graduated between the text
colour and the nominal background _colour_ of your window. You
should be able to confirm this by parking your 50% transparent window
over a background of a bright colour; the halo will be pure grey
while the window background will be the colour behind washed out by 50%.
As far as I can tell the Apple text rendering system only anti-
aliases the colour of things it draws, not the opacity, which is a
pity. If the text you want to display is fairly static you can
render it into a grey scale image and then composite that image into
the opacity layer of an otherwise black image of the same size.
Other than that I don't think that there is a simple way to draw
directly into the opacity layer so until the Apple give us a switch
to enable anti-aliased opacity this is always going to require some
fiddling to make it look good. If there's a better way I'm sure
someone from Apple on this list will let us know!
Cheers,
Nicko
_______________________________________________
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