I have to internationalize an application, and therefore have to let a user chose a font for a PDF that I will create at runtime. I want to be able to display a list of font choices from the user's system using
GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts();
This works fine for getting fonts, but then it seems that I have to jump through some hoops to get that font to play nice with FOP, as outlined here. I can follow all the instructions that they've outlined, except I'm not sure how to get the location of fonts in order to run TTFReader.
- Does anyone know how to list the path of each font that java gathers with the getAllFonts() command?
- Is it a good idea to embed fonts in PDFs? For instance the Arial Unicode MS TFF file is ~ 30 MB.
- Is this the only way to create internationalized pdfs with FOP and XSL?