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 & HelpOpenGL and 3D Libraries › Setting the space between chars in texts
Page Index Toggle Pages: 1
Setting the space between chars in texts (Read 271 times)
Setting the space between chars in texts
Feb 13th, 2008, 8:16pm
 
Sorry I dont know how you call it in english if you change the text width, in german its called "laufweite"

Code:

import processing.opengl.*;

PFont font;

void setup() {
size(600, 400, OPENGL);
font = createFont("Arial",24);
for(int i=0; i<font.setWidth.length; i++) font.setWidth[i] += 20;
}

// ------------------------------------------------------------------
void draw() {
background(0);
textFont(font,24);
fill(255);
text("my Text", 100, 100);
}
Page Index Toggle Pages: 1