You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jacob Cantwell <ja...@webmcq.com> on 2001/09/11 09:50:56 UTC

embedding fonts (FOP and C2)

howdy y'all,

i'm embedding fonts just fine running FOP via the command line, but i'm
trying to set the same thing with cocoon 2.

so far i've added to the sitemap:

<map:serializer name="fo2pdf"
src="org.apache.cocoon.serialization.FOPSerializer"
mime-type="application/pdf">
 <user-config src="d:/fop/conf/userconfig.xml"/>
</map:serializer>

to my userconfig.xml i've got:

<configuration>
<fonts>
    <font metrics-file="FZZQJW.xml" kerning="yes" embed-file="FZZQJW.ttf">
      <font-triplet name="FZZhongQian" style="normal" weight="normal"/>
    </font>
  </fonts>
</configuration>

i've tried it with .pfm, .pfb files and a bunch of combinations of file
referencing (file:, cocoon:). i've also tried adding the files into the c2's
fop.jar file. i've looked at the [c2] pdf under acrobat and the font is not
being embedded.

i think the problem is just my file referencing because it all works just
with FOP, cocoon2 is building the pdf properly but  ignoring my font.

i've tried a million different configurations, read the archives, and i'm
still stuck, so thanks for any help. if i can get this to work, i'll write
up the procedure for the faq.

thanks for any help,
jacob


<!-- ================================ -->
<contact-info>
<name>     Jacob Cantwell   </name>
<company>  WebMCQ Pty. Ltd. </company>
<website>  www.webmcq.com   </website>
</contact-info>

RE: embedding fonts (FOP and C2)

Posted by Giacomo Pati <gi...@apache.org>.
Quoting Jacob Cantwell <ja...@webmcq.com>:

> thanks Giacomo and Colin,
> 
> i went through the logs again, and picked up that it wasnt finding the
> font.
> (i swear it wasn't in the logs before)
> 
> in my sitemap:
> <user-config src="d:/fop/conf/userconfig.xml"/>
> 
> in my userconfig.xml:
> <font metrics-file="FZZQJW.xml" kerning="yes" embed-file="FZZQJW.ttf">
> 
> the relative path to the metrics-file and embed-file actually points to
> my
> D:\jakarta-tomcat-3.2.2\bin directory which is odd.
> 
> i moved the files there and it works for my .pfb fonts, i have to do
> more
> testing with .ttf fonts though.
> 
> should i write up a blurb for
> http://xml.apache.org/cocoon2/pdf-serializer.html about this topic? i
> would
> like to contribute to cocoon's documentation in some way.

Sure, cool. Maybe we can convice the Fop community to have a way to define a 
base dir fop looks for those files.

Giacomo

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


RE: embedding fonts (FOP and C2)

Posted by Jacob Cantwell <ja...@webmcq.com>.
thanks Giacomo and Colin,

i went through the logs again, and picked up that it wasnt finding the font.
(i swear it wasn't in the logs before)

in my sitemap:
<user-config src="d:/fop/conf/userconfig.xml"/>

in my userconfig.xml:
<font metrics-file="FZZQJW.xml" kerning="yes" embed-file="FZZQJW.ttf">

the relative path to the metrics-file and embed-file actually points to my
D:\jakarta-tomcat-3.2.2\bin directory which is odd.

i moved the files there and it works for my .pfb fonts, i have to do more
testing with .ttf fonts though.

should i write up a blurb for
http://xml.apache.org/cocoon2/pdf-serializer.html about this topic? i would
like to contribute to cocoon's documentation in some way.

cheers,
jacob




-----Original Message-----
From: Colin Britton [mailto:colin@metatomix.com]
Sent: Wednesday, 12 September 2001 11:14 AM
To: cocoon-users@xml.apache.org
Subject: Re: embedding fonts (FOP and C2)


I have not yet tried with the new fop 0.20.x but with the previous version
the font files / metrics had to be either relative to the point the jvm was
started (an unpreliable thing) or absolute paths. I always used absolute
paths but have not tested with fop 0.20.x

rgds
CB
----- Original Message -----
From: Jacob Cantwell
To: cocoon-users@xml.apache.org
Sent: Tuesday, September 11, 2001 8:30 PM
Subject: RE: embedding fonts (FOP and C2)


Thanks for replying Giacomo,
the log files say its finding the config file alright (and i get an error if
i dont reference it properly):
---
DEBUG 10002 [cocoon ] (Thread-31): FOPSerializer: Using config file
d:/fop/conf/userconfig.xml
---
should the metric file and font file go in the same directory as the config
file (outside of cocoon), or should the files all be referenced relative to
the sitemap?
Jacob



> howdy y'all,
>
> i'm embedding fonts just fine running FOP via the command line, but i'm
> trying to set the same thing with cocoon 2.
>
> so far i've added to the sitemap:
>
> <map:serializer name="fo2pdf"
> src="org.apache.cocoon.serialization.FOPSerializer"
> mime-type="application/pdf">
>  <user-config src="d:/fop/conf/userconfig.xml"/>
> </map:serializer>
>
> to my userconfig.xml i've got:
>
> <configuration>
> <fonts>
>     <font metrics-file="FZZQJW.xml" kerning="yes" embed-file="FZZQJW.ttf">
>       <font-triplet name="FZZhongQian" style="normal" weight="normal"/>
>     </font>
>   </fonts>
> </configuration>
>
> i've tried it with .pfm, .pfb files and a bunch of combinations of file
> referencing (file:, cocoon:). i've also tried adding the files into the
c2's
> fop.jar file. i've looked at the [c2] pdf under acrobat and the font is
not
> being embedded.
>
> i think the problem is just my file referencing because it all works just
> with FOP, cocoon2 is building the pdf properly but  ignoring my font.
Have you looked into the log files for a message from FOPSerializer? It
should state whether or not it has found your configuration file.
Giacomo
>
> i've tried a million different configurations, read the archives, and i'm
> still stuck, so thanks for any help. if i can get this to work, i'll write
> up the procedure for the faq.
>
> thanks for any help,
> jacob
>
>
> <!-- ================================ -->
> <contact-info>
> <name>     Jacob Cantwell   </name>
> <company>  WebMCQ Pty. Ltd. </company>
> <website>  www.webmcq.com   </website>
> </contact-info>
>


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>

Re: embedding fonts (FOP and C2)

Posted by Colin Britton <co...@metatomix.com>.
RE: embedding fonts (FOP and C2)I have not yet tried with the new fop 0.20.x but with the previous version the font files / metrics had to be either relative to the point the jvm was started (an unpreliable thing) or absolute paths. I always used absolute paths but have not tested with fop 0.20.x

rgds
CB
  ----- Original Message ----- 
  From: Jacob Cantwell 
  To: cocoon-users@xml.apache.org 
  Sent: Tuesday, September 11, 2001 8:30 PM
  Subject: RE: embedding fonts (FOP and C2)


  Thanks for replying Giacomo, 

  the log files say its finding the config file alright (and i get an error if i dont reference it properly): 

  --- 
  DEBUG 10002 [cocoon ] (Thread-31): FOPSerializer: Using config file d:/fop/conf/userconfig.xml 
  --- 

  should the metric file and font file go in the same directory as the config file (outside of cocoon), or should the files all be referenced relative to the sitemap?

  Jacob 




  > howdy y'all, 
  > 
  > i'm embedding fonts just fine running FOP via the command line, but i'm 
  > trying to set the same thing with cocoon 2. 
  > 
  > so far i've added to the sitemap: 
  > 
  > <map:serializer name="fo2pdf" 
  > src="org.apache.cocoon.serialization.FOPSerializer" 
  > mime-type="application/pdf"> 
  >  <user-config src="d:/fop/conf/userconfig.xml"/> 
  > </map:serializer> 
  > 
  > to my userconfig.xml i've got: 
  > 
  > <configuration> 
  > <fonts> 
  >     <font metrics-file="FZZQJW.xml" kerning="yes" embed-file="FZZQJW.ttf"> 
  >       <font-triplet name="FZZhongQian" style="normal" weight="normal"/> 
  >     </font> 
  >   </fonts> 
  > </configuration> 
  > 
  > i've tried it with .pfm, .pfb files and a bunch of combinations of file 
  > referencing (file:, cocoon:). i've also tried adding the files into the c2's 
  > fop.jar file. i've looked at the [c2] pdf under acrobat and the font is not 
  > being embedded. 
  > 
  > i think the problem is just my file referencing because it all works just 
  > with FOP, cocoon2 is building the pdf properly but  ignoring my font. 

  Have you looked into the log files for a message from FOPSerializer? It 
  should state whether or not it has found your configuration file. 

  Giacomo 

  > 
  > i've tried a million different configurations, read the archives, and i'm 
  > still stuck, so thanks for any help. if i can get this to work, i'll write 
  > up the procedure for the faq. 
  > 
  > thanks for any help, 
  > jacob 
  > 
  > 
  > <!-- ================================ --> 
  > <contact-info> 
  > <name>     Jacob Cantwell   </name> 
  > <company>  WebMCQ Pty. Ltd. </company> 
  > <website>  www.webmcq.com   </website> 
  > </contact-info> 
  > 



  --------------------------------------------------------------------- 
  Please check that your question has not already been answered in the 
  FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> 

  To unsubscribe, e-mail: <co...@xml.apache.org> 
  For additional commands, e-mail: <co...@xml.apache.org> 


RE: embedding fonts (FOP and C2)

Posted by Jacob Cantwell <ja...@webmcq.com>.
Thanks for replying Giacomo,

the log files say its finding the config file alright (and i get an error if
i dont reference it properly):

---
DEBUG 10002 [cocoon ] (Thread-31): FOPSerializer: Using config file
d:/fop/conf/userconfig.xml
---

should the metric file and font file go in the same directory as the config
file (outside of cocoon), or should the files all be referenced relative to
the sitemap?

Jacob



> howdy y'all,
>
> i'm embedding fonts just fine running FOP via the command line, but i'm
> trying to set the same thing with cocoon 2.
>
> so far i've added to the sitemap:
>
> <map:serializer name="fo2pdf"
> src="org.apache.cocoon.serialization.FOPSerializer"
> mime-type="application/pdf">
>  <user-config src="d:/fop/conf/userconfig.xml"/>
> </map:serializer>
>
> to my userconfig.xml i've got:
>
> <configuration>
> <fonts>
>     <font metrics-file="FZZQJW.xml" kerning="yes" embed-file="FZZQJW.ttf">
>       <font-triplet name="FZZhongQian" style="normal" weight="normal"/>
>     </font>
>   </fonts>
> </configuration>
>
> i've tried it with .pfm, .pfb files and a bunch of combinations of file
> referencing (file:, cocoon:). i've also tried adding the files into the
c2's
> fop.jar file. i've looked at the [c2] pdf under acrobat and the font is
not
> being embedded.
>
> i think the problem is just my file referencing because it all works just
> with FOP, cocoon2 is building the pdf properly but  ignoring my font.

Have you looked into the log files for a message from FOPSerializer? It
should state whether or not it has found your configuration file.

Giacomo

>
> i've tried a million different configurations, read the archives, and i'm
> still stuck, so thanks for any help. if i can get this to work, i'll write
> up the procedure for the faq.
>
> thanks for any help,
> jacob
>
>
> <!-- ================================ -->
> <contact-info>
> <name>     Jacob Cantwell   </name>
> <company>  WebMCQ Pty. Ltd. </company>
> <website>  www.webmcq.com   </website>
> </contact-info>
>


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>

Re: embedding fonts (FOP and C2)

Posted by giacomo <gi...@apache.org>.
On Tue, 11 Sep 2001, Jacob Cantwell wrote:

> howdy y'all,
>
> i'm embedding fonts just fine running FOP via the command line, but i'm
> trying to set the same thing with cocoon 2.
>
> so far i've added to the sitemap:
>
> <map:serializer name="fo2pdf"
> src="org.apache.cocoon.serialization.FOPSerializer"
> mime-type="application/pdf">
>  <user-config src="d:/fop/conf/userconfig.xml"/>
> </map:serializer>
>
> to my userconfig.xml i've got:
>
> <configuration>
> <fonts>
>     <font metrics-file="FZZQJW.xml" kerning="yes" embed-file="FZZQJW.ttf">
>       <font-triplet name="FZZhongQian" style="normal" weight="normal"/>
>     </font>
>   </fonts>
> </configuration>
>
> i've tried it with .pfm, .pfb files and a bunch of combinations of file
> referencing (file:, cocoon:). i've also tried adding the files into the c2's
> fop.jar file. i've looked at the [c2] pdf under acrobat and the font is not
> being embedded.
>
> i think the problem is just my file referencing because it all works just
> with FOP, cocoon2 is building the pdf properly but  ignoring my font.

Have you looked into the log files for a message from FOPSerializer? It
should state whether or not it has found your configuration file.

Giacomo

>
> i've tried a million different configurations, read the archives, and i'm
> still stuck, so thanks for any help. if i can get this to work, i'll write
> up the procedure for the faq.
>
> thanks for any help,
> jacob
>
>
> <!-- ================================ -->
> <contact-info>
> <name>     Jacob Cantwell   </name>
> <company>  WebMCQ Pty. Ltd. </company>
> <website>  www.webmcq.com   </website>
> </contact-info>
>


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>