mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-03 14:35:18 +00:00
trunk contents moved to root
This commit is contained in:
31
libsrc/ttf/src/fontatest/FontaTest.java
Normal file
31
libsrc/ttf/src/fontatest/FontaTest.java
Normal file
@@ -0,0 +1,31 @@
|
||||
package fontatest;
|
||||
|
||||
import fontastic.FPoint;
|
||||
import fontastic.Fontastic;
|
||||
import fontastic.PVector;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
|
||||
public class FontaTest {
|
||||
|
||||
/**
|
||||
* @param args the command line arguments
|
||||
*/
|
||||
public static void main(String[] args) throws IOException {
|
||||
File file=new File("example.ttf");
|
||||
file.delete();
|
||||
Fontastic f = new Fontastic("ExampleFont",file);
|
||||
f.setAuthor("Nobody");
|
||||
FPoint[] points = new FPoint[]{ // Define a PVector array containing the points of the shape
|
||||
new FPoint(0, 0),
|
||||
new FPoint(512,0),
|
||||
//new FPoint(256, 1024),
|
||||
new FPoint(new PVector(256,1024), new PVector(512,512)),
|
||||
new FPoint(0, 0)
|
||||
};
|
||||
f.addGlyph('P').addContour(points); // Assign contour to character A
|
||||
f.buildFont();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user