• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Halo around NSTextField
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >Halo around NSTextField (From: Stefan Schüßler <email@hidden>)

  • Prev by Date: Re: Halo around NSTextField
  • Next by Date: Re: Can a System Services NSKeyEquivalent be a cursor key?
  • Previous by thread: Re: Halo around NSTextField
  • Next by thread: Re: Halo around NSTextField
  • Index(es):
    • Date
    • Thread