In PSDocumentGraphics2D.writeFileHeader (and also in
PSRenderer.startPageSequence) the font dictionary is written into the PS file by
a call to PSFontUtil.writeFontDict.
At this time all of the fonts present in the fontInfo (defaults + those found in
the config file) seem to be written out, even those that won't be used in the fo
file.
I'm a bit worried because I can't reproduce that easily with FOrayFont. All I
can get is the set of fonts that were used within the document. I guess that
rendering starts as soon as possible and that at the time when the file header
is written out the whole document may not have been entirely parsed yet? (but
the PDFRenderer only stores used fonts by making a call to
FontInfo.getUsedFonts!? This also is the case in PSRenderer.stopRenderer).
So the question is: is there a mean to only put used fonts when writing out a PS
font dictionary? This would be cleaner anyway.
I hope I'm clear.
Vincent