Sunday, October 11, 2009

iPhone dev Stupidity 61: Font

1. Font list supported by iPhone:




From DaringFireball, detailed list here.

  • American Typewriter
  • American Typewriter Condensed
  • Arial
  • Arial Rounded MT Bold
  • Courier New
  • Georgia
  • Helvetica -> iPhone UI use this font
  • Marker Felt
  • Times New Roman
  • Trebuchet MS
  • Verdana
  • Zapfino

2. How to make it bold

You need to pass in the name of the specific font within the family. Use the "fontNamesForFamilyName" method of UIFont to get a list of names.

The naming scheme is not consistent. Here are some examples of bold font names:

"Helvetica-Bold"
"TimesNewRomanPS-BoldMT"
"Arial-BoldMT"
"CourierNewPS-BoldMT"
"Georgia-Bold"

No comments: