After rewriting much of my code to transition over to Core Animation,
I've run across a problem with CATextLayer and displaying attributed
strings. The string I am trying to display has a stroke set using
NSStrokeWidthAttributeName. Everything seems to work fine, except
that the text loses it's border whenever it is displayed on the
CATextLayer. Why would all the other attributes hold but this one
gets ignored? Is there a way around this?
Here's a code snippet:
genericPresenterSlideTextAttrs = [NSMutableDictionary
dictionaryWithObjectsAndKeys:
[NSFont fontWithName:presentationFontFamily
size:presentationFontSize], NSFontAttributeName,
[NSNumber numberWithFloat: -10], NSStrokeWidthAttributeName,
presenterSlideTextPara, NSParagraphStyleAttributeName,
[NSColor whiteColor],NSForegroundColorAttributeName,
nil];
presentationTextLayer = [[CATextLayer layer] retain];
presentationTextLayer.string = [[NSAttributedString alloc]
initWithString: [self presentationText] attributes:
genericPresenterSlideTextAttrs];