Answers for "how to add custom font in dffont in 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 "how to add custom font in dffont in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language