Answers for "java custom font"

3

Howow to use font object Java

Font smallFont = new Font("Monospaced", Font.PLAIN, 10);  
Font bigFont = new Font("Serif", Font.BOLD, 18);
Posted by: Guest on October-28-2020
1

java font

setFont (new Font ("TimesRoman", Font.BOLD/Font.PLAIN/Font.ITALIC, 20));
Posted by: Guest on January-21-2021
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