【初心者】Java質問・相談スレッド108【大歓迎】
■ このスレッドは過去ログ倉庫に格納されています
0477デフォルトの名無しさん
2007/11/15(木) 05:23:56import java.awt.font.*;
import java.awt.geom.*;
import java.io.*;
public class eps{
public static void main(String args[]){
try {
FileInputStream fin = new FileInputStream( "MSgothic.ttf" ); //参照したいフォント
Font font = Font.createFont( Font.TRUETYPE_FONT, fin );
fin.close();
GlyphVector glyph = font.createGlyphVector(
new FontRenderContext(new AffineTransform(), false, false),
"some text" //抽出したい文字列
);
} catch (Exception e) {
e.printStackTrace();
}
}
}
■ このスレッドは過去ログ倉庫に格納されています