Reputation: 10264
I want to use a custom font in my iPhone app. After doing some research I found that you can add a custom font to your package. So I copied the font, which is digreadout2.ttf
to my app folder and added a key in the .plist file. using the exact filename including the extension.
I then create the UIFont
object and assign it to the font property of my UILabel
. Now the problem is that when I run my app it gives me an error saying <Error>: FT_Open_Face failed: error 2.
If anyone has any suggestions of what I can try it will be very helpful.
Upvotes: 0
Views: 2543
Reputation: 10264
Thanks for the response, I found the error. Basically what happened was that the file I used for my font had a white space in the file name. So when I tried to load it in the plist file it gave the error of file not found, once I removed the space out of the filename everything worked perfecty.
Upvotes: 1
Reputation: 63707
Error 2 in Free Type is FT_ERR_BADLABEL
which I guess is the same as ENOENT - No such file or directory
. Maybe you are using UIFont with the filename instead the font name. See Certain fonts not showing up?
Upvotes: 0