NSString drawAtPoint/drawInRect
Hello.
I've spent whole day but still can't find a solution...
I'm drawing NSString in NSView intance using method drawInRect:withAttributes
Current code:
NSFont *slFont = [[NSFontManager
sharedFontManager]
fontWithFamily:@"Courier"
traits:NSBoldFontMask
weight:9 size:16.0];
NSDictionary *attr =
[NSDictionary dictionaryWithObjectsAndKeys:
slFont, NSFontAttributeName,
[NSColor greenColor], NSForegroundColorAttributeName,
nil ];
bounds = [self bounds];
bounds.origin.y -= 64;
[@"Hello World" drawInRect:bounds withAttributes:attr];
But it's drawing text with sharp edged font.
Is it possible to get smoothed/antialiased text?
I know there exists Bezier path techniques, but I would not like to use them, because source code becomes too large.