You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Chandrasekhar Sanku <ch...@wipro.com> on 2004/07/13 06:48:24 UTC

out of memory exception while creating font metrics

Hi all,

 

    To use system fonts in FOP, I am creating metrics files for each
font. While doing this process, my program is giving out of memory
exception.

How to resolve this problem...

 

   I am attaching the method what I have written.. 

 

   Please suggest me in this regard, if anybody already faced this
problem...

 

 

Thanks & Regards,

Chandrasekhar Sanku.

 


Re: out of memory exception while creating font metrics

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Chandrasekhar Sanku wrote:
> Can't we run the program without increasing the heap
> size?????

The metrics generator holds the whole font file in memory
and creates a substantial amount of additional in-memory
structures. There is a reason why you get an OutOfMemory
error, you see... Unless someone converts the program to
use java.io.RandomAccessFile instead of TTFFile, you'll
need to run the JVM with more memory than the default for
processing fairly large fonts.

J.Pietschmann

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: Problem with Linking Font (Not Embeded Font)

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Varadharajan Sethuraman wrote:
> Actually my problem is that, I can't specify the /*embed-file 
> attribute*/ value in the  userconfig.xml file. 
> Hance,  is there any workarround to achieve the linking font issue...?

I'm not sure what you mean by "I can't specify the /*embed-file
attribute*/" I have no problem using embed-file="no" in the font
declaration. Unfortunately, the rendered PDF will only display
text in Acrobat Reader if the font in question has been installed
with Acrobat, because FOP doesn't provide a mapping in the PDF
font dictionary which Acrobat can use to get the system's font
file.

J.Pietschmann

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: Problem with Linking Font (Not Embeded Font)

Posted by Varadharajan Sethuraman <va...@yahoo.com>.
Thank you very much...
 
Actually my problem is that, I can't specify the embed-file attribute value in the  userconfig.xml file. 
Hance,  is there any workarround to achieve the linking font issue...?

Bye
Varadha

"J.Pietschmann" <j3...@yahoo.de> wrote:
Varadharajan Sethuraman wrote:
> If any one knows about Linking font with pdf using FOP.

It doesn't work with 0.20.5, because of problems with font name
mangling. You *must* embed non-standard fonts.

J.Pietschmann

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org



		
---------------------------------
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!

Re: Problem with Linking Font (Not Embeded Font)

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Varadharajan Sethuraman wrote:
> If any one knows about Linking font with pdf using FOP.

It doesn't work with 0.20.5, because of problems with font name
mangling. You *must* embed non-standard fonts.

J.Pietschmann

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Problem with Linking Font (Not Embeded Font)

Posted by Varadharajan Sethuraman <va...@yahoo.com>.
Hi All,
 
I have a problem with linking the font (not embeded font) with pdf.
In the userconfig.xml file I have specified only metric-file attribute. I haven't specified 
embed-file attribute value. 
 
Following highlighted paragraph from taken from http://xml.apache.org/fop/fonts.html
It says that particular font file should be there in the local system. Yes, Its there. But eventhough it is not working...

The "kerning" and "embed-file" attributes are optional. Kerning is currently not used at all. If embedding is off, the output will position the text correctly (from the metrics file), but it will not be displayed or printed correctly unless the viewer has the applicable font available to their local system. 
If any one knows about Linking font with pdf using FOP. 
Kindly help me....
 
Regards
Varadharajan S
 

		
---------------------------------
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.

RE: out of memory exception while creating font metrics

Posted by Chandrasekhar Sanku <ch...@wipro.com>.
Hi Chris,

   I did the same. If I increase the heap size, I am not getting any
error.. But if I run the program, without increasing the heap, then it's
giving the problem. Can't we run the program without increasing the heap
size?????
Is there any alternative to this problem other than this.
   That's my basic doubt.....


Thanks & Regards,
Chandrasekhar Sanku
-----Original Message-----
From: Chris Bowditch [mailto:bowditch_chris@hotmail.com] 
Sent: Tuesday, July 13, 2004 3:15 PM
To: fop-user@xml.apache.org
Subject: Re: out of memory exception while creating font metrics

Chandrasekhar Sanku wrote:

> Hi all,
> 
>  
> 
>     To use system fonts in FOP, I am creating metrics files for each 
> font. While doing this process, my program is giving out of memory 
> exception.
> 
> How to resolve this problem...
> 
>  
> 
>    I am attaching the method what I have written..

Some of the fonts in the Windows System area are fairly chunky, Arial
Unicode 
has loads of glyphs in it, and 64M probably isnt enough to process it. 
Increase your JVM heap to 256M, and try again. If it still fails, do a 
System.out on each font/style to show progress so you can see which font

causes the OutOfMemoryException.

Chris


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Confidentiality Notice 

The information contained in this electronic message and any attachments to this message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged information. If
you are not the intended recipient, please notify the sender at Wipro or Mailadmin@wipro.com immediately
and destroy all copies of this message and any attachments.

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: out of memory exception while creating font metrics

Posted by Chris Bowditch <bo...@hotmail.com>.
Chandrasekhar Sanku wrote:

> Hi all,
> 
>  
> 
>     To use system fonts in FOP, I am creating metrics files for each 
> font. While doing this process, my program is giving out of memory 
> exception.
> 
> How to resolve this problem…..
> 
>  
> 
>    I am attaching the method what I have written….

Some of the fonts in the Windows System area are fairly chunky, Arial Unicode 
has loads of glyphs in it, and 64M probably isnt enough to process it. 
Increase your JVM heap to 256M, and try again. If it still fails, do a 
System.out on each font/style to show progress so you can see which font 
causes the OutOfMemoryException.

Chris


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org