Custom fonts since iPhone OS 3.2

Finally iPhone OS 3.2 supports custom fonts. Here is a short summary what you have to do..

Supported font formats are ..

  • TrueType-flavoured OpenType (extension .ttf) and
  • PostScript-flavoured OpenType (extension .otf).

Ok what you have to do is simple ..

  1. just add the key UIAppFonts as array to your Info.plist
  2. add the *.ttf or *.otf files to your bundle
  3. insert the filenames as values to your UIAppFonts array
  4. Load the fonts with ..
// use the font name here, not the filename
UIFont *myCustomFont = [UIFont fontWithName:@"AnnabelScript" size:30];

Note: You can also use the fonts in your UIWebViews with font-tags or CSS.


//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



http://doli.at/2010/05/08/custom-fonts-ipad/

你可能感兴趣的:(OS,iPhone,extension,2010,fonts)