private void saveFontToFile(FreeTypeBitmapFontData data, int fontSize, String fontName, PixmapPacker packer, FileHandle destiny) { FileHandle fontFile = Gdx.files.absolute(destiny.file() .getAbsolutePath() + File.separator + fontName + ".fnt"); // .fnt // path BitmapFontWriter.setOutputFormat(BitmapFontWriter.OutputFormat.Text); String[] pageRefs = BitmapFontWriter.writePixmaps(packer.getPages(), destiny, fontName); // png dir path Gdx.app.debug(TAG, String.format( "Saving font [%s]: fontfile: %s, pixmapDir: %s\n", fontName, fontFile, destiny)); BitmapFontWriter.writeFont(data, pageRefs, fontFile, new BitmapFontWriter.FontInfo(fontName, fontSize), 1, 1); }
private void saveFontToFile( FreeTypeFontGenerator.FreeTypeBitmapFontData data, int fontSize, String fontName, PixmapPacker packer, FileHandle destiny) { FileHandle fontFile = destiny.child(fontName + ".fnt"); // .fnt path BitmapFontWriter.setOutputFormat(BitmapFontWriter.OutputFormat.Text); String[] pageRefs = BitmapFontWriter.writePixmaps(packer.getPages(), destiny, fontName); // png dir path BitmapFontWriter.writeFont(data, pageRefs, fontFile, new BitmapFontWriter.FontInfo(fontName, fontSize), 1, 1); }