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 & HelpSyntax Questions › Problems with CreateFont smooth parameter
Page Index Toggle Pages: 1
Problems with CreateFont smooth parameter (Read 356 times)
Problems with CreateFont smooth parameter
Jan 14th, 2009, 5:04am
 
I'm not sure if this is a syntax question or a bug. I looked at this example code: http://processing.org/reference/createFont_.html and wrote my own.

PFont myFont;

void setup() {
 size(200,200, JAVA2D);
 myFont = createFont("ACaslonPro-Bold", 36);
 textFont(myFont);
 background(0);
 smooth();
}

void draw() {
 String str1 = "RASTER";
 text(str1, 50, 50);
 
}

I get the following error:

Cannot find anything named "smooth"

Any ideas?
Re: Problems with CreateFont smooth parameter
Reply #1 - Jan 14th, 2009, 11:04am
 
It works for me with Processing 1.0.1 on Windows XP.
If it doesn't find the font, it uses a default one.
Is that really the code you tried? Perhaps you tried to add the "smooth" parameter literally, instead of putting true or false there.
Re: Problems with CreateFont smooth parameter
Reply #2 - Jan 15th, 2009, 6:43am
 
Reinstall Java and processing or try putting smooth(); before create font.
Re: Problems with CreateFont smooth parameter
Reply #3 - Jan 15th, 2009, 8:57am
 
Ah, turns out I misunderstood the smooth parameter. I was putting "smooth" instead of "true".

Thanks all.
Page Index Toggle Pages: 1