Tricky Font Problem

Hey guys,

So, let’s say I have a .txt file which contains the following:
“La La La. Hello world!
Blah Blah Blah.”

Right now, my code stores each line of the file into separate strings. So, after I’m done processing the file, I have two strings:
s1 = “La La La. Hello world!”
s2 = “Blah Blah Blah.”

To get each line I opened my .txt file and used getLine etc. I can paste the code if need be. I store both of the strings in a struct (call it string_struct, say), which I store a pointer to.

But, my real question is this: I set up a font by doing the following (I have a verdana.ttf in my data folder):

In my .h:
ofTrueTypeFont verdana;

In my .cpp:
verdana.loadFont(“verdana.ttf”, 12, true, false);
verdana.drawString(string_struct->s1, 100, 100);

It compiles and runs. However, the string either does not get displayed completely or none of the punctuation characters get displayed (varies based on what I enter for the font size when I use loadFont).

I also tried all possible combinations of true and false for the loadFont parameters, and it didn’t fix the problem.

Any ideas of what I’m doing wrong? It’s weird because when I just declare the same string that was in the file (instead of copying the text from the file into the string), it works fine.

The error I get is: “texture not bound for character – line 650 in etc.”

do you have the type face in the data folder… sounds like a loading error

check to make sure it is loaded:

  
ofTrueTypeFont t;  
	t.loadFont("font.ttf");  
	if(t.bLoadedOk) {  
		  
		// do things here  
	}