Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » PDF Fonts
PDF Fonts [message #43876] Tue, 07 June 2005 17:42 Go to next message
Joe Rybacki is currently offline Joe RybackiFriend
Messages: 36
Registered: July 2009
Member
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 #44097 is a reply to message #43876] Tue, 07 June 2005 19:59 Go to previous messageGo to next message
Joe Rybacki is currently offline Joe RybackiFriend
Messages: 36
Registered: July 2009
Member
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 #44187 is a reply to message #44097] Wed, 08 June 2005 02:29 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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
>>>
>>
>>
>>
Re: PDF Fonts [message #45795 is a reply to message #44218] Tue, 14 June 2005 17:55 Go to previous messageGo to next message
Joe Rybacki is currently offline Joe RybackiFriend
Messages: 36
Registered: July 2009
Member
I've gotten as far as getting
<fo:block font-family="3 of 9 Barcode" font-size="36pt" padding-top="1mm">
259
</fo:block>

into the FO file, but FOP is still not embedding the font...going to do some
more digging... is there some font that I could test to make sure it's not a
problem with my font?

Thanks,
Joe

"Gerald Chan" <gerald@nhl.co.jp> wrote in message
news:42A659A8.6040101@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
>>>>
>>>
>>>
>>>
Re: PDF Fonts [message #45979 is a reply to message #45795] Tue, 14 June 2005 21:32 Go to previous message
Joe Rybacki is currently offline Joe RybackiFriend
Messages: 36
Registered: July 2009
Member
Finally figured out what the problem was...Somewhere along the lines birt's
converting the font name to lower case so it wasn't matching the
fop-userconfig file. Thank god that one's over ;) Thanks for your help


"Joe Rybacki" <Joe.Rybacki@dynetics.com> wrote in message
news:d8n5mk$bp3$1@news.eclipse.org...
> I've gotten as far as getting
> <fo:block font-family="3 of 9 Barcode" font-size="36pt" padding-top="1mm">
> 259
> </fo:block>
>
> into the FO file, but FOP is still not embedding the font...going to do
> some more digging... is there some font that I could test to make sure
> it's not a problem with my font?
>
> Thanks,
> Joe
>
> "Gerald Chan" <gerald@nhl.co.jp> wrote in message
> news:42A659A8.6040101@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
>>>>>
>>>>
>>>>
>>>>
>
>
Previous Topic:count of connection objects and data set editor
Next Topic:Problem in Viewer
Goto Forum:
  


Current Time: Thu Mar 28 23:44:44 GMT 2024

Powered by FUDForum. Page generated in 0.02947 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top