ofxUI - runtime error loading font

Hi ,

I am trying to use ofxUI.
I created a slider. No complaints at comilation. But at runtime , i get this error :

  
  
[ error ] ofTrueTypeFont: drawString(): font not allocated: line 1077 in E:\OPEN  
_FRAMEWORK\of_v0.8.0_win_cb_release\libs\openFrameworks\graphics\ofTrueTypeFont.  
cpp  
  

does anybody know how to solve that ?

there’s probably a ttf font file in the examples that you need to copy to your bin/data folder

2 Likes

you again ?! you’re my hero ^^
it works perfectly, thanks

HI! i get the same issue, what’s the name of the .tff file ? thanks

I have a “NewMedia Fett.ttf” in the data directory

hope it helps

Thanks! allready pull it to data folder my project still getting [ error ] ofTrueTypeFont: drawString(): font not allocated: line 1077 in /Users/jorge/Documents/of_v0.8.0_ios_release/libs/openFrameworks/graphics/ofTrueTypeFont.cpp
:frowning:

Sorry, new users can’t put images in posts? WHY?

could you post some code, at least a couples of lines that calls for this "drawString() " ?

I’m new user so this thing only let me post 3 replys!

not working ! i didn’t have the GUI folder on my project so i added but still getting the error.
fuck! hhaha any other idea?

my bad, it looks like I also have this “NewMedia Fett.ttf” file in bin/data/GUI/

does it help ? ^^

1 Like

I get a similar error in android, have you guys found the solution for this?

ofxUI defines default sans-serif font in ofxUIDefines.h. It seems that font dosn’t exist in my android system, so I changed that to verdana.ttf, and copied verdana.ttf from androidFontExample/bin/data into my bin/data. That solved the problem.