Answers for "new font java"

0

use custom font java

try {
     GraphicsEnvironment ge = 
         GraphicsEnvironment.getLocalGraphicsEnvironment();
     ge.registerFont(Font.createFont(Font.TRUETYPE_FONT, new File("A.ttf")));
} catch (IOException|FontFormatException e) {
     //Handle exception
}
Posted by: Guest on May-10-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language