[收起]
文章目錄
1、下載字體
從網上下載你所需要的字體。格式為.ttf的
比如“華文中宋.ttf”
2、在項目中導入字體
3、info.plist中配置字體
4、查看字體名稱
[objc] view plaincopy
- NSArray *familyNames = [UIFont familyNames];
- for( NSString *familyName in familyNames ){
- printf( "Family: %s n", [familyName UTF8String] );
- NSArray *fontNames = [UIFont fontNamesForFamilyName:familyName];
- for( NSString *fontName in fontNames ){
- printf( "tFont: %s n", [fontName UTF8String] );
- }
- }
5、完成字體選擇