Hi Dennis

I was totally blind when I read your initial mail. Sorry, I was wasting
your time. See my comments below.

On 15.11.2002 11:33:20 Dennis Myrén wrote:
> Hi there.
>  
> I am using the FOP tools to generate PDF output from FO documents.
> In the PDF document, i need to embed a PostScript Font named 
> StandardGroteskBSK.
> This is my userconfig.xml file:
> <configuration>
>   <fonts>  
>     <font 
> metrics-file="C:\Inetpub\wwwroot\DVDebugger\bin\Debug\FontMetrics\SK021___.xml"
>  kerning="yes" 
>     embed-file="C:\Program Files\Adobe\Adobe Type 
> Manager\psfonts\SK021___.PFB">
>       <font-triplet name="StandardGroteskBSK" style="normal" weight="normal" 
> />
>     </font>    
>     <font 
> metrics-file="C:\Inetpub\wwwroot\DVDebugger\bin\Debug\FontMetrics\SK051___.xml"
>  kerning="yes" 
>     embed-file="C:\Program Files\Adobe\Adobe Type 
> Manager\psfonts\SK051___.PFB">
>       <font-triplet name="StandardGroteskBSK" style="normal" weight="bold" />
>     </font>    
>   </fonts>
> </configuration>
>  
> I get no errors during the FOP.bat batch job while generating the PDF.
> However, text in the PDF document(etc. cells in tables) are very bad aligned, 
> it looks awful.
>  
> I read that sometimes one need to manually alter the PFMReader generated XML 
> font metrics file,
> to correct the approximated values.
> I followed an example to do that with my XML metrics file, but the result is 
> as bad as before.
>  
> When placing the PDF object in an Illustrator 10 document, a messagebox pops 
> up:
> "The document "C:\Inetpub\wwwroot\DVDebugger\bin\Debug\output.PDF" contains 
> objects that have been interpreted."
> "Missing Type1 fonts have been substituted with the default font".
> As the PDF elements are no longer objects, i cant select a text element to 
> see if it is the correct font.

I think I know what causes this problem. I believe that the PFB file is
not embedded correctly into the PDF file. There are little segment
prefixes in the PFB file that are not directly described in the Type 1
specification, but only in the "Download Fonts" spec from Adobe. Adobe
Acrobat doesn't mind that, but maybe Illustrator doesn't like that. I'll
try to fix that. The only problem I have is that I don't have Adobe
Illustrator to test afterwards. I'll send you a PDF to check when I've
got it.

> I then tried the parameter "-print" with FOP.bat, 
> to print the document directly.
> First I embedded Verdana with this print job, that worked.
> Then i used this PostScript font StandardGroteskBSK, which raised a 
> FontFormatException.

This MUST fail. "-print" invokes the AWTRenderer. AWT does only support
TrueType font to be loaded from a file, but not Type 1 fonts. That's why
you get an error. So this means you can't use a Type 1 font if you want
to use the AWT/Print renderer. Try removing the embed-file attribute in
the userconfig.xml and check if the font is properly used if it's
installed on your system. Of course, you will have to reenable
embed-file if you generate a PDF with embedded fonts.

> This is the debug output:
>  
> C:\Program Files\Batik\fop-0.20.4>java -cp 
> build\fop.jar;lib\batik.jar;lib\xalan-2.3.1.jar;lib\xercesImpl-2.0.1.jar;lib\xm
> l-apis.jar;lib\avalon-framework-cvs-20020315.jar;lib\logkit-1.0.jar;lib\jimi-1.0.jar
>  org.apache.fop.apps.Fop -d -c "C:\Ine
> tpub\wwwroot\DVDebugger\bin\Debug\fopconfig.xml" 
> "C:\Inetpub\wwwroot\DVDebugger\bin\Debug\out.FO" -print
> [DEBUG] Input mode:
> [DEBUG] FO
> [DEBUG] fo input file: C:\Inetpub\wwwroot\DVDebugger\bin\Debug\out.FO
> [DEBUG] Output mode:
> [DEBUG] print directly
> [DEBUG] OPTIONS
> [DEBUG] user configuration file: 
> C:\Inetpub\wwwroot\DVDebugger\bin\Debug\fopconfig.xml
> [DEBUG] debug mode on
> [DEBUG] dump configuration
> [DEBUG] quiet mode on
> [DEBUG] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
> [DEBUG] reading user configuration file
> [DEBUG] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
> [DEBUG] base directory: file:/C:/Inetpub/wwwroot/DVDebugger/bin/Debug/
> [ERROR] FOP 0.20.4
> [DEBUG] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
> [ERROR] Logger not set
> [INFO] building formatting object tree
> [DEBUG] setting up fonts
> [INFO] [1]
> [DEBUG] create embedFont C:\Program Files\Adobe\Adobe Type 
> Manager\psfonts\SK021___.PFB
> [ERROR] Failed to create embedFont C:\Program Files\Adobe\Adobe Type 
> Manager\psfonts\SK021___.PFB : java.awt.FontFormatExc
> eption: Unable to create font - bad font data
> [WARNING] table-layout=auto is not supported, using fixed!
> [WARNING] table-layout=auto is not supported, using fixed!
> [WARNING] table-layout=auto is not supported, using fixed!
> [WARNING] table-layout=auto is not supported, using fixed!
> [WARNING] table-layout=auto is not supported, using fixed!
> [INFO] Parsing of document complete, stopping renderer
>  
>  
>  
> Does this mean that the font files are corrupt or something?
>  
> Please help me.



Jeremias Maerki

Reply via email to