Closed vibber closed 8 years ago
If I copy the whole Openframeworks folder over, then everything looks right. So what can it be missing? As you see I did include the ofxbraitsch folder.
Found the solution after some digging: Right after creating the ofxDatGui, I insert this line:
gui->setAssetPath("");
This resets the location to search for the ofxbraitsch folder (the one in the data directory) instead of looking for it in the addons folder of openframeworks.
On Windows 10, oF 0.9.3, it only seems to work if i insert that line BEFORE instantiating the datgui object:
gui->setAssetPath("");
gui = new ofxDatGui(0, 0);
@braitsch I'm still having the same issue here; i'm building a Release on os X with Xcode and the binary only shows the gui if it's within the openFrameworks folder; when i move it to the Applications folder, i have no text.
I've tried putting the .ttf in every part of the application package, but it still doesn't seem to find it.
I have confirmed the the Release App shows text properly if it's sitting next to a folder called 'data' that has the .ttf in it. Oddly, all of the same contents are inside of the Application Package, including the font; but the App doesn't appear to see it.
I have also tried putting gui->setAssetPath("");
after the ofxDatGUI is created; this doesn't solve my problem.
what am i doing wrong? where exactly in the application package should the .ttf go?
You have to tell Xcode to bundle the resources in /bin/data into your release build. https://stackoverflow.com/a/17159123/228315
I have done this, but I still have the same problem of fonts not getting found. Here is the run script:
Here is the line of code i've added to ofApp.cpp's setup()
routine:
ofSetDataPathRoot("../Resources/data/");
Here is how i'm trying to load the font:
ofTrueTypeFont verdana;
verdana.load("Verdana.ttf", 12);
And here is where the .tff file is in my data folder:
I can confirm that the data folder IS finding its way into the application package:
What am I doing wrong?
@batchku Did you ever sort this out? I am trying to use ofxDatGui on Android now, and currently seeing my fonts sometimes not get loaded in it. No idea why or how to fix it.
Thanx for creating this beautiful gui. My problem: I built as Release. Moved the app to a USB stick / another computer including the data folder next to the app. When i run the app I get a blank gui with no text or sliders. Can you help? Am I building it wrong?
![skaermbillede 2016-04-14 kl 14 40 17](https://cloud.githubusercontent.com/assets/4029429/14528300/23803fca-024f-11e6-9e2b-0804df809198.png)
(Xcode 7.2.1)