You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by "Lee, Betty" <BL...@rwd.com> on 2007/07/23 22:51:58 UTC

Cannot load font: failed to create Source from metrics file

Hello FOP Users,
 
I am new to using FOP and have been encountering this problem, hopefully
some of you gurus out there can shed some light.
 
Currently I am using FOP 0.93, attempting to use the Arial font on some
of my fo:blocks.
 
I followed the instructions on the Apache FOP site on how to set up the
configuration file, and here's a snippet within my pdf renderer.  Note
that both the metrics file and the ttf file are in the same directory as
the config file:
 
        <font metrics-url="arial.ttf.xml" kerning="yes"
embed-url="ARIAL.TTF">
          <font-triplet name="Arial" style="normal" weight="normal"/>
          <font-triplet name="ArialMT" style="normal" weight="normal"/>
        </font>
 
        <font metrics-url="ARIALUNI.TTF.xml" kerning="yes"
embed-url="ARIALUNI.TTF">
          <font-triplet name="Arial" style="normal" weight="normal"/>
          <font-triplet name="ArialMT" style="normal" weight="normal"/>
        </font>

 
I get the following error when I attempt to render a pdf:
 
org.xml.sax.SAXException: Cannot load font: failed to create Source from
metrics file ARIALUNI.TTF.xml
 
I generated my metrics file with the following command:
 
java -cp
fop-0.93.jar;avalon-framework-api-4.3.jar;commons-logging-1.0.4.jar;comm
ons-io-1.2.jar org.apache.fop.fonts.apps.TTFReader -fn Arial
ArialUni.ttf ArialUni.ttf.xml
 
Any help is greatly appreciated.
 
-Betty Lee
 
 

The contents of this e-mail message and any attachments may be confidential or legally privileged or protected information of RWD Technologies, Inc., or its affiliates. If you are not an intended recipient of the original sender, please immediately delete this e-mail message and any attachments, including any copies of same, and inform the sender of the erroneous delivery by return e-mail. Unintended recipients are prohibited from retaining, copying, distributing, disclosing or otherwise using any information contained in this message or its attachments for any purpose and will be held legally responsible for any improper use. Thank you for your cooperation.