목차

Java Swing Font

*.ttf 파일 Font 객체 생성

InputStream is = MyClass.class.getResourceAsStream("TestFont.ttf");
Font font = Font.createFont(Font.TRUETYPE_FONT, is);
 
Font sizedFont = font.deriveFont(12f);
myLabel.setFont(sizedFont);

Rendering Hints

graphics2D.setRenderingHint(
        RenderingHints.KEY_TEXT_ANTIALIASING,
        RenderingHints.VALUE_TEXT_ANTIALIAS_ON);

drawString