Anyway, it's the opposite of what Victor wanted.Yeah.
OOps, yes.I think you meant return Font.createFont(Font.TRUETYPE_FONT, new FileInputStream...
This means users can use AWT fonts for creating PDF, but they can't embed them. This may cause the resulting PDF to fail, but so what.
--> Support questions
It depends. If users are still required to declare used fonts explicitely as well as whether they should be embedded, and FOP bails out if told to embed an AWT font, it shouldn't be much of a problem.
And there's still the question if we can produce font metric information for the target formats (there's PCL and PostScript and..., too) that result in the desired output.
The idea was to query the renderer for fonts, or get a renderer specific font manager, and use the abstract interface to get mainly character metrics, various other font measures and perhaps font attributes like "sans-serif" or so.
Seriously, I don't think working with AWT's Font will do us any good. The differences between JDKs are too great.
Hmhm. I still think - We must be able to use AWT fonts in the AWT renderer. - We must be able to use the default PDF fonts for the PDF renderer - We should be able to use TTF for both AWT and PDF - We should not rely on the default PDF fonts in the AWT renderer (doh!) - I'd like to support using TTF with generated and possibly hand-corrected metrics as well as using TTF directly.
The possiblity to use AWT fonts for non-embedded fonts in PDF is a bonus. The possiblity to use AWT fonts in PDF even for embedding would be just another bonus.
J.Pietschmann