Font problem [message #89223] |
Wed, 09 November 2005 08:15  |
Eclipse User |
|
|
|
Originally posted by: nospam.mail.com
Hi,
I defined a report where I chose the Arial font. The HTML rendering is OK.
When I render it to PDF, it's a Times Roman or equivalent that is used.
This font is more wide, so the rendering is bad.
Does anybody knows which font I have to use to get Arial fonts like in
HTML rendering ?
Regards
--
A. ROY
|
|
|
Re: Font problem [message #89386 is a reply to message #89223] |
Wed, 09 November 2005 15:12   |
Eclipse User |
|
|
|
Originally posted by: jake.westviewclose.co.uk
A. Roy, I'm going through the same issue at the moment. I've found a
couple of newsgroup mails that discuss the problem....figure we may as
well work it out together!
It seems like there are two steps
1) Create the Font metrics file for use by Birt
(Web link http://xml.apache.org/fop/fonts.html#truetype-metrics). This
is fairly confusing for me, and i've hit a wall, but so far i've
downloaded FOP itself - http://xml.apache.org/fop
I've downloaded version 0.20.5 (just the binaries file)
This gives you all of the jar files etc. I've saved this folder directly
onto my C:\ drive for ease and renamed it fop from fop0.20.5-bin
Open a command prompt and enter something like
C:\> java -cp
C:\fop\build\fop.jar;C:\fop\lib\avalon-framework-cvs-2002080 6.jar;C:\fop\lib\xml-apis.jar;
C:\fop\lib\xercesImpl-2.2.1.jar;C:\fop\lib\xalan-2.4.1.jar
org.apache.fop.fonts.apps.TTFReader -enc ansi C:\Windows\Fonts\arial.ttf
C:\fop\myfonts\arial.xml
Sadly...this is where my problems start as although it recognises the
Arial tff file when it tries to write out the Metric something goes
wrong as it states that the filename directory name or volume label
syntax is incorrect??????
2) Once we've done that though (you may be more successful than I) its
onto stage 2
You need to locate the fop.xml file (i think)
Mine is in my
eclipse\plugins\org.eclipse.birt.report.engine.emitter.fo_1. 0.1 folder
and add in
<fonts>
<font metrics-file="C:\fop\myfonts\arial.xml"
embed-file="C:\Windows\Fonts\ARIAL.TTF" kerning="yes">
<font-triplet name="arial" style="normal" weight="normal"/>
<font-triplet name="arial" style="normal" weight="bold"/>
</font>
However, i haven't completed stage 2 yet as i'm still stuck on stage
one......
If you have any joy, (or if anyone else can help, please let me know.
Jake
AR wrote:
>
> Hi,
>
> I defined a report where I chose the Arial font. The HTML rendering is
> OK. When I render it to PDF, it's a Times Roman or equivalent that is
> used. This font is more wide, so the rendering is bad.
> Does anybody knows which font I have to use to get Arial fonts like in
> HTML rendering ?
>
> Regards
|
|
|
Re: Font problem [message #89508 is a reply to message #89386] |
Wed, 09 November 2005 16:59  |
Eclipse User |
|
|
|
Originally posted by: jake.westviewclose.co.uk
A.Roy,
Ok....finally got through stage 1....
I hadn't read the apache page thoroughly. If you are running Java 1.4
then you don't need to use all of the jar files.
for me the metric was created by typing on the command prompt
java -cp C:\fop\build.jar;C:fop\lib\avalon-framework-cvs-20020806.jar
org.apache.fop.fonts.apps.TTFReader C:\Windows\Fonts\arial.ttf
C:\fop\myfonts.arial.xml
I'm now struggling manfully with getting this to work in the xml.....
if you have any great thoughts, please let me know.
Jake Day wrote:
> A. Roy, I'm going through the same issue at the moment. I've found a
> couple of newsgroup mails that discuss the problem....figure we may as
> well work it out together!
>
> It seems like there are two steps
>
> 1) Create the Font metrics file for use by Birt
>
> (Web link http://xml.apache.org/fop/fonts.html#truetype-metrics). This
> is fairly confusing for me, and i've hit a wall, but so far i've
> downloaded FOP itself - http://xml.apache.org/fop
> I've downloaded version 0.20.5 (just the binaries file)
>
> This gives you all of the jar files etc. I've saved this folder directly
> onto my C:\ drive for ease and renamed it fop from fop0.20.5-bin
>
> Open a command prompt and enter something like
>
> C:\> java -cp
> C:\fop\build\fop.jar;C:\fop\lib\avalon-framework-cvs-2002080 6.jar;C:\fop\lib\xml-apis.jar;
>
> C:\fop\lib\xercesImpl-2.2.1.jar;C:\fop\lib\xalan-2.4.1.jar
> org.apache.fop.fonts.apps.TTFReader -enc ansi C:\Windows\Fonts\arial.ttf
> C:\fop\myfonts\arial.xml
>
> Sadly...this is where my problems start as although it recognises the
> Arial tff file when it tries to write out the Metric something goes
> wrong as it states that the filename directory name or volume label
> syntax is incorrect??????
>
> 2) Once we've done that though (you may be more successful than I) its
> onto stage 2
>
> You need to locate the fop.xml file (i think)
>
> Mine is in my
> eclipse\plugins\org.eclipse.birt.report.engine.emitter.fo_1. 0.1 folder
>
> and add in
>
> <fonts>
>
> <font metrics-file="C:\fop\myfonts\arial.xml"
> embed-file="C:\Windows\Fonts\ARIAL.TTF" kerning="yes">
> <font-triplet name="arial" style="normal" weight="normal"/>
> <font-triplet name="arial" style="normal" weight="bold"/>
> </font>
>
>
> However, i haven't completed stage 2 yet as i'm still stuck on stage
> one......
>
> If you have any joy, (or if anyone else can help, please let me know.
>
> Jake
>
>
> AR wrote:
>
>>
>> Hi,
>>
>> I defined a report where I chose the Arial font. The HTML rendering is
>> OK. When I render it to PDF, it's a Times Roman or equivalent that is
>> used. This font is more wide, so the rendering is bad.
>> Does anybody knows which font I have to use to get Arial fonts like
>> in HTML rendering ?
>>
>> Regards
|
|
|
Powered by
FUDForum. Page generated in 0.04540 seconds