Creating a Truetype Font file with javafx

I have used this library:
fontastic font maker

And that is how it works:

How to create a new Fontastic object:

Fontastic f = new Fontastic(this, "ExampleFont");  // Create a new Fontastic object

How to set further font properties:

f.setAuthor("Andreas Koller");                  // Set author name - will be saved in TTF file too

How to create a glyph for the character A with a random shape of four points(so here would be the points(or normalized points), which you have gathered before from user):

PVector[] points = new PVector[4];              // Define a PVector array containing the points of the shape
points[0] = new PVector(0, 0);                  // Start at bottom left
points[1] = new PVector(random(512), 0);        // The normal width is 512, the normal height 1024
points[2] = new PVector(random(512), random(1024)); // y coordinates are from bottom to top!
points[3] = new PVector(0, random(1024));

f.addGlyph('A').addContour(points);             // Assign contour to character A

How to generate the TrueType font file:

f.buildFont();                                  // Build the font resulting in .ttf and .woff files
                                                // and a HTML template to preview the WOFF

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)