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 › Coverting PDF from creatfont();
Page Index Toggle Pages: 1
Coverting PDF from creatfont(); (Read 515 times)
Coverting PDF from creatfont();
May 31st, 2007, 4:29am
 
This is my code, but the coverted image in PDF is not the same as the screen shot. The letters in PDF are shrinked.

Would you let me know how to fix that?

I have already tried to using loadfont(), but it was the same buggs.






import processing.pdf.*;

PFont myFont;

void setup() {
 size(200, 200);
 beginRecord(PDF, "ellen.pdf");
 background(255,255,255);
 // Uncomment the following two lines to see the available fonts
 //String[] fontList = PFont.list();
 //println(fontList);
 myFont = createFont("MrsEavesRoman", 32);
 textFont(myFont);
 fill(0,0,0);
 text("ABCDEF", 10, 50);
 endRecord();
}
Page Index Toggle Pages: 1