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 jo...@netscape.net on 2006/02/15 12:34:59 UTC

Fop 0.91beta and fonts

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>


and when I render it to get a PDF outout I get

"Font 'Arial,normal,400' not found. Substituting with default font"

Here is what I have in fop.xconf for the fonts section. Has it something to do with the URL of the fonts ? ( I do not want thte fonts embedded)

Thanks for any help.
José

<fonts>
 <font metrics-url="arial.xml" kerning="yes">
    <font-triplet name="Arial" style="normal" weight="normal"/>
    <font-triplet name="ArialMT" style="normal" weight="normal"/>
 </font>

 <font metrics-url="arialb.xml" kerning="yes">
    <font-triplet name="Arial" style="normal" weight="bold"/>
    <font-triplet name="ArialMT" style="normal" weight="bold"/>
 </font>
 <font metrics-url="ariali.xml" kerning="yes">
    <font-triplet name="Arial" style="italic" weight="normal"/>
    <font-triplet name="ArialMT" style="italic" weight="normal"/>
 </font>
 <font metrics-url="arialbi.xml" kerning="yes">
    <font-triplet name="Arial" style="italic" weight="bold"/>
    <font-triplet name="ArialMT" style="italic" weight="bold"/>
 </font>
 
 <font metrics-url="msgothic.xml" kerning="yes">
    <font-triplet name="Gothic" style="normal" weight="normal"/>
    <font-triplet name="Gothic" style="normal" weight="bold"/>
    <font-triplet name="Gothic" style="italic" weight="normal"/>
    <font-triplet name="Gothic" style="italic" weight="bold"/>
 </font>
 <font metrics-url="msmincho.xml" kerning="yes">
    <font-triplet name="Mincho" style="normal" weight="normal"/>
    <font-triplet name="Mincho" style="normal" weight="bold"/>
    <font-triplet name="Mincho" style="italic" weight="normal"/>
    <font-triplet name="Mincho" style="italic" weight="bold"/>
   </font>

      </fonts>



__________________________________________________________________
Switch to Netscape Internet Service.
As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register

Netscape. Just the Net You Need.

New! Netscape Toolbar for Internet Explorer
Search from anywhere on the Web and block those annoying pop-ups.
Download now at http://channels.netscape.com/ns/search/install.jsp

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


Re: Fop 0.91beta and fonts

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Please send me a simple FO file showing the problem along with your
configuration file (but without the fonts) off-line to my mail address.
I'll try to reproduce the problem. As long as I can't reproduce it
it doesn't help to log a Bugzilla entry.

On 20.02.2006 22:18:58 Jason R Briggs wrote:
> Yes, generating PDF (sorry should've confirmed that before).  I can't 
> see anything out-of-place myself -- and I've gone through it a couple of 
> times.  Is this something I should be lodging in Bugzilla?
<snip/>


Jeremias Maerki


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


Re: Fop 0.91beta and fonts

Posted by Jason R Briggs <ja...@rhe.co.nz>.
Yes, generating PDF (sorry should've confirmed that before).  I can't 
see anything out-of-place myself -- and I've gone through it a couple of 
times.  Is this something I should be lodging in Bugzilla?

J

Jeremias Maerki wrote:
> Hmm, ok, let's try a different question: Are you really generating PDF?
> If you render anything other than PDF the font configuration won't apply
> to it. If, for example, you render to PostScript you'll have to
> replicate the font configuration under the entry with
> "application/postscript".
> 
> I don't think the change in font-name caused anything here. FOP clearly
> doesn't find the ArialMaoriBold font with font-weight="bold" and style="normal".
> If it's not the above I'm starting to run out of ideas.
> 
> On 20.02.2006 21:10:36 Jason R Briggs wrote:
> 
>>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 <de...@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


Re: Fop 0.91beta and fonts

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Hmm, ok, let's try a different question: Are you really generating PDF?
If you render anything other than PDF the font configuration won't apply
to it. If, for example, you render to PostScript you'll have to
replicate the font configuration under the entry with
"application/postscript".

I don't think the change in font-name caused anything here. FOP clearly
doesn't find the ArialMaoriBold font with font-weight="bold" and style="normal".
If it's not the above I'm starting to run out of ideas.

On 20.02.2006 21:10:36 Jason R Briggs wrote:
> 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 <de...@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


Re: Fop 0.91beta and fonts

Posted by Jason R Briggs <ja...@rhe.co.nz>.
Doh!!  Beginners stuff.

Should've seen that one myself.

Thanks very much Jeremias.

J

Jeremias Maerki wrote:
> Problem solved. :-) You sent me your Java code and here's what I found:
> 
> 
>>public class Builder {
>>
>>	private FOUserAgent userAgent;
>>	
>>	public Builder() throws Exception {
>>		File f = new File(".");
>>	
>>		DefaultConfigurationBuilder cfgBuilder = new DefaultConfigurationBuilder();
>>		Configuration cfg = cfgBuilder.buildFromFile(new File("fop.xconf"));
>>		FOUserAgent userAgent = new FOUserAgent();
> 
> 
>               ^^^^^^^^^^^^^^^
> 
> needs to be: this.userAgent = new FOUserAgent();
> 
> 
> 
>>		userAgent.setUserConfig(cfg);
>>		
>>	}
> 
> 
> You're setting the local variable instead of the instance variable of
> the class. That's why the (right) user agent never get's the
> configuration.
> 
> 
> On 20.02.2006 23:06:20 Jason R Briggs wrote:
> 
>>Seems as if the font configuration isn't active then.  I set the url in 
>>the font configuration to:
>>
>>file://blah/6999e.xml
>>
>>and also tried a completed invalid filename, with no new error messages 
>>output.
>>
>>
>>Jeremias Maerki wrote:
>>
>>>That's why I asked for other error messages. I think if it can't find
>>>the TTF file it tells you. That's why I think that FOP doesn't know
>>>about the fonts at all. Remains the question whether the configuration
>>>is really active. Jason, try messing up one of the URLs in the font
>>>configuration. If nothing happens, then the config isn't loaded at all.
>>>Grasping at straws.... :-)
>>>
>>>On 20.02.2006 22:44:33 Andreas L Delmelle wrote:
>>>
>>>
>>>>On Feb 20, 2006, at 21:10, Jason R Briggs wrote:
>>>>
>>>>Hi People,
>>>>
>>>>Just a sanity check...
>>>>
>>>>
>>>>>     <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'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.
>>>>
>>>>Try doing the same for the "embed-url". May be the cause of your  
>>>>trouble... I'm guessing right now, FOP goes looking for it in the  
>>>>wrong place.
>>>
>>>
>>>
>>>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
> 
> 
> 
> 
> 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


Re: Fop 0.91beta and fonts

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Problem solved. :-) You sent me your Java code and here's what I found:

> public class Builder {
> 
> 	private FOUserAgent userAgent;
> 	
> 	public Builder() throws Exception {
> 		File f = new File(".");
> 	
> 		DefaultConfigurationBuilder cfgBuilder = new DefaultConfigurationBuilder();
> 		Configuration cfg = cfgBuilder.buildFromFile(new File("fop.xconf"));
> 		FOUserAgent userAgent = new FOUserAgent();

              ^^^^^^^^^^^^^^^

needs to be: this.userAgent = new FOUserAgent();


> 		userAgent.setUserConfig(cfg);
> 		
> 	}

You're setting the local variable instead of the instance variable of
the class. That's why the (right) user agent never get's the
configuration.


On 20.02.2006 23:06:20 Jason R Briggs wrote:
> Seems as if the font configuration isn't active then.  I set the url in 
> the font configuration to:
> 
> file://blah/6999e.xml
> 
> and also tried a completed invalid filename, with no new error messages 
> output.
> 
> 
> Jeremias Maerki wrote:
> > That's why I asked for other error messages. I think if it can't find
> > the TTF file it tells you. That's why I think that FOP doesn't know
> > about the fonts at all. Remains the question whether the configuration
> > is really active. Jason, try messing up one of the URLs in the font
> > configuration. If nothing happens, then the config isn't loaded at all.
> > Grasping at straws.... :-)
> > 
> > On 20.02.2006 22:44:33 Andreas L Delmelle wrote:
> > 
> >>On Feb 20, 2006, at 21:10, Jason R Briggs wrote:
> >>
> >>Hi People,
> >>
> >>Just a sanity check...
> >>
> >>>      <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'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.
> >>
> >>Try doing the same for the "embed-url". May be the cause of your  
> >>trouble... I'm guessing right now, FOP goes looking for it in the  
> >>wrong place.
> > 
> > 
> > 
> > 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



Jeremias Maerki


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


Re: Fop 0.91beta and fonts

Posted by Jason R Briggs <ja...@rhe.co.nz>.
Seems as if the font configuration isn't active then.  I set the url in 
the font configuration to:

file://blah/6999e.xml

and also tried a completed invalid filename, with no new error messages 
output.


Jeremias Maerki wrote:
> That's why I asked for other error messages. I think if it can't find
> the TTF file it tells you. That's why I think that FOP doesn't know
> about the fonts at all. Remains the question whether the configuration
> is really active. Jason, try messing up one of the URLs in the font
> configuration. If nothing happens, then the config isn't loaded at all.
> Grasping at straws.... :-)
> 
> On 20.02.2006 22:44:33 Andreas L Delmelle wrote:
> 
>>On Feb 20, 2006, at 21:10, Jason R Briggs wrote:
>>
>>Hi People,
>>
>>Just a sanity check...
>>
>>>      <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'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.
>>
>>Try doing the same for the "embed-url". May be the cause of your  
>>trouble... I'm guessing right now, FOP goes looking for it in the  
>>wrong place.
> 
> 
> 
> 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


Re: Fop 0.91beta and fonts

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
That's why I asked for other error messages. I think if it can't find
the TTF file it tells you. That's why I think that FOP doesn't know
about the fonts at all. Remains the question whether the configuration
is really active. Jason, try messing up one of the URLs in the font
configuration. If nothing happens, then the config isn't loaded at all.
Grasping at straws.... :-)

On 20.02.2006 22:44:33 Andreas L Delmelle wrote:
> On Feb 20, 2006, at 21:10, Jason R Briggs wrote:
> 
> Hi People,
> 
> Just a sanity check...
> >
> >       <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'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.
> 
> Try doing the same for the "embed-url". May be the cause of your  
> trouble... I'm guessing right now, FOP goes looking for it in the  
> wrong place.


Jeremias Maerki


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


Re: Fop 0.91beta and fonts

Posted by Jason R Briggs <ja...@rhe.co.nz>.
Tried that just after I sent the original message.  No luck with both 
set, or either/or.


Andreas L Delmelle wrote:
> On Feb 20, 2006, at 21:10, Jason R Briggs wrote:
> 
> Hi People,
> 
> Just a sanity check...
> 
>>
>>       <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'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.
> 
> 
> Try doing the same for the "embed-url". May be the cause of your  
> trouble... I'm guessing right now, FOP goes looking for it in the  wrong 
> place.
> 
> HTH!
> 
> Cheers,
> 
> Andreas
> 
> 
> ---------------------------------------------------------------------
> 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


Re: Fop 0.91beta and fonts

Posted by Andreas L Delmelle <a_...@pandora.be>.
On Feb 20, 2006, at 21:10, Jason R Briggs wrote:

Hi People,

Just a sanity check...
>
>       <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'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.

Try doing the same for the "embed-url". May be the cause of your  
trouble... I'm guessing right now, FOP goes looking for it in the  
wrong place.

HTH!

Cheers,

Andreas


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


Re: Fop 0.91beta and fonts

Posted by Jason R Briggs <ja...@rhe.co.nz>.
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 <de...@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


Re: Fop 0.91beta and fonts

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
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 <de...@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


Re: Fop 0.91beta and fonts

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
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>
> 
> 
> and when I render it to get a PDF outout I get
> 
> "Font 'Arial,normal,400' not found. Substituting with default font"
> 
> Here is what I have in fop.xconf for the fonts section. Has it something to do with the URL of the fonts ? ( I do not want thte fonts embedded)
> 
> Thanks for any help.
> José
> 
> <fonts>
>  <font metrics-url="arial.xml" kerning="yes">
>     <font-triplet name="Arial" style="normal" weight="normal"/>
>     <font-triplet name="ArialMT" style="normal" weight="normal"/>
>  </font>
> 
>  <font metrics-url="arialb.xml" kerning="yes">
>     <font-triplet name="Arial" style="normal" weight="bold"/>
>     <font-triplet name="ArialMT" style="normal" weight="bold"/>
>  </font>
>  <font metrics-url="ariali.xml" kerning="yes">
>     <font-triplet name="Arial" style="italic" weight="normal"/>
>     <font-triplet name="ArialMT" style="italic" weight="normal"/>
>  </font>
>  <font metrics-url="arialbi.xml" kerning="yes">
>     <font-triplet name="Arial" style="italic" weight="bold"/>
>     <font-triplet name="ArialMT" style="italic" weight="bold"/>
>  </font>
>  
>  <font metrics-url="msgothic.xml" kerning="yes">
>     <font-triplet name="Gothic" style="normal" weight="normal"/>
>     <font-triplet name="Gothic" style="normal" weight="bold"/>
>     <font-triplet name="Gothic" style="italic" weight="normal"/>
>     <font-triplet name="Gothic" style="italic" weight="bold"/>
>  </font>
>  <font metrics-url="msmincho.xml" kerning="yes">
>     <font-triplet name="Mincho" style="normal" weight="normal"/>
>     <font-triplet name="Mincho" style="normal" weight="bold"/>
>     <font-triplet name="Mincho" style="italic" weight="normal"/>
>     <font-triplet name="Mincho" style="italic" weight="bold"/>
>    </font>
> 
>       </fonts>


Jeremias Maerki


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