twitter-archive / twui

A UI framework for Mac based on Core Animation
Other
2.74k stars 268 forks source link

TUILabel - jagged text when background color is clearColor #129

Closed gcox closed 12 years ago

gcox commented 12 years ago

When a TUILabel's background color is set to clearColor the text that renders is jagged and ugly, the text looks perfect with any other background color. Is it known problem? Any workaround?

I have tried setting it's opaque property to NO but it doesn't affect the rendered text.

dannygreg commented 12 years ago

This is due to a lack of sub-pixel anti aliasing and a known problem for Core Animation (although this was fixed in 10.8). Have a look at TUITextRenderer as it is more likely what you want to be using in this case.

gcox commented 12 years ago

I see, I was under the impression that TUI controls dealt with this issue by using TUITextRenderer internally, is it safe to assume that all TUI controls will behave this way in 10.7?

dannygreg commented 12 years ago

They do use TUITextRenderer… it's just impossible to draw text onto a clear background and have SPAA work. Hence TUILabel suffers.