We are about to switch to a new forum software. Until then we have removed the registration on this forum.
When I run this I have "left over lines" that connect the letters to each other. I want to eliminate them to make a "clean" typographic study. Anybody have any suggestions about killing off those "between letter lines"?
import geomerative.*;
RFont font;
String myText = "SAITO GROUP";
String myTextTwo = "a";
void setup() {
size(800, 300);
background(255);
smooth();
RG.init(this);
font = new RFont("FreeSans.ttf", 100, CENTER);
noFill();
translate(width/2, height/1.7);
}
void draw() {
RCommand.setSegmentLength(mouseX);//TRY DIFFERENT VALUES HERE
RCommand.setSegmentator(RCommand.UNIFORMLENGTH);
RGroup myGroup = font.toGroup(myText);
//RGroup myGroupTwo = font.toGroup(myTextTwo);
RPoint[] myPoints = myGroup.getPoints();
//RPoint[] myPointsTwo = myGroupTwo.getPoints();
//beginShape();
background(0);
//fill(50,50);
//rect(0,0,width,height);
translate(411, 178);
stroke(255);
beginShape(POLYGON);//THIS CHANGES DRAMATICALLY THE FORM.
//POINTS, LINES, TRIANGLES, TRIANGLE_FAN,
//TRIANGLE_STRIP, QUADS, QUAD_STRIP, POLYGON;
for (int i=0; i<myPoints.length; i++) {
vertex(myPoints[i].x, myPoints[i].y);
//TRY CURVEVERTEX TOO BUT CHOOSE POLYGON MODE IN BEGINSHAPE()
//curveVertex(myPoints[i].x, myPoints[i].y);
}
// translate(60,0);
// for (int i=0; i<myPointsTwo.length; i++) {
// vertex(myPointsTwo[i].x, myPointsTwo[i].y);
// }
endShape(); // -- CLOSE?
}
Answers
Here is another example. This is some kind of quirk of the library that I am look for a high level solution for. Trying to eliminate those strange connection lines. You need to have a ttf font installed in your system to check it.
there are examples in the zip file, do they help?
all i can see is that you are calling font.toGroup() which gives you everything with no way of telling you where the characters end. perhaps one of the other methods on rfont will be better suited. you might have to do it a character at a time and space them yourself.