Adam H
Adam H

Reputation: 1519

<Error>: FT_Open_Face failed: error 85

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.

Upvotes: 13

Views: 8236

Answers (6)

JustinJM
JustinJM

Reputation: 21

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.

Upvotes: 2

Can Ürek
Can Ürek

Reputation: 661

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.

Upvotes: 0

fengd
fengd

Reputation: 7569

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

Upvotes: 0

Mike
Mike

Reputation: 111

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

Upvotes: 11

alexshafran
alexshafran

Reputation: 433

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.

Upvotes: 0

Mugunth
Mugunth

Reputation: 14499

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

Upvotes: 10

Related Questions