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 › two text problems
Page Index Toggle Pages: 1
two text problems (Read 1253 times)
two text problems
Apr 23rd, 2005, 3:18am
 
ok... i found my text had disappeared... fixed by switching my textMode( to textAlign(


But now I have two problems:
1) my text is all really big, and poorly drawn
2) my font.width thing is undercalculating width by a factor of 10.

help?

I figured out #2. Use textFont followed by textWidth. Holy moly.

Still can't figure out #1.
Re: two text problems
Reply #1 - Apr 23rd, 2005, 4:02am
 
try re-creating your font with "create font", i found a bunch of text sizing issues between 69 and 85, and having fixed them, things should now be much closer to regular applications (i.e. 24 point text in illustrator should be closer to 24 point text in processing).

i'll add textWidth() to the faq.. we hadn't documented font.width() before but i forgot it was in examples and how many ppl were using it.

Re: two text problems
Reply #2 - Apr 23rd, 2005, 5:40am
 
all is now right with the world.
----------

Suggestion: in the FAQ create a "what will break" section so people can search for "text" and see all the things that have changed for text.

For me, I replaced ALIGN_ with "" so my textMode(ALIGN_RIGHT) became textMode(RIGHT).  Hmm. Apparently the textMode function isn't clever enough to puke on me when i throw a 39 at it??  It just happily runs and displays nothing. Poo.

Anyway, only two days to make the big change. Thanks for the support.
Re: two text problems
Reply #3 - Apr 23rd, 2005, 5:46am
 
what's wrong with the changes page?
http://processing.org/faq/changes.html

ALIGN_RIGHT doesn't exist anymore so it should've given you an error, did that not happen?
Re: two text problems
Reply #4 - Apr 23rd, 2005, 5:57am
 
the changes page is good. i just needed a blunt object beating me on the head saying "if you text breaks, focus here".

I used textMode(RIGHT) and that didn't not break. it ran, and displayed nothing. Technically my fault for not getting the complete message.
Re: two text problems
Reply #5 - Apr 30th, 2005, 5:55am
 
error message added for 86.
Page Index Toggle Pages: 1