Can I use a specifc font in a Swing application without asking the user of the application to alter the font.properties file?
Created May 4, 2012
Sandip Chitale The following resources may be helpful -
- http://java.sun.com/products/jdk/1.2/docs/guide/internat/physicalfont.html
- http://java.sun.com/products/jdk/1.2/docs/guide/internat/unicode_font.doc.html
- http://java.sun.com/products/jdk/1.2/docs/guide/internat/fontprop.html
- http://www.ibm.com/java/education/international-text/index.html
Jean-Baptiste Bugeaud adds...
You may use
Cool but only available in 1.3, and also works within applets!
Font.createfont(Font.TRUETYPE_FONT,this.getClass().getRessource("myfont.ttf"))
See http://java.sun.com/j2se/1.3/docs/api/java/awt/Font.html#createFont(int, java.io.InputStream) for details ...