1

I Am loading a font through .ttf file in java but the size is coming as 1. How to make it more like 16

InputStream in = Check.class.getResourceAsStream("CALIBRI.TTF");  
Font font = Font.createFont(Font.TRUETYPE_FONT, in); 

1 Answer 1

2

Use Font.deriveFont(Font, float) to derive a font with the desired size from the newly created font.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.