[email protected] wrote:
Hi Guys,
Hi Martin,
Time for my normal once yearly issue with fonts..
I'm trying to get postscript working for me, and have noticed an anomaly I'm
struggling to work around. I'm currently using a TrueType font, and have
tried the same with a Type1 font to no avail.
When I go from FO -> PS - Everything works fine, it picks up my 'Verdana'
font without a problem.
When I go from FO -> IF -> PS - I get a java exception (fontName must not be
null) in the IF -> PS Phase.
I recantly went through similar pain trying to understand why I was
getting such errors. Turns out FOP is not robust enough to handle
differences in font configuration between the mimicked Renderer and
actual Renderer.
So when you generate IF you specify which Renderer to mimic. In my case
I specified PS, and then afterwards I generated PS and PDF from IF. I
was getting errors because I had Normal version of a font registered for
PDF and bold variant only for PS.
My command line arguments are as follows;
FO -> PS
C:\dev\workspace_java\FOP\fop.bat -c
C:\dev\workspace_java\FOP\conf\fop.xconf c:\dev\clients\xx\test.fo -ps
test.ps
FO -> IF
C:\dev\workspace_java\FOP\fop.bat -c
C:\dev\workspace_java\FOP\conf\fop.xconf C:\dev\Clients\xx\test.fo -if
"application/postscript" c:\dev\clients\xx\test.if
This indicates you mimic the PS Renderer when generating PS, so
everything looks ok.
In the fop.xconf - I have:
<renderer mime="application/postscript">
<optimize-resources>true</optimize-resources>
<fonts>
<directory>C:\dev\pdfbin\fonts</directory>
</fonts>
</renderer>
<renderer mime="application/X-fop-intermediate-format">
<fonts>
<directory>c:\dev\pdfbin\fonts\</directory>
</fonts>
</renderer>
You could try adding the fonts to PDF Renderer just in case. Or try
manually listing all the Fonts you need in the directory rather than
relying on auto detection. Other than that I can't see whats wrong!
<snip/>
Chris
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]