FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Programming Questions & Help
   Syntax
(Moderators: fry, REAS)
   text difficulty
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: text difficulty  (Read 473 times)
benelek

35160983516098 WWW Email
text difficulty
« on: Feb 28th, 2003, 2:20pm »

argh... i'm having problems with using text. i don't know what the problem is; i've used text before with no problems. here's a screenshot, in case it's only my computer that's having the problem: http://users.bigpond.net.au/schwartz/screen-0005.tif
 
and here's the code i used. not that it isn't an interesting affect on the text...
Code:

void setup() {
  size(200,200);
  background(150);
  fontA = loadFont("Bodoni-Bold.vlw.gz");  
  setFont(fontA,150);
  stroke(0);
  fill(0);
}
 
BFont fontA;
 
void loop() {
  translate(width/2,height/2);
  fill(250);
  text('H',0,0);
}

 
thanx,
 
-jacob
« Last Edit: Feb 28th, 2003, 2:21pm by benelek »  
REAS


WWW
Re: text difficulty
« Reply #1 on: Feb 28th, 2003, 4:01pm »

put this statement in your setup:
hint(SMOOTH_IMAGES);
 
this won't always be necessary, but it is currently.
 
benelek

35160983516098 WWW Email
Re: text difficulty
« Reply #2 on: Mar 2nd, 2003, 10:47am »

that'll fix it thanx.
 
btw, what's causing that interesting effect in the letters?
 
fry


WWW
Re: text difficulty
« Reply #3 on: Mar 3rd, 2003, 8:06pm »

on Mar 2nd, 2003, 10:47am, benelek wrote:
btw, what's causing that interesting effect in the letters

characters in the current fonts are 64x64 pixel images that get smushed into the proper size through a series of image() calls. by default, image smoothing (think of 'bilinear' or 'bicubic' smoothing in photoshop) is shut off, because it's slow, so 'nearest neighbor' is used. this results in the lousy appearance/interesting effect for the fonts.  
 
the next rev (52) has a bunch of work on the drawing engine for smoothing images (even anti-aliasing edges of shapes) and things will be smoothed by default, and the hint() call will no longer be needed.
 
Pages: 1 

« Previous topic | Next topic »