Embedding Fonts

Here should go questions about transforming XML with XSLT and FOP.
stuerdan
Posts: 1
Joined: Thu Apr 14, 2005 6:31 pm

Embedding Fonts

Post by stuerdan »

Hello

I have a problem with a font (HelveticaNeue Roman). I'm using FOP and Cocoon. On my machine i can create the PDF and the font is also correct. But when i save the PDF file and open it on another machine i get an error message "unable to find/create the font HelveticaNeue Roman)" and the characters are shown as "dots". :?

The appropriate part of my config file is:

Code: Select all


<font metrics-file="C:/Programme/Tomcat/webapps/cocoon/fop-fonts/HLR_____.PFM.xml" kerning="yes" embed-file="C:/PSFONTS/PFM/HLR_____.PFM">
<font-triplet name="HelveticaRoman" style="normal" weight="normal"/>
</font>
Is there a possibility to embed a font completly into the pdf document so that it is correct shown on another machine which don't have installed the font?

Thanks!!
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache »

Hi stuerdan,

The HelveticaNeue Roman font is a PostScript Type 1 font not a TrueType font. That means in the embed-file attribute you must specify the actual font data file not the font metrics file as you did in your FOP configuration file. From the Apache FOP site:
When setting the embed-file attribute for Type 1 fonts, be sure to specify the PFB (actual font data), not PFM (font metrics) file that you used to generate the XML font metrics file.
Regards,
Sorin
Post Reply