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 › Font loading problem
Page Index Toggle Pages: 1
Font loading problem (Read 2356 times)
Font loading problem
Jun 2nd, 2010, 11:50pm
 
Hi everyone.
I'm a new user to processing. Started learning a couple of days back only. I tried making one simple program today. The program has to load fonts like "Arial-Black-12.vlw" and others. It's giving runtime error.
May be this topic would be very old for you but I can't diagnose this problem. Kindly help me out in resolving the matter.


Thanks in advance.

[Moderator's note: Subject line from upper case to lower case: no need to yell!]
Re: FONT LOADING PROBLEM
Reply #1 - Jun 3rd, 2010, 12:42am
 
If you copied this code you have to create this font with the processing font tool (tool - create font) it then creates a vlw file of the selected font, in your case Arial Black fontsize 12. You can create the same File, or just any other and copy and paste the new name out of the font creator and paste it where "Arial-Black-12.vlw" is now.
Re: Font loading problem
Reply #2 - Jun 3rd, 2010, 3:30am
 
Hi Cedric
Thanks for replying. You said I have to create the font and store. I'm programming in Netbeans. Kindly tell me how to create the font. You said by the tool. Does any other library or tool comes with the core.jar library of preprocessing?? If yes, kindly help me. That would be really helpful.

Thanks
Re: Font loading problem
Reply #3 - Jun 3rd, 2010, 3:35am
 
i havent worked with netbeans yet. But as far as i know you have to use the processing IDE to create the vlw file and then copy it frmo the processing sketch data folder into your netbean sketch data folder.

Re: Font loading problem
Reply #4 - Jun 3rd, 2010, 4:29am
 
Alternatively it may be simpler to replace the loadFont with createFont().  You'll need to change the parameters you pass, but apart from that it's usually a quicker way to test sketch code you've found online.  I haven't used it in Netbeans, but I'd be surprised if it didn't work.  Note though that for an exported sketch you should go down the loadFont route...
Re: Font loading problem
Reply #5 - Jun 3rd, 2010, 5:25am
 
i actually didn*t recommend createFont because i thought it rely on the processing IDE, but probably you are right and it does not. If somebody knows if it works in eclipse/netbeans, let us know.
Page Index Toggle Pages: 1