Monday, August 16, 2010

Fonts and Font Families

Posted by Hidayat Hidayat at 3:42 PM
I'm not sure if Apple publishes an official list of supported fonts on iOS, but when working with designers, it's a questions that we developers often need the answer too. Fortunately, it's easy enough to determine it. In fact, the code to generate the list of fonts is the first (and so far only) thing that I've put into Xcode 4's new snippet feature. I'm generally not a big snippet fan. If I use code enough that I feel a need to have it as a snippet, more often than not, it makes sense to encapsulate that functionality generically in a class or category or as part of a common library.

But, there are definitely pieces of code that it's good to have around and that don't really lend themselves to that. Here's my snippet for generating font and family names. Cherish this; I slaved for hours over it. Well, okay… maybe not hours, but it did take me a minute or two to type it in.

for (NSString *family in [UIFont familyNames])
{
NSLog(@"%@", family);
for (NSString *font in [UIFont fontNamesForFamilyName:family])
{
NSLog(@"\t%@", font);
}

}


The result of running this code on the current version of iOS 4 (4.0.2 / 8A400) follows. It's a handy list to provide the designers you work with so they know if they use a font not on the list, you'll have to substitute something else, or whoever's footing the bill will have to cough up potentially expensive font licensing fees.

If you want to see what the fonts actually look like, Michael Critz has put together this nice page that shows them all

Arial Hebrew
ArialHebrew-Bold
ArialHebrew
Zapfino
Zapfino
Oriya Sangam MN
OriyaSangamMN
OriyaSangamMN-Bold
Cochin
Cochin
Cochin-BoldItalic
Cochin-Italic
Cochin-Bold
Baskerville
Baskerville
Baskerville-BoldItalic
Baskerville-Italic
Baskerville-Bold
Verdana
Verdana-Bold
Verdana-BoldItalic
Verdana-Italic
Verdana
Gurmukhi MN
GurmukhiMN
GurmukhiMN-Bold
Palatino
Palatino-BoldItalic
Palatino-Italic
Palatino-Bold
Palatino-Roman
Tamil Sangam MN
TamilSangamMN-Bold
TamilSangamMN
Marker Felt
MarkerFelt-Wide
MarkerFelt-Thin
Courier New
CourierNewPS-BoldMT
CourierNewPS-ItalicMT
CourierNewPS-BoldItalicMT
CourierNewPSMT
Courier
Courier-Oblique
Courier
Courier-Bold
Courier-BoldOblique
DB LCD Temp
DBLCDTempBlack
Trebuchet MS
TrebuchetMS-Italic
Trebuchet-BoldItalic
TrebuchetMS
TrebuchetMS-Bold
Arial Rounded MT Bold
ArialRoundedMTBold
Bangla Sangam MN
BanglaSangamMN
BanglaSangamMN-Bold
Telugu Sangam MN
TeluguSangamMN
TeluguSangamMN-Bold
American Typewriter
AmericanTypewriter-Bold
AmericanTypewriter
Arial
ArialMT
Arial-ItalicMT
Arial-BoldMT
Arial-BoldItalicMT
Hiragino Kaku Gothic ProN
HiraKakuProN-W3
HiraKakuProN-W6
AppleGothic
AppleGothic
Heiti SC
STHeitiSC-Light
STHeitiSC-Medium
Malayalam Sangam MN
MalayalamSangamMN-Bold
MalayalamSangamMN
Thonburi
Thonburi
Thonburi-Bold
Helvetica
Helvetica-BoldOblique
Helvetica
Helvetica-Oblique
Helvetica-Bold
Futura
Futura-CondensedExtraBold
Futura-MediumItalic
Futura-Medium
Gujarati Sangam MN
GujaratiSangamMN-Bold
GujaratiSangamMN
Heiti K
STHeitiK-Medium
STHeitiK-Light
Devanagari Sangam MN
DevanagariSangamMN-Bold
DevanagariSangamMN
Heiti TC
STHeitiTC-Light
STHeitiTC-Medium
Sinhala Sangam MN
SinhalaSangamMN
SinhalaSangamMN-Bold
Kannada Sangam MN
KannadaSangamMN-Bold
KannadaSangamMN
Georgia
Georgia-BoldItalic
Georgia-Italic
Georgia-Bold
Georgia
Heiti J
STHeitiJ-Medium
STHeitiJ-Light
Times New Roman
TimesNewRomanPS-BoldMT
TimesNewRomanPS-ItalicMT
TimesNewRomanPS-BoldItalicMT
TimesNewRomanPSMT
Geeza Pro
GeezaPro
GeezaPro-Bold
Helvetica Neue
HelveticaNeue-Bold
HelveticaNeue
Arial Hebrew
ArialHebrew-Bold
ArialHebrew
Zapfino
Zapfino
Oriya Sangam MN
OriyaSangamMN
OriyaSangamMN-Bold
Cochin
Cochin
Cochin-BoldItalic
Cochin-Italic
Cochin-Bold
Baskerville
Baskerville
Baskerville-BoldItalic
Baskerville-Italic
Baskerville-Bold
Verdana
Verdana-Bold
Verdana-BoldItalic
Verdana-Italic
Verdana
Gurmukhi MN
GurmukhiMN
GurmukhiMN-Bold
Palatino
Palatino-BoldItalic
Palatino-Italic
Palatino-Bold
Palatino-Roman
Tamil Sangam MN
TamilSangamMN-Bold
TamilSangamMN
Marker Felt
MarkerFelt-Wide
MarkerFelt-Thin
Courier New
CourierNewPS-BoldMT
CourierNewPS-ItalicMT
CourierNewPS-BoldItalicMT
CourierNewPSMT
Courier
Courier-Oblique
Courier
Courier-Bold
Courier-BoldOblique
DB LCD Temp
DBLCDTempBlack
Trebuchet MS
TrebuchetMS-Italic
Trebuchet-BoldItalic
TrebuchetMS
TrebuchetMS-Bold
Arial Rounded MT Bold
ArialRoundedMTBold
Bangla Sangam MN
BanglaSangamMN
BanglaSangamMN-Bold
Telugu Sangam MN
TeluguSangamMN
TeluguSangamMN-Bold
American Typewriter
AmericanTypewriter-Bold
AmericanTypewriter
Arial
ArialMT
Arial-ItalicMT
Arial-BoldMT
Arial-BoldItalicMT
Hiragino Kaku Gothic ProN
HiraKakuProN-W3
HiraKakuProN-W6
AppleGothic
AppleGothic
Heiti SC
STHeitiSC-Light
STHeitiSC-Medium
Malayalam Sangam MN
MalayalamSangamMN-Bold
MalayalamSangamMN
Thonburi
Thonburi
Thonburi-Bold
Helvetica
Helvetica-BoldOblique
Helvetica
Helvetica-Oblique
Helvetica-Bold
Futura
Futura-CondensedExtraBold
Futura-MediumItalic
Futura-Medium
Gujarati Sangam MN
GujaratiSangamMN-Bold
GujaratiSangamMN
Heiti K
STHeitiK-Medium
STHeitiK-Light
Devanagari Sangam MN
DevanagariSangamMN-Bold
DevanagariSangamMN
Heiti TC
STHeitiTC-Light
STHeitiTC-Medium
Sinhala Sangam MN
SinhalaSangamMN
SinhalaSangamMN-Bold
Kannada Sangam MN
KannadaSangamMN-Bold
KannadaSangamMN
Georgia
Georgia-BoldItalic
Georgia-Italic
Georgia-Bold
Georgia
Heiti J
STHeitiJ-Medium
STHeitiJ-Light
Times New Roman
TimesNewRomanPS-BoldMT
TimesNewRomanPS-ItalicMT
TimesNewRomanPS-BoldItalicMT
TimesNewRomanPSMT
Geeza Pro
GeezaPro
GeezaPro-Bold
Helvetica Neue
HelveticaNeue-Bold
HelveticaNeue
Arial Hebrew
ArialHebrew-Bold
ArialHebrew
Zapfino
Zapfino
Oriya Sangam MN
OriyaSangamMN
OriyaSangamMN-Bold
Cochin
Cochin
Cochin-BoldItalic
Cochin-Italic
Cochin-Bold
Baskerville
Baskerville
Baskerville-BoldItalic
Baskerville-Italic
Baskerville-Bold
Verdana
Verdana-Bold
Verdana-BoldItalic
Verdana-Italic
Verdana
Gurmukhi MN
GurmukhiMN
GurmukhiMN-Bold
Palatino
Palatino-BoldItalic
Palatino-Italic
Palatino-Bold
Palatino-Roman
Tamil Sangam MN
TamilSangamMN-Bold
TamilSangamMN
Marker Felt
MarkerFelt-Wide
MarkerFelt-Thin
Courier New
CourierNewPS-BoldMT
CourierNewPS-ItalicMT
CourierNewPS-BoldItalicMT
CourierNewPSMT
Courier
Courier-Oblique
Courier
Courier-Bold
Courier-BoldOblique
DB LCD Temp
DBLCDTempBlack
Trebuchet MS
TrebuchetMS-Italic
Trebuchet-BoldItalic
TrebuchetMS
TrebuchetMS-Bold
Arial Rounded MT Bold
ArialRoundedMTBold
Bangla Sangam MN
BanglaSangamMN
BanglaSangamMN-Bold
Telugu Sangam MN
TeluguSangamMN
TeluguSangamMN-Bold
American Typewriter
AmericanTypewriter-Bold
AmericanTypewriter
Arial
ArialMT
Arial-ItalicMT
Arial-BoldMT
Arial-BoldItalicMT
Hiragino Kaku Gothic ProN
HiraKakuProN-W3
HiraKakuProN-W6
AppleGothic
AppleGothic
Heiti SC
STHeitiSC-Light
STHeitiSC-Medium
Malayalam Sangam MN
MalayalamSangamMN-Bold
MalayalamSangamMN
Thonburi
Thonburi
Thonburi-Bold
Helvetica
Helvetica-BoldOblique
Helvetica
Helvetica-Oblique
Helvetica-Bold
Futura
Futura-CondensedExtraBold
Futura-MediumItalic
Futura-Medium
Gujarati Sangam MN
GujaratiSangamMN-Bold
GujaratiSangamMN
Heiti K
STHeitiK-Medium
STHeitiK-Light
Devanagari Sangam MN
DevanagariSangamMN-Bold
DevanagariSangamMN
Heiti TC
STHeitiTC-Light
STHeitiTC-Medium
Sinhala Sangam MN
SinhalaSangamMN
SinhalaSangamMN-Bold
Kannada Sangam MN
KannadaSangamMN-Bold
KannadaSangamMN
Georgia
Georgia-BoldItalic
Georgia-Italic
Georgia-Bold
Georgia
Heiti J
STHeitiJ-Medium
STHeitiJ-Light
Times New Roman
TimesNewRomanPS-BoldMT
TimesNewRomanPS-ItalicMT
TimesNewRomanPS-BoldItalicMT
TimesNewRomanPSMT
Geeza Pro
GeezaPro
GeezaPro-Bold
Helvetica Neue
HelveticaNeue-Bold
HelveticaNeue
Arial Hebrew
ArialHebrew-Bold
ArialHebrew
Zapfino
Zapfino
Oriya Sangam MN
OriyaSangamMN
OriyaSangamMN-Bold
Cochin
Cochin
Cochin-BoldItalic
Cochin-Italic
Cochin-Bold
Baskerville
Baskerville
Baskerville-BoldItalic
Baskerville-Italic
Baskerville-Bold
Verdana
Verdana-Bold
Verdana-BoldItalic
Verdana-Italic
Verdana
Gurmukhi MN
GurmukhiMN
GurmukhiMN-Bold
Palatino
Palatino-BoldItalic
Palatino-Italic
Palatino-Bold
Palatino-Roman
Tamil Sangam MN
TamilSangamMN-Bold
TamilSangamMN
Marker Felt
MarkerFelt-Wide
MarkerFelt-Thin
Courier New
CourierNewPS-BoldMT
CourierNewPS-ItalicMT
CourierNewPS-BoldItalicMT
CourierNewPSMT
Courier
Courier-Oblique
Courier
Courier-Bold
Courier-BoldOblique
DB LCD Temp
DBLCDTempBlack
Trebuchet MS
TrebuchetMS-Italic
Trebuchet-BoldItalic
TrebuchetMS
TrebuchetMS-Bold
Arial Rounded MT Bold
ArialRoundedMTBold
Bangla Sangam MN
BanglaSangamMN
BanglaSangamMN-Bold
Telugu Sangam MN
TeluguSangamMN
TeluguSangamMN-Bold
American Typewriter
AmericanTypewriter-Bold
AmericanTypewriter
Arial
ArialMT
Arial-ItalicMT
Arial-BoldMT
Arial-BoldItalicMT
Hiragino Kaku Gothic ProN
HiraKakuProN-W3
HiraKakuProN-W6
AppleGothic
AppleGothic
Heiti SC
STHeitiSC-Light
STHeitiSC-Medium
Malayalam Sangam MN
MalayalamSangamMN-Bold
MalayalamSangamMN
Thonburi
Thonburi
Thonburi-Bold
Helvetica
Helvetica-BoldOblique
Helvetica
Helvetica-Oblique
Helvetica-Bold
Futura
Futura-CondensedExtraBold
Futura-MediumItalic
Futura-Medium
Gujarati Sangam MN
GujaratiSangamMN-Bold
GujaratiSangamMN
Heiti K
STHeitiK-Medium
STHeitiK-Light
Devanagari Sangam MN
DevanagariSangamMN-Bold
DevanagariSangamMN
Heiti TC
STHeitiTC-Light
STHeitiTC-Medium
Sinhala Sangam MN
SinhalaSangamMN
SinhalaSangamMN-Bold
Kannada Sangam MN
KannadaSangamMN-Bold
KannadaSangamMN
Georgia
Georgia-BoldItalic
Georgia-Italic
Georgia-Bold
Georgia
Heiti J
STHeitiJ-Medium
STHeitiJ-Light
Times New Roman
TimesNewRomanPS-BoldMT
TimesNewRomanPS-ItalicMT
TimesNewRomanPS-BoldItalicMT
TimesNewRomanPSMT
Geeza Pro
GeezaPro
GeezaPro-Bold
Helvetica Neue
HelveticaNeue-Bold
HelveticaNeue
Arial Hebrew
ArialHebrew-Bold
ArialHebrew
Zapfino
Zapfino
Oriya Sangam MN
OriyaSangamMN
OriyaSangamMN-Bold
Cochin
Cochin
Cochin-BoldItalic
Cochin-Italic
Cochin-Bold
Baskerville
Baskerville
Baskerville-BoldItalic
Baskerville-Italic
Baskerville-Bold
Verdana
Verdana-Bold
Verdana-BoldItalic
Verdana-Italic
Verdana
Gurmukhi MN
GurmukhiMN
GurmukhiMN-Bold
Palatino
Palatino-BoldItalic
Palatino-Italic
Palatino-Bold
Palatino-Roman
Tamil Sangam MN
TamilSangamMN-Bold
TamilSangamMN
Marker Felt
MarkerFelt-Wide
MarkerFelt-Thin
Courier New
CourierNewPS-BoldMT
CourierNewPS-ItalicMT
CourierNewPS-BoldItalicMT
CourierNewPSMT
Courier
Courier-Oblique
Courier
Courier-Bold
Courier-BoldOblique
DB LCD Temp
DBLCDTempBlack
Trebuchet MS
TrebuchetMS-Italic
Trebuchet-BoldItalic
TrebuchetMS
TrebuchetMS-Bold
Arial Rounded MT Bold
ArialRoundedMTBold
Bangla Sangam MN
BanglaSangamMN
BanglaSangamMN-Bold
Telugu Sangam MN
TeluguSangamMN
TeluguSangamMN-Bold
American Typewriter
AmericanTypewriter-Bold
AmericanTypewriter
Arial
ArialMT
Arial-ItalicMT
Arial-BoldMT
Arial-BoldItalicMT
Hiragino Kaku Gothic ProN
HiraKakuProN-W3
HiraKakuProN-W6
AppleGothic
AppleGothic
Heiti SC
STHeitiSC-Light
STHeitiSC-Medium
Malayalam Sangam MN
MalayalamSangamMN-Bold
MalayalamSangamMN
Thonburi
Thonburi
Thonburi-Bold
Helvetica
Helvetica-BoldOblique
Helvetica
Helvetica-Oblique
Helvetica-Bold
Futura
Futura-CondensedExtraBold
Futura-MediumItalic
Futura-Medium
Gujarati Sangam MN
GujaratiSangamMN-Bold
GujaratiSangamMN
Heiti K
STHeitiK-Medium
STHeitiK-Light
Devanagari Sangam MN
DevanagariSangamMN-Bold
DevanagariSangamMN
Heiti TC
STHeitiTC-Light
STHeitiTC-Medium
Sinhala Sangam MN
SinhalaSangamMN
SinhalaSangamMN-Bold
Kannada Sangam MN
KannadaSangamMN-Bold
KannadaSangamMN
Georgia
Georgia-BoldItalic
Georgia-Italic
Georgia-Bold
Georgia
Heiti J
STHeitiJ-Medium
STHeitiJ-Light
Times New Roman
TimesNewRomanPS-BoldMT
TimesNewRomanPS-ItalicMT
TimesNewRomanPS-BoldItalicMT
TimesNewRomanPSMT
Geeza Pro
GeezaPro
GeezaPro-Bold
Helvetica Neue
HelveticaNeue-Bold
HelveticaNeue
Arial Hebrew
ArialHebrew-Bold
ArialHebrew
Zapfino
Zapfino
Oriya Sangam MN
OriyaSangamMN
OriyaSangamMN-Bold
Cochin
Cochin
Cochin-BoldItalic
Cochin-Italic
Cochin-Bold
Baskerville
Baskerville
Baskerville-BoldItalic
Baskerville-Italic
Baskerville-Bold
Verdana
Verdana-Bold
Verdana-BoldItalic
Verdana-Italic
Verdana
Gurmukhi MN
GurmukhiMN
GurmukhiMN-Bold
Palatino
Palatino-BoldItalic
Palatino-Italic
Palatino-Bold
Palatino-Roman
Tamil Sangam MN
TamilSangamMN-Bold
TamilSangamMN
Marker Felt
MarkerFelt-Wide
MarkerFelt-Thin
Courier New
CourierNewPS-BoldMT
CourierNewPS-ItalicMT
CourierNewPS-BoldItalicMT
CourierNewPSMT
Courier
Courier-Oblique
Courier
Courier-Bold
Courier-BoldOblique
DB LCD Temp
DBLCDTempBlack
Trebuchet MS
TrebuchetMS-Italic
Trebuchet-BoldItalic
TrebuchetMS
TrebuchetMS-Bold
Arial Rounded MT Bold
ArialRoundedMTBold
Bangla Sangam MN
BanglaSangamMN
BanglaSangamMN-Bold
Telugu Sangam MN
TeluguSangamMN
TeluguSangamMN-Bold
American Typewriter
AmericanTypewriter-Bold
AmericanTypewriter
Arial
ArialMT
Arial-ItalicMT
Arial-BoldMT
Arial-BoldItalicMT
Hiragino Kaku Gothic ProN
HiraKakuProN-W3
HiraKakuProN-W6
AppleGothic
AppleGothic
Heiti SC
STHeitiSC-Light
STHeitiSC-Medium
Malayalam Sangam MN
MalayalamSangamMN-Bold
MalayalamSangamMN
Thonburi
Thonburi
Thonburi-Bold
Helvetica
Helvetica-BoldOblique
Helvetica
Helvetica-Oblique
Helvetica-Bold
Futura
Futura-CondensedExtraBold
Futura-MediumItalic
Futura-Medium
Gujarati Sangam MN
GujaratiSangamMN-Bold
GujaratiSangamMN
Heiti K
STHeitiK-Medium
STHeitiK-Light
Devanagari Sangam MN
DevanagariSangamMN-Bold
DevanagariSangamMN
Heiti TC
STHeitiTC-Light
STHeitiTC-Medium
Sinhala Sangam MN
SinhalaSangamMN
SinhalaSangamMN-Bold
Kannada Sangam MN
KannadaSangamMN-Bold
KannadaSangamMN
Georgia
Georgia-BoldItalic
Georgia-Italic
Georgia-Bold
Georgia
Heiti J
STHeitiJ-Medium
STHeitiJ-Light
Times New Roman
TimesNewRomanPS-BoldMT
TimesNewRomanPS-ItalicMT
TimesNewRomanPS-BoldItalicMT
TimesNewRomanPSMT
Geeza Pro
GeezaPro
GeezaPro-Bold
Helvetica Neue
HelveticaNeue-Bold
HelveticaNeue
Arial Hebrew
ArialHebrew-Bold
ArialHebrew
Zapfino
Zapfino
Oriya Sangam MN
OriyaSangamMN
OriyaSangamMN-Bold
Cochin
Cochin
Cochin-BoldItalic
Cochin-Italic
Cochin-Bold
Baskerville
Baskerville
Baskerville-BoldItalic
Baskerville-Italic
Baskerville-Bold
Verdana
Verdana-Bold
Verdana-BoldItalic
Verdana-Italic
Verdana
Gurmukhi MN
GurmukhiMN
GurmukhiMN-Bold
Palatino
Palatino-BoldItalic
Palatino-Italic
Palatino-Bold
Palatino-Roman
Tamil Sangam MN
TamilSangamMN-Bold
TamilSangamMN
Marker Felt
MarkerFelt-Wide
MarkerFelt-Thin
Courier New
CourierNewPS-BoldMT
CourierNewPS-ItalicMT
CourierNewPS-BoldItalicMT
CourierNewPSMT
Courier
Courier-Oblique
Courier
Courier-Bold
Courier-BoldOblique
DB LCD Temp
DBLCDTempBlack
Trebuchet MS
TrebuchetMS-Italic
Trebuchet-BoldItalic
TrebuchetMS
TrebuchetMS-Bold
Arial Rounded MT Bold
ArialRoundedMTBold
Bangla Sangam MN
BanglaSangamMN
BanglaSangamMN-Bold
Telugu Sangam MN
TeluguSangamMN
TeluguSangamMN-Bold
American Typewriter
AmericanTypewriter-Bold
AmericanTypewriter
Arial
ArialMT
Arial-ItalicMT
Arial-BoldMT
Arial-BoldItalicMT
Hiragino Kaku Gothic ProN
HiraKakuProN-W3
HiraKakuProN-W6
AppleGothic
AppleGothic
Heiti SC
STHeitiSC-Light
STHeitiSC-Medium
Malayalam Sangam MN
MalayalamSangamMN-Bold
MalayalamSangamMN
Thonburi
Thonburi
Thonburi-Bold
Helvetica
Helvetica-BoldOblique
Helvetica
Helvetica-Oblique
Helvetica-Bold
Futura
Futura-CondensedExtraBold
Futura-MediumItalic
Futura-Medium
Gujarati Sangam MN
GujaratiSangamMN-Bold
GujaratiSangamMN
Heiti K
STHeitiK-Medium
STHeitiK-Light
Devanagari Sangam MN
DevanagariSangamMN-Bold
DevanagariSangamMN
Heiti TC
STHeitiTC-Light
STHeitiTC-Medium
Sinhala Sangam MN
SinhalaSangamMN
SinhalaSangamMN-Bold
Kannada Sangam MN
KannadaSangamMN-Bold
KannadaSangamMN
Georgia
Georgia-BoldItalic
Georgia-Italic
Georgia-Bold
Georgia
Heiti J
STHeitiJ-Medium
STHeitiJ-Light
Times New Roman
TimesNewRomanPS-BoldMT
TimesNewRomanPS-ItalicMT
TimesNewRomanPS-BoldItalicMT
TimesNewRomanPSMT
Geeza Pro
GeezaPro
GeezaPro-Bold
Helvetica Neue
HelveticaNeue-Bold
HelveticaNeue

0 comments:

Post a Comment

Related Post

 

Copyright © 2011 Next Iphone | Store Mobile Phone Store