Hi All,
I'm trying to conver ttf to bitmap image. So i try
try{
Font f = Font.createFont( Font.TRUETYPE_FONT, new File("arial.ttf")); //Create font from ttf
Font tDerivedFont = f.deriveFont( 20f );
g.setFont(tDerivedFont);
GlyphVector gv = tDerivedFont.createGlyphVector(aFontRenderContext, "ABCDEFGHIJKLMNOPQRSTUVWXYZ");
g2.drawGlyphVector(gv, 10, 60); //This works fine
//what i hope to get is some thing like
ImageIO.write(someBufferedImage, "bmp", new File("test.bmp"));
catch ( FontFormatException tEx )
{
tEx.printStackTrace();
}
catch ( IOException tEx )
{
tEx.printStackTrace();
}
help please
Thanks in advance