What am i doing wrong?

I’m trying to upload text onto my project but i guess im not doing this right.

I go to > Create Font… > click on my font > add the right size > and press OK.

So this gets saved into my sketch folder. I just re-type the exact same name of the file into my project doing something like:

PFont fontA = loadFont(“04b03-12.vlw”);
textFont(fontA, 12);
textAlign(CENTER);
And i also drag the font from my folder onto the processing sketch. But now im getting the “expecting IDENT, found ‘,’ ” error. I’m using void setup() and void draw () and i have this bit of code after the void setup(). Is there a way i can keep the code out of void draw()? because i read that it takes forever to load or something

Advertisements

~ by christineg on February 20, 2008.

2 Responses to “What am i doing wrong?”

  1. The thing about draw() is that it continuously runs the code inside it, so you should only use it if your code is animated or interactive.

  2. So, without seeing all the code it is hard to say for sure, but I think you need to break this down a bit to troubleshoot the problem. What exactly is the problem? I was able to test and run the code posted above by adding a text call at the end:

    text(“word”, 15, 50);

    What happens when you run it? Are you sure the created font is in the data folder of your sketch folder? If not you should get an error like this “Could not load font 04b03-12.vlw. Make sure that the font has been copied to the data folder of your sketch.” Don’t really understand the second part of your question… Why don’t you post all the code, or put the applet (with code) on your web site?

    good luck,

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: