I have a program I am writing. I want to use a fancy font. Can I just embed my font into my bundle and use it from there.
My code...
NSMutableAttributedString *recOf;
recOf = [[NSMutableAttributedString alloc] initWithString:@"In Recognition of"];
length = [recOf length];
[recOf addAttribute:NSFontAttributeName value:[NSFont fontWithName:@"Edwardian Script ITC" size:50] range:NSMakeRange(0, length)];
[[NSColor blackColor] set];
p.x = (bounds.size.width/2)- (([recOf size].width)/2);
p.y = (bounds.size.height/1.7);
[recOf drawAtPoint:p];
[recOf release];
See Question&Answers more detail:os