Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I install and use the additional Asian fonts included in iOS 6?

I'm writing an iOS 6 iPhone/iPad app that needs to display Chinese characters. The Asian fonts installed by default in iOS 6 leave a lot to be desired. However, at the bottom of Apple's iOS 6: Font List page, Apple states that:

"Apps can also install the following [mostly Asian] fonts as necessary."

The Asian font families don't appear in the list provided by [UIFont familyNames]. I haven't found any information in the UIFont class documentation or on the Apple Developer Forums about how to install a font that is, presumably, already included in iOS 6 but not yet "installed." Any ideas?

like image 887
Anthony Avatar asked Nov 30 '12 12:11

Anthony


People also ask

How do I install fonts on iPhone 6?

You can download fonts from the App Store app , then use them in documents you create on iPhone. After you download an app containing fonts from the App Store, open the app to install the fonts. To manage installed fonts, go to Settings > General, then tap Fonts.

How do I use IOS fonts?

You can use your device's built-in font manager under Settings > General > Fonts, where you'll see installed fonts from Font Diner, iFont, and any other font apps you may have downloaded and used. Tap a font and select a typeface to view a sample. Swipe to the left to see additional screens that display the font.


2 Answers

  • You can't change the global font in iOS.
  • Some of this list are already "installed" and appear in [UIFont familyNames] (e.g. Apple SD Gothic Neo)
  • Every iOS App is able to add custom fonts which aren't supported, yet (e.g. BiauKai)
  • There are no API diffs from 5.1 to 6.0 in UIFont.h
  • There are no API diffs in UIFont.h since 4.0 (added lineHeight, deprecated leading).

"Apps can also install the following [mostly Asian] fonts as necessary."

Since we know every developer can use custom fonts it's absolutely no problem to add them or "install" them for your app.

I'm pretty sure these are some requested fonts, which some guy at Apple wrote on this page to show that it's possible to use these fonts nevertheless even if they are not specially supported by iOS.


I know this is no answer which is totally correct or totally wrong - it's based on the information I knew and I found on the web and makes it clear, that we probably never know the answer.


To support a custom font add your font in a .ttf format to your project (and to your target - I forgot this more than once!) and add it to your Info.plist. Now it's possible to use it with someLabel.font = [UIFont fontWithName:@"MySuperFont" size:100];

like image 88
Fabio Poloni Avatar answered Oct 15 '22 09:10

Fabio Poloni


"Apps can also install the following [mostly Asian] fonts as necessary."

It is about legal and operational issues. These fonts are (co?-)licensed under Apple and available in Mac OSX. If you want to use them you can include them in your project by using a copy from the OSX /Library/Fonts folder in your iOS bundle without infringing the copyright of the respective font owner.

Furthermore: they are compatible with iOS 6 (e.g. passing the Font Validation int the Font Book app), you might be aware that there are many free asian fonts out in the wild but are not working 100% on iOS 6 and it is frustrating to try them all out; licenses for professional asian fonts are quite expensive.

To install the desired font use "Font book", determine the font you like, open in finder (it might be a fontname with ideograms, just go ahead), copy the font into your project and use as reference to the font the font name and not the filename. Be sure to update the UIAppFonts (Fonts Provided By Application) items in your info.

Example: Kaiti font on Mac OSx is 楷体.ttc and preparing your project as explained will enable you to create UIFont with name @"Kaiti SC".

One last point: you should NOT publish on github or similar a public project that contains these fonts.

like image 37
Jürgen Schwietering Avatar answered Oct 15 '22 10:10

Jürgen Schwietering