Ios代碼
NSArray *array = [UIFont familyNames];
NSString *familyName ;
NSMutableArray *fontNames = [[NSMutableArray alloc] init];
for(familyName in array)
{
NSArray *names = [UIFont fontNamesForFamilyName:familyName];
[fontNames addObjectsFromArray:names];
}
[fontNames release];
NSLog(@"%@", fontNames);
NSArray *array = [UIFont familyNames];
NSString *familyName ;
NSMutableArray *fontNames = [[NSMutableArray alloc] init];
for(familyName in array)
{
NSArray *names = [UIFont fontNamesForFamilyName:familyName];
[fontNames addObjectsFromArray:names];
}
[fontNames release];
NSLog(@"%@", fontNames);
輸出結果:
Ios代碼
2011-10-30 14:25:11.901 Font[4695:b603] (
ArialHebrew,
"ArialHebrew-Bold",
Zapfino,
"OriyaSangamMN-Bold",
OriyaSangamMN,
"Cochin-BoldItalic",
Cochin,
"Cochin-Bold",
"Cochin-Italic",
Baskerville,
"Baskerville-Italic",
"Baskerville-BoldItalic",
"Baskerville-Bold",
"Palatino-Roman",
"Palatino-BoldItalic",
"Palatino-Italic",
"Palatino-Bold",
"ChalkboardSE-Bold",
"ChalkboardSE-Regular",
"GurmukhiMN-Bold",
GurmukhiMN,
Verdana,
"Verdana-Bold",
"Verdana-BoldItalic",
"Verdana-Italic",
"TamilSangamMN-Bold",
TamilSangamMN,
"MarkerFelt-Thin",
"MarkerFelt-Wide",
"CourierNewPS-BoldItalicMT",
"CourierNewPS-BoldMT",
"CourierNewPS-ItalicMT",
CourierNewPSMT,
"Courier-Bold",
Courier,
"Courier-BoldOblique",
"Courier-Oblique",
"TrebuchetMS-Italic",
"TrebuchetMS-Bold",
TrebuchetMS,
"Trebuchet-BoldItalic",
DBLCDTempBlack,
AppleColorEmoji,
ArialRoundedMTBold,
"BanglaSangamMN-Bold",
BanglaSangamMN,
TeluguSangamMN,
"TeluguSangamMN-Bold",
AmericanTypewriter,
"AmericanTypewriter-Bold",
"Arial-ItalicMT",
"Arial-BoldItalicMT",
ArialMT,
"Arial-BoldMT",
"Kailasa-Bold",
Kailasa,
AppleGothic,
"HiraKakuProN-W6",
"HiraKakuProN-W3",
"STHeitiSC-Medium",
"STHeitiSC-Light",
"MalayalamSangamMN-Bold",
MalayalamSangamMN,
"Thonburi-Bold",
Thonburi,
"Helvetica-BoldOblique",
Helvetica,
"Helvetica-Bold",
"Helvetica-Oblique",
"Noteworthy-Bold",
"Noteworthy-Light",
GujaratiSangamMN,
"GujaratiSangamMN-Bold",
"STHeitiK-Medium",
"STHeitiK-Light",
"Futura-MediumItalic",
"Futura-CondensedExtraBold",
"Futura-Medium",
"DevanagariSangamMN-Bold",
DevanagariSangamMN,
"STHeitiTC-Light",
"STHeitiTC-Medium",
"SinhalaSangamMN-Bold",
SinhalaSangamMN,
KannadaSangamMN,
"KannadaSangamMN-Bold",
"Georgia-BoldItalic",
Georgia,
"Georgia-Bold",
"Georgia-Italic",
"STHeitiJ-Medium",
"STHeitiJ-Light",
"TimesNewRomanPS-BoldItalicMT",
"TimesNewRomanPS-ItalicMT",
TimesNewRomanPSMT,
"TimesNewRomanPS-BoldMT",
SnellRoundhand,
"SnellRoundhand-Bold",
GeezaPro,
"GeezaPro-Bold",
"HelveticaNeue-Italic",
"HelveticaNeue-Bold",
"HelveticaNeue-BoldItalic",
HelveticaNeue
)
2011-10-30 14:25:11.901 Font[4695:b603] (
ArialHebrew,
"ArialHebrew-Bold",
Zapfino,
"OriyaSangamMN-Bold",
OriyaSangamMN,
"Cochin-BoldItalic",
Cochin,
"Cochin-Bold",
"Cochin-Italic",
Baskerville,
"Baskerville-Italic",
"Baskerville-BoldItalic",
"Baskerville-Bold",
"Palatino-Roman",
"Palatino-BoldItalic",
"Palatino-Italic",
"Palatino-Bold",
"ChalkboardSE-Bold",
"ChalkboardSE-Regular",
"GurmukhiMN-Bold",
GurmukhiMN,
Verdana,
"Verdana-Bold",
"Verdana-BoldItalic",
"Verdana-Italic",
"TamilSangamMN-Bold",
TamilSangamMN,
"MarkerFelt-Thin",
"MarkerFelt-Wide",
"CourierNewPS-BoldItalicMT",
"CourierNewPS-BoldMT",
"CourierNewPS-ItalicMT",
CourierNewPSMT,
"Courier-Bold",
Courier,
"Courier-BoldOblique",
"Courier-Oblique",
"TrebuchetMS-Italic",
"TrebuchetMS-Bold",
TrebuchetMS,
"Trebuchet-BoldItalic",
DBLCDTempBlack,
AppleColorEmoji,
ArialRoundedMTBold,
"BanglaSangamMN-Bold",
BanglaSangamMN,
TeluguSangamMN,
"TeluguSangamMN-Bold",
AmericanTypewriter,
"AmericanTypewriter-Bold",
"Arial-ItalicMT",
"Arial-BoldItalicMT",
ArialMT,
"Arial-BoldMT",
"Kailasa-Bold",
Kailasa,
AppleGothic,
"HiraKakuProN-W6",
"HiraKakuProN-W3",
"STHeitiSC-Medium",
"STHeitiSC-Light",
"MalayalamSangamMN-Bold",
MalayalamSangamMN,
"Thonburi-Bold",
Thonburi,
"Helvetica-BoldOblique",
Helvetica,
"Helvetica-Bold",
"Helvetica-Oblique",
"Noteworthy-Bold",
"Noteworthy-Light",
GujaratiSangamMN,
"GujaratiSangamMN-Bold",
"STHeitiK-Medium",
"STHeitiK-Light",
"Futura-MediumItalic",
"Futura-CondensedExtraBold",
"Futura-Medium",
"DevanagariSangamMN-Bold",
DevanagariSangamMN,
"STHeitiTC-Light",
"STHeitiTC-Medium",
"SinhalaSangamMN-Bold",
SinhalaSangamMN,
KannadaSangamMN,
"KannadaSangamMN-Bold",
"Georgia-BoldItalic",
Georgia,
"Georgia-Bold",
"Georgia-Italic",
"STHeitiJ-Medium",
"STHeitiJ-Light",
"TimesNewRomanPS-BoldItalicMT",
"TimesNewRomanPS-ItalicMT",
TimesNewRomanPSMT,
"TimesNewRomanPS-BoldMT",
SnellRoundhand,
"SnellRoundhand-Bold",
GeezaPro,
"GeezaPro-Bold",
"HelveticaNeue-Italic",
"HelveticaNeue-Bold",
"HelveticaNeue-BoldItalic",
HelveticaNeue
)
作者jsntghf