Хороший способ подключения шрифтов.

Кидаем в ресурсы наш шрифт. Вставляем и выполняем функцию.

  1. NSUInteger loadFonts()
  2. {
  3.     NSUInteger newFontCount = 0;
  4.     NSBundle *frameworkBundle = [NSBundle bundleWithIdentifier:@"com.apple.GraphicsServices"];
  5.     const char *frameworkPath = [[frameworkBundle executablePath] UTF8String];
  6.     if (frameworkPath) {
  7.         void *graphicsServices = dlopen(frameworkPath, RTLD_NOLOAD | RTLD_LAZY);
  8.         if (graphicsServices) {
  9.             BOOL (*GSFontAddFromFile)(const char *) = dlsym(graphicsServices, "GSFontAddFromFile");
  10.             if (GSFontAddFromFile)
  11.                 for (NSString *fontFile in [[NSBundle mainBundle] pathsForResourcesOfType:@"TTF" inDirectory:nil])
  12.                     newFontCount += GSFontAddFromFile([fontFile UTF8String]);
  13.         }
  14.     }
  15.     return newFontCount;
  16. }

Смотрим что у нас появилось

  1. NSLog(@"%@",[UIFont familyNames]);