iOS and OF 0.8.0: data file loading doesn't find correct path

Hi…,

I am a beginner. I have set up an class Game/Game.h with a myfont object.

class Game {

	public:
		ofTrueTypeFont myfont;

		Game(){
			myfont.loadFont("arial.ttf", 20);
		}

		void Draw(){
			myfont.drawString("some Text", 0,0);
		}
}

Then I have copied the arial.ttf in the data folder of the project. I’ve done this in OF 0.7.4 under Visual C++ 2010 Express Windows and OF 0.8.0 under XCode 4.6.3.

Under Windows the arial.ttf file is found and drawn, but under XCode the loadFont method doesn’t find the file. How to set the correct path in XCode?

Thanks

Michael

Hi…,

now I have played two days to find my data in the my Game.cpp file under iOS with no result.

Now I open all resources in the testApp::setup() method of testApp.mm. This works as expected.

Perhaps this is helpful for someone.

Thanks

Michael

Hi Michael,

Thanks for posting what worked for you. This rings a bell with this question: ofTrueTypeFont errors in OF0.8.0 - maybe it’ll help that one… will take another look… cheers.

g.