Ho un programma che sto scrivendo. Voglio usare un font di fantasia. Posso semplicemente incorporare il mio carattere nel mio pacchetto e usarlo da lì.Carattere incorporato in un pacchetto mac
Il mio codice ...
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];
Grazie per aver postato questa domanda! Stavo cercando di capire come farlo, e la risposta di Rob Keniger ha funzionato come un incantesimo. Dovresti davvero segnare la sua risposta come risposta accettata. –