iOS 3.2 and later support this. Straight from the What's New in iPhone OS 3.2 doc:
Custom Font Support
Applications that want to use custom fonts can now include those fonts in their application bundle and register those fonts with the system by including the UIAppFonts key in their Info.plist file. The value of this key is an array of strings identifying the font files in the application’s bundle. When the system sees the key, it loads the specified fonts and makes them available to the application.
Once the fonts have been set in the Info.plist
, you can use your custom fonts as any other font in IB or programatically.
There is an ongoing thread on Apple Developer Forums:
https://devforums.apple.com/thread/37824 (login required)
And here's an excellent and simple 3 steps tutorial on how to achieve this (broken link removed)
- Add your custom font files into your project using Xcode as a resource
- Add a key to your
Info.plist
file called UIAppFonts
.
- Make this key an array
- For each font you have, enter the full name of your font file (including the extension) as items to the
UIAppFonts
array
- Save
Info.plist
- Now in your application you can simply call
[UIFont fontWithName:@"CustomFontName" size:12]
to get the custom font to use with your UILabels and UITextViews, etc…
Also: Make sure the fonts are in your Copy Bundle Resources.
I just checked the character set of Calibri and Cambria and confirm that they cover all the major languages of Europe (hence also of America). I can check for the other ClearType fonts if that makes you feel more comfortable, but I doubt the coverage is any different.
As has already been stressed, though, your choice of fonts depends a lot on the exact set of languages you're targetting: usually, you can be confident that any commercial font covers at least all the languages of Western Europe (English, French, German, Italian, Spanish, Portuguese, etc.). If you want to add Polish, Czech, Slovak, etc. to that, you need fonts with “Central European” coverage (usually tagged as CE in the Adobe font library). For Greek, you of course need a font with Greek characters, and for Russian a font with Cyrillic characters (which usually covers Ukrainian, Bulgarian, Serbian, etc. as well). The ClearType fonts support all of the above, btw.
In the end, nothing beats checking it for yourself: if you know what language you want to support, you can examine the font you intend on using, and check for the characters you're looking for. Michael's Everson Alphabets of Europe is a great resource here. It might seem tedious to have to go through all the individual languages, but it's something you really have to do it order to make an informed decision.
If you need to support Arabic or Hebrew, Indic scripts or scripts from South-East Asia, or ideographic scripts, then the picture is wholly different, as has already been said, and I doubt any single font would fit here, except for the very rare fonts that attempt to be comprehensive (which, by the way, is an illusion).
Best Answer
Unicode is big. Really big. You just won't believe how vastly hugely mind-bogglingly big it is. I mean, you might think it's a long way down the codepage to ü, but that's just peanuts to Unicode.
I really doubt there's any font in the world (monospaced or not) that has "complete" Unicode. The best you can do is find a few monospaced fonts that, together, cover the space you're interested in, and make sure your editor is set up to use them.