如何通过编程检查NSFont是否包含类似"°"的unicode字符?
好的,试试这个:
NSFont *font = [NSFont fontWithName:@"Arial" size:14.0];
NSCharacterSet *set = [font coveredCharacterSet];
if (![set characterIsMember:[@"°" characterAtIndex:0]]) {
NSLog(@"Failed");
} else {
NSLog(@"Success");
}