My app draws layer-backed labels over a NSImageView
.
The image view displays an image, and a tint color over that image.
This ensures that the contrast between the labels and the background image works.
As you can see, subpixel antialiasing is enabled and works correctly.
When you hover over those labels, they animate the frame
property (Actually the view containing them).
While animating, the subpixel antialiasing is disabled, and when done enabled again.
This looks incredibly weird.
The layer is never redrawn, and the subpixel antialiasing doesn't have to change.
So I don't see a good reason why it shouldn't be displayed when animating.
I've tried everything I can think of.
- Making the
NSTextField
opaque - Making the
CATextLayer
opaque - Giving the
NSTextField
a background-color - Giving the
CATextLayer
a background-color
Always the same result.
Disabling subpixel antialiasing for the labels is not an option, since it's not well readable on non-retina devices.
EDIT
I forgot that the layer is replaced with a presentationLayer
while animating.
This layer probably does not support subpixel antialiasing, which is why it's disabled.
Now the question is if I can replace this presentationLayer
with a CATextLayer
.
What I also noticed is that setting shouldRasterize
to YES
enabled subpixel antialiasing also for animation, but only against the background color. So no background-color will bring no subpixel antialiasing.