try {
Font font = Font.createFont(Font.TRUETYPE_FONT,
new File("./Fonts/AyyBoyyy.ttf"));
Font bold = font.deriveFont(Font.BOLD, 12);
Font plain = font.deriveFont(Font.PLAIN, 12);
} catch (FontFormatException | IOException e) {
e.printStackTrace();
}
Font f = new Font("Arial", Font.BOLD, 12);
try {
GraphicsEnvironment ge =
GraphicsEnvironment.getLocalGraphicsEnvironment();
ge.registerFont(Font.createFont(Font.TRUETYPE_FONT, new File("A.ttf")));
} catch (IOException|FontFormatException e) {
//Handle exception
}
Code Example |
---|
:: |
:: |
Java :: |
:: |
:: |
:: |
:: |
:: |
:: what is deserialization in java |
Java :: lopping rows rethinkdb |
:: |
Java :: |
:: |
:: |
:: |
:: |
Java :: coin flip random java |
Java :: |
Java :: |
:: |
:: |
:: |
Java :: |
Java :: |
:: |
:: @Bean public ModelMapper modelMapper() { ModelMapper modelMapper = new ModelMapper(); modelMapper.getConfiguration() .setMatchingStrategy(MatchingStrategies.STRICT); } |
:: |
:: |
Java :: |
Java :: |