|
|
Re: PDF Fonts [message #44187 is a reply to message #44097] |
Wed, 08 June 2005 02:29 |
Eclipse User |
|
|
|
Originally posted by: gerald.nhl.co.jp
The following answer apply to the BIRT example viewer.
There are three things needed to be done.
1. locating the FOP configuration file for BIRT (fop.xml)
2. put the font information in the fop.xml
3. create the font matrix file that is need by FOP
1. locating the FOP configuration file for BIRT (fop.xml)
The FOP will read the FOP configuration files in several locations. One
of which can be specified by using the FOP_CONFIG_FILE system property.
So add this to the JVM that is running your BIRT.
-DFOP_CONFIG_FILE=<path to your FOP config files>
2. put the font information in the fop.xml
In the fop.xml (the config file)
add something similary to the following
-------------------
<fonts>
<font metrics-file="<url to font matrix>" embed-file="<url to the .ttc
file>" kerning="yes">
<font-triplet name="ms mincho" style="normal" weight="normal"/>
<font-triplet name="ms mincho" style="normal" weight="bold"/>
<font-triplet name="ms mincho" style="italic" weight="normal"/>
<font-triplet name="ms mincho" style="italic" weight="bold"/>
</font>
Note the path is URL so it might have to start with things like "file:///C:"
Also the "name" in <font-triplet> of the font have to be exact string
that is use by BIRT.
For example if you are uing a non English windows with the font name in
other language, then the name in the xml have to be that non english
name. So the font "ms mincho" above can have a name of "ms 明朝" if
the font use by BIRT use the Japanese name of the font instead of the
English name of the font.
(I just created two entry, one in English and one in Japanese so
everything is covered)
----------------------------
3. create the font matrix file that is need by FOP
It is best to refer to the FOP web site. You will need to download the
standalone FOP to get the JAR file that will create the font matrix for
you in the instruction from the web site.
Here is the link
http://xml.apache.org/fop/fonts.html#truetype-metrics
Hope that helps
Gerald Chan
Joe Rybacki wrote:
> I figured out that fop is what's used for pdf generation and I was able to
> generate the metric file for the font. But I can't quite figure out how to
> integrate it with birt. The fonts directory is part of the fop
> configuration so I guess I'll have to start digging into the source for birt
> and fop to figure out how birt is invoking fop. Has anyone figured this
> out?
>
>
> "Joe Rybacki" <Joe.Rybacki@dynetics.com> wrote in message
> news:d84m90$huf$1@news.eclipse.org...
>
>>Hello all, I have a question regarding fonts. I have a true type font
>>that I want to embed into the PDF so that it is rendered correctly in the
>>pdf. It works fine as html b/c the font is installed in the windows
>>system. Does birt do the embedding or am I missing some configuration
>>parameter?
>>
>>Thanks,
>>Joe
>>
>
>
>
|
|
|
Re: PDF Fonts [message #44218 is a reply to message #44187] |
Wed, 08 June 2005 02:36 |
Eclipse User |
|
|
|
Originally posted by: gerald.nhl.co.jp
Just some extra notes:
1. There is one config file called fop.xml (I typed
-DFOP_CONFIG_FILE=<path to your FOP config files> with an "s" at the end
of file. It should not be there. Sorry English is not my native language)
2. The "metrics-file" element in <font> is the font matrix file in step
"3. create the font matrix file that is need by FOP"
Thanks
Gerald Chan
Gerald Chan wrote:
> The following answer apply to the BIRT example viewer.
>
> There are three things needed to be done.
> 1. locating the FOP configuration file for BIRT (fop.xml)
> 2. put the font information in the fop.xml
> 3. create the font matrix file that is need by FOP
>
>
> 1. locating the FOP configuration file for BIRT (fop.xml)
>
> The FOP will read the FOP configuration files in several locations. One
> of which can be specified by using the FOP_CONFIG_FILE system property.
>
> So add this to the JVM that is running your BIRT.
> -DFOP_CONFIG_FILE=<path to your FOP config files>
>
>
> 2. put the font information in the fop.xml
>
> In the fop.xml (the config file)
> add something similary to the following
>
> -------------------
>
> <fonts>
> <font metrics-file="<url to font matrix>" embed-file="<url to the
> .ttc file>" kerning="yes">
> <font-triplet name="ms mincho" style="normal" weight="normal"/>
> <font-triplet name="ms mincho" style="normal" weight="bold"/>
> <font-triplet name="ms mincho" style="italic" weight="normal"/>
> <font-triplet name="ms mincho" style="italic" weight="bold"/>
>
> </font>
>
> Note the path is URL so it might have to start with things like
> "file:///C:"
>
> Also the "name" in <font-triplet> of the font have to be exact string
> that is use by BIRT.
> For example if you are uing a non English windows with the font name in
> other language, then the name in the xml have to be that non english
> name. So the font "ms mincho" above can have a name of "ms 明朝" if
> the font use by BIRT use the Japanese name of the font instead of the
> English name of the font.
>
> (I just created two entry, one in English and one in Japanese so
> everything is covered)
>
> ----------------------------
>
> 3. create the font matrix file that is need by FOP
>
> It is best to refer to the FOP web site. You will need to download the
> standalone FOP to get the JAR file that will create the font matrix for
> you in the instruction from the web site.
>
> Here is the link
> http://xml.apache.org/fop/fonts.html#truetype-metrics
>
> Hope that helps
>
> Gerald Chan
>
> Joe Rybacki wrote:
>
>> I figured out that fop is what's used for pdf generation and I was
>> able to generate the metric file for the font. But I can't quite
>> figure out how to integrate it with birt. The fonts directory is part
>> of the fop configuration so I guess I'll have to start digging into
>> the source for birt and fop to figure out how birt is invoking fop.
>> Has anyone figured this out?
>>
>>
>> "Joe Rybacki" <Joe.Rybacki@dynetics.com> wrote in message
>> news:d84m90$huf$1@news.eclipse.org...
>>
>>> Hello all, I have a question regarding fonts. I have a true type
>>> font that I want to embed into the PDF so that it is rendered
>>> correctly in the pdf. It works fine as html b/c the font is installed
>>> in the windows system. Does birt do the embedding or am I missing
>>> some configuration parameter?
>>>
>>> Thanks,
>>> Joe
>>>
>>
>>
>>
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02947 seconds