We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpPrograms › test doesn t appear
Page Index Toggle Pages: 1
test doesn t appear (Read 417 times)
test doesn t appear
Dec 23rd, 2007, 1:06am
 
Dear All

I had test several codes from the typography section: of the book:

"Processing: A Programming Handbook for Visual Designers and Artists" and test it in the following code that Im writing

But when I try to test it on the code that Im writing the text doesnt appear. The font is created with the tool and put it in the data folder. What could be the error?

The code is these one:

PFont font;

void setup() {
 
//ventana
 size(1024, 720);
// tipografia
 font  = loadFont("CorsivaHebrew-22.vlw");
 textFont(font);

// fondo
 background(255);
 noStroke();
 
}

void draw () {

// rectangulo  
 fill (color(103, 101, 88));
 rect(0, 0, 1024, 720);

// elipse azul
 stroke(123);
 fill (color(191, 215, 59, 126));
 ellipse(600, 470, 500, 450);

// elipse amarilla
 stroke(123);
 fill (color(0, 176, 216, 126));
 ellipse(321, 450, 510, 452);

// texto
fill(0);
 text("flicker", random(-100, 100), random(-20, 120));
 

}


Re: test doesn t appear
Reply #1 - Dec 23rd, 2007, 9:29pm
 
Hi,

The code works perfectly. I don't get any error and the text appears on the screen. Sometimes it appears off the screen because you put negative values in your random positions.

Since you get no error, it means that the font gets loaded. Maybe it doesn't know how to display it. Is it a special font?

Try this.
Replace
  Code:
font  = loadFont("CorsivaHebrew-22.vlw"); 


with
  Code:
font  = createFont("Verdana",20); 



Hope it helps
Re: test doesn t appear
Reply #2 - Dec 23rd, 2007, 10:28pm
 
Steven

It works when i change the code!

Does processing had problems with special texts?

thank you
in
Re: test doesn t appear
Reply #3 - Dec 24th, 2007, 5:11am
 
That's something I don't know.
Maybe someone else has the answer.
Cheers!
Page Index Toggle Pages: 1