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 › PFont, loadFont, how to use them
Page Index Toggle Pages: 1
PFont, loadFont, how to use them? (Read 1045 times)
PFont, loadFont, how to use them?
May 18th, 2005, 12:35am
 
I want to have a big letter 'C' in the middle of my Stage by example...
how must i do that?
i look in the reference, i found PFont, loadFont, ...
but nothing works Cry
Re: PFont, loadFont, how to use them?
Reply #1 - May 18th, 2005, 1:51am
 
Hello,

Have you created a font before load it?
If you haven't, then you can find that command at Tools->Create Fonts

In another way, you can also use createFont() for built-in fonts
Below is simple example.

I wish it might be helpful Smiley
Sou


PFont font;

void setup() {
   size(200, 200);
   background(color(0, 0, 0));
   
   font = createFont("Arial", 40);
   textFont(font, 40);
}

void draw() {
   text("C", width/2, height/2);
}
Page Index Toggle Pages: 1