ofTrueTypeFont FT_New_face problem

I’ve copied over parts of the fontsExample source to a new XCode project, removing the references to the Franklink Gothic font, and I copied the Verdana file into my new source folder. There were no compile-time errors, but when I ran it, I got the error “Error : font not allocated – line 381”.

In the ofTrueTypeFont class, I’ve traced this to the loadFont function, on line 47:

FT_Face face;
if (FT_New_Face( library, filename, 0, &face )) {
return;
}

For some reason, FT_New_Face is returning a fail value. I’ve copied the code over exactly from the example and the font is in the right place (if it’s not there, it doesn’t compile). Any ideas on why this is happening? Any help is appreciated!

my first thought is that it cant find the file. I know you said it’s in the right place, but can I ask you how did you add the file to the project?

_
(note: the xcode setup guide has some info about how to add things to xcode project, either in the bundle or outside it – there are two methods)
_

thanks
zach

Thank you! I didn’t realize I had to use Add to Project, I assumed I merely had to have the correct filepath. Thanks so much, Zach.