<Error>: FT_Open_Face failed: error 85
Asked Answered
L

6

13

I am trying to install a custom font into my iPhone application. When I add the 'Fonts provided by application’ key into my info.plist file I get the following error ': FT_Open_Face failed: error 85.’

I am not sure what the problem is as I have successfully been able to use custom fonts in the past.

Any help will be appreciated.

Lemons answered 1/6, 2011 at 15:14 Comment(1)
This error appears also when the file specified in the plist UIAppFonts is not in your bundle. Make sure the target has the font file copied in its resources :)Artis
P
11

If you leave the first element in your font array in the plist (index 0) blank, you will get this error.

Peipeiffer answered 22/2, 2012 at 22:17 Comment(1)
Leave any element in this array empty and you'll get itDetergent
T
10

PostScript fonts cannot be used with UIFont directly. You can use them only with CoreText or CATextLayer.

Topotype answered 15/7, 2011 at 4:40 Comment(2)
Here is a good tutorial on how to achieve what @Topotype says: Tutorial: Custom Fonts with CoreText and CALayerWite
My font was not formatted correctly, I solved the problem using the guide on this blog: rockonflash.wordpress.com/2011/02/03/…Flexuous
S
2

This can occur if the font in question is a Font Suitcase format. Open your application package, and if the font .ttf file shows a size of "Zero bytes", it's probably a font suitcase.

Files of this type can be converted using Fondu.

When running Fondu, I had to specify not just the suitcase file, but the resource fork inside it:

fondu mysuitcasefont.ttf/..namedfork/rsrc

This will extract any fonts in the suitcase to the current directory. It is these extracted files you will want to include in your iOS project and reference from the .plist.

Shovelboard answered 11/2, 2014 at 16:4 Comment(0)
P
0

I received this error when using a .ttf font. I was able to correct it by removing the file extension from the filename in (a) the resource in xcode and (b) the "Fonts provided by application" array in the .plist file.

Hopefully this will help.

Ptero answered 23/1, 2012 at 18:2 Comment(3)
I get the same error with my .ttf font even after removing the extension. The font displays fine. Should I be concerned?Keyte
I didn't get the error once I removed the extensions (iOS 5.0). I do not know anymore about this. Anyone?Ptero
@Ptero I solved this issue by using an OTF format version.Bernhard
B
0

I was trying to use Google Signika font on my App, and got the exact issue.

I solve the issue by using the .otf version of the font

Bernhard answered 18/4, 2013 at 15:57 Comment(0)
S
0

Accepted answer is totally wrong and unnecessary. Probably you made a mistake when writing your font name.

Thats rules for that.

First Step : Write font name before .ttf extension. Example: For FFFTusj.ttf => FFFTusj

Second Step : Write - and after font style. Example: Bold or Medium etc. Example: @"FFFTusj-Bold"

And also dont forget add your font file to your project.

Check this link:

http://www.bycoder.com/post/2013/03/28/XCode-Custom-font-doesnt-work

If your font is REGULAR dont write -Regular at end of font name.

Shinbone answered 8/7, 2013 at 6:44 Comment(1)
no, your answer might be a mistake, i get the exact same error when using a postscript font. furthermore your explanation is not accurate, the font name can, and should be obtained by adding the font to fontbook, and using fontbook to display the font name. the font name has NOTHING to do with the name of the file.Florie

© 2022 - 2024 — McMap. All rights reserved.