iOS 獲取全部字型的Fontfamily和FontName

tian-heng發表於2018-01-23
NSArray* familys = [UIFont familyNames];  
  
for (int i = 0; i<[familys count]; i++) {  
      
    NSString* family = [familys objectAtIndex:i];  
    NSLog(@"\r\n\r\nFontfamily:%@\r\n=====",family);  
  
    NSArray* fonts = [UIFont fontNamesForFamilyName:family];  
  
    for (int j = 0; j<[fonts count]; j++) {  
      
        NSLog(@"%@",[fonts objectAtIndex:j]);  
    }  
}  

相關文章