embedding fonts

View: New views
12 Messages — Rating Filter:   Alert me  

embedding fonts

by Rover Rock :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi!

I would like to print a pdf document which contain hungarian characters.

I started to configure my enviroment like this: http://carlback.blogspot.com/2007/03/apex-cocoon-pdf-and-more.html
And after ttha a followed this site descriptions: http://cocoon.apache.org/2.1/userdocs/pdf-serializer.html

But it is not working, i can see this charaters "#' yet...

This is my sitemap.xmap:
<?xml version="1.0" encoding="UTF-8"?>
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
    <map:components>
        <map:serializers default="fo2pdf">
            <map:serializer name="fo2pdf"
                        src="org.apache.cocoon.serialization.FOPSerializer"
                        mime-type="application/pdf">
                  <user-config src="D:/fop-fonts/config.xml"/>
            </map:serializer>
            <map:serializer name="xml"        
                src="org.apache.cocoon.serialization.XMLSerializer"
                  mime-type="text/xml">
                  <encoding>UTF-8</encoding>
            </map:serializer>
            <map:serializer name="fo2rtf" 
                src="org.apache.cocoon.serialization.RTFSerializer"
                mime-type="application/msword">
            </map:serializer>
        </map:serializers>
    </map:components>
    <map:pipelines>
        <map:pipeline internal-only="true">
            <map:match pattern="xml">
                <map:generate type="stream">
                    <map:parameter name="form-name" value="xml"/>
                    <map:parameter name="defaultContentType" value="application/x-www-form-urlencoded"/>
                </map:generate>
                <map:serialize type="xml"/>
            </map:match>
            <map:match pattern="xsl">
                <map:generate type="stream">
                    <map:parameter name="form-name" value="template"/>
                    <map:parameter name="defaultContentType" value="application/x-www-form-urlencoded"/>
                </map:generate>
                <map:serialize type="xml"/>
            </map:match>
        </map:pipeline>
        <map:pipeline>
            <map:match pattern="end">
                <map:generate type="stream">
                    <map:parameter name="form-name" value="vXML"/>
                    <map:parameter name="defaultContentType" value="application/x-www-form-urlencoded"/>
                </map:generate>
                <map:transform src="test.xsl"/>
                <map:serialize type="fo2pdf"/>
            </map:match>
            <map:match pattern="*">
                <map:generate src="cocoon:/xml"/>
                <map:transform src="cocoon:/xsl"/>
                <map:select type="request-parameter">
                    <map:parameter name="parameter-name" value="_xf"/>
                    <map:when test="rtf">
                        <map:serialize type="fo2rtf"/>
                    </map:when>
                    <map:otherwise>
                        <map:serialize type="fo2pdf"/>
                    </map:otherwise>
                </map:select>
            </map:match>
        </map:pipeline>
    </map:pipelines>
</map:sitemap>


Thank you, and sorry my english skill...



RE: embedding fonts

by Laurent Medioni :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Hi,

Do you pass the Locale to FOP ?

It works fine for us in 2.1.11 without any additional config file…

Cheers

Laurent


____________________________________________________________

� This email and any files transmitted with it are CONFIDENTIAL and intended
solely for the use of the individual or entity to which they are addressed.
� Any unauthorized copying, disclosure, or distribution of the material within
this email is strictly forbidden.
� Any views or opinions presented within this e-mail are solely those of the
author and do not necessarily represent those of Odyssey Financial
Technologies SA unless otherwise specifically stated.
� An electronic message is not binding on its sender. Any message referring to
a binding engagement must be confirmed in writing and duly signed.
� If you have received this email in error, please notify the sender immediately
and delete the original.

Re: embedding fonts

by Rover Rock :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Laurent,
 
> Do you pass the Locale to FOP ?
I dont know what does it mean... Can you help me? I only did this instructions:
What were your steps?
 
RR
2009/10/8 Laurent Medioni <lmedioni@...>

Hi,

Do you pass the Locale to FOP ?

It works fine for us in 2.1.11 without any additional config file…

Cheers

Laurent


____________________________________________________________

• This email and any files transmitted with it are CONFIDENTIAL and intended
solely for the use of the individual or entity to which they are addressed.
• Any unauthorized copying, disclosure, or distribution of the material within
this email is strictly forbidden.
• Any views or opinions presented within this e-mail are solely those of the
author and do not necessarily represent those of Odyssey Financial
Technologies SA unless otherwise specifically stated.
• An electronic message is not binding on its sender. Any message referring to
a binding engagement must be confirmed in writing and duly signed.
• If you have received this email in error, please notify the sender immediately
and delete the original.


RE: embedding fonts

by Laurent Medioni :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

We do not have any fop config file and it works fine, even for non ASCII characters (and even for rtl languages in fact).

Are the fonts provided through your config file Unicode fonts ?

+ When you use fop elements (in your xml or in a xsl) how are the <fo:root> parameters configured ? The Locale should be among them + the default font, ….

Laurent

 


From: Rover Rock [mailto:rockrover@...]
Sent: jeudi, 8. octobre 2009 13:05
To: users@...
Subject: Re: embedding fonts

 

Laurent,

 

> Do you pass the Locale to FOP ?

I dont know what does it mean... Can you help me? I only did this instructions:

What were your steps?

 

RR


____________________________________________________________

� This email and any files transmitted with it are CONFIDENTIAL and intended
solely for the use of the individual or entity to which they are addressed.
� Any unauthorized copying, disclosure, or distribution of the material within
this email is strictly forbidden.
� Any views or opinions presented within this e-mail are solely those of the
author and do not necessarily represent those of Odyssey Financial
Technologies SA unless otherwise specifically stated.
� An electronic message is not binding on its sender. Any message referring to
a binding engagement must be confirmed in writing and duly signed.
� If you have received this email in error, please notify the sender immediately
and delete the original.

Re: embedding fonts

by Rover Rock :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hm...
I dont use fop(fop 0.94 or fop 0.95), i use only apache (with Tomcat), cocoon and oracle apex. Like did Carl: (please check it)
http://carlback.blogspot.com/2007/03/apex-cocoon-pdf-and-more.html

I started to view fop 0.95 documentation, but i didnt find how can i connect to oracle apex? How can i run the fop?
java -jar fop.jar [arguments]
but, what arguments in this case???


2009/10/8 Laurent Medioni <lmedioni@...>

We do not have any fop config file and it works fine, even for non ASCII characters (and even for rtl languages in fact).

Are the fonts provided through your config file Unicode fonts ?

+ When you use fop elements (in your xml or in a xsl) how are the <fo:root> parameters configured ? The Locale should be among them + the default font, ….

Laurent

 


From: Rover Rock [mailto:rockrover@...]
Sent: jeudi, 8. octobre 2009 13:05
To: users@...
Subject: Re: embedding fonts

 

Laurent,

 

> Do you pass the Locale to FOP ?

I dont know what does it mean... Can you help me? I only did this instructions:

What were your steps?

 

RR


____________________________________________________________

• This email and any files transmitted with it are CONFIDENTIAL and intended
solely for the use of the individual or entity to which they are addressed.
• Any unauthorized copying, disclosure, or distribution of the material within
this email is strictly forbidden.
• Any views or opinions presented within this e-mail are solely those of the
author and do not necessarily represent those of Odyssey Financial
Technologies SA unless otherwise specifically stated.
• An electronic message is not binding on its sender. Any message referring to
a binding engagement must be confirmed in writing and duly signed.
• If you have received this email in error, please notify the sender immediately
and delete the original.


RE: embedding fonts

by Laurent Medioni :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

No, Cocoon uses (and includes) FOP, you do not have to install/start it separately...

 


From: Rover Rock [mailto:rockrover@...]
Sent: jeudi, 8. octobre 2009 17:44
To: users@...
Subject: Re: embedding fonts

 

Hm...
I dont use fop(fop 0.94 or fop 0.95), i use only apache (with Tomcat), cocoon and oracle apex. Like did Carl: (please check it)
http://carlback.blogspot.com/2007/03/apex-cocoon-pdf-and-more.html

I started to view fop 0.95 documentation, but i didnt find how can i connect to oracle apex? How can i run the fop?
java -jar fop.jar [arguments]
but, what arguments in this case???

 


____________________________________________________________

� This email and any files transmitted with it are CONFIDENTIAL and intended
solely for the use of the individual or entity to which they are addressed.
� Any unauthorized copying, disclosure, or distribution of the material within
this email is strictly forbidden.
� Any views or opinions presented within this e-mail are solely those of the
author and do not necessarily represent those of Odyssey Financial
Technologies SA unless otherwise specifically stated.
� An electronic message is not binding on its sender. Any message referring to
a binding engagement must be confirmed in writing and duly signed.
� If you have received this email in error, please notify the sender immediately
and delete the original.

Re: embedding fonts

by Rover Rock :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ok, I see.
> Are the fonts provided through your config file Unicode fonts ?

I use only the default install, i did not modify any config file and Unicode fonts settings. Where and what can i do?:)

>+ When you use fop elements (in your xml or in a xsl) how are the <fo:root> parameters configured ? The Locale should be among them + the default font, …."

I didnt configure <fo:root> parameters...



2009/10/8 Laurent Medioni <lmedioni@...>

No, Cocoon uses (and includes) FOP, you do not have to install/start it separately...

 


From: Rover Rock [mailto:rockrover@...]
Sent: jeudi, 8. octobre 2009 17:44


To: users@...
Subject: Re: embedding fonts

 

Hm...


I dont use fop(fop 0.94 or fop 0.95), i use only apache (with Tomcat), cocoon and oracle apex. Like did Carl: (please check it)
http://carlback.blogspot.com/2007/03/apex-cocoon-pdf-and-more.html

I started to view fop 0.95 documentation, but i didnt find how can i connect to oracle apex? How can i run the fop?
java -jar fop.jar [arguments]
but, what arguments in this case???

 


____________________________________________________________

• This email and any files transmitted with it are CONFIDENTIAL and intended
solely for the use of the individual or entity to which they are addressed.
• Any unauthorized copying, disclosure, or distribution of the material within
this email is strictly forbidden.
• Any views or opinions presented within this e-mail are solely those of the
author and do not necessarily represent those of Odyssey Financial
Technologies SA unless otherwise specifically stated.
• An electronic message is not binding on its sender. Any message referring to
a binding engagement must be confirmed in writing and duly signed.
• If you have received this email in error, please notify the sender immediately
and delete the original.


RE: embedding fonts

by Laurent Medioni :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

You refer to a D:/fop-fonts/config.xml in your sitemap ?
Can you summarize what you are usingm what you have done so far and what you get at the end ?
Thanks.

________________________________________
From: Rover Rock [mailto:rockrover@...]
Sent: jeudi, 8. octobre 2009 23:02
To: users@...
Subject: Re: embedding fonts

Ok, I see.
> Are the fonts provided through your config file Unicode fonts ?
I use only the default install, i did not modify any config file and Unicode fonts settings. Where and what can i do?:)
>+ When you use fop elements (in your xml or in a xsl) how are the <fo:root> parameters configured ? The Locale should be among them + the default font, …."
I didnt configure <fo:root> parameters...

____________________________________________________________

� This email and any files transmitted with it are CONFIDENTIAL and intended
  solely for the use of the individual or entity to which they are addressed.
� Any unauthorized copying, disclosure, or distribution of the material within
  this email is strictly forbidden.
� Any views or opinions presented within this e-mail are solely those of the
  author and do not necessarily represent those of Odyssey Financial
Technologies SA unless otherwise specifically stated.
� An electronic message is not binding on its sender. Any message referring to
  a binding engagement must be confirmed in writing and duly signed.
� If you have received this email in error, please notify the sender immediately
  and delete the original.

Re: embedding fonts

by Barbara Slupik-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello

Do you have metrics files with hungarian characters? If I remember  
well you have to get ttf fonts with hungarian characters and build xml  
metric files with commands similar to these:

java -classpath classes:lib\fop.jar;lib\avalon-framework-
cvs-20020806.jar;lib\xml-apis.jar;lib\xercesImpl-2.2.1.jar;lib
\xalan-2.4.1.jar org.apache.fop.fonts.apps.TTFReader -d DEBUG fonts
\TIMES.ttf fonts\TIMES.xml
java -classpath classes:lib\fop.jar;lib\avalon-framework-
cvs-20020806.jar;lib\xml-apis.jar;lib\xercesImpl-2.2.1.jar;lib
\xalan-2.4.1.jar org.apache.fop.fonts.apps.TTFReader -d DEBUG fonts
\TIMESBD.ttf fonts\TIMESBD.xml
java -classpath classes:lib\fop.jar;lib\avalon-framework-
cvs-20020806.jar;lib\xml-apis.jar;lib\xercesImpl-2.2.1.jar;lib
\xalan-2.4.1.jar org.apache.fop.fonts.apps.TTFReader -d DEBUG fonts
\TIMESBI.ttf fonts\TIMESBI.xml
java -classpath classes:lib\fop.jar;lib\avalon-framework-
cvs-20020806.jar;lib\xml-apis.jar;lib\xercesImpl-2.2.1.jar;lib
\xalan-2.4.1.jar org.apache.fop.fonts.apps.TTFReader -d DEBUG fonts
\TIMESI.ttf fonts\TIMESI.xml

Then you build your configuration file userconfig.xml:

<configuration>
<fonts>
  <font metrics-file="fonts/TIMES.xml" kerning="yes" embed-file="fonts/
TIMES.ttf">
     <font-triplet name="TimesNewRoman" style="normal" weight="normal"/>
  </font>
  <font metrics-file="fonts/TIMESBD.xml" kerning="yes" embed-
file="fonts/TIMESBD.ttf">
     <font-triplet name="TimesNewRoman,Bold" style="normal"  
weight="normal"/>
  </font>
  <font metrics-file="fonts/TIMESBI.xml" kerning="yes" embed-
file="fonts/TIMESBI.ttf">
     <font-triplet name="TimesNewRoman,BoldItalic" style="normal"  
weight="normal"/>
  </font>
  <font metrics-file="fonts/TIMESI.xml" kerning="yes" embed-
file="fonts/TIMESI.ttf">
     <font-triplet name="TimesNewRoman,Italic" style="normal"  
weight="normal"/>
  </font>
</fonts>
</configuration>

Once you have done all this you can refer to your userconfig.xml in  
your sitemap.

Ttf (true type fonts) can be found on the net or perhaps you have them  
in your operating system.

Barara

On 9 Oct, 2009, at 11:39 am, Laurent Medioni wrote:

> You refer to a D:/fop-fonts/config.xml in your sitemap ?
> Can you summarize what you are usingm what you have done so far and  
> what you get at the end ?
> Thanks.
>
> ________________________________________
> From: Rover Rock [mailto:rockrover@...]
> Sent: jeudi, 8. octobre 2009 23:02
> To: users@...
> Subject: Re: embedding fonts
>
> Ok, I see.
>> Are the fonts provided through your config file Unicode fonts ?
> I use only the default install, i did not modify any config file and  
> Unicode fonts settings. Where and what can i do?:)
>> + When you use fop elements (in your xml or in a xsl) how are the  
>> <fo:root> parameters configured ? The Locale should be among them +  
>> the default font, …."
> I didnt configure <fo:root> parameters...
>
> ____________________________________________________________
>
> ï This email and any files transmitted with it are CONFIDENTIAL and  
> intended
>  solely for the use of the individual or entity to which they are  
> addressed.
> ï Any unauthorized copying, disclosure, or distribution of the  
> material within
>  this email is strictly forbidden.
> ï Any views or opinions presented within this e-mail are solely  
> those of the
>  author and do not necessarily represent those of Odyssey Financial
> Technologies SA unless otherwise specifically stated.
> ï An electronic message is not binding on its sender. Any message  
> referring to
>  a binding engagement must be confirmed in writing and duly signed.
> ï If you have received this email in error, please notify the sender  
> immediately
>  and delete the original.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: embedding fonts

by Rover Rock :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

Yes, I have metrics file with arial fonts which is stored in windows directory.
I did those commands like this:

$java -cp optional\fop-0.20.4.jar;core\xercesImpl-2.0.0.jar;core\xml-apis.jar \
org.apache.fop.fonts.apps.TTFReader \
C:\WINNT\Fonts\arial.ttf D:\fop-fonts\arial.ttf.xml
$ java -cp optional\fop-0.20.4.jar;core\xercesImpl-2.0.0.jar;core\xml-apis.jar \
org.apache.fop.fonts.apps.TTFReader \
C:\WINNT\Fonts\arialb.ttf D:\fop-fonts\arialb.ttf.xml
$ java -cp optional\fop-0.20.4.jar;core\xercesImpl-2.0.0.jar;core\xml-apis.jar \
org.apache.fop.fonts.apps.TTFReader \
C:\WINNT\Fonts\arialbi.ttf D:\fop-fonts\arialbi.ttf.xml
$ java -cp optional\fop-0.20.4.jar;core\xercesImpl-2.0.0.jar;core\xml-apis.jar \
org.apache.fop.fonts.apps.TTFReader \
C:\WINNT\Fonts\ariali.ttf D:\fop-fonts\ariali.ttf.xml

But, i didnt download extra fonts, i used only the windows directory. Where can i get?:)
Can you recommend a link?

RR


2009/10/9 Barbara Slupik <barbara_slupik@...>
Hello

Do you have metrics files with hungarian characters? If I remember well you have to get ttf fonts with hungarian characters and build xml metric files with commands similar to these:

java -classpath classes:lib\fop.jar;lib\avalon-framework-cvs-20020806.jar;lib\xml-apis.jar;lib\xercesImpl-2.2.1.jar;lib\xalan-2.4.1.jar org.apache.fop.fonts.apps.TTFReader -d DEBUG fonts\TIMES.ttf fonts\TIMES.xml
java -classpath classes:lib\fop.jar;lib\avalon-framework-cvs-20020806.jar;lib\xml-apis.jar;lib\xercesImpl-2.2.1.jar;lib\xalan-2.4.1.jar org.apache.fop.fonts.apps.TTFReader -d DEBUG fonts\TIMESBD.ttf fonts\TIMESBD.xml
java -classpath classes:lib\fop.jar;lib\avalon-framework-cvs-20020806.jar;lib\xml-apis.jar;lib\xercesImpl-2.2.1.jar;lib\xalan-2.4.1.jar org.apache.fop.fonts.apps.TTFReader -d DEBUG fonts\TIMESBI.ttf fonts\TIMESBI.xml
java -classpath classes:lib\fop.jar;lib\avalon-framework-cvs-20020806.jar;lib\xml-apis.jar;lib\xercesImpl-2.2.1.jar;lib\xalan-2.4.1.jar org.apache.fop.fonts.apps.TTFReader -d DEBUG fonts\TIMESI.ttf fonts\TIMESI.xml

Then you build your configuration file userconfig.xml:

<configuration>
<fonts>
 <font metrics-file="fonts/TIMES.xml" kerning="yes" embed-file="fonts/TIMES.ttf">
   <font-triplet name="TimesNewRoman" style="normal" weight="normal"/>
 </font>
 <font metrics-file="fonts/TIMESBD.xml" kerning="yes" embed-file="fonts/TIMESBD.ttf">
   <font-triplet name="TimesNewRoman,Bold" style="normal" weight="normal"/>
 </font>
 <font metrics-file="fonts/TIMESBI.xml" kerning="yes" embed-file="fonts/TIMESBI.ttf">
   <font-triplet name="TimesNewRoman,BoldItalic" style="normal" weight="normal"/>
 </font>
 <font metrics-file="fonts/TIMESI.xml" kerning="yes" embed-file="fonts/TIMESI.ttf">
   <font-triplet name="TimesNewRoman,Italic" style="normal" weight="normal"/>
 </font>
</fonts>
</configuration>

Once you have done all this you can refer to your userconfig.xml in your sitemap.

Ttf (true type fonts) can be found on the net or perhaps you have them in your operating system.

Barara


On 9 Oct, 2009, at 11:39 am, Laurent Medioni wrote:

You refer to a D:/fop-fonts/config.xml in your sitemap ?
Can you summarize what you are usingm what you have done so far and what you get at the end ?
Thanks.

________________________________________
From: Rover Rock [mailto:rockrover@...]
Sent: jeudi, 8. octobre 2009 23:02
To: users@...
Subject: Re: embedding fonts

Ok, I see.
Are the fonts provided through your config file Unicode fonts ?
I use only the default install, i did not modify any config file and Unicode fonts settings. Where and what can i do?:)
+ When you use fop elements (in your xml or in a xsl) how are the <fo:root> parameters configured ? The Locale should be among them + the default font, …."
I didnt configure <fo:root> parameters...

____________________________________________________________

ï This email and any files transmitted with it are CONFIDENTIAL and intended
 solely for the use of the individual or entity to which they are addressed.
ï Any unauthorized copying, disclosure, or distribution of the material within
 this email is strictly forbidden.
ï Any views or opinions presented within this e-mail are solely those of the
 author and do not necessarily represent those of Odyssey Financial
Technologies SA unless otherwise specifically stated.
ï An electronic message is not binding on its sender. Any message referring to
 a binding engagement must be confirmed in writing and duly signed.
ï If you have received this email in error, please notify the sender immediately
 and delete the original.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...



Re: embedding fonts

by Rover Rock :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes, i do.

Ok, i will try to write what i did.
I didnt download any fonts, i used windows arial fonts

1. Created the font metric files, like this:
   
$ java -cp optional\fop-0.20.4.jar;core\xercesImpl-2.0.0.jar;core\xml-apis.jar \
org.apache.fop.fonts.apps.TTFReader \
C:\WINNT\Fonts\arial.ttf D:\fop-fonts\arial.ttf.xml
$ java -cp optional\fop-0.20.4.jar;core\xercesImpl-2.0.0.jar;core\xml-apis.jar \
org.apache.fop.fonts.apps.TTFReader \
C:\WINNT\Fonts\arialb.ttf D:\fop-fonts\arialb.ttf.xml
$ java -cp optional\fop-0.20.4.jar;core\xercesImpl-2.0.0.jar;core\xml-apis.jar \
org.apache.fop.fonts.apps.TTFReader \
C:\WINNT\Fonts\arialbi.ttf D:\fop-fonts\arialbi.ttf.xml
$ java -cp optional\fop-0.20.4.jar;core\xercesImpl-2.0.0.jar;core\xml-apis.jar \
org.apache.fop.fonts.apps.TTFReader \
C:\WINNT\Fonts\ariali.ttf D:\fop-fonts\ariali.ttf.xml
It was successfully.

2. Created a config file which is stored in D:\:fop-fonts\ directory, called config.xml
<configuration>
<fonts>
<font metrics-file="D:/fop-fonts/arial.ttf.xml"
kerning="yes" embed-file="C:/WINNT/Fonts/arial.ttf">
<font-triplet name="Arial" style="normal" weight="normal"/>
<font-triplet name="ArialMT" style="normal" weight="normal"/>
</font>
<font metrics-file="D:/fop-fonts/arialb.ttf.xml"
kerning="yes" embed-file="C:/WINNT/Fonts/arialb.ttf">
<font-triplet name="Arial" style="normal" weight="bold"/>
<font-triplet name="ArialMT" style="normal" weight="bold"/>
</font>
<font metrics-file="D:/fop-fonts/arialbi.ttf.xml"
kerning="yes" embed-file="C:/WINNT/Fonts/arialbi.ttf">
<font-triplet name="Arial" style="italic" weight="bold"/>
<font-triplet name="ArialMT" style="italic" weight="bold"/>
</font>
<font metrics-file="D:/fop-fonts/ariali.ttf.xml"
kerning="yes" embed-file="C:/WINNT/Fonts/ariali.ttf">
<font-triplet name="Arial" style="italic" weight="normal"/>
<font-triplet name="ArialMT" style="italic" weight="normal"/>
</font>
</fonts>
</configuration>
3. Modified the sitemap.xmap file, add
<user-config>D:/fop-fonts/config.xml</user-config>
to the fo2pdf serializer

4. restarted the cocoon.

2009/10/9 Laurent Medioni <lmedioni@...>
You refer to a D:/fop-fonts/config.xml in your sitemap ?
Can you summarize what you are usingm what you have done so far and what you get at the end ?
Thanks.

________________________________________
From: Rover Rock [mailto:rockrover@...]
Sent: jeudi, 8. octobre 2009 23:02
To: users@...
Subject: Re: embedding fonts

Ok, I see.
> Are the fonts provided through your config file Unicode fonts ?
I use only the default install, i did not modify any config file and Unicode fonts settings. Where and what can i do?:)
>+ When you use fop elements (in your xml or in a xsl) how are the <fo:root> parameters configured ? The Locale should be among them + the default font, …."
I didnt configure <fo:root> parameters...

____________________________________________________________

• This email and any files transmitted with it are CONFIDENTIAL and intended
 solely for the use of the individual or entity to which they are addressed.
• Any unauthorized copying, disclosure, or distribution of the material within
 this email is strictly forbidden.
• Any views or opinions presented within this e-mail are solely those of the
 author and do not necessarily represent those of Odyssey Financial
Technologies SA unless otherwise specifically stated.
• An electronic message is not binding on its sender. Any message referring to
 a binding engagement must be confirmed in writing and duly signed.
• If you have received this email in error, please notify the sender immediately
 and delete the original.


Re: embedding fonts

by Rover Rock :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi!

I managed to solve the problem.
In the web.xml (apache-tomcat-6.0.20\webapps\cocoon\WEB-INF\) file, you have to change this:
      <param-value>ISO-8859-1</param-value>
to this:
      <param-value>UTF-8</param-value>

maybe twice.

and after that you have to restart cocoon, it is important.
:)


2009/10/15 Rover Rock <rockrover@...>
Yes, i do.

Ok, i will try to write what i did.
I didnt download any fonts, i used windows arial fonts

1. Created the font metric files, like this:

   
$ java -cp optional\fop-0.20.4.jar;core\xercesImpl-2.0.0.jar;core\xml-apis.jar \
org.apache.fop.fonts.apps.TTFReader \
C:\WINNT\Fonts\arial.ttf D:\fop-fonts\arial.ttf.xml
$ java -cp optional\fop-0.20.4.jar;core\xercesImpl-2.0.0.jar;core\xml-apis.jar \
org.apache.fop.fonts.apps.TTFReader \
C:\WINNT\Fonts\arialb.ttf D:\fop-fonts\arialb.ttf.xml
$ java -cp optional\fop-0.20.4.jar;core\xercesImpl-2.0.0.jar;core\xml-apis.jar \
org.apache.fop.fonts.apps.TTFReader \
C:\WINNT\Fonts\arialbi.ttf D:\fop-fonts\arialbi.ttf.xml
$ java -cp optional\fop-0.20.4.jar;core\xercesImpl-2.0.0.jar;core\xml-apis.jar \
org.apache.fop.fonts.apps.TTFReader \
C:\WINNT\Fonts\ariali.ttf D:\fop-fonts\ariali.ttf.xml
It was successfully.

2. Created a config file which is stored in D:\:fop-fonts\ directory, called config.xml
<configuration>
<fonts>
<font metrics-file="D:/fop-fonts/arial.ttf.xml"
kerning="yes" embed-file="C:/WINNT/Fonts/arial.ttf">
<font-triplet name="Arial" style="normal" weight="normal"/>
<font-triplet name="ArialMT" style="normal" weight="normal"/>
</font>
<font metrics-file="D:/fop-fonts/arialb.ttf.xml"
kerning="yes" embed-file="C:/WINNT/Fonts/arialb.ttf">
<font-triplet name="Arial" style="normal" weight="bold"/>
<font-triplet name="ArialMT" style="normal" weight="bold"/>
</font>
<font metrics-file="D:/fop-fonts/arialbi.ttf.xml"
kerning="yes" embed-file="C:/WINNT/Fonts/arialbi.ttf">
<font-triplet name="Arial" style="italic" weight="bold"/>
<font-triplet name="ArialMT" style="italic" weight="bold"/>
</font>
<font metrics-file="D:/fop-fonts/ariali.ttf.xml"
kerning="yes" embed-file="C:/WINNT/Fonts/ariali.ttf">
<font-triplet name="Arial" style="italic" weight="normal"/>
<font-triplet name="ArialMT" style="italic" weight="normal"/>
</font>
</fonts>
</configuration>
3. Modified the sitemap.xmap file, add
<user-config>D:/fop-fonts/config.xml</user-config>
to the fo2pdf serializer

4. restarted the cocoon.

2009/10/9 Laurent Medioni <lmedioni@...>

You refer to a D:/fop-fonts/config.xml in your sitemap ?
Can you summarize what you are usingm what you have done so far and what you get at the end ?
Thanks.

________________________________________
From: Rover Rock [mailto:rockrover@...]
Sent: jeudi, 8. octobre 2009 23:02
To: users@...
Subject: Re: embedding fonts

Ok, I see.
> Are the fonts provided through your config file Unicode fonts ?
I use only the default install, i did not modify any config file and Unicode fonts settings. Where and what can i do?:)
>+ When you use fop elements (in your xml or in a xsl) how are the <fo:root> parameters configured ? The Locale should be among them + the default font, …."
I didnt configure <fo:root> parameters...

____________________________________________________________

• This email and any files transmitted with it are CONFIDENTIAL and intended
 solely for the use of the individual or entity to which they are addressed.
• Any unauthorized copying, disclosure, or distribution of the material within
 this email is strictly forbidden.
• Any views or opinions presented within this e-mail are solely those of the
 author and do not necessarily represent those of Odyssey Financial
Technologies SA unless otherwise specifically stated.
• An electronic message is not binding on its sender. Any message referring to
 a binding engagement must be confirmed in writing and duly signed.
• If you have received this email in error, please notify the sender immediately
 and delete the original.