PDF Fonts [message #43876] |
Tue, 07 June 2005 13:42  |
Eclipse User |
|
|
|
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 17:32  |
Eclipse User |
|
|
|
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
>>>>>
>>>>
>>>>
>>>>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.29918 seconds