Objective-C获取 iPhone全部字体的Fontfamily和FontName

  1. NSArray* familys = [UIFont familyNames];  

  2. for (int i = 0; i<[familys count]; i++) {  

  3.     NSString* family = [familys objectAtIndex:i];  
  4.     NSLog(@"\r\n\r\nFontfamily:%@\r\n=====",family);  

  5.     NSArray* fonts = [UIFont fontNamesForFamilyName:family];  

  6.     for (int j = 0; j<[fonts count]; j++) {  
  7.         NSLog(@"%@",[fonts objectAtIndex:j]);  
  8.     }  
  9. }  
  10. 转自 http://tiny4.org/blog/2010/06/fontfamily-name-fontname-ipad-iphone/

你可能感兴趣的:(Objective-C获取 iPhone全部字体的Fontfamily和FontName)