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 › text() looks like crap
Page Index Toggle Pages: 1
text() looks like crap (Read 481 times)
text() looks like crap
May 22nd, 2008, 10:13pm
 
I've copied the code from the Learning>Basics>Words as a troubleshooting step. Even using that code my text looks horrible. In the example the text looks wonderful.

I cannot use the same font as that. But I've used many other fonts to make sure it wasn't just one font (probably over 12). I've tried using smooth() and not using smooth().

The thing is when I use the font creation tool with the "smooth" box checked they the sample looks fine. When I put those into my sketches the edges look nasty. I've tried making the created font the same size as the text I'm using, I've tried making it much larger.

I feel like something is getting lost in the font creation but I really have no clue. I'm looking to get my text looking nice like the Learning>Basics>Words example. If anyone has encountered a similar problem or knows anything I'll be grateful for the help.
Re: text() looks like crap
Reply #1 - May 22nd, 2008, 11:08pm
 
try again with background(102) at the beginning of the draw() method :

Code:
void draw() {
background(102);
...
}
Re: text() looks like crap
Reply #2 - May 23rd, 2008, 1:52am
 
I have to say I was skeptical. But it worked! Thanks a bunch. Does anyone have an idea why this is?
Re: text() looks like crap
Reply #3 - May 23rd, 2008, 4:39am
 
I've played around with this technique a little and it seems that the text/font size makes a big difference in the appearance of the text.

All of this is while the text is rotated by 45 degrees.

I'm using smallish text (13 pt). If I create the font at the same size as the text then it will be very fuzzy. If I create the font at a much large size than text then it will be sharper but with some rough edges. There is a happy medium a few points above the size of the text. Using size 14 text, a font created at 19 will give a good appearance (not too fuzzy, not too sharp).

This seems like a problem! I don't think the original trick should be necessary and this creating of fonts trick shouldn't be necessary either. I'll use it for now but I hope it gets fixed or maybe somebody knows another method.
Re: text() looks like crap
Reply #4 - May 23rd, 2008, 9:11am
 
If you don't have a background call of some sort, the text keeps getting layered on top of itself and the nice soft edges add up to become solid, and you end up with hard edges.
Re: text() looks like crap
Reply #5 - May 23rd, 2008, 9:16am
 
Doh. See, Processing is very easy to use to I take it for granted. I'll remember this.
Page Index Toggle Pages: 1