method = GeneratorMethod.FREETYPE2;
new Thread() {
public void run () {
fontGenerator = new FontGenerator(fontData, method);
CharSet charset = new CharSet();
charset.setManualCharacters(text);
try {
fontGenerator.generate(width, height, charset, padding, new Effect.Renderer[0], true);
fontGenerator.write(new File("out"), ExportFormat.TEXT);
} catch (IOException ex) {
ex.printStackTrace();