What's the proper place to put the data files?

I’ve been seeing the same problem mentioned in this post. So I think it is because I have the ttf files in the wrong place. But I haven’t been able to find the right place. I’ve created a data folder below the executable, placed with the executable, a folder before, and so on. Nothing’s been working. If I examine the filename variable in ofTrueTypeFont.cpp, I see it is data/verdana.ttf, so I really think having the data folder should work.

But it obviously doesn’t :slight_smile:

What to do to make it find the files?

Additionally, please teach me to fish and point me to the documentation I may have missed on my search (I swear I did search!).

FWIW I’m on CodeBlocks, Windows Vista.

Thanks.

If I alter the filename variable on ofTrueTypeFont.cpp to be the full path instead of data\verdana.ttf, it works. So it’s definitely that… :/. Still searching :slight_smile:

If I run it from the console directly, where there is the data folder with the .ttfs it works. So it’s CodeBlocks that changes the CWD or something. Still searching

if you’re writing it exactly like that, then part of that could be problem number 1: don’t use , use /.

but more importantly, you should just be able to specify “verdana.ttf”, and the data/ part will be added automatically. to be even safer, use ofToDataPath( “verdana.ttf” );

if you’re writing it exactly like that, then part of that could be problem number 1: don’t use , use /.

but more importantly, you should just be able to specify “verdana.ttf”, and the data/ part will be added automatically. to be even safer, use ofToDataPath( “verdana.ttf” );[/quote]

ofTrueTypeFont does call ofToDataPath, the value returned is ‘data/verdana.ttf’, sorry, not ‘data\verdana.ttf’. Still, executing the .exe file directly works, it’s just when executing it from CodeBlocks where it doesn’t. So it has something to do with how it executes the files.