Try: FontFactory.register("/resources/fonts/times.ttf", "my_times_font");
Paulo ----- Original Message ----- From: "Trevor Kramer" <[EMAIL PROTECTED]> To: "Post all your questions about iText here" <itext-questions@lists.sourceforge.net> Sent: Tuesday, November 28, 2006 10:14 PM Subject: [iText-questions] FontFactory.register and jars > Is it possible to use a font in a jar with FontFactory.register()? > When I try this > > FontFactory.register(getClass().getResource("/resources/fonts/times.ttf").getPath(), > "my_times_font); > > I get a Caused by: ExceptionConverter: java.io.FileNotFoundException: > /Users/user/Documents/src/project/dist/project_11-28-06-140459.jar!/resources/fonts/times.ttf > (No such file or directory) > > even though the font is in the jar file. We are placing the fonts in > jar files because we are using webstart to deploy our app. > > Thanks, > > Trevor > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > iText-questions mailing list > iText-questions@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/itext-questions > Buy the iText book: http://itext.ugent.be/itext-in-action/ ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/