在应用程序委托的
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions方法中添加如下代码,即可打印出设备支持的字体列表,代码如下:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions方法中添加如下代码,即可打印出设备支持的字体列表,代码如下:
for(NSString *family in [UIFont familyNames]){
NSLog(@"family:%@",family);
for(NSString *font in [UIFont fontNamesForFamilyName:family]){
NSLog(@"\t%@",font);
}
}