Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

Manipulate a custom type made with .UFO

$
0
0

Hi,

I´m working in a project which need to manipulate the typeface structure. The originals vectors are made it in Robofont and all the glyphs are made with just a single stroke, as you can see in the follow image. The font is on UFO.

I need to use this font on processing, but the .ttf or .otf is not allowed the glyphs with open contour. When I try to export the font in the font editor it close the glyphs contour. As you can see also in the image above.

So I can´t use .ttf or .otf for my font, and I need to work with the open contour, because I´m working with a geomerative library on processing and don't want a "outlined" font.

There is any way to use my UFO on processing?

I´m sending an example that I made it by importing a SVG file with phrase made it on illustrator, just to example what I need.

Sorry for my bad english.

Thanks!


import geomerative.*;

RShape txt;
RShape polytxt;
int r = 20; 

void setup() {
  size(800, 800);

  RG.init(this);

  txt = RG.loadShape("txt.svg");
  txt = RG.centerIn(txt, g, 100); 

  RG.ignoreStyles();
  noFill();
  strokeWeight(2);
  stroke(255);
  strokeJoin(ROUND);
}

void draw() {
  background(0);

  float pointSeparation = map(constrain(mouseX, 100, width-100), 100, width-100, 6, 200);
  float weight = map(mouseY, 0, height, 1, 500);

  RG.setPolygonizer(RG.UNIFORMLENGTH);
  RG.setPolygonizerLength(pointSeparation);
  polytxt = RG.polygonize(txt);
  
  RG.shape(polytxt, width/2, height/2);
}

Viewing all articles
Browse latest Browse all 2896

Trending Articles