xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason R Briggs <jason.bri...@rhe.co.nz>
Subject Re: Fop 0.91beta and fonts
Date Mon, 20 Feb 2006 20:10:36 GMT
Hi Jeremias

Thanks for your reply.

There are no other errors in the logs related to fonts.

The reason I posted only part of the fop.xconf is that I used the 
example included in the conf directory of the fop distribution (with the 
only additions being my 2 fonts).  The full conf (minus comments) is:

<?xml version="1.0"?>

<fop version="1.0">

   <base>.</base>

   <source-resolution>72</source-resolution>
   <target-resolution>72</target-resolution>

   <default-page-settings height="11in" width="8.26in"/>

   <renderers>
     <renderer mime="application/pdf">
       <filterList>
         <value>flate</value>

       </filterList>

       <fonts>
         <font metrics-url="6999e.xml" kerning="yes" embed-url="6999e.TTF">
             <font-triplet name="ArialMaori" style="normal" 
weight="normal" />
         </font>

         <font metrics-url="69ec6.xml" kerning="yes" embed-url="69ec6.TTF">
             <font-triplet name="ArialMaoriBold" style="normal" 
weight="bold" />
         </font>
       </fonts>

     </renderer>

     <renderer mime="application/postscript">
     </renderer>

     <renderer mime="application/vnd.hp-PCL">
     </renderer>

     <renderer mime="image/svg+xml">
       <format type="paginated"/>
       <link value="true"/>
       <strokeText value="false"/>
     </renderer>

     <renderer mime="application/awt">
     </renderer>

     <renderer mime="text/xml">
     </renderer>

     <renderer mime="text/plain">
       <pageSize columns="80"/>
     </renderer>

   </renderers>

</fop>

I've checked out and built the latest trunk from subversion and tried 
again, but still get the same error.  I've also tried using an absolute 
url for the metrics-url attribute (e.g. something like 
metrics-url="file:///home/jason/mypath/to/6999e.xml") but that doesn't 
appear to help either.

Not sure if it makes any difference, but I changed the font-name in the 
each metrics xml file I generated from the TTFs, because it contained a 
non-ascii character (an o with an umlaut) and this appeared to cause 
another problem.

Regards
Jason


Jeremias Maerki wrote:
> Please check if you don't have any other warnings or error in the log
> output about loading fonts. Note that support for relative font URLs has
> been added after the 0.91beta release. It might be a good idea to get
> the latest source code using Subversion if you don't manage otherwise.
> Alternatively, specify the fonts using absolute URLs for the time being.
> 
> As I told José, you, too, only published part of the fop.xconf without
> the possibility for me to see if the section is in the right place.
> 
> On 20.02.2006 03:36:38 Jason R Briggs wrote:
> 
>>I have the same issue with 0.91beta.  I have 2 fonts (6999e.TTF and 
>>69ec6.TTF) with TTF files, xml metric files and fop.xconf in the same 
>>working directory.
>>
>>The relevant portion of fop.xconf is:
>>
>><fonts>
>>   <font metrics-url="6999e.xml" kerning="yes" embed-url="6999e.TTF">
>>     <font-triplet name="ArialMaori" style="normal" weight="normal" />
>>   </font>
>>   <font metrics-url="69ec6.xml" kerning="yes" embed-url="69ec6.TTF">
>>     <font-triplet name="ArialMaoriBold" style="normal" weight="bold" />
>>   </font>
>></fonts>
>>
>>I'm attempting to use the font as in the following example:
>>
>><block font-size="12pt"
>>   font-family="ArialMaoriBold"
>>   font-weight="bold"
>>   line-height="15pt"
>>   space-after.optimum="15pt">Summary</block>
>>
>>
>>In code, I load the configuration using:
>>
>>   DefaultConfigurationBuilder cfgBuilder = new 
>>DefaultConfigurationBuilder();
>>   Configuration cfg = cfgBuilder.buildFromFile(new File("fop.xconf"));
>>   FOUserAgent userAgent = new FOUserAgent();
>>   userAgent.setUserConfig(cfg);
>>
>>Then initialise Fop with:
>>
>>Fop fop = new Fop(MimeConstants.MIME_PDF, userAgent);
>>
>>
>>And I'm getting a similar error when I run my app:
>>
>>(fonts.FontInfo 194 ) Font 'ArialMaoriBold,normal,700' not found. 
>>Substituting with default font.
>>
>>Any ideas where I may be going wrong?
>>
>>Thanks,
>>Jason
>>
>>
>>
>>>Subject:
>>>Re: Fop 0.91beta and fonts
>>>From:
>>>Jeremias Maerki <dev@jeremias-maerki.ch>
>>>Date:
>>>Wed, 15 Feb 2006 13:23:23 +0100
>>>To:
>>>fop-users@xmlgraphics.apache.org
>>>
>>>To:
>>>fop-users@xmlgraphics.apache.org
>>>
>>>
>>>Your font configuration is taken a little out of the context so it's
>>>impossible to tell whether you did everything right in the config file.
>>>Anyway, you're using TrueType fonts and these have to be embedded to
>>>work. So, "embed-url" on the "font" elements is definitely missing.
>>>
>>>On 15.02.2006 12:34:59 jologa wrote:
>>>
>>>
>>>>Hi,
>>>>
>>>>I have a small problem with fonts. My FO contains the following
>>>>
>>>><fo:block text-align="left" space-after.optimum="3pt" line-height="18pt"
font-style="normal" background-color="#FFFFFF" color="#000000" font-weight="normal" text-decoration="none"
font-family="Arial" font-size="14pt" id="N100A4">
>>>>     1. My Paragraph 
>>>></fo:block>
>>>>
> 
> 
> Jeremias Maerki
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Mime
View raw message