Any way to get custom fonts to work with a web applet?


font = new Font("q",0,0); String path = Glo.class.getProtectionDomain().getCodeSource().getLocation().getPath(); InputStream is = Glo.class.getResourceAsStream("resources/Vdj.ttf"); Font uniFont = null; try { //font = Font.createFont(0,new File(+"resources\\Vdj.ttf"));// "File" does not work with .jars uniFont=Font.createFont(Font.TRUETYPE_FONT,is); } catch(java.awt.FontFormatException r){ System.err.println("FontFormatException: " + r.getMessage()); } catch(java.io.IOException r){ System.err.println("FontFormatException: " + r.getMessage()); } font = uniFont.deriveFont(24f);