Hershey line font library

I've created a library for drawing Hershey line fonts: https://en.wikipedia.org/wiki/Hershey_font

We use it for rendering line fonts for drawbots. Polarbot SE draws only the outlines of common fonts. Thus we needed line fonts.

I tried to make the interface compatible PFont. Thus text is simply drawn by writing hf.text("Hello", 0, 0);

The library directly draws the font as vertices. But it also creates PShape of a string. SVG export works great with P8gGraphicsSVG.

Example: import de.ixdhof.hershey.*;

HersheyFont hf;

void setup()
{
  size(925, 500, P3D);
  hf = new HersheyFont(this, "cursive.jhf");
  hf.textSize(100);
}

void draw()
{
  background(255);

  translate(100, height/3);
  hf.text("Hello", 0, 0);
}

Website: http://ixd-hof.de/processing_hersheyfont/

Download: https://github.com/ixd-hof/HersheyFont/raw/master/distribution/HersheyFont-1/download/HersheyFont.zip

Source Code: https://github.com/ixd-hof/HersheyFont

Comments

Sign In or Register to comment.